Mar
7
2006
I’ve had the Agile Web Development with Rails book authored by Dave Thomas and David Heinemeier Hansson for some time. Looking through Amazon I found out that there are several Rails book coming in the next few months. Dave Thomas is a good author, I also have his PickAxe book Programming Ruby: The Pragmatic Programmer’s Guide. In this post I want to quote some insights from Dave Thomas found in Agile Web Development with Rails.
The needs of the developer are very different when writing code, testing, code, and running that code in production. When writing code, you want lots of logging, convenient reloading of changed source files, in-your-face notification errors, and so on. In testing, you want a system that exists in isolation so you can have repeatable results. In production, your system should be tuned for performance, and users should be kept away from errors.
Why use an artificial primary key such as id?
The reason is largely a practical one – the format of external data may change over time. For example, you might think that the ISBM of a book would make a good primary key in a table of books. After all, ISBNs are unique. But as this particular books i being written, the publishing industry in the US is gearing up for a major change as additional digits are added to all ISBNs.
There are few absolutes when it comes to performance, and everyone’s context is different. Your hardware, network latencies, database choices, and possibly even the weather will impact how all the components of session storage interact. Our best advice is to start with the simplest workable solution and then monitor it. If it starts to slow you down, find out why before jumping out of the frying pan.
Use GET requests to retrieve information from the server, and use POST requests to request a change of state on the server.
no comments | posted in Books, Programming, Ruby, TechKnow
Feb
13
2006
Why are technology books sooo voluminous, they are usually 500 page coffee tables as opposed to a coffee table book. I feel that most of the pertinent information can be condensed to a 40 page manual or how-to cookbook if they remove all the fluff. When dealing with new technology, lets say Struts, a developer already has, or should be assumed to have, adequate knowledge of Java, the internet, and HTML. Not a single page should be dedicated to the history of Java or HTML in a Struts book and such information should be available online. Books that deal with web application frameworks such as Struts or Ruby of Rails all have the same first chapter on the MVC pattern that these frameworks are built on. These books should reference some wiki in the sky for these background concepts and histories. From my experience the installation chapter is always a waste. Most applications are usually double click installation and usually contain a README file. I almost feel that books should ask you, do you know Java, do you know MVC, do you know HTML, if you answer yes to all these then skip to chapter 7! But maybe this is a publishing issue, I am sure there is a certain number of pages and dimensions that a book should have to be priced at a certain price range and be guaranteed a certain shelf space. All I want is less talk (I don’t care for the kayaking allegories Bruce Tate starts his chapters with) and more code. I really want a cross between the O’Reilly cookbook and hacks series. The cookbook series has plenty of code and the hacks show you some really interesting examples.
no comments | posted in Books, Programming, Rant, TechKnow
Dec
4
2005
I just finished going through a class I run into the future of programming languages by reading Beyond Java by Bruce Tate. In Beyond Java, Bruce makes the point, repeatedly, that Java will not be the reigning programming language of choice for ever. Bruce ‘predict’ that developer will move to more consistent dynamic languages such as Ruby and simple frameworks such as Rails. The book is pretty much a treatise of why static strong-type languages like Java suck. I agree with Bruce that Java will eventually be replaced with something else, I mean that is just that nature of evolution but I also feel that this book was 100 pages to long and $25 overpriced. He just repeats what nay sayers have been saying for a long time. His main arguments against Java are that the language is not as productive as alternatives, that Java is not a complete OO language because of primitives, and that there is simply too much to learn to develop an interesting web app. Basically his argument is that Java is a strongly type static language and we ought to be looking into more dynamic alternatives. I agree with all his points. I started this blog because of all the things I need to know and remember in a typical day at work, everything from JUnit, Ant, XML, CruiseControl, Hibernate, Spring, libraries and on an on.
Bruce himself writes that “the whole premise of this book is arrogant beyond belief.” I agree with him there also but only because Beyond Java is priced $24.95, a book that repeats itself a little too much and provides no new ideas. There are way to many bandwagon technical writers these days and solid tutorials on Ruby on Rails that I feel that this book should have been at least 100 pages shorter and made freely available online. After reading Beyond Java, all I have to say is that I really hate popular programming writers. Let me save you $25 and tell you that Java will not last forever, that you should looking into dynamic languages such as Ruby and start developing web applications on Ruby on Rails or continuation servers such as Seaside. In a sense start programming using The Hype Framework.
I once heard a joke that a consultant will tell what books programmers are reading by looking at the code. Consultants will know you read this book, or any of Bruce’s other books for that matter, just by one comment.
// Programming is like Kayaking.
no comments | posted in Books, Java, TechKnow