Review: HTML5 Live from SitePoint

Posted at 11:18 on Thursday, 12 August 2010

ONLINE CULTURE SitePointFor the past 2 weeks, flu be damned, I’ve been taking the HTML 5 Live online course from SitePoint. Lasting a fortnight sans weekends, the point of it was to learn what HTML 5 means to web developers and how to actually use it.

I’ve always been very interested in the possibilities of online learning, probably due to an insatiable need to broaden my mind and a frustration at public schools and traditional ‘offline’ education, so I enrolled out of interest to see how SitePoint would approach it (and out of interest in HTML 5, of course).

At such an affordable price, enrolment for the sake of investigation was no big deal, either. You could participate in the course for a penny under $10 — substantially less than it would run you for an evening course at your local college or adult education institution (and understandably so).

The course itself was hosted by one John Allsopp and consisted of a series of guided videos, with articles to read in-between and live Q&A sessions with the tutor at the end of each week to discuss what was learned over the past 7 days.

As the first lesson became available, the first thing that stood out at me was the poor quality of the videos. The content was a different issue, but you could both see and hear that the recorded narration was done so with an iSight webcam on a MacBook and nothing more. Not even any pleasant lighting to speak of.

Seeing the presenter is, of course, not the most important thing in the world, but it would have helped to immerse myself in what he was saying. There is a definite logical parallel between these and delivering lectures at a university, but these videos of a guy in his kitchen were simply not up to scratch and could not compete with that experience. The videos were even hosted on YouTube and embedded on the SitePoint site, which just felt lazy and detracted from the self-contained, tailored-for-me experience I would have liked.

As I say, the quality of the video recording isn’t entirely indicative of the quality of the actual content — that was a different story altogether. John, the presenter, was clearly very knowledgeable on the topic (assuming he had prepared the content himself, which I’m sure he did) and boasted some decent credentials. On top of having an awesome Australian accent, his tuition was very well paced on both the micro level, as his videos went into just enough detail; and the macro level, as the course didn’t attempt anything too ambitious with the 2-week timeframe.

The course was, I think, perfectly targeted to me as an “advanced” developer. There were many assumptions made in the planning of this course as the tone jumped very quickly to the importance of semantics — specifically the new features of the HTML 5 spec and their relation to semantic markup. To you and I, this is a perfectly logical way to direct the topic of the course. However, there are people I know personally to whom semantics mean very little. At their level of understanding good markup, lots of the course content would be completely lost on them.

It was not, as I had feared, just capitalising on Apple’s decision not to support Flash in favour of HTML 5. There was actually very little about video and media support at all, which was great. I even learned some new things about HTML 5 which was surprising, as I was expecting a very simple course from the outset.

The mix of video and written materials was nice, which helped to closely mirror traditional learning paradigms; like being assigned a textbook chapter to read. Although the accompanying articles were a little “chatty”. Feel free to have a one-sided conversation with me through video, but when writing educational technical content it didn’t feel right to read something so informal.

If the problems with the entirely unprofessional-looking videos could be rectified to bring me into the content a little more, I have no doubt that this new online paradigm of learning could be a big deal. I would love to see someone attempt a fully “live” (i.e. not pre-recorded) course over the ‘net with more traditional timing — I don’t think self-paced is the only way to go here.

A companion course on the topic of CSS 3 is also starting soon and was available at a discount bundled with this, the HTML 5 course. I have enrolled in that also, and I sincerely hope that because of the visual nature of CSS, video is employed in a much more effective manner.

This is a good start for online learning from SitePoint — a company whose audience is highly technical and likely to be more receptive to the idea than other groups — but honestly, some polish to the experience would go a long way. If charging me more for more value is what it takes, go ahead. With such aggressive pricing, they’ve got a lot of wiggle room to offer more of a ‘premium’ tuition experience.

It was a fun, new way of learning; but I’d rather drop 10 bucks on a book. SitePoint: Charge me more and give me more, you’re onto something cool here.

Tagged as: html5, online, learning, education, sitepoint, course

I love the smell of anti-static packaging in the morning

Posted at 11:32 on Wednesday, 11 August 2010 — with 1 comment.

TECHNOLOGY It’s been many moons since I’ve got my hands dirty with thermal paste and actually built a computer from scratch. It’s something I used to do very frequently in my school days but over the past few years I have, for myriad reasons, neglected this age-old geek pastime.

So last week, no doubt as a result of my recent competitive PC gaming kick (I’ll be competing at WiredOut III in Reading next week — but that’s a story for another blog post) I decided to pick up the credit card and spec out a brand new PC. For a long time, my main home machine has been a 20", 2.4GHz dual core iMac. However, while I continue to admire Apple’s computers, there is sometimes a need to ignore industrial prowess, ease-of-use and general design excellence in favour of raw, cost-per-gigahertz. Plus, it’s really fun constructing these, plugging them in and taking cover as you begin the inaugural boot-up from afar.

Because I know at least one person cares, and before I instigate yet another Mac vs. PC argument, I thought I’d lay out what exactly what is in this machine, why I chose those parts and what I paid for them.

Processor: Intel Core i5 750 — 2.66GHz, 8MB L3 Cache

Apart from the next-up-the-line Core i7 from Intel, is there really any other option? AMD sure aren’t putting anything exceptional out onto the market. The i5 750 is a very affordable chip boasting 4 physical processor cores, but without the HyperThreading offered by the more expensive i7 — which essentially offers eight virtual cores spread across the same physical four.

The Core i5 750 famously overclocks like a beast, given appropriate cooling. It can even accelerate itself to 3.2GHz (up from it’s stock 2.66GHz) in “Turbo Mode”. £160 well spent.

Memory: 2GB Kingston DDR3 1600Mhz

Ah, good old Kingston. Always very affordable (further evidenced by an offer for a 6GB (3×2GB) bundle I saw yesterday for a mere £10 more than the £49.99 I spent — grrr), yet I only picked up a 2GB stick here. I do plan to add some more later down the line.

Motherboard: ASUS P7H55-M H55 (Socket 1156)

HDMI-out, built-in 8-channel audio and yet only one 16x PCI-e slot. No room for a second GPU, but works well with the aforementioned Turbo ability of the Core i5 and is very overclock-friendly. Good deal for £61, I thought.

GPU: PALIT 9800GT 1GB

I must confess, being away from the hardware enthusiast circle for so long has resulted in being severely out of touch with what is the most important component in a hardcore gamer’s arsenal: the graphics card. I had to get recommendations on this, but the 9800GT seemed to get a reputation as only a slight upgrade from the 8800GT. However, at £78, the consensus seemed to be: “Get it!”

Chassis and Power: Casecom Black Mid Tower Case (with side window) & Arctic Power 500W PSU

I pussied out here. I found the cheapest case that didn’t look like utter crap (£19) and a fairly average output power supply (£28) — although I made sure to get a reputable brand, after my last machine died of a bad case of PSU-exploding-itis.

All the other crap:

It all came to a grand total of around £450 including shipping. I saved some bank by reusing the 20" 1680×1050 LG monitor (which I love) that is currently tasked a second display to my iMac, as well as using the same aluminium Apple keyboard and Microsoft Intellimouse 3.0. The one problem with this resource sharing is that I NEED a KVM switch so that I may switch my focus between PC and Mac with ease, and not have to plug and unplug mouse, keyboard and display cables every time.

But I don’t just need any KVM switch. I need a mystical form of KVM switch that seems to be as elusive as unicorns, the Easter Bunny or Jesus. Is it so difficult to make a KVM switch that can seperately switch the focus of the Keyboard, Video and Mouse!? Sometimes I would like my display to operate as a secondary monitor to my iMac, sometimes I would like it to operate as the sole monitor to my PC (but still easily control both machines at that point). It’s not rocket science… is it?

Regardless, I’ve ordered a simple USB KVM switch to at least make my life a little easier until someone solves this problem which is apparently complicated to the magnitude of an infite Rubix cube.

Anyway, that’s my thing done. It was totally fun building this PC, and it runs like a ninja slicing a katana through butter on the moon. Whatever that means.

Tagged as: windows, computer, tech, custom, build, geekery

How the BBC Criminalises the Poor

Posted at 12:00 on Monday, 02 August 2010

POLITICS From the recently published ASI report, Global Player or Subsidy Junkie? Decision Time for the BBC; a quote that really stood out to me:

“I have for 20 years had the difficult task of sentencing TV licence defaulters, followed some months later by the often hopeless task of fine enforcement. Unlike other offenders, TV licence evaders are predominantly female, many of them benefit recipients with children. The majority are single, struggling to keep their families financially afloat.”

Public service indeed.

Tagged as: politics, bbc, rants, opinion

Microsoft and The Metro Design Philosophy

Posted at 10:09 on Wednesday, 28 July 2010

TECHNOLOGY Even if you’re not planning any forays into Windows Phone 7 application development, anyone at all interested in the science of design will find a lot of value in reading over at least the first part of the recently published Windows Phone 7 UI and Interaction Design Guide. It really goes into the detail behind what the Metro design language — that I’ve become so intrigued with as of late — means to the product and to the team.

Metro design interfaces embody harmonious, functional, and attractive visual elements that encourage playful exploration so that the user feels a sense of wonder and excitement. A clear, straightforward design not only makes an application legible, it also encourages usage and can lead to delight.

Tagged as: microsoft, windows, design, windows phone, ui, typography

Stop Refactoring your Damn Tests

Posted at 22:05 on Wednesday, 21 July 2010

PROGRAMMING A Ruby developer writing about testing? And writing about how he thinks it should be done!? What a shocking turn of events!

red, green, refactor!Test code exists to achieve, most importantly, two things. Firstly, to serve as an automated, low-level quality assurance. It’s used to passively weed out bugs and performance bottlenecks in your actual implementation so your team can feel a little more confident in their release — and in the case of libraries, to make the users feel the same.

Secondly, perhaps as a happy side-effect of writing tests for QA purposes, test code provides a great way to familiarise outsiders with your code by providing concrete examples of usage that actually work. The sweet little syntatic sugar provided by testing libraries such as RSpec allows you to recite a short example of how to use your code, and what the expected outcome is. Take, for example, this quick assertion. With a glance, I know that an Account has a method money_owed which should return a Float.

@account = Account.new
@account.money_owed.should == 1_213.94

For your test suite to work as a good QA robot and a friendly doormat, it needs to be:

  1. Working; lest you receive false negatives or positives when running it,
  2. Readable; lest the new guy on your team takes days instead of hours to acclimate himself with your test suite.

I’m sorry to say it, but these criteria can be easily broken by refactoring. As you are probably well aware; by the very nature of refactoring, generalising, and generally DRY-ing up any code you obscure what’s happening to some degree. As ugly and inefficient as it would be, you’ll understand much quicker when presented with 8 nearly-identical lines of code as opposed to a function that spits out other functions which then proceed to dynamically invoke a method based on a string fetched from an external environment-dependent configuration file.

And that’s good! Your implementation code should be clean, modular, readily extensible and with as little complexity as you can prevent. In many cases, like that of the nested if/else ladder that rolls 6-levels deep which gets transformed into a nice polymorphic block, refactoring can actually make things more readable.

So why am I railing on refactoring test code for killing readability? Well for one, your test suite is unlikely to have any branching conditions — that would kind of defeat the point. In order to do it’s job well, your test code needs to be simple, concise and definitely not complex. Sometimes in the process of adding functionality to your app your enthusiasm for making a great product can outrun your housekeeping ability, resulting in messy code — and that’s OK, you just return later and refactor it — but since there’s no new functionality being built into your test suites, there’s no real excuse for the code becoming a mess. There shouldn’t be anything to refactor.

No longer would your tests be prime examples of what should happen, but just a chance to show off how you can drop a class_eval to reuse these tests for other classes or modules — something that will require a lot of backtracing just to understand what your test suite is illustrating for a new developer — or maybe even yourself a few years down the line.

“OK, so I guess it can make my tests unreadable… but break them?”

You bet your ass it can break them. Your tests are most effective when they are applied against chunks of code that are a little more daring (for lack of a better adjective) than usual. Like the trapeze artist who prefers to leap through the air at the circus rather than sit in the stands munching popcorn (or some other analogy that doesn’t sound so dumb); good, maintainable code usually employs ‘daring’ techniques like long-winded inheritance trees and metaprogramming which could do with a bit of a safety net to warn you if your new, clean implementation isn’t behaving like it should. As such, you need to be able rely upon and trust your tests to do their job.

If you use the same ideas that you do to clean-up “real” code in your test code, doesn’t that tease the possibility of having to test your tests?

Instead, keep it high-level. Stick to the constructs provided to you by your choice of testing framework; chances are, they’ve already been tested themselves. My beloved RSpec, for instance, exposes some extensions to the lambda which enable you to assert changes in state as a result of a block of code:

@account = Account.new(:balance => 1250)
lambda {
  @account.deposit(3000)
  @account.give_dividend(2500)
  @account.withdraw(500)
}.should change(@account, :balance).by(5000)

The next time you find yourself writing test code, take a step back for a minute and decide if you’re going too far. If there is even a possibility that your tests could warrant their own test suite, I think you know what you need to do. If ever there was a code smell to trump all code smells, that would be it.

So please; for me, your team and for yourself, stop refactoring your tests to the Nth degree. Remember the two main reasons for which they exist in the first place — keep them readable, keep them reliable and let them do their job.

And above all else, test all the fucking time.

Tagged as: programming, rant, ruby, testing, bdd, rspec, refactoring

Photo of Edd Morgan

Edd Morgan is a software developer, amateur photographer, armchair critic, atheist and lover of all things technology.

Twitter @eddm

I'm at YO! Sushi (The Oracle Centre, Reading). http://4sq.com/a4FjHJ

1 day ago

That's my Jam

Bonobo
 - Black Sands

Flickr

Flickr Photo Flickr Photo
Flickr Photo Flickr Photo

Syndication