Posts in the “programming” category

To be a programmer is to develop a carefully managed relationship with error

“To be a programmer is to develop a carefully managed relationship with error. There’s no getting around it. You either make your accommodations with failure, or the work will become intolerable.”

~ Ellen Ullman (via this tweet)

This quote makes me think of all those years of exception-handling with Java. I never knew there was a better way to handle errors, so I developed a strategy of letting my exceptions bubble up to the controller level (as in model/view/controller), where I would deal with them. These days I know I can use Option/Some/None in Scala, as well as Try/Success/Failure.

Phrases to use instead of “foo bar baz”

As I get close to releasing the Second Edition of the Scala Cookbook, I’m trying to use the “foo bar baz” phrase less often, and trying to find better and more meaningful phrases. Thanks to Arrow and The Flash, one phrase I’m using is “Big Belly Burger.”

If you know any great phrases to use to help rid the world of “foo bar baz,” let me know here on Twitter. Here are a few I just looked up:

bond, james bond 
clear eyes full hearts can’t lose (friday night fights)
elementary, my dear Watson 
fasten your seatbelts 
frankly my dear 
gonna need a bigger boat 
hasta la vista (baby)
here’s looking at you kid
I see dead people 
just keep swimming
make my day
no crying in baseball 
not in kansas any more 
of all the gin joints 
open the pod bay doors, HAL 
pass the beernuts (Cheers)
play it again sam
show me the money
shaken, not stirred
Soylent Green is people 
the walking dead 
too much fruit (in the house)
who’s on first?
why so serious?
you talking to me? 
you’ll thank me later

An article on the problems with OOP

There seems to be a lot of OOP-bashing lately, which I’m not a fan of, but this article titled Goodbye, OOP makes decent points about the problems with inheritance, encapsulation, and polymorphism. IMHO, OOP still makes sense in certain areas, including GUIs like Java Swing and JavaFX, so I’m not ready to throw it out completely or bash it.

Higher order functions *are* the Haskell experience

This is a great way to put this: “Higher-order functions aren’t just a part of the Haskell experience, the pretty much are the Haskell experience.”

(A “higher-order function” is generally defined as (a) a function that can take a function as an input parameter, or (b) returns a function as a return value.)

The quote and image come from this LYAHFGG page.

Land of Lisp (book)

Land of Lisp is one of the most interesting, quirky books I’ve read in quite a while. IMHO, Lisp can be a tough language to read, but the author, Conrad Barski, keeps it interesting.

A little Lisp interpreter

In the last post about Mary Rose Cook, the reason I originally found her work again today is because she wrote a Little Lisp interpreter in JavaScript. (116 lines of code.) As shown in the image, the beginning of the article is a very quick introduction to Lisp.