Developer’s point of view
How to better appreciate your most preferred language
Jul 4th
The universal technology
I’ve seen a lot of developers telling that Linux is better than Windows, C# is better than Java, Delphi is better than VC++, and so on. But if you ask them if they know the other language they are comparing with, they say no.
I was one of them, since I believed that the best IDE was Delphi, the best platform was Windows, and the best language was C++. At least, until I started working on "real projects" and not on applications made just for fun. When I had to learn Java and use it to develop server applications on Sun platforms, I started to appreciate the language and the Unix-like environments…. and I started to believe that these technologies were better than those I thought were the best. Soon I realized that every technology is the best, depending on where it is applied.
There is no universal technology or language which solves all problems
Now I don’t believe anymore that there is the universal technology or language which solves all problems. Every time I start a new project, if the customer doesn’t have a specific preference, I always spend some time trying to understand what are the best tools to implement the project – and the result depends from the project itself. In web development my favorite preference is the .NET technology, for several reasons – but this is not a choice that can be done every time for every project. For example, if one of the requirements is that the application must run on open source environments, .NET wouldn’t be the proper choice.
The proper tools
During my professional experience I’ve tried to learn as many languages as possible. If I get confident knowledge of each language, I’m able to choose the best solution for every problem, from both the developer point of view (how simple or hard is the development using a specific language) as well as from the customer/project point of view (what are the benefits if I choose a technology instead of another). When I learned Java, I appreciated how life is easier with a memory manager which automatically disposes objects no longer referenced. When I learned C#, I appreciated the integration with the .NET technology, the foreach statement, but I also noticed how exception handling was better in Java, since exceptions must be explicitly handled within each method or the method itself must be declared to throw those exceptions which aren’t handled in its body. I also, and still, like the C++ philosophy: "The developer always knows what he’s doing". This is the reason why C++ offers more power with pointers and access to memory. It’s irrelevant that it’s not always true the developer always knows what he is doing
The key point is that you have the power to do almost everything, although at a price (usually more attention when dealing with pointers and dynamically allocated memory, and more debugging….)
PHP Revolution
Lately I’ve appreciated a language I’ve used in the past, and which I didn’t like: PHP. The reason why I don’t like PHP is that I prefer strongly typed variables, variable declarations, as well as to know from the compiler if I wrote something wrong in my code, such as the name of a variable (a common mistake in PHP which leads to unpredictable results) or a function call (which usually leads to a run-time error). But I have to say that it’s extremely practical the ability to save your PHP code and test it immediately without the need of recompilation, deployment, etc. – a perfect solution for the project I’m currently working on. And I wouldn’t had chosen it if the customer hadn’t explicitly asked for it. We never stop learning!! Now I’ll definitively choose it again in the future, if the prerequisites for its usage are good, and the project will benefit from its usage.
Can I say that C# is better than Java?
Yes and no. It depends. As outlined above, in order to state that a language or technology is better than another, I need to:
- have proficient knowledge of both
- compare pro and cons applied to a specific project
But the result of the comparison is limited to the project – on a different project, the choice could be different:
- if I need to care about speed, maybe the best solution would be C++, but not for web applications
- if I need portability, Java is best – but I wouldn’t choose it if the application has a user interface
- if I need modularity and easy of development on a web application, my choice would fall on ASP.NET
- if I need low licenses cost, the choice could be PHP, Java/JSP, or Ruby On Rails
Your opinion
How do you choose the technologies and languages on your projects? Do you focus on a single technology, and use others only when the customer explicitly asks for them?
Learning by using
Jul 1st
The first computer
I started dealing with development when I was 12, after I convinced my parents to buy me a computer. My choice fell on a Commodore Vic 20, a computer with a 1MHz CPU, 3582 bytes (bytes!!) of RAM memory, embedded basic language, and external memory storage based on a tape recorder.
I learned the computer principles, the way it works, the Basic language, the assembler language, how to deal with limited resources (such as memory) and how to develop software. I wrote a few games, just for fun – too young to think about how to make money with them
. Since then, I have ever learned, learned and learned, and almost all of what I know I learned by myself.
The first job
When I’ve been contacted by a company for my first "serious" job, I’ve been subject to a 2 weeks test to implement some new features on an existing FoxPro application before getting a contract. Never worked with FoxPro before, nor had experience with its scripting language and more generally with database development (just a few theorical concepts).
So, during these 2 weeks, I studied and learned FoxPro, its language, and how to use databases. Life isn’t so easy, so 2 days before the end of my test period I had an HD failure, and of course I didn’t have any backup – all work was lost. Since it was a new HD, we brought it to the support center, asking to repair it but preserving the data, if possible – after 1 hour, a technician get back to us telling "The hard disk is working so well that we’ve also formatted it". Panic.
Fortunately I’ve been able to recover all lost data by using an unformatting utility – with compliments of my boss, who told me "I don’t know why, but I thought you were a database expert – I’ve just read your resume again, and I have no idea why I thought so. Anyway I like the way you work, so the job is yours".
My next task was a feasibility study about a QuickTime application running on a Mac to be used to display and record data retrieved from medical equipments – once again, I had no previous experience with QuickTime and Mac – nevertheless, this has been not only the first but also the last experience with a Mac
. In 1 week, the time given to complete this task, I provided the results of the feasibility study – which were positive.
Learning by Using
What do I want to say?
Sometimes we have to learn a new language or technology, but we have no time to learn it since we also have to apply it in the project we have to work on, and which, surprisingly, must be completed within yesterday.
I’m used to learn everything I need in my work by myself. This is undoubtedly a great advantage, since I don’t need to attend courses or use other forms of slow "formal learning".
What I mostly like is the ability to learn a new language or technology by using it on a real project. Of course this can’t be done without having a proficient knowledge of the area being explored. If somebody has never developed or learned a programming language, it’s extremely unlikely he will be able to learn using this learning pattern.
But if, for instance, you have done web development before, using ASP.NET, it wouldn’t be difficult to move on PHP. Once you’ve acquired what web development means, what you expect to do and what tools you have to use and you are allowed to use, you’re able to transpose this knowledge on the new language – it’s just a matter of translating what you already know in a new context. You expect that, independently from the language you use, there is a way to handle sessions and cookies, to access to a database, to handle data submitted in a form, etc.
This is the reason why I like to learn new languages and technologies. I like the challenge of starting from a virtually unknown area, performing analysis and design on a real project basing on a few information I read here and there, and starting the development phase while starting the learning process at the same time. This process undoubtedly slows the development at beginning, to proceed at increased speed from day to day. And while proceeding with the learning process you also realize what you’ve made wrong – this sometimes requires re-working on the work made in the past days, but this way you better understand what you did wrong and you (hopefully) won’t do it again.
Formal learning
Of course the "learning by using" pattern cannot be considered better than formal learning paths. Attending a course has its advantages, since who is teaching has proficient knowledge (or at least we hope he has
) and he can better show the key points and focus on the most important things to know, as well as explain best practices, things to know, things to avoid, and so on.
Also, reading a good book and doing practice, following code, examples and exercises, helps to get knowledge. Anyway I usually skip all of these extra activities, since I prefer to focus on understanding what the writer want to expose, catching the key points, just to know that "they exist" – when I need to use a specific feature, I know it is there, and I just have to browse the documentation to know how to use it.
Knowledge or Pointers?
What I’ve just written above points me to the following consideration.
I strongly believe that actual knowledge is not as important as the ability to acquire that knowledge. Long time ago I’ve been told "it’s not important if you have a specific knowledge – I care more if you are able to find the pointers to that knowledge".
Conclusions
Traditional learning (either school, courses, and so on) is important. But it isn’t enough. Being able to self-learn helps when you have no time to use the traditional learning paths. Being able to learn while applying what you’re learning is an extra gear. Being able to update your knowledge "on demand" is a double extra gear.
What are your learning methodologies? Do you want to add any comment, suggestion, or extend this discussion? Just write below…
