Skip to main content

Posts

Showing posts from March, 2013

On writing platform independent code (or, why I like the new C++)

I use Linux when I work from home, I'm forced to use a Mac at work (well, I boot up a virtual Linux OS), and I use Windows when I just want to goof around with my computer. So, while most of my work is done on Linux, it's imperative that my code work on all platforms; just because I could use any of the three. Traditionally, C required multiple versions of code, protected by #ifdefs. This often required multiple versions of code to be written, depending on the target system, target OS, and compiler being used. Clumsy and messy system. C++ too had similar shortcomings. When it came to writing multi-threaded code, I had to choose either Win32 or Posix, and once I made that choice, I was bound by it. Since those were the days when Ubuntu was driving me crazy, I chose Win32. Bad decision. Every single action that I attempted was compounded by the fact that Win32 is the worst API ever. How do I lock a mutex? Well, first I declare a handle, then declare a mutex, then define the hand…

On Instant Gratification via Content Consumption

I've often been vocal on this blog about how ours is a generation of creative folk; about how easy it is to generate good content; and about how anyone with a computer and an internet connection can generate content that can take on the best in the business. Well, I'm not sure if I hold that stand any longer. Over the past few months, I've often stumbled upon this question: Do we still have the will to create content? Consider this: I come home tired from work; wherein I sit in front of a computer and write code, or sit in front of a computer and read research papers. Then, I come home, fix myself a meal, log on to some website, and watch TV shows while I eat. It's so convenient. So little effort needed to watch a program, and so much more effort for something equivalent, say, read a book. Now consider something even more tedious; like writing this blog, and you'll realise where I'm going. This particular post has been in the draft mode for over two weeks, and …