Showing posts with label Opinion. Show all posts
Showing posts with label Opinion. Show all posts

Thursday, April 28, 2011

Expanding your toolbox - Picking a new language to learn.

Image: graur razvan ionut / FreeDigitalPhotos.net
One day a developer on my team came up to me and asked, what should he programming language should he learn next to be marketable (and by the way he also thinks that Java is slowly dying).

Well as to whether Java is dying a not, I don't think so, a quick check with TIOBE shows that Java is still ranked among the top few languages and lots of places still runs Java. So i do have a job for the next few years.

But the thought came to me, it is worth learning things that are marketable or should you learn things that broaden your knowledge? What's your take on it? Should you expand your toolbox or have more of the same tools?

Steamhead takes the languages from Seven Languages in Seven weeks and puts it into a nice flow chart. I think all should go check that out and pick something out from that list. After doing quite a lot in Java I begin to appreciate the simplicity of using interpreted languages like  python and php, and the fact that their frameworks are usually simple as compared to Java ones where sometimes we descend into XML configuration hell.

Steve Yegge has a interesting way of categorizing the various languages, he breaks them down into Nouns (Java, C# or OO languages), Verbs (LISP, Clojure or Functional Programming) and Verbs and Nouns (Scala, Ruby, Python, C++ or a Mixture of both).

Well for me I am more for the expand your toolbox model, go learn something that makes you have a new way of looking at things. A lot of people learn languages but they don't really learn design, think stuff like design patterns (Gang of Four, Java EE Design ...), SOLID principles, OO Metrics. Even if you know the syntax, you simply can't write maintainable programs and all you write lacks a certain craftsmanship to it.

By learning a different language and looking at the api, you can have a different idea about how to design your programs. An example will be like in Java. You have Math.abs a static function to get the absolute value of a number, have you ever wonder why its so "un OO" like? Compare with Ruby its just number.abs(), simple and elegant and fits into the OO paradigm.

In short

If you know Java, C# go learn Lisp Dialects (Common Lisp, Clojure), Haskell, Ruby, Python...

If you know Python, Ruby, you are pretty much there, since you straddle the limits between the 2 kingdoms.

If you know Common Lisp, Clojure, dont bother learning any other thing since you will think why in the world Java, C# programmers are typing so much code and configuring so much XML.

If in doubt just learn PHP to be marketable :)





Thursday, September 2, 2010

What's your motivation for programming?

Studies since the 1970s that show that Intrinsic motivation (from within) rather than Extrinsic motivation (external factors like money) is the main motivation for people doing good work. In Drive: The Surprising Truth About What Motivates Us, Daniel Pink talks about the various research and studies and even gave some suggestions on how to improve your workplace, if you are a lead or manager go read the book. If you don't have time to read the book, RSA has a nice video (about 10 mins) that sums up book quite nicely.



So what is your motivation for doing your job as a programmer? What are some of the motivations that you have for continuing to do programming as work? Here are some that I came up with, feel free to add more in the comments section.

1. Joy of knowing that there is always something new to learn

I am always amaze that there are still so many things that I can learn in this field, and that's a motivation for me, because I will always have some new framework, language, technology to play with.

2. Joy of finding a solution to a problem.

Solving a problem be it in programming, performance or a process issue is always satisfying

3. Joy of seeing a user liking your solution.

For most of us, we program for real users and its a good feeling when a user tells you that you did good work.

4. Joy of doing work with people that you like or like minded.

 I am glad to be able to work with a bunch of guys who I like and feel comfortable with, the pantry talks and the lunches help make for a more interesting day.



Thursday, July 15, 2010

Popularity of programming languages

There are several programming languages popularity index, the more “famous” is probably the TIOBE Programming Community index which is mostly based on search results, there are also other like langpop.com (also search based) and Github which looks at kind of code is being checked in.

What happens when we put the results of these together. I took the top 10 languages and this is what i get.

Among the Top 10 we can seee that all of the indexes agree that Php, Java, Perl, C, C++, Javascript and python are the ones that still popular. The interesting thing is Ruby, its the most popular language in GitHub accounting for over 19% of all code but in Langpop and TIOBE indexes its not even in the top 10 (TIOBE 12 place, Langpop 12 place). In fact in the TIOBE index for Ruby shows a decline from 2009 to 2010. We can also see that scripting/dynamic languages are slightly ahead compare with the compiled ones (4 scripting/dynamic to 3 compiled/static).


Lets take a look at only the Top 5 from each index. This is what we get. The reason for more entries for GitHub is because for PHP and C they share the same percentage of use.



All the languages that are in the Top 10 all tend have a rich set of libraries and frameworks. The popularity of Java could be tied to the fact that most enterprises used it. PHP is perhaps  the most popular web programming language out there with great frameworks, easy deployment, Wikipedia, Facebook all uses it. Most of the services provided by Google, yahoo all have some form of a PHP library. Well for C and C++, i guess would be games, kernal programming. C# is perhaps the only language that is tied to a specific OS in all the languages featured here, yes I know about Mono but Microsoft .Net provides some much more than what Mono provides for Linux.

The GitHub data is interesting though since I am guessing that most of the projects there are stuff that people do outside of their regular jobs, that’s why we are seeing dynamic languages on that side of the sphere since they have lower overheads in programming, most have a edit and run compare to a edit, compile, build, run kind of programming cycle. So they are great for trying stuff out. I see the data as representative of my own personal work, at work I mainly use Java, C# but in my own personal projects, I use Python and PHP.

What about you guys, Are these languages in your skill set? What do you think of the results? Any other indexes that I should compare?

I am going to do this one year later and see how much the data has changed. Perhaps we will see the rise of functional languages?



Monday, June 28, 2010

What motivates us.

Whats the motivation level in your project? Are your coders roaring to go each day or they just try and slough true. Daniel Pink in his book Drive: The surprising truth about what motivates us give us some amazing insight that it's probably not the money.




In the video he talks about 3 main things that motivates people, Autonomy - The desire to be self directed, Mastery - The urge to do better or get better at something and Purpose - The need to feel that they are doing something meaningful.

Jurgen Apello in his blog post People Motivation: Target Intrinsic Desires talks about the same things in a slight different form, he talks about Competence, Autonomy and Relatedness (Self Determination Theory).

See a pattern here? Autonomy appeared twice, Competence = Maestery and Purpose = Relatedness. Nothing about money, nothing at all. Surprising ? Not really, remember there's this old joke about it's lucky that our employers are paying us to do what we love, if not we would have to start paying them. I guess that dosen't just applies to programmers, it applies to all who truly love what they are doing. I know not everyone has the luxury to do what they like, hopefully for them they will find their little niche in life.

So managers think about this. How can I give autonomy to my team and how can I stand behind them to ensure that the autonomy is being exercised.

Thursday, June 24, 2010

Why I love programming!

I am fortunate to be one of those who love programming and get to do it as my day job. But why? Why do people who love programming love it ?

I guess it just a desire to create! To keep learning! It's fun, To make the world a better place!



I started with my first PC a 486dx2-66 with 8megs of RAM and DOS 6.2 at age 14-15, it came with QBasic and i got a book on basic and started hammering things like Print "Hello World", running the nibbles and gorilla examples. The only neat QBasic program i did was this mini paint program using my joystick as a means of control.

I thought at that time whao it would be great to write games for a living, my inspiration was from games like Ultima, Wing Commander. I picked up a book The Black Art of Visual Basic game programming, learned about timers and how to bitblt and do XORing get transparency effect. All i really did with that knowledge was to create a sailor moon screen saver.

At this time i was already in a Polytechnic doing computing, picked up C and C++ there and for my final year project did a multiplayer, sort of dungeon game with DirectX and DirectPlay. There was this bug in my game and it kept crashing and I suspect that it was because of the screen update thread and my DirectPlay updates from the rest of the players was interfering with each other. So i basically need to do a thread safe implementation of my linked list (I rolled out my own c++ template linked list implementation at that time). I thought that was pretty neat, I mean at that time I didn't know much about STL, i just tried to apply stuff that I learnt in my Data Structures classes and my Threading classes to my project.



During the same time Window 95 was the cool OS of that day and I wrote a Windows 95 theme creator in VB, I put it on the net, I couldn't remember where I put it though and i lost the code to it. Never really expecting any one to go download it, but surprise ! Someone did downloaded it and even emailed me that he liked it. That was the first time some unknown person wrote to me and told me they liked what I did! Someone actually like my stuff !

I went on to university doing computer science, and went to join the Navy nothing to do with programming whatsoever, sailed around for 4 years, during that time wrote little pocket pc applications to help in my work on board the ship. After my tour in the Navy was over, joined the government sector and now doing mainly Enterprise applications using Java and also some GIS work. 

The transition from my previous career in the Navy to now a professional developer job was not too easy, stuff in the programming world moves so fast, When i left the University it was Java 1.2, when i came back Java 5 was there. Lots of stuff changed too, Light weight frameworks like Spring were fast becoming standard in lots of places. The stuff I learned in school regarding Web programming was outdated (I programmed everything in the JSP pages in those days), but I guess that didn't deter me from jumping back into programming because fundamentally programming is all about using Sequence, Selection and Iteration (as quoted from Uncle Bob in his Keynote) and solving problems. Besides I love programming ! I picked up stuff on J2EE design pattern, OO design patterns, read and learned about Agile and liked what they preached about putting users first and having working software. Hopefully can put more of that into practice with my team.

The same joy that I felt when I was younger was there (okies I am not that old), I still feel it now in my job, the feeling of creating stuff, solving problems and learning are all there. When my users tell me that they liked what I did for them, i felt the same joy as when the email from the person who liked my Win95 theme designer.

Now that I am now the father of a very active 8 month old daughter and moving onto a more senior and kind of half technical and half management role in my team, time for learning and tinkering at home gets lesser but I still try to read at least one work related book each month. Currently I am reading The Art of Lean Software Development and The Toyota Way to get some insights on Lean software and Lean thinking. I am playing around with Common Lisp, trying to write a small game, learning Clojure by reading Programming Clojure because I think that functional programming may be the way of the future and beside that it's fun to learn about stuff like Homoiconicity, multimethods and a whole new way of thinking, I am also playing around with Google App Engine in Python (Cause I love Python!), trying to code some stuff that I will tell you later when I am more or less done.
 
In short I love programming because I love to create things, I love to learn and its fun, hopefully in the process, I have made the world a better place for some people.

Thursday, June 17, 2010

Vision, Act, Now ! Quotes from the president of IBM

http://en.wikipedia.org/wiki/Thomas_J._WatsonI was reading The E-Myth Revisited, a book about managing and running small business to ensure that they succeed. Not that I was about to run a small business. But rather I was reading business books to learn about how business work and management besides the usual tech stuff that I read. (I am also reading Lean development nowadays).

The below was from Thomas Watson, the president of IBM. Below are just the important extracts.

IBM is what it is today for 3 special reasons.

The First reason is that at the very beginning I had a very clear picture of what the company would look like when if was finally done....

The second reason was that one I had that picture, I then asked myself how a company that looked like that would have to act. Then I created a picture of how IBM would act when it was finally done.

The third reason IBM has been so successful was that once I have a picture of how IBM would look when the dream was in place and how such a company would have to act. I realized that, unless we began to act that day from the very beginning, we would never get there.


If you have a vision for how you team should be and what practices that should do to achieve it, then please do something about it NOW ! I guess most of us are pretty clear about what some of the good practices are (XP, Agile, Lean ... and so on), already, that's why you are reading this. Even practices like Peer Review, TDD that have been proven to produce better quality code, but few project teams seems to implement them. The most common kind of excuse is that "Yeah I know its good but its not gonna work in my place due to ... " substitute that with things like company policy, work culture, then people around you etc.

The way to succeed is to double your error rate.
Thomas Watson


I have some vision of how now I would like my team to be like, the only thing left for me is the hard part, that is to ACT NOW! Even if something don't work out at least i know i tried.

If you want to achieve excellence, you can get there today. As of this second, quit doing less-than-excellent work.
Thomas Watson


Even if not every one accepts the practice do it yourself, and prove the value of what you are doing. Sooner or later it will be accepted.

Friday, June 11, 2010

Tips for being a better programmer

1. Read, Read, Read
Read a lot, read stuff books, blogs whatever. Subscribe to blogs so that you will learn something new everyday.

Read other peoples code, I mean read good code, for me I read some parts of the Spring MVC and Spring Security modules code to better understand how it works and I sometimes amazed at how clean the separation of the different modules are. Reading bad code, cause you will never want to do the things that guy did.

Read about the history of programming, it's quite a shame that most programmers don't really know much about its history. You can watch Douglas Crockford's video to get an idea of where all these came from.

2. Try Try Try
But its not enough to read, you must try! If you are a OO try try functional programming, if you are a functional guy, try OO. Try web programming if you mainly do desktop apps.

Don't try with something trival! Like printing HELLO WORLD. Try and solve a problem.

See a problem? Suitable for writing a small project? Go ahead and try it! I always try to keep in mind a few such problems so that I always have something to do if I have some free time. And by trying it in a context of a problem you can see what value the new tool/framework/language can bring to you. You need to develope your toolbox so that everything you see will not be a nail.

Interested in Google maps ? Write something with Google map!

3. Be Clean
Write clean code, leave the code a little bit cleaner than when you came. Uncle bob's Clean Code, is a great book about how to write better code, read about the SOLID principles while you are at it.

4. No "I" in team
We work in teams, very few of us that are doing this for a living work solo. Learn to be a people person, I remember during my high school days, an image consultant came by to teach us how about color and clothes and etiquette and she emphasize the importance of people liking you, because if people like you they will be willing to teach you even if you are not very good. Dale Carnegie has a nice book on the topic, How to win friends and influence people.

Many a careers are sometimes determined by not how good you are technically but how you are as a person.

5. Be through (or at least try to be)
What can be more frustrating then someone coming up to you and say "Hey the webservice didn't work", and when you probe further you found out that he didn't know what exception caused it because he didn't bother to check the logs. He just comes up to you and expect a magical answer.

Well try to be through in solving a problem, at least your lead or your manager will appreciate that you have at least tried to find out the cause.

6. Know your users domain
Know the domain be it accounting, customer service, military, will aid in you communicating with your users. It makes talking with them so much the easier.