Search This Blog

Showing posts with label automation. Show all posts
Showing posts with label automation. Show all posts

Monday, April 12, 2010

Lean Software Development

The Art of Lean Software DevelopmentZero Practices (These practices that must be in place before taking the first step):
  • Source Code Management
  • Scripted Build
Daily Standup
Automated Testing
Continous Integration
  • Use a dedicated build machine
  • Check code changes into the repository a minimum of once a day (per developer); once an hour or more is even better.
  • Immediately address any failures in the build. Fixing the build takes precedence over further implementation.
Less Code
  • Eliminate Unnecessary Code
  • Use coding standards to write readable and understandable code.
  • Design and implement code with design patterns, refactoring, and emergent design.
Short Integrations
  • Use Customer Feedback
  • Course correction
Customer Participation
  • Requirements Prioritization
  • Acceptance Tests
  • Accessible Status
  • Access To Product

Friday, March 5, 2010

Programmer Productivity Tips

  1. Use a modern IDE such as Eclipse.
  2. Content Assist (or Code Completion, tab completion, Intellisense, etc.)  Content assist provides you with a list of suggested completions for partially entered strings. In Eclipse type something in the editor window and then ctrl-space. (e.g in Eclipse: Preferences->Java->Editor->Content Assist->Advanced)
  3. Code Templates: For example, type sysout and then ctrl-space and it spits out System.out.println(); with the cursor in the right spot. Type "for" ctrl-space and get a for...loop, type "try" ctrl-space and get a try...catch block.  (Eclipse: Window->Preferences->Java->Editor->Templates) 
  4. Code Generation: Faster Java coding in Eclipse Galileo (IBM), Useful Eclipse Shortcuts (SO) , Eclipse Shortcuts (Vogella)
  5. Compiler Warnings: Using Eclipse Java Compiler Errors/Warnings – Improving your code quality, CheckStyle
  6. Syntax Highlighting
  7. Focus (i.e. turn off email, browser, im when possible)
  8. Google
  9. Dual Monitors
  10. Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems
  11. Caffeine
  12. Debugger Java Debugging With Eclipse (Vogella)
  13. Sound isolating headphones
  14. Design Patterns
  15. XML Binding (no need to write DOM and SAX code any more)

Sunday, February 14, 2010

Continuous Integration

“Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily – leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly” martinfowler.com

Steve McConnell wrote about doing this in 1996 in Daily Build and Smoke Test
  • Maintain a code repository
  • Automate the build
  • Make the build self-testing
  • Everyone commits every day
  • Every commit (to mainline) should be built
  • Keep the build fast
  • Test in a clone of the production environment
  • Make it easy to get the latest deliverables
  • Everyone can see the results of the latest build
  • Automate deployment
Benefits of CI
  • CI allows you to develop software faster, better and cheaper.
  • Faster: No integration points. Release builds become a non-event.
  • Better: Tested early and often. Consolidated metrics though a CI Server.
  • Cheaper: Identify defects earlier and fix when least costly.
  • Easily repeatable testing.
Risks Of Not Doing CI

  • Without CI the team can lack cohesion (incompatible conflicts, different libraries in use, “I thought you fixed that bug 3 months ago!”).
  • Lack of Visibility: Not knowing when a build fails or your code coverage.
  • Isolation: “It works on my machine!”.
  • Integrating late means fixing bugs late, which is costly.
CI will not work if you want to use:
  • Nightly Builds.
  • Developer Branches.
  • Scheduled Integration.
  • Building via an IDE.
To get the most out of CI
  • Commit early and commit often.
  • Never commit broken code.
  • Fix build failures immediately.
  • Ensure your builds run fast, and fail fast.
  • Avoid known CI Antipatterns below:
Continuous Integration: Improving Software Quality and Reducing Risk
Continuous Integration: Improving Software Quality and Reducing Risk
  • Infrequent check-ins, which lead to delayed integrations
  • Broken builds, which prevent teams from moving on to other tasks
  • Minimal feedback, which prevents action from occurring
  • Receiving spam feedback, which causes people to ignore messages
  • Possessing a slow machine, which delays feedback
  • Relying on a bloated build, which reduces rapid feedback
  • Waiting until the end of the day to commit changes, leading to Bottleneck Commits, which typically cause broken builds and frustrated developers
  • A build consisting of minimal automated processes, which results in builds that never fail, leading to Continuous Ignorance and delaying integration problems
  • Hindering build fixes through a preference for Scheduled Builds, rather than frequently building software with every code change
  • Believing that code Works on My Machine, only to discover problems later in other environments
  • Failing to remove old build artifacts, which leads to a Polluted Environment causing false positive and false negative error.
Here's a good article on creative alerting (e.g. SMS, blog update, a lighting orb) on automated build status.

Joe Wright on Continuous Integration