Tagged: Java Toggle Comment Threads | Keyboard Shortcuts

  • Michael Krakovskiy 5:55 pm on September 29, 2006 Permalink | Reply
    Tags: , Bangladesh, , , , Conservation reliant species, EDGE Species, Extinction, , High-level programming languages, , Java, Javan Rhinoceros, , O'Reilly Media, , , Python, , Sebastopol, , ,   

    O’Reilly Book Covers 

    Joel Spolsky wrote about an interesting limitation that he encountered when choosing a cover design for his book:

    “And although they would not put a doggie on the cover of my book as I requested, because a certain other book publisher threatens to sue his competitors when they put anything animal like within 90 feet of their covers, their graphic designer worked overtime to create underground cover art called “User Interface Design for Doggies” complete with three golden retrievers, which they framed and sent to me. All in all a classy operation and highly recommended if you’re thinking of writing a computer book.”

    The publisher is, of course, O’Reilly Media. The are famous for publishing computer programming books with engravings of animals on the covers. Like any programmer’s, my bookshelf holds a pretty sizable zoo of these critters. The question that always comes to mind is what guides the selection – how the publisher decides which animal to match with which technology. Here’s what O’Reilly editors say:

    “Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects.”

    Well, with some books it’s clear – a spider for a webmaster book and a python for a Python book, for instance. But why does the Perl book have a camel? Wouldn’t an oyster make a lot more sense?

    Update: Joe Grossberg commented that camel was chosen “because Perl uses camelCase for capitalizing variables”. John (website or last name not included) said that “camel was picked for Perl because of the quip that it was a ‘horse designed by a committee'”. I like John’s version much better :)

    Joe also started a Wikipedia article on the subject.

    One of the more understandable conventions is using Javan animals on Java-related books. For instance, the Java book has a Javan tiger and the JavaScript book has a Javan rhino.

    O’Reilly colophons rarely give too much insight into why that particular animal was chosen for the cover, but sometimes you might read between the lines:

    “Like the crustaceans after which they are named, crab spiders walk sideways or backwards. They feed on bees and other pollenizing insects, often laying in wait for them by hiding on flowers.”

    “Both male and female pythons retain vestiges of their ancestral hind legs. The male python uses these vestiges, or spurs, when courting a female”

    “Folklore has long held that the horn of the rhinoceros possesses magical and aphrodisiacal powers, and that humans who gain possession of the horns will gain those powers, also.”

    “Tigers are the largest of all cats, weighing up to 660 pounds and with a body length of up to 9 feet. They are solitary animals, and, unlike lions, hunt alone.

    There are some tigers, however, who have developed a taste for human flesh. This is a particularly bad problem in an area of India and Bangladesh called the Sunderbans.”

    The ironic thing is, Javan tigers are extinct and there are only about 100 Javan rhinos remaining. Is that a dig at these languages?

    One of the most ironic, yet clearly unintentional choices was that of a stingray for the cover of ASP.NET in a Nutshell.

  • Michael Krakovskiy 5:17 am on February 18, 2005 Permalink | Reply
    Tags: , , , , Functional languages, functional programming, Java, , , Procedural programming, , , , Source code, Subroutine, Variable,   

    Side Effects Of Programming 

    “Nelson: Ah, he’s the greatest showman since that kid who eats worms!
    Kid Who Eats Worms: My 15 minutes of fame are over!”
    The Simpsons, Episode 3G02

    The post about Durian seems to have been the most popular one in the recent history of deadprogrammer.com . This once again proves that eating gross things is entertaining to the masses. To prevent the surging popularity of my blog I absolutely must write a little bit about something that I almost never write about. Programming.

    My co-worker who could not understand why he could not increment a variable in XSLT found an amazing piece of technical writing in an O’Reilly book about XSLT. Here it is:

    “Although these XSLT variables are called variables, they’re not variables in the traditional sense of procedural programming languages like C++ or Java. Remember that earlier we said one goal behind the design of the stylesheet language is to avoid side effects in execution? Well, one of the most common side effects used in most procedural languages is changing the value of a variable. If we write our stylesheet so that the results depend on the varying values of different variables, the stylesheet engine would be forced to evaluate the templates in a certain order.

    XSLT variables are more like variables in the traditional mathematical sense. In mathematics, we can define a function called square(x) that returns the value of a number (represented by x) multiplied by itself. In other words, square(2.5) returns 6.25. In this context, we understand that x can be any number; we also understand that the square function can’t change the value of x.

    It takes a while to get used to this concept, but you’ll get there. Trust me on this.”

    (full text here)

    The quote that I highlighted in bold absolutely gets me. Yeah, that’s one good side effect. I get the feeling that XSLT was committee designed with the specific purpose to make life miserable for programmers. Also that committee must have had some really good stuff to smoke.

    Uh, see, now this is what happens when you try to write programs without actually understanding computer science fundamentals. I did not realize that XSLT was functional, not procedural. Like most mediocre programmers out there I was not exposed to much functional programming (I did try to teach myself Lisp, but quickly gave up). Having to do a lot of SQL(which is near-procedural) over the years improved my understanding of functional programming, but not enough to realize what the XSLT book was talking about (reading it from beginning would have been helpful too). Now hardware XSLT accelerators, which made me laugh when I first heard about them, make sense too.

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc