|
Red Squirrel Reflections
Dave Hoover explores the psychology of software development
|
|
Fri, 25 Apr 2008I ripped the WordNet server-side integration out of The Lightweight Visual Thesaurus and shoved in the Twitter API to create Tweet Nodes. It's still at total hack and only works on Firefox, but it's a fun little Twitter conversation browser.
Here's how olabini's Tweet Nodes look today... [/projects/tweet_nodes] permanent link Wed, 23 Apr 2008Paul's Statelessness and Jerry's Truthfulness I enjoyed reading Paul Graham's Be Good. I found this little tidbit of wisdom echoed the words of Jerry Weinberg'a Secrets of Consulting...Being good is a particularly useful strategy for making decisions in complex situations because it's stateless. It's like telling the truth. The trouble with lying is that you have to remember everything you've said in the past to make sure you don't contradict yourself. If you tell the truth you don't have to remember anything, and that's a really useful property in domains where things happen fast. --Paul Graham One of the great advantages of not lying to your clients is that you generally don't have to remember what you said. --Jerry Weinberg Sat, 05 Apr 2008Polyglot Programmers User Groups I'm excited to announce the birth of a user group focused on exposing programmers to many different languages and providing a place for programmers to learn how to fit different languages together. Inspired by Neal Ford, Ola Bini, and our own experiences as language-agnostic programmers, Fredrick Polgardy, Tyler Jennings, and I are launching the Polyglot Programmers User Groups. Have a look!Sun, 23 Mar 2008A Retrospective on the first year of Obtiva's Apprenticeship Program One year ago I stopped doing full-time on-site consulting. I started on-site consulting in 2004 when I joined ThoughtWorks, and continued through my first client at Obtiva. I have done a few multi-day, local stints since Spring 2007, but the vast majority of my days have been spent in a smallish office about a mile from my house in Wheaton, Illinois, USA. It was a risk to start Obtiva's Craftsmanship Studio and subsequent Apprenticeship Program, but after a ton of hard work, frequent mistakes and mismanagement, I can confidently say these last 12 months have paid off and the future is brilliant. Let me try to explain what I'm talking about, and why I'm confident about our first year's success. (And thank you to Michael Hunger for asking for more information on this topic.) What is a Craftsmanship Studio? I should rephrase that to "What is Obtiva's Craftsmanship Studio?" because I can only speak with authority on that. First, what does "Craftsmanship" mean in this context? My best answer to that question is to advise you to go read Part 3 of "Software Craftsmanship: The New Imperative". Being a self-taught programmer, and coming from a right-brained background, the concept of craftsmanship immediately resonated with me. It should come as no surprise that when I had the opportunity to create my own practice within Obtiva, I tried to model it after the ideals that inspired me in Pete McBreen's book. Second, what is a "Studio" in this context? The dictionary tells us that a studio is "an artist's workroom" or "an establishment where an art is taught or studied". That sounded right to me and it is supported by the fact that programming as art has been a strong theme among the leaders in our field for a long time. The above ideas basically summed up the vision for our Craftsmanship Studio: a place where programming newcomers can come to learn the craft of software development on real-world projects working closely with experienced developers. Reality was much messier than our vision, and there were too many times when apprentices were isolated or working together without much oversight. This messiness can be attributed to the fact that I am a journeyman, not a master craftsman, and therefore this year was filled with mistakes as I learned (by trial-and-error) about project management, customer relations, capacity planning, and recruiting. Thankfully we have had about 50 retrospectives during that time and have adapted our agile principles into a process that continues to improve each week. So if our Craftsmanship Studio is where newcomers and old-timers work, learn, and mentor, what is an Apprentice? The above reference to Part 3 of Pete's book will quickly introduce you to the concept of apprenticeship... A central tenet of the craft model is that it is hard to pick up a skill just by being told about it. You actually have to practice the skill under realistic conditions and under the watchful eye of an experienced practitioner who is providing feedback. This describes the need and the relationship, but in reality, who are these people, these supposed newcomers? My working definition for someone in an apprenticeship is: a person who is looking to maximize their learning opportunities, even at the cost of other opportunities. Often this means purposely putting yourself into a Be the Worst situation, which is exactly what I did when I joined ThoughtWorks. For Obtiva, this means we're looking at potential and attitude rather than credentials. These people could probably make more money somewhere else in the short-term but they are making an investment in learning that will pay off in the long-term. I would like to see our Apprenticeship Program mature into a more formal apprenticeship with better feedback mechanisms and milestones. That said, I can say that the four apprentices who have participated in our Craftsmanship Studio have been very successful despite my shortcomings as a manager. This year reinforced for me what I learned when I was an apprentice: your apprenticeship is what you make of it. We had a Perl web developer come to us, learn Ruby and Rails and Java, and leave us writing a multi-threaded Ruby/JRuby/Java/JNI application that leveraged a 16 core machine for a local hedge fund. We had someone come to us to reboot his career, learn Unix, MySQL, Perl, Ruby and Rails and is now both managing and developing e-commerce deliveries for the Studio's largest client. We had someone come to us from a local Rails sweatshop, learn technologies like Sphinx, rSpec, god, ActiveMerchant, CruiseControl.rb, along with Perl, who is now introducing Git into the team and will soon be technical lead on his third Rails e-commerce project. We had a network administrator come to us, who after rapidly delivering several different Rails projects, is now wrangling a large, chaotic Rails codebase under control via rSpec better than many experienced developers I know. What do I attribute our success to?
Wed, 13 Feb 2008After my Lorax-like Apprenticeship rant last year, I've had my nose to a few different grindstones, leading Obtiva's Craftsmanship Studio, working on the Apprenticeship Patterns, and attempting to be a good enough husband and father to Staci and the kids. Things are leveling off now as I'm beginning to understand a bit more about what it takes to manage a Craftsmanship Studio and I'm starting to pick up some momentum on the book writing. I'm excited to announce that Ade and I have decided that the Apprenticeship Patterns will be published by O'Reilly as Software Craftsmanship: From Apprentice to Journeyman in their Theory In Practice series. One of the main reasons that we chose O'Reilly is their commitment to the web and their alignment with my vision for the web site and community that I wanted to develop around the book. I'm pleased to say that they have provided an excellent platform (press release) to facilitate exactly the sort of situation I wanted: full content of the patterns available the public, community forums, and a blog. Most of my blogging attention will be focused on the book, but I will also be posting tidbits of my lower-level day-to-day development work on my Stumblog. If you'd like to continue to follow me via feeds, please subscribe to the book feed and the Stumblog feed. [/craftsmanship] permanent link Wed, 22 Aug 2007At Agile2007 last week, I snuck into the last 30 minutes of Uncle Bob's talk about Craftsmanship and Professionalism. When Uncle Bob talks about Craftsmanship he is generally talking about nitty-gritty details of the craft, such as specific practices and tools, but he did have one slide on apprenticeship. He ranted a bit about how most universities do not equip graduates with sufficient skills to allow them to deliver quality software from day one. (Not to mention the significant number of people who come into software development from other fields and have never even received the inadequate computer science education that Bob was referring to.) Bob asserted that we need to apprentice these young people, these graduates and newcomers. Bob asserted that the most effective learning situation is one where a small number of apprentices work alongside an even smaller number of journeyman, who are receiving guidance from a master craftsman. It was music to my ears until Bob polled the audience for anyone who was working in that environment. I proudly raised my hand, but my heart sank as I looked around and realized I was the only one raising my hand. For the rest of the conference I felt a sense of pride at the revelation that Obtiva's Craftsmanship Studio is such a unique phenomenon. But I also struggled with a sense of sadness and frustration at the lack of apprenticeship opportunities our industry is providing to graduates and newcomers. My biggest point of frustration is with small companies (1-20 people) made up entirely of super-experienced, world-class developers, coaches, and trainers. I understand your compulsion to only hire people with over 5 years of professional experience who have established reputations, but I believe you're hurting the industry by implicitly refusing to take on the responsibility to apprentice a few people along the way. Where do graduates and newcomers go when they're looking for their first gig? They go where people are hiring entry level people. This is where we lose some of our greatest potential because people who had the potential for greatness lose heart sitting at the bottom of mediocre, bloated, beaurocratic development organizations. Imagine if young Nathaniel Talbott, inexperienced and unqualified to do much of anything interesting, had found an "entry level" position, rather than becoming the first apprentice of RoleModel Software. Sure, someone else would have probably written test/unit. And Nathaniel would probably still have become a good software developer. But I am convinced that Nathaniel's apprenticeship made an impact on our industry, and we're better because of it. Apprenticeship is more than simply hiring entry level people. Apprenticeship is coupling an apprentice to a journeyman. That doesn't mean they're pair programming all the time, but it does mean that the journeyman is overseeing the apprentice's progress and that the apprentice has an experienced developer in close physical proximity to turn to for guidance. Furthermore, apprentices are not necessarily entry level people. Our first apprentices generally had a year or two of experience under their belt. Some are in the middle of college degrees. Some had recently graduated. One is re-booting his IT career later in life. Apprentices are people who are willing to take on a junior role that maximizes their learning opportunities as opposed to people who try to climb as quickly as they can into roles that maximize their financial opportunities. In my experience, if the apprentice has talent and the right attitude, their financial success will inevitably follow their learning success. Please consider creating an apprenticeship at your organization. I believe apprenticeship is our industry's best hope for addressing our talent shortage.
[/craftsmanship] permanent link Tue, 10 Jul 2007Rails TDD Boot Camp: a year later, Astels, Google I returned from Manhatten last month after my third running of Obtiva's Ruby on Rails TDD Boot Camp. And for the first time, I wasn't completely exhausted! Although I'm not a natural-born public speaker, practice does help a lot, and hopefully it showed this time. It's hard to believe that it was only a year ago that Obtiva was scrambling to meet the Rails training demand as we constructed our curriculum in preparation for our first course. Since that time the course has run 7 times with Tyler Jennings, Obie Fernandez, and myself as trainers in Illinois (Wheaton, Lombard, Chicago and Evanston), California (San Jose), and New York (Manhatten) for a wide variety of businesses (Cisco Systems, Northwestern University, Stony Brook University, Nielsen Media Research to name a few). It's been an awesome experience to provide these trainings and adapt the course with the changes in the Rails landscape. I am pleased to announce that our 8th running of this course will be for our newest client Google. And I am even more excited to announce that the instructor for this course will be Obtiva's newest team member Dave Astels. Sun, 24 Jun 2007This post was going to be an email to a friend who is interested in joining Obtiva, but most of what I was going to tell him were things I've been wanting to blog about, so I figured I'd make it a public-facing message... After I had been with Obtiva for six months, I experienced a change in perspective that has changed my career, and hopefully, the careers of many other future Obtivians. At that point I had already delivered my first training course, and with the help of my fellow Obtivians, I had introduced Ruby and Rails at the J2EE shop of one of our main clients. I was excited to make an impact, but it began to occur to me that a company as small and as financially stable as Obtiva is more than just a place to work hard and make an impact, it is a vehicle that can be driven. The way that the company is structured provides us with incentive to not only do great work, but to go and create the work we want to do. And that is exactly what I did. I subscribed to a bunch of feeds like the 37signals Gig Board and started winning business. These wins allowed us to hire 4 of our 11 employees and provided us with the first wave of apprentices for our Craftsmanship Studio in Wheaton. Nine months later, I am living a dream. I am riding my bike to work and spending my days with Brian Tatnall, Victoria Wang, and Joseph Leddy in the Studio, helping them along their paths toward mastery as we deliver Rails projects to a variety of customers using whatever tools we want. While I certainly cannot take all of the credit for my good fortune, I can say that I have maximized the situation, and we have room for others to do the same: Gareth sees the same potential and Obtiva has become a vehicle for him to grow our consulting business into the world of business and finance. Friend, you will likely have many opportunities to join Obtiva in the coming years, but I am uncertain whether the company will be as malleable as it is today. You are a multi-talented person, a world-class software developer, to be sure, but you have many other talents that could be leveraged to allow you to use this opportunity as a vehicle to drive you toward exactly the sort of work that you want to be doing, and where you want to be doing it. Wed, 30 May 2007Rails moves my Bottleneck in Web Development Geoffrey Grosenbach's latest post reminded me of something I've grown to appreciate over the last couple years: web development with Rails pushes me out of the confines of my codebase and into the other aspects of web development much more quickly than any other web development environment I've used before. Rather than slogging through the painful verbosity of a J2EE codebase, on a Rails project I am (like Geoffrey) hopping around on various servers' command lines, configuring Apache, defining CSS, and crafting Prototype-inspired JavaScript features. For whatever reason, these are all aspects of web development that I had grown to belittle in a previous life when I was more interested in intellectual pursuits. What I'm realizing lately is that while I cherish what I've learned about objects, agile, and patterns, I'm feeling a bit lop-sided (which isn't surprising if you look at my reading lists over the years). Rails has internalized some the ideals that came out of some of the most important software development revolutions of the last few decades. Martin notes: ...the [R]uby community has formed around the best ideas of the OO and Extreme Programming communities. Listening to the keynote of Jamis Buck and Michael Koziarski I was delighted to reflect on the thought that they were right there in the values of Ward, Kent, and all the other people who've been advocating clean code, well-factored object-oriented design, and testability. These ideas have made a great impact on many other technological communities, but in Ruby-land they are the orthodoxy.Ruby and Rails' intrinsic values mean that my bottleneck has moved away from application code and (as always) I've got some learning to do in the ecosystem that surrounds and supports a successful Rails project. Thankfully I work on a team of people that have a great diversity of backgrounds and talents. On teams like this, we often have both partners in our pairing sessions switching frequently between student and teacher. It is a priceless dynamic and one of the great advantages of working with apprentices. Thu, 24 May 2007The Dependencies of a Craftsmanship Studio As we continue to expand our Craftsmanship Studio, I am becoming increasingly aware of our dependencies. In order to grow better as we grow bigger and maintain a healthy mix of apprentices and journeymen (no masters yet), we are absolutely dependent on the essential attributes of a software developer. As Andy said in one of his long-lost podcasts, the two most important attributes of a software developer are the ability to communicate well and to learn quickly. I would add passion to that list. Mentoring apprentices comes in many forms. Some of it is indirect ... they overhear your conversations ... they read your code ... they read your blog (!). But some of it needs to be direct, and in those moments, I am sacrificing my productivity on some other activity in order to answer a question, provide guidance, or sketch a domain model. That sacrifice is an investment. I believe that 10 minutes now is going to be paid back tenfold in future productivity gains. And I believe that because it's obvious that our apprentices Victoria and Brian have the attributes that Andy was talking about. A couple of examples ... Victoria's ability to communicate well lightens my workload because as she is implementing features, she can interact directly with our customer, allowing me to stay focused on my development tasks rather than diving into Basecamp or GMail. Brian's ability to learn quickly was apparent after I reviewed our Rails portfolio with him in his first few days and a week later he had single-handedly retrofitted ActiveRecords (with advanced associations) onto a legacy database on his first Rails project. Mon, 21 May 2007Thinking about Portland; Refactoring in Wheaton I just caught up on a bunch of the blogging from RailsConf. It sounds like it was an excellent time. But I'm surprised that I didn't hear about anything controversial or earth-shattering. Perhaps Rails is stabilizing? Anyway, while part of me yearned to be there, the end of my week in Wheaton turned out to be an excellent experience in its own right (on a smaller scale). Victoria and Brian are working their way through Refactoring and we are meeting weekly to discuss what they're learning. One of the first questions from the first few chapters was "What is an Abstract Class?" This important and fundamental question launched us into a contrast of Java's Interfaces, Abstract Classes, and Packages with Ruby's Module. I have always said in our Rails course that Ruby's Modules play double-duty (namespaces + mixin), but this was the first time I had illustrated that point to people who know Ruby better than Java. It was a good discussion and I feel privileged to be able to guide Victoria and Brian along their path toward mastery and seed a culture of learning at Obtiva. I then shared some of my reflections on reading through the Code Smells with my Ruby hat on. The ones that stuck out most to me where Feature Envy and Incomplete Library Class. What struck me about these is how much more freedom Ruby gives you (than Java) to eradicate these smells from your code-base. Specifically, the Move Method refactoring can, in Ruby, move code all the way into the class where it belongs, regardless of whether you wrote that class or not. For example. [/craftsmanship] permanent link Fri, 11 May 2007Establishing our Software Craftsmanship Studio These 20 days of blogging silence were brought to you by...
Working in the Wheaton office has been a most excellent transition. While there are some mundane details to take care of, it's all in the name of establishing a Software Craftsmanship Studio we can call our own. Like any software company that does consulting and training, there will always be some of us at client sites or running trainings in exotic locations. But there will also always be a sub-set of us in the office delivering full-fledged projects from our Studio. And that is what Brian and I (and soon Victoria will be nearly full-time with us!) are establishing. A place where apprenticeships flourish, where footwear is optional, where collaboration is dialed up to 11, and where we deliver top-notch software to our customers on a daily basis. It's been intense thus far, and I anticipate some great times ahead. Fri, 20 Apr 2007Gareth joined me in the d'oh! club today when I revealed to him the revelation that Ryan provided me back in January. Ruby has variable scoping, meaning that this code works just fine:if false a = 1 end puts a # nilUp until Ryan revealed this to me, I had been merrily (and needlessly) declaring my variables outside the control structures that defined them. Maybe Gareth and I are the only ones who weren't aware of this aspect of Ruby (and many other dynamic languages), but just in case, I thought I'd share it with you. Mon, 16 Apr 2007Tomayko on Scaling with ActiveRecord Ryan says:Frameworks don't solve scalability problems, design solves scalability problems.I agree. Using a tool that gets out of your way (like ActiveRecord) gives you the power to design your own solutions with minimal accidental complexity. via Obie Thu, 05 Apr 2007Heading to D.C. to demonstrate One-Size-Fits-One Tyler and I will be presenting the fruits of some of Obtiva's Rails work at Agile 2007. We have delivered several planning and tracking tools for software development teams using Rails over the last six months. Through these engagements, we discovered that Rails proficiency and Agile coaching are a killer combination for creating planning tools that you can adapt alongside your process. While there are plenty of one-size-fits-all agile planning tools out there, they often do too much, too little, or can't adapt to your needs. If you're an agile team using planning and tracking software (rather than Excel or index cards), you need software that's actually soft, like an agile process.If you follow a methodology out of the box, you will have one that fits some project in the world, but probably not yours. --Alistair Cockburn, Agile Software Development Mon, 26 Mar 2007Kevin introduced me to Gareth Reeves almost a year ago, and Gareth and I quickly hit it off as we carpooled to the first annual RailsConf. I was excited to meet Gareth because I remember reading some of his papers on XP back when I couldn't get enough of the XP kool-aid. Ever since then we've been working on getting Gareth into Obtiva and I'm thrilled to announce that we finally have him! Gareth has been involved with XP from the early days, and was mentored by none other than Kent Beck. He brings a mountain of agile and Java and (more recently) Ruby experience with him and we're excited to see where his expertise takes us. Gareth's first gig will be joining Ryan for a Rails coaching gig at a nearby hedge fund. Wed, 21 Mar 2007Homesteading and Inshoring in Wheaton I'm excited to announce that my primary goal for 2007 will come to fruition next month. Since we opened our Wheaton office in December, I've been splitting time between working on-site at one of our main local clients and leading our Rails projects out of the office. Obtiva just landed a project (yet another coastal gig) that will allow me to work full-time out of our Wheaton office building our Rails practice and further establishing our Craftsmanship Studio. Life is very good. While the project itself is interesting in its own right, one aspect that greatly excites me is that Jeff Patton, agile product design pundit, is heavily involved. I am excited to collaborate with Jeff and experience his approach to agile software development on an ambitious Rails project like this one. Thu, 15 Mar 2007I got a little thrill just now when I wanted to have a look at some changes I've made in one of our Rails projects and it occurred to me that I love TextMate's diff view. I hadn't tried this before so I typed it in and crossed my fingers...svn diff config/* | mateWhich (and I shouldn't be surprised by this) instantly popped up exactly what I wanted: Fri, 09 Mar 2007I was in and out of Obtiva's office in Wheaton all week, so I was able to eavesdrop on Tyler's first attempt at instructing our Rails TDD Boot Camp. It has been humbling to watch Tyler pick up the course that I helped develop last year, make it RESTful and 1.2-friendly, and then deliver it with confidence. Unlike me, who was always on the edge of collapse after day 4 of the course, Tyler was itching for more. I believe this officially confirms that Tyler is an extrovert. You can read his latest blog post for his reflections on the experience.Fri, 02 Mar 2007Ideas for Teaching Kids to Program
BTW, the child Victoria is going to be mentoring is Rose, my oldest daughter. They'll be meeting for the first time next Thursday afternoon. Pretty cool, huh? [/craftsmanship] permanent link Wed, 28 Feb 2007sudo gem install facets require 'rubygems' require 'facets/more/times' puts 0.weekdays.from_now # Wednesday (today) puts 2.weekdays.from_now # This Friday puts 3.weekdays.from_now # Next Monday puts 4.weekdays.ago # Last ThursdaySee http://facets.rubyforge.org/src/lib/facets/more/times.rb for details. Fri, 23 Feb 2007Jamis posted yet another nugget of wisdom. This one was about Ruby's method visibility, which can be tricky for people coming to Ruby from Java or C#. Jamis left one aspect of the protected access level as an exercise for the rest of us, so I figured I'd write up an example that helps illustrate when you would use protected vs. private.
class Sibling
def ask(sib)
sib.tell
end
def spy_on(sib)
sib.secret # will always complain
end
protected
def tell
secret
end
private
def secret
"Charlie tooted"
end
end
rose = Sibling.new
ricky = Sibling.new
begin
puts ricky.tell
rescue
puts "Ricky will only tell another sibling"
end
begin
puts rose.spy_on(ricky)
rescue
puts "Ricky complains when Rose tries to find the secret"
end
puts rose.ask(ricky) # Ricky will tell if Rose asks nicely
One of the main differences for Java developers is that objects of the same class can't see each other's private methods.
Thu, 22 Feb 2007After helping Ryan with some routing issues in which a single character (a period) was the cause of confusion. I nearly fell off my chair laughing after this little interchange...
Ryan: yeah, the breakthrough was the dot.
thanks for the help
:-)
Dave: it's always one stupid character
Ryan: yes, and that character is often me
Sat, 17 Feb 2007Relentless Simplicity with ActiveRecord The Active Record pattern is a wonderfully simple and sufficient approach to ORM on many projects. I first used it in Java and it worked well on a small project. But in a staticly typed language like Java, using Active Record is limiting and/or awkward. It wasn't until I starting using ActiveRecord in Rails that I saw just how powerful this pattern could be when applied within a more flexible, readable language. Where nasty getter/setter hell and XML configurations are the standard in Java, we get clean, readable classes and objects in Ruby. One of the things we do at Obtiva is provide coaching and development for Rails projects that are in trouble. I call them rescue missions. We've found that the downside to Rails' power and simplicity is that people can crank out functionality with minimal understanding of how to write maintainable, scalable software. It's only a matter of time until they hit a wall, and that's where we step in. We find people usually get into trouble with ActiveRecord when they allow themselves to write ugly code. I'm sure that there are some cases where ActiveRecord doesn't do what you need and an ugly solution is required, but I think those cases are exceptionally rare for most Rails apps. During one of our rescue missions, I discovered a fat controller with lots of calls to find_by_sql. Again, I'm sure there are cases where this nasty method is needed, perhaps for optimization, or for some odd cases that I can't imagine (since I've never used it), but this was just plain ActiveRecord abuse. Most of us aren't aren't writing abusive ActiveRecord code, but many of us need to be more relentless in our pursuit of clean, readable, ActiveRecord usage. We're kicking off a Rails e-commerce project so I downloaded a copy of the Rails e-commerce book to brush up on ActiveMerchant. By the way, I recommend the book to anyone coming to Rails with an immediate need to write an e-commerce site. It's also a good book for anyone wanting to see an example of TDD in Rails. But on page 175, I found a snippet of code that spurred me to write this post ... it wasn't ugly ActiveRecord code, but I would go so far as to say that it is just plain bad.
class Post < ActiveRecord::Base
belongs_to :category
def self.find_all_in_category(category)
category = Category.find_by_name(category)
self.find :all, :conditions => "category_id = #{category.id}"
end
...
end
I can read this code and understand what the author was trying to do. The method is returning all of the Posts for a given Category name. But what happens if the call to Category.find_by_name returns nil? And why would a simple thing like this require 2 separate calls to the database?
SELECT * FROM categories WHERE (categories.`name` = 'foo') LIMIT 1 SELECT * FROM posts WHERE (category_id = 1)This is an example of not pushing hard enough to keep your code clean and simple. The first solution you can think of isn't necessarily the simplest. Don't be satisfied with anything less than elegance when you're using ActiveRecord and you'll be much better off. Here's how I would rewrite that little method:
class Post < ActiveRecord::Base
belongs_to :category
def self.find_all_in_category(category_name)
category = Category.find_by_name(category_name, :include => :posts)
category ? category.posts : []
end
...
end
Which, thanks to the eager loading of :posts, would result in just 1 call to the database, and (to me) reads better.
Wed, 14 Feb 2007Victoria's Journey toward Craftsmanship I've completely neglected my apprenticeship patterns over the last year. Ruby and Rails is partly to blame for this. But the other reason is that I have an opportunity to apply Pete McBreen's ideas for the first time and, to me, that takes priority over almost anything else in my professional life, because opportunities like this don't come around very often. Stories like the one that Victoria just related over on DevChix get me very excited about the future, and reinforce the direction the apprenticeship patterns are headed. [/craftsmanship] permanent link Sun, 11 Feb 2007
Even cooler still, Obtiva has just hired our first apprentice (and female), Victoria Wang. This is another important step toward establishing our software studio in Wheaton. Apprentices bring enthusiasm and an appetite for learning that inspires. On top of this, Victoria brings some other important qualities with her: excellent visual design abilities (that's her RailsConf-inspired drawing) and a non-male perspective. Welcome Victoria! Wed, 24 Jan 2007Like many small consulting companies, Obtiva was built upon a longstanding relationship with a large, local client. A client like this provides a strong foundation on which to build a business. As I said in my 2006 Retrospective, my primary goal for 2007 is to spend an increasing amount of time in our Wheaton office leading our Rails projects. To achieve this goal, we will need to bring in a steady stream of new projects. I'm happy to say that January has proven to be a good start. We kicked off two new Rails projects: negotiations software for a large bail bonds company and (yet another) social networking application for a major television network. While these projects are wildly different, they have one thing in common. Both clients are located in California. Why is that significant? Go read Mike Karlesky's insightful post on Inshoring. While neither Obtiva nor Atomic Object can compete with the prices of our offshore brethren, it is possible for us to undercut our coastal colleagues. Moving toward distinct, shorter-term projects creates a need for a steady stream of new business, which is exacerbated by our expertise in Ruby on Rails and agile practices. We have found that by coupling a killer technology like Rails with the disciplines of frequent releases and test-driven development, we are able to deliver our projects ahead of schedule. This puts more pressure on us to bring in more projects, but it also increases our chances for repeat business, not to mention the morale boost our team feels. It's a positive feedback loop that I hope we'll still find ourselves in when summer arrives. Sat, 13 Jan 2007HooverObitvaMacBook:~ davehoover$ irb --simple-prompt >> 'rose'.capitalize => "Rose" >> 'RoseHoover'.swapcase => "rOSEhOOVER" >> 943222 + 3000000000000000000000 => 3000000000000000943222 >> Wed, 10 Jan 2007I'm not sure why anyone would want to run Watir scripts on a handheld device ... but since the iPhone runs on OS X and ships with Safari, I'm wondering how difficult it would be to get SafariWatir setup ... just because we can.[/projects/watir] permanent link Tue, 09 Jan 2007Pioneers: independent, yet cooperative I'm slowly working my way through The Spirit of Democratic Capitalism, a book that looks at democratic capitalism form a historical and theological perspective. Much of what I've read reminds me of the talks and writings of Nathaniel Talbott on homesteading. I read a quote last night that reminded me of a quality that makes many ThoughtWorkers special, and something I'm trying to cultivate at Obtiva. I'm talking about this contradictory quality of being fiercely independent, and yet cooperating almost continually with their colleagues. The quote that struck this chord was about a family that journeyed from upstate New York to the Iowa territory in 1842:They took pride in being free persons, independent, and self-reliant; but the texture of their lives was cooperative and fraternal. p. 135I immediately thought of Obie and Aslak when I read this. When the three of us were on our first project together at ThoughtWorks, I was star-struck by their development prowess. They are certainly intelligent, ambitious, and motivated guys, but the thing that struck me was the breadth and vitality of their personal networks. Colleagues were frequently IM'ing them with questions ... and whenever we were stuck, we didn't just have Google at our disposal, we had a responsive network of world-class developers to ask questions of. And we often did. This is a habit (and network) I have taken with me as I left ThoughtWorks. While individual qualities are critical for success, a cooperative network is a distinguishing asset that is hard to detect on a resume or portfolio. |