In my last blog post, I introduced the idea of a PostgreSQL array, and showed how we can insert data into a table using either the curly-brace {} syntax, or the ARRAY construction syntax. In this post, I want to talk about PostgreSQL indexes and length — what happens when we retrieve ...
I’ll admit it: When arrays were added to PostgreSQL a number of years ago, I thought that this was a really bad idea. I’m a firm believer in normalization when it comes to database design and storage; and the idea of putting multiple values inside of a single column struck ...
If you use a modern, open-source Unix shell — and by that, I basically mean either bash or zsh — then you really should know this shortcut. Control-R is probably the shell command (or keystroke, to be technical about it) that I use most often, since it lets me search ...
It’s always fun to start a new project. I should know; I’ve been a consultant since 1995, and have started hundreds of projects of various shapes and sizes. It’s tempting, when I first meet a new client and come to an agreement, to dive right into the code, and start ...
I teach Ruby and Python to a lot of people — in formal courses, and in one-on-one pairing sessions, both online and in person. I’ve found that for many people, the whole notion of functional programming seems strange and difficult, as well as something of a waste of time. After ...
We’re nearly at the end of my tour of the “reduce” function in Ruby and Python. Just as I showed in the previous installment how we can implement the “map” function using “reduce”, I want to show how we can implement another functional-programming standard, “filter”, using “reduce” as well. As ...