Why are coding standards arse about face at times and other things from FotB day 2

One of the talks I went to today at Flash on the Beach was by Grant Skinner and it was entitled “Things Every ActionScript Developer Should Know”. It was an interesting set of programming tips, geared loosely toward AS3 developers. As is often the case for me at such talks, a small thing will often set me thinking and that is the detail I remember from the talk. On this occasion, Grant was talking about coding standards, and when to capitalize the first letter of a name, and when not to. Like me – and probably most people – he adopts the rule of classes are capitalized, instances aren’t. For some reason, Grant’s talk set me thinking though. Why do we do it this way around. Let me give you two examples of English language:

My Dad is capitalised; other dads are not.

Grant and Niqui were two of today’s speakers.

In English, instances of something are capitalized; the something isn’t. So what? Well to me it highlights how important a key point Grant was making is: there are no right ways in programming. As long as “classes are capitalized, instances aren’t” is consistently applied within your team, then it is a good rule. Oh and in case you are tempted to argue that if English does it a certain way, coding standards should follow, remember English gives us the insanity that is the spelling of though, through, thorough, bough and trough. So I’d argue that it doesn’t have a leg to stand on in dictating rules that coding standards should follow.

Another notable presentation today was by Niqui Merret on the topic of Accessibility. I was impressed with the talk, not least because she didn’t just present accessibility as making your apps compatible with a screen reader. She also touched on Braille displays, magnifiers, high contrast colours for those with poor vision and low contrast for those with dyslexia. Flex has accessible features turned off by default, and I know next to nothing about accessibility in Flash, so Niqui’s talk was invaluable to me.

Two days down and – so far – I’m more than happy with this year’s Flash on the Beach. There seems to be more developer-orientated content this year, and less arty “look at me and my pretty Flash-generated pictures; aren’t I clever” content. Roll on tomorrow…

Flex 4, Gumbonents and Thermo make for an awesome package

At Flash on the Beach 08 today (day 1), there was a session entitled ‘A Preview of Flex 4 and “Thermo”‘ by Mark Anders. After the disappointment over the total lack of any real early previews or “sneak peeks” at ReMix, this session really blew me away over what Adobe were planning with Flex 4, and – far more importantly – what they were prepared to reveal so early on.

One reason why I’ve been keeping an eye on Silverlight is Expression Studio and XAML. Microsoft have a set of designer tools that create design elements that can then be used directly within Visual Studio. Adobe have nothing like this, which is why Silverlight has been so interesting, and why I saw it having a reasonable chance of ultimately beating Flash. Why do I say Adobe has nothing like this? Adobe has an amazing range of design tools, but there is a complete disconnect between them and Flex. Flash Pro works with incomprehensible – to this developer at least – time lines and binary .fla files, which mean nothing in a Flex environment. Photoshop etc can be used to draw pretty pictures, which developers then have to re-engineer into Flex solutions etc. Flex 4 is set to completely change all of that.

It all starts with MXML, specifically a subset of it called FXG. Adobe have expanded MXML to include graphic primitives, animations etc, ie all the designer stuff that Flash Pro had, but that Flex lacked. Next, Adobe plan to provide support for FXG inside their various design tools. This means a designer can draw a pretty picture in Photoshop for example, and then export it as “code” that Flex can used directly.

Not content with FXG, Adobe have gone further with Flex 4 (or Gumbo as it is code named). Gumbo contains a bunch of components built on FXG, with the unofficial, but wondrous, name of gumbonents. These gumbonents can be skinned to the same n’th degree that Silverlight components can, and so Microsoft lose one of their precious few competitive edges.

Finally, just in case you thought that Adobe were happy to match the Silverlight/ Expression features, there is more. A brand new tool, codenamed “Thermo” ups the anti on Microsoft. This tool enables the designer/ developer to import say a Photoshop layered image, then to pick parts of the image and turn them into Flex components. In other words, it allows a team to work in a far more natural way, whereby the skin comes first, and the component – or “gumbonent” as hopefully they will become widely known – is created from the skin, rather than vice versa as is normally the case at the moment.

All in all, the session was amazing. To say I’m now excited by Flex 4 is probably the understatement of the year.

“HSL/ HSV: Blowing the lid on a designer secret” slides and notes

At the end of my five minute talk at ReMix 08, I said that I’d put the contents of my talk on my blog. It’s taken me a few days longer to get around to it than I’d planned, but here they are. As I’m a great believer in as few words on a slide as possible, I’ve added notes to each slide to explain them.

Front screen slide. There aren't really any words to go with this.
Introducing myself slide.
Introducing myself slide.

The introducing myself slide was simply some words to fill the screen whilst I explained where I was coming from with regard to talking about colour. Despite having worked in a range of software disciplines, from real time and embedded to parser creation to web development, there is an underlying theme to my career: GUI development. During that time, I’ve found RGB to be a complete pain in the proverbial, thus the reason for being keen on HSL.

Why RGB is Rubbish
Why RGB is Rubbish

If I’m going to say that RGB is rubbish and that HSL is wonderful, I have to justify these statements. Therefore we start with an example of me wanting to create a nice palette of colours for a website. The first real slide of the presentation started with the middle blue rectangle with RGB values of 79, 129, 189 respectively, which is my base colour. By successively adding 10% to each of the red, green and blue values, I can create the lighter blue rectangles. By successively subtracting 10% from each of the red, green and blue values, I can create the darker blue rectangles. That is the easy part.

The first four colours on the right hand side are an attempt to create the compliment colour by juggling the 79, 129 and 189 values around. The final colour of 189, 189, 79 sort of looks like it might work as it is yellow (which my “schoolboy art” memories tell me is the compliment of blue. The colours aren’t very nice though.

The bottom rectangle on the right hand side is the true compliment. I know this as I used HSL to obtain the compliment, rather than RGB.

Use HSL instead: a description of HSL
Use HSL instead: a description of HSL

HSL is an alternative way of representing the RGB colour model. It has three components as the “Use HSL instead” slide explains. Hue is the colour: red, yellow, blue, violet etc and can be viewed as the colours arranged on a colour wheel. The saturation is the amount of colour, ie 0 saturation is grey and 100% saturation is a pure colour. Finally lightness (also referred to as luminance) is how light the colour is, ie 0 lightness is black, 100% lightness is white and in between comes all the shades of grey and colour associated with the chosen hue.

HSL in action (Paint SHop Pro color chooser)
HSL in action (Paint SHop Pro color chooser)

It is difficult to visualise HSL just with words, so the next slide shows a typical HSL colour picker. It is the Paint Shop Pro one. Concentrating the the left hand side, the top half of the colour chooser has a colour wheel as previously discussed. This is the hue. The inside that, there is a rectangle that has 0 – 100% saturation going from left to right. The same rectangle has 0 – 100% lightness going from top to bottom.

With such a colour chooser, the trick of obtaining a compliment colour becomes trivial. If you look closely, you should be able to see a grey circle over the blue part of the left colour wheel. On the right hand side, the grey circle has moved 180 degrees, ie it is on the compliment hue. As the saturation and lightness have remained the same, I have my compliment colour.

This ability to obtain new colours that work well together by changing just one of the three H, S and L values is the key to HSL. For example, to recreate the range of light and dark blues from the previous slide, I need only add or subtract 10% from the lightness value, leaving hue and saturation alone.

yaflaColour - nice online HSL tool
yaflaColor - nice online HSL tool

The Paint SHop Pro colour chooser is all very nice, but very limited when it comes to creating colour palettes. Expensive designer tools like PhotoShop have good palette creation facilities, but it isn’t necessary to spend large amounts of money on such a tool. There is a great – free – online tool called yafla that makes creating colour palettes a breeze.

It is difficult to see the details on the slide, but across the top are the hue, saturation and lightness values. They are actually HSV values, which is subtlety different to HSL, but there was insufficient time to explain the difference during the presentation – see the last slide for more. Below that in the middle is a range of n-degree compliment colours (eg the true compliment is a 180-degree compliment, other colours such as 90-degree and 270-degree compliments then go well with the base colour). On the left and right hand sides, there is a lightness scale and saturation scale respectively. Finally along the bottom is a set of handy eye droppers. Dragging these to one of the colours on the page adds that colour to the palette box above it.

It is of course far better to use the tool than read my description of it, so I’ve supplied a link after the last slide.

Conclusion
Conclusion

In conclusion, it is worth reiterating  a basic software design principle: it is not necessary, and is often highly undesirable to have the functionality that is exposed to the user mirror the underlying implementation. RGB is a case in point here. There are very good reasons why computers work with RGB. There is no good reason why developers should work with RGB though. Work with HSL, then convert back to RGB when a computer needs to get involved, eg when creating a CSS file.

Final slide
Final slide

The final slide offered some links. Obviously I linked to here. I also provided a short url link to YaflaColor.

Lastly I provided a link to a useful article on wikipedia that explains HSL – and its cousin HSV – very well in my view. The difference between HSL and HSV is subtle and probably won’t effect you, but the article explains the differenc in case you want to know.

And that wraps up the presentation.

ReMix day 2

The second day of ReMix was a bit of a let down all round for me. I didn’t win the Ready Steady Talk event (not that I’d taken part to win, but it was a disappointment non the less) and the day’s talk agenda was poor. To cap it all off, the “sneak peeks” was totally devoid of any interesting previews of upcoming Microsoft technologies. The “sneak peeks” event was actually so bad, I left halfway through and went home. What possessed Microsoft to think I’d be interested in more tired old news about Silverlight, along with such things as an advert for an Xbox karaoke game, is beyond me.

The 20/20 talks were fun (these were a series of pecha kucha talks by some of the “community folk” and the conference presenters. This was the highlight of the day though. The low point was “Design with Microsoft Expression” by Arturo Toledo. As we all got a license for Expression Studio, I figured it would be sensible go along and watch a talk on how to use the tools. Arturo used some truly awful piece of software in place of slides, whereby the whole presentation was on a single “sheet” and he zoomed in and out and panned around  the thing in a way that left me feeling near sea sick. On top of that, he showed us how to draw a mouse icon with fancy shading and how add a spaceship sprite to a game. Not exactly useful when 4/5ths of the room were developers. In fact I learned more about Expression Blend from Scott Guthrie’s Silverlight presentations.

The Ready Steady Talk event was terrifying and great fun at the same time. I’ve previously only presented talks to small groups of up to 20 work colleagues, so to go from that to talking to a hall full of hundreds of people (many of whom paid no attention as they were trying to eat their lunch) was an amazing experience. I’ve definitely got the presenter bug and – having had positive feedback from Simon Harriyott – I may even do a talk at a Brighton Geek Dinner in the  future. Doing the talks also helped me with a problem I’d had at last year’s Mix:UK: it got me talking to people. The free Moo Cards provided a great way to swap details and I came away with around a dozen new contacts. Bizarrely, one of them was Andrew Shorten, an Adobe evangalist, whom I recognised due to him presenting the keynote at the London “AIR Tour” event.

I really enjoyed Mix:UK last year. I was far less impressed with ReMix. This isn’t a criticism of the event organisers though, as the venue was better and things were very well organised. My criticism is with the content. There was very little new information and it’s technical level was very basic. Last year, I knew little about a number of the technologies Microsoft presented and so I learned a lot. This year, many of the topics were the same, and almost all that was new since then had been covered by other Microsoft presentations. It’s a good event, but having been twice, I feel it’s an event that is only worth visiting once. I do not see myself returning to the Mix next year therefore.

ReMix 2008 Day 1

Last year, at Mix UK, the keynote was a truly dull affair, focusing on telling us about things that had been public knowledge for weeks, if not months. Scott Guthery’s part of this year’s keynote was unfortunately more of the same. It was all about .NET related technologies that were released weeks ago, with some vague “coming soon”, “next few weeks” etc comments regarding the release of Silverlight 2. Interestingly though, Scott did later on in the day imply – and its completely my fault if this is wrong – that a release candidate is due out this month, with the release to follow in October.

Bill Buxton’s half of the Key Note was a real breath of fresh air. Whilst I’m not completely convinced by the case he put forward, he came across as a man who was passionate about things because they were great, not because they were the latest Microsoft thing. When the head of R&D at Microsoft tells you that he loves the iPod, Google and the Wii, you really do need to sit up and listen. He basically argued that to survive, companies these days need to heavily invest in design and that they need to design for the experience, not just design the product.

With my sceptic’s hat on, I have to say that Bill’s speech did at times sound a bit like design is this year’s innovation. In recent years, companies have jumped on the innovation bandwagon, creating Innovation Manager posts, claiming they are innovative companies etc. This year, it seems that suddenly we all now need directors of design/ chief design officers.

With my sceptic’s hat removed, I have to confess that I bought a copy of Bill’s book, Sketching User Experiences, and fully plan to shove it under the noses of Enigma’s management when I’ve read it.

UPDATE: it turns out that even with my sceptics hat on, my views on Bill were good compared with others. Take a read of this very well written counterpoint to my take on the keynote. Thanks to Jon Paul Davies for linking to this article and so drawing my attention to his piece.

Of today’s sessions, the one that really stood out was on Virtual Earth. As the latest version has been delayed, those of us that attended the session had to sign a non-disclosure agreement regarding what we were shown. I obviously can’t say what was in it therefore, but I will say that the release – when it comes – contains some really nice new features.

One “what a small world” occurence for me today was discovering that a good friend and close neighbour, Matt Tompsett, was working at ReMix doing the radio trunking (which basically means he programmed up some weird looking hardware that controls fancy multi-channel walk talkies). Also, I need to give a shout out to Adeniyi Ibironke. He occasionally reads my blog and sought me out to introduce himself. Whilst many of the folk that read this blog and current and former colleagues, there are a few strangers that read it too. It was therefore really great to meet one of those strangers in “real life” therefore.

The highlight of the day for me though was definitely the Ready Steady Talk event. I as expecting to talk to a fe dozen people in a small room. Instead I as on stage in the main hall at lunchtime, with hundreds of people around, doing my five minute talk. I messed up bits of it, but did well enough to get through to the final tomorrow.

Fly to New York and buy your software; it’s cheaper than buying in Britain

It’s a well know “fact” that US software companies rip off British consumers. But is this “fact” real, or just a self-perpetuating myth? Does the cost of importing software into Britain account for the difference in price?

I have conducted some research, and not only is it fact, the scope of the rip-off is mind-boggling when the license price is high. Continue reading “Fly to New York and buy your software; it’s cheaper than buying in Britain”

I’ve caught the twitter bug!

I signed up to twitter months ago, in fact just before Mix 08 (March I think.) The idea at the time was to keep track of announcements as they were made, rather than waiting for blog posts to appear. It really didn’t work out the way I wanted it to, and the web interface was clunky, so I abandoned it.

This weekend though, I decided to revisit twitter. There are a number of desktop twitter apps available, but many seem to show all twitters, not just those from the people you follow. And those that do allow you to filter on your follow list – such as Snitter, Spaz and Twhirl – all seem to be based around Adobe AIR. I’ve nothing against AIR, but the Adobe website has been playing up all weekend and I couldn’t download the AIR runtime, which is a complete show-stopper when it comes to running AIR apps.

I then stumbled across Witty, which is a .NET/ WPF twitter client. I downloaded it and it runs just fine. So I’m now equipped to experiment with twitter for a couple of weeks, to see if it suits me.

If you are a twitterer yourself and wish to follow my random ramblings, the username is DavidArno. If you haven’t tried twitter before, head over to my page and have a read of the small number of people I’m currently following to get an idea of how it’s used.

A new take on word art: Wordle

I am an irregular listener to the Java Posse podcast. One of the things they have on the show is the “Java App of the Week”. The current show featured Wordle. The idea is that it reads an RSS feed and then generates a word cloud based on the words used in that feed. You can then play around with font, colour and text orientation, before saving it to the Wordle gallery. Here is what I created from the davidarno.org RSS feed:

Fun, if somewhat pointless 🙂

Bletchley Park thrown a $100,000 life-line by IBM and PGP

colossusBletchley Park is a name that should make every British developer squirm with embarrassment. For those unaware of the name, Bletchley Park estate in Buckinghamshire, England was bought by Admiral Sir Hugh Sinclair just prior to WWII and it became the home of wartime code breakers who successfully cracked the ciphers used in the German Enigma and Lorenz machines. The world’s first digital computer – Colossus – was built at Bletchley Park to decrypt messages sent via the Lorenz machines. It really isn’t possible to overstate the historic importance of Bletchley Park to the Software Development industry, especially here in Britain.

One could be forgiven for assuming that Bletchley Park must be a well-funded, well-supported museum of computing. One would be very wrong for such an assumption though. Due to the place being in private ownership – it was nearly sold to a housing developer in the 1990s – and the British government’s desire to keep its existence secret from the Russians after WWII, the site has slowly decayed and is now in such a bad state of repair, it doesn’t even qualify for a National Lottery Fund grant to repair the damage. Back in July this year, an appeal for £5,000,000 (just shy of US$9,000,000 at today’s exchange rate) was launched in order to restore the National Museum of Computing at Bletchley Park and secure its future.

The denotation of US$100,000 by IBM and PGP is in response to that appeal. Whilst it is great that these American companies acknowledge the historic significance of Bletchley Park to the computer industry as a whole, it strikes me as rather sad that Britain is having to rely on the USA to save Bletchley Park. So if you are a British developer, you could do worse than pop over to the National Museum of Computing website and make a small donation yourself.

Wild speculation on the future of Google Chrome and people power wins the day

Google’s Chrome continues to generate lots of media attention and wild speculation on its potential future and impact on the browser world. The wife and I took our four year-old daughter to the Natural History museum in London today, and I even found an article on Chrome in one of the free papers that get thrust at you everywhere you go after 4pm in central London. Rather oddly, they were comparing “the big three”, with Chrome being one of them. 😕

Anyway, of more technical relevance, here are two nicely juxtaposed artcles:

On a different note, there was much talk yesterday over the clause in the End User License Agreement (EULA) that claimed Google gained a non-exclusive right to do what they wanted with every bit of data you viewed through Chrome, as well as every bit of data you uploaded via Chrome. Unsurprisingly, such a ridiculous clause made a lot of people unhappy. The good news is that Google rapidly responded to that unhappiness and the clause has now been removed from the EULA.