Archive for the 'programming' Category
The D Programming Language has an impressive list of cool features. That is not always a good thing. A feature should contribute to the philosophy and foundation on which the language was built. If it doesn’t, harmony breaks down and the result is a language that is harder to learn and to use.
Some people think [...]
April 16th, 2008 | Posted in D Programming Language, programming | 19 Comments
When it comes to the question of whether methods should be virtual by default or not, there are two schools of thought. Anders Hejlsberg, lead architect of C#, describes them in an interview from 2003.
The academic school of thought says, “Everything should be virtual, because I might want to override it someday.” The pragmatic school [...]
March 4th, 2008 | Posted in C#, java, programming | 1 Comment
I’ve taken quite a few paradigm shifting journeys in my life. Some have been quick insights, instant moments of clarity. Others have been slow processes, spanning over several years. One such slow journey for me has been how I look upon virtual methods of object oriented languages.
Java methods are virtual by default. Unless explicitly marked [...]
February 28th, 2008 | Posted in programming | 2 Comments
One of the great things with Ruby is the natural way in which you can hide looping constructs behind descriptive names. Like the retryable example that Cheah Chu Yeow gives on his blog.
retryable(:tries => 5, :on => OpenURI::HTTPError) do
open(’http://example.com/flaky_api’)
end
Notice how elegantly the loop logic is abstracted; There’s no need to look at the [...]
January 17th, 2008 | Posted in D Programming Language, programming, ruby | 11 Comments
I love Rails Migrations. Not only do they help making database development a part of an agile development process, they also make my life easier as a developer with shallow knowledge in the field of database programming. But, even with frameworks like these, I think we’re still dealing with databases on a very low level.
Conceptually, [...]
January 9th, 2008 | Posted in databases, programming, tuning | 2 Comments
I’m currently rereading parts of the book Test-Driven Development: A Practical Guide, by David Astels. It’s a great book in many ways, well worth reading, but I have objections to one particular section in the book.
The author tries to convince me that developing my user interfaces using a test-driven approach is a good thing to [...]
December 20th, 2007 | Posted in programming, software development, test-driven, testing | 23 Comments
We’ve done a lot with testing frameworks over the years, but does the testing concern deserve its own standalone DSL?
This intriguing question was asked by Michael Feathers in his Mock Objects: Leaping out of the Language post. My spontaneous answer is: Absolutely!
I’m a big fan of xUnit frameworks, but when I imagine an alternative [...]
December 10th, 2007 | Posted in DSLs, programming, testing | 5 Comments
I just read a post by Uncle Bob that discusses the optimal length of a function. He quite correctly claims that the old functions-should-fit-on-a-screen rule lost its validity. He further states that “A well written function might be 4, 5, perhaps 8 lines long; but no longer.”
I’m not saying Uncle Bob is wrong, most well [...]
October 30th, 2007 | Posted in programming | 6 Comments
I’m back from my three week vacation!
I had a great time, but as suspected I wasn’t able to stay away from computers. In the warm evenings, just for fun, I started to implement a ray tracer in the D Programming Language.
I have been looking for a suitable project that would give me a chance to [...]
October 28th, 2007 | Posted in D Programming Language, blogging, programming, research, software development, test-driven | No Comments
It’s a well known fact that we regularly introduce errors with the code we write. Chances are slim to get it right on the first try. If we do, the risk is great that changing requirements and murdering deadlines will mess things up later on.
It’s also well known that the cost of failure increases with [...]
October 2nd, 2007 | Posted in habits, programming, software development, test-driven, tools | 9 Comments