Simo Virokannas

Writings and ramblings

Category: Programming

  • A new design pattern for MMXXII

    Over the past decades designing an application has gone through several overhauls. Of course whether this affects you or not depends on if you’re into doing the latest thing or if what you already have can in itself withstand the changes in computing landscape. But if you’re like me and at least like to entertain…

  • Adding resizing and resizable subviews to NSView

    If you’re adding a subview programmatically, you may run into having to constantly set all the resizing behaviors and/or anchors manually when all you really want to do is fill the whole available area based on two options: “stretch me to fit this box” or “stretch this box so I can fit”. This happens especially…

  • Application packaging: history and good practices

    As long as there have been programmable computers, there has been a form of application packaging, and it has taken many shapes in the past and has at least as many that coexist today. Here’s a brief run-through of some of these followed by a couple of conclusions. HISTORY punch card boxes 1950’s and 1960’s…

  • Learning to learn programming (part I)

    Programming as a profession is no different from most professions – there’s no real trick to it, there’s no “learn this in 10 days”. But one skill does help you a lot: the ability to learn. That means the key is to learn to like the learning process and then never stop learning. Therefore, this series…

  • Symbolicate .crash logs – with whatever

    Ran into a situation where I had to get a Apple crash log symbolicated but the instructions say you’ll need to drop them to the device log viewer for that device. But in this case, I don’t have the device the log was from. Or it might not be connected at the moment. Or any…

  • Spline interpolation in Swift

    Just so that the next person can avoid having to do the wikipedia-math-formula-to-Swift conversion, here’s a simple Catmull-Rom interpolation method for linear y=x data. I’m using it to create simple ski jump hill profiles for a possibly upcoming game, it’s so easy to describe a hill profile by just giving it control points and let…

  • Swift: as easy as 1, 2, 3…?

    Apple shook the developer community a few years ago with the release of Swift, a language that is “concise, expressive and lightning fast”. As a developer mainly working on Apple platforms, I decided to jump on it right away, trying to keep in mind there was going to be bumps in the road like there has been with any…

  • Indeterminate progress is not progress

    The progress paradigm Before, you could open your computer, do your stuff, close it and enjoy life. Remember when loading a program, like a word processor, took a minute or more? Today’s applications and websites typically employ a model where there’s a backend process that either runs locally on the same machine or on a server somewhere.…