Archive for February, 2008
Java’s @Override Annotation
Most people are aware of java annotations by now, but I’m not sure everyone knows about @Override. They really should.
No commentsRuby Shell as Domain Specific Language
My favorite example of a DSL is the latest jmock API just because you really have to fight the language. Fortunately Ruby makes things easier. I’ve been thinking a shell in ruby might be a nice change of pace so this is a small example of how to go about implementing one.
No commentsNetcat Clone in Three Languages – Part II (Python)
A continuation of this article I now write a very stupid version of netcat in python.
No commentsNetcat Clone in Three Languages – Part I (Ruby)
I thought I’d continue my series of writing the same application in multiple languages by trying to clone the wonderful network tool: netcat. For the first installation I’m going to try it in Ruby.
2 commentsUsing Javacc
If you want to parse a custom language in java then Javacc is your tool. At the moment this is probably more a reminder to myself than a great article for anyone else to read, but as you find it useful feel free to take a look. More after the link…
Read more
Converting hex to Binary in 4 Languages
I’ve been playing around with some scripting languages recently so I thought I’d do a small example in a few different languages for laughs.
Read more
Why C++ is a Dying Language
From my blog you may notice I am an inveterate C++ coder. It was the first language I taught myself after pascal and my preferred language for compact, fast code.The downfall of C++ may not be news to many, but often it is written by opponents of the language rather than those who love it and all of its quirks. So from a fan, C++, the prognosis is poor. I could write a book on this, but I tried to distill it down to article size.
Read more
Automatic Adaptation in C++
The adapter pattern is used to implement an interface required by one library in terms of an object declared in another. It’s a useful pattern, but implementing it can be a pain. You have to manually adapt objects as you get them and then you have to remember to clean up the adapter objects when you are done. Here is a way to have the compiler do it all for you in C++.
Read more
Why I Can’t use Maven
In my most recent development effort at work I decided to take a look at the new kid on the block for building java projects: Maven 2. After 6 months or so of use I’m now preparing to use ant instead. Details after the link.
Read more