December 2011
1 post
Rapid network protocol prototyping with...
github:TCAsyncHashProtocol. I like constructing simple network protocols from plist/json-safe dicts, and
transmit them over the wire as json. Easy to prototype with, easy to debug.
Give TCAHP an AsyncSocket, and this is what it’ll do for you, plus
support for request-response, and arbitrary NSData attachments.
It is an embarrassment and almost an insult that my example project is a...
November 2011
1 post
If you are going to end up with a crappy to mediocre blender anyway, then why...
– Is your stuff falling apart? Thank Walmart (grist.org). yay for progress?
October 2011
3 posts
By categorizing our cognitive flaws, documenting not just our errors but also...
– Is Self-Knowledge Overrated? at the new yorker. not very surprising, but sort of confirms that everyone’s an idiot, not just me :P
September 2011
2 posts
Your brain begins to know that you are “enjoying” yourself, even if you hate...
– insertcredit (4 chapters) reminds me why I hate “social games” more than TV. Memetic T-Viruses, turning human beings into zombies.
8 tags
How To Fix Xcode 4
People are sort of tired of me complaining; I’ve been saying I hate Xcode 4 since the first time I used it. “You’ll get used to it!”, “Learn Behaviors and everything will be well”, “Embrace the new UI model”, they said. I’ve been using it exclusively for several months now, trying to explore and use every feature of it; make sure to try to find...
August 2011
2 posts
3 tags
Software today is not engineering. Building the Empire State Building with three...
– Paraphrasing Dr Alan Kay in his talk “Programming and Scaling”. I got the same sense of depression over the state of our industry when I read about Doug Engelbart’s amazing NLS system from ‘68 and the Hypertext Editing System in ‘67. Yes, we have millions and millions...
Bret Victor, beast of burden →
Remember that amazing UI math video I posted a while back? He got a nice interview and article in nicecodesign.com. Apparently it was made by Bret Victor. I didn’t know who Bret Victor was until a few moments ago, but it seems he’s pretty much awesome. His web site is rather amazing, and his portfolio page about his work at Apple is very funny and very sad at the same time. He also...
July 2011
2 posts
Design patterns in general are a recipe for failure, as they are indicators of...
– Matthew Maurer in a thread by Andy Matuschak. Whole comment thread is interesting.
11 tags
Low Verbosity KVO
DRY Cocoa: SPLowVerbosity
I love Objective-C. It’s a very explicit language: there is no magic in the language. If you want such magic as distributed objects, model classes generated at runtime, generic change notification, or heck, even referenced counted memory management, you can implement it yourself in a library. It’s also by convention a very verbose language. If the method name...
May 2011
2 posts
6 tags
THIS. This is how to teach math. The contrast between the Wikipedia page and this application’s UI is striking.
4 tags
File format plugin API for Spotify?
At Spotify, we have one and a half day of ‘hackday’ (‘code whatever you want’, the ‘20% time’ concept from Google) every sprint. Since the past few months have been a bit hectic finishing up the new 0.5.0 release, we haven’t really had time for that in a while, and thus compensated by having a whole week of crazy hacking this week. I managed to finish two...
April 2011
1 post
When you hand a recursive mutex down from one routine to another, the callee...
– So, late night hacking trying to fix a stupid bug in Spotify. Find out that all mutexes in the Spotify codebase are recursive. Googleathon about recursive locks. Find interesting stackoverflow answers and blog posts and stuff. Some say recursive locks are Evil, but their arguments aren’t...
March 2011
4 posts
On the plus side, it’s now easier to add a new contact, and I can decide whether...
– ignorethecode on the atrocity that is Skype 5. It really is a bloated, ugly, misbehaving piece of crap software. It’s even worse than the original MSN Messenger for Mac OS, and that’s quite an achievement. (Bloated chat UIs are a pet peeve of mine; I had an argument with my friend Sterd...
iOS 4.3: imp_implementationWithBlock() →
iOS 4.3 has a new objc api: adding method implementations using blocks. I tried to do the same once using libffi but never had the patience to finish it. This is a prettier solution anyway.
Eskil Steenberg (creator of Indie MMO “Love” - which is also a Voxel world...
– Defcon - Minecraft + Physics = Awesome (how can you not read an article with that title?)
5 tags
UIKit: Hide the keyboard without a reference to...
Googling for answers to UIKit or iOS/iPhone programming problems today resembles googling for answers to JavaScript problems. There is so much horribly, horribly broken code out there, being promoted as the way to do things.
Ranting aside, today’s problem is writing your own view controller container, and noticing that focused UI elements don’t dismiss their keyboard in response to...
February 2011
1 post
January 2011
2 posts
Rasmus Andersson: Why I wrote a programmer's text... →
rsms:
bla bla bla bla bla the less productive is the result. There’s an unfortunate common pattern when people open up a new application for the first time: They start by going into the “Preferences” UI and dig around like it was a game of Zelda. Instead Kod will have a very limited set of preferences which can be configured through a bla bla bla bla
YES! I need to do that! The preferences...
6 tags
Media keys hook in Mac OS X
There is no nice (or is it even official?) way of detecting and handling the media keys on the user’s keyboard. One can intercept events with type NSSystemDefined and subtype 8 in -[NSApplication sendEvents:], but this has major problem: any other applications that listen to the media keys will receive these events too. This means for example that if only Spotify is running and you want to...
December 2010
1 post
thedevilswater:
November 2010
2 posts
4 tags
List of capabilities web apps need but can't...
I despise using web apps. The only ones I’ve found that are even at least useful are made by Google, and Google’s web apps are as aesthetically pleasing and user friendly as a Windows 98 shareware app. But even if they were made with the same care and attention to detail as Mac apps by Cultured Code or Omni Group, they’d still have a long way to go before being as useful and...
August 2010
3 posts
Michael Casteel is my new hero! Got mom a 13” MBP a while ago to replace a Performa, but she missed Klondike and none of the other osx card games I had found were as good. Turns out Casteel ported his original Klondike to OS X! It’s originally a game for the Plus, I hadn’t even considered that he still worked on it.
Andrey Subbotin: iPhone 4 @2x assets made easy →
We were updating our app’s graphics for the gorgeous screen of iPhone 4 the other day and it was a pain to update all the 163 PNG files we had and not to miss a thing.
So, I’ve come up with a simple Ruby script that checks that for each @1x image you have a properly sized @2x image.
Man, such a life saver. sudo gem install ios-png-check is the path to bliss.
7 tags
One-line closures in ObjC without blocks; or,...
Objective-C is wonderfully dynamic. One of my favorite wonders is the invocation grabber. I never paid them much attention at first, only using them when I explicitly needed an NSInvocation for some API. Then, I started working at Spotify and found a certain header file; suddenly, I saw the light.
If you know what that an invocation grabber is, you can just skip down to the code. For...
July 2010
2 posts
June 2010
1 post
rentzsch.tumblr.com: Magic Feet →
The experiment: Step on a nail. Make sure it punctures your shoe and penetrates your foot. (You probably want to make sure you’re up-to-date on your tetanus shot first.) Do it again. Yes, with the blood. Doesn’t matter if you wait a week or a couple of years in-between runs. Now the fun starts.
On the third run, you’ll catch yourself.
You’ll develop what roofers call “magic feet” — you’ll...
7 tags
Howto: Restore Springboard icon positions after...
You’re syncing from another computer. You’re restoring from a backup. iTunes has a bad day. Whatever reason, iTunes decided to resync all your apps, and replace them in your springboard in alphabetical order. I don’t know about you, but I don’t find that particularly helpful. I don’t know *how* many times I’ve meticulously sorted at least the three first...
May 2010
5 posts
Maxwell's Equations →
science:
Irregular Webcomic:
Imagine you are James Clerk Maxwell, in 1865, formulating your theory of electricity and magnetism, and writing down your four equations for the first time in history. You write down the terms of these equations based on your experiments with electric batteries, bits of wire, and magnets. (…) You take the values you measured for εo and μo, multiply them together,...
4 tags
1 tag
Clarification
rentzsch:
It’s not about Adobe.
It’s not about Flash.
It’s not about cross-platform.
It’s about less code.
It’s about fewer crashes.
It’s about faster-than-C runtime.
It’s about faster development time.
It’s about distributed computing.
It’s about pervasive multicore.
It’s about REPLs and live software.
It’s about software that preemptively exposes my coding errors.
It’s...
Every time you do something that’s hard for you, every time you transcend some...
– Denise Paolucci > cleversimon > insooutso
April 2010
2 posts
1 tag
There’s a very old bug on Adobe’s JIRA bug tracker about flash video performance being absolutely abysmal on MacOS. One of the QA engineers at Adobe commented a while ago on that issue to explain that Adobe was currently focusing all their effort on mobile devices, and “didn’t have time” to fix the Mac version. There was an uproar, and the comment was removed. As I...
8 tags
On ngmoco's We Rule
We Rule is a pretty boring FarmVille knock-off for iPhone and iPad. Actually, it’s really well made for what it is: nice graphics, music and atmosphere. But all you do is plant, harvest, order and deliver. I figured, maybe I can enjoy it anyway? One of the results from that is the image below.
It’s obvious ngmoco are rewarding people who spend as much time as possible in the game....
February 2010
1 post
I was afraid Microsoft would let the acquisition of Seadragon go to waste, as it is with so many acquisitions. This time however, it seems my fears are unfounded. Blaise Aguera y Arcas demos some amazing mapping + ZUI + augmented reality in this TED talk.
January 2010
3 posts
Geek Test →
I scored ~38.856%. Sounds low, but apparently I’m a “major geek”. Phew!
December 2009
6 posts
4 tags
Filtering a UITableView, and keyboard wonkiness
Hey, another bug that took half a day to fix. That always deserves a blog entry.
So I have a UITableView, and on it I have a tableHeaderView containing a UISearchBar. The UISearchBar filters the contents of the UITableView, and thus at every key press I have to reloadData (or more specifically, I -[UITableView reloadSections:withRowAnimation:]). For some reason, this calls...
Exercise 4-12. Adapt the ideas of Cthulhu() to write a recursive version of the...
– The C Programming Language: 4.10
"Bizarre" Octopuses Carry Coconuts as Instant... →
This is the most ridiculous thing I’ve seen in forever. A tip-toeing octopus!
(Via tfail)
November 2009
1 post
1 tag
October 2009
6 posts
[PHP is] ‘quick- and-dirty’ elevated to a religion.
– @jmweh