The Real Programmer
March 19, 2012 at 11:04 am | Posted in Programming | Leave a commentTags: C++, decac, Java, Lisp, programmer, Programming
I was checking out what new language to learn. There are several points here:
- Language: Most newbies or less experienced programmers think of learning a new langauge and thats it. They think learning more languages will make them better programmer. Unfortunately this is not true.
- New Paradigm : Other experiences programmers want to learn a new paradigm which will change their way of thinking and make thema better programmer rather than a programmer who knows several languages. He thinks that learning a language like C++ wil automatically make him an OO expert. Sigh…. he got immature mindset too.
- Reality Check : No matter what a programmer wants to do, either of the above or both, his thoughts are crushed by the reality of the software as an industry. He works whole day and then he has a family and he wants to have a life too and there are only 24 hours in a day. Out of all this mess and busy schedule, he starts thinking that he can not afford to spend time learning a langauge which does not give him a rise in his income.
- RealProgrammer : . Now there is another breed of programmers, which I call real programmers (I am one of them. What you think ? … No ? … c’mon just believe it because I am the author of this post
) Here the real programmer, I mean the one who does not believe in quick fixes, the one who started programming because he likes it, because he is happily willing to live next 20, 30, 40, 50 years of his life writing code, THAT ONE decieds to go long term. Rather than deciding on income-factor he goes with programming-factor, he decied to learn new-paradigm, decides to check out something unheard in industry but heard a lot from the mouths of good programmers.
Learning programming for income is like a adding one more language to your Resume and that stops right there and it adds not much to your skill as programmer. I think you must aim for getting more out of the time you spend, you must aim differently, you must aim what your common-sense thinks is right. Unfortunately most programmers don’t have that common-sense because industry is full of programmers who do it for money just like a fruit-seller who sells fruits for money but himself does not eat much of them because he is not interested in how fruits lead to good health. My advice will be wathcing and observing what all brilliant programmers are doing from years and learn from them. Thats what I do.
I am a C Programmer and I wanted that new language to help rise in my career too. Of course the choice came out to be C++. But C++ is almost in the same paradigm as C plus more. C is procedural while C++ has OO and generic paradigms added to and it is designed in such a way that you can add a lot of other paradigms to it but C and C++ belong to almost same kind of mindset. I wanted to write a microkernel for Hurd, hence I dwelled into other languages like BitC and decac etc. but then again lack of time and my focus on what can I do to become better programmer and use my time with maximum productivity. Here are the options I think I have found:
- Haskell
- ErLang
- Common Lisp
- Python
- Ruby
- Ada
- Caml
- BitC
- decac
- Eiffell
- RISC Assembly
- D Programming Langauge
- Prolog
- C++
Now, I can’t learn everything, it will take 2 lives to finish this list off. So after lot sof googling, lots of readings of practical views, research papers etc etc I selected Common-Lisp. Lisp is 2nd oldest language still in existance after FORTRAN. Lisp has a changed a lot since then. Code and Data are same in Lisp. Many concepts were developed first in Lisp and then in other languages e.g. garbage collection. You can write Lisp code which will write Lisp code, its like creating a new language yourself. I learned about recursion in 7 days which I struggled to learn for 4 years with C and C++. I learned Binary-Search in 5 minutes which I am trying from last year to understand with C, in C you struggle more with how to write in C rather than the abstraction of the problem and its solution. (No wait… I am not attacking C, Not at all. C is a great language to learn to know about pointers which Lisp intelligently hides. You must learn both C and Common-Lisp if you are serious about programming.) For Managers Common-Lisp has OO and the next generation fancy (but practical) words e.g. MOP (Meta-Object Protocol if you have never heard of it). There are lot of strange languages and I don’t know why Common-Lisp impressed me so much. So far I have seen only one company in India using it.
Bottom line is: If you want a job, learn Java, C#, .NET or C++ . If you want to be a better programmer and willing to spend next 20 years of your life writing code, you better learn C and Common-Lisp and yeah arrays and pointers are not same and code is data in Lisp. The point is not to run after money but specizlized skills in programming. Specialized skill over long-term attracts money automatically.
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.
Extract of Programming
December 8, 2010 at 12:00 pm | Posted in Programming | Leave a commentTags: community, comp.lang.c, Lisp, programmer, programmers, Programming, proprietary software, usenet, VB
A colleague of mine once asked me a question: How to become a better Programmer ?. It was a small but brilliant question. Most programmers do not think of the answer which is correct. A correct answer will also tell you about the extract of programming. I have hanged on comp.lang.c for quite some time and I have always tried to learn as much as possible from programmers who are more intelligent and better than me. This has led to many changes in my belief-system on what is right way to program and what is the wrong way. Over time my definition of what are called fundamentals and basics of programming have changed, my practice of programming have taken an almost U-turn from what I used to do. I have become better and the very first sentence of the long answer to the question How to become a better Programmer or What is the essence (extract) of programming, will be Love. yes, good programmers, brilliant programmers love to program. They have certain kind of attitude that defines them, that separates them form the rest of void main()s.
I know you will say that everyone just can’t love programming. Yes, you are right. Trouble is, Indian education system does its best to not to let creative students love computers. The whole academic syllabus will be designed and selection of books will be done in such a way they will make any creative man to hate computers. You have to find your own way, you are on your own, thats bad news. Good news is once you determined to find your way then lot of people will help you, many of them you will never meet in real life. The community of these programmers, hanging out there reading code for hours can become your favorite pass time. Real programmers are very helpful friends, instructors and teachers. You will never be spoonfed, you will never be disrespected but only analyzed and encouraged to write good programs, programs that have quality. And one thing I have learned is that qulity comes from writing small programs, not big ones. I had a misocnception when I was a graduate student (most Indian students do have same) that writing big and complex programs will make you a better programmer, It will not (actually It will but its not true for beginners, you must already be good at basics to start writing big and complex software) Unfortunately most programmers have a weak basic and fundamental grouding in what they do. Here is the answer:
- Write short programs. They will make you better. e.g. think what *p++ and *++p will do for a pointer p and what can be the result of *p++ = *++p.
- Don’t just think, write code. Reading books will not take you anywhere. Knowledge alone is essential and it won’t make you a better programmer. Write code and write more code and write a lot more code.
- Write code and read archives of comp.lang.c if you get problems. Most of the time solution will already be there. Don’t just ask for help. Search, read archives and if you can’t sit for hours reading archives and trying code, find some other profession
- Hang onto you favorite language newsgroup. For C we have comp.lang.c, same for others e.g. comp.lang.lisp, comp,land.c++ etc. you can’t be a better programmer without hanging out there for a few years.
- Be technical rather than personal on usenet. If someone says something that you don’t like because it goes against what you have learned from your school/college then please get over it. You are not in school anymore, its real world and hence things are done differently here, things are practical here
- Rather than learning three or four new languages, give priority to learn basic algorithms and data structures. They are tough, yes, and they are very rewarding when it comes to solving real world problems (which is what you will do in a software job/business). This approach will save you not only from lot of suffering caused by Segmentation Faults but also happiness will come when you see how succinct, meaningful and readable your programs have become. Thats called maturity.
- If you want to learn new language then learn something opposite to what you already know e.g. if you know C or C++ already then rather than learning Java, go learn Common Lisp, If you already know Python, then start learning learn Haskell, if you already know Perl, then learn Ruby to see how it solves the same problems. If you think you know already know a lot of programming then read Structure and Interpretation of Computer Programs and tell me how you feel
What I have written is based on my years of experience in programming. I have summarized my experience in a very small and short blog. Don’t just ignore it. I have done many mistakes as beginner and I don’t want you to waste your young years in walking a path and later realize that it was wrong. Youth won’t come again, save it, invest it to proper use. Programming is a kind of love difficult to leave once you got hooked onto living with it. Its a joy but a hard kind of joy
Copyright © 2010 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 Craft of Programming
August 31, 2009 at 11:16 am | Posted in Patterns, Programming | Leave a commentTags: C++, esr, Lisp, Programming, quotes, RMS, software quotes
Here are some quotes I have gathered over the years. They are written by some of the best known Programmers and Hackers with occasionally some very good programmers thrown in, if not great. They inspired me, changed the way I look at programming and especially at some programming languages and methods to solve problems:
“Any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp.” — Philip Greenspun
“Something we didn’t want was an object-oriented language. OO languages remain a popular fad, but our experience using C++ in the EROS system was that it actively got in the way of understanding what was going on.”
– The Origins of the BitC Programming Language
When you want to use a language that gets compiled and runs at high speed, the best language to use is C. Using another language is like using a non-standard feature. — GNU Coding Standards
“First off, I’d suggest printing out a copy of the GNU coding standards,
and NOT read it. Burn them, it’s a great symbolic gesture.” — Linux kernel coding guidelines
“C++ will rot your brain” — someone from #lisp at irc.freenode.net
“pointer arithmetic and array indexing [that] are equivalent in C, pointers and arrays are different.” – Wayne Throop
“An array is not a pointer, nor vice versa” — Steve Summit in C FAQs
“Attitude is no substitute for competence” — Eric S. Raymond in How to become a Hacker
Q: I’m having problems with my Windows software. Will you help me?
A: Yes. Go to a DOS prompt and type “format c:”. Any problems you are experiencing will cease within a few minutes.
– Eric S. Raymond
“This answer cannot be decided by current law—the law should conform to ethics, not the other way around” — Richard M. Stallman
“Lisp is a programmable programming language.” – John Foderaro, CACM, September 1991
Q: “My company needs a proprietary operating system to get a competitive edge.”
A: GNU will remove operating system software from the realm of competition. You will not be able to get an edge in this area, but neither will your competitors be able to get an edge over you. You and they will compete in other areas, while benefiting mutually in this one.
“There is nothing wrong with wanting pay for work, or seeking to maximize one’s income, as long as one does not use means that are destructive. But the means customary in the field of software today are based on destruction.” — Richard M. Stallman
“Haskell saves lives”
“In general, functional languages offer powerful new ways to encapsulate abstractions” — Haskell Wiki
“I invented the term ‘Object-Oriented’, and I can tell you I did not have C++ in mind.” — Alan Kay.
“C++ is the only current language making COBOL look good” — Bertrand Meyer
“It’s 5.50 a.m…. Do you know where your stack pointer is ?” — Anonymous
“I understand the philosophy that developer cycles are more important than cpu cycles, but frankly that’s just a bumper-sticker slogan and not fair to the people who are complaining about performance.” – Joel Spolsky
“The standard — either one — is not the End of All C. Writing ‘strictly conforming’ C code, however, has an enormous benefit.” — Chris Torek
“Wait a minute, I want to modify that statement. I’m not claiming, in this particular article, that there’s anything wrong with Java as an implementation language. There are lots of things wrong with it but those will have to wait for a different article.” — Joel Spolsky
“Without understanding functional programming, you can’t invent MapReduce, the algorithm that makes Google so massively scalable” — Joel Spolsky
“It [Java] might be successful – after all, MS DOS was – and it might be a profitable thing for all your readers to learn Java, but it has no intellectual value whatsoever. Look at their implementation of hash tables. Look at the sorting routines that come with their “cool” sorting applet. ” – Alexander Stepanov
“Java isn’t platform independent; it is a platform. Like Windows, it is a proprietary commercial platform. ” — Bjarne Stroustrup
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.
Ruminations on Programming – 2
November 6, 2008 at 10:37 am | Posted 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.
Ruminations on Programming
September 23, 2008 at 3:52 pm | Posted in Hacking, Programming | Leave a commentTags: .NET, C++, Lisp, Programming, software, VB, VB.NET
This post does not contain anything except my own ruminations on programming. Its just my own experience of 3 years, 2.5 years to be exact, with programming. In my 6 months at new job, I have learned C and Socket Programming while I already knew some C++ and Common Lisp.
I think C teaches you a lot about memory management. Although many programmers claim that C++ is a better C, in some context I don’t agree with them completely. When you work in C you work with arrays and pointers all the time, while in C++ the standard way of learning is to start using Strings, Vectors and Algorithms from Standard Library, while iterators come on their way towards you. I have spent much time on them. In the very beginning stage of learning, I have to admit that C++ does not instill a thought of understanding memory management whereas C does, C does it all the way. This does not mean that one is superior over the other. Its just that their way of thinking about solving a problem are entirely different. If one very well wants to understand about how the hardware is managed, at a very early learning stage, I think one should start with C. I think C teaches you how to manage hardware, a general programming concept that everyone must learn and it will take lots of time before you get the hang of it. Now lets go to the other opposite side of the hardware management, Problem Solving, if one is not interested in extreme performance or efficiency, and wants his program to run faster than Java, then I think one can go with some language better than Java, some examples are Mercury, Haskell, Ruby and Common Lisp.
There are some people who believe that using C++ over a longer period of your life, like 10 years, is a good way kill your precious youth. I don’t have any opinions on that except one. C tries to manage that hardware memory management while it tried being a portable language many many years ago. Its good at that, it does so explicitly. Common Lisp, created long before C, tries to focus on solving very difficult problems and it is quite good at that. Now both, being good at hardware and being good at Problem Solving are diagonally opposite skills and very valuable if you want to spend a lifetime of yours into writing Software. C++ tries to be good at many many things, it tries to manage hardware properly, shifting that task of memory management from programmer to compiler. C++ is backward compatible (not same) with C, it has all the problem on today’s AMD Athlon Dual-Core processor which C had on PDP-11 in 1970s. 2nd, it also tries to good at problem solving, while managing the memory properly, I think in doing so it has acquired lots of obtuse problems on its own, along with all the C problems. I think Stroustrup could have made it a Solution to C problems rather than C Problems + Problems of its own. One thing it did excellently is putting Object-Orientation into the industry, which no other language did. Then again, choosing to learn a programming concept and putting Object-Orientation into industry are two very-very different things. I also have a feeling that C++ does not teach you the concepts and ideas that are ideally transferable to general purpose programming. Ideally because, whatever you will learn in Haskell, Lisp or C will be completely transferable to other languages as well but I don’t think this is the case with C++. Go to comp.object and everyone will tell you, not to start learning Object-Orientation with C++, choose something ideal like Smalltalk, Lisp, or other language. I think C++ has its own ways of solving problems which, though transferable, and not ideal concepts like “Functional Programming In Haskell”, hence not transferable from my standard. You can manage memory in C++, just like C, without any problem, you can write Object Oriented programs in C++, like you write in any other language, you can even write C++ programs using generic programming paradigm. Question is not what a language can or can not do. From my viewpoint, question is also not what a language forces you to do (Many people claim that Smalltalk forces an OO paradigm on programmer but thats just stupidity in ignorance. Programming is not that simple). Question is what a language instills into you, over a longer period of time, the time period of 10 years. I have yet to meet a person that says after 10 years in C, I am wasted, after 10 years in Lisp , I made a fool of myself but I have seen some people who say after 10 years in C++, they thought Why they had bothered with C++ at all. If you think after 10 years that language was not worthwhile, I think one should stop now. I will not be learning that kind of language. Your experience and your company of good programmer will instill a common-sense in you about programming and that common-sense will tell you, will make you able to distinguish between a good tool and a bad tool.
Now still, while I am going to end this post, I believe that C++ is far and far and far and far better than VB and .NET, which are wrongly known as programming languages. I think, if Bill Gates does not want to do that, at least, as a courtesy or better as a responsibility towards our fellow programming community, we should label them as Kid-Beats and Fool’s Glory respectively. They don’t even qualify for being called as programming languages. How you will create a binary-search-tree in VB ? .. Can You do that without creating a mess ?
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.