CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeremy D. Miller -- The Shade Tree Developer

Under the hood and working with .Net, TDD, Software Design, and Agile Stuff

September 2006 - Posts

  • New Job, and Moving to New York

    While I'm sad to leave Austin and Texas behind, I'm happy to announce that I am starting a new position as an Agile Coach and .Net Consultant with Finetix in New York on Monday.  Which also means that I've added this bit of language to the blog skin:

    All opinions expressed here constitute my (Jeremy D. Miller's) personal opinion, and do not necessarily represent the opinion of any other organization or person, including (but not limited to) my fellow employees, my employer, its clients or their agents.

    The blog will be going dark for about a week as I make the drive to NY and start to settle in at work.  In the meantime, I'm busy trying to fit as much Tex Mex food in this week as I possibly can.  While in Austin, I had a chance to work with and know a lot of great developers and I'll miss you all, but the world's a smaller place than it used to be and we'll bump into each other again.


     

  • Don't Let Your Code Look Like a Tetris Game Gone Badly

    Keith Ray on Application Layering
  • How to be a Bad External Development Partner

    We've been dealing this year with a couple overseas development partners that provide particular business services.  By my count we are 5 months late on the first and 2 months late with the second partner.  We've had a lot of churn from unclear requirements (lawyers were involved), but a lot more from the technical side.

    We just discovered this week that Partner A changed their web service out from under us without informing us.  Once we got the WSDL files from them we updated our proxies easily enough, but we started seeing some problems.  On one web service message we expect a null return to mean that the data simply isn't ready yet and try again later.  They switched it to throwing an exception so they could "provide more information," breaking our code in the process by changing the semantics of their service.  We'd try to suggest going to a DTO response coming back that could contain either the successful or not ready information coming back, but we don't have any confidence, or influence, over their solution.

    Partner B has simply never done any .Net or Web Service integration work, and they seem to have very weak quality practices.  I.e. obviously no unit testing or even integration testing and poor configuration management.  Really bad bugs that should have been caught by simple visual inspection have gotten through to the testing environment.

    Lessons Learned?  Well, for one thing I would emphasize as much communication as possible early on and don't rely on documentation alone for communication.  Don't assume anything about their, or your, understanding of the integration issues.  Secondly, if I'm ever in this situation again (and since this is the way the world is going to work from now on it's likely), I would insist on a shared code repository or a Continuous Integration infrastructure that spans the code of both partners to find problems faster.

    The two partners are on two different continents, so I'm certainly not bashing any particular country or region. 

     

     

     

  • The Will to be Good

    I've come to the conclusion that the single most important attribute of an effective software team is simply the will to be good.  Talent can be developed and knowledge gained, but not without the will to get there.  I'm obviously a big proponent of Agile practices, but these practices are useless unless the team is disciplined and intelligent in their approach.  If you want to be good, you have to be reflective about your approach every day and constantly make little improvements.  Don't Live with Broken Windows yes, but you've got to be observant in the first place to spot those Broken Windows.  Complacency is the enemy.

    I don't think a team is going to be good by simply working harder.  Ironically, my most important lessons for software development came from working on my father's construction crew in school -- "always think about what you're doing" and the paternal classic "work smart, not hard."  He was worried about things like walls getting out of square or hurting your back lifting, but those little homilies certainly apply to our profession.  Effort alone will not lead to good results.  Some of the worst systems I've ever seen resulted from taking a bad direction and following that same bad direction for the duration of the project, often with a great deal of team effort.

    Don't tolerate bad code.  If you see your code starting to get wild and wooly, refactor!  Little refactorings are the ounce of prevention that prevent the painful rewrite cure later.  Pay attention to your code so you know when to refactor.  That "pay attention" could be code reviews, code metrics, pair programming, or simply reading the code you just wrote.  Bad code will increase the cost of debugging, testing, and modifying the code later.

    Don't write code on top of bad code.  I failed to make this point adequately yesterday.  My current team is effectively evaporating and we're passing our upcoming project onto a different team.  The new project is going to require modifying some existing classes that can only be described as pure excrement.  There's far, far too much duplicated code in a very long method and class (Cyclomatic Complexity = 50+).  The new team wants to make the simplest change they can to just add in some more if/then logic and walk away.  That's a dangerous attitude that will hurt the team over time.  I know that attitude has hurt my company.  Arguably, that code is in the shape it's in because of exactly that attitude of "I just have to get this done."  On one hand, I think the new code would go smoother if you cleaned up the old code first.  On the other hand, doing no cleanup is going to increase the chances of a full blown rewrite the next time that code changes because it's already at the verge of being unusable.  The key point is that the new changes would be relatively simple if the original code had simply been built cleaner.  I really do think that some minor refactorings early on could have prevented the poor quality code with much less effort than it will take at this point.

    Fix a broken build -- immediately.  As soon as you stop taking a Continuous Integration build seriously, whatever it might be, you have lost all the value of doing a CI build.

    The "design hat" never comes off.  Scott Bellware and Sam Gentile have both posted recently about their feelings toward continuous design and the role of an architect or design leader on Agile projects.  Pushing aside the definition of roles and responsibilities on a project, doing continuous design effectively requires the team as a whole to adopt an attitude of constant challenge to their design.  Talk and think about your design. Analyze the effectiveness of your design over time.  Don't act on a design idea until it's time, but do think about the future and keep a running queue of design ideas circulating in the team.  All of the worst systems I've ever worked with shared a common history:  the team picked a technical direction early that wasn't ideal, then thoughtlessly marched along said flawed path without any thought for altering the design. 

    If a manual build or deployment process is repeatedly slowing you down, automate it! 

    If you're producing too many bugs, think about changing the way you unit test or code.

    If your estimating practices or project management processes don't seem to work, change them. The "process" is there to serve the team, not the team existing to serve the process.  If you think iteration kickoff meetings are some sort of sadistic exercise, you've got a severe problem that needs to be addressed.  If you hate the process, it needs to change.  Grumbling never seems to help -- .

    Does Quality Even Matter?

    Absolutely.  If you're like me, your management doesn't care or understand, but quality absolutely matters -- even to management, they just don't always understand the implications.  Quality code, configuration management, and testability maintains the level of the team's productivity.  Bad code degrades the team's productivity over time.  Good designs enable efficiency in supporting the code later.  Bad designs increase the cost of ownership. 

    Almost without fail, anytime somebody posts on a design pattern or design approach, another person will comment that they don't have time for all this academic nonsense because they're too busy building code under time constraints in the real world. Regardless of process or philosophy or technology, the best teams are those that ditch that attitude of "I can't stop to sharpen the saw because I'm too busy cutting wood!"

    Besides, there's that little "pride in your craftsmanship" thing too.

  • Machine specific tasks with NAnt

    I always have to look up how to do this, so I'm going to capture this now.  If you ever need to make a NAnt script branch based on the machine it's running on, here's an easy way.  First, go and get the machine name that the NAnt script is running on:

                <property name="machine" value="${environment::get-machine-name()}" />

    Then use the if and call tasks to call another target named after the machine:

                  <if test="${target::exists(machine)}"> 

                    <call target="${machine}"/>

                  </if>

    Then simply create a separate task for each machine name like this:

          <target name="TEST-SERVER">

              <property name="database" value="invoice_test" />   

          </target>

     

          <target name="PRODUCTION-SERVER">

              <property name="database" value="invoice_prod" /> 

          </target>

    We use it occasionally in build scripts to handle differences in developer workstations (try not to do this though) and server environments without forking the build scripts.

  • It's official, there is now an xUnit tool for every programming language

    I just saw an xUnit tool for Matlab announced on TestDriven.com --> http://www.testdriven.com/modules/mylinks/singlelink.php?lid=1186

    Matlab & Maple V were my first programming "loves."  To this day, I think Maple is the most brilliant piece of software I've ever seen.

     

  • Joel & DHH on Selecting a Programming Language

    Joel Spolsky has a post today titled Language Wars where he makes some statements about selecting a platform for web development.  He says the standard things you've heard a dozen times before and makes the (very) reasonable case for selecting a mainstream platform (basically Java or .Net and maybe PHP or even Python) for your enterprise development.  He did take some shots at Ruby on Rails which provoked this from DHH the creator of Rails:  Fear, Uncertain, and Doubt by Joel Spolsky.

    The line from Joel that deserves severe abuse is: 

    FogBugz is written in Wasabi, a very advanced, functional-programming dialect of Basic with closures and lambdas and Rails-like active records that can be compiled down to VBScript, JavaScript, PHP4 or PHP5. Wasabi is a private, in-house language written by one of our best developers that is optimized specifically for developing FogBugz; the Wasabi compiler itself is written in C#.

    So, a diatribe on sticking to mainstream technology, then saying you wrote a proprietary programming language that "compiles" to VBScript to get features which already exist in other languages.  I really can't imagine a bug tracking tool requiring a special language.  If you'll forgive the vulgarity, the phrase "Proprietary Programming Language" is what I call a 'Nad Shrinker.  Or the wrong kind of job security.

    I'm going to express no opinion here about the merits of ASP.Net vs. a Java stack vs. RoR or one of the myriad LAMP stacks, but I'll throw down the guantlet to Joel by saying that I bet I can create a web application in any platform that doesn't scale;)

    Isn't the blogosphere fun? 

More Posts

Our Sponsors

Free Tech Publications

This Blog

Syndication

News

All opinions expressed here constitute my (Jeremy D. Miller's) personal opinion, and do not necessarily represent the opinion of any other organization or person, including (but not limited to) my fellow employees, my employer, its clients or their agents.

About Me

"Best Of" Compendium

StructureMap (Dependency Injection for .Net)

StoryTeller (Supercharged Fit)

Build your own Cab

TestDriven

MVP