Category: Books

Professional PHP: A difficult task, and even worse in Spain

This is a post about tech books. Sometime ago I discovered that Internet is not, and should be not, the only information source for an IT professional. It’s a good place to search for technical reference, to scan for chunks of information, but definitively it isn’t a place to read long texts. Books are the alternative. We get used to scan text on Internet (Nielsen dixit), but we read books in other way, in a more relaxed way. And books authors write books in a different way from writing on Internet. We need books (or big and comfortable e-books) in order to understand “the big picture”.

PHP is a flexible language, and thanks to its version #5 it’s a modern object-oriented language. It’s also an easy language to learn, which leads to help newbies. But, just because this, most of the PHP programmers’ population have a low programming level. This could be a reason to explain why almost every PHP book seems written for newbies. PHP5 is object-oriented so, as an example: how many books explain Design Patterns using Java? More than 30 (according to an Amazon search). How many with PHP5? Just 4. Another example… let’s speak about unit testing: how many books are out there on jUnit? Around a dozen. And on PHPUnit (something like jUnit, but in PHP)? Just ONE!

And things get worse if we speak about trying to buy advanced PHP books in Spain. Libraries in Spain avoid books written in other languages but Spanish, and of course none of the “advanced level” PHP books get a Spanish translation. So the reality is that it’s almost impossible to get a decent book. Last year I was surprised when I went to London, entered in a just normal library and found a lot of hi-tech PHP and AJAX books. I tried to found a good library here in Barcelona, but it’s impossible: so finally I ordered some books to Amazon UK!

A PDA with Linux

I’m used to read PDFs while in bed, on my Acer PDA. But its tiny resolution (320×240) didn’t help a clear reading, therefore I started to look for a bigger device, it must be easy to hold but not too big. So I avoided those e-readers, and focused on PDAs with bigger resolution. And then I stumbled upon a Nokia 770 review… it is supposed to be a “Internet tablet”, but the thing that caught my attention was its screen resolution: 800×480. Luckily I have a friend who owns one, so I had a look at the device… it was interesting indeed.

I thought “Ok, I can use a N770 to read PDFs, and my Acer n50 for the rest of things (do sudokus, see pictures and record Go games)”… because I read some comments on Internet saying “it’s just a web browser, not a really PDA” (really?). I found a offer on ebay, and bought it for just 102 euros.

What a machine! The default factory configuration was a bit short of features (I reinstalled the lastest OS), but then you configure some program repositories, start to add open source applications, and discover the real power. The OS is a version of Debian. This means you can have an xterm with most of the usual commands. Moreover the graphical system can hold GTK-based programs with an easy porting. I installed some games, CGoban to record Go games, and some utilities (including a player).

The cons are that its CPU (252 MHz) is too slow, so sometimes it stops to respond for a while; and the battery lasts less than a normal PDA (actually, similar to a laptop, around 3~4 hours). So its a device for patient users (or if not, try its successor, the N800 and N810, with double speed CPU and webcam).

I can even play a game of Freeciv!
Playing Freeciv on a Nokia 770

Helping your online reading

Recently I was asked about different issues regarding NLP, due to my PhD studies in that field, and I’ve started reading again about this…

Natural Language Processing is a part of the Artificial Intelligence which studies how a computer could understand natural human languages, like English. There are a lot of subjects in NLP, but in my personal case I used syntactic analyzers to detect the parts of the phrases and the relations between them. For example, to discover if a noun is modified with the surrounding words (“the blue car in the parking lot“). This information were used in a Information Retrieval system (which is something like Google or Yahoo search), to help the system to “understand” what the user is asking for. It was an interesting application of syntactic analyzers.

Visual FormattingAnother amazing use for syntactic analyzers is Visual Text Formatting.

I found an interesting article about “Visual-Syntactic Text Formatting” and a commercial website with some examples. Basically the idea is to use the syntactic information (obtained from NLP tools) to format the text in a way that is easier to read. The result seems quite effective. Surprising idea!

The Pragmatic Programmer: The review

The Pragmatic ProgrammerDue to the depressing previous post, I thought I had to do justice to the book, avoiding some comments about my career, and focusing on a good review of the book.

The book starts with the DRY principle (Don’t Repeat Yourself), and the authors remind this among the pages. The idea is trying to avoid the repetition of the information. It’s not only referring to the code (don’t repeat functionalities, create modules, avoid coupling, etc). But they look at a wider vision: the client requirements doc, the code, the database scheme… all reflect the same information. When something changes in the database, normally you have to change something in the code… so you are repeating information, and maybe it could be better to find a way to avoid this. The book explains a lot of inspiring ideas for helping you with this stuff.

It also speaks about a lot of engineering related processes. Ideas about prototyping, debugging, testing, requirement capturing… and, of course, programming. In my opinion, the most important thing in this book are not the individual tips, but the big picture. It is showing a sort of philosophy, an interesting one (to follow).

A must in an engineer’s bookshelf!

A pragmatic programmer

The Pragmatic ProgrammerI’ve finished the reading of a brilliant book: “The Pragmatic Programmer“. It’s a collection of really wise tips to help you becoming a better professional. I already follow some of their recommendations, but most of them were new for me. All were really useful, and I could’ve figured out some of them. And this is probably the reason that this book has made me feel a fairly bad programmer. I’m feeling a bit depressed!, regarding to my professional path, not being proud of some of my works, getting angry with myself, and with my university teachers.

Let’s start with the latter (angriness with university teachers), with an example. When I was studying in the University, we had a subject about compilers. In the practice exercises we had to build, using lex/yacc/bison (Unix utilities to create analyzers), a compiler to convert from a programming language (invented by the teacher) to a stupid assembler language for a stack-based machine. The problem was that those examples, with that such stupid language, created on me the idea of “lex/yacc/bison are useless utilities”. Why they didn’t show me some real examples of interesting use? Now, I read some suggestions in “The Pragmatic Programmer”, in which the authors recommend the use of these utilities, and I feel tricked by my teachers. I’m a bit angry with them, although they did a good job… but maybe they were a bit soft with us, or maybe they didn’t induce us to be real programmers. Anyway, that was university times, and now I’m discovering that some of the most (previously considered) stupid subjects are now the most interesting ones.

On the other hand, sometimes I’m not proud of my work, because I think I could’ve done better. I’m just finishing a project, and feeling I should re-start it from the beginning with a new focus. Maybe I’m a perfectionist, or maybe I learn a lot while developing a project, and when I finish it I feel that it is outdated. But, regarding to this book, I would like to apply some of those tips to my past projects, and they have probably finished in a better way.

I have a lot of doubts about my professional path. I’m not sure if it’s better to work alone, or in a small company (just my current status, with 3 department mates, without heavy standards or follow-lines), or a big company (with strong standards). Also I’m thinking of joining an open source project… but my time is not unlimited, and I usually arrive at home quite tired. Anyway I’m trying to shape up my professional skills, reading more technical books, learning a lot of methods, peeking some new languages, and trying to be up to date on the new technologies. Is this enough? Never is enough regarding to knowledge! This is the road.

Technical books are too big (=uncomfortable)

Smurf villageSometimes I’d like to have technical books in “smurf-size” format.

In the last months I’ve been reading some interesting books, but the reading experience was handicapped due to their uncomfortable format. Why do technical books have to be so big? It’s quite impossible to carry them and read on bus, or even in bed. It’s totally uncomfortable!

“Professional JavaScript for Web Developers”, “Ajax in Action”, “Designing Interactions” are interesting books, but maybe the authors can leave some information out, and make smaller books. But it seems that if you don’t break you arm while carrying them, they are not good. The only exception (of size) in my tech book list is “In the beginning… was the command line”, which is pocket-size (well, despite this name format, it doesn’t usually fit in my pocket), and it’s not really a tech book, but an essay.

Anyway, in other subjects the size of the books doesn’t matter, trust me! For example, I have some Go books, and most are pocket size (and some of them really are “pocket size”)… but the most interesting thing is that they are over-filled with information. Moreover, due to their useful size, you finally spend more time with them (reading and re-reading), carrying them everywere. The reading experience is really enjoyable!

Zen and peace, join design and code

the Zen of CSS designI’ve just finished reading the best technical book I’ve held on my hands this year: “The Zen of CSS design“. Using the famous “CSS Zen Garden” website, it speaks about design, CSS, and standards on Internet. It’s not a CSS reference book (but it cleverly shows the common css pitfalls), and it’s not a design book (but it comments a lot of design tips and stuff to consider). So, being nothing at all, is plenty of wisdom, making a correct use of the “Zen” meaning in its tittle ;-)

Every chapter illustrates a concept, like design, layout, typography, etc. It shows some real examples from the website, in the way to help you to understand the different uses of every subtle element. For example, in the design chapter it comments things about:
– colours (use and psychological meanings), contrasts, unity
– shapes, lines and curves, patterns (and textures)
– space, margins, shades
– how to help the eye leading
A lot of interesting stuff to save in your hard disk brain!!

If you feel a bit sank among web design, developing, programming, and such things, it could be like a roadmap for you. Of course it’s not perfect, and for example I disagree the quality of one of the last chapters. But there are lots of interesting comments, and the final chapter (recovering all the solutions for the common CSS pitfalls) is a really nice jewel. The best book bought by my company (thanks to my suggestion to my manager).

La iniciativa Funky

De vacaciones en el sur descubro que me he acostumbrado a la frenética actividad de la ciudad, al constante movimiento, a la iniciativa por la evolución. Paseando por el pueblo todo es tan calmado que me adormece; veo pasear parejas enfadadas, como si el único mundo que existiera fuera la resignación. Tanta falta de evolución me desorbita, ¿acaso la vida es simplemente estancamiento?

Funky Business Hace unas semanas leí el libro “Funky Business“, encontrado de casual en la calle, en la basura, junto a otros libros técnicos. “El talento mueve el capital”, su subtítulo, narra perfectamente la temática: como son las nuevas empresas, las triunfadoras del siglo XXI. Google, IKEA, Dell, y otras, donde se evitan las jerarquias, donde se valora el talento de los trabajadores, se les deja vestir y hacer lo que quieran, se les da comodidades, para que su talento brote. Asumir riesgos es la única opción segura para evolucionar, toda una sana contradicción.

Uno de los comentarios más curiosos del libro era algo como: “un buen trabajador para tu empresa es uno que no quiere quedarse estancado, desea asumir riesgos, desea cambiar… incluso de empresa”. Valorar la gente con deseos de arriesgarse y avanzar.