Linked List implementation of a Queue in C
May 13, 2009 at 11:51 am | In C++ | Leave a CommentTags: open source, proprietary software, C++, Linked List, Queue, comp.lang.c, propriet, russian pipeline explosion, CIA bogus software, CIA
A Queue is a FIFO based data structure. I tried to create one and got lots of advices and improvements from comp.lang.c folks. I am posting it here, in case someone gets benefit from that. I believe in Open Sharing of source code, it helps the community, it helpes the poor people like me who either did not have money to join some course or did not have enough of experience or a Master’s degree to get a job. Working on an Open Source software greatly improves the ability of the people to write quality code and also (as a side-effect) consumer always gets a robust product, a piece of software that they can trust. I am defnitely sure, you can’t trust a proprietary software, no one knows what its doing on your computer (except of the compnay who created it). MNCs are only intersted in making money and taking control of the market and doing a dishonest business always makes more money than doing an honest business. Having secrets of other corporations delievered to your doorstep always helpes in building a monopoly and I think proprietary software is a brilliant concept to spy on other companies and homes of general public. Never ever forget the Russian gas piple-line scandal. Perhaps reading some news will help.. You can even check amazon. Whether you are a government or an organization or an individual, you can not trust a piece of proprietary software, you don’t know what it does, you will never know.
I have seen people writing poor quality C code for years. They wrote poor C programs when they were 23 ( starting their Master’s degree) and when they were 25 (first day of the job) and now they are 29 and after 4 years of experience they still write poor quality code (Mostly these people are also the ones who have passed their professional degree in first division). Its because they are working in proprietary software based business company because of which they can not share their code. No critics and hence no improvement and in their spare time they never tried to read comp.lang.c archives though they do get time to shake beer glasses with their friends sometime or joke about the habist of their fellow team-mates or their boss or whetever they like but they never get time to read comp.lang.c
. You can always find the original duscussion of my program on Usenet.
/* This Queue implementation of singly linked list in C implements 3
* operations: add, remove and print elements in the list. Well, actually,
* it implements 4 operations, lats one is list_free() but free() should not
* be considered the operation but a mandatory practice like brushing
* teeth every morning, otherwise you will end up loosing some part of
* your body(the software) Its is the modified version of my singly linked
* list suggested by Ben from comp.lang.c . I was using one struct to do
* all the operations but Ben added a 2nd struct to make things easier and
* efficient.
*
* I was always using the strategy of searching through the list to find the
* end and then addd the value there. That way list_add() was O(n). Now I
* am keeping track of tail and always use tail to add to the linked list, so
* the addition is always O(1), only at the cost of one assignment.
*
*
* VERISON 0.5
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct my_struct
{
int num;
struct my_struct* next;
};
struct my_list
{
struct my_struct* head;
struct my_struct* tail;
};
struct my_list* list_add_element( struct my_list*, const int);
struct my_list* list_remove_element( struct my_list*);
struct my_list* list_new(void);
struct my_list* list_free( struct my_list* );
void list_print( const struct my_list* );
void list_print_element(const struct my_struct* );
int main(void)
{
struct my_list* mt = NULL;
mt = list_new();
list_add_element(mt, 1);
list_add_element(mt, 2);
list_add_element(mt, 3);
list_add_element(mt, 4);
list_print(mt);
list_remove_element(mt);
list_print(mt);
list_free(mt); /* always remember to free() the malloc()ed memory */
free(mt); /* free() if list is kept separate from free()ing the structure, I think its a good design */
mt = NULL; /* after free() always set that pointer to NULL, C will run havon on you if you try to use a dangling pointer */
list_print(mt);
return 0;
}
/* Will always return the pointer to my_list */
struct my_list* list_add_element(struct my_list* s, const int i)
{
struct my_struct* p = malloc( 1 * sizeof(*p) );
if( NULL == p )
{
fprintf(stderr, "IN %s, %s: malloc() failed\n", __FILE__, "list_add");
return s;
}
p->num = i;
p->next = NULL;
if( NULL == s )
{
printf("Queue not initialized\n");
return s;
}
else if( NULL == s->head && NULL == s->tail )
{
/* printf("Empty list, adding p->num: %d\n\n", p->num); */
s->head = s->tail = p;
return s;
}
else if( NULL == s->head || NULL == s->tail )
{
fprintf(stderr, "There is something seriously wrong with your assignment of head/tail to the list\n");
free(p);
return NULL;
}
else
{
/* printf("List not empty, adding element to tail\n"); */
s->tail->next = p;
s->tail = p;
}
return s;
}
/* This is a queue and it is FIFO, so we will always remove the first element */
struct my_list* list_remove_element( struct my_list* s )
{
struct my_struct* h = NULL;
struct my_struct* p = NULL;
if( NULL == s )
{
printf("List is empty\n");
return s;
}
else if( NULL == s->head && NULL == s->tail )
{
printf("Well, List is empty\n");
return s;
}
else if( NULL == s->head || NULL == s->tail )
{
printf("There is something seriously wrong with your list\n");
printf("One of the head/tail is empty while other is not \n");
return s;
}
h = s->head;
p = h->next;
free(h);
s->head = p;
if( NULL == s->head ) s->tail = s->head; /* The element tail was pointing to is free(), so we need an update */
return s;
}
/* ---------------------- small helper fucntions ---------------------------------- */
struct my_list* list_free( struct my_list* s )
{
while( s->head )
{
list_remove_element(s);
}
return s;
}
struct my_list* list_new(void)
{
struct my_list* p = malloc( 1 * sizeof(*p));
if( NULL == p )
{
fprintf(stderr, "LINE: %d, malloc() failed\n", __LINE__);
}
p->head = p->tail = NULL;
return p;
}
void list_print( const struct my_list* ps )
{
struct my_struct* p = NULL;
if( ps )
{
for( p = ps->head; p; p = p->next )
{
list_print_element(p);
}
}
printf("------------------\n");
}
void list_print_element(const struct my_struct* p )
{
if( p )
{
printf("Num = %d\n", p->num);
}
else
{
printf("Can not print NULL struct \n");
}
}
Copyright © 2006, 2007, 2008 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.
My friends will kill me
February 24, 2009 at 7:15 pm | In Hacking, History, Patterns | 11 CommentsTags: community, conscience of a hacker, free software, hackers, infoware, Loveware, OpenSource, programmer, programmers, Programming, UNIX
Its been more than a year (since 2007) that I am using a a Linux distro running on text-based system configuration. The idea was difficult to adopt in the beginning but it look intelligent to me. So friends here is my Linux box running on Arch . There is no way you can edit any network or printer configrations from the Administration menu of GNOME in Arch. If yuo want to configure then go edit the text file. My colleagues who are still using Ubuntu struggle with the unknown and unrasonable problems everyday but they stick to Ubuntu, its Administration menu, the GUI based system to configure the system settings and they are stil there. Even after several years of usage they get mentally handicapped when some problem arises. They ask stupid questions to each other. Here is some conversation:
Ubuntu User 1: My system is not booting properly in Ubuntu. What should I do ?
me : whats the problem ?
Ubuntu User 1: I don’t know, Ubuntu is showing some error.
me : What kind of error. Is root file system geting mounted.
Ubuntu User 1: I don’t know.
me : Let me check
Ubuntu User 1: Don’t worry, I will reinstall Ubuntu.
Later I found out, fsck was showing some error on mounting /home partition and was throwing the user into maintenance shell to do fsck but he kep on pressing the Reset button instead.
Ubuntu User 1: I have Ubuntu but I need to play 3D games. Ubuntu does not play them as good as Windows XP.
Ubuntu User 2: Install Sabayon, you can play good games on it.
me : What playing games has to do with either Ubuntu or Sabayon (or even Debian) ?
Ubuntu User 2: Debian does not have any games.
me : Debian has largest collection of packages among all the distros. You only need to install a game using apt-get. Even if the package is not there, then you can download and install it.
Ubuntu User 2: With Debian I have to configure GNOME manually to run, eve after install it. I don’t want to configure GUIs.
me : Debian comes auto-configured. You just install something, e.g. X, and it configures it automatically.
Ubuntu User 2: No, Debian does not play games.
I really don’t understand this, if there is Open Source game, and the package is not available for Debian then you can compile it form source. But my friend does not say that he can’t compile, he says “Debian does not run games”. See the difference ?
Ubuntu User 1: I will not use Fedora, my sound system does not work in Fedora. It works in Ubuntu. So I will use Ubuntu.
me : your statement does not make any sense. Both Ubuntu and Fedora are Linux distros, you can check the sound module of your card and load it in Fedora.
Ubuntu User 1: you don’t want listen to me. I said, there is no sound coming in Fedora.
me : you need to run the lspci to check for what hardware you have and the see lsmod on Ubuntu to know the name of the kernel module being used for sound. Also check for Linux kernel version.
Ubuntu User 1: I will ask some one else who can solve my problem, you just don’t understand it.
Ubuntu User 2: Why go so deep into Linux. He can just reinstall Ubuntu if he gets problems.
… and they got angry. No.. I am serious, they are angry now.
I can show you thousands and millions of Linux users like this, who don’t want to know how to solve problems . First I thought, they don’t like the black screen of command line (I too don’t like it) or even the white background of X-terminal (which I do like), then I thought no one likes to type some words, you just need a mouse click and even these days companies are creating mouses with which we can type characters using clicks. Then I came to know the problem is more fundamental than Linux issues. The problem is of pain, finding the cause of some problem is a painful process (whether Linux or real life), even when you want to build a new house or put the wash-basin at some place in yoru house , it takes some amount of understanding and familiarity with how the houses are constructed and used by people. Putting time into understanding the house when your retired Father is finally building his sweet home , takes energy and the ability to take pain (mental exhaustation ?). All of colleagues are not running away from Linux, they are running away from pain the Linux gives. No one wants pain, everyone wants joy. Yeah.. me too. I want happiness and peace of mind.. the joy of life. The why do I believe in struggling with problems in Linux for days and nights when a 45 minutes Ubuntu reinstall will solve the problem. Why do I get into pain ?
To answer that question I have to go back to my earlier days, the day before I even installed Linux, the day my friend Dinesh mentioned the word Linux to me. Its all about happiness. So let me answer the question I have aksed: Why did I install Linux, because I trusted my friend, I knew he is intelligent than me, Its matter of friendship, the trust and respect you give to your friend based on his ability to creeate angels and daemons on hardware. Moreover I accepted my incompetence in front of him. Dinesh knew it wil be painful for me (a typical Windows User) to install Linux but he never helped me, he never said that he will want to help me. It was like the Cat’s kid, the Cat does not pick up her kitten when he falls while walking on some fence. She does not help her children because she wants them to learn to face the reality of life (quite in contrast to Human Mothers). I think thats why Cats grow out to be so intellgent. It is natural process of how cats grow their kittens. Kitten feels pain but that is required to successfully walk the fence, he needs training and his Mother gives him proper. Same way Dinesh behaved like. In the World of Linux, he was Cat and I Was his kitten and he handled me well. I am proud of having a friend like him who belives in letting people learn themselves rather than spoonfeeding them, a typical Hacker behavior.
Now when I struggle with the problems for days, then I am learning, I am looking for the final happiness, the long-term hapinnes, rather the short-term happiness caused by reinstallation. My friends have based their Linux learning on short-term happiness, thats the whole point. Their definition of hapinnes and my definition of happiness are different. They want quick-fix (cocaine ?) and I Want to drink Milk for 2-4 years continuouly everyday becayse only after years of this daily routine I will be in a good health. Their source of happiness is 2 hours ( Bade Miyan Chote Miyan ?) , my source of happiness is solving problems ( The Money Masters ?). and thats the source of everyone’s way of living this life. If you are still reading, good and if you are still reading and understand it too, well, congratulations, you can be the one you want to become. As a final note, I have edited the subtitle that comes with Ubuntu:
Linux for Idiot Beings
or need I say: Linux for Windows Beings, for Windows and Ubuntu users don’t have any identity of their own, they have let Microsoft shaped their way of thinking about software. They are no longer original but just copies of the way the Windows is designed.
Copyright © 2006, 2007, 2008 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.
The Key
January 13, 2009 at 5:54 pm | In History, community | 15 CommentsTags: corporate, free software, gnu manifesto, hackers, MNC, OpenSource, Programming, software
I was wandering on #freebsd and #openbsd some days ago and was pretty much amazed when people did not like GNU way. Then I read FreeBSd and OpenBSD FAQs and foud that BSD folks are very keen on replacing any GPLed code in their system with newly written BSD licensed code. OpenBSD even says that GPL is acceptable as last resource.
what the heck ?
I was very much interested in installing OpenBSD and using it as my daily OS but after this I was literally hurt. I decided not to spend any time on BSD, rather using that time to understand the GNU software. The current situation of software demands proper attention, commitment and dedication to copyleft ideals, otherwise proprietary software companies will keep on getting stronger and stronger and will keep on eating the society in the name of business and it will affect the Free Software community as whole, whether BSD or whether GPL or whether Apache people. It will affect all of us, after all we make together free software community). Free Software is about our responsibility to help society grow better , to make technical innovations that will help removing misery and pain from this planet while proprietary software people are totally committed the other way, make money on the cost of society. Earth is the place where out kids grow, where our loves ones and friends live, and where we see people like us trying to help each other, proprietary software supporters, intentionally and indirectly do not want, they want control of economy and by writing BSD code BSD people help them in gaining control over society and hence themselves (Windows has some BSD code), BSD license is like giving someone a sharp knife, telling him that he can use it to cut vegetables and fruit so that he can make his health better but that person uses that knife to stab you , in the face…
What people like me do, we don’t give such people the knife, we give them GPL, they can’t attack us back. Whose responsibility this society is ? Who wants to stand for his country, for people need to grow out of misery and pain and lower level of poor life to get better education, better health and a better future. if software is the tool then who will accomplish this ? If software is the key in creating a society of liberated, educated and technical people who can take leadership and responsibilities in their own hands then what will you do ? .. Now don’t say “Oh.. please, we write software, don’t include politics here”..
Well, why Niels Bohr (if you have read Science then must be knowing him), a great scientist was flown in a small and risky 2 seat airplane from, IIRC, Denmark to Britain. He literally stopped breathing because of some of technical problem in the plane. British people have to revive him when the airplane landed. It was one of the operation of World War 2. Now why a non-violent scientist came under the World War 2 plan. Its because he was extremely technical when it comes atomic science. If Hitler could have him then Atomic Bombs would have fallen on USA and UK, not Nagasaki and Hiroshima and your people, your friends, your loved ones will be saying “Heil Hitler” instead of “this time I’m free“. Niels Bohr has the tool to a Free Society and same way in year 2009, the Free Software is the key to a free society where no one is judged on the basis of his religion, his race, his color or his cast. In the world of free software we judge people based on their programming skills and we believe that Information needs to be free for society needs to grow and remove the pain and misery from the lives of their fellow people.
I think writing BSD licensed code means helping the greedy business to establish the control over us. Don’ do that, if you love your freedom. I Love the Hacker’s ideals and from experience I can say that Hackers can become great politicians, and great Leaders who can turn the direction from where human lives are heading today to a better and prosperous future where the government will support people to help themselves and then will get out of their way to let them grow. Its the Free Society, where anyone can assume his responsibility for his countrymen then he will lead, GPL is the key in doing that, if you loose it, you loose the quality. you loose the peace that a man wants in his entire life. Accept the truth and truth will set you free.
Copyright © 2008, 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
Way of Life
November 15, 2008 at 12:11 pm | In Hacking, History, community | 1 CommentTags: free software, GNU, Linux, software, UNIX
People are wrong when they say GNU (FSF) is just a collection of free softwares, GNU is a way of life. This way of life transcends itself from software profession into one’s personal and social life too. The truth is not that when people come in the GNU community then they become good, that they become the ones who think of society first instead like others who think of their selfish business interests based on the proprietary softwares.
The actual truth is GNU is a place which attracts people who work in the favor of the society, in the interest of humanity. GNU is nothing less than unicef , helping both kids and mature people who have a common interest in making technology better so that that technology can be used to put humanity on the forefront of innovations. When GNU was founded it gave a platform to all the people who were working on different places all across the different nations, to come under one umbrella, the Free Software Movement.
For me, GNU worked liked Red Cross. I have worked for 5 years with Windows, 3 years in college plus 2 more years at home and when today I compare my learning in Windows with just 2 years of working with Linux I see, I am much more of a man with common-sense about software. Windows is an Operating System which kills your senses, and so are all the other proprietary Operating Systems. They kill your senses. It is like you purchased a Motor Cycle and you don’t know where are its spark plug and Petrol Tank. When it stops working, you go to the Manufacturer and he charges you $100 and then tells you that your Petrol Tanks is empty, please fill it and then it will work. It is exactly same in the case of support from Proprietary Softwares. GNU gives you the complete Motor Cycle like as it exists today, you can see where is the engine, where is the spark plug and when trouble happens, you can open them and look for the solution. You can think of the fully-covered machines and then can imagine where our development have been gone if it was like that. The technology must remain open for everyone to study , so that they can spend their time on understanding problems and offering solutions. This is what exactly Free Software community does and I think this is what exactly GNU does. Making money and keeping technology patented are two very-very different things. Corporations are making money on both GSM and CDMA technologies while GSM is open and CDMA is patented. In fact, 82% of the Mobile market is owned by GSM, an open standard. I don’t understand why companies making proprietary software get so baffled when someone talks about Free Software in front of them. For becoming the leader of the market and #1 in business, your competitors need to go out of business. You do that by solving some problems which are unsolved yet, by changing your way of doing business, by offering some service to your customers, services that seem very simple and general but never done, by looking at the domains that are not understood by pointy-haired bosses. Google did that same, it solved the problem of searching, it solved some problems of e-mail. If you will look at the history of corporate you will find many examples conforming my viewpoint.
Business means making money, by either hook or crook. Unfortunately, general public does not want to understand this, an average man avoids an understanding of his surroundings all the time. He spends 30 years in his job, yet never tries to understand why he is there doing his boring job. He never asks himself what will happen to the company if no one does his kind of job. He never tries to understand his place or the place of his seniors in the company. If one tries to do so, he will get fed up by the so less power he gets in his current job, he will get impatient by thinking if his job and comparing it with what he can do, what he could have accomplished in last 5 years. Many people are afraid of doing business in first place, that fear is nothing, the fear of loosing is just plain nonsense because if you don’t get any risks, if you don’t have any insecurity, you won’t get anything worthwhile (e.g. having 10 million dollars in your bank account is one worthwhile thing, while the other worthwhile thing from my view point is I can buy nutritious food and make my body strong) . One can also make money by not harming the society. One can make money by making the society, the surroundings a better place to live. There is no need and there is no point in using political tactics to gain power in business. It is like that we have create a different type of business-model while keeping it more-profitable than current models. Besides that when one works in interest of his people, he will not know, how many people will be helping him. There will be communities working day and night to support such a business. One of those organizations is GNU.
GNU is not only about software. Its about making lives better. The people from the Free Software Community are not the onle ones who can become great Hackers (a.k.a great programmers), they are also the ones who can become great politicians, innovative businessmen and global leaders. I know most readers will not understand that. GNU uses software as a primary way to express itself. How do you express yourself ? GNU is about living for a cause, GNU is about Freedom, GNU is a about living your life the way you want, the way you truly are, not the way some boss thinks you are. GNU is the way of life, GNU is inside you, GNU is a mirror all you see in GNU is just own reflection. GNU is not only about software, its about Freedom of your inner self from all the chains. GNU just hands you a tool that sets you free. GNU is a way of life.
Copyright © 2008, 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.
Ruminations on Programming – 2
November 6, 2008 at 10:37 am | In Hacking, Programming | Leave a CommentTags: C++, Lisp, newsgroup, programmer, Programming, software, usenet
This post does not contain anything except my own experience with programming. Its just my own experience of 3 years, 2.5 years to be exact, with programming. No, its not stolen. Some programmer from USA read my article on how to kill the poor quality software and then he asked if I stole it from somewhere. I had to tell him that its my own creation. What the heck, they are only my thoughts.
We will start talking on how to be a better programmer. I believe that using Linux to learn programming will give you an edge over the people using Windows. I also believe that if you dual boot your computer with Windows and Linux, you will never be able to learn anything about Linux, over a period of 10 years. I also advise you to use a Desktop Computer rather than a Laptop, unless you have very special and helpless requirements. One thing I am darn sure that can shape you in becoming excellent at programming is to hang at Usenet Newsgroups all the time, e.g. for C use comp.lang.c and comp.lang.c.moderated for Haskell and Lisp, use fa.haskell and comp.lang.lisp respectively. Hang there, read posts, reply to posts on what you think about them, ask questions, give answers. The market is highly competitive when it comes to a job in Software industry, where one has to rely on his programming talent and ability , which can be improved day by day at a miraculous rate if you keep on hanging on Newsgroups all the way. read Usenet before breakfast and after breakfast, read and write the problems before lunch and after lunch, ask questions and reply to queries before dinner and after dinner. Usenet 24 hours a day, you need to live with it, if you truly desire to become an excellent programmer. That may sound like a overfeeding problem but it is not. I told you, getting a Job in Software means high competition even when you have got the job and performing well and being a part of mass fired team is so common that you should not get amazed when 116 employees are fired along with you. You should expect it everyday. As a programmer, you need to check your official e-mail every morning for a termination letter. It sounds really bad and that is how we hi-tech programmers live everyday, in the shadow of penniless future. There is someone who say he is okay while he is living an average life by working only on job and not while in home, with kids. I feel sorry for you if you think that. Your only security is your talent and you need to improve that talent day in, day out, night in, night out. Everyone wants to have a family life and I have to say this painful truth that when you start doing a job, you must improve your programming skills and for that you need to do 2 things:
-
Use the office time efficiently and effectively so that your productivity is more than that of your colleagues. You will not get any extra hour than your colleagues, for everyone has 24 hours in a day. Its only the use of those hours and minutes that will put on different and productive front.
-
Invest your personal and family time into learning the new concepts. Learn what most programmers are weak at, Problem solving, Algorithms, understand when to use which Data Structures , learn a new language which focuses on solving problems elegantly while being a real-life language (like Haskell, Mercury and Common Lisp) while at the same time not focusing on languages which exist purely for monetary reason on this Earth. Working in those languages at your home will give you a new perspective on programming and will definitely equip with an ability and tools that very few will have and those tools and the experiences will serve you all your software life.
Whatever I am describing here is purely from general purpose programming perspective only. Its not directed to one language or one platform in anyway. Its not even directed at solving some particular problems. Its also not about being good at what you do for for bread and butter. Its about living a quality life. Its about thinking about Software on the Monday morning, its about coding while you are in your Friday dressing. If you are not willing to spend next 10 years, perfecting your craft of programming, you better look for some other job or do an FMCG business, a good idea for making 10 times of what you will earn in doing a programming job. So here are my technical ruminations, not in any order, based on my own experience with programming:
-
Remember, we programmers, are problem solvers. My first rumination is in realizing that we are problem solvers.
-
As programmers, we identify the problem at first. We explain *what* first, we need to be very clear on what exactly is the problem we are going to work on. Many programmers identify the effect of the problems to work on rather than the original cause of the problem. This thing needs to be avoided. Identifying the specific problems to solve is one of the most important skills in programming, if not most. If you mess-up this first step, you will mess-up the whole software.
-
We choose tools to solve the particular problems. Those tools may be a collection of data structures, may a set of algorithms and may also be some components of Standard Libraries shipped with particular language implementation. e.g. in Socket Programming, we use Networking components like bind(), recv() and threads to solve our networking problems.
-
We need to practice different ways of collecting and organizing those components so that we can put a structure to them to resolve the problems we are working on. There are many ways to put the components collection into a structure and with experience we will learn and master many of them. It is called the design of the program but design is very subjective word, thats why I used word structure as the approach to put together the components.
-
Many students and even majority of programmers ask a question like “Which language is good for my career, C++ or Java ?” . This stupid question shows the stupid mentality of the seeker. The whole basis on which the question is based is wrong, the thinking about what programming is, in that person’s mind, obtuse. That man needs to take fresh look at what he has learned and should file a human-rights harassment suit against his college(university). There are no careers in programming languages, there is no career in Java, there is no career in C++, there is no career in Oberon and for the heck of emphasizing, there is no career in Lua. There is a career in some domain, there are careers in different domains like System Programming, Telecommunications field, Embedded Programming, GUI development and there are careers in Web Development. There are many types of domains and there are always more than 2 or 3 programming languages used in one domain. Besides that learning about a domain is whole time consuming task. Try doing 3D-programming and tell me. So as good programmers we are supposed to know about the problems of our domain. We need to get familiar and understand the different types of problems occur in the particular domain we are working on and prhaps make a mental note of all of them. It takes some years before you get proficient.
-
This also belongs to the last point. We need to get familiar and understand what types of solutions are used to solve the types of problems identified in step 4. We need to read and find what good programmers and hackers use to solve the particular set of problems in our particular domain. More you do, the better you will be. These 2 steps must get familiar to you like you are familiar with the tastes of foods you like. You just recognize them by smelling or biting the different foods a little. Same way it needs to work for domain problems and the way hackers approach for their solutions.
You can be better programmer, if you will make it happen buy practicing, practicing and practicing…. oops! I am sorry, I was wrong you can not become a good programmer just by practicing, practicing and practicing. The old age saying “Practice makes a man perfect” shows only the partial face of the problem. The other 50% is You also need a company of excellent programmers who will tell you where you are wrong and right and will dictate and improve your programming ability and will teach you what is called quality practice. Practice does not make a man perfect, only quality practice makes a man good at something. That company must consist of helpful and technically sound people. Fortunately that community is existing here from much longer times , it is called Usenet: UNIX Users Network… eat it. HTH, HAND.
Copyright © 2008, 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.
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.