My brain can’t handle OOP anymore

May 07 2012 Published by under A tech a day

The other week I was working on my compilers homework – the semantic analysis part is an object-oriented nightmare. Something called the visitor pattern to traverse trees and do weird stuff. It made me want to curl up in a fetal position in the corner, rocking back and forth in a padded room, while mumbling [...]

10 responses so far

Using Backbone to improve multiselects

Apr 13 2012 Published by under A tech a day

Sometimes you need to ask a users for multiple answers to a single question. But what’s the best way to go about it? A multiselect input field is kind of strange for the user, sticks out and doesn’t really behave like everything else on the web. A bunch of checkboxes is better for the user [...]

No responses yet

What Refactoring is, and what it isn’t

Apr 11 2012 Published by under A tech a day

 This post is my first test of zemanta’s Blogspire, please tell me if you find this style of reblogging useful and I should do more in the future, or maybe I _should_ reblog, but differently. Thanks Nikos Maravitsas writes about What refactoring is and what it isn’t over at Java Code Geeks. Sometimes a programmer will [...]

No responses yet

Closure and currying magic for cleaner javascript

Mar 14 2012 Published by under A tech a day

Sometimes you find a piece of javascript, a perfect piece of javascript, it does exactly what you need! Perfect! You could spend hours, even days, getting something to work and someone’s already done it, shared the code on the internets even! Hooray! But … the code looks something like this: // to populate later var data [...]

3 responses so far

How to make your django app slow

Mar 05 2012 Published by under A tech a day

The task every developer fears “Hey, I sometimes get a timeout when I want to see the last gazillion days of activity in the dashboard. What gives?” This problem started happening for a project I work on a few months ago. Through a lucky sequence of events I was able to push the problem back [...]

2 responses so far

The commonest javascript bug

Feb 24 2012 Published by under A tech a day

Every couple of weeks somebody will come running to me: “Swizec, Swizec, I did everything right, but this javascript isn’t doing what it’s supposed to! Whatever I click only the last item works. Halp!” Every time it’s the same bug – people just don’t understand how loops and closures play together in javascript. Invariably they loop [...]

One response so far

Collatz, Haskell and Memoization

Jan 09 2012 Published by under A tech a day

After an awesome longboarding session yesterday afternoon I decided to play around with infinite sequences in Haskell – it’s supposed to be one of the more (most?) powerful features of Haskell – because it’s a lazy language apparently. My first impulse of creating a primes generator was nipped in the bud by a long page [...]

9 responses so far

Sabbatical week day 3: Raining datatypes

Dec 29 2011 Published by under A tech a day,sabbatical

I’m taking a sabbatical week over the holidays. This week’s posts will serve as a sort of report of what I got up to the previous day instead of the usual schedule – wish me luck that I achieve even half of what I’d like to. As I sit here slowly sipping on my tea [...]

One response so far

Learning me a Haskell

Dec 23 2011 Published by under A tech a day

A couple of days ago I decided that doing my graduation thesis on a topic that, when suggested, brought a sparkle to my mentor’s eye and made him suggest I might want to think about picking a co-mentor just wasn’t hard enough – so I decided to do the whole thing in Haskell. I want [...]

7 responses so far

Javascript’s lack of strftime

Dec 12 2011 Published by under A tech a day

You know that one piece of shitty code that always makes you cringe? Something along the lines of months = ['Jan', 'Feb' ....]; dateString = date.day()+’ ‘+months[date.month()]; Yeah that piece of code. Let’s talk about that. It sucks. There is a special circle of hell for people who do it and yet JavaScript developers are forced [...]

5 responses so far

Next »

« A food experiment The best $5 I have ever spent »