iPhone Tech Talks: A Great Success

I was at the London iPhone Tech Talks yesterday. It was a free event put on by Apple with talks by Apple’s engineers. More importantly, it was at a great venue with free food and drink all day, and free beer and wine afterwards. Also, the wifi worked!

I have two of my own apps on the store right now, with a freelance project about to appear as well. One app in particular is giving me some grief — I’m using Apple’s push API to send out reminders, but it’s not being 100% reliable. Fortunately there was a talk about push, and I was able to talk to the speaker afterwards about my issues — by following his advice I’ve already fixed my app.

Read More →

Riotjs: A JavaScript Unit Testing Framework

I really like Riot, the Ruby unit testing framework, so I decided to port it to JavaScript. You can get it from GitHub at alexyoung/riotjs.

I’ve worked hard to keep the syntax minimal. This is challenging in JavaScript, as you may have gathered from my Fear and Loathing in JavaScript DSLs article.

There’s actually no need for a JavaScript “DSL” in this case — riotjs could work fine by passing around objects. It’s just that riot tests are so terse that I wanted to carry this over to JavaScript. Up until now I’ve been using unittest.js from script.aculo.us and I always felt the tests were too messy.

Read More →

Running a Web Business in the UK

A friend of mine shared this link with me: 37signals has some lessons for European startups. It made me think about 37signals business and marketing approach to web apps — what works and what doesn’t for the rest of us.

I build web applications and I also freelance. My company is called Helicoid. I’ve found that marketing software without a good chunk of capital is like playing the lottery. There’s a chance that your apps might get noticed, but you need to sustain interest over time. You might have noticed how often certain businesses appear on premium advertising services like The Deck — that’s because they invest a serious amount of money into marketing.

Why do some businesses have to pay thousands of dollars to appear on The Deck while 37signals don’t? The secret is community.

Read More →

Riot: Ruby Unit Testing

Riot is a Ruby unit testing framework. It results in terse and expressive unit tests. It strikes the perfect balance between shoulda and rspec–like test frameworks. It’s also very fast.

Riot isn’t based on Test::Unit (unlike Shoulda). It flattens your tests into contexts with sets of assertions. It has a setup block that runs before the assertions in a context.

There’s a movement within the Ruby community to write tests with one assertion per test block. Riot fundamentally works this way because assertions are the test block, so cheating isn’t possible. This makes for incredibly focused unit tests.

Read More →

Fear and Loathing in JavaScript DSLs

I wanted to create an API in JavaScript that behaved like a DSL. The aim was to cut down on unnecessary syntax in the client code. I explored a few techniques which I will present below. In my opinion the best technique is the final one, which my friend Annealer came up with. He intimated that I co–created it, but he was just being nice so don’t believe him.

These examples use a fictional DSL object called DSLRunner that is capable of executing the DSL.

Download the examples here: javascript-dsl-examples

Read More →

BBC Glow: Overview and Example

Glow is the BBC’s JavaScript framework. Things to note:

  • The namespacing makes it play nice with other frameworks (and itself)
  • It’s split into modules that are mostly self–contained (an exception will alert you to a missing dependency but this is rare)
  • Modules include: dom manipulation, language extensions, events, animations
  • Also features UI widgets with bundled images, HTML and CSS
  • The homepage works with the Konami code

Why does Glow exist?

To read what the developers say, see What is Glow?

To summarise, the BBC have strict browser support guidelines. They also have disparate teams that can work on different parts of the same page. Therefore:

Read More →

Deployment: Diffs and Dependencies

We moved house recently, so my daily development machine was packed up for a few weeks while I worked off a laptop and a 3G card. It was like being on holiday except I still had to work. Anyway, I found a few deployment–related scripts I was working on for my Agile Deployment series of articles (visit the agiledeployment tag for more).

I’ve packaged these scripts as rubygems, so they’ll be easy to install and try out. They’re essentially snippets that I use to maintain sanity when deploying. They might form part of a bigger deployment system in the future.

Rsyncdiff

Read More →

The End of Religious Wars

Are you tired of rockstar drama queens declaring war on languages, burning all their bridges and filling up Hacker News with boring articles?

Over the last few years Python and Ruby programmers have had a quiet, seething war. It’s equally as ridiculous as Nintendo vs. Sega was back in school. Conventional wisdom in the gaming community is that these wars start because kids can only afford one of the consoles, so they inevitably take sides.

This largely accounts for the programming language and editor wars. After all, time is the greatest currency — it can take months or years to master a programming language. The basics are easy to pick up, but fluency takes real effort, which makes people want to defend their investment.

Read More →

What Makes You Happy?

Track Your Happiness is an entertaining experiment. It’s a site that periodically sends out links to surveys. The surveys are designed to gather information on your general well–being and happiness. The surveys work fine on iPhones too, so I was able to fill them out wherever I was.

It focuses on a few main areas:

Read More →