Ruby Cookbook

by Lucas Carlson and Leonard Richardson

Ruby Cookbook (Cookbooks (O'Reilly))

I have a confession to make. Over more than twenty years as a programmer I’d never really had my head around object-oriented programming. I started out using C and then tried PHP and Perl and treated both as purely procedural languages (indeed, one Perl guru looked at my code and said “you were a C programmer weren’t you”; humbling). Java, JavaScript, C++ and even Objective C had their turn at getting me to convert but none took (though I do code JavaScript under sufferance) until Ruby. A few month ago I started using Rails and became hooked on it and the underlying language. My Rails and Ruby skills have progressed in leaps and bounds. I’ve already had a good read of “Programming Ruby” and “Agile Web Development with Rails” and enjoyed and learnt from both.

I also have to admit to loving the O’Reilly “Cookbook” series. Several, particularly the “Perl Cookbook”, have pride of place on the bookshelf closest to my computer. So the “Ruby Cookbook” by Lucas Carlson and Leonard Richardson was eagerly awaited. The “Cookbook” series are designed to provide you with a plethora of code examples to guide you in writing your own code. I’m definitely a hands-on style of learner and the Cookbook series suits my style – I can start getting my hands dirty with complex problems knowing I have help to code my way of out of the tight spots. This one covers a wide range of tasks from simple, such as walking a directory tree or manipulating text and numbers, through to more complex such as working with AJAX in Ruby on Rails. If you have’t previously come across a book in this style then each chapter is broken up into a number of ‘recipes’ with a problem, a solution and then discussion of the solution.

This sort of book lives and dies by two criteria – the quality of the code and the usefulness of the recipe selection. “Ruby Cookbook” wins on both. The topics covered are wide and leave little, if any, part of the language unexplained. They start with data and structures such as strings and hashes before moving on to code blocks, objects, classes and modules. There is then an intriguing chapter on reflection and metaprogramming that I am still puzzling through before the book moves on to more internet based topics such as XML, HTML, web and internet services and, of course, Rails. The book then proceeds with chapters on the necessary housekeeping of development such as testing, packaging and automating tasks with Rake before finishing with extending Ruby with other languages and system administration tasks. The code is well written; clear and well commented, easily understandable by a virtual newb like me. The discussion is fairly clear, seemingly concise while allowing you to understand the code and how it might be changed for particular purposes.

I’m not going to go into more details as to the contents but instead point you to the book’s page at O’Reilly which includes a link to the contents, listnig all the recipes in the book, and two example chapters; Chapter 7 on code blocks and iteration and Chapter 15 devoted to Rails. Together they will give you a good feel for the style and contents of the book.

The book is well written and well edited. I’ve already tried over a dozen of the recipes and haven’t found a single code error, so my faith in the other 300 or so has risen considerably. The discussion that accompanies each recipe is a marvelous way of learning just that little bit more about the language. I found them quite good, though the odd one could do with further explanation if the book is to stand on its own – for example the discussion accompanying the recipe to iterate over a hash was not perfectly clear on the difference between Hash#each and Hash#each_pair.

At more than 800 pages this is a large and extensive volume, though the price may make you wince. Usually programming books this large have at least part of their size dedicated to something I refer to as pseudo-padding, some sort of reference or simple language explanation – this one has neither, all of it is devoted to the recipes.

With Ruby use, thanks in no part to the popularity of Rails, growing by leaps and bounds I’m sure this volume will be a well deserved bestseller. I give it an eight out of ten and recommend it to all but the most expert Ruby programmers. For beginners who, like me, appreciate hands on learning it is a must.


Perl Best Practices

I have to admit that I can bristle at books that try to preach, so Perl Best Practices was on a hiding to nothing when I came to review it. I also have to admit to being torn about the author — after all, he is one of those poor fools who insist on living in cold, unenlightened Melbourne, while I live in vastly superior Sydney. On the other hand, how can I dislike a man who manages to place a quote that involves my favourite character, Lady Bracknell. from my favourite comic play, ‘The Importance of Being Earnest,’ in the first few pages of his book?

Many years ago I read a marvelous article that explained why so may early editors and word processors supported the keyboard commands of WordStar. When it’s first born, a baby duck can be easily convinced that almost anything is its mother. The small bird imprints, and it takes a lot to shift its focus. “Baby Duck Syndrome” affects programmers in a number of ways, not just their choice of editor, and Conway is walking right into the middle and arguing with your imprinting on almost every page. A brave man; fortunately he has the street cred to make you at least listen.

So I carefully placed my bias and bigotry in the bottom drawer and prepared myself. I discovered a well-written, informed and engaging book that covers a number of methods (hey, 256 rules, come on Derrick, 2 ^ 8 rules can’t be a coincidence!) for improving your Perl software when working in a team. That means all of us when you remember an adage a guru once told me: “Every piece of computer software, no matter how small, involves at least a team of two — me, and me six months from now when I have to fix it.” Conway puts it differently “Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.”

The first chapter outlines the why and where of the book. The why is to improve your code with three goals; robustness, efficiency and maintainability. The chapter finishes with a short exhortation to us to “rehabit.” Don’t like the word much but I applaud the aim.

Conway is far from timid. He jumps right in to the deep end of the wars, with formatting the appearance of your code. I thought the chapter was brilliantly written until he told me I shouldn’t “cuddle else statements,” at which point I realized what an ill-informed idiot he was. Oh, hang on. Hey, that almost makes sense. OK, that’s a cogent argument for your point of view, Conway. I also have to admit that earlier you did say that your rules for this bit weren’t gospel, that if you wanted a variation that was OK, just have a standard and make sure you can support it with a code prettier. Perhaps not a total idiot after all.

After successfully negotiating those shark infested waters, Conway — obviously a man who knows no fear — wades into naming conventions. Once again he gives coherent arguments, pointed examples and counterexamples. It all makes sense.

The book’s page at O’Reilly has an example chapter and a good description, but no table of contents so here’s a quick list of the headings:

1. Best Practices

2. Code Layout

3. Naming Conventions

4. Values and Expressions

5. Variables

6. Control Structures

7. Documentation

8. Built-in Functions

9. Subroutines

10. I/O

11. References

12. Regular Expressions

13. Error Handling

14. Command-Line Processing

15. Objects

16. Class Hierarchies

17. Modules

18. Testing and Debugging

19. Miscellanea

Suffice to say that Conway leaves no corner of Perl uncovered, offering well-reasoned and well-explained advice on improving your Perl code.

The book is also well-written and well-edited. The order of topics covered is a sensible one, and the book is appropriately structured. It reads and feels as if you are being given the wisdom from many a hard-won battle coding and maintaining Perl code.

My one complaint is that I found it dry: you are reading through pages of argument and examples without much relief. Perhaps this book might be best digested in a number of chunks, making the effort to use the ideas from each chunk for a while before moving on to the next.

Every so often I read a book from O’Reilly that makes me fear that they are slipping, then along comes a book like Perl Best Practices, and I’m reminded that when it comes to Perl, O’Reilly authors wrote the book. Once you’ve rushed through Larry’s book and learnt the finer points with Schwartz and Phoenix’s ‘Learning’ titles, you may well find that this is the perfect volume to complete your Perl education. If you believe your Perl education is complete, then buy this volume and I’m sure you’ll find a lesson or two for yourself.

This book is not really aimed at the occasional Perl programmer (though many of us would probably benefit from its wisdom), but at the person who is professionally programming in Perl and wants to produce better quality, more easily maintained code. For this person Perl Best Practices is a 5. For the rest of us, the ‘rehabiting’ process might be a little too arduous; personally, I’m going to pick a few of the chapters and work on those for a while, maybe naming conventions and variables. For me I’ll give it 4 stars.

Visual Basic 2005 Jumpstart

by Wei-Meng Lee

Visual Basic 2005 Jumpstart

The tag line for “Visual Basic Jumpstart” is, ‘Make Your Move Now from VB 6 to VB 2005’, but the book also includes introductory and summary material rather than staying focused on VB 6 users. The book has a few good examples and some useful information about Visual Basic 2005, but the information, including links to the Internet, doesn’t seem complete or up-to-date. This book isn’t the help you need.

My current (small) applications are in Access and Visual Basic for Applications rather than VB 6, but with that caveat I’m part of the audience for this book, since I’m actively considering moving them to Visual Basic 2005. I want to like this book more than I do. Part of my confusion is that all of the chapters are useful, but I don’t think they’re useful to the same people.

I have no idea who the audience is for Chapter 2, “Programming with Visual Basic”. Some of the information is useful and relevant, with specifics on differences between VB6 and VB2005, but some of it just seems plain silly: “Just as in VB 6, in VB 2005, you make decisions using the If-Then-Else construct”. The wording is sometimes odd, too. The fact that parentheses in function calls are now mandatory in VB 2005 is explained backwards: “VB 6 Tip: In VB 6, you can call the PrintMessage subroutine without using parentheses to enclose the parameter list.” The chapter could have been collapsed into a very clear and not very large table giving the differences between VB 6 and VB 2005.

In VB 2005, Microsoft has introduced a new bag of functions under the My. namespace. It’s not a very big bag – it feels like the product manager wrote down the first four or five functions he thought of. For example, My.Computer.Network contains just five elements: IsAvailable, DownloadFile, UploadFile, Ping, and the NetworkAvailabilityChanged event. Jumpstart describes it as ” … one of the most useful and unique additions to VB 2005 … The aim of the My namespace is to provide direct access to commonly used libraries in the .NET framework that were previously difficult to access.” I’m sorry, that just sounds too much like a press release.

If you’re really interested in the status of a network interface, for example, you need to look in the 30+ classes in the System.Net.NetworkInformation namespace. But this is not included in the list of “some other useful namespaces in the .NET framework” (p61). Also, Example 4-3 (p117) uses the System.Net.HttpWebRequest and System.Net.HttpWebResponse classes to download an image, not any of the classes mentioned in Chapter 3.

On the face of it, Chapter 3, “Putting Object-Oriented Programming to Work”, provides a very clear and thorough introduction to the object-oriented programming constructs in VB 2005. Unfortunately, it’s not complete. Microsoft has a summary of “Object-Oriented Programming for Visual Basic 6.0 Users” which points out that the Binary Compatibility option from VB6 is no longer supported in VB 2005, but this is not mentioned in Jumpstart.

If you’re moving from VB6 to VB2005, you’re also moving to NET 2.0, but the book has only the most cursory introduction to NET 2.0. Part of the problem is that the book needs to be either more or less reliant on online information. If it was less reliant on online information, it would be more useful as a stand-alone resource. If it was more thoroughly linked to the estimable resources at, it would be more complete and up-to-date.

Jumpstart mentions two MSDN Help Topics: “Programming Element Support Changes Summary” and “Help for Visual Basic 6.0 Users”. The former is very useful, perhaps more useful than found in this book, although it’s organized in MSDN’s one fact per page style. The latter can only be found via Google, since it is now part of MSDN2, the “new MSDN” for Visual Studio 2005 and SQL Server 2005. MSDN2 is not mentioned in the book, nor is VBRun, the Visual Basic 6.0 Resource Center, which has a boatload of information on moving to VB 2005.

The database application in Chapter 4, “Developing a Windows Application” is useful and clearly presented. It’s a nice example of the new SplitContainer control. But it’s no better than examples in other introductions to Visual Basic, and it’s a little hard to see how it’s suited to the stated purpose of this book – of introducing developers with an existing Visual Basic 6 code base to Visual Basic 2005.

The term “jumpstart” cuts both ways. The goal of the book is to give VB6 programmers a rapid introduction to Visual Basic 2005. But the book itself was published rapidly – before Visual Basic 2005 was released – and some of that speed shows. On page 126, Jumpstart instructs you how to configure Windows XP to run IIS, but on page 139 points out that this isn’t possible in XP Home.

Chapter 5, “Building Web Applications”, explains that Visual Studio includes its own web server, so you don’t need to run IIS, but the fact that Visual Basic 2005 Express doesn’t include this feature is mentioned only in the preface (page xi). To provide IIS, you need either Windows XP Professional, or Visual Studio Standard or above, or Visual Web Developer 2005 Express. Wouldn’t it make sense to explain the various combinations of operating systems and Visual Studio editions in one place, at the beginning of the chapter where they’re relevant?

I’m not an ASP programmer, but I feel as though the 35 pages devoted to ASP probably aren’t enough to give the topic a decent introduction, which perhaps deserves a separate book. For example, authentication is covered in just three short paragraphs. The 35 pages could have been devoted to something more central to the topic, such as more details on .NET 2.0. Obviously, there are other books on .NET 2.0, but while you can use Visual Basic 2005 without ASP, you can’t use it without .NET 2.0.

If we take the book’s tagline seriously, Chapter 6, “Moving from VB 6 to to VB 2005”, should be the core of book, but it seems like more of an afterthought. Much of the content is from Artinsoft. Rather than reading about about it third-hand in this book, or second-hand on MSDN, I recommend you go to the the Artinsoft web site, where they have plenty of information for download.

It’s hard to put a numerical rating on a book like this, which doesn’t seem focused or particularly thorough, but still contains a lot of useful information. The book could have been better if it had been linked more systematically to Microsoft’s online resources. It might have seemed better if the audience had been clearer. A rating of 5 (“Neither terrible nor terribly good”) seems about right. By all means buy the book if you think it will be worth the money to have the information and examples in book form. Just don’t expect too much.

Unix Shell Programming, Third Edition

by Stephen Kochan
Unix Shell Programming, Third Edition
Back when dinosaurs roamed the earth and NCR made Unix computers I first started to program for a living. Back then when someone said `script’ they meant a shell script, generally for a Bourne shell.

Now that we have languages such as Perl and Python, much of shell scripting has been forgotten. The need still arises for the times and places where running Perl would be just that little bit too much overhead; cron jobs, process start and stop scripts, even machine start and stop scripts. For these we could best go back to the old ways. Combining the power of the common Unix tools, pipes and scripts in a fairly obscure and slightly arcane syntax is not easy to pick up, though the language’s simplicity does, in some ways, make it easier than more complex ones such as Perl. Unix Shell Programming, Third Edition does a good job at introducing shell programming and I found it an excellent book when I needed a refresher.

I don’t want to sell this volume short: you won’t just learn about shell programming. The first ninety or so pages provide an excellent guide to getting the best out of the shell, and the last chapter is devoted to the features specific to an interactive shell such as command-line editing and using the history.

The authors have chosen to use the POSIX standard Bourne shell (`bash’, available on many *nix systems, is a superset of the POSIX standard). That seems the right decision, given that it is so universally available and usually the default shell.

The book is well structured, starting out with a brief look at *nix operating systems before introducing the shell followed by some basic tools; cut, paste, sed, tr, grep, sort and uniq. One minor quibble, the book explains how to redirect STDOUT to a file and STDERR to a file, but not how to redirect both to the same file. That aside, these few chapters provide a good introduction to the shell.

The text goes on to systematically explore shell programming starting with variables and arithmetic. The chapters are kept short, in a good order and have a number of exercises at the end of each. The structure of the book and the order each new concept is introduced is well thought out; at each stage small examples are given that only use material already introduced and are complete in performing a task. In early chapters they are fairly trivial but by the end there is a fairly complete rolodex program written in shell script that would be a good model for anything you wished to do.

There is also a good summary of the shell syntax and common commands in Appendix A and good `Further Information’ in Appendix B. Kudos must go to the authors for a list of books for further reading that is not ashamed of mentioning other publishers, indeed they say “One of the best sources of books on Unix-related topics is O’Reilly and Associates” and list volumes from them before mentioning their own publishers.

There are some small typographic errors in the text but I did not find any in the script examples I tried. I found it to be well written and readable throughout, perhaps an advantage of a third edition in a slow moving technology.

I would recommend everyone read this book once or twice, it provides a comprehensive, well written tutorial on one of the most basic (and often overlooked) tools at your disposal. Even Windows users could install Cygwin and gain the benefit of a good POSIX compliant shell and this book. It also has the advantage that once purchased it will be useful for many, many years to come – the language has not changed noticeably in twenty five years and should not change in another twenty five.
gangbang free movie clipsfree fucking movies interracialgay full moviessoundtrack grind movie thesample hot moviehuge boobs moviesholes movie disneymusclemenxxx movies Map

Head First Java

Earlier this year I decided to learn Java. Grabbing a copy of ‘Learning Java’ from O’Reilly I started learning.

Of course, you can’t learn Java without a good understanding of object-oriented languages. I made fairly heavy going with ‘Learning Java’ until I decided to dive in head first, ‘Head First Java’ that is – I bought this book that has a totally different attitude to teaching than I’ve seen before in computer books. The style is humorous, full of graphics, cartoons, puzzles, quizzes and crosswords. It reminds me of the textbooks that used to try and teach me geometry and algebra in high school or my daughters elementary books on Roman and Greek history I purchased for her at the British Museum. The style didn’t work to teach me much algebra and geometry, but I wasn’t anywhere near as motivated. This time, it worked. In a couple of weeks I worked through the book and finally have Java skills where I can branch off and start coding the projects I had in mind (though something more advanced will be required soon.)

In the introduction the authors examine learning and explain why they designed the book as they did. To quote from one section: “Some of the Head First learning principles. Make it visual. Put the words within or near the graphics. Use a conversational and personalized style. Get the learner to think more deeply. Get-and keep-the reader’s attention. Touch their emotions.” They argue that our brain is tuned to novelty, and that their style provides the novelty to keep your brain turned on. They also provide ten tips for good learning. That’s one thing that seems to set this book apart from most other computer books, they say they think of their reader as a learner and indeed that’s the way you are treated by the book.

The book also has a good emphasis on test-driven development, a good style to get new programmers started. I also appreciated the excellent chapter on how to package all your code up for release, something that you might expect to be trivial but not quite as easy as expected.

When compared to ‘Learning Java’ the coverage is not as good, ‘Head First’ really only covers the basics, up to and including creating a GUI with SWING and then touches a number of others; ‘Learning Java’ goes on to explore, with a fair depth, network programming, web programming, servlets, applets, Java Beans, XML and other topics that are only touched on briefly in ‘Head First.’ If the style of learning does not suit you then this will be an incredibly irritating and useless book, I’d give it a try first, though.

This edition also has a fair number of errors, including some in the examples. To this all I can say is “shame, shame, shame.” I keep on harping on this in computer book reviews but if you can’t figure out a way of including code that compiles and/or runs in your book then give up. The example code is available online – how hard is it to check that it all runs and then include that source directly into the text.

When you get down to it, though, the only way to really decide on the worth of a tutorial is to decide how well it teaches. ‘Head First Java’ excels at teaching. OK, I thought it was silly, I had a hard time making myself do the exercises, fill out the crosswords and solve the puzzles. Then I realized that I was thoroughly learning the topics as I went through the book. ‘Learning Java’ was doing the same job, but the dry traditional method wasn’t doing as well. Both books are well written, designed and constructed-the style of ‘Headfirst Java’ just made learning, well, easier.

It would seem to me that the ‘Head First’ approach is going to work wonderfully for the more ‘beginner’ topics, books for introducing you to a new style of programming, a new language or a radically different operating system or application. So if you’re looking for a book to introduce you to Java then I can recommend ‘Head First Java’. Now if I could only find a book as good to introduce me to Common Lisp.

movies downloaded milfhunter freeshemale gallery movie freewindows free movie makermovie soundtrack holes theaction movie figures horrormovie nude connelly jenniferbondage lesbian moviesmyers movies mike Mappayday on report consumer loansloan interfamily contract free familycortaderia feather selloana whiteloan countrywide chandler az homeloans for home countrywide profit foreclosureloans rates home interest countrywidecountrywide richmond va loans homehome testimonials countrywide loans Map

Software Tools

by Brian Kernighan, et. al.

Elsewhere on my site I reviewed Kernighan’s “Elements of Programming Style.” To quote one paragraph from that review –

Brian Kernighan has co-authored three books almost essential to learning our craft, this volume, “Software Tools” and “The Unix Programming Environment”. “Elements of Programming Style” spells out the fundamental rules, “Software Tools” shows you how to apply them to a number of simple projects and extends the rules to software design and finally “The Unix Programming Environment” shows you how to use them in an operating system designed to reward you for your effort.

It could be said that “Elements” teaches programming and “Software Tools” teaches software design. Rules such as “do just one thing, do it well” seem to seep in through the pores as you read and work through this book.

It presents a number of projects starting with a word count program and progressing through some filters to some fairly complex tasks culminating in a RatFor pre-processor for Fortran. All the examples are written in RatFor, a version of Fortran that adds some more structured elements to that early language.

Don’t be put off by the use of RatFor, the language is easily understood and the style of programming so clear that the algorithms are easily understood. I’ve personally translated a fair number of them to both BASIC and C and the RatFor pre-processor design became the basis for an AppleSoft BASIC pre-processor written by a close friend.

I’ve relied on this book so much for the last ten years, after writing “Hello World” I drag it out and translate a couple of the tools into every new language I’ve learnt. I then spend a day or two thinking about and implementing a design optimised for the new language. After that I find I have a good handle on a language and how to design for it.

This volume is not for those who want a book that gives them pre-written tools, a fair number of the tools are standard issue on any Unix derivative and the code is only tersely commented, relying on the exaplanatory text. However I recommend this book to all software designers and programmers because as you work through these examples you will learn a great deal about honing your craft.

Buy This Book Now

motorola totally ringtones free downloads

In the UK, possession of motorola totally ringtones free downloads in an examination can result in immediate disqualification from that subject or from all that student’s subjects.

treo 755 ringtones

Operators use treo 755 ringtones of predesignated frequency bands determined by the network requirements and local regulations.

cellar us ringtones

This was followed by cellar us ringtones in cellar us ringtones usage, particularly in Northern Europe.

hacks verizon ringtone

6 SMS sent per day per person across hacks verizon ringtone hacks verizon ringtone subscriber base.

cordless vip vtech phones ringtones and

For example, cordless vip vtech phones ringtones and Razr V9C costs upwards of CAD $500.

its warning wife the download ringtone

Fixed phones of the late 20th century and later detect this AC voltage and trigger its warning wife the download ringtone tone electronically.

wildlife for sounds ringtones

Also, users in the United States can sign up through their provider for free text messages when wildlife for sounds ringtones Alert goes out for a missing person in their area.

ringtone yamaha

Fixed phones of the late 20th century and later detect this AC voltage and trigger ringtone yamaha tone electronically.

maker ringtone

For maker ringtone mainland, it was reported that both of its two operators will adopt the caller-pays approach as early as January 2007.


The European market adopted ringtone Party Pays” model throughout the GSM environment and soon various other GSM markets also started to emulate this model.