The Programmer Hierarchy

March 17, 2013 at 11:09 am | Posted in community, Hacking | Leave a comment
Tags: , , , ,

Recently I came across a chart created by Luke Welling showing programmer hierarchy. Seems like Luke Welling has pencilled facts:

chart-Luke-Welling

I googled for ‘Programmer Hierarchy’ and came across another chart by Dmitry Ignatiev. Thougdt I needed to share this too

chart-Dmitry-Ignatiev


Copyright © 2013 Arnuld Uttre, Village – Patti, P.O – Manakpur, Tehsil – Nangal, Distt. – Ropar, Punjab (INDIA). Copyright does not apply to charts shown here. Please contact authors for copyright terms of respective charts.

Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.

A Modern Systems Programming language

March 28, 2012 at 10:50 am | Posted in Hacking, Programming | Leave a comment

With more effort in the direction of finding a modern systems programming language I had email communications with several people including Eli Gottlieb, creator of decac programming language, GNU Hurd community and ATS language community. It was Eli Gottlieb who gave me the idea that unless I am doing a hobby project I should talk to Hurd people about my ideas and I am glad I did and as you have seen my letter to Hurd community already in my previous post, to find the replies, check out march 2012 archives of bug-hurd mailing list or go here

Seems like Hurd guys either did not like my idea or are nto intersted in it at all, hence I decided to not do any further debate. ATS community has given some replies here, else you can chekc out March 2012 mailing list archives from their site http://www.ats-lang.org

Eli has advised me to go through osdev.org and learn something about OS programming before I venture into writing a microkernel myself. Hongwei from ATS advised to first write a microkernel and then later see how ATS ecnodes to those principles. Wise advice and I am gonna follow. I don’t think I wil start HurdNG development anytime soon, in fact its gonna be quite late. I also need to to how decac was designed and what does it offer, then check out ATS too. While in the meantime I am checking other high level langauges like Haskell and what they offer and comparing the design-ideas to decac, ATS, C and C++ in return. Going to be a lot of work. We have quite high-level and very good programming langauges available at our disposal e.g Common Lisp, Haskell Caml etc. and good modern scripting languages and are available too (Squirrel is one of them, angel-code scripting library is another major step) but not much of mature modern systems programming languages.

 


Copyright © 2012 Arnuld Uttre, Village – Patti, P.O – Manakpur, Tehsil – Nangal, Distt. – Ropar, Punjab (INDIA)

Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.

Must Reads – 1

March 23, 2012 at 4:59 pm | Posted in Hacking, Programming | Leave a comment

I started learning programming in year 2005. After I quit my sales job in February of 2005, I purchased Red Hat Linux Bible in end of April same year. It has been 5 years since then, I learned a lot about computers and it became my passion since then, all possible because of GNU, different Newsgroups, mailing lists, forums and all the helpful people in this virtually real world. I have read many articles and books and essays and history of UNIX, Linux, GNU, BSD, Debian, and many other organizations and groups. Based on my experience I am providing here a list of articles that every computer science student, every programmer must read if he wants to truly understand what he is doing. In fact, every person who buys softwares must read some fo them to open up his mind, same way he knows about his motorcycle like what is spark plug and where it is, what air to keep in tires, if you own a car then how to learn to safely drive a car, how much useful those air-bags are, how to overtake (never to overtake from left e.g.), when is its really essentially to honk, not to talk on mobile phone while driving etc. That way no one wil be able to fool him around while buying softwares. May be after reading them a general computer user will walk on a path and come to know that Truth is really far more stranger than fiction. Ideal process would be o just read these links and google for extra depending on if you want to do computer programming or if you are not a programmer and you need something specific or just out of curiosity:

I guess in 1996 I tried to learn English from a book which you can find on every corner of India and it boasts to teach you English in 30 days. I tried and failed several times. Then in my graducation I tried to learn programming from a 30 days book and I failed again. So it worked out. The problem was that these 30 days, 30 weeks, 10 days, 21 days books never teach fundamentals. Most of them have many unreasonable assumptions. By reading these you can only have superficial knowledge about these subjects and 0% knowledge of basics. This is so strange but I myself wanted to write an article like Teach Yourself “Martial-Arts/Car-Repair/Large-Scale-Electric-Systems/Nuclear-Physics/Fine-Arts/somethnig-here/fill-your-favorite-words-here” in 10 Years.. AT that time I never came across anything like blog, in 1996 there was not internet at my place, therefore I never wrote the article. Later I went into different kinds of jobs and forgotten about it. When I started learning programming and started my blog I wanted to write one but then suddenly one day I came across Peter Norvig’s Teach Yourself Programming in 10 Years and I got surprised. I concluded I will not write any blog post about my experience because people will think I am copying Peter Norving and trying to imitate him. So I dropped the idea but in the meantime before internet came I shared my experience of 30 days books with my friends.

I don’t remember all the articles I have read over years. I will keep on adding them as soon as I remember.

 


Copyright © 2010 Arnuld Uttre, #331/type-2/sector-1, Naya Nangal, Distt. – Ropar, Punjab (INDIA) – 140126

Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.

Insertion Sort

September 7, 2011 at 7:03 pm | Posted in Hacking | 2 Comments
Tags: ,

I always had a hard time understanding algorithms, so I tried to understand them and failed to understand them. This cycle repeated for at least 2 years. I always wanted to have solid grounding in algorithms and data structures. After 3 years of working in Phonologies I finally got my head around many programming skills. With that experience in my bag and my frustration of failing everytime from last 2 years, I decided to give algorithms a super-hard try again. I decided I will go hard-headed into algorithms like a man who will eat, sleep, drink and cry algorithms and nothing else. Just dig seep and get my whole body dirty in the process of digging like a labour man. Took me a few months to find out a book that fits my mindset. Its written in a very simple and straighforward manner and even after that I felt a lot of difficulty in understanding first few chapters. And finally I am able to get my head around algorithms. Have read first three chapters and insetion sort is given as an example while selection sort is given an exercise which Iw as able to solve. Here is my take on Insertion Sort, on how I understood it:

This is Insertion Sort from Wikipedia which is similar to Cormen’s book:

for j = 1 to length(A)-1
     key = A[ j ]
      i = j - 1
     while i >= 0 and A [ i ] > key
         A[ i +1 ] = A[ i ]
         i = i -1
     A [i +1] = key

Felt too much confused with this, I tried to understand many times but never did. Did not find anyone explaining in the way I understand, hence I tried to use a C array of integers to understand and came up with this:

  1. Take A = {3,5,2} as array to apply Insertion Sort pseudo code
  2. first 3 lines: j = 1, key = 5, i = 0
  3. while loop will not execute as A[0] = 3 and 3 > 5 is not true A = {3,5,2}
  4. Last line: A = {3,5,2}
  5. Outer loop 2nd turn, first three lines: j = 2, key = 2 , i = 1
  6. After inner while loop, first round A = {3,2,5}, i = 0
  7. After inner while loop, second round A = {3,3,5}, i = -1
  8. Last line: {2,3,5}
  9. Outer Loop finishes array is sorted

I am not a child prodigy hence it took me 3 hours to come up with an array with right elements in place. I did 3 pages of paper work with wrong values and wrong indices before I got them right. (please add 5 more days where I tried really haaaaaaaard to understand from the book). Hard part was not understanding the example of playing cards. Cormen’s book uses playing cards example to show insertion sort (special thanks to the authors as that picture of a hand sorting cards really helped). Real life sorting of playing card is very easy, I have done it a thousand times without thinking. Translating that practical approach into pseudo code was the hard part.


Copyright © 2011 Arnuld Uttre, Village – Patti, P.O – Manakpur, Tehsil – Nangal, Distt. – Ropar, Punjab (INDIA)

Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.

The Way of C++ Problem Solving

August 9, 2011 at 11:36 am | Posted in C++, Hacking | Leave a comment

Many programmers write their programs in C and then save the program with extension .cpp and call it C++ program. I am one of them, except that I don’t call those programs C++ programs. I don’t know have much knowledge of C++, mostly work in C. Over time I have read so many articles and blogposts that I am fully convinced beyond any doubt that C++ and C are two similar looking and very different languages. They were designed with different aims, they have entirely different philosophies about designing a program. Unlike what most programmers say that C anc C++ are brothers, I will say they are not even far distant cousins. C and C++ are 2 persons who belong to different nationality and have different skin color and they speak different languages. To know the true way of C++ I thought of writing a C++ program which reads a file and saves that into a std::string (This is first lesson, use std:: string instead of using namespace std which defeats the aim of namespaces. I posted the discussion my probblem on comp.lang.c++ which you can read on archives like rhinocerus and velocityreviews:

http://www.velocityreviews.com/forums/t752581-reading-a-file-into-std-string.html

http://www.rhinocerus.net/forum/language-c/682219-reading-file-into-std-string.html

I wrote the code as a C Programmer who did some google search and read a few pages of Stroustrup. Red Floyd posted a true C++ version. You see how much the difference in thinking, Red Floyd’s code is much superior than mine. You can easily conclude that C++ what you know or what your colleagues know is not really true C++. This program made me think harder about my learning and experience as a computer programmer. Solving problems in C++ is really vastly different from the way we do it in C. Don’t write C code and save the file with extension .cpp. If you want to write C code then please save the file as .c Lessons learned

#include <iostream>
#include <fstream>
#include <string>


int main()
{
  std::string my_contents, tmp_contents;
  std::ifstream my_file("reference.cpp");
  if(!my_file)
    {
      std::cerr << "Error Opening file" << std::endl;
      exit(EXIT_FAILURE);
    }

   while(my_file)
    {
     std::getline(my_file, tmp_contents);
     my_contents += tmp_contents;
     my_contents += "\n";
    }

  std::cout << "String contents are: "<< "\n"
	    << my_contents << std::endl;

  my_file.close();


  return 0;
}

 

#include <iostream>
#include <fstream>
#include <string>


int main()
{
  std::ifstream my_file("reference.cpp");
  if(!my_file)
    {
      std::cerr << "Error Opening file" << std::endl;
      exit(EXIT_FAILURE);
    }

  /* This was posted by "redfloyd" on comp.lang.c++ */
  std::string my_contents(std::istreambuf_iterator<char>(my_file.rdbuf()), (std::istreambuf_iterator<char>()));

  std::cout << "String contents are: "<< "\n"
	    << my_contents << std::endl;
  return 0;
}

 


Copyright © 2011 Arnuld Uttre, Village – Patti, P.O – Manakpur, Tehsil – Nangal, Distt. – Ropar, Punjab (INDIA)

Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.

Next Page »

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.

Follow

Get every new post delivered to your Inbox.