Archive for the ‘i use tags, not categories’ Category

Learn to Type – Day 4

Thursday, July 15th, 2010

I had a day off work today, so i’ve only just come to do my 5-minute test just now. 88wpm, hands covered, not so good as yesterday, but i am really tired at the end of a lovely exciting day.

I think i’ll go do a few powertyping exercises, followed by a few rounds of typeracer. In the meantime, enjoy this video that Enrique made: it’s me and Tom playing typeracer yesterday lunchtime!

Type Racers from Enrique Comba Riepenhausen

I scored 102 words per minute, at 100% accuracy!!

Learn to Type – Day 3

Wednesday, July 14th, 2010

Wow, my 5-minute baseline test this morning was much better than the previous two days: 91 words per minute, hands covered. I got to the end of the story of the Foolish Frogs, and had to start again at the beginning!

Corey has encouraged us to set a goal for the end of the week. I will make it my goal to get to 100wpm on the 5-minute test. I feel that this should easily be possible by going at the speed that i am currently doing, but removing all the mistakes. This morning i managed the first minute without a single mistake, but the mistakes started to creep in after that. On my typeracer games i have noticed that a mistake costs a significant amount of time. It’s more effective to go a bit slower and think more, rather than rush ahead and make a mistake.

In my practice time I am continuing to learn to touch type numbers and symbols. I’ve found it very satisfying, just a single run through a lesson on PowerTyping.com is enough to set it into my head where a few more symbol characters are. The real test comes when i’m programming: can i find the parentheses when i need them? Curly braces? Where is that hash key? Do i need the shift key or the alt key, and can i find it without looking?

I didn’t do many rounds of typeracer yesterday, so i want to do a few more today. My fastest yet has been 109wpm but i’d like to push that up to 120wpm. Two words a second, consistently … that would be so awesome!

There have been some interesting conversations just lately about whether or not you have to touch type to be an effective programmer. Of course, you don’t, and i think we would be unwise to apply the sort of value judgements that imply any sort of eliteness or inferiority between those who touch type and those who don’t. The key word here is effectiveness. I recognise that many people are able to program very effectively without touch typing.

However, i believe there is always opportunity to get better at what we do. The questions to ask yourself are whether you feel you could be more effective at typing, and do you want to learn? With the tools we currently have, i believe the keyboard is the best interface between our brain and the computer, so it makes sense to use it to the best of our ability.

Oh my gosh, Frances has just made the most amazing double espresso EVER!! <3

Learn to Type – Day 2

Tuesday, July 13th, 2010

Ahh, yesterday was good. I did some exercises on powertyping.com particularly the numbers and symbols, which is what i’m especially trying to practise this week.

I was delighted last night when i managed to complete one round of typeracer at 99 words per minute with 100% accuracy! That is something for me to be very proud of! Now if i can just get to that accuracy and speed consistently, i will be very happy!

This morning i’ve done my hands-covered 5-minute test at FreeTypingGame.net and scored 76 words per minute, slightly slower than yesterday’s 78. I made more mistakes, particularly with quotation marks and exclamation marks.

Other resources we have discovered:
TypingWeb.com – typing lessons that save your progress. (only Qwerty)
aTypeTrainer4Mac – a Mac program to download and use offline.

Learn to Type Correctly Week

Monday, July 12th, 2010

The week has begun! Developers all around the world are making a conscientious effort to learn to type faster, more accurately, more effectively.

This is thanks to Corey Haines proposing a Learn To Type Week! Today we have been given our first instructions for Day 1: do a 1-minute, 3-minute or 5-minute exercise from FreeTypingGame.net with your hands covered over so you can’t peek.

I did the 5-minute test, writing the story of the Elves and the Shoemaker. I made a few mistakes, but i felt quite a smooth rhythm. I got 78 words per minute. That’s not too bad; it’s a nice baseline, something to build upon. In some of my typeracer games i’ve sometimes been getting to 100+ words per minute, so i’d love to be able to get there comfortably and consistently.

One thing i’m really trying to focus on this week is the number keys and symbols. I can touch type letters (on Dvorak keyboard layout) but when it comes to symbols i always have to look. I also need to learn once and for all to use both shift keys and not always to go to the shift key on the left.

Have a good week everybody! :)

760th day at Eden

Friday, July 9th, 2010

We have a new intern at Eden. Tom Crayford studies Software Engineering at Sheffield University and is doing a 2½ month internship with us, with the possibility of becoming an apprentice at the end of it.

In the style of Tom’s two recent blog posts, First day at Eden and Second day at Eden i thought i might also write about my day, since it was a particularly satisfying one. It just so happens to be two years and a month (760 days) since i joined Eden!

Straight after this morning’s stand-up meeting, I had a quick debrief of a meeting we had with a potential new client yesterday evening. Then i helped Todd to write an email. We draft our emails on Google Wave these days, which is often fun. Four of us were editing the email at once, which means we quickly get to something we’re all happy with before sending it.

I went out for a walk with Frances to pay in some cheques and buy some Friday Treats for everyone!

At lunch time some of us had several rounds of TypeRacer in preparation for Learn To Type Correctly Week next week! I think it’s incredible how so many people have got enthusiastic about learning to type well after Corey Haines announced it. If you don’t believe me, check the twitter hashtag, #learn2typewk!

Something quite unusual happened after lunch. We had a message from Richard Knoll at Mercia Cycling Club in trouble and needing help because the site was not responding. Richard had found us on Google after searching for Ruby on Rails. I agreed to look at it with Tom for an hour and see if we could figure out what was wrong. We determined that rubygems and Radiant had been upgraded on the server and we needed to tweak a few configuration files. With help from Chris and Spencer, the site was back within the hour! Chris then helped me to raise an invoice for an hour’s work.

It’s interesting that we can do anything from a fast restore of an unresponsive website, to projects that take several months from start to finish, requiring two or three pairs of developers working at a time.

Tom and i continued to pair together for the rest of the afternoon. We were able to add value to a project to help a charity in Cambodia. I always learn something whenever i pair with someone. Tom is no exception and i very much enjoyed pairing together today. We all have things we can teach each other.

Tonight i think i might learn a bit from the Ruby Kōans, possibly study a bit of SICP, and definitely see who gets evicted from Big Brother!

Mobile app development and the DRY principle

Monday, June 7th, 2010

I want to ask: what do people think of applications that generate code for Android, iPhone and Blackberry applications? The sort of “write it once, run it everywhere” dream. I’m talking about things like Titanium, PhoneGap and Rhodes.

I’m particularly interested in hearing from people who have developed for at least one mobile platform. See, when i first came across PhoneGap i was extremely excited! I thought it was an extremely good idea: it conformed to the DRY – Don’t Repeat Yourself – principle, and meant you only had to learn one framework and suddenly you could build applications that could run on multiple devices.

Since then, i have had a little dip into Android development using Java, and i’ve spent a week intensively teaching myself iPhone development using Objective-C. I’m no longer at all convinced that these DRY frameworks are such a good idea.

I’m an Android user and i don’t really have much experience with iPhones, so learning iPhone development means also learning the standard ways in which people expect iPhone applications to behave. And i realise that they are quite different from the ways in which Android applications are expected to behave.

For example: application settings. The standard behaviour in Android applications is to press the Menu button and choose a Settings option. In iPhone applications you generally press a little icon which causes the view to flip over to another view containing Settings.

Another example: application feedback. An iPhone application often pops up an alert with an OK button, but Android applications pop up a little message towards the bottom of the screen which fades away after a second or two and does not prevent you from doing anything else whilst it’s there. Alternatively, a background task may put a message into the notifications bar at the top of the Android screen.

Android users are used to the ‘long press’ to get further options. I don’t think that concept even exists for iPhone. Button sizes and styles are different. Android has tab bars at the top, iPhone puts them at the bottom. Android uses the physical ‘Back’ button but iPhone needs a button in a task bar on the application screen. I could probably go on if i spent more time thinking about it.

The point is, Android and iPhone have different user bases with different expectations. How do you cater for both in one development environment without reducing both to something kinda clunky and not very satisfactory for either? I imagine the interface differences between Windows Mobile, Palm, Symbian and Blackberry are even more pronounced than those between Android and iPhone.

I should look into Rhodes, PhoneGap and Titanium and see how they deal with these very different paradigms. But right now i’m very interested in hearing from people with more experience. At the moment, if i wanted to write something for iPhone and Android i’m thinking i would probably go WET – Write Everything Twice. What’s your take on it?

Looking forward to Scottish Ruby Conference

Wednesday, March 24th, 2010

I'm attending Scottish Ruby Conference

I’m now getting rather excited about Scottish Ruby Conference! Not least because i’ve never been to Scotland before! I’ll be travelling up with Chris, James, Steve (tooky), Tris and Enrique. We’ve hired a car and we’ll take it in turns to drive. I’m looking forward to beautiful views on the way and plenty of geeky chat no doubt! ;)

At SRC i will very likely talk to anyone who will listen about the delights of Linux Mint on my MacBook. I dual-booted it recently and i love using Mint for my everyday operating system. Sure, Mac OSX is nice, but i just feel right at home with Linux. Being a crafter is all about the tools you use, isn’t it? :) I’m planning a blog post soon explaining how to install it and configure it for a MacBook, complete with pictures.

Javascript BDD with Cucumber and Harmony

Thursday, March 18th, 2010

Inspired by tooky’s recent post Exploring Harmony for javascript BDD with RSpec i have become determined to become better at writing javascript in a BDD kind of way.

On Monday we were privileged to have Corey Haines visit Eden for the day. I paired with Corey for a couple of hours learning about BlueRidge for unit-testing javascript classes in a Rails application. I liked what i learned but i am disappointed by the need to maintain HTML fixtures. I would like to run the specs directly on my application.

I was pairing with Tris today and we really wanted to run javascript straight from Cucumber scenarios, so we had another look at Harmony. The first thing we noticed that it needed to load a file (rather like a fixture), which we didn’t like very much. We went to see how HolyGrail does it.

Maybe it’s because we’re using Capybara not Webrat, or maybe it’s because we did something wrong, but we couldn’t get HolyGrail to work right. However, a quick peek at the source code gave us a few clues. We pulled out and tweaked the following:

def js(code)
  @__page ||= Harmony::Page.new(page.body.to_s)
  @__page.execute_js(code)
end

This worked pretty nicely for a step involving simple javascript, like:

Then /^the page is titled "([^\"]*)"$/ do |title|
  js('document.title').should == title
end

It was actually pretty exciting when we first saw that working! On to something more meaningful …

  Scenario: Use javascript to hide a box
    Given I am on a page with a box that can be hidden
    When I use javascript to click "Hide"
    Then the box should be hidden

Clicking the link with javascript actually wasn’t hard:

When /^I use javascript to click "([^\"]*)"$/ do |text|
  js("$('a:contains(#{text})')").click
end

We used jQuery to find the right link and click it using Harmony. Harmony sends the ‘click’ method straight through to the javascript object, which is pretty cool.

Ensuring the box disappears was a little more tricky. For the moment we’re just checking that the contents becomes empty.

Then 'the box should be hidden' do
  js("$('.hide_box')").html.should be_nil
end

Sure enough, when we plug in the unobtrusive jQuery code to bind the click and remove the box, the feature passes! Alright, this is a very small step down a long road, but to me it is very exciting indeed!

Next steps: we have already begun writing a Capybara driver to run Harmony. So that we don’t have to write a separate step definition When I use javascript to click “Hide” but we simply use the standard When I follow “Hide” and we tag the scenario with @harmony to use the alternative driver. That will first attempt to click it with javascript and, if nothing happens, it will follow the link in the normal way. We will also use the driver to handle when the @__page cached copy gets refreshed.

An important next step is make it a proper integration test, interacting with the full stack, such as clicking something which triggers an AJAX request to the server which must run a bit of code and send the response back to the page. I can foresee this presenting some challenges, we’ll see!

Exciting things are happening, and this is just the beginning! Web development these days is all about standing on the shoulders of giants. This is only possible thanks to the great work already being done by Harmony, Johnson and SpiderMonkey. I’m hoping that other people will become inspired by the possibilities and take this further. Watch this space for more news!

Presentation of my apprenticeship task

Sunday, February 21st, 2010

Here is a presentation i made to some of my colleagues on friday explaining my first apprenticeship task, my wiki, how i went about it, the problems i encountered and what i learnt from the whole experience.

See my Apprenticeship task presentation on youtube.

Licky wiki news

Thursday, February 4th, 2010

Just a quick update on licky, my little wiki apprenticeship task i’m doing. I realise that time has gone on and i haven’t talked about it as much as i might, plus i actually have some quite encouraging news to report now!

Last time i wrote, i was just starting to work on Pages and a PageFactory to find them or create them as necessary. Since then i’ve added a persistence strategy which saves wiki pages to the filesystem. I pass the desired directory to the strategy so that test pages can be kept separate from real pages. This was necessary as i wanted to clear out the test directory every time after use and i didn’t want to accidentally delete real pages.

After that little burst of progress i stalled for a long time as i knew i needed to start writing the web interface and i didn’t know where to begin. James gave me a good idea which was to set up a simple Webserver class that would wrap around the web server of my choice. I have chosen WEBrick for the time being, but it shouldn’t be too difficult to swap in another one later, probably with another strategy pattern. James suggested i start by visiting a page and looking for the text ‘Hello world’. I thought this was a good idea and so i started finding out about WEBrick servlets.

With that start i was suddenly able to leap ahead, testing and implementing everything i need so that my wiki is now able to create, show and edit pages through the web interface. I feel as if i am very close now. Possibly the only thing left to do is add a way to link between pages and then i can truly call it a wiki.

Test driving the development of this whole project has been extremely educational. I know i started off getting too involved in writing a test framework, so Enrique pulled me back and made me think of the simplest thing that could possibly work. I began with one method: assert_equal. That was enough in the beginning. As time went on i added two more methods: assert_true and assert_contains. When necessary i added useful debugging information to report failures. At the appropriate time i refactored the testing framework into a module that could be included into multiple test classes.

I know i also started thinking about the web server too early. I started off trying to work with ERB and templates, as i am familiar with Rails, and in the end all i needed was a few servlets. As Enrique made me realise, the most important part of a wiki is not that it runs on a web server. The most important thing is content. Pages, with content, saved to a file system. Having focussed on that and got a real solid, well tested mechanism for saving and retrieving pages, i knew that the WEBrick servlets could rely on the underlying framework, and when the time came, it did not let me down.