Wednesday, September 21, 2011

Is making software a craft and/or an art form?

I'm leading a Betascape panel this Saturday called "Art & Code", described as "a panel of smart software creators discussing their careers and to what extent modern making software has become a craft and an art form."

This topic has been much on my mind as I contemplate how we should be training future software makers (vs. future computer scientists and software engineers). Below are the questions I will be posing to the panelists: I'd love to hear your answers in the comments! I'll incorporate anything I learn in this post into the panel, so if you think of other questions I should ask, please tack them on as well.
  • There are many metaphors out there for what we do (crafts person, artisan, engineer, scientist, etc). How do you think of yourself?
    • What aspects of making software feel like an art form to you?
    • What aspects of making software do not feel like an art form to you?
    • When you are designing or writing code, what does it feel like? Is there a performance aspect to your work?
    • What is the most valuable training you received that helps you as a designer or coder today?
    • What is the most valuable training you've experienced on your own? What's been the best self-teaching experience you've had?
    By the way, the Betascape schedule looks really awesome. You should totally plan to come to Baltimore for this, and here's how to buy a ticket!

    Saturday, September 10, 2011

    Using Goliath as an API Proxy

    I recently set up a proxy server using Goliath, a new asynchronous web server from Postrank Labs. I'm building an app that allows users to provision phone numbers from Twilio. To find numbers, I was making calls on the user's behalf to Twilio's AvailablePhoneNumber API. Since our server wasn't doing anything with the data except passing it back to the client, I wondered if it might be easier to setup a web proxy which rewrites the browser's request for data by adding private API credentials to each request, and passes the data through without doing any sort of processing.

    Then I read Gabe Weinberg's post on cool Nginx hacks where he describes this exact technique under the heading "Proxy external JSON calls". Unfortunately this app is hosted on Heroku so my solution is a little more involved than changing an Nginx config. Goliath turned out to be perfect for it, though:

    That code takes requests for Local or TollFree numbers, signs them with my Twilio credentials, and proxies the connection. I have it running on an isolated Heroku app on a separate domain from the rest of my app (since the original app is not running on Goliath) which is why I'm using the JSONP middleware (so the browser can make JSONP requests for this data, avoiding cross-site security restrictions). Twilio gives pretty good error messages in the body of its response which is why I'm returning 200 for all requests. The client can inspect the returned data to see if there were problems with the request.

    By the way the Procfile that run this code on Heroku is simply:

    web: bundle exec ruby lib/twilio.rb -sv -p $PORT -e prod
    


    Tuesday, August 30, 2011

    How I Would Learn Rails in 2011


    An entrepreneur friend just asked me to recommend good resources for learning how to program using Ruby on Rails. Here's what I suggested, in descending order of helpfulness:


    Tuesday, August 23, 2011

    Towards a New Paradigm for Software Education

    I posted a new essay to the OSI-Baltimore blog called Baltimore should become a software education leader:
    The term “programming” connotes an analytical discipline, something derived from mathematics or engineering, and that’s how most schools teach it: as the domain of computer science. But computer science is only a part of what software makers do. Advances in computer power have made computer science less applicable in the day-to-day work of programmers because there’s less need to keep track of “ones and zeroes.” Making software has simply become a lot more fun than you might remember if you were ever forced to study it. 
    These advances open the door for many different kinds of people to get involved in the software industry. Newcomers have launched a software craftsmanship movement addressing issues such as: how do we make something truly useful? How do we make it a joy to use? What can we learn from the worlds of art, design, psychology, typography, and architecture? Where you once had programmers thinking of themselves as scientists or engineers, you now have programmers who think of themselves as artisans.
    Poet and computer scientist Richard P. Gabriel describes a vision of how we might train programmers as craftspeople in his essay “Master of Fine Arts in Software,” in which he suggests we emphasize the creation of software as a performance instead of as a body of knowledge to master. 
    I'm very hopeful for this approach (which I also discussed a few weeks ago on WYPR's Maryland Morning) because I think it's a straightforward, exciting way to boost the number people able to compete for good jobs in the current economy. Read Marc Andreessen's recent op-ed essay "Why Software Is Eating the World" for more details on why this is going to be extremely important not just for Baltimore but for every city that wants to be economically competitive.

    Tuesday, August 9, 2011

    Open source experiment: Ignite Baltimore home page

    It's time to update and refresh the Ignite Baltimore website. As Ignite is a not-for-profit labor of love, we've tried a few different approaches over the years to having a website that looks nice and can be easily maintained (e.g. we need quality work but don't have the funds to pay for it, so we try to barter).

    I've concluded that the best way to do this, something I would recommend to anyone else running a project like this, is to make a super simple site with a few pages, with a design I can execute myself, and then link to external sites when we need specialty content. In Ignite's case, we'll be using EventBrite, Flickr, and YouTube to host all of our dynamic material. This means the site itself can focus on being a resource for things that don't change as much, like "About" and "Contact Us" and "Speaker Guidelines".

    The current prototype is here: http://ignitebaltimore.github.com

    I'm developing the new site out in the open on GitHub. This means anyone can contribute to the new site. If you have an improvement, please fork the project, make your changes, then send me a pull request. The repository is here: https://github.com/ignitebaltimore/ignitebaltimore.github.com.

    A note on self-reliance: I know this site doesn't look as beautiful as it could, or as it should (given the high-touch feel of the event), but I also have decided that I'm not going to let my lack of design talent stop me from building nice things. On pretty much every software project I've worked on, I've felt hamstrung by a lack of design help. I mentioned this to Gabe Weinberg who advised me to treat design like just another facet of programming to hack around, over, and through. I've decided to take him on that and focus on making things that look "good enough", and that's what I've done here.

    Thursday, July 28, 2011

    Getting SSL, Capybara, Rails 3, and Devise to work together

    I've noticed a lot of Rails blog posts recommending that you only turn SSL on in production and don't try to use it in the test or development environments. This is a monumental mistake, a lesson I learned hard in the early days of OtherInbox: SSL enforcement has a lot of subtleties and corner cases that need to be exercised and tested on a routine basis. As a quick slightly embarrasing example, we had a bug at OIB where flash messages would get swallowed during redirects. It turned out we were accidentally redirecting people to an http:// page, where the flash would be available, but our SSL enforcement code redirected them quickly to https://, and that second redirect ate the flash message. Since we couldn't reproduce the bug on our own machines it was much harder to track down than you would think.

    But I know why the bloggers recommend the naive approach though: getting SSL to work offline is a major pain! Right now I'm building a Rails app that enforces SSL on every page. It's all private data (the public-facing site is managed by a separate CMS) so I don't want any page to be accessible over http://. Below is a summary of the code changes I had to make to get this to work. I was mainly guided by this great Collective Idea blog post about Rails 3 SSL that I'd recommend you start with.

    It's not hard to get SSL working in development mode if you use an app container like Phusion Passenger. I explained how to do that a few years ago with an Apache-Mongrel setup, but the basic ideas apply.

    Update 1/31/2012: I wrote up an easy way to get SSL working with Unicorn and Pound instead of Passenger which is my new preferred way of working. Also check out the Devise wiki for more useful SSL info.

    Tuesday, July 19, 2011

    My New Gig at the Greater Baltimore Technology Council

    The Greater Baltimore Technology Council (GBTC) recently announced that I've started working with them as a volunteer "Entrepreneur-in-Residence". I've been good-naturedly teased about it a bit and had a few people ask me, "so what does that mean"? Many of my friends don't know what the GBTC is or why it's here. Here's my quick explanation.

    The GBTC is a nonprofit with a mission to help grow the technology sector here in Maryland. If you've been reading my blog for a while you know what a big deal that is to me. I love living here and I love building software, so anything that helps grow the tech sector is near and dear to my heart. The GBTC was the first organization to sponsor Ignite Baltimore, helping to get the word out for that first event, and they have been a sponsor ever since.

    Since the group was founded in the late 90's the tech sector has changed. Today almost every company is a tech company, and many technology practitioners no longer work for companies at all. More people are in business for themselves. More projects get accomplished via the "Hollywood model" of federated teams of independent contractors coming together for a fixed amount of time. Infrastructure costs have dropped rapidly, making information technology in particular far more affordable - practically free in some cases.

    The GBTC leadership is making bold plans to modernize the organization to keep pace with these changes; in fact they are poised to put the GBTC on the cutting edge of these changes, making it a dynamic organization relevant to everyone in the tech game: freelancers, entrepreneurs, small companies, big companies, local governments, education institutions, even other nonprofits.

    It's early days for this transformation, but they've already taken a very bold step: they are hiring an Innovation Community Manager, an idea I've been advocating for awhile. That person's main job will be to support the grass-roots tech organization efforts that many of us have been pursuing for years. I can't think of a more effective way for the GBTC to advance its mission.

    My job as EIR at GBTC is to help craft this transformation plan in a way that helps my fellow-entrepreneurs. My fellows include many more constituencies than simply other Internet startup people: we want the new GBTC to help everyone in the area who's trying to start something innovative. You might be working in a big company or at a struggling nonprofit, or in an established small business and looking to grow. Whatever the key ingredients for your continued success are, we want to help provide them. My role to that end will include advocacy and writing (like this blog post), attending staff meetings, giving feedback to different ideas, and generally just lending a hand to all of the GBTC's activities.

    I don't want to steal any more thunder from the cool stuff they're working on, but I do want to say as an entrepreneur it's a great learning experience for me as I watch the GBTC board and CEO Sharon Webb make a big transformation in an institution like this. It's like they are founding the group all over again while it's still operating. There are lots of stakeholders, a heritage to preserve, and uncertainty about which choices to make to ensure future success. Very similar to the sort of environment I'm in with my own venture!