Simo Virokannas

Writings and ramblings

Category: Informative

  • Hungarian Notation

    Years ago, I got a task to add features to the source code of an existing application. It originated in a company that was seemingly obsessed with win32-style programming and Hungarian notation. After a while, the m_lpsz, g_u32 and s_aul prefixes started to make sense, and almost immediately after that, they stopped making sense. Here’s what…

  • Poor man’s photo backup, part I

    A photo library, around 100 000 photos, not really professional but nice-to-have photos. Some of them are blurry, unfocused, or just plain horrible photographs. No time to browse through everything and only keep the really good ones. Aging hard drives and you badly need a backup, but 300 GB is just too expensive to store in…

  • Create ringtones from YouTube

    Most of the methods online for creating ringtones from YouTube seem to involve shady websites with ads and registering accounts, if they even happen to work. So here’s a simple workflow for choosing what you want and creating a ringtone in a matter of minutes. All of this assumes you have a Mac, if you…

  • Emoji nonsense

    Short history of Emoji characters: Many smartphone manufacturers released Emoji first only for Japanese products as a keyboard layout. Later they became popular elsewhere as a nicer replacement for the traditional :-) or :) smileys. Now, for some reason, first people started pushing these apps for activating Emoji on iPhones, as the layout was hidden…

  • Xcode, NSOpenGLView, internal crash

    Xcode, NSOpenGLView, internal crash

    I’ve been encountering a frequent problem with Xcode interface builder with NSOpenGLViews – whenever you add one, connect it to a class, and touch something, interface builder starts crashing like mad. First, you try to save everything hitting continue, then you realize saving, restarting, loading, deleting the control, creating it again, nothing helps. You just…

  • Dashcode, part II

    After using Dashcode for almost a year now, this is the bottom line: “Don’t make any big projects with it.” – A random Dashcode user After a while, when the project gets bigger, you’ll have some 20+ Javascript files, thousands of lines of code, several data sources (which are great, btw), it gets really slow.…

  • Wonderful null character

    I recently programmed a lengthy piece of online software with PHP and JavaScript, utilizing server-side PHP/MySQL queries. But there was a problem that just popped out of nowhere – all but one data entry worked perfectly. This one row, when observed from the SQL server side (with a great tool called Sequel Pro), looked perfectly…

  • MacRuby and (too) persistent objects

    If you’re starting with MacRuby and Xcode, you might stumble upon the same problem I did: If you deploy the project even once, those precompiled ruby object files (.rbo) stick to the deployment directory and you have to clean it up each time before testing any new code. Here’s a simple script you can put…