I was just reading the latest 'The Java Specialists' Newsletter' - I am not sure if I have mentioned this newsletter and the name of Dr. Heinz M. Kabutz on this blog before - when I realized how interesting and potentially far reaching implications the usage of Strings can have. I consider myself to be a competent Java developer and I know that if I want to concatenate Strings I should use a StringBuilder or StringBuffer. However, I did not know that I should not synchronize on a String. I probably would not have done it anyway, since some long time ago I've learned to synchronize on an Object instance, but I did not know why I should do it this way. I also did not know what exactly String.intern()is good for. I have seen it many times browsing the Java Docs, but never really took the time to understand it.
Anyways, reading the newsletter I got intrigued and started to surf the net for more information and soon realized how far reaching the simple usage of a String can become and that String manipulation could be the cause of performance problems. This blog entry I found especially interesting - Java String performance. However, I don't think you should refactor all your String usage now. I am a firm believer in profiling before improving, but it is still interesting to keep certain facts about such a simple thing as String usage stored away in some dark corner of your brain.
This little excursion into the world of Strings also reminded me of an article I read a while ago (unfortunately I just cannot dig it up again - maybe someone else can help?). In essence the article tried to answer the question whether all the layers of abstraction we have within the IT world really make it easier, quicker and safer to implement applications. Somehow it does, however each single abstraction is build by humans, meaning it is as prone to error and bugs than the very application you try to write using these abstractions. If you are sitting somewhere at the top of this pile of abstractions and a lower level abstraction fails how possible is it that you are able to understand and fix the problem? Will it not become harder and harder to control all these layers and abstractions. Taking the example of a String - who out there can still explain to me all the layers involved manipulating this string. Starting with the JVM, over to the OS and IO operations all the ways down to CPU registers.
Wednesday, January 16, 2008
Tuesday, January 08, 2008
Liberal arts in the software industry
Many but not all programmers believe they have a creative work. Many but not all are wannabe musicians or artists that work as programmers because it is still creative and it also generates monetary value. I am one of them. I would rather work with something else that is pure creativity rather than this hybrid where there are bursts of creativity followed by long monotonous periods often resulting in ugly pieces of software in the end. The longing to produce something really beautiful will never be completely fulfilled in a business that value time-to-market over quality and where most people is not that passionate about their work. But here is the money and it is still much fun most of the time. Sad. So - again - Joel (on software) made me happy today when suggesting "an undergraduate curriculum that consists of 1/3 liberal arts, and 2/3 software development work" going on to suggest that students should actually produce some real software while studying like a film student makes movies or a dance student finishes her studies with a performance. Makes me wanna go back to school.....
Subscribe to:
Posts (Atom)