At a technical interview recently, I was asked:
What if you don’t like Java’s garbage collection, what would you do? How would you manage memory?
You can carve a large array of bytes on the JVM heap, implement your own memory on that array and manage it yourself, kind of a virtual-machine-over-virtual-machine system; but I don’t see very good reasons to do that. Well-informed engineers have worked over a decade to get the JVM garbage collection right – so if you have to dump all that work and cook up your own scheme, you better have very good reasons. I told as much to the interviewer – I would imagine that it can be done, but I don’t know of any situation where I would recommend it.
Dear readers, do you know a good answer to this question? Do you know any situation where you would recommend this? If you come across such a situation, what would your solution be?
I was reading through the Wikipedia entry on source lines of code and noticed this quote from Bill Gates:
Measuring programming progress by lines of code is like measuring aircraft building progress by weight.
From their writeup on Tavant.
Who is a liquid coding champion? A crack coder at Tavant Technologies. For those who think coding is the stuff spy stories are made of, well, it is the backbone of a software programme. In any IT solutions business, when a client gives a specification for a certain programme, it seldom stays what it started out as. A good coder will keep this in mind and ensure his work is flexible from day one. That way, he doesn’t have to start all over again when the specifications change.
Liquid Coding was a programing competition held for programmers at Tavant Technologies. It is a 3-hour competition and one can pair up with another person. At the start of the first hour, you would get a set of requirements. At the end of the first hour, you get some more requirements and further some more at the end of the second hour too. Each requirement is specified as one or more executable unit tests, and they carry certain number of points based on their complexity.
The crux of the competition is to write code to match requirements under extreme time pressure, and write it in such a way that it is extensible enough when further requirements are to be implemented.
I paired with Vineeth for this competition, and we came first in the tech lead category. The experience was intense and real fun. It is one of the best prizes I have ever got; and definitely the one that I am most proud about.
Today I came across the article What Programming Languages Should You Know? by David Chisnall. David’s list of essential programming languages include C, Smalltalk, Lisp, Erlang, Haskell and Prolog.
Of these, I know only Lisp (Scheme, to be precise). Eric S. Raymond’s famous quote (David also quotes it):
Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot.
I did some C during college, but I never learned the language well enough (I know enough to know that I don’t know it well enough) . Tom Drake, who works as a senior architect with Tavant, once advised me that learning C is important whatever language you actually work with. Tom should know – he has worked with lots of different languages and systems in his career. I haven’t followed that advise so far, largely because you don’t come across articles saying “How C cured cancer!” on reddit. One these days, I should go learn some C, I guess.
I am trying to learn Haskell – I have been following tutorials on the web, and have been making some progress. A friend who is returning from US is bringing a copy of Programming in Haskell, and I should get it by next month. I had worked through a draft copy of the book, and I found it lot more approachable than other tutorials I found – so I am looking forward to reading the actual book. Erlang also looks to be an interesting language, and I am curious to understand what all the cool kids are talking about its concurrency primitives. I haven’t read much about Smalltalk and Prolog (except some videos I watched about the Seaside web framework in Smalltalk).
The more languages you learn, the easier it is to pick up a new one. Eventually, you start thinking of every new language as just a set of modifications to a language you know already.
So, what are the languages have you learned or are planning to learn?
I was not aware of this before, but an Indian edition of Structure and Interpretation of Computer Programs (2nd ed) is available now. Thanks and congratulations to Universities Press for bringing this classic out in India.
Within the development team we often joke that we might have to show a splash screen with “Detected IE; launching in slow-mode” when a user launches the application on IE. But Giles Bowkett’s post “The Business Case For Firefox” had me thinking seriously – should we really support IE?
Since the users of our application are a captive audience, we might also be able to convince them to use a particular browser – you can take the stance that “this website, viewed with this browser is the application“! Will this work in practice? Would we be able to convince our customers to switch (if they are not already using it) to Firefox?
The development effort has budget considerations too. The project stakeholders need to be aware that supporting IE properly is an activity that is going to take some cost – do they really care to have it, or will they like some other feature in the application instead. Giles make some excellent arguments on this, and I think I should be making them to my bosses too; let them be aware at the least.
PS: I don’t have any experimental data to prove that the IE JScript runtime is sluggish. I have that empirical impression from my experience using IE. Please drop me a comment if you have data for or against my conjecture.