• Boulder CTO January Lunch with Jud Valeski

    The Boulder CTO Lunch meets once a month with a guest speaker and covers topics and questions that startup CTOs should find interesting. This month, the group had Jud Valeski, who is currently the CTO at Gnip. Prior to Gnip, Jud started his professional career in technology at IBM as a software developer. In the past ten years he has spent about five of them coding (primarily C/C++), and about five of them in technical team management/director capacities. The bulk of his experience comes from Netscape Communications (acquired by AOL), with varying durations at IBM, Microsoft, and onebox.com (acquired by OpenWave).

    I will share highlights of the discussion, but since this was a open, free-formed discussion, I am sure I couldn’t capture everything and not all my notes are completely accurate. Some of the notes also come from participants in the conversation and are not necessarily held by the discussion leader.

    A question we ask each visitor, every month, What is a CTO? we do this because every CTO has a different answer.
    "The title is pretty much irrelevant to me." At a small company it doesn't matter. It means something, it means a lot, at larger companies.

    CEO is pure fantasy
    Dev is pure reality
    CTO is the bridge

    Jud is a developer turned CTO, he explains this can be hard for some because a CTO brings some management responsibilities, which doesn't always come naturally to all developers.

    If you come from only management experience you can have a hard time with the CTO role because they don't have the technical depth to make these decisions.

    Important qualities of a CTO
    * Technical Management
    * Technical Direction (choose the tech to use, the approach, the design)

    CTO role embodies the sense of leadership.

    As CTO, you need a complete understanding of the business.

    If the CTO is scattered that can be fatal. Be clear with prioritization and direction. If a person in the leadership position is confused it leads to a lack of confidence.

    CTOs need to always be able to draw the system architecture. If you can't, you are too detached.

    To show those around you that you know what you are doing, you have to get down in the trenches and make some low level decisions with them. Backing up the decisions by explaining the technical merit of those choices.

    Defining his role at Gnip
    Push technical discussions along. Don't let a topic be discussed too long when a decision needs to be made. Also, don't cut off the discussion before exploring enough opportunities or you can make the wrong decisions.

    At Gnip, defining the technical direction involved setting expectations that Gnip is an agile shop, uses pair programming, and uses lots of testing

    One thing Jud measures the most is how well the team is going. If it isn't going well, it is his fault.

    A personal metric of Jud's: if Gnip disbands tomorrow, every employee should be better and more knowledgeable than they were before they worked at Gnip.

    Hiring
    * Only hire people that are smarter than you.
    * If you think you are the smartest in the room, there is an ego problem and it is hurting the business.
    * The downside to this is it takes a long time to hire.
    * Gnip might hire 1 out of every 120 resumes it takes the time to seriously consider.
    * It is important to sit down and write code with someone, plenty of people can talk a good talk
    * Hire generalist because they can learn and do anything
    * Don't just hire for the tech need, the team personality and fit are just as important.
    * Everyone on the team has to be great people, not just in the office, but out of the office.

    The Gnip hiring process:
    Resume Screen -> 30 minute call -> group tech conversation -> half/full day pair programming

    Jud was once a part of a team that went from 15-50 in 4 months, which was too fast of growth and it was a mistake.

    As a CTO do you have to manage your CEO?
    "Yeah, all the time, absolutely."

    Like any job you need to be careful about what you escalate to the boss. The CEO doesn't want to hear about every little thing.

    What can a CTO do to foster engineering growth?
    * Let employees buy as many books as they want on the companies dime.
    * If you can afford it do the same for training
    * Encourage participation in users groups
    * Churn what people are working on
    * Force developers out of their comfort zones.

    What do you do about slipping schedules?
    "Anyone suggesting software stays on schedule is in fantasy land"

    If you pin motivation, success, or failure to a schedule you are doomed.

    Wins have to come from someplace, if you set a schedule and meet it celebrate.

    Reconciling schedules with business realities is probably one of the toughest CTO jobs.

    If you have shrink wrapped software schedules has a whole different meaning.

    Don't inflate dates just to make the schedule, any dishonesty anywhere in the chain is bad.

    You need to be able to release internally all the time. Internally always try to release early and release often.

    When falling behind schedule, you have to evaluate the severity of each bug and feature. If there is a known workaround, that changes everything. If there is a workaround then it doesn't have to block a release. If there isn't a workaround, then you have to decide if it makes sense to have a release missing that feature.

    Thanks a bunch to Jud for sharing his thoughts with our CTO group. I also want to thank Tom Chikoore from Filtrbox for organizing the meetings, and Jon Fox and David Cohen who originally started our CTO lunches.

    Got a slow Test::Unit or RSpec suite?
    Devver can run it up to three times faster! Request a beta invite today.

    Posted on February 16th, 2009 by Dan in Boulder, Misc, TechStars, Tips & Tricks.

  • Boulder CTO January Lunch with Sanjiv Bhargava

    The Boulder CTO Lunch meets once a month with a guest speaker and covers topics and questions that startup CTOs should find interesting. This month, the group had Sanjiv Bhargava from StillSecure come talk with our group. Before becoming VP of product development at StillSecure, Sanjiv was VP of Technology at Symantec Corporation. Sanjiv was also involved in some startups that failed and others that succeeded (selling a consulting company he founded). I will share highlights of the discussion, but since this was a open, free-formed discussion, I am sure I couldn’t capture everything and not all my notes are completely accurate.

    Remote vs. Local employees
    Sanjiv has worked with geographically dispersed teams in the past, but recommends working with everyone under the same roof if possible. He said that for small teams it is very helpful, as you build teams you need to build relationships.

    Corporate Culture
    "One of the best parts of starting a company is you get to create the company culture"

    A team is a reflection of the leader, or you can switch it around, a leader is a reflection of a team because the leader builds that team.

    The first hire to a small team has a huge impact on corporate culture, which can be good, but be aware of it.

    What makes a good team?
    * getting the right team chemistry
    * sometimes make a compromise on technical knowledge but not on culture and team chemistry.

    As a small startup, you don't have time for team building exercises, if you need those at this level you have the wrong people in the company

    The corporate culture is set by who you are. For example, if your office has a ping pong table and you never play ping pong that sets a culture to never play - focus on work. To play or never play: either is OK, but your actions as a leader set it.

    Problem Employees
    Have an open dialog with a problem employee to figure out what is going on. Maybe things can be turned around.

    In small startups you need to cut your losses on employees fast and early.

    There is never an easy or easier time to get rid of someone.

    Think of the other employees you have. Good startup employees know the bad hire isn't working out, and they don't like having to carry their dead weight.

    Employee Training
    "Sometimes it would take you 2 hours to do something, or it take 1 hour of training and 4 hours for the new employee the first time. You have to take the trade off."

    Evaluations
    Everyone chimed in on evaluations from the group, some of the thoughts are below.
    * Every 6 weeks have a quick meeting. "Here is what you did awesome, here is what you could improve"
    * Discuss as part of a team. What can I change? What can we improve on as a team? Have them evaluate you as a leader as well.
    * A quick weekly meeting. What is not going right? What is going well? Go over what goals were met from the previous week. Have a meeting to set goals for the week and the year.
    * It isn't about management recognition, it is about team recognition. Group support and group recognition.
    * Don't have meetings. Do it on the fly, why wait to tell someone something is awesome or something wasn't up to par?

    The CTOs Role
    * Ask ten different people what is the role of a CTO and you will get ten different answers.
    * The CTO role is decided by what fits the company.
    * It is a role that is a combination of business and technology.
    * Two types of visionary CTOs, "How do I grow the business?", or "How do I scale the technology or broaden the feature set?"
    * One of the biggest mistakes we make is we try to pigeon hole people into boxes and defined roles.

    Thanks everyone for attending our January CTO lunch. Thanks to Sanjiv for helping lead a great discussion. Also, thanks as always for TechStars for hosting our group. If you are interested in joining our CTO lunch shoot me an email dan devver.net, and I can get you on the email list.

    Got a slow Test::Unit or RSpec suite?
    Devver can run it up to three times faster! Request a beta invite today.

    Posted on January 23rd, 2009 by Dan in Boulder, Misc, TechStars.

  • Ruby people on Twitter

    The Ruby community is always quickly moving, changing, and adopting new things. It is good to keep your ear to the ground so you can learn and adopt things that the community is finding really useful. There are a number of ways to do this, like watching the most popular Ruby projects on GitHub, most active projects on RubyForge, Ruby Reddit, or listening to the Rails podcast. The way I have found most effective is following a good collection of the Ruby community on Twitter, many of the most active Ruby community members and companies are on Twitter. It is where I have first heard of many things going on in Ruby like the recent Merb/Rails merge.

    You can find a great list of 50+ (now 100+) Rubyists to follow on Twitter from RubyLearning. I thought we might as well give out a list of some of the Ruby people Devver.net is following on twitter.

    technoweenie
    jamis / Jamis Buck
    obie / Obie Fernandez
    chadfowler / Chad Fowler
    engineyard / Engine Yard
    d2h / DHH
    rjs / Ryan Singer
    jasonfried / Jason Fried
    37signals
    foodzie
    fiveruns
    _why / why the lucky stiff
    gilesgoatboy / Giles Bowkett
    dlsspy / Dustin Sallings
    julien51 / julien
    rbates / Ryan Bates
    defunkt / Chris Wanstrath
    chrismatthieu / Chris Matthieu
    littleidea / Andrew Clay Shafer
    headius / Charles Nutter
    bascule / Tony Arcieri
    atmos / Corey Donohoe
    ubermajestix / Tyler Montgomery
    raganwald / Reg Braithwaite
    chriseppstein


    of course I have to give a special shout to ourselves:

    danmayer / Dan Mayer
    bbrinck / Ben Brinckerhoff
    devver.net

    If we should be following you also send us an email at contact@devver.net, and we can hook up on Twitter as well.

    Got a slow Test::Unit or RSpec suite?
    Devver can run it up to three times faster! Request a beta invite today.

    Posted on January 8th, 2009 by Dan in Misc, Ruby, Tips & Tricks.

  • Boulder CTO December Lunch with Tim Wolters

    The Boulder CTO Lunch meets once a month with a guest speaker and covers topics and questions that startup CTOs should find interesting. This month, the group had Tim Wolters from Collective Intellect come lead the discussion. Tim is a serial entrepreneur currently working on using artificial intelligence and semantic analysis to extract knowledge from unstructured text found in social media. Collective Intellect's customers use this analysis to inform and measure the effectiveness of their PR and marketing strategy.

    Tim is considering working on a book, a startup survival guide for CTOs. Some of his ideas for the book helped lead our discussion during our meeting. I will try to present my notes under topic headings that Tim mentioned, but since this was a open free formed discussion, I am sure I couldn't capture everything and not all my notes are completely accurate.

    The Idea
    People should keep a journal of ideas. Tim keeps a journal which he updates, tags, and adds ideas. On any idea, keep track of what is near term, what resources are needed, what is the cost, and what does the related market look like. (I highly recommend this! Ben and I keep a wiki, which has grown to be an incredibly useful resource and was the initial starting point for our last two companies)

    Ideas should have an "Aha!" factor that makes you wonder why someone else isn't already doing it (or some emotional appeal that makes lives better).

    During the first few years of a startup you can't work on all the ideas that come to mind, that is why it is best to keep a journal, just add little notes to the idea to keep them in the back burner.

    Talk to others about ideas and perhaps have a group move on an idea and lay the groundwork while leading as an adviser.

    Don't be worried about people taking ideas. After starting a few companies you know how hard it is to really bring something to market.

    What about brainstorming for ideas with a group?
    Brainstorming groups have never worked for Tim, it just hasn't worked out. If you have the right people around the table (people that can make things happen), it could work, but Tim hasn't seen it.

    Ideas depend a lot on timing in the marketplace. If the market is moving slow you can slowly look at an idea. If the market it really moving fast you need to spin it up quick and get a lot of people working on it to really make a move on the idea.

    Look over your ideas once in awhile and see what still really interest you.

    The Role
    As a CTO, you paint a landscape of the product and market.

    There are two kinds of CTOs: tactical and visionary. Tactical CTOs are internally focused, manages the team, makes the day-to-day tactics so the product gets out there. The visionary CTO sees where the product could go in the market place, signs early deals and customers, looks for features that lead towards or away from markets/competitors/partnerships. The visionary isn't working on architecture but the market landscape, what partners will benefit the product or get it out sooner.

    CTO should be thinking about things such as the three hardest problems that the company faces, so they know what will also be affecting their competitors.

    People who liked architectural purity but learned it isn't as import at winning at the business end up making great CTOs.

    CTOs need to stay involved with customers to make decisions about the project innovation and development. Stay active on sales calls, talk with sales people, read all the RFPs.

    Becoming the CTO vs VP of engineering?
    Are you good at managing or not? VP of engineering is a managing role. If not, divide off the management as soon as possible (in his case that wasn't possible until the company was about 20 people).

    Good sales people leverage a CTO as a company evangelist. If you are a CTO you have to be comfortable with presenting and publicity. You will be at conferences, sales calls, giving presentations, and fund raising. If you aren't comfortable with these things, get comfortable with it.

    time spent:

    • 10% guiding research
    • 30% Sales
    • 30% Partnerships
    • 30% Biz Dev Dealings

    Reputation
    After some startups, successes, and expanding your network things like getting a team, funding, and getting a startup off the ground are much easier the next time.

    It will take 3 to 5 times longer than you think to get a project going if you are an unknown entrepreneur with no reputation.

    Don't solve the big unsolvable problems first, the first time start with smaller problems and develop a reputation while solving them. Angels and VCs aren't funding research efforts, don't just chase after big impossible goals.

    After a company is bought, it makes sense to make the purchaser successful. It builds on your reputation.

    Become a big fish in a small pond and then move to a bigger pond.

    Putting together the team
    The ideal size for an engineering team is 6-8 people, bigger teams have difficulties maintaining the right amount of communication.

    For hiring, Tim personally sits down with the key hires, and if it is research he does interviews with applicants as well.

    The Traps and Pitfalls of Startup Companies
    3 things that companies get stuck on that can kill the company.

    • Problem with getting over enamored with their original idea, startups must be able to adapt
    • Getting enamored with the research technology, for technology's sake
    • Getting emotionally tied to architecturally purity. Working on layers of abstraction on abstraction to avoid some possible future problem.

    Other things that kill companies (which are kind of like a marriage)

    • Not the right chemistry
    • Bad culture or losing company culture
    • Employees need some sense of allegiance. If they don't have it cut them immediately
    • Lacks a culture of adaptability
    • Not thinking about how to quickly get to the market and solve problems

    Continual code death march. Sometimes companies go on code marches to get something to the marketplace. This can't be done many nights or it will start taking a toll on other aspects of your life. Strive for balance.

    During a startup, you continually are hitting false summits, you think that if you could just get that contact, solve that roadblock, pass this milestone, or make this key hire then everything will fall into place. While these are important as milestones and you should celebrate them you are not done. Or rather, it typically doesn't get any easier. What it does is takes more risk out allowing you to go solve bigger/other problems.

    When founders or others in a company argue, which they need to do sometimes, don't do it in front of everyone. Discuss disputes offline, reach agreement and present a unified front to the company.


    Thanks so much to Tim for sharing some of his thoughts with our group. I will leave you with a final question and quote. Someone once asked why Tim likes to start companies?
    "I like to pick where I work and who I work with."

    Got a slow Test::Unit or RSpec suite?
    Devver can run it up to three times faster! Request a beta invite today.

    Posted on December 11th, 2008 by Dan in Boulder, First Steps, Funding, Misc, Tips & Tricks.

  • Installing and running git-svn on Mac OSX 10.4 Tiger

    I am shocked at how much time it took me to get git-svn working on my mac. I use MacPorts, which works well most of the time. Sometimes it has problems which makes me really wish for apt-get on OS X. apt-get normally has worked much nicer for me, but can have its issues too. I even occasionally wish for Windows and a simple install.exe which works 95% of the time out of the box. Really I wish Apple would throw some engineer support to MacPorts and make the service rock solid.

    I have had git installed and working for awhile, but preparing to switch our main project from Subversion (svn) to git, I thought I should start using git-svn. It seemed smart to use git-svn for awhile to get used to git, before a full switch so I could fall back on svn in a crunch. I decided to start using git-svn, but the first run of the git-svn command caused this error, and I had no idea how much of my night was about to be wasted...

    Can't locate SVN/Core.pm in @INC

    Searching led to a couple of webpages, but the most useful was getting git to work on OS X Tiger. It had a quick fix that might work or the long route fix. For some lucky people it is just a path problem. I checked if that was the case for me, by the following command

    PATH=/opt/local/bin:$PATH; git svn

    unfortunately for me I got the same error, OK I need to reinstall SVN with additional bindings...

    > sudo port uninstall -f subversion-perlbindings
    > sudo port install -f subversion-perlbindings

    leading to this error:

    ---> Building serf with target all
    Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_serf/work/serf-0.2.0" && make all " returned error 2
    Command output: /opt/local/share/apr-1/build/libtool --silent --mode=compile /usr/bin/gcc-4.0 -O2 -I/opt/local/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I. -I/opt/local/include/apr-1 -I/opt/local/include/apr-1 -c -o buckets/aggregate_buckets.lo buckets/aggregate_buckets.c && touch buckets/aggregate_buckets.lo
    libtool: compile: unable to infer tagged configuration
    libtool: compile: specify a tag with `--tag'
    make: *** [buckets/aggregate_buckets.lo] Error 1

    I spent some time searching and eventually I find the solution to the serf error. I couldn't read the blog because it wasn't in English, but I could read enough to solve my MacPorts serf install problem. I followed these few lines from the blog

    cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_serf/work/serf-0.2.0
    $ sudo ./configure --prefix=/opt/local --with-apr=/opt/local --with-apr-util=/opt/local
    $ sudo make all
    $ sudo port install serf

    Awesome, I have serf. Now what is next? Back to building svn with perl bindings, that works. Now, let's build git again since svn with perl bindings is finally installed.

    sudo port install git-core +svn

    Which fails because of p5-svn-simple

    dyld: lazy symbol binding failed: Symbol not found: _Perl_Gthr_key_ptr
    Referenced from: /usr/local/lib/libsvn_swig_perl-1.0.dylib
    Expected in: flat namespace

    dyld: Symbol not found: _Perl_Gthr_key_ptr
    Referenced from: /usr/local/lib/libsvn_swig_perl-1.0.dylib
    Expected in: flat namespace

    Error: Status 1 encountered during processing.

    OK, I need to get p5-svn-simple working. Searching leads to this thread MacPort errors related to git. Here you will find the amazingly useful comment by Orestis:

    "As mentioned move your libsvn_swig_perl* out of /usr/local/lib AND out of /usr/lib into temporary folders.

    Uninstall and reinstall subversion-perlbindings

    Install p5-svn-simple (and git-core +svn which is what lead me here)

    Move the libsvn_swig_perl files back in /usr/lib and /usr/local/lib (or else git svn won't work). 

    > cd /usr/local
    > mv ./lib/libsvn_swig_perl* ./bak/
    > sudo port install p5-svn-simple

    Sweet that works now

    > sudo port install git-core +svn
    > cd /usr/local
    > mv ./bak/libsvn_swig_perl* ./lib/

    Finally I try to run git-svn, only to see the same ERROR I had from the very beginning! I am about to lose it but decide that I should try the quick fix again to see if it is the path issue...

    PATH=/opt/local/bin:$PATH; git svn

    It works! Alright now it is just a path problem. So I open up my .bash_profile, and notice I already have that path included

    # Setting the path for MacPorts.
    export PATH=/opt/local/bin:/opt/local/sbin:/Applications/MzScheme\ v352/bin:$PATH

    But I also have an additional path added from when I originally built git from source, and it looks like I was running my old broken version of git-svn. So I just had to remove this one line from my .bash_profile

    export PATH=~/projects/git-1.5.6.1:$PATH

    and hours later and with a ton of frustration I have a fully functioning git-svn.

    Now that it is working, you can move on to learning git-svn in 5 minutes.

    Got a slow Test::Unit or RSpec suite?
    Devver can run it up to three times faster! Request a beta invite today.

    Posted on December 9th, 2008 by Dan in Development, Hacking, Misc, Tips & Tricks, Tools.

  • Revisiting additional Ruby Tools

    I have heard about new Ruby tools since I did my Ruby Tools Roundup. I am always interested in tools that can help improve our code, so I had to check some of them out. Similar to my last tools post, I will be trying out a tool and writing my general impressions along with the basic usage.

    reek


    I have to start with reek, since it has been the most requested and searched on our site since I originally wrote about tools. reek will help identify code smells, allowing you to fix up your code. Instead of looking at cyclomatic complexity or other metrics, reek looks at patterns to warn you about bad code. Reek currently detects a few code smells (Long Method, Large Class, Feature Envy, Uncommunicative Name, Long Parameter List, Utility Function, Nested Iterators, Control Couple, Duplication) but more are on the way.

    I think this project is useful but would need to be more customized before a nightly run would yield very useful results. The biggest problem I have is the signal to noise ratio seemed pretty high. Reek was warning me about "long methods" that were only 7 statements long, which just isn't something I am concerned about. The warnings on duplicate methods calls can be useful, after running reek on a few files I found a couple places where duplicate method calls were wasting time. Many of the other smells are interesting like 'Feature Envy', and 'Utility Function'. I will need to use reek more before I know if these smells are good indicators or often false positives.

    Below reek finds a utility function next_tick which is definitely a helper function that actually exists in two of our files, which probably should be moved into a helper mixin.

    def next_tick
        if(EM.reactor_running?)
          EM.next_tick do
            yield
          end
        else
          yield
        end
    end

    I am really looking forward to see how the tool progresses. If the project allows for a simple config customization to change the thresholds as well as ignore some files/smells, this could become a very useful tool to help keep a team maintain a high expectation of code quality. It would be useful to get nightly reports about any code that might not meet expectations, so a quick group code review could decide if it is an exception (which can be quickly added to the config) or if the code should be refactored and cleaned up.

    dmayer$ sudo gem install reek
    dmayer$ reek ./lib/client/client.rb
    [Utility Function] Client#next_tick doesn't depend on instance state
    [Long Method] Client#process_done has approx 7 statements
    [Duplication] Client#process_ready calls @buffer.create_reload_msg more than once
    [Long Method] Client#process_ready has approx 10 statements
    [Duplication] Client#report_system_message calls result.msg more than once
    [Feature Envy] Client#report_system_message refers to result more than self
    [Duplication] Client#send_tests calls Time.now more than once
    [Long Method] Client#send_tests has approx 24 statements
    [Feature Envy] Client#send_tests refers to tests more than self
    #check a whole directory
    dmayer$ reek ./lib/client/*

    Towelie


    Towelie helps discover duplication in Ruby code, it will help keep your code DRY. It doesn't have a nice interface at the moment and it is pretty young code. That being said, it can still be a really useful tool to help guide refactoring and code cleanup.

    ~/projects dmayer$ git clone git://github.com/gilesbowkett/towelie.git
    dmayer$ cd ~/projects/devver/
    dmayer$ irb -r ~/projects/towelie/lib/towelie.rb
    irb(main):001:0> @t = Towelie.new
    => #, @model=#>
    irb(main):002:0> @t.parse "lib/client"
    (string):24: warning: useless use of a variable in void context
    => nil
    irb(main):003:0> puts @t.duplicates
    found in:
    lib/client/test_unit_reporter.rb
    lib/client/rspec_reporter.rb
    
    def nl
    report_nl
    end
    
    ... 2 more dupes in the reporters ...
    
    found in:
    lib/client/test_unit_reporter.rb
    lib/client/rspec_reporter.rb
    
    def report(str)
    print(str.to_s)
    end
    
    found in:
    lib/client/sync_client.rb
    lib/client/rev_sync_client.rb
    lib/client/rev_client.rb
    lib/client/client.rb
    
    def quit
    send(@buffer.create_quit_msg)
    end
    
    found in:
    lib/client/sync_client.rb
    lib/client/rev_sync_client.rb
    lib/client/rev_client.rb
    lib/client/client.rb
    
    def send_quit
    send(@buffer.create_quit_msg)
    end
    
    => nil
    irb(main):004:0>

    There are currently many duplications because we are maintaining two clients while deciding what route to eventually take. We have also moved a lot of our shared client code into a mixin, and Towelie finds some methods that really should be moved there as well such as the methods "quit" and "send_quit", which is currently duped in 4 files. Towelie also points to the fact that we should refactor our reporters because they both duplicate code.

    I have always been annoyed with copied and pasted functions accidentally working its way in code, this could be a useful nightly run to keep a team DRY. Sometimes two team members implement the same functionality without even knowing a solution already exists in the code base. If you want to go a bit more in depth, check out Giles Bowkett's (creator of Towelie) How to use Towelie

    Flay


    Flay is another great tool by Ryan Davis who also works on Heckle and Flog which I covered in the past. Flay, like Towelie, helps keep your code DRY, it detects exact and similar code throughout a project. It seems to be more powerful than Towelie, as seen in this Towelie and Flay comparison. My biggest complaint is the current release has some pretty basic output that you see below. The output I got from Towelie was immediately more recognizable and useful, while Flay currently requires you to dig in a bit deeper on your own into its suggestions. An improvement is already being worked on and a verbose output mode should be in the release soon. Once better output is included I think Flay will be immediately useful out of the box even with small amounts of developer effort.

    I like that Flay has weight system, which should make it easy to set some threshold to ignore, high level weights are more likely to be worth your time and attention. One piece of code Flay tagged with a low weight was code that rescued and logged different errors thrown, which while similar actually served a purpose.

    rescue Errno::EISDIR => ed
          @stderr.puts "Error: #{ed.message}" if @stderr
          @stderr.puts "You can't pass a directory to devver only test files. Quitting." if @stderr
          send_quit
        rescue LoadError => le
          @stderr.puts "Error: #{le.message}" if @stderr
          @stderr.puts "Not all of the files can be found. Quitting." if @stderr
          send_quit
        rescue SyntaxError, NameError => se
          @stderr.puts "Error: #{se.message}" if @stderr
          @stderr.puts "This file doesn't appear to be a valid Ruby file. Quitting." if @stderr
          send_quit
    end

    Digging into the Flay results turned up some duplicate code that Towelie had missed. Since Towelie also caught a method that was duped in 4 client files that Flay missed (I was expecting Towelie's results to be a subset of what Flay found), perhaps there is room for both of the tools and learning to work with both a little bit is worth the time. After a little bit of work perhaps one of the projects will become a clearly better option. Until then I will be following both of these projects.

    sudo gem install flay
    dmayer$ flay lib/client/*.rb
    Processing lib/client/client.rb...
    Processing lib/client/mod_client.rb...
    ...
    Processing lib/client/syncer.rb...
    
    Matches found in :defn (mass = 84)
    lib/client/mod_client.rb:86
    lib/client/mod_rev_client.rb:124
    
    Matches found in :block (mass = 57)
    lib/client/client.rb:201
    lib/client/client.rb:205
    lib/client/client.rb:209
    
    ... 6 more results ...
    
    Matches found in :if (mass = 34)
    lib/client/mod_client.rb:63
    lib/client/mod_rev_client.rb:111
    
    Matches found in :defn (mass = 32)
    lib/client/mod_rev_client.rb:36
    lib/client/mod_rev_client.rb:50


    Conclusions


    That should cover it for this Ruby tools post, but I am really enjoying checking out the tools showing up in the Ruby scene. So as always let me know if I missed something, or if there is a tool you would like to see a full write up on. After some of the tools mature a little bit I will have to revisit a few of the tools which are currently in the early stages. I hope the Ruby tools scene keeps as active as it has been lately because there are some interesting projects being worked on.

    honorable mentions (things I didn't think really needed a full write up)


    • metric-fu a great gem to give quick access to a bunch of tools and metrics about your code (RCov, Saikuro, Flog, SCM Churn, and Rails Stats)
    • CruiseControl.rb when you start using all of these tools, continuous integration starts to become more important (or doing nightly runs). CruiseControl.rb is dead simple continuous integration.
    • Simian another code duplication tool, which is mentioned in 3 tools for drying your Ruby code (free for OSS, $99 for a license)
    • Ruby Tidy a tool for cleaning up HTML (I haven't used this in Ruby, but loved the Java version in my Java days)
    • Watir is an open-source library for automating web browsers. It allows you to write tests that are easy to read and maintain. It is simple and flexible.
    • Autotest, if you haven't heard of autotest, check it out, continuously run your tests every time you save a file in your project.
    • Rufus a tool that checks if code you are about to load is safe. Allows you to look for custom patterns that you don't want to run.
    • I wrote about a couple benchmarking tools last time and here is a great article / tutorial on Ruby benchmarking

    Got a slow Test::Unit or RSpec suite?
    Devver can run it up to three times faster! Request a beta invite today.

    Posted on December 3rd, 2008 by Dan in Development, Hacking, Misc, Ruby, Tools.

  • Notes from the Boulder CTO lunch (11/3/2008)

    Although I'm not actually the CTO of Devver, I had the pleasure of attending the Boulder CTO lunch this past Monday since Dan was out of town.

    This week, the group had Todd Vernon from Lijit come lead the discussion. Although Todd is currently CEO of Lijit, he was CTO at his former company, Raindance.

    The group that was assembled was small but awesome - I had the opportunity to learn not only from Todd, but also from the CTOs of a few of last years TechStars companies.

    The discussion touched on a ton of topics, but two (related) themes that were heavily discussed were the role of the CTO and how a company grows from a technology perspective. I've organized my notes below. Keep in mind that these are the collected thoughts from a number of different participants and I may not have captured their ideas with 100% accuracy.

    The Role of a CTO

    What is the difference between a CTO and a VP of Engineering?

    CTO is about leadership for technical issues, interfacing with the business side, guiding the product, get people excited about product from a technical point of view.

    VPoE is almost one step above Chief Architect, more on a management side, getting product delivered.

    1st time CTOs need to figure out their exact role. It's a very amorphous role, depending on the company.

    CTO needs to be able to tell the whole business story, understand the good parts and bad.

    Early on, CTO should insert themselves into the sales process as much as possible (especially right after you hire the sales person). You need to be able to hear what customers say they want, so you can translate that into what they really need.

    The Technology Onion

    There is a technology onion - make sure the core of the onion is owned by company (the outer layers, not as important). The CTO needs to figure out the relationship between the technologies and the company's partnerships. The closer a technology is to the core of the onion, the more important it is to own it and to make sure it scales.

    For instance, if you're depending on Google for search, you're powerless to change features if things don't work as your customers want/expect. If search is core to your business (near the core of the onion), consider building it internally. It's the CTOs role to make that case, because business people will never understand the need to spend money to get "the same thing."

    Having to re-architect a core component of a company can really hurt growth. Assume you're going to be successful, so plan for that.

    Along the same lines, one concern about using EC2 is that you get tied to the platform and your business is dependent on an outside force you can't control. Hosting on EC2 can be quite different than hosting your own boxes.

    Acceptable Failures

    What is acceptable downtime? It depends on when - between midnight to 1-2 AM, it might be OK to be down for a few minutes. CTOs need to determine what acceptable downtime is and tell that the to the rest of management and have people agree.

    CTOs need to make decisions (for instance, what is the acceptable down time, acceptable data loss, or acceptable time for page load) and then tell the entire organization. That way, when something bad happens, you can explain that everyone agreed on the specific numbers. It's unlikely your business will need to be (or can be) 100% perfect on all metrics, but people need to understand what the goal is and why it's realistic.

    Growing/Scaling/Monitoring

    If at least one person is using your service, you should have two web servers. It gives you ton of flexibility. Having two boxes forces you to work out most of the issues early (it's a lot different getting to 2 boxes than 3 or 4). It's not about load, it's about reliability.

    No matter how useful you are, if you are not reliable, someone will blog, "it's cool, but it doesn't work reliably."

    Downtime spreads very fast across Twitter. Consider tweeting about upcoming service interruptions ahead of time so customers are aware.

    After more than 15 people, you need a dedicated operations person. Get some basic monitoring services early - after a server is under load, it's really hard to diagnose. Try to detect stuff early, it's easier to debug.

    With startups, generally the problem tends to be slow requests rather than complete service downtime. Make sure your monitoring service will alert you with slow requests.

    Get app specific stuff - a warning like "High CPU load," is harder to understand (it might be a problem, or maybe the machine is just handling a lot of requests successfully), but "Page X takes 80 sec to load" is more obvious.

    As you grow, try to measure more and more. Things often degrade slowly, and one day you just notice its too slow and it's hard to go back and find the root of the problem.

    Make two lists: a) the most catastrophic things that could happen and b) the most likely things that could happen. Where those lists overlap, you need to fix something. But there will be some risks that you decide are reasonable risks for the business (revisit these risks regularly as things change).

    Regarding backup - always make sure you try to restore some data (before you really need it). You need to make sure it works and make sure its fast enough.

    You should always be able to describe at a high level how the service will scale infinitely (it doesn't have to be technically perfect, but it has to be believable). When someone wants to purchase, that'll be a huge help - the business guy on the other side of the table will want to buy, but the technical guy doesn't want to buy (he wants to build it in-house).


    I hope those notes make some sense and give you a good feel for the discussion we had. I'm looking forward to attending more of these lunches (I hope they'll continue to let a few CEOs sneak in...)

    Got a slow Test::Unit or RSpec suite?
    Devver can run it up to three times faster! Request a beta invite today.

    Posted on November 7th, 2008 by Ben in Devver, Misc, TechStars.

  • iPhone Apps I would like to have

    I know everyone has posted a list of the best/must-have iPhone apps. I am sure many people have also posted lists of Apps they would like to have, but it is amazingly fun so I decided I should do it to.

    This is my list of apps and solutions I want for the iPhone. They don't have to all necessarily be native apps. If you know of an web-app (that works on the iPhone) which provides the functionality I am looking for, let me know.

    I want something like Brain Age for the GameBoy on the iPhone. Spending a few minutes doing little puzzles and math when I have downtime seems like a better use of my time then just playing random games. I have Brain Tuner, which is nice, but I want some more options/different puzzles.

    I want a Google Contacts to Apple contacts one-time syncer, All my iPhone contacts are missing their emails. All my Gmail contacts are missing their phone numbers, someone help me sync that up.

    I want full syncing between my Google calendar and the native apple calendar app. I always had this and it was really easy to do on pocket PC. I want a full 2 way sync. Google and Apple seem pretty buddy buddy, so get on this.

    I want flash cards, with prebuilt decks. I would like to be able to work my way through some word decks building my vocabulary. I also would love to have some Spanish/English decks. I am working on improving my Spanish by listening to Coffee Break Spanish, and having a Spanish study deck would be great.

    I want an EBook reader - oh wait, someone just pointed one out to me (thanks Matt) it is called Stanza. It's seriously awesome, if they add a screen reader, it would be perfect. I could listen to some classics books while jogging/driving.

    I want GPS tracking that works. I have a great iPhone app called Trailguru, which tracks movement/location with GPS and can tell me the speed and total distance I go when I run. The problem is my GPS seems to stop working after a day or two, and won't come back until I restart the iPhone or re-sync. Then I want a driving direction helper, something that says out loud, "turn approaching in 200 feet," just like every in-car navigation system.

    I want an on-the-go web reader (Ben shared this idea with me). This would offer a way to open/transfer all the tabs or URLs currently in my browser over to the iPhone. Preferably, it would open them all in an offline mode allowing me to then read the articles through out my day, while being on the move. I really would like if this wasn't even in Safari since that crashes the iPhone too often.

    I want a full Flash player, or at the very least the ability to play Flash videos. There are so many sites with Flash videos and streaming video that are useless on the iPhone. I really wanted to watch the debates on my iPhone because I had to leave in the middle, but while every site on the internet was streaming the debates, not one of them had a way to view the debate on an iPhone. Apparently Adobe has confirmed working on Flash, but Apple is likely to block it. Screw you Apple, even Pocket PC phones years ago had Flash.

    I want streaming internet radio. Yes, Pandora and a few others are nice, but why can't I just browse and listen to any streaming net radio station? It would be even better if it could allow me to browse many of the well known stations (shoutcast), with out having to search through iPhone's browser.

    I want something similar to Elasticfox for managing and monitoring EC2 instances on the iPhone. Actually beyond that it would be cool to be able to manage a few scripts and SSH credentials on a site. It wouldn't allow arbitrary SSH, but you could store ssh login keys and a few scripts it could run and return the results. This would allow you to ahead of time write some scripts to monitor, clean up, restart or do other tasks, which you could then execute and verify the results of remotely over your iPhone. A sysadmin's dream, until then I have pTerm for slow clumsy SSH.

    That is all I have for now, but if you have thought of iPhone apps you would like to have leave some comments. If you know of a solution to any of the problems I mention above let me know. Some of these apps I would be willing to pay for so developers get busy.

    Got a slow Test::Unit or RSpec suite?
    Devver can run it up to three times faster! Request a beta invite today.

    Posted on October 17th, 2008 by Dan in Misc.

  • Boulder.Me: An interesting way to get employees

    Boulder has a lot going on in terms of tech startups. A bunch of Boulder startups got together for a pretty interesting plan. A group of startups will be flying 100 interviewees out to Boulder to interview potential employees and let them get a feel for the city. There has already been some pretty good coverage of the plan on TechCrunch and elsewhere.

    So if you are interested in getting a great job with some of the awesome startups in Boulder, I highly recommend checking out and applying to Boulder.Me.

    Got a slow Test::Unit or RSpec suite?
    Devver can run it up to three times faster! Request a beta invite today.

    Posted on September 27th, 2008 by Dan in Amazon Web Services, Misc.

  • Looking for your first CS job? Be sure to own your ideas

    During my search for my first "real" computer science job during my senior year of college, I compared a lot of factors for various jobs including city, company, project, salary, and benefits. The salary stuff was fun to think about (especially after four years of being a poor college student) and I was looking to move to a bigger city somewhere outside of the Midwest (after growing up and going to college there). But mostly I thought about the company and project. Which companies would I want to work for? What project would interest me the most? Where would I learn the coolest stuff?

    In hindsight, I realize I'd overlooked the single most important question - is this company going to own my ideas?

    I never even thought to ask my prospective employers about their policies on IP and moonlighting. It wasn't until I'd accepted an offer and received their legal documents that it dawned on me. And even then, I didn't mind. I thought it was just standard practice and I really didn't have much of choice*.

    For those of you that don't know, many large software companies technically own everything you think of while you're working for them. No, not just the stuff that you do at work. They also own the stuff that you do at home, after hours. There is no clean separation of "work" and "personal" projects.

    This manifests itself in a few ways. First of all, you may notice that the company explicitly bans working on open-source projects. Or they may require you get explicit permission for "moonlighting" i.e. working on non-work-related projects after hours.

    At the very least, you should ask any potential employer about their IP policy before you accept a job. You may be able to get them to loosen their restrictions, especially if they really want you (I haven't personally done this and I'm not sure if the bigger companies would go for it, but it's worth a shot).

    In fact, I'd argue that you should not accept any job that claims ownership over your outside-of-work ideas - even if that means compromising salary, benefits, project, company, or location. The benefits of owning your ideas are just too numerous and important.

    Side projects make you a better programmer. I don't care if you're contributing to open-source projects, building a for-profit website, or just toying with a personal project in your own time, writing code that doesn't relate to work will expand your skills and make you a better programmer at work.

    Side projects help your career. Working on projects that anyone can examine are much more valuable than a good resume or recommendation.

    As Paul Graham writes in Hackers and Painters:

    It seems surprising to me that any employer would be reluctant to let hackers work on open-source projects. At Viaweb, we would have been reluctant to hire anyone who didn't. When we interviewed programmers, the main thing we cared about was what kind of software they wrote in their spare time. You can't do anything really well unless you love it, and if you love to hack you'll inevitably be working on projects of your own.

    Your side projects won't just help you during your next active job search. They form a sort of passive job search in which you're letting the outside world know how awesome you are. If a better offer comes along, great. Even if you're happy where you are, you can use external offers as leverage with your current employer (and not just for salary, either. A higher profile outside the company may convince your boss to give you more responsibility at work, publish whitepapers, or attend more conferences).

    You can start your own company. If you own your own ideas, then when that little site you built in a weekend starts getting a bajillion visitors a day - you're free to pursue it. Hello, no boss/early retirement**.

    Even if you quit and your startup fails, your career will probably be better off anyway. In Hiring is Obsolete, Paul Graham writes:

    Even if your startup does tank, you won't harm your prospects with employers. To make sure I asked some friends who work for big companies. I asked managers at Yahoo, Google, Amazon, Cisco and Microsoft how they'd feel about two candidates, both 24, with equal ability, one who'd tried to start a startup that tanked, and another who'd spent the two years since college working as a developer at a big company. Every one responded that they'd prefer the guy who'd tried to start his own company.

    If you're trying to rationalize taking that more restrictive job anyway (I mean, they've give you free soda at work!), you might be thinking:

    "I don't want to do a startup anyway." Well, OK. But are you sure you'll feel the same way in a year? In any case, working on side projects is good for your career, even if you never do a startup.

    "No one will know." Maybe you're thinking that when you have that good idea for a startup, you'll just keep it in your head until you quit. There's a couple of problems with that.  First, you won't really understand your idea until you start working on it. Secondly, some of the best startup ideas come from projects that didn't initially have any commercial value (and therefore wouldn't appear to be worth quitting to pursue)

    "They won't be able to enforce it." You mileage may vary by state (I'm no lawyer, but I vaguely understand the California courts may be ruling against companies in these kinds of disputes), but it probably won't matter anyway. Since you don't want to spend time tied up in court, just the threat that your company could come after you will prevent you from working on most ideas. And even if you have a great idea and decide to go for it - do you really think future business partners and investors will want to hear that your old company might own the core IP of your company?

    "My new employer lets me list the IP I own before I joined the company, so what's the big deal?" The big deal is that you're almost certainly going to think of new (and likely better) ideas during the time you're employed at the company. Do you really think all your future ideas will fall into the narrow set of things you've thought of before you join? Doubtful.

    If you feel you like have to take the job (or you've already done so), make sure to get permission in writing before starting to work on your new idea. But of course, just the hassle of getting permission is a strong disincentive to not work on your idea at all.

    "All CS jobs are going to require me to sign away my IP" On the contrary, many jobs will let you keep your IP - especially if you are doing programming for a company that doesn't consider delivering software to be it's core business. Clearly some jobs let you do other stuff - or no one would be contributing to open source. For instance, Matt Mullenweg got to hack on WordPress while he was working on blogs and new media for CNET (in fact, working on WordPress was part of his job, which is extra cool but probably harder to accomplish).

    In order to own your ideas, you may have to sacrifice other aspects of your job (not work at a "brand name" company, work on more mundane projects at work***, make less money), but I'd argue that it's worth it, especially at the beginning of your career. It's just too limiting to give away that much of your potential - because you never know where the next idea will take you.

    *I ended up accepting the job at Microsoft. For the record, I really loved parts of the job (but also wish I could have worked on open source). I hear they have relaxed their policies since I left, which is definitely a good thing.

    ** For the record, I am not advocating taking ideas from work (the stuff you are being paid to work on) and starting a company based on that (or, for that matter, putting those ideas into open-source code). That's illegal and immoral. I'm referring to the case where you're working on X at work - but you want to keep your options open to do a startup that does Y.

    *** Being less satisfied at work might actually be a good thing if you are interested in eventually doing a startup, since it will increase the chance that you'll work on something really cool in your free time.

    Got a slow Test::Unit or RSpec suite?
    Devver can run it up to three times faster! Request a beta invite today.

    Posted on August 19th, 2008 by Ben in Misc.