Saturday, August 31, 2013

How to keep me up-to-date with the latest technologies?

This is a million dollar question for most of the programmers. Programmers often live in virtual language specific world including myself and when we asked to go to another world, we get annoyed. When we spend years discovering a world and hear about a better one, it’s not a good feeling.

When I talk about keeping me up-to-date with the current technologies, I have to touch a subject called “programming paradigm”. It was interesting listening to Dr Evens’s lecture on “Programming Paradigms” and the stories about how computer languages evolved by time; was very fascinating. Let’s look at the definition of paradigm first, with the help of Google.

Paradigm: "A philosophical and theoretical framework of a scientific school or discipline within which theories, laws, and generalizations and the experiments performed in support of them are formulated; broadly: a philosophical or theoretical framework of any kind"

I have to tell something off topic here, in Virtusa we had an internal seminar organized by our training team and one of the highly experienced trainers, JJ, talked about Paradigm shift and how important that we/companies should cope with it. It has been a while since I attended the seminar and as I remember it, it’s one of the essential and fun things to learn that  the Swiss watchmakers had the paradigm that a watch was a mechanical device, i.e., to be a watch it had to have springs, gears, moving second, minute, and hour hands, etc. The end result was that this research was abandoned because it was not a “real” watch. However, they did put the research on display and when the Japanese companies like Seiko saw it their paradigm was “time keeping device” and they grabbed the digital watch concept and ran with it. The end result was that because of their inability to make a paradigm shift from a watch being a “mechanical device” to a “timekeeping electronic device” the Swiss watch industry almost collapsed because of the Japanese were able to make this paradigm shift. In the seminar then JJ went on to discuss how it is important for a business to know what paradigms it has, to understand them, and, most importantly, be constantly on the lookout for technologies or innovations that can cause a paradigm shift. Why? Because if you miss it you can be out of business.

Coming back to “Programming Paradigms”, first will look at the main paradigms in software industry especially on PP. The first thing I studied in Uni was about the History and the generations of Computer Programming Languages. If we were to skim through the main chapters, we can look through the main four generations with the help of Google. I’m at the moment working using a 4th generation Programming Language  - BPM Workflow manager , PRPC, which uses Java and Oracle in the core engine and enable users to code by just using flows and web based visual controls. Everything else are done in the background from Hibernate-like table class mapping to external system integration.

The first generation program language(1GL) is pure machine code, that is just ones and zeros. Programmers have to design their code by hand then transfer it to a computer by using a punch card, punch tape or flicking switches. There is no need to translate the code and it will run straight away. Code can be fast and efficient and can make use of specific processor features such as special registers, however, code cannot be ported to other systems and has to be rewritten and difficult to edit and update.

Second-generation programming languages(2GL) are a way of describing Assembly code. I have absolutely no idea how this works. Google says that it is done by using code resembling. Assembly code has similar benefits to writing in machine code, it is a one to one relationship after all. This means that assembly code is often used when writing low level fast code for specific hardware. Until recently machine code was used to program things such as mobile phones, but with the speed and performance of languages such as C being very close to Assembly, and with C's ability to talk to processor registers, Assembly's use is declining. Code can be fast, efficient,make use of specific processor features such as special registers and it is closer to plain English, it is easier to read and write when compared to machine code. Here also the code cannot be ported to other systems and has to be rewritten
For example:
ADD 12,8

Even though Assembly code is easier to read than machine code, it is still not straightforward to perform loops and conditionals and writing large programs can be a slow process creating a mish-mash of goto statements and jumps. Third-generation programming languages(3GL) brought many programmer-friendly features to code such as loops, conditionals, classes etc. This means that one line of third generation code can produce many lines of object (machine) code, saving a lot of time when writing programs.
Imperative languages - code is executed line by line, in a programmer defined sequence. Third generation (High Level Languages) codes are imperative. Imperative means that code is executed line by line, in sequence.
For example:
dim x as integer
x = 3
dim y as integer
y = 5
x = x + y
Would output: 8

Third generation languages(3GL) can be platform independent, meaning that code written for one system will work on another. To convert a 3rd generation program into object code requires a Compiler or an Interpreter, Hardware independence, can be easily ported to other systems and processors and programmer friendly, one line of 3rd gen is the equivalent of many lines of 1st and 2nd gen, However, the code produced might not make the best use of processor specific features unlike 1st and 2nd gen.

Fourth-generation languages(4GL) are designed to reduce programming effort and the time it takes to develop software, resulting in a reduction in the cost of software development. They are not always successful in this task, sometimes resulting in inelegant and hard to maintain code. Languages have been designed with a specific purpose in mind and this might include languages to query databases (SQL), languages to make reports (Oracle Reports) and languages to construct user interface (XUL). An example of 4th generation programming type is the declarative language. An example of a Structured Query Language (SQL) to select criminal details from a database. Declarative languages - describe what computation should be performed and not how to perform it. Not imperative!

It gets more interesting than that, now we have a 5th generation concept and which is called 5GL. Fifth-Generation Programming Language (5GL) is a programming language based around solving problems using constraints given to the program, rather than using an algorithm written by a programmer. Most constraint-based and logic programming languages and some declarative languages are fifth-generation languages. Fifth-generation languages are used mainly in artificial intelligence research. Prolog, OPS5, and Mercury are the best known fifth-generation languages.

Let’s look at the big picture, the big-bang of languages:
big-bang of languages
big-bang of languages

These paradigm-shifts happen so fast in our industry more than in any other industry. Not only software or programming languages, but also hardware. When I was developing websites half a decade ago, I only had to worry about computers and screen resolutions. Now, we have mobiles, tablets, computers, many other screen dimensions and device capabilities to worry about. Devices and its capabilities are getting sophisticated every day and software industry also growing very fast trying to serve the devices well.

We, programmers, could learn a concept or programming language or a design pattern today and it might well be discarded tomorrow. If you disagree with me, ask about what happened to me have studied Macromedia/Adobe Flash. Those days I was crazy happy making websites using flash , now I don't even have flash installed in my computer.

So, how do we deal with this problem? To be honest, there are more than one questions associated with this question. Before we try to answer this question, we should ask some questions ourselves to get the context right. For example, what I exactly want to do? We could just say, I'm a programmer, but we can't be just coding in every programming language or be doing everything out there falls in the software programming category.  I believe, to succeed in our industry, it's vital that we should be specific about what we want to do while having the firm understanding of the fundamental concepts. We should choose very specific areas of our profession and should get certified and should know everything possible in that specific area. Choosing very specific areas to excel and succeed has its risk, yet I don't think there is anything we could do about it. We should just be willing to take the changes as we grow. As I already mentioned a million times in my blog, I'm now working in BPM steam using Pega tool and I know it's a big risk, if there would be a better Business Process Manger out there in the market tomorrow. So,outside my work hours, I try to keep me aware of the other things happening out there in the dark.

Also, I think, it's important that we should be absolutely clear that agile is turning into a mainstream methodology, and soon only a few extinct mammoths will do waterfall. Agile has won the race. Microsoft is now working to improve agile methodology support many of its products, they also do iterative development for many of their products. IBM has launched Jazz agile platform. Pega supports mainly that.

Software is not like any other product it is often compared to. It is fundamentally different from a car or a house.  Every project is different, even if only the team is different, so there is less predictability. The industry is small, fast-moving, and there is no complete well-known set of templates and methodologies that guarantee timely delivery of a wide variety of tasks – simply because many of the best methodologies, practices, and platforms and tools are a work in progress.

So, I think, including myself, we should just stop worrying about keeping us on the edge and just keeping doing what we love doing and not to ignore the major changes. To me, It's very important to be in every race than winning a race and backing off for the next one. I see successful people in the industry, they still only know BASIC or PASCAL language.

I could give you some pointers that I think might be useful for you. In the classical sense, if you like to keep you up-to-date on your industry, you should find ways to stay informed. Many of us work in changing competitive environments. If we don't keep up with news and trends, we can miss key opportunities and can be caught unawares. That's why, for some of us, it's important to keep-in-touch with news and trends in our industries. Although keeping up with industry news may seem to be just one more thing to add to your To-Do List, there are several important benefits. First, you'll make better decisions, and you'll spot threats and opportunities early on, which can give you a competitive edge.

So how do we stay informed to keep us up-to-date..?

  1. We should find a mentor. I have a few people, I look up to. A great starting point is to find a mentor within the place you work. Not only can mentors help you solve career issues and develop your career, they can provide you with a wealth of insider knowledge, as well as with the insight needed to understand it.
  2. Subscribing to some popular magazines those could help us be informed. Our industry may have one or more trade organizations that you can join. These are useful, because they can help to keep you informed with their newsletters and publications, and they provide networking opportunities with meetings and conferences.
  3. Seminars and conferences are great for learning about new technologies, new products, and industry trends; and they can provide ample networking opportunities.
  4. Having tech friends outside work can be one of the most rewarding ways to stay on top of industry news and trends. We could have a wide pool of people to network with. People directly related to our industry are an obvious choice, but so are industry related people, customers, and people working in related fields.
  5. Blogs aren't just for personal journaling anymore. Many bloggers are respected for their high quality work and honest opinion. Whatever I write happens to just be the solutions I find to the problems I face and I know my friend and readers could relate to them.
  6. Keep Google, Twitter, LinkedIn and tech forums in your pocket. Yeah I'm saying it's a must that you have a smart phone:)
  7. Making Time, Sharing and Using are the last and not definitely least tip I could think of to keep us up-to-date.

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.