19 Dec

0 Comments

On technology books

by

book

Jeff Atwood mad some explicit about technology books here: http://www.codinghorror.com/blog/2007/10/do-not-buy-this-book.html. At first I was astonished and strongly disagreed with him. Later I thought about it, digested its meaning and must admit, I agree.

So this is a how I will choose which books I will buy or not:

 

Buy

  • Books about architecture, design and techniques – design patterns, dependency injection, test driven development. Interestingly also useful are books of these topics applied to a specific language. Even more interestingly, also useful are books of these topics applied to a specific language you broadly know but don’t use. In particular, you can mix and match books on these topics between Java, C# and ActionScript whether you are a Java, C# or ActionScript programmer. Doing the “translation” (adapting examples to missing language features, etc.) might even help.
  • Books about the fundamentals of a technology you know nothing about. This means that if you have to learn say Silverlight and you are a Java programmer, buy a book about C# and XAML. Do not waste time in buying books containing practical examples like “form validation” or “how to create modal windows” and so on. There’s Google for that.
  • Books about organization and (self-)management practices. From The mythical man month to I.M. Wright’s Hard Code, you can’t go wrong with this kind of books. With “you can’t go wrong” I mean that even if you pick up an obsolete, wrong and heretical book about soft topics you’ll find more food for thought than by buying a “recipe” book with solution for specific problems. An unexciting book on Waterfall planning gives you more to think about than “how to make round corners in CSS”, which takes a whole 5 seconds to find out and other 5 seconds to forget (there is also no reason you should remember this, unless you do front end formatting every day, in which case you’ll remember it anyway).

 

Think twice before buying

  • Books about examples which teach you the questions instead of the answers. These are difficult to tell from plain examples books. The difference is in the details: instead of telling you how to do something, these tell you how to fish, but they still do it through examples. You can usually tell them apart because the examples are thoroughly explained in detail, and become food for further thought instead of pre-cooked solutions of your problems.
  • Books about examples for some (but not all) DSLs (domain specific language). Things like regular expressions, XSD schemas, XSLT transformations and GLSL/Cg/HLSL shaders are best learned through examples. The complexity of a shading language – for example – does not lie in understanding the concepts (which are rather basic) but in finding a way to apply them to real problems (lighting, mapping, etc.); examples provide real ways to overcome this difficulty. I wonder if the same approach could be used for parallel assembly language (MMX, SSE, AVX) since it shares the same problem (easy instructions of which the purpose is almost impenetrable). More complex DSLs (like SQL) require a more conventional approach.
  • The “complete reference” of <anything>. You already have the “complete reference” of <anything> book. It’s on your keyboard, top-left,  and is called “F1”. Books named “the complete reference” really are divided in two parts: a first part, teaching you the basics and which may or not fall in the “buy” category, and a second one which is “the useless reference” which is little more than the online help dumped on paper. You are actually paying (in money, weight, etc.) for 1000 pages while only 200 are worth. Consider buying this if the price is low or you just discovered you’ll spend the rest of the next ten years on a given technology AND you deem memorizing the whole standard library an useful experience.

 

Do not buy

  • Books with “recipes” for solving specific problems. In real life you will have your own problems to solve. Even if they are problems solved by other people out there (I want to embed an image on a tooltip while hovering a list) you’ll find your own version of the problem has some important detail that will mess everything up (I want my tooltip to fade in, be always aligned on the left of the list and have a small arrow pointing to the list item). Besides, if you are not an UI developer these books are more and more useless. Make exceptions for DSLs like shading languages, regular expressions etc. as said above.
  • Books excessively pragmatic. You want to learn the inside out of things and a “getting started in 24h for dummies” book is not worth the paper it’s written on.  You want to know that in curly brace languages a for(…) is equivalent to a while with some syntactical sugar and not just a way to count from 0 to 100.
  • Books requiring to be read from start to end. You want to skim read it and then go back and forth as you wish.

 

Requirements

  • As a must, you want the book to tackle the topics your brain isn’t able to tackle within 5 minutes of internet access. Unbelievably there are many books about C#, for example, which spend chapters and chapters about conditionals and loops and have a single chapter dedicated to iterators, anonymous delegates, lambdas and closures together; just to bring you to 4 chapters dedicated to LINQ. This is because they are “pragmatic” books. For pragmatic content, please insert an RJ-45 cable in your Ethernet socket and type www.google.com.
  • It must have “gotchas” of the technology clearly highlighted so that you can catch them during your skim read. You are going to forget them in 5 minutes, but they really reside in some distant corner of your brain. When you’ll be stuck diagnosing strange behaviour in the system or debugging some code which just seem to be a compiler bug, you can remember it in a flash and solve the issue. I’m thinking about things like “this” in JavaScript closures, for example – either you read about it, or you are going to bang your head against the wall for a whole day (until some helpful colleague will enlighten you).

 

 

Photo: a book from Christopher Columbus travels, found in Porto Santo museums.

Filed Under: Featured, Programming, Rants

16 Dec

0 Comments

Updating

by

I’m in the process of updating wordpress to the latest release.

I was very behind with updates so basically everything broke up – I even had to open a ticket with the hoster (aruba.it) to update MySQL – they were very kind and quick to answer and act. PHP was easier to update (it didn’t involve opening tickets :) ) but it was too old for wordpress to work too.

Anyway, in the next days I will try to get the thing up and running as it was (theme, plugins, etc.) and the target will be re-enabling comments and restart blogging.

Edit: Comments should now be enabled on all posts, with reCAPCTHA.

 

Filed Under: Uncategorized

18 Feb

0 Comments

Top 10 music for programming

by

57_Brugge_Belfort_Interno

For programming one needs silence to concentrate at the problem at hand. But comes a time (often) when one has to go in auto mode, and have the hands write the ideas accumulated at the time. Good music is the best thing to let them go, and it must be non-boring, lengthy enough to avoid having to switch back and forth, with the right level of darkness and, above all, top quality. The rule I followed is 1 per author, if an author has more than one submission, they share the same slot (and most, share). So, from bottom to top:

10 – Dido – Life for Rent, No Angel

For some reason when programming sad, melancholic  music feels better than a beach Boys album would, probably because I want my brain to be kidnapped by the music while the hands write like an automaton, and not my brain to start . Life for Rent has fewer good tracks than No Angel, but I’ve listened to No Angel literally too much and it’s starting to get boring.

9 – Dire Straits – Love over Gold

Dire Straits are able to reap a 9th place in this list, and it’s strange. Their music don’t fit the theme, and it’s generally not good to code with; you can’t concentrate with Twisting By The Pool. Still Love over Gold is a strange beast, and they are able to get on the list with just two songs of a single album of all their life. The first two of course.

8 – PFM – Storia di un minuto

The only italian album on the list, this is one of the highest moments of italian progressive rock of the 70s. There are two reasons for being only 8th place: first, the italian lyrics are easily distracting; second Impressioni di Settembre is too beautiful to be listened while working.

7 – Weather Report – Mysterious Traveller, Black Market
Many Weather Report albums are better than Mysterious Traveller. Ok not many, and WR quality is so high that it would not matter anyway, but Mysterious Traveller has the top qualities as a programming music, specially the first track, Nubian Sundance. Black Market, however, is Black Market; you can’t go wrong with Black Market, and code produced under the Black Market effect is basically bug-free! Try it.

6 – Portishead – Dummy

The first trip-hop album in this list (unless you include Dido in the genre but it’s a stretch I think) and there are many, and all at the top – but don’t give it too importance to this fact, infact almost all the list is shared between 70s progressive, trip-hop and jazz/fusion. Dark, disturbing, distressing. Perfect. The reason it’s not first is that it lacks positive energy. But it has plenty of negative one, so plenty to get a 6th place without debates. Plus, one of the less significant songs in this album, shares an introductory sample with another of the less significant tracks of another album in this very list. Go figure.

5 -Miles Davis – Kind of Blue, A tribute to Jack Johnson

No list of top whatever music can be missing Kind of Blue. The only issue with Kind of Blue is if you want something more dynamic. Right Off from “A Tribute To Jack Johnson” is that for a reason. This reason.

4 – Morcheeba – Big Calm, Charango

No other album from Morcheeba has the same feeling as this one. And none will ever be since Skye Edwards left the band. Oh Wait! Skye Edwards returned! But they will not do anything like Big Calm anyway, because Big Calm is unique. Charango is a good alternative, but, slow down!, it’s way beyond no Big Calm, even if you think otherwise; get along with it. And if they can’t redo it who can you trust ?

3 – Hooverphonic – A New Stereophonic Sound Spectacular / The Magnificent Tree bonus album

Not everything from Hooverphonic is good, and no album satisfy the programmers needs fully. A New Stereophonic Sound Spectacular is the one getting closer, but some tracks really don’t cut, with The Magnificent Tree at second place. However the two “Visions” tracks (bonus tracks of the new editions of The Magnificent Tree) are perfect; 100% pure programming tracks.

2 – Pink Floyd – every long suite, Animals, The Dark Side of the Moon

More than 20 minutes of varying tones, with up and downs and ranging from dark to charging. Never boring, you can’t go wrong with Pink Floyd long suites. Be them “Echoes”, “Atom Hearth Mother Suite” or “Shine on you crazy diamond”. Bonus points for the entire Animals album, with Dogs getting again in the >20′ range and being top quality together with Sheep and Pigs while older albums offer gems like “Careful with that Axe, Eugene” and “Astronomy Dominé”. When long suites start getting boring (after some years of continuous listening), classic Floyd albums will take their place; The Dark Side of the Moon is a pleasure to listen, from Clare Torry vocals to the odd tempo changes in Money. Beware the clocks in Time, if you are tired.

1 – Massive Attack – Mezzanine

I don’t like Massive Attack that much. But tracks 1 to 6 of Mezzanine seem to simply have been composed right for programming. Not boring, rhythmic, dark, impressive, obsessive. When almost every track is that famous, with a track used in the Matrix soundtrack and another being the soundtrack of almost everything (from House M.D. to Assassin’s Creed) and featuring Elizabeth Fraser, you can’t be wrong. Speaking of Elizabeth Fraser, of Cocteau Twins fame, if this list was of 11 places, they would be in.