I moved
Stop reading here, it is no longer my hangout. All future posts are being made on TrotterCashion.com. It’s ruby, nginx, and more fun. Enjoy.
Stop reading here, it is no longer my hangout. All future posts are being made on TrotterCashion.com. It’s ruby, nginx, and more fun. Enjoy.
Well, last Tuesday nyc.rb turned three years old. Of course, we were not content with just turning three, so we decided to start taping our presentations also (By we, I mean me, because I have a video camera and turned it on). Francis gave a testing clinic, while yours truly gave a talk on refactoring. Both talks are available on Motionbox (the Rails video site at which I work) at this playlist.
To make things easier for you, I’ve also embeded the videos after the jump. Francis’s video is first with mine second. Sorry for the occasional fuzzy video quality, I’m still not good at filming presentations.
Though building sites with ssl is cool and gives your users a sense of security, configuring a webserver with ssl can be a royal pain. Thankfully, there’s pound. Pound is a “is a reverse proxy, load balancer and HTTPS front-end for Web server(s).”
Pound is dead simple to setup and configure. Unfortunately, the darwin port for pound is old and does not work. So this guide will help you build pound on your own. Besides, everyone feels cooler after compiling that hot fire. Click on for the steps.
Just a reminder when working with arrays of objects generated with Active Record.
[Model.find(1), Model.find(2), Model.find(3)] - [Model.find(1)] != [Model.find(2), Model.find(3)]
This does not behave as you would expect, because array subtraction compares elements on their object ids. Each find generates a new object, with a new id, so subtraction does not work. To get the behavior desired, do this instead:
to_be_removed = [Model.find(1)].map{|m| m.id}
[Model.find(1), Model.find(2), Model.find(3)].
delete_if{|m| to_be_removed.include?(m.id)}
It’s not as beautiful, but it gets the job done.
I was really on a roll there for a while, right? A gem of a post every day or so, presentations at meetings, reading on scheme and now, I’m nowhere to be found. Well, please allow me to explain. It goes like this: got new job, quit old job, working both jobs for two weeks until finished with my final two weeks.
So yes, working two jobs is keeping my quite busy right now, leaving very little time for any decent posting. Wait until next week, when I’ll once again make you privy to the thoughts bubbling around in my head.
In the meantime, I’ll leave you with a nice unordered list of what’s been catching my eye:
You can look look forward to (or know to avoid) posts on these topics as soon as I’m able to return.
I read an article a few years ago, I believe in Guitar World, written by famed Phish guitarist Trey Anastasio. In it, he explained that one of the keys to being great at guitar is to know how to get to ‘C’ from any other note on the fretboard. Once this is known, he explains, this knowledge can be transferred to every other key.
So what does this have to do with programming? A lot I believe. Read the rest of this entry »