Archive for the 'articles' Category

Sun
22
Feb '09
Code reviews work
by Frank Spychalski filed under articles, comments, google

Seems like nowadays I only write blog posts in response to other blog articles… But I hope this is better than not writing at all. Ted Neward asks if code reviews do actually work because evidence suggests, that the scientific review process does not. Read the rest of this entry »


Mon
7
Aug '06
Playing on the CodeGolf Range
by Frank Spychalski filed under articles, Computer, Fun, Ruby

picture by bigpru

I stumbled over this funny site called CodeGolf.com and tried my luck on the first problem (actually it’s the sixth, but it was the last and therefore appeared first on their page – confused?) Writing a Brainfuck Interpreter:

The brainfuck language uses a simple model of a computer consisting of an array of memory cells, a movable pointer into the array, an output stream, an input stream and the program itself. The program is formed from a sequence of the below commands :

  • > – Increment the pointer to point to the next cell to the right.
  • < – Decrement the pointer to point to the next cell to the left.
  • + – Increment the byte pointed to by the pointer.
  • - – Decrement the byte pointed to by the pointer.
  • [ - Jump forward to the command after the corresponding ] if the byte at the pointer is zero.
  • ] – Jump back to the command after the corresponding [ if the byte at the pointer is non-zero.
  • . – Output the value of the byte at the pointer.
  • , – Accept one byte of input, storing its value in the byte at the pointer.

It didn’t take me very long to write a running interpreter. My first version was more than a thousand characters. Even after renaming the variables and stripping all the whitespaces I still needed around 700 characters, which is huge compared to the best Ruby solution with only 142 characters. Read the rest of this entry »


Thu
13
Jul '06
Getting rid of Hypersonic Db in Jboss 4
by Frank Spychalski filed under articles, Java, Work

I don’t know how much time I could have saved, if someone told me I should not use the hypersonic database for a production JBoss system.

jboss.org/wiki:
hsqldb is not a production quality database.

Read the rest of this entry »


This is the fourth part of my Road to Ruby enlightenment. It started a long time ago with tutorials and first steps. Read the rest of this entry »


Tue
16
May '06
Road to Ruby enlightenment – red and gray
by Frank Spychalski filed under articles, Ruby

This is the third part of my Road to Ruby enlightenment. It started with tutorials and first steps. Read the rest of this entry »


This is the second leg on the Road to Ruby enlightenment. It started with tutorials and first steps. Read the rest of this entry »


This is not a Ruby tutorial. Read the rest of this entry »


Sat
1
Apr '06
Errorhandling Ruby vs. Java
by Frank Spychalski filed under articles, Computer, Java, Rants, Ruby


At my daytime job I had to rewrite a class which sends a Message to a Queue. Sounds simple? With EJB3 it is reasonably simple and can be done in around 10 lines of code involving lots of lookups. But if you are looking for a reliable solution which works even when the application server reboots every once in a while your code gets messy. My current solution has 120 lines of code and there are still some things to add like buffering of unsent messages. Read the rest of this entry »


This tutorial shows how to use distributed ruby to connect a rails application with another ruby service not running inside Rails. Read the rest of this entry »


While I was trying to figure out how to make my computer burn a DVD, I found this quote in someone’s signature in a newsgroup post:

UNIX is user-friendly, it’s just picky about who it’s friends are.

This definitely is true for linux as well. And today I got one step closer to being Linux’ best friend. Read the rest of this entry »