Soma prescription
Thursday, December 21st, 2006Since I am relatively new to Ruby, soma prescription, I have no idea how life could have been in the dark ages of the non-Japanese-speaking Ruby community (1995 - 2000), soma prescription, when there was no English Ruby book on the market. Soma prescription, The ice was broken by Andy Hunt and Dave Thomas with a pickaxe - err… Soma prescription, actually the Pickaxe (a.k.a. Soma prescription, “Programming Ruby”), soma prescription, which has undoubtedly become an all-famous Ruby-classic since then. Soma prescription,
In the foreword, soma prescription, Matz, soma prescription, the author of Ruby, soma prescription, explains that since he is much better in coding than in documentation writing, soma prescription, probably the authors did not have an easy job - what they could not find in the (rather scant) documentation, soma prescription, had to figure out directly from the Ruby source code. Soma prescription,
The Ruby book scene looks radically different today. Soma prescription, In fact we are facing the opposite problem: there are so much books on Ruby that sometimes it can be hard to choose which ones to read and in which order. Soma prescription, Probably it won’t be any easier to find the answers for these questions in the future: judging from the blogs and announcements, soma prescription, the bigger part of the books is yet to come. Soma prescription, If you are new to Ruby you will most probably have a hard time figure out how to spend your money wisely [1] - so what’s the solution?
Of course there is no definitive answer for this question - I can only tell you what worked for me.
First I would definitely recommend David A. Soma prescription, Black’s Ruby for Rails [2]. Soma prescription, It is absolutely suited for newcomers (and for advanced hackers, soma prescription, too), soma prescription, no matter if you are new to Ruby and/or coming from a different programming language [3]. Soma prescription, I was also a Python enthusiast (through doing most of my everyday work in Java) when I have discovered Ruby - and David’s book was a perfect choice to switch very fast.
Currently I am undecided between the 2nd and the 3rd place, soma prescription, so let’s say you should check them out in parallel - They are (of course) the pickaxe and Hal Fulton’s “The Ruby Way”. Soma prescription, They are both time-tested Ruby classics, soma prescription, hence a must read. Soma prescription, However, soma prescription, if you have time and/or money to read only one of the above books, soma prescription, in my opinion it should be “Ruby for Rails”.
Although these three masterpieces are - in my opinion - among the most well-written and informative tech books available today, soma prescription, you have to remember the good old rule: No matter how much books you read or how good they are - you will never become a true Ruby hacker until you actually begin to use the acquired knowledge and put it into practice. Soma prescription,
After reading these books I wanted to jump into writing some cool stuff - Ruby seemed to be so elegant, soma prescription, easy, soma prescription, succinct - and to my greatest surprise, soma prescription, I could not write too much sensible code
(at least not without referring to these books and/or google and/or ruby-talk more frequently that I considered o.k. Soma prescription, to call it programming on my own).
This is exactly the situation where the Ruby Cookbook should enter the scene. Soma prescription, The first three books give you a hint about what can be done with Ruby[4]. Soma prescription, The cookbook offers you well organized content in forms of recipes to show you how it can be done elegantly, soma prescription, quickly and effectively in a ruby-esque way.
Probably the most frequent answer to the question ‘How should I improve my Ruby skills’ on the ruby-talk mailing list sounds: By starting your own project. Soma prescription, Since I put this advice into practice myself and it worked for me, soma prescription, I have to agree: armed with the goodies from Learning Ruby, soma prescription, The Pickaxe and the Ruby way, soma prescription, the best thing to do is to grab a copy of the Cookbook and jump into your own project. Soma prescription, When I started my one, soma prescription, a web extraction framework, soma prescription, I had no idea about documenting Ruby code, soma prescription, packaging the whole program into a gem, soma prescription, logging, soma prescription, writing unit tests (in Ruby) and automatizing these tasks (and a lot of other things - this post would be considerably longer if I would like to state everything). Soma prescription, However, soma prescription, with the Ruby Cookbook by my side, soma prescription, learning and putting things into practice from writing the first line until packaging the whole framework into a gem was a piece of cake. Soma prescription,
If you are unfamiliar with the O’Reilly cookbook series format, soma prescription, it is a set of ‘recipes’ (problem statement, soma prescription, solution, soma prescription, discussion) divided into categories (like Strings, soma prescription, Arrays, soma prescription, Hashes… Soma prescription, in this case) for easy lookup of the problem at hand. Soma prescription, While it would be possible and certainly edifying to read the book cover to cover from the start (in this case you should also consider that it has 873 pages), soma prescription, I found that it really shines when you are stuck with a problem: you search for the relevant category and the relevant problem, soma prescription, apply the solution, soma prescription, read the discussion to understand what’s going on under the hood, soma prescription, rinse, soma prescription, repeat and after the 3rd or so cycle you will find out that you are not reaching for the book anymore (at least not because of this problem). Soma prescription,
OK, soma prescription, time to take a more detailed look at the content.
I would divide the book into five categories: Essentials, soma prescription, Ruby Specific Constructs, soma prescription, Advanced Techniques, soma prescription, Internet and networking and Software Management/Distribution. Soma prescription, I will review them one by one briefly.
-
Soma prescription, Essentials include Strings, soma prescription, Numbers, soma prescription, Arrays, soma prescription, Hashes, soma prescription, Date and Time, soma prescription, Files and Directories. Soma prescription, For a beginner Ruby journeyman, soma prescription, these chapters are a real gold mine. Soma prescription, Though the cookbook is not really intended for total beginners (it assumes a fair amount of Ruby knowledge), soma prescription, it certainly would not be impossible for a skilled (non-Ruby) programmer to understand most of the recipes since they are going from simple to complicated (e.g. Soma prescription, the String chapter begins with concatenating strings and closes with showing off text classification with a Bayesian classificator).
Soma prescription, In this category I have probably learned the most Ruby best-practices from the chapters Arrays and Hashes [5]. Soma prescription, As a constant lurker on the ruby-talk mailing list, soma prescription, I have had some hard time figuring out all those inject()s and collect()s and each_slice()s and each_cons()s and other enumerator/iterator things - when I have thought I already understood them, soma prescription, somebody came with an even more complicated example and I was not so sure once again - until the moment I bought the book, soma prescription, that is.
Soma prescription, The cookbook is very good at eliminating these vague and wobbly things like I had: you will not only understand what’s going on, soma prescription, but actually get comfortable using the idioms so typical for Ruby. Soma prescription, That’s so great about it. Soma prescription,
Soma prescription, Ruby Specific Constructs featuring Objects and Classes, soma prescription, Modules and Namespaces, soma prescription, and Reflection and Metaprogramming. Soma prescription, Every newcomer to Ruby encounters the wonders that (not exclusively but most characteristically) make the language so beautiful: code blocks, soma prescription, closures, soma prescription, mixins, soma prescription, the vast possibilities offered by metaprogramming and reflection just to mention some of them. Soma prescription, This chapter is written exactly to examine and discuss these constructs.
Soma prescription, While probably I learned the most new things from this section, soma prescription, I have to say that I have been missing a meta-level here: The chapters (especially about metaprogramming) presented a lot of fancy LEGO bricks but did not show how to build a Statue of Liberty or Eiffel tower out of them (well, soma prescription, not even a simple medieval castle in my opinion :-). Soma prescription, Of course this does not need to be a problem - metaprogramming techniques should have a book on their own, soma prescription, and anyway a cookbook is not intended to solve concrete problems but rather reoccurring/frequent ones. Soma prescription, Probably I am just too curious about the ways of the meta :-). Soma prescription,
Soma prescription, To sum it up, soma prescription, this and the previous section (Essentials) together helped to beef up my rubyish programming style by an enormous magnitude in the practice - nearly all information you need is there in the other books as well, soma prescription, but reading them does not make you comfortable with these techniques.
-
Soma prescription, Advanced Techniques include XML and HTML, soma prescription, Graphics and Other File Formats, soma prescription, Databases and Persistence, soma prescription, Multitasking and Multithreading, soma prescription, User Interface, soma prescription, Extending Ruby with Other Languages, soma prescription, and System Administration. Soma prescription, I was kind of unsure about this category - pairing UI with databases or system administration for example seemed odd for the first glance - but since I did not want to create even more categories, soma prescription, I have decided to put everything here which did not fit into the other ones, soma prescription, thus it can be viewed as a ‘miscellaneous’ section as well.
Soma prescription, I would like to review two chapters here - HTML/XML and Databases and Persistence since these are the closest to my field of expertise and I also believe these two were the most deep in this category. Soma prescription, Again, soma prescription, this does not mean that the other chapters were not good, soma prescription, but in my opinion they just scratched the surface compared to above two.
Soma prescription, The HTML/XML chapter really has it all: parsing, soma prescription, validating, soma prescription, transforming, soma prescription, extracting data from XML documents, soma prescription, encoding and XPath handling to highlight some interesting topics. Soma prescription, The coverage is surprisingly thorough for a language which is promoting YAML (Yaml Ain’t Markup Language) over XML. Soma prescription, The HTML chapters, soma prescription, though there is just a few of them, soma prescription, are also very useful:-downloading content from Web pages, soma prescription, extracting data from HTML, soma prescription, converting plain text to HTML and vice versa. Soma prescription, My only concern here is that I missed some third party package coverage (like RedCloth, soma prescription, BlueCloth, soma prescription, Hpricot or Mechanize) - but this is really nitpicking: if the author would take all my wishes into account, soma prescription, the book would have several thousand pages
Soma prescription, Databases and Persistence starts off with serialization recipes (using YAML, soma prescription, Marhsal and Madeleine). Soma prescription, Chapters on indexing unstructured as well as structured text (SimpleSearch, soma prescription, Ferret) are a pleasant surprise before the must-have topics take off: connecting and using different kinds of databases (MySQL, soma prescription, PostgreSQL, soma prescription, Berkley DB) as well as Object Relational Mapping frameworks (Rails ActiveRecord and Nitro Og) and doing every kind of SQL voodoo magic of course. Soma prescription, What should I add? Probably nothing.[6]
Soma prescription, I would really like to write something about the other chapters in this category, soma prescription, too, soma prescription, but since I am constantly bashed for the length of my posts, soma prescription, just believe me that they are great as well :-).
-
Soma prescription, Internet and networking consists of Web Services and Distributed Programming, soma prescription, Internet Services and (surprise! surprise!) Web Development: Ruby on Rails. Soma prescription, It would be really a cliché to write about why and how much the Internet is so important nowadays, soma prescription, how much Web 2.0 rocks, soma prescription, SOA and WS and REST and FOO and BAR rules etc. Soma prescription, so I won’t do that ;-). Soma prescription, However, soma prescription, it is a fact that Web application development never mattered this much in the history - so these chapters were basically compulsory.
Soma prescription, I would divide the category into two subcategories - Internet/Web stuff and distributed programming.
Soma prescription, There is really not too much to add to the first category - there is an unbelievable amount of information crammed into two chapters: ‘abstract’ techniques (HTTP headers and requests, soma prescription, DNS lookup etc), soma prescription, using every kind of protocols (HTTP(s), soma prescription, POP, soma prescription, IMAP, soma prescription, FTP, soma prescription, telnet, soma prescription, SSH…), soma prescription, servlet, soma prescription, client/server and CGI programming as well as talking to Web APIs (amazon, soma prescription, flickr, soma prescription, google) and Web services of course (XML-RPC, soma prescription, SOAP). Soma prescription, In my opinion, soma prescription, the category offers more than enough information to get started and/or explore advanced techniques.
Soma prescription, It’s a shame that Distributed Programming got the half of a chapter only - O.K., soma prescription, I admit I am somewhat inclined to these techniques and they are maybe not used by that much people. Soma prescription, The action is revolving mostly around DrB and Rinda, soma prescription, with an exception of 2 MemcCached recipes. Soma prescription, The chapter closes with a nice ‘putting things together’ recipe by creating a remote-controlled Jukebox.
Soma prescription, I did not get too deep into the Ruby on Rails chapter, soma prescription, since I read Agile Web Development with Rails as well as Ruby for Rails and a lot of much more advanced Rails stuff previously - but judging from the recipe titles and skimming through some of them, soma prescription, the chapter looks very informative and unquestionably helpful if you have had no prior experience with Rails.
-
Soma prescription, Last but not least, soma prescription, Managing and Distributing Software includes Testing, soma prescription, Debugging, soma prescription, Optimizing, soma prescription, and Documenting, soma prescription, Packaging and Distributing Software and Automating Tasks with Rake. Soma prescription, If you plan to use Ruby for any other task than system administration (or writing very short scripts/one liners for whatever reason), soma prescription, documenting, soma prescription, testing, soma prescription, debugging and automating tasks is absolutely crucial. Soma prescription, I know that lot of coders does not like to hear this - since they want to code and not write tests, soma prescription, documentation etc. Soma prescription, - but I think nowadays, soma prescription, a serious programmer, soma prescription, no matter how much she would like to concentrate on hacking up feature MyNextCoolStuffWhichWillShakeTheEarth has to master these things. Soma prescription, In the long run, soma prescription, any software that is undocumented, soma prescription, tested and continuously refactored will turn into Spaghetti quite easily.
Soma prescription, That said, soma prescription, these chapters were excellent for me. Soma prescription, I have experience with these tasks in Java - however, soma prescription, the toolset is radically different in some cases (like Ant vs. Soma prescription, Rake) and even if it is similar (Unit tests, soma prescription, rdoc vs. Soma prescription, JavaDoc) the re-learning of them was inevitable. Soma prescription, Fortunately, soma prescription, with the help of these recipes it was a breeze to learn them in Ruby (well, soma prescription, I have to add that actually these things (as nearly everything else) are considerably easier to do in Ruby, soma prescription, so the ease of learning stems from this fact as well). Soma prescription,
Soma prescription, Rake absolutely rocks. Soma prescription, Maybe I am also concerned because I have been working with Apache Ant a lot - well, soma prescription, if the ratio between Ruby and Java code is say 1:10, soma prescription, then the ratio between Rake and Ant files is 1:50 if we also consider simplicity, soma prescription, maintainability and understandability. Soma prescription,
Soma prescription, Finally, soma prescription, if you also plan to release your software, soma prescription, the chapter Managing and Distributing Software can come handy. Soma prescription, I think if you would like to distribute your stuff to the masses, soma prescription, packaging it into a gem is inevitable - rubygems are so cool that they made Rubyists too lazy to download something from a site instead of launching ‘gem my_cool_software’.
Conclusion
If you would like to become a serious Ruby hacker, soma prescription, don’t hesitate to buy this book. Soma prescription, In my opinion it is absolutely worth every cent - and even more. Soma prescription, My only problem is that there are no more recipes - however this is not a critique but rather a compliment: you simply can not get enough - not even from nearly 900 pages. Soma prescription, One could argue that some things are missing or he would rather see this instead of that (I believe the authors themselves have had some tough time deciding these matters) - but I guess everyone agrees that the material which made it to the book is absolutely top-notch. Soma prescription, 5 out of 5 stars - a great addition to anyone’s Ruby bookshelf.
Notes
Soma prescription,
Soma prescription,
Soma prescription,
Soma prescription,
Soma prescription,
Soma prescription,
Soma prescription,
Similar Posts:lexapro online,soma prescription,reductil for order,zoloft pills,purchase valium online