This week I took a brief hiatus from my normal job at BrowserMedia to spend a week on a 3-2-1 project with Hashrocket with fellow guest stars Hampton Catlin and Matthew Bass. It was a great experience for many reasons.
One of the key factors that made this 3-2-1 possible is that not only do we all use good tools, but we all use the same good tools. All of us use Macs, Textmate, Git, Rails, RSpec, Restful Authentication and Haml. This allowed us to hit the ground running. All the basic infrastructure needed for building a web app was in place, so were able to get going and focus on the core functionality of the app.
Pair programming, at least to the degree that it is done at Hashrocket, was a new experience for me. Every developer works in a pair programming setup, with a laptop hooked up to a 30-inch display and two keyboards and two mice. Having a large monitor, two keyboards and two mice may seem like a luxury, but it really helps you get into the flow of pair programming.
Another core philosophy at the heart of the Hashrocket methodology is test-driven development (TDD). TDD is something that most agile development shops strive to do, but sometimes fall short. I believe that two of the main reasons many teams struggle getting TDD right are tight deadlines and lack of developer expertise and discipline. All developers who try to do TDD have experienced this at some point. You've got a feature that needs to be cranked out ASAP, you're not exactly sure how test it, so you just dive into the code and pound it out. My experience at Hashrocket has taught me that that all too common scenario can be avoided by practicing pair programming and TDD together.
One pair programming technique that makes TDD easier is ping pong pair programming. When doing ping pong pair programming, when you sit down to build a feature, the first person in the pair writes the test. Next, the second person in the pair writes the code to make the test pass. Then the second person writes a test for the next feature, and the first person in the pair implements it. By repeating this process throughout day, you have several benefits. First of all, it avoids the scenario where one developer does most of the work and the other developer just zones out and gets distracted by something else, because you are constantly switching back and forth. Also, like two people who go on a diet together to help each other stick to it, one developer doesn't let the other developer get lazy and skimp out on the tests for a specific feature. That doesn't apply just to the test. As long as you have a pair of two experienced programmers, one of them it's going to let the other get away with writing a nasty piece of code. It's like a real-time code review.
My favorite aspect of the 3-2-1 experience was having the time to spend with other good software developers and just discuss the process of software development. TDD was a topic of conversation all week. Some believe in a strict adherence to TDD, "Test all the fucking time", if you will. Others believe TDD can be a warm blanket. It's easy to fall into a mentality that the tests pass, therefore the code works. Human testing can be a more effective process for discovering bugs in software, but human testing gets much less emphasis than TDD. I believe there is a lot of value in functional testing with tools like Selenium and I would like to see more emphasis on functional testing in the community. For my next project, I'm considering just specing the models and testing the rest of it with Selenium. If you are following the best practice of SCFM, you controllers should be mostly glue code anyway, so you get more out of testing from the browser via an automated, repeatable test than unit testing your controllers. It was a healthy debate and great to have a chance to be part of it.
I suggest all developers, whether you are an independent developer or a full-time employee for an organization, find an opportunity to participate in a 3-2-1. The amount of knowledge sharing that goes on is invaluable, exceeding what you get out of attending any conference. You spend the entire day pair programming with other top-notch developers and the evenings discussing all aspects of software development. This is the type of environment Evan Light envisions for DCamp. Developers working together, one-on-one, sharing knowledge and trading best practices.
For the most part I'm pretty happy with my new iPhone 3G, so this is meant to be constructive criticism. I don't even compare my iPhone to the simple run-of-the-mill phone I was using before. That was a true cell phone, this is a handle-held computer that you can make phone calls with.
10. No Internet Connection Sharing
It would be nice to be able to connect to the internet on a Macbook that has an iPhone connected to it.
9. No Finder
The standard web file upload capability is disabled. It would be nice if there were an iPhone Finder app, that let you browse through a hierarchy of all files saved on the iPhone, including photos, mp3s, apps, mail attachments, etc. Also maybe have some way of transferring documents like PDFs to the iPhone, and some way of viewing them as well as being able to upload them to websites.
8. Video Recording
It would be really nice to be able to record and upload videos, even have live video chat, but I'm sure that's a hardware/bandwidth limitation for now.
7. Lack of Openness
The iPhone SDK NDA has some pretty silly restrictions in it, as you can see from Prag Dave's recent fiasco. Also, to distribute apps on the App Store, you must pay $99 for a developer's license, even if you plan to give away your app for free. The fact is the Apple often behaves in the same monopolistic ways the Microsoft does, but we generally give them a pass on it because they make great products. It's like the typical story of the young upstart revolutionist gaining the support of the people to overthrow the evil dictator, only to become the next evil dictator himself. Expect the anit-mac fanboy, free as in speech, Slashdot crew to jump all over this once the Android project gets some traction.
6. Stability
Apps crash with some regularity and the whole OS will crash and restart as well sometimes. The iPhone needs less crashes and when it does crash, crashing a little more gracefully would be nice.
5. Flash
If you could install Flash, you could watch embedded videos from Vimeo, Blip.TV, ESPN Videos, etc. Also, if you could install Silverlight, you could watch MLB.TV, but that one is MLB.TV's fault, they should have a native iPhone App. 3G probably doesn't give you enough bandwidth, but it would still be nice to watch live baseball games when connected to WiFi.
4. Real GPS
I don't know if it's a technical limitation or not, but we need a TomTom/Garmin/VZ Navigator quality turn-by-turn, voice narrated GPS directions app. My crappy samsung phone had that:
3. AT&T
I switched to the iPhone from Verizon. Quality of service is much worse, I barely get a signal in my own house, which is a mile from downtown Baltimore. So much for more bars in more places.
2. Copy & Paste
The biggest reason I need copy & paste is for passwords. For password management, I use Password Gorilla, which totally sucks, but runs on Windows and Mac. A password manager is a trivial app to write, so I would create one myself, but without cut & paste, there's no way to make it work. Even if you had cut & paste, you would need the next item.
1. No Multitasking
For example, I want to have Pandora running in the background while I check my email. I want to be logged into AIM so people can IM me while I'm doing something else. I want to be notified when I have new mail. I want the Twittervision and NetNewsWire icons to update to show me there are unread items, but they can't until you can run more than one app at the same time.
What I want is Command+Tab. You know how in Safari you press the bottom right button and you can see all your pages, switch from one to the next? That's what you need for the whole OS. You press the home button (the actual only real button, is that called the home button?) and instead of closing the app you are running and taking you back to the home screen, it gives you the Command+Tab/Safari like view of all running apps. You slide from one app to the next and pick which one to bring to the foreground. You press the home button again, then it takes you home. Combine that with Cut & Paste and the result would be a serious workflow/usability improvement.
I realize this means the OS needs better memory management and the hardware needs more RAM, but I confident Apple can make that happen.
It's really good to see a book being published by the Pragmatic Programmers on the Stripes, even if it is too little, too late. I wrote an article on Stripes a few years ago, and actually, I still like how Stripes handles mapping request parameters to an object graph, but since then I have discovered the benefits of dynamic languages like Ruby, so I would never consider using a framework like Stripes, just because it means programming in Java. When I was doing Java, I felt that Stripes was a much better framework than WebWork/Struts, but for some reason flew under the radar. In fact, this blog is built using Stripes. Stripes' creator Tim Fennell always did an excellent job answering questions on the mailing list and deserved more recognition from the Java community as a whole.
It's surprising to see this book coming out now. Frankly, straight Java as a web development language is yesterday's technology, the Cobol of our generation. The JVM is still alive an well, with many great options, such as JRuby, Groovy, Scala and the best of them all, Clojure. I would love to see a Pragmatic Programmer book on Clojure, just to give some more attention to Clojure, because it is such a great language. Anyway, congrats to Tim Fennell, Frederic Daoud and the Stripes team on finally getting some acknowledgment for building a great framework and a great community.
You probably won't be seeing to many technical rants about Ruby or Lisp on my blog for a few weeks. To find out why, visit http://brighidbarry.blogspot.com.