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
public Singleton getInstance()
if (instance == null)
instance = new Singleton();
Do not try this at home. Try it at someone else’s home..
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.
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.
A bottle of banana milk that is sitting in front of my room window for a few days. I presume it was dropped by my upstairs neighbor. I’m gonna wait a little more until it turns into banana yogurt. Then, I can eat it. Mmm.. Yummy..