Monthly Archives: January 2010

The future’s wide open… open source!

Hey, I just released my very first contribution to the world of open source software! It’s basically not a really big thing but while I’ve been researching about a reasonable and stable multi-threaded producer/consumer problem implementation C#, I quickly found out that there are not many resources out there on that topic. Oh wait… That is to say: There are hefty amounts of resources on that topic, but all of them are just forum posts like “can you help me with that” without really helpful answers. A few hits I had were actually trying to solve the problem but most of them were contradicting the other possible solutions. I think you can see where this was going…

I expanded my search and eventually ended up deep-diving into the .net Framework and its crappy documentation and teaching all that fancy multi-threading stuff to myself. I came up with a small, probably helpful example that I wanted to share with the world 😉 It can be used in other projects because it’s completely generic and hides all the threading magic inside the three classes. If you think it’s too much overhead for your project or the way the produce() and consume() methods are called doesn’t fit into the workflow of your project, you still can check it out in order to learn a little bit.

I called it tspcp (thread-safe producer-consumer pattern) and just released it on github. Feel free to fork! :mrgreen:

It’s getting worse…

… seriously, get me out of here! 😉

Testing the syntax highlighting

Just installed a new plugin and want to test it. And what could be better than testing it in several programming languages at once?

# Language: Ruby
# This is so cool because it demonstrates how the String class itself gets opened and augmented
class String
     def say
         puts self
     end
 end
 'Hello, world!'.say
Language: Brainfuck
This is just weird (but funny!)
++++++++++[>+++++++>++++++++++>+++>+<<<<-]
>++.>+.+++++++..+++.>++.<<+++++++++++++++.
>.+++.------.--------.>+.>.
// Language: Objective-C
/*
Hmm... I don't really like this language but it's amazing that most parts
of Snow Leopard, Apple's latest operating system is written in this one
(or at least I think so)
*/
#import <stdio.h>
#import <objc/Object.h> 
 
@interface Hello : Object
{
}
- hello;
@end 
 
@implementation Hello
- hello
{
   printf("Hello, world!\n");
}
@end 
 
int main(void)
{
   id obj;
   obj = [Hello new];
   [obj hello];
   [obj free];
   return 0;
}
// Language: JAVA
// A classic
 public class HelloWorld
 {
      public static void main(String[] args) 
      {
           System.out.println("Hello, world!");
      }
 }
// Language: C#
// Looks almost like JAVA, feels kind of like JAVA, has a really bad IDE - in contrast to JAVA
class HelloWorldApp
{
    static void Main()
    {
        System.Console.WriteLine("Hello, world!");
    }
}
// Language: C
// What should I say? Almost everyone learns programming here!
 #include <stdio .h>
 
 int main(void)
 {
    printf("Hello, world!\n");
    return 0;
 }

I might be a little geeky, actually…

My workplace looks like this at the moment:

I have a desktop PC running Ubuntu Linux. On that machine, I have a Windows XP virtual machine (to be seen on the 30-inch monitor) and on the very right, there’s my Mac. Hmm. I’m seriously working with 3 OSes at the same time 😯

Winter mayhem, Code, Climbing, Solitude

Whoa, time flies when you’re busy, right? I am quite busy, actually 😉

So what has happened since my last post? Ah right, a new year started! Unfortunately, I could not attend the cool party I was invited to due to feeling sick for three days… But fortunately, I was invited to another party at my hometown so I decided to fill myself up with Aspirin and go there to meet lots of friends – of whom I’ve known some for almost 18 years already – at 11 p.m. :mrgreen:

The following days were very calm and peaceful: Just stayed at home, had great food and slept a lot. That’s always a good thing to do when you have the chance to! But on January 5th, I finally emerged from my laziness and hopped over to England where I rejoined the coding team of Booka. Ever since then, I barely left the house because I basically do nothing but working here 😎

England… It’s so funny! We got a little bit of snow here and the whole country descends into pure mayhem… Seriously – in many parts of Germany these amounts of snow are just normal and the same procedure as every year! But because the snow clearing services are not that good (or, seem not to be existing) here, it takes days or even weeks until several roads are clear again. Combined with the fact that snow tires are almost unknown here… Well, you can imagine what’s going on! 😉 All airports face severe problems, too!  So I can call myself lucky that I came home on December 24th without bigger delays… But the view I get to see is great:

Alright, back to my topic-checklist: climbing! Yes, climbing! Even though my skin has not yet recovered from my first attempts in December, I couldn’t resist going bouldering together with the other guys 😀 and now my hands are wrecked again… But it’s fun and I’ll just continue until my skin turns into leather :mrgreen:

Next topic? Ah yes, solitude. Solitude? You ask? Well, it seems we’re having some kind of epidemic here: Adrian’s sick, Booka’s sick, Miri doesn’t feel so well… So therefore I’m sitting at my desk all alone 🙁