Wednesday, December 24, 2008

On Programming Languages...

I'm a programmer by training but not by trade. This means that I'm fortunate in being able to do something I enjoy in my own time, without any external pressures, and can dip in and out as suits myself. I can also step back from the current hip trends and buzzwords (I've my own set of those to contend with anyway!) and evaluate anything and everything based on how genuinely useful it is to me (rather than on how much of a bonus it will give to the salesman who's trying to push it on me).

However, I do also get the chance to do some coding in the Day Job from time to time, but it's at my own discretion and I can freely choose my tools.

This introduction I suppose serves as a justification for what I'm going to write here, which is a bit of an analysis of those particular tools, as well as some others I've come across - occasionally in a non-programming context. Think of it as "who am I anyway and how dare I say that!"

C#/.NET Framework 2.0
For me, C# and the .NET Framework are the language and platform of choice. I manage big Windows servers in a corporate environment, at the very top-level Enterprise Admin authority, and I've seen enough fly-by-night merchants to write several best-selling fantasy trilogies. When I need a specific tool to do a specific job I normally write it myself, and these give me all of the power and flexibility I need without any (or without much, anyway!) complexity or baggage. I chose .NET 2.0 as it hits a sweet spot for me, more lightweight than 3.0/3.5 but not as primitive or crude as 1.0 or 1.1; Visual C# 2005 Express is my workhorse here. It's also great for prototyping C or C++ code; you can normally do a line-for-line translation (so long as you avoid any Framework-only classes), it's quicker and easier to work with (very good if you want to try something out without having to spend hours just getting the basics up) and you can get output to the screen very easily, so it's great for debugging algorithms.

C and C++
I'm going to be honest; I don't really see any reason to write code in C any more. If I wanted to write simple procedural code I'd still use C++ but just avoid all the OOP stuff. Being able to declare variables in the middle of code blocks is probably the one big thing that C programmers who don't need OOP are missing out on. I'm deeply suspicious of C++ programmers who seem incapable of even devising a routine to add two numbers without thinking about template-izing it and setting it up for multiple inheritance, but these are great features when used with appropriate discretion.

Visual Basic Script
For much the same reasons as C#, but where a quicker and dirtier (and admittedly blunter) tool is needed. The tool of choice for a lot of COM programming too; COM is just beautiful under Visual Basic, so simple, clean and elegant. It's also great for WMI code. This is for situations where a nutcracker would be ideal, but a sledgehammer would do do job just as well, and in a fraction of the time.

Java
I'm finishing on this because I hate it with a deep deep passion, and it will leave me with a bad feeling. The ideal of OS independence is cool for sure, but every single deployment involving anything Java-based I've ever been involved in (and I've overseen tens of thousands of deployments) has been deeply ugly and has caused havoc. I see it as a developer's plaything but unsuitable for end use; for example, a lot of the time it still requires end-users to configure their own settings. Fine if you're on a standalone machine with only a single user, but if you have more than 10 or so users it very quickly becomes Not Funny. Bring that number into the thousands and remember that there is no centralised admin, no centralised config and no centralised versioning and you have utter disaster on your hands. Been there, done that, will trade organs to avoid having to do it again.

0 comments: