Friday, July 27, 2012

New ways to help accelerate Baltimore's renaissance

I got a nice email today from one of my favorite Baltimore groups, gb.tc, announcing a new initiative:

...we are adding a new emphasis on bringing the power of technology and entrepreneurship to building a better Baltimore...Our goal is to help connect the innovators and the new ideas with the “powers-that-be” and the resources that could help accelerate Baltimore’s renaissance.
This project is near and dear to my heart. There's been a disconnect between the powers-that-be and the independent hustlers here in town, and gb.tc has cooked up three interesting new projects to change that, excerpted below:
Groundwork - August 10–11 - Over the course of 24 hours (from Friday evening to Saturday), help collect and analyze publicly-available data about Baltimore from a wide variety of sources. We are inviting a diverse mix of technologists, public health researchers, community leaders, and non-profit representatives. Our goal is to identify points of strength and to find opportunities for action and collaboration in neighborhoods, with existing programs, and among talented people from different sectors of Baltimore innovation.
Baltimore UnWIREd - August 24–25 - An unconference to be held on the campus of Johns Hopkins University, UnWIREd will build on findings and tools developed at Groundwork. We will convene innovators and power-brokers from across the region for serious discussion and concrete action. We will identify specific problems, resources, and neighborhoods as focal points.
Start Something - Fall 2012 through Summer 2013 - We will take what we have learned from Groundwork and UnWIREd and tap into the energy and creativity of Baltimore area college students. We will connect talented young people with our innovation community and the mentorship, resources, and tools they need to build sustainable businesses that serve the goals of a greater Baltimore.
I'm particularly excited about the last one. We have a lot of smart people around here and tons of opportunities to solve real-world problems, while making lots of money. I'm looking forward to seeing what a group of these smart people can do when given a little support and mentorship while exploring useful business ideas.

Tuesday, July 24, 2012

Processes should make things easier for workers, not managers

I came across The Rands Test written late last year. This paragraph really resonated with me:
Are handwritten status reports delivered weekly via email? (-1) 
If so, you lose a point. This checklist is partly about evaluating how information moves around the company and this item is the second one that can actually remove points from your score. Why do I hate status so much? I don’t hate status; I hate status reports.
My belief is that email-based status reports are one of the clearest and best signs of managerial incompetence and laziness. There are always compelling reasons why you need to generate these weekly emails. We’re big enough that we need to cross-pollinate. It’s just 15 minutes of your time. 
Bullshit. The presence of rigid, email-based status reports comes down to control, a lack of imagination, and a lack of trust in the organization.
I couldn't agree more. When I was a Navy officer I was constantly having to write stuff like that, including writing my own fitness reports and end-of-tour awards (it was considered standard procedure to submit yourself for awards, which definitely took a lot of the specialness out of the occasion).

I've been thinking about how most managerial processes are about making things easier and more controllable for the managers. As I work to build new software organizations here in Baltimore I'm committed to flipping that on its head - what if we focus on building processes that make the people doing the work happier and more productive, instead of making the manager feel safe and in control?

It's easier said than done, I realize, but I have a feeling that such an organization would vastly outperform the more traditional form, more than enough to compensate for any errors that might occur due to a lack of all-pervasive oversight.

This Just Say No post by Angela Baldonero over at AVC definitely reenforces this opinion, that most companies are too focused on making managers feel good and not helping workers do good work:
A new world of work is being born around us. Most traditional HR practices are ineffective and irrelevant. The courage to say no to the status quo has given us the freedom to blaze a new path of freedom, flexibility and creativity.  And it’s a competitive advantage for us. Our turnover is lower than nearly any other company – in our industry or any other industry. Most of our new employees come in as referrals from existing employees. And our application to hire percentage is about 1.5% -- meaning Return Path is harder to get into than Princeton.  
My advice to you is to set your people free to focus on important, high impact work and solve challenging business problems. That’s how companies will win now.
I'm starting to lay the groundwork to recruit programmers for a new startup. If you're working somewhere that fails the Rands test, please get in touch!

Tuesday, July 17, 2012

Video of Coding for Uncertainty at Ruby Nation

Here's the video from my Coding for Uncertainty talk at Ruby Nation earlier this year, where I talk about techniques I use to build durable, changeable Ruby code:


Tuesday, July 3, 2012

Testing Rails controller security with RSpec shared examples

Like most developers I'm pretty paranoid about security. For Rails apps, although I don't normally write many a lot of controller tests (because my controllers are always very thin, and I'm usually able to cover their behavior using the style of integration testing I favor), I always make sure to test security functions. I always write tests to ensure no user should be able to view or alter another user's data. Controller tests are the only way to directly test the update, create, and delete actions.

Recently I extracted this type of test into an RSpec shared example and placed it into my power tools gem so I could DRY these tests up. It's been working awesomely. Here's an example:



The code exercises all seven of the standard Rails resource actions if your controller implements them. To see the shared example, check out the power tools gem.