Thursday, August 15, 2013

What programming language should I choose to excel on and why?

The first software package I ever learned is Microsoft Excel in 1997 at my school, Jaffna Hindu College. Some of our old school union people thought that the young pupil in our school should learn computer. I’m grateful to my school and I should write about my schools in another post. Computer was a very alien idea at that time to me. Probably to most of them in Jaffna. At school they plugged the computers up and showed us as an exhibit first. The Pentium D computers had Windows 95 as I remember. After months they let us touch it and play with it, that we would go in there and with instructions, we would left click on the start and go to programs > accessories and open word pad to type our names. We did this for couple of months once a week for a class period after lunch break on every Friday. It's very exciting, not having electricity at home and to experience this miracle machine for about 40 minutes every week.

In 1998, Thanks to Dugles Devanana, a politician at that time in Jaffna, had an institute opened to study computer called ‘IT Park’ and I joined with my parents support to Study Microsoft Excel. Ever since I clicked on the ‘Start’ button, everything excites me when it comes to computer. Everything’s still an absolute magic and as intact nothing understandable. Then over the cause of last 15 years, I have learnt number of programming languages. The main ones are PHP, Flash Action Scripts, ASP, JAVA and .NET. It’s really a headache to decide as to which one to go for when I start a new project.

I spent my early tech life praising php. It is still a great language for many specific type of web development. Easy to learn, easy to use, free, widely used, most hostings support, simple and sweet. Hosting applications on low budget or deploying /changing the hosting location is extremely easy and I never had any issues deploying. However, PHP is not great at scaling in terms of programming. The main problem with PHP isn't that it's not scalable. The problem is that the majority of PHP coders don't have a clue about OOP, design patterns, coding standards and simply don't know how to write scalable code although it's perfectly feasible in PHP.

For small applications, though, J2EE and .NET can really be overkill. In Java, a lot of time needs to be spent configuring and tuning Hibernate, struts-config, etc, so simple CRUD applications are usually done best in PHP.

So, it would be unfair to compare PHP with Java or .Net. PHP is best to develop simple sites. I think, we should only compare Java and .NET due to the similarity and the capabilities.

Both multi-tiered, similar computing technologies, both support “standards”, both offer different tools & ways to achieve the same goal. A lot of parallelism can be seen. Very difficult to compare and qualify the comparison because each has its own advantages & disadvantages.

So, when I think about Java,
  1. Truly platform independent.
  2. Free(very much) and Open Source (very little).
  3. Loads of libraries and APIs available.
  4. According the Java Update Advert, more than 3 billion devices use Java.
  5. Very secure and stable, but comparatively slow.
  6. True object oriented.
  7. Methods are virtual by default and static imports available.
  8. Instance-level inner classes and interface for enums.
  9. As far as I see, more job opportunities.
  10. Many major applications are written in Java. (For example, I’m currently working on Pega BPM suit and it’s extremely sophisticated and purely written in JAVA.)
  11. Easy integration to new devices without the need to have windows.
And .NET (C# mainly)
  1. No automatic fall-through from one case block to the next.
  2. Strongly-typed enums.
  3. By reference calls are explicit at caller AND callee.
  4. Method overrides are explicit.
  5. Supports versioning.
  6. Structs (value types).
  7. Integrated support for properties and events.
  8. Can still use pointers with RAD language.
  9. Can share data and use functionality with components written in many different languages.
  10. Unsigned integers.
  11. High precision decimal number.
  12. Complex numbers.
  13. Value types.
  14. Lifted (nullable) types.
  15. Tuples.
  16. Pointers.
  17. Instance-level inner classes.
  18. Statement-level (local) anonymous classes.
  19. Enums can implement interfaces.
  20. Object initializers & Collection initializers.
  21. Explicit interface implementation.
  22. Reference (input/output) parameters & Output (output) parameters.
  23. Runtime realization.
  24. Value/primitive type constraint.
  25. Constructor constraint.
  26. Primitive/value type support.
  27. Method references.
  28. Closures.
  29. Lambda expressions.
  30. Expression trees.
  31. Generic query language.
  32. Late-bound (dynamic) type.
  33. Runtime generics realization.

I feel lucky to have chosen this career path that I often get to have fun coding and doing many fun things, yet there is one thing is really annoying. New immature technologies quickly be able to gain popularity and kill giant technologies or treads. We spend learning a language taking years and by the time we become competent, there would be a new and better programing language getting attention. I have been coding in PHP, Java and in C# the last decade and the fairly new languages ROR and GO makes me nervous.

Just to write this blog post, I was reading about Go lang and Ruby on Rails. As far as I read, it’s a bit tough to write something sensible on Go with my knowledge. I understand that it’s an improved C and not a pure object oriented language, more of procedure language. Google initiated and developing to handle it’s “Big Problems”. I don’t see any big company using other than Google and the online resources and learning materials are limited.

On the other hand, ROR is now becoming extremely popular and I see why. I really want to learn ROR for many good reasons. Ruby is a programming language, and Rails is an application framework that uses Ruby. ROR lives by the principle that "convention over configuration" which is something I'm still struggling to understand. Rails is written in Ruby, which is a language explicitly designed with the goal of increasing programmer happiness. It is very true.

Now about 2 to 3 hours I’m trying different different code techniques on ROR and it’s truly a joy coding. Please check the code below and if you could think of a C# or PHP or java version of it, you will understand what I’m talking about. I guess, you could really have fun coding once you started off with ROR.

describe Bowling do
before(:each) do
@bowling =
endit "should score 0 for gutter game" do
20.times { @bowling.hit(0) }
@bowling.score.should == 0
So to conclude the first question I had in my previous post, I’m going to say, programing language choice should really be about the project we are going to be working on considering the,
  1. Complexity.
  2. Scale.
  3. Type of project.
  4. Resources needed.
  5. Performance and security.
However, I would want to make myself really family with .NET to work on medium or large scale projects with enough budget and ROR to work on small and medium size projects with considerably low budget.

.NET to have ROR style of programing would be my dream.

No comments:

Post a Comment