Oct 16

Conditional printf debug statements in C based programming languages

One of the first things people learn to do when learning to program is how to write an ‘Hello World’ application. For many programming languages this involves writing the iconic sentence to a console window. Its amazing how the same fundamental concepts from the ‘Hello World’ application can extend into hardcore application debugging. At university we called this ‘printf debugging’. However in the real world, its important to remember that having too many unnecessary logging statements in production applications can impact performance. In compiled programming languages there are ways to automatically remove all ‘printf debugging’ statements. Here is how to do it on C, C++ and Objective C… Continue reading

Feb 01

Controlling Skype via Terminal on a Mac

UPDATE: Windows users should check out my other project, skype4cmd.

Recently Manoj Vekaria asked me if I know how he could send SMS’s via Skype from within one of his PHP scripts. After digging around we found that while there is PHP support for windows, however it doesnt work on OS X since there is no COM interface.

There is a framework that Skype provides for cocoa, that doesn’t seem to compile ‘out of the box’ on Intel machines. Fortunately there is light at the end of the tunnel for Mac developers. Continue reading

Jan 14

Are they all evil?

While working at RocketBoots, I have worked with Mac Fan Boys, Windows Gurus and Linux Geeks. Its interesting to see how religious people can get for their operating system. In fact, its been a very fascinating lunch time discussion topic for many months now. I am sure everyone has been in such a discussion before.

If you think of it, aren’t they all evil? Today I stumbled across this excellent Penguin, Two-face and Mr Freeze wallpaper that gives a whole new perspective to this dilemma…

Kudos to Flickr user Lishoffs for posting the image to Flickr!

Sep 02

What were they thinking: iTunes 10

Apple has been known to be a company that puts a great deal of emphasis on ensuring that applications meet users expectations. This can easily be seen by the strict review process that all iPhone applications have to go through. While watching the live keynote at 3am(Sydney time) I quickly noticed one very interesting feature within iTunes 10…

Screenshot of iTunes 10 titlebar buttonsFor those that cant notice what it is, the ‘close’, ‘minimise’ and ‘optimise?’ buttons are kinda… weird….

  • No titlebar
  • Vertically placed
  • Smaller then all other system buttons.

After thinking about this strange layout I have a theory as to why they did this. Since iTunes 8(or 9… im not too sure) the pesky green ‘optimise?’ button has not done what all other apple applications do… optimise the size of the application window for the content thats inside. Yea sure some applications (like firefox and even microsoft word for mac) choose not to adhere to Apples interesting philosophy of ‘optimise?’ and choose to make the button behave in a ‘maximise’ manner like on windows computers. For some weird reason, the iTunes 8 button collapsed the application window to the mini-player mode.

Does Apple think that making the buttons appear to be different to the rest of the OS mean that users will be reminded that pressing them wont do what they expect?.. I don’t know.. I most certainly don’t like it! I think today is the first day that i haven’t been able to minimise iTunes by double clicking. Sigh. Nothing I can do now but get used to it. What a bad fruit.