Archive for the ‘programming’ Category
Friday, July 9th, 2010
I keep a text file open as I work, and when I learn something, or fix a bug, I make a note of that in the text file. I call it my journal. It’s pretty low-tech, but text search turns out to be a sufficient way to look up past experiences when I find myself thinking “this problem seems so familiar”. There’s another benefit too: I find keeping simple notes about what I’m doing—what problems I’m solving, what approaches I’m using, what’s working and what could work better—keeps me focused on my goals. It turns out learning a programming language or a web framework is not as hard as training your mind to solve programming challenges efficiently.
Here are some things from my journal: I’m working on a Rails 3 app right now, something I plan to flog and promote mercilessly in upcoming posts. I’ve encountered some mysteries for which there was no simple HOWTO information easily available via web search. I thought I’d share the answers I cobbled together:
- How to get RSpec and RSpec-Rails for Rails 3;
- How to make devise routing work with related nested routes;
- How to spec controllers that use devise to restrict access to logged-in users;
- How to get
verify :method to work in Rails 3.
(more…)
Tags: authentication, devise, http methods, openID, REST, routing, Rspec, verify, warden
Posted in Rails, Ruby, programming | No Comments »
Tuesday, June 29th, 2010
I need to clarify my interests. I keep getting calls from recruiters who want to hire me to do Perl or database management. So, I am trying out an experiment in self-analysis by describing my enthusiasms as they relate to specific programming languages. I am currently interested in the web software applications of Ruby, JavaScript, and Clojure.
It isn’t all about programming languages. There are topics and concerns that span software development and computer science. But PLs are one great way to summarize one’s experience and efforts. And I’m a language nerd, so I like PLs as ends in themselves. So, here is my little essay on the 3 languages I like most right now, and, more importantly perhaps, what I want to do with them in the coming months. This is my summer of hustle, and this post is part prelude, and part wishful thinking, about all the things I’d like to tackle.
(more…)
Tags: asynchronous, collective intelligence, concurrency, data science, design by contract, functional programming, LinkedIn, mustache, okasaki, resume, statistics
Posted in Rails, Ruby, clojure, hustle, javascript, professional, programming | No Comments »
Wednesday, June 16th, 2010
At RailsConf, Jeremy McAnally noted that no one had built a new-style Rails generator for the mustache template system. So I’m giving it a try. You can see my progress so far on github. I’ve forked the rails3-generator project started by José Valim and carried on by several contributors, and I’ve added just a little bit of support for mustache file creation in controller and scaffold generators. I was greatly helped by Paul Barry’s post on adding a Haml generator to the same project.
The next steps are to flesh out the generator templates and try to get a working mustache template engine. Mustache and Rails don’t officially work together yet. That’s a goal for mustache 1.0. I’m excited, however, about Martin Gamsjaeger’s promising implementation.
I’d like to see a gem that gives you complete Rails support for mustache: the template engine, generators, helpers, and documentation. I’d also like to see the gem work with Tilt, which claims to provide a generic interface to mustache already.
If you’re interested in helping, well… fork me!
Tags: generator, github, mustache, rails3
Posted in Ruby, hustle, professional, programming | No Comments »
Monday, February 22nd, 2010
A few weeks ago I posted about my initial impressions of CommonJS’s approach to concurrency, in particular the use of promises. Today I add my look at promises and futures in Clojure.
I’m aware that I’m kind of writing these blog posts backwards. I’m learning more as I go, which means before I’m done I will no doubt regret things I have written in these opening posts. Oh well.
(more…)
Tags: clojure, concurrency, example, futures, LinkedIn, promises, threads
Posted in clojure, concurrency, professional, programming | No Comments »
Monday, February 1st, 2010
The haters are wrong, part one
I just finished an excellent blog post by my friend Blake Patterson. It’s about the iPad. Blake realized in the wee hours of Sunday morning that the iPad was actually Alan Kay’s Dynabook, emerging after 40 years in Steve Jobs’ turtleneck-clad arms. Seriously, it’s a great post. Go read it.
I think Blake may be right that the iPad is going to be a great device for developers and users. It’s a whole new playground for a set of mature, widely-known, yet still rapidly-developing technologies. It’s an incredible opportunity. People who are poopooing the thing, or suggesting it’s actually going to harm the computing world, are being unimaginative and pessimistic.
I find cynicism and pessimism applied to a lot of issues and events in the web development world. Maybe it’s the recession. Or this cold winter we’re having in the continental U.S. But the gloom and doom is dead wrong. And I feel compelled to explain why.
I’m not given, personally, to bouts of dizzy optimism. I’m not a bit light-headed at this moment. I think the future is looking awfully good for people who develop software for the Internet and people who use this software. And I want to pour some cold water on the clever people currently pouring cold water on the tech optimists. The Internet is not splintering, Apple is not going to end the golden age of the personal computer, the United States is not chronically short of talent, and our jobs are not all going overseas.
(more…)
Tags: Blake, future, iPad, LinkedIn, optimism, Splinternet
Posted in professional, programming | No Comments »
Thursday, January 28th, 2010
It’s a concurrent world, and, increasingly, it’s an asynchronous world too. Many things are going on at the same time, and it’s impossible to determine exactly when each is starting or ending. In other words, everything is fast and out of control.
As a software developer, both concurrency and asynchronicity are more important concepts than ever. But both are hard concepts, and they’re also hard to embrace in practice—the sequential model of programming is so ingrained in my head that both new structures for concurrency and asynchronicity in familiar languages and less familiar languages with built-in support for these concepts offer a steep learning curve. Fortunately, there’s been a lot of buzz, from separate origins, about two programming concepts that may, um, promise to deliver a brighter future to me and other befuddled developers.
(more…)
Tags: asynchronous, concurrency, futures, LinkedIn, programming, promises
Posted in concurrency, javascript, professional, programming | 1 Comment »
Sunday, October 11th, 2009
I’ve wanted to cite this passage a few times now, but I can only find the essay in PDF form. So I’m just going to put the passage here, so I can point back to it in the future.
Geeks, if people regularly joke that they couldn’t understand what you do for a living, consider pointing them to this description of the process of writing a program to accomplish a specific task. There’s a lot of debate on Lambda the Ultimate about whether the authors are joking. For the record, I don’t think they are, but that doesn’t mean they aren’t intentionally being funny.
(more…)
Tags: humor, irony, postmodern programming, professionalism, scrap-heap programming
Posted in professional, programming | No Comments »
Wednesday, September 30th, 2009
I gave a talk on Ruby’s Enumerators at the DC Ruby Users Group in August. I’ve posted my slides from the presentation, if you’re interested. Basically, I discovered that enumerators make lazy evaluation easy to implement in Ruby, and applying lazy techniques with enumerators may yield more efficient and elegant code.
(more…)
Tags: enumerators, functional programming, lazy sequences, LinkedIn, Ruby 1.9
Posted in Ruby, programming | 3 Comments »