I’ve bought a new laptop last week, a Mac !!
I’ve had some trouble getting used to it, but once you get used to the keyboard, it’s alright :)
I’ve found the most problems with the keyboard during programming, because you need a lot of special characters wich a normal user might not need that often But all’s good now, and I’m loving the little machine :)
Below are the specs of the laptop :
Intel 2ghz core 2 duo
2Gb ram
120 Gb harddrive
It’s been a while, and I’m pretty busy at the moment, so I don’t have a lot of time to post that often, but quieter times are ahead, so stay tuned :)
While searching the net for a wallpaper I stumbled upon a funny Access Denied message from our firewall. The funny thing was that I was searching for a wallpaper with a penguin in it and the first result I clicked on Google produced this error message (more…)
Today I will be discussing the decorator pattern. This pattern is used to add responsibilities to your objects at run-time rather then at compile time. You can find some examples of the decorator pattern by looking at the Java I/O API or the swing table API. Below is a small example of the decorator pattern in action :
LineNumberReader lrdr = new LineNumberReader(new FileReader(filename));
As you can see we wrap the FileReader into the LineNumberReader which adds certain functionalities to the FileReader. (more…)
I’ve stumbled upon a funny advertisement for Apple, not that I’m a real apple fan, but is really covers why I don’t use vista :)
Today I’ve been looking at the composite pattern, in order to use it in the project I’m currently working on. The composite pattern is mainly designed to create a uniform way to approach similar objects. Let’s start with a nice quote from the GOF :
Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.
While looking into the code of our project I stumbled upon a part that I haven’t investigated before. The part is implemented with the strategy pattern, or so I was told because In fact the strategy pattern isn’t fully implemented. So I got curious about this pattern and found this nice definition by The gang of four :
Define a family of algorithms, encapsulate each one, and make them interchangeable. [The] Strategy [pattern] lets the algorithm vary independently from clients that use it.