Book Review: Beautiful Code

Beautiful Code, subtitled ‘Leading Programmers Explain How They Think’ is a collection of thirty plus essays by some of the top programmers around today. names like Charles Petzold and Brian Kernighan should be recognisable to any developer but many of the others may be less familiar but nonetheless have much to offer.

It’s also worth noting that all royalties from this book go to Amnesty International so hats off to all concerned for their generosity and efforts.

As the title suggests, this book is about code. It can be beautiful in any number of ways and each contributor explores a particular subject and provides code examples to illustrate a language construct, algorithm or principle that they hold to be beautiful. As an example of the developer’s craft at its finest, this book can’t help but impress.

Where it falls down somewhat for us is that much of the subject matter is rather esoteric and I suspect the majority of developers will go through their entire career without needing to worry about summing the bits in an arbitrary word. Self-taught programmers without the benefit of a Computer Science degree will probably struggle with much of the content but perhaps that’s not entirely the point of the book.

Firstly, this is most definitely not a book for reading through at the same pace you would most programming guides. The ideas, the code and the concepts usually require much thought and analysis on the part of the reader to really appreciate. This reviewer has twenty five plus years of commercial developer experience across dozens of languages and I found much of it pretty dense. It also gave me my first exposure to languages such as Haskell and MATLAB.

Even if much of the content may be somewhat heavy, what is far more accessible, in the main, is the discussion that accompanies it where the programmers describe their thought processes, reasoning and techniques for solving the problem. Here there is much great wisdom and for this alone, the book deserves close scrutiny.

Some of the simpler code examples were a revelation and it was astonishing to find a fully functional regular expression processor in a dozen or so lines as presented by Brian Kernighan. This was indeed beautiful code, compact yet still readable. As someone else noted, the art is not just knowing when to stop adding code but also when to stop removing it.

It’s certainly no lightweight book at 560 plus pages and it takes real effort to read although the nature of it means you can dip in to any chapter at random, following whatever interests you.

If you want to take your mindset as a developer to the next level, this is a good book. It’s also an interesting insight into certain programming problems and their solutions. You may also want to buy a copy just to support Amnesty International.

I would suggest though that this is a book you should browse at the bookstore first to be sure it’s something you’d enjoy although I’m confident that for many developers, it will be.

Book Review: Introduction to SQL Fourth Edition

Introduction to SQL is now in its fourth edition and this time around proudly displaying a 20th anniversary edition monicker. Weighing in at a shelf worrying 1000+ pages, it aims to provide everything you need to know about SQL from both the data manipulation and database creation angles.

The author, Rick F. van der Lans is well known on the lecture circuit as well as being an author and running his own consultancy at www.r20.nl.

After the obligatory introductory sections, the bulk of the first half is taken up by the SELECT statement and how to use it. The sample database used for all examples is based around a tennis club and serves to provide clear examples of how the SELECT statement can be phrased to produce different results.

Introduction to SQL covers all the expected areas including different types of join, null handling, subqueries and all the various aggregation and grouping variants. Being fully updated, it also includes newer features such as ROLLUP and CUBE that are becoming increasingly commonly used to analyse large datasets.

Most examples consist of SQL code, resulting rows and an explanation of what happened and why. Sometimes the author provides more than one way of doing things to show the pros and cons of each and there are the occasional Q&A sections to check understanding.

The book claims to cover SQL Server, Oracle, DB2 and MySQL but I found most of the code to be generic with only a few boxouts to cover alternative syntaxes. The style is rather dry and humourless which you may or may not prefer – certainly some IT books go too far the other way these days with pages of inane chatter. No such problem here.

The next section is a fairly short discussion on manipulating data – deleting and amending. This is only reasonable though as the bulk of difficulty in these areas is getting the SELECT part right. After that it’s on to creating database objects

Table and index creation, keys, constraints and views get fairly thorough coverage although I’d have liked a little more on referential integrity. I was pleased to see a good section on stored procedures which often get ignored in SQL books unless they’re server specific titles.

Another area that was welcome was the use of embedded SQL in other languages. Many developers will be using this method of access almost exclusively so this section plus the ODBC coverage will be of great help. The book also covers transactions and multi-user issues of which the latter is especially important. There is also some examination of Dynamic SQL and the important role of cursors when working with SQL in a programming environment.

The book finishes off with 3 appendices providing a reference to SQL syntax and a bibliography. A useful bundled CDROM containing a copy of MySQL 5.07 plus WinSQL a GUI front end so you can try the examples at home.

On balance I thought this was a good title, both as a tutorial and as a reference because of its fairly exhaustive coverage of all options. If there was a bit more on database design practices and building in data integrity, it would be a great book. Whether you’re new to SQL or need a useful memory jogger and reference, Introduction to SQL would be a good choice.

Book review: Digital Retro – Gordon Laing

Another reprint of an old review from PCBookReview.com

People of my age grew up during one of the most exciting periods in computing history. Computers were just moving from the business world of mainframes, time-sharing and minicomputers and in to the domain of the personal user. For the first time, it was feasible for a member of the general public to get their hands on a real computer and to be able to do new and exciting things with them. The roots of this movement can be traced back to the mid 70’s and the MITS Altair 8800 which could be bought in kit form or pre-assembled. Of course, others, especially at the Homebrew Computer Club in Silicon Valley were working on their own home made devices for no other reason than they could.

From these humble beginning, a huge industry was spawned that produced multitudes of different computers, none of which were compatible with each other the way the ubiquitous PC is today.

Anyone who was involved with microcomputers between the golden years of 1975 to around 1990 will remember the intense rivalry. Were you a Speccy fan or a Commodore C64 user? Were you allied to the Atari ST or Commodore Amiga? Did the Atari 800 or Apple II impress you?

Digital Retro by Gordon Laing draws on his regular retro column in the sadly now defunct PCW magazine and brings together some 44 machines, including key games consoles, that were released between 1975 and 1988. Along the way you can read about the Commodore Pet, BBC Micro, Oric 1 and Dragon 32 as well as lesser known or vaguely remembered machines such as the NASCOM 1, Tangerine Microtan 65, Jupiter Ace and the ill fated Mattel Aquarius which has the dubious distinction of having the shortest period on the market, being withdrawn after just 6 months.

Each machine gets an ‘overview’, ‘a company history’, ‘did you know?’ and what ‘happened next’ sections along with all new photography of each machine. This makes a nice change as many machines are always documented with the same old tired images. The new ones are often large, high quality and in many cases show how the machines have fared over the years – the PET had a few rust marks!

The text is fascinating and full of interesting snippets. I found the background information particularly absorbing, especially on some of the less well known machines. Gordon Laing has managed to interview a great many industry names including various Tramiels, Chuck Peddle and Joe Decuir and it shows in the resulting insights.

I noticed one typo where the Atari ST’s special features had been repeated for the Acorn Archimedes which was a pity but otherwise everything seemed accurate.

The machines are presented in release date order providing an interesting overview of computer development during the period. A side effect of this is that some machines appear so glaring underpowered compared to their peers that one has to ask ‘why did they bother?’. You may also do a double take on the original IBM PC – a cassette port?

Naturally there are some gaps, mainly due to a lack of example machines in good enough condition to photograph or simply for space reasons. I would have liked to have seen the Enterprise 128, Sord M5 and the almost unknown DAI which I seriously considered against the Atari 400 when I was looking for my first computer back in 1980.

Conclusion

Overall this is a fine book and Gordon Laing is to be congratulated on the breadth and accuracy of the material it presents. The all new photography is the icing on the cake. I can only hope that an expanded edition or a volume 2 appears at some point to mop up the remaining machines from the golden age of home computing.

Book review: The Myths of Innovation – Scott Berkan

I used to run a web site that featured reviews of IT/photography related books. It’s gone now but I thought I’d put the old reviews up here in case anyone finds them useful. Here’s the first.

We’ve always been led to believe innovation comes from super-talented people or small focussed teams having a eureka moment. Alas, the reality is all too often rather less romantic. Scott Berkan has produced a thought provoking new book on the subject that aims to clear away all our misconceptions about innovation and provides some new insights along the way.

What the book isn’t is a tutorial or magic bullet that will help you unleash a torrent of brilliant ideas. Instead, the author takes us on a fascinating journey through history providing background, stories and advice on what not to do and which supposedly tried and tested methodologies are in fact nothing of the sort.

Unlike many books in this field, The Myths of Innovation is a pleasantly light read. The author has a lucid writing style and plenty of anecdotes and stories that all help to illustrate the points he is making.

The book is divided in to ten chapters, each of which covers a particular concept or misconception. The first one, The Myth of Epiphany sets out the direction for the whole book and quickly destroys the story of Newton and his apple moment in the ‘discovery’ of gravity. The reality is if anything rather more impressive, years of study, multiple disciplines and ideas all being pulled together to produce a fully formed set of theories and formulae

For me, the real richness in the book is the wealth of stories both historical and contemporary, each of which illustrates a point. I certainly had many of my beliefs neatly demolished as tales of Einstein, Jeff Hawkins (founder of Palm), Steve Jobs and many more are told.

One concept I particularly liked was the importance of understanding the real problem. For instance, Edison didn’t want to create a lightbulb, he wanted something that could be wired up in cities that would make money. Equally, the Palm Pilot spec wasn’t for this function or that function, it was to fit in a shirt pocket, sync with a PC, be easy to use and cost less than $299. Everything else was just fluff.

I can safely say the book lives up to its title. It does a neat and surprisingly entertaining job of debunking almost everything you ever believed or hoped was true of innovation and the processes behind it. It will leave you hungry to explore new ways of trying to discover and created armed with the new insights it provides.

For such a compact book, I did feel the price was a little high (although Amazon’s prices are particularly keen on this book) but on balance, if you have an interest in innovation, either within yourself or by inspiring others, this is a fine read that will probably become a classic in its field.

Finally, I have to take my hat off to the writer of the colophon who went well above and beyond the call of duty with a bizarre page and a half that should worry anyone that deals with him or her on a daily basis.

IX – Electronic Music

After many years of enjoying other people’s music, I’ve started on a project with Darren Esp to create something ourselves. It’s a mixture of new material and tracks which aren’t so much covers as reworkings of existing tracks.

It’s all created entirely using software as frankly, we’re just not good enough (yet?) at playing properly but so far the results have worked out pretty well. All instrumental. Think John Carpenter meets Vangelis. See what you think.

v3_narrow_blue_bannerDesign_04_mc

Laserdiscs

Back in the day when I had far more disposable income and free time, I was an early adopter of the whole ‘Home Cinema’ thing. In hindsite, I spent a dreadful amount of money on a 40inch back projection TV, Dolby surround amp, later a Dolby Digital amp (back when it was called AC3) and of course, being pre DVD, a laserdisc player.

Like vinyl, laserdiscs were glorious 12inch slabs of beauty, just silver. The covers were equally gorgeous in many cases. In a precursor to what later became the norm with DVD, laserdiscs often came with director’s commentry, extras and even physical bits and bobs – Spinal Tap came with a Spinal Tap plectrum.

Anyway, time has moved on and I’ve now started selling them all off. It’s quite heartbreaking seeing laserdiscs that cost £100+ now going for £3 but that’s the way it goes. I also found that where laserdisc looked fantastic on an analogue, projection TV, a modern LCD makes them look pretty poor as the digital processing causes them to look not much better than VHS which is a shame.

Anyway, here’s a few of the covers as a reminder of days gone past.

tIMG_1718 Black Adder The Third. This one was still sealed, I never got around to watching it. From Encore Entertainment who were great supporters of LD in the UK.
tIMG_1719 Black Adder (one). This one was also still sealed.
tIMG_1721 Towards the Within by Dead Can Dance. Great live concert footage but have to say, the interviews are cringeworthy. Seriously up their behinds.
tIMG_1722 Ah, Micromusic by Gary Numan. It took me years to find this on laserdisc before some kind soul in Germany told me he’d seen one in his local shop and sent it over to me. Very trusting, total star. Also has the honour of being the only laserdisc I sold for more than I paid for it.
tIMG_1723 Aliens – the only way you could get the special extended edition was on laserdisc as a deluxe boxed set. For extra quality, it was encoded using CAV rather than the more common CLV format. This essentially meant perfect still frame but at the cost of only being able to store 30 mins per side and a lot of disk turning (yep, laserdiscs had to be turned over, just like LPs unless you were lucky to have a player than could do this for you by spinning the heads around). It had masses of extras and was a serious showcase for LD. It was also over £100 to buy…
tIMG_1724 The Fall of the House of Usher and the Pit and the Pendulum with Vincent Price. A glorious pair of movies. Somewhat oddly, this came as two discs but with one side containing the end of film 1 and the start of film 2. Still, a good excuse for a twin feature session.
tIMG_1725 Subway by Luc Besson, Another still sealed one that I never got to watch. It looks cool though in a dodgy 80’s sort of way.
tIMG_1726 Thunderbirds are Go AND Thunderbird 6, the rather less well known sequel movie that I’ve never seen for sale apart from this laserdisc. That said, it’s pants so I’ve not really looked very hard. The first movie is great though and features my favourite space ship, Zero-X.
tIMG_1727 Tubular Bells II live. The premier at Edinburgh Castle was excellent (wish I’d been there) and this Japanese laserdisc captured it nicely.
tIMG_1728 Another great concert. Pink Floyd. How I Wish They Were Here.
tIMG_1730 A serious slice of the 80’s 20 Videostars – Men Without Hats, Yazoo and (18) more. Not that common a disk, it seems.
tIMG_1731 Communion, staring Christopher Walken. I was slightly disapointed by this one first time but enjoyed it more on later viewing.
tIMG_1735 Highlander Special Edition. A gorgeous gatefold sleeve, extra pics, information and a laserdisc that ticked all the boxes, THX, AC3 (Dolby Digital), Directors Cut (a good one, for once)

Book Review: Atari Inc.: Business is Fun

Having been a hardcore Atari nut since the late 70’s when the VCS came out then moving through the various 8bits (400, 800, 130XE, 800XL), STs (520 STm, 4160STe, Mega STe, Falcon) etc, I was looking forward to this book immensely.

The authors are well known in the Atari community, particularly Curt Vendel who has a stunningly improbable collection of documentation, prototypes and source code. Heck, he even has one of their old mainframes. Marty Goldberg is also steeped in Atari-ness and well known amongst the hard core. Basically, if you wanted a book written by those who know, this is it.

First, the bad news. Whoever edited this book needs shooting. Some pages had as many as a dozen typos. Some sentences just don’t parse and the photos have various captioning issues. Oddly, great big chunks go by without so much as a missing apostrophe. Go figure.

Once you get past that, what you have is a stunningly thorough book that covers Atari’s history from the lead up to its inception as a company to the sale of the struggling once mighty entity to the Tramiels. (The next volume will cover their part of the story).

The authors have interviewed a great many Atari alumni, key industry figures and had access to Atari’s old email system, engineering notes and more. The result is a wide ranging, hopefully authoritative and detailed history. Along the way, the truth behind many long standing Atari stories/myths such as the cartridge burial in Mexico, the Amiga chipset saga and others are discussed, along with documentary evidence of the reality.

I thought I knew pretty much everything about this period of Atari but there were several projects discussed that were new to me. Machines I’d never heard of, even if they’d only made it as an on paper concept as well as ones that got to more functional states. There were also quite a few people I’d not realised were ex-Atari and it was fascinating reading what they did there. There are lots of good photos although as someone else noted, the reproduction quality isn’t always great. Maybe when this finally comes out on Kindle it will have better quality images.

One of the book’s stated aims is to recreate the atmosphere at Atari, which it does well and focuses on the people and internal ‘policies’ to a larger extent than most books of this type. It was also interesting to read the various problems the company had to deal with, the politics between them and Warners, Atari’s owners for much of this key period and the damage done by the marketing department at times.

The only thing I’d have liked more on was the development of the 8bit series. I was a huge fan of the Atari 800 and wanted more on the OS development, the chipset design process and the peripherals. There is a lot on these machines but it’s nothing that wasn’t already well documented elsewhere. It was only after reading this book I found out the OS was bought in, something not mentioned here.

Overall though, if you’re an Atari fan, particularly in their first incarnation (or two), this is an essential read. This will end up as a 3 volume set and with this book alone weighing in at almost 1,000 pages, Atari will end up one of the most thoroughly documented companies of this era. A fantastic piece of work. I’m looking forward to volume 2, I just hope the editing’s a bit better!

You can buy Atari Inc.: Business is Fun from Amazon UK or Amazon US

Zinio – Dreadful Service. Never again

OK, I make no bones about it, this is going to be a bit of a rant just to get this off my chest.

On the 25th of March, I signed up with Zinio and downloaded their Android app to allow me to buy and read digital version of magazines. I read a lot of magazines, both print and digital (the latter via Google Play, which works faultlessly).

Having signed up, I bought my first magazine. That in itself was probably a warning. The app said it was £2.99 but when I went to pay, it said £3.49. I went back and forth, yep, totaly disparity. Anyway, I went ahead. On the 27th, a voucher arrived for $10 against other purchases as a welcome gift. Nice I thought and bought two more magazines. All 3 downloaded fine. My credit card had 2 payments on it, the original full price magazine and the balance of the other two less the $10 I got. So far so good.

When I went back to the app to read them it just hung. I could see lots of people complaining about this in the Play feedback and someone said they got back in by clearing the cache and reinstalling. I did that and happily, I was back in. However, no magazines. I logged into the web site, which alarmingly said the same, no purchases recorded

I emailed support on the 3rd April and got a reply saying they’d get back in 24-48 hours. After 9 days, I gave up and emailed again on the 12th. Still nothing so I tried again. On the 16th I finally got a reply asking which magazines. I replied it was so far back I couldn’t remember (I do buy/read a lot) but gave them the dates and amounts from the credit card.

And today, 18th, another email, sorry, need to know the magazines you bought.

I give up, I’m writing off the money and I’ll never use Zinio again. If they can’t write software that doesn’t lock up, can’t tell who bought what from them, have customer support so piss poor they can’t reply for over a week or track purchases used via their own coupons, I don’t want to do business with them. Sorry Google Play for ever doubting you. Zinio, never again.

Where the High Street Got it Wrong

Lots of hand wringing around about the news that HMV has followed Jessops in going into receivership. Given that HMV reportedly have 38% of the UK music market as well as some major gig venues, distribution and ticketing, it’s going to shake things up.

This is a wakeup call for High Street chains. In my experience, the thing that has reduced my spend is poor customer service. There’s no way any bricks and mortar shop can compete with online vendors on price so the differentiator has to be something that adds real value to the shopper. The problem is, as times have got harder, service and flexibility has plummeted.

Some examples. Just before Christmas, HMV had an Android tablet on their web site for a very good price. I ordered one and got the email to say it was on the way. Then it got interesting. People on the various bargain hunter websites such as HotUKDeals started to chatter about the rumour HMV didn’t actually have any. It then moved on to this being a regular thing with HMV. An awful lot of people said they had vowed never to shop there again having been caught out before. Sure enough, my order turned sour. Whether incompetence or policy, it seems HMV’s website had no real stock management and would happily accept orders for products that didn’t exist. People remember these sort of things and after looking around, it seemed within a certain section of the online community at least, HMV had joined Sony as one of the companies people loved to hate.

Another example. I used to buy a lot of stuff at Jessops. I mean a lot. They could always be relied on to do a deal. They couldn’t always match the best online prices but if they got close, they got my business as I valued being able to browse, especially on high value items. As their fortunes dipped, so did their interest in deals. Whereas once they could be relied on to knock £999 down to say £850, the last time I went there they knocked 50p off a £450 lens IF I BOUGHT A FILTER TOO. They were pretty surly about it to boot. That was the last time I shopped there.

In both these examples, they lost customers for stuff they really should be doing right, but weren’t.

Going back to HMV, there’s been some interesting blogs today from people on the inside and it seems the senior management were woefully missing the way things were going such as dismissing downloading music as a fad, saying they didn’t need a web presence (OK, that was a while ago) or throwing out marketing people for pointing this sort of stuff out to them. Old school thinking in a world that was no longer old school. Time and time again they clung on to the old model, sure they would win through and that each new tech opportunity was a temporary thing. Bad news HMV, you were too late to every party and now people have stopped inviting you.

Atari Jaguar – Fight For Life – Review

Last one… <sniff>

Iain Laskey previews what is possibly the most eagerly awaited Jag title yet, Fight For Life

Every console these days must have its beat-em-up and after some decidedly lacklustre titles, the Jaguar bounces back with a real winner.

Fight For Life has been a long while coming. More than any other Jaguar game, it has been back to the drawing board time and time again as the opposition have upped the ante. It looks like the wait has been worth it though.

From the moment you plug the game in, you know it’s something special. The intro screen is like a mini pop video with the music and fighting synchronised along with zooms and cuts from one view to another. Choose from training, two player or tournament and the battling begins. The plot is largely irrelevant. You can play against the computer or a human opponent. The computer plays a pretty mean game and is great to practice with but you can’t beat (sic) playing against a friend to really get the competitive juices going.

Each of the eight opponents have their own special moves as well as the standard ones. Every time you beat one, you get to choose two of their special moves to add to your own. As you progress, your range of kicks and punches increases. However, there are so many, most people will probably settle on a few favourites. There are also combo-moves which are extremely hard to get right but well worth it in terms of hit points and spectacular on-screen action. How about a face slap combo? Try and remember >^B<^B>^B! With button combinations like that though, a few more hit point wouldn’t have gone amiss.

A fun feature is an invisible force field that surrounds the play area. If you can push your opponent into this, you get to see them electrocuted by long blue sparks. The jerking bodies and sound effects are not for the squeemish!

The computer controlled opponents each have a definite personality and what works against one may not work against the next so it’s a constant learning process getting the tactics right. To beat an opponent, you need to win two out of three matches. The early ones are soon mastered but later ones do take a bit more work. If successful, you get a password to allow you to keep the new skills you have gained.

Given that so many people try to put down the Jaguar, the speed and detail of the graphics should be a revelation to many. Each fighter is fully texture mapped and the various moves are well animated. A nice touch are the little ‘dances’ that the winners perform at the end of each match. The camera angle can be set to fixed or rolling. In the latter mode it pans wildly around the arena following the players. Sometimes close up, it can then fall away to a long shot. Very occasionally it can make it difficult to judge your positioning but this rarely lasts for long.

The music is good and consists of the usual techno tunes. Tempest 2000 has a lot to answer for! The sound effects whilst sparse are well chosen with kicks producing gentle whooshing noises and characters grunting and squeeling when hit hard. An awesomely deep voice introduces each new match.

Comparisons to Tekken and Virtua Fighter are inevitable. I’d be lying if I said this came into their league. Given that they come on CD with hundreds of megabytes of sounds and graphics and Fight For Life is all packed into a 4Mb cartridge, it’s an astounding achievement. It may be missing some of the polish and sophistication of Tekken but it matches them for sheer playability. The only real caveat is that for long term value for money, you need another human opponent to play against. Highly recommended.

Product: Fight For Life
Price:     £59.99
Contact: JTS Atari
Telephone: 01753 xxxxxx

Highs: Superb playability, texture mapped players, sound effects
Lows: Price, some moves tricky to achieve, no really powerful moves

In Short… The wait was worth it! 90%