<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>I’m a startup consultant and software developer based in southern England. Hire me for Ruby on Rails or iOS development work and advice on building a smart business.

</description><title>James Wilding | Ruby on Rails Developer</title><generator>Tumblr (3.0; @jameswilding)</generator><link>http://www.jameswilding.net/</link><item><title>Why You Won't Build The Next Basecamp &amp; Why It Doesn't Matter</title><description>&lt;p&gt;When I started work as a web developer, back in 2005, &lt;a href="http://basecamphq.com/" target="_blank"&gt;Basecamp&lt;/a&gt; was the big new thing &amp;mdash; web apps in general were the big new thing. Ambitious developers wanted to “build the next Basecamp”, and that’s a phrase I still hear today, six years after Basecamp became popular.&lt;/p&gt;
&lt;p&gt;Building the next Basecamp is a pointless aim for any startup, and here’s why. First, the target is too vague: “the next Basecamp”, what does that mean? Basecamp came along when web apps were fresh and new, and the web app market was young enough to have room for big, generic products which covered a lot of ground &amp;mdash; Basecamp is essentially a project management tool aimed at a very broad market. Now the web app market is more mature, you’re more likely to be successful if you niche down and build something that targets a very specific audience. You might make less money, but at least you’ll make some money (and you’ll stand a much better chance of making more than just “some”!).&lt;/p&gt;
&lt;p&gt;Second, “build the next Basecamp” is too often used as a lazy stand in for “make lots of money with a web app”. Don’t mistake effect for cause: “make a lot of money” is an OK goal in itself, but you won’t achieve that goal just by wanting to achieve it &amp;mdash; I don’t care how much pop psychology you read. You’ll get to your goal by making something good that sells!&lt;/p&gt;
&lt;p&gt;Third (and this is most important, even if you don’t think it is): if you’re talking about building “the next Basecamp” then any spark of creativity you might have will be drowned by your (probably subconscious) desire to blindly copy the people who have already got to where you want to be. Read &lt;a href="http://37signals.com/rework/" target="_blank"&gt;Rework&lt;/a&gt;, learn &lt;a href="http://rubyonrails.org/" target="_blank"&gt;Rails&lt;/a&gt;, build a web app…it worked for them so why not for me? The only problem: success comes from inspiration, not from duplication. Forget what’s happened before and use your own ideas: they’re the only chance you’ve got.&lt;/p&gt;</description><link>http://www.jameswilding.net/post/13919565037</link><guid>http://www.jameswilding.net/post/13919565037</guid><pubDate>Thu, 08 Dec 2011 13:21:30 +0000</pubDate></item><item><title>Case-Insensitive Searches With PostgreSQL On Rails</title><description>&lt;p&gt;Most Rails developers will have used one or both of MySQL and SQLite for development work. In both of these flavours of SQL, the “like” operator performs case-insensitive searches; this example from the MySQL documentation is a good illustration of how this work:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span&gt;The default character set and collation are &lt;code class="literal"&gt;latin1&lt;/code&gt; and &lt;code class="literal"&gt;latin1_swedish_ci&lt;/code&gt;, so nonbinary string comparisons are case insensitive by default. This means that if you search with &lt;code class="literal"&gt;&lt;em class="replaceable"&gt;&lt;code&gt;col_name&lt;/code&gt;&lt;/em&gt; LIKE ‘a%’&lt;/code&gt;, you get all column values that start with &lt;code class="literal"&gt;A&lt;/code&gt; or &lt;code class="literal"&gt;a&lt;/code&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span&gt;Let’s assume that you want this behaviour.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If, like a lot of Rails developers, you use Heroku for hosting or staging, you’ll run into a problem: Heroku uses PostgreSQL, and PostgreSQL’s “like” is case-&lt;em&gt;sensitive&lt;/em&gt;. In practice, this means that you’ll test your code in development, deploy to Heroku, and see different results. How to fix this?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This fix is simple: PostgreSQL provides an “ilike” operator which performs case-insenstive searches (the behaviour for “ilike” is the same as for “like” in MySQL and SQLite). So, we can check which SQL adaptor Rails is using and use either “like” or “ilike” as appropriate. Here’s an example in an ActiveRecord scope:&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;scope :search, lambda { |phrase|  
  if connection.adapter_name == 'PostgreSQL'
    where("title ilike ?", "%#{phrase}%")
  else
    where("title like ?", "%#{phrase}%")
  end
}&lt;/pre&gt;
&lt;p&gt;This gives us the correct behaviour whatever flavour of SQL we’re using.&lt;/p&gt;
&lt;p&gt;Note, by the way, that I’ve slightly simplified things here: “like” in MySQL and SQLite aren’t always case-insensitive, but they do act that way most of the time. Check the MySQL and SQLite documentation for more details.&lt;/p&gt;</description><link>http://www.jameswilding.net/post/12553554339</link><guid>http://www.jameswilding.net/post/12553554339</guid><pubDate>Wed, 09 Nov 2011 11:44:06 +0000</pubDate></item><item><title>Hyper 0.4.2 Released</title><description>&lt;p&gt;&lt;img src="http://farm1.static.flickr.com/47/362060602_96c3d3b8ca_z.jpg?zz=1" width="640" height="342" alt="Hyper"/&gt;&lt;/p&gt;
&lt;p&gt;Version 0.4.2 of Hyper, my framework for small HTML websites, fixes a bug that stopped new sites from having a public folder. &lt;a href="https://github.com/jameswilding/hyper" target="_blank"&gt;Grab the code from Github&lt;/a&gt; or install via Rubygems:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;gem install hyper&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If you’re coming to Hyper for the first time and want to see what it can do, try &lt;a href="http://www.edgeofspacemap.com/" target="_blank"&gt;the edge of space map&lt;/a&gt;.&lt;/p&gt;
&lt;p class="footnote"&gt;Image by &lt;a href="http://www.flickr.com/photos/phunk/362060602/" target="_blank"&gt;phunk on Flickr&lt;/a&gt;&lt;/p&gt;</description><link>http://www.jameswilding.net/post/12553155954</link><guid>http://www.jameswilding.net/post/12553155954</guid><pubDate>Wed, 09 Nov 2011 11:06:25 +0000</pubDate></item><item><title>It's Not About The Settings</title><description>&lt;p&gt;I remember the first time I used Windows properly: there were lots of settings. Pages and pages of settings. Entire magazines made a profit from explaining how people could, and should (and should not) use the settings to do, well, anything. Want to read your email only on Tuesdays in March? There’s a setting for that.&lt;/p&gt;

&lt;p&gt;There is, I think, something called the poverty of choice: when you can do anything, it’s hard to do something. For a long, long time personal computing used choice as a benchmark: the more options you were given, the better a piece of software or hardware was. This led, inevitably, to companies Dell and their confusing array of PC options.&lt;/p&gt;

&lt;p&gt;Choice is good for experts. I want to decide which album to listen to this evening; I am an expert on my music collection. But I don’t want to do the detailed research to work out what album to buy next: that’s what iTunes reviews are for. The vast invisible mass of iTunes reviewers does my thinking for me.&lt;/p&gt;

&lt;p&gt;Most people are not experts. Most people have too much choice. Most people, myself included, want to be guided when they’re on unfamiliar ground. And this is where the personal computing industry failed until recently: it assumed that normal people like my mum wanted a level of choice which (with respect to my mum) they really couldn’t — and didn’t want to, didn’t need to — handle.&lt;/p&gt;

&lt;p&gt;Some people complain that iPhones and iPads are too locked down, not open to customisation. Yes: that’s the point. They offer the smallest set of choices necessary to help us achieve more with less thought, less effort. Isn’t that what technology is all about?&lt;/p&gt;</description><link>http://www.jameswilding.net/post/11985826935</link><guid>http://www.jameswilding.net/post/11985826935</guid><pubDate>Thu, 27 Oct 2011 10:18:22 +0100</pubDate></item><item><title>Legacy</title><description>&lt;p&gt;When I woke up on the morning of October 6th, I visited Apple blog &lt;a href="http://daringfireball.net" target="_blank"&gt;Daring Fireball&lt;/a&gt; and saw a deep black background in place of the usual grey. That can’t be good, I thought: someone has died. Then I saw the headlines.&lt;/p&gt;

&lt;p&gt;When someone in Steve Jobs’ position dies, two things happen: first, the person’s friends and family suffer; second, the person’s achievements are celebrated, picked over, and the person is — often — idolised. That day, I watched the second of those things happen, and imagined the first.&lt;/p&gt;

&lt;p&gt;My family has suffered two deaths from cancer in the past few years, and I know that whatever someone has achieved in their life their death still feels as painful as you could imagine. Everyone achieves something important, whether it’s battling cancer, raising children, or changing personal technology for the better: we all deserve to be remembered and celebrated for the difference we make in the world.&lt;/p&gt;

&lt;p&gt;But Steve Jobs’ real legacy isn’t an unreachable plateau of genius: it’s the example he set, an example of someone who believed in himself, trusted his instincts, and had the courage to do what he thought was right. That’s something we can all achieve, in our own ways, if we remember what’s really important.&lt;/p&gt;

&lt;p&gt;Here’s an excerpt from Jobs’ widely-quoted &lt;a href="http://news.stanford.edu/news/2005/june15/jobs-061505.html" target="_blank"&gt;Stanford commencement address&lt;/a&gt; (justifiably regarded as being in a different league to the usual graduation cliches):&lt;/p&gt;

&lt;blockquote&gt;Remembering that I’ll be dead soon is the most important tool I’ve ever encountered to help me make the big choices in life. Because almost everything — all external expectations, all pride, all fear of embarrassment or failure - these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.&lt;/blockquote&gt;

&lt;p&gt;The best way to celebrate someone’s life is to learn from it.&lt;/p&gt;</description><link>http://www.jameswilding.net/post/11389200917</link><guid>http://www.jameswilding.net/post/11389200917</guid><pubDate>Thu, 13 Oct 2011 08:35:00 +0100</pubDate></item><item><title>Pocket Whois for iPhone</title><description>&lt;p&gt;Last week I launched &lt;a href="http://itunes.apple.com/us/app/pocket-whois/id440176512?ls=1&amp;mt=8" target="_blank"&gt;Pocket Whois&lt;/a&gt;, a whois app for iPhone and iPod Touch; it’s &lt;a href="http://itunes.apple.com/us/app/pocket-whois/id440176512?ls=1&amp;mt=8" target="_blank"&gt;available on the App Store&lt;/a&gt; for just $1.99 (scroll down to find out how to get the app for free). &lt;/p&gt;
&lt;p&gt;As a web developer, I use whois tools almost every day to check DNS settings, to find out whether a domain is available to register, or to see whether a registration has been processed. One of the things I’ve found difficult about other whois apps is that they show the whois information as-is — if you’ve ever seen raw whois data, you’ll know that it’s not exactly the easiest thing to understand (the way the data is presented varies too, which doesn’t make things any easier). So my goal with Pocket Whois was to build an app which shows whois data clearly and consistently.&lt;/p&gt;
&lt;p&gt;I also wanted to build an app which non-technical folk can use to check domain availability. The idea here was that while some users want the full whois information straight up, many users actually just want to see whether a domain is registered (with the option to see the full information too, of course).&lt;/p&gt;
&lt;p&gt;So, what features does Pocket Whois provided for the discerning iPhone user?&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;clear presentation&lt;/li&gt;
&lt;li&gt;complete whois data&lt;/li&gt;
&lt;li&gt;bookmarking (save domains for reference)&lt;/li&gt;
&lt;li&gt;exporting (send whois data by email)&lt;/li&gt;
&lt;li&gt;“web check”: find out how (or if) a domain is being used&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Pocket Whois is also (as fas as I know) the only whois app which can explain why whois searches fail. For example, the app will handle a search for example.ar by explaining that the .ar registrar only allows web-based searches; on other apps this search would fail without explanation.&lt;/p&gt;
&lt;p&gt;It’s early days for this app, but I’ve got big plans: I want to build a domain information tool which is powerful and user-friendly. If you’re using Pocket Whois and would like to help shape the development of future versions, drop me an email at &lt;a href="mailto:support@pocketwhoisapp.com" target="_blank"&gt;support@pocketwhoisapp.com&lt;/a&gt; — I reply to everything personally. The same email can be used to get support, or to report bugs.&lt;/p&gt;
&lt;p&gt;If you’re looking for a simple, intelligent whois app for iPhone, you should &lt;a href="http://itunes.apple.com/us/app/pocket-whois/id440176512?ls=1&amp;mt=8" target="_blank"&gt;checkout Pocket Whois now&lt;/a&gt;. Thanks for reading :)&lt;/p&gt;
&lt;p&gt;[&lt;strong&gt;Get the app for free:&lt;/strong&gt; if you’d like to write about Pocket Whois on your website or blog, email me at the address above and I’ll arrange for you to have a free copy of the app for review purposes. All you need to do is post an honest review of the app on your website.]&lt;/p&gt;</description><link>http://www.jameswilding.net/post/10940085574</link><guid>http://www.jameswilding.net/post/10940085574</guid><pubDate>Sun, 02 Oct 2011 18:14:08 +0100</pubDate></item><item><title>Working On Elance</title><description>&lt;p&gt;For about a year now, I’ve been running my business through &lt;a href="http://elance.com/" target="_blank"&gt;elance.com&lt;/a&gt;. Elance is a web-based agency which connects freelancers with employers: most people there are hired on a project basis; Elance takes a percentage of project fees. Think of it as eBay for freelancers.&lt;/p&gt;
&lt;p&gt;I first read about Elance in &lt;a href="http://www.fourhourworkweek.com/" target="_blank"&gt;The Four Hour Work Week&lt;/a&gt;, and decided to give it a try as a place to hire people to work for me. As an experiment, I set up a profile to advertise myself as a freelance Rails developer, too. &lt;/p&gt;
&lt;p&gt;The hiring people thing didn’t go anywhere. The freelance thing? Well, that went pretty well.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Two Incomes, But Not In A Good Way&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Before I started using Elance, I was doing a mixture of website design and website development work (for the uninitiated, design work involves making websites look nice; development work involves making websites do cool stuff — think Facebook or Twitter).&lt;/p&gt;
&lt;p&gt;To be honest, the website design work was a bit of a nightmare. I’ve heard it said that website design is one of the worst freelance businesses you can get into, and after giving it a try I definitely agree: a combination of hundreds of bad designers, plus clients who don’t know how to recognise a bad designer, makes getting good work a nightmare.&lt;/p&gt;
&lt;p&gt;The website development work, on the other hand, was fun: interesting, challenging, and better paid. The thing was, I couldn’t find enough clients to make it pay full time. I’d tried job sites and direct sales, with some success, but I still had to lean on the crutch of that awful, boring design work: my business was split down the middle, and it was stressing me out.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A Very Un-British Confession&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;At this point, I’ll mention something quite personal (which we British don’t do often): for the past ten years I’ve had some serious problems with my health. Not life-threatening, but life-changing: something that stopped me doing a lot of the stuff I took for granted. I had to fit my life around my illness, to help me take control: freelancing became a necessity, not a choice — I needed the flexibility.&lt;/p&gt;
&lt;p&gt;When you’re sick, stress is bad. Stress at work is very bad, because we spend most of our time working. Stress with my design work was dragging me back into the state I was in five years earlier, when my illness was really bad — I hated it. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Starting Small &amp; Growing&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In September 2010, I got my first job on Elance. It was a small piece of work: basically a test, designed by the client to check I could do what I said I could do. I passed the test; the client gave me more work. Suddenly I was making money.&lt;/p&gt;
&lt;p&gt;Things really grew from there. I didn’t imagine I’d do as well as I have: clients appeared from nowhere (Elance’s reach is &lt;em&gt;amazing&lt;/em&gt;) and after about six months I was turning people away, taking my pick of the best clients and the best projects. It was, and is, an amazing situation to be in and I count myself very lucky.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It’s Not About The Money&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I don’t normally talk about money, but I’ve earned about $70,000 through Elance since September 2010. To most people that’s just a number, but five years ago I was too sick to walk, working a part-time office admin job where the manager treated me with zero respect — $70,000 in a year isn’t about money, it’s about progress.&lt;/p&gt;
&lt;p&gt;I’m sharing this to show that a turnaround is possible if you’re open to new ideas. Elance has (in some circles) a reputation as being a place to go to get bad work for bad money: I disagree. For me at least, it’s been transformative.&lt;/p&gt;</description><link>http://www.jameswilding.net/post/12558659068</link><guid>http://www.jameswilding.net/post/12558659068</guid><pubDate>Thu, 01 Sep 2011 00:00:00 +0100</pubDate></item><item><title>"This blogpost includes forward-looking statements within the meaning of Section 27A of the..."</title><description>“This blogpost includes forward-looking statements within the meaning of Section 27A of the Securities Act of 1933 and Section 21E of the Securities Exchange Act of 1934 […] It is uncertain whether any of the events anticipated by the forward-looking statements will transpire or occur.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://googleblog.blogspot.com/2011/08/supercharging-android-google-to-acquire.html" target="_blank"&gt;Google is buying Motorola&lt;/a&gt;, and I love how they use the small print of that announcement to say “predictions about the future might not come true”. Lawyers; don’t you just love em.&lt;/em&gt;</description><link>http://www.jameswilding.net/post/8958818959</link><guid>http://www.jameswilding.net/post/8958818959</guid><pubDate>Mon, 15 Aug 2011 19:13:50 +0100</pubDate></item><item><title>Photo</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lpylg03Y7R1qbnh5lo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;</description><link>http://www.jameswilding.net/post/8944887868</link><guid>http://www.jameswilding.net/post/8944887868</guid><pubDate>Mon, 15 Aug 2011 08:43:11 +0100</pubDate></item><item><title>Hyper 0.4.1</title><description>&lt;p&gt;&lt;a title="bug by staflo, on Flickr" href="http://www.flickr.com/photos/staflo/6006486584/" target="_blank"&gt;&lt;img src="http://farm7.static.flickr.com/6148/6006486584_7823fc9eef.jpg" width="500" height="333" alt="bug"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I’ve released version 0.4.1 of &lt;a title="Hyper on Github" href="https://github.com/jameswilding/hyper" target="_blank"&gt;Hyper&lt;/a&gt;, my Ruby framework for small HTML websites. This release fixes a bug that stopped Hyper from serving status assets (images, javascripts, stylesheets, etc).&lt;/p&gt;
&lt;p&gt;Install with rubygems:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ gem install hyper&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I’d love to hear feedback: check my “Hire Me” page for my email address (and if you’re wondering about the photo, it’s a bug!).&lt;/p&gt;
&lt;p class="footnote"&gt;Image from &lt;a href="http://www.flickr.com/photos/staflo/6006486584/" target="_blank"&gt;staflo on Flickr&lt;/a&gt;&lt;/p&gt;</description><link>http://www.jameswilding.net/post/8516148792</link><guid>http://www.jameswilding.net/post/8516148792</guid><pubDate>Fri, 05 Aug 2011 16:39:00 +0100</pubDate></item><item><title>Apple Wants You For Your Wallet, Google Wants You For Your Mind</title><description>&lt;p&gt;I’ve read a lot — a &lt;i&gt;lot&lt;/i&gt; — of Apple vs Google posts over the past few years, since Android was released. So many, really, that I’ve stopped caring who has the bigger market share and who makes more money. Both companies, both platforms (iOS and Android), seem to be doing pretty well. &lt;/p&gt;

&lt;p&gt;But let’s not confuse the issue: Apple and Google want different things. Apple want to sell their stuff to you; Google want to sell you to their advertisers. &lt;/p&gt;

&lt;p&gt;The whole “what’s more important, profit or market share” conversation is pretty much irrelevant: Apple are making a ton of money, Google are reaching more people. It’s a happy (if slightly uncomfortable) arrangement for both sides. &lt;/p&gt;</description><link>http://www.jameswilding.net/post/8437603213</link><guid>http://www.jameswilding.net/post/8437603213</guid><pubDate>Wed, 03 Aug 2011 20:29:53 +0100</pubDate></item><item><title>A Font For People With Dyslexia</title><description>&lt;a href="http://www.studiostudio.nl/project-dyslexie/"&gt;A Font For People With Dyslexia&lt;/a&gt;: &lt;p&gt;Check out the demo video, which explains the theory behind the font’s design. My brother and some of my best friends are dyslexic, so this naturally caught my eye.&lt;/p&gt;</description><link>http://www.jameswilding.net/post/8079032982</link><guid>http://www.jameswilding.net/post/8079032982</guid><pubDate>Tue, 26 Jul 2011 09:02:00 +0100</pubDate></item><item><title>Hyper: A Framework For Ruby Websites</title><description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/phunk/42516658/" title="Hyper by funkandjazz, on Flickr" target="_blank"&gt;&lt;img src="http://farm1.static.flickr.com/30/42516658_6479922fc6_z.jpg?zz=1" alt="Hyper"/&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I could have called this gem Yawf: Yet Another Website Framework. Do we really need one? I think we — or at least I — do, so I built it.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/jameswilding/hyper" target="_blank"&gt;Hyper&lt;/a&gt; is a micro-framework that supports small, static HTML sites with some Ruby magic thrown in. Its focus is on building and launching a site &lt;em&gt;fast&lt;/em&gt;: there’s zero configuration, no route definitions, and definitely no databases.&lt;/p&gt;
&lt;h2&gt;Why Build Hyper?&lt;/h2&gt;
&lt;p&gt;I could have used Sinatra or Rails for my personal projects, but I wanted something lighter. I wanted a framework that could take me from a standing start to a functioning website without any configuration (I’m impatient: even Sinatra’s &lt;code&gt;get '/url'&lt;/code&gt; route definitions felt like they were holding me back).&lt;/p&gt;
&lt;p&gt;Most importantly, I wanted the experience that comes from building something for myself.&lt;/p&gt;
&lt;h2&gt;Quick Start&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;$ gem install hyper
$ hyper new cool_site
$ cd cool_site
$ bundle install
$ bundle exec rackup&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Your new site is now live at &lt;a href="http://0.0.0.0:9292/." target="_blank"&gt;http://0.0.0.0:9292/.&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Magic&lt;/h2&gt;
&lt;p&gt;I want Hyper to hit the sweet spot between plain HTML (no Ruby) and dynamic frameworks like Rails. Routes are &lt;em&gt;automatic&lt;/em&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/        # maps to templates/views/index.html.erb
/about   # maps to templates/views/about.html.erb
/contact # maps to templates/views/contact.html.erb&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Because Hyper does this automagically, I can just drop my content into the correct file and move on. Every URL is handled in this way, and there are no exceptions: this behaviour covers 99% of my needs, and if I want something more dynamic I can use a different framework.&lt;/p&gt;
&lt;h2&gt;Helpers&lt;/h2&gt;
&lt;p&gt;Because this is a Ruby framework, you get a helper module: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# in lib/helper.rb
module Hyper::Helper
  def say_hello
    "Hello world"
  end
end

# in templates/views/hello.html.erb
&lt;p&gt;&lt;%= say_hello -%&gt;&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And because it makes sense to split HTML into layout and views, Hyper does just that: shared HTML lives in templates/layout.html.erb, and page-specific content lives in templates/views.&lt;/p&gt;
&lt;h2&gt;Fast Deployment With Heroku&lt;/h2&gt;
&lt;p&gt;Right now, Ruby developers have an amazing hosting service in Heroku: prices start at free and the platform supports any web app that’s based on Rack. Can you guess what Hyper is based on?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cd cool_website
$ heroku create
$ git push heroku master
-----&gt; Heroku receiving push
-----&gt; Rack app detected&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Boom: your website is now on the web.&lt;/p&gt;
&lt;h2&gt;Share And Enjoy&lt;/h2&gt;
&lt;p&gt;Hyper is &lt;a href="http://github.com/jameswilding/hyper" target="_blank"&gt;available on Github&lt;/a&gt; and via Rubygems: right now it’s is working great for me; I hope it works for you too.&lt;/p&gt; 

&lt;p class="footnote"&gt;Photo by &lt;a href="http://www.flickr.com/photos/phunk/42516658/" target="_blank"&gt;phunk&lt;/a&gt; on Flickr&lt;/p&gt;</description><link>http://www.jameswilding.net/post/7938901888</link><guid>http://www.jameswilding.net/post/7938901888</guid><pubDate>Fri, 22 Jul 2011 21:01:00 +0100</pubDate></item><item><title>The Edge Of Space Map</title><description>&lt;a href="http://www.edgeofspacemap.com/"&gt;The Edge Of Space Map&lt;/a&gt;: &lt;p&gt;Small site I build using the Google Maps API and &lt;a href="https://github.com/jameswilding/hyper" target="_blank"&gt;Hyper&lt;/a&gt;, my own framework for small static websites on Ruby. It’s pretty self-explanatory: a map shows you which parts of the world are further away from you than space! (Hint: space is closer than you think).&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.edgeofspacemap.com/" target="_blank"&gt;Check out the site here&lt;/a&gt;.&lt;/p&gt;</description><link>http://www.jameswilding.net/post/6139216521</link><guid>http://www.jameswilding.net/post/6139216521</guid><pubDate>Fri, 03 Jun 2011 12:23:13 +0100</pubDate></item><item><title>Sculptural rails!</title><description>&lt;img src="http://27.media.tumblr.com/tumblr_lm62i2dWrX1qbnh5lo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Sculptural rails!&lt;/p&gt;</description><link>http://www.jameswilding.net/post/6107651563</link><guid>http://www.jameswilding.net/post/6107651563</guid><pubDate>Thu, 02 Jun 2011 15:20:00 +0100</pubDate></item><item><title>Namespacing Core Extensions In Ruby Gems</title><description>&lt;p&gt;If you’ve spent any time developing your own Ruby gems or libraries, you’ve probably added some custom methods to Ruby’s core classes. This post is about the best place to keep these methods.&lt;/p&gt;
&lt;h4&gt;A Contrived Example With Parrots&lt;/h4&gt;
&lt;p&gt;Here’s an example of how I might extend a core class, and then use the extended class in my code. Imagine I’m building a gem called “parrot” which takes a string and repeats the string back to the user (it’s groundbreaking stuff):&lt;/p&gt;
&lt;p&gt;
&lt;script src="https://gist.github.com/976239.js?file=ext_example1.rb"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;This looks good: everything are well-organised, my core extensions are kept in their own files (named after the classes they’re extending), in their own “core_ext” folder. If I want to load my extensions to &lt;code&gt;Array&lt;/code&gt;, I know exactly where to go: core_ext/array.rb. Also I have a talking ruby parrot, which is cool.&lt;/p&gt;
&lt;p&gt;This setup is great 90% of the time, but that doesn’t mean we shouldn’t care about the other 10%: we could run into problems when the parrot gem is used alongside another gem which also extends &lt;code&gt;Array&lt;/code&gt;. Put simply, the issue is:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Both gems extend &lt;code&gt;Array&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Both gems keep their extensions in gem_name/lib/core_ext/array.rb&lt;/li&gt;
&lt;li&gt;Both gems use &lt;code&gt;require "core_ext/array"&lt;/code&gt; to load their extensions&lt;/li&gt;
&lt;li&gt;When both gems are used together, that require statement becomes ambiguous&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;In short, when both gems work together it may not be possible to say for sure which file &lt;code&gt;require "core_ext/array"&lt;/code&gt; will load (I’m assuming that the load path is setup to allow each gem access to the other gem’s lib folder: this is normally the case).&lt;/p&gt;
&lt;p&gt;I think it’s worth going the extra mile (or extra few lines of code) to preempt this problem. Here’s how I handle it:&lt;/p&gt;
&lt;p&gt;
&lt;script src="https://gist.github.com/976267.js?file=gistfile1.rb"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;I’ve moved core_ext/array.rb to parrot/core_ext/array.rb. By namespacing the file under “parrot”, I can avoid clashes with core extensions in other gems: &lt;code&gt;require "parrot/core_ext/array"&lt;/code&gt; will always load my core extensions (and another gem, if they’re taking the same approach, can &lt;code&gt;require "other_gem/core_ext/array"&lt;/code&gt; to load their own extensions).&lt;/p&gt;
&lt;p&gt;It’s a small change but one that — I think — makes for better-structured code.&lt;/p&gt;</description><link>http://www.jameswilding.net/post/6105872701</link><guid>http://www.jameswilding.net/post/6105872701</guid><pubDate>Thu, 02 Jun 2011 13:42:34 +0100</pubDate><category>code</category><category>ruby</category></item><item><title>The Hitch</title><description>&lt;p&gt;&lt;span&gt;
&lt;p&gt;The BBC’s Tim Weber on &lt;a href="http://www.bbc.co.uk/news/business-13343600" target="_blank"&gt;Microsoft’s acquisition of Skype&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The hitch: Microsoft boss Steve Ballmer will have to work hard to integrate Skype, to ensure the voice/video-over-the-internet company is not strangled by his firm’s notorious bureaucracy.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I remember when Skype was bought by eBay: I thought “there goes a great service”, but I’m still using Skype today — so I’m willing to give Microsoft a chance. But I’ve just recently had to use Hotmail, and I’m &lt;em&gt;really&lt;/em&gt; hoping none of those UI “innovations” get hammered onto my Mac Skype client.&lt;/p&gt;
&lt;p&gt;This is the way acquisitions work:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Business A builds something cool/useful/profitable&lt;/li&gt;
&lt;li&gt;Business B sees value in business A’s service&lt;/li&gt;
&lt;li&gt;Business B buys business A&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Normally this is great but sometimes that something cool/useful/profitable is a product of some unique circumstances at business A, which circumstances promptly cease to exist when business A is taken over (strangled?) by business B. Then the takeover is like picking a beautiful flower and watching it die: once you’ve got what you want, you loose it.&lt;/p&gt;
&lt;p&gt;In all honesty, I can’t see Microsoft doing anything more with Skype than eBay did (i.e., nothing). But I’m willing to lower my standards: I’ll be happy as long as a Bing search bar doesn’t pop up every time I make a Skype call to one of my clients.&lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;</description><link>http://www.jameswilding.net/post/6105854221</link><guid>http://www.jameswilding.net/post/6105854221</guid><pubDate>Thu, 02 Jun 2011 13:41:29 +0100</pubDate><category>software</category><category>technology</category></item><item><title>Twitter’s Tightrope</title><description>&lt;p&gt;&lt;span&gt;
&lt;p&gt;Twitter’s strength is that it’s cool. Twitter’s problem is that it’s cool.&lt;/p&gt;
&lt;p&gt;Although my tweets connect me to the whole world, when I use Twitter I’m&lt;em&gt;socialising&lt;/em&gt;. This implies privacy: Twitter as a whole might be just &lt;em&gt;a&lt;/em&gt; social network, but &lt;em&gt;my&lt;/em&gt; Twitter is a network I choose, a network I build: my network. My Twitter is something personal.&lt;/p&gt;
&lt;p&gt;Socialising is cool. Everyone loves it. Any place, person, book, film, album, or website that gives people an excuse to get to know other people is cool. Services like Twitter are the alcohol of the web: they matter because they give people an excuse to communicate. Like a cool club or a chilled-out coffee shop, Twitter’s popularity depends on people wanting to be there.&lt;/p&gt;
&lt;p&gt;Advertising is not personal; advertising is maybe one of the most impersonal things in our culture: to advertisers, you are a number; a calculation; an entry on a spreadsheet. Friends care that I like music because it’s what makes me, me; advertisers care that I like music because it means they can sell me music: replace me with a robot who’ll buy CDs, and watch to see if the advertisers care.&lt;/p&gt;
&lt;p&gt;This is where we come to the Quick Bar. The Quick Bar is not cool.&lt;/p&gt;
&lt;p&gt;If you’re not already aware, &lt;a href="http://dickbar.org/" target="_blank"&gt;the Quick Bar&lt;/a&gt; was introduced in the most recent update to Twitter’s iPhone app. It’s an over-obvious black bar that hovers over the top of the main interface and shouts out random trends and hashtags. Charlie Sheen has featured a lot recently — it’s about as bad as it sounds.&lt;/p&gt;
&lt;p&gt;The Quick Bar is pretty obviously a way to do two things: get you more involved in Twitter, and show you more ads. Both of these are ways for Twitter to make money: the ads for obvious reasons, and the involvement because the more you use Twitter, the more they know about you and the easier it is for them to target their advertising efforts efficiently.&lt;/p&gt;
&lt;p&gt;That might sound like a cynical, anti-capitalist assessment: it’s not. Twitter wants to make money, that’s fine: I’m happy for them to do that. I just don’t want their money-making efforts in my face; you can put adverts on the walls of your coffee shop, but don’t float them on top of my coffee.&lt;/p&gt;
&lt;p&gt;The Quick Bar fails because it’s a poorly thought out, impersonal intrusion on the social network of every single person who uses Twitter’s iPhone app. It’s as though the guy at Starbucks walked up and pushed ads in front of your face while you were drinking your coffee. It’s not just bad, it’s stupid: as a business decision, it’s probably the single worst thing Twitter has done for it’s iPhone users since the iPhone app was launched.&lt;/p&gt;
&lt;p&gt;Social networks tread a fine line. They offer a way for millions of people to create connections which are both personal and social, then they make money out of those connections in a way that’s inherently impersonal and antisocial. That’s not impossible, but it can be damn difficult, as Twitter is learning. Too little of the uncool advertising, and you make no money: your business fails. Too much of the uncool, and your users leave: your business fails. Tread carefully.&lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;</description><link>http://www.jameswilding.net/post/6105833658</link><guid>http://www.jameswilding.net/post/6105833658</guid><pubDate>Thu, 02 Jun 2011 13:40:16 +0100</pubDate><category>technology</category><category>twitter</category><category>usability</category></item><item><title>"Xoom, of course, will be able to play Flash relatively soon. The iPad 2 will never do it."</title><description>“Xoom, of course, will be able to play Flash relatively soon. The iPad 2 will never do it.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;span&gt;Preston Gralla on &lt;a href="http://blogs.computerworld.com/17907/motorola_xoom_versus_the_ipad_2_the_xoom_is_a_clear_winner" target="_blank"&gt;why the Motorola Xoom is “a clear winner”&lt;/a&gt; over the iPad 2. &lt;/span&gt;&lt;span&gt;Flash soon: is that a promise, or &lt;a href="http://gigaom.com/video/video-flash-on-android-is-startlingly-bad/" target="_blank"&gt;a threat&lt;/a&gt;?&lt;/span&gt;&lt;/em&gt;</description><link>http://www.jameswilding.net/post/6105813590</link><guid>http://www.jameswilding.net/post/6105813590</guid><pubDate>Thu, 02 Jun 2011 13:39:09 +0100</pubDate></item><item><title>The iPad 2: Closed Loops &amp; Cool Engineering</title><description>&lt;p&gt;Yesterday &lt;a href="http://events.apple.com.edgesuite.net/1103pijanbdvaaj/event/index.html" target="_blank"&gt;the iPad 2 was announced&lt;/a&gt;. Maybe you’ve heard?&lt;/p&gt;
&lt;p&gt;One of the many things that struck me as I watched the announcement of the iPad 2 was the fact that the iPad is now thinner than an iPhone 4. In fact, when I look at the iPad 2 side on it reminds me of an iPod Touch, which is just thick enough to avoid melting into thin air — and no thicker.&lt;/p&gt;
&lt;p&gt;So: a faster processor, good battery life, cameras, and a thinner body. Apple are very good at engineering.&lt;/p&gt;
&lt;p&gt;Apple’s strength, though, isn’t just that the company is good at engineering: it’s that they get to be good at engineering for a device that runs their own software. I think a lot of people overlook this when they praise Apple’s designs: iPods, iPhones, iPads, and Macs wouldn’t look anywhere near as nice if they had to accommodate a third-party OS. On Android, &lt;a href="http://www.apple.com/ipad/#smart-cover" target="_blank"&gt;the iPad’s Smart Cover&lt;/a&gt; would be a third party accessory: can you imagine an third party cover which caused an Android tablet to go into standby, automatically, when the cover was closed?&lt;/p&gt;
&lt;p&gt;Apple engineers operate in a closed loop: their hardware and software can work hand in hand because that hardware and software is developed hand in hand. The effortless, cool design of Apple devices isn’t an accident, and it’s not just down to the luck of having &lt;a href="http://en.wikipedia.org/wiki/Jonathan_Ive" target="_blank"&gt;Jonathon Ive&lt;/a&gt; on board: it’s the result of a very intelligent business decision. That decision? Hardware and software which work together should be developed together.&lt;/p&gt;
&lt;p&gt;Android — Apple’s most obvious competitor — operates in an open loop. Google develop the software: manufacturers develop the hardware. This isn’t to say that Android is in anyway a failure (although I don’t think it’s as good as iOS), but look at it this way: at Apple, the hardware and software guys work in the same building. Android hardware and software developers might work on different &lt;em&gt;continents&lt;/em&gt;. How can you get the same level of feedback and cooperation when your software developer works for a different company, in a different office, in a different timezone?&lt;/p&gt;
&lt;p&gt;Like I said up in paragraph four, &lt;a href="http://www.apple.com/ipad/#smart-cover" target="_blank"&gt;the iPad 2 Smart Cover&lt;/a&gt; is a great example of this. There’s no way that any combination of separate hardware and software companies could come up with anything like the level of integration found in the cover’s design: it looks simple, but it’s not. You can imagine long hours of conversation between Apple’s designers and developers about exactly how the cover would work: what strength should the magnets be? How sensitive should the auto-sleep feature be? (Should the iPad go to sleep as soon as the cover is closed, or should it wait for a second or two, to make sure that the user “meant” to close the cover?). Those aren’t conversations that &lt;a href="http://www.samsung.com/uk/galaxytab/" target="_blank"&gt;Samsung&lt;/a&gt; is having with Google.&lt;/p&gt;
&lt;p&gt;All of which brings me on to the most important thing: culture.&lt;/p&gt;
&lt;p&gt;There’s no doubt that Apple engineers and developers share a common culture, and that’s only possible in a closed loop. Open loop systems, like Android and Windows, don’t get to develop a shared culture because they don’t have enough to share. Windows has been dominant in the OS market for over twenty years, and in all that time we’ve never — not once — seen anything that even begins to quality for the description “Windows iPad”.&lt;/p&gt;
&lt;p&gt;Not all closed-loop systems work. Nokia has proved this in the past few years: they make their own hardware and software, but they’ve been run out of the high-end smartphone market by Apple and now they’re reduced to using Windows Phone 7. Good luck with that.&lt;/p&gt;
&lt;p&gt;Apple though, is lucky: they do it all. Hardware, software, a culture of excellence and attention to detail that turns out success after success. This is how great businesses are run.&lt;/p&gt;</description><link>http://www.jameswilding.net/post/6105785766</link><guid>http://www.jameswilding.net/post/6105785766</guid><pubDate>Thu, 02 Jun 2011 13:37:29 +0100</pubDate></item></channel></rss>

