Showing posts sorted by relevance for query lean. Sort by date Show all posts
Showing posts sorted by relevance for query lean. Sort by date Show all posts

Wednesday, April 7, 2010

Slimmed Down Software – A Lean, Groovy Approach in GroovyMag

The newest issue of GroovyMag is hot off the presses, and it contains the first of seven articles on Lean Software and Groovy.

The title is “Slimmed Down Software – A Lean, Groovy Approach Part 1 – Eliminate Waste”, and from the article:

The Groovy Programming Language advertises itself as an “agile and dynamic language for the JVM”, but what does this mean exactly? This series of articles explains Lean Software Development, and shows how your choice of programming language can make your entire process remain nimble and adaptive. Each month will cover one of the seven Lean Software Development principles and explain how Groovy and the associated ecosystem help eliminate waste, defer commitment, and build quality into your product.

Enjoy!

Monday, June 7, 2010

Slimmed Down Software – A Lean, Groovy Approach Part 1 – Eliminate Waste

GroovyMag is currently running a 7 part series I wrote called "Slimmed Down Software - A Lean, Groovy Approach". Part 1 started in the April 2010 edition, and now that it is June the copyright has reverted back to me and I get to self publish it on the web! If you like this then consider buying the May and June issues.

The full article is published on the Canoo Blog. As usual, up-votes at DZone are welcome.

Here's the summary:

The Groovy Programming Language advertises itself as an “agile and dynamic language for the JVM”, but what does this mean exactly? This series of articles explains Lean Software Development, and shows how your choice of programming language can make your entire process remain nimble and adaptive. Each month will cover one of the seven Lean Software Development principles and explain how Groovy and the associated ecosystem help eliminate waste, defer commitment, and build quality into your product.

Thursday, August 12, 2010

Slimmed Down Software – A Lean, Groovy Approach Part 3 – Create Knowledge

Alright, another episode of Lean Groovy has entered the public domain.


This month we take a look at the Spock framework with "Slimmed Down Software – A Lean, Groovy Approach Part 3 – Create Knowledge".

Part 4 and 5 are available today from GroovyMag. More to come shortly.

If you like it vote at DZone: http://is.gd/eenuZ

Saturday, March 6, 2010

Upcoming Gigs: Cologne, Frankfurt, Copenhagen, and Prague

The Groovy roadshow is on tour this Spring! My benevolent benefactors are letting me out of the office to visit a few user groups and conferences:


March 8 - Cologne JUG - Groovy AST Transformations
May 3rd - 7th - Jax.de - Code Generation on the JVM
May 19th to 20th - GR8 Conference - Groovy AST Transformations
June 28th - Czech JUG - Code Generation on the JVM

Sadly, I am not going to be at GR8 North America... but if you are in the US then that is the event of the Spring, in my opinion.

I'm crazy excited to visit places I have never been to and meet other programmers. If you have any desire to see any of my talks then drop me an email. I think these are my three best sessions:

Code Generation on the JVM
We're seeing more and more JVM frameworks designed to generate code at compile time: AST Transforms, Project Lombok, Spring Roo, Clojure Macros, and more. This session reviews these approaches, including examples of how and why we'd want to do this. We'll see the newest Groovy language tools, write our own AST Transform, and look at some amazing libraries based on these techniques.

Slimmed Down Software: A Lean, Groovy Approach
The Groovy Programming Language advertises itself as an "agile and dynamic Language for the JVM", but what does this mean exactly? This sessions explain Lean Software Development, and shows how your choice of programming language can your entire process remain nimble and adaptive. Come learn about the principles of Lean, and see how Groovy and the associated ecosystem help eliminate waste, defer commitment, and build quality into your product.

Legacy Code, Groovy, and You
Thinking about writing Groovy unit tests for your legacy Java code? This session is an honest discussion about what Groovy will gain you and what it won't. Come learn the engineering practices and tools that you can use to battle tight coupling, monolithic projects, and tangled dependencies, and then decide for yourself whether Groovy is the answer for your project. Plan on returning to work with a vision of what your team can do to write better software.

Wednesday, March 2, 2011

Lean Groovy 7 - Optimize the Whole

The successful software project is dependent on more than just the proper functioning of each part of the life-cycle: coding, testing, analysis, and deployment. Success hinges on how well all of these pieces fit together. Optimizing the Whole in Lean refers to making sure you always measure up. Improving your business is too often an exercise in sub-optimization: you may spend all your effort on improving the unit testing experience without realizing that it’s your interactions with operations that are derailing the project, or you may perfect your team’s delivery process while the rest of the company continues behaving wastefully...

Yep, it happened again. I put a two sentence teaser here only to redirect you to the full article over on the Canoo web site. That's just how I roll. I've got tiger blood from a different terrestrial plane. Or something.

Anyway, check out the full article and vote at DZone!

Monday, September 13, 2010

Slimmed Down Software – A Lean, Groovy Approach Part 4 – Defer Commitment

Just published a new blog post over on Canoo.com. In my humble opinion, this is the best one of the series. Less code, more jokes, and more ideas than normal. Check it out here:

(or be kind and vote at DZone.)

This article originally appeared in the July 2010 edition of GroovyMag, the Groovy and Grails magazine. Parts 5 and 6 are currently available for download from the magazine’s site, and more will come each month. Previous articles in this series are on the Canoo website: Part 1: Eliminate Waste, Part 2: Build Quality In, and Part 3: Create Knowledge. Lastly, if you like this, you may want to check out some of my older blog posts from my personal site under the “craft” category. Enjoy!

Monday, August 24, 2009

Agile 2009 Day 0: Kanban Bag Stuffing

Spent about 4 hours today packing 1500 conference bags for Agile 2009. Luckily, several guys from the Kanban-Dev mailing list showed up to turn a scene from Modern Times into an unique exercise in Lean production.

I won't explain much about the "Pull" system or queuing theory backing Lean production; rather, I'll just explain what we did.

We had about 1500 bags to pack with more than 25 items each: a lot of flyers, several books (including past volunteer Ahmed Sidky's Becoming Agile), and even some agile hand lotion (wtf, right? But it beats the face creme I got at a triathlon called, I kid you not, "every manjack"). Anyway, it all needed to be bagged, carted, and trolleyed to the reception area. Uff da.

The group split into two teams. Our goal was obviously to get the bags packed as quickly as possible. The Kanban experiment was used to create a system of flow, in which each group had a steady stream of product through their production line. Bottlenecks meant the upstream production unit should slow down and not having work to do meant the upstream unit had to speed up. But it wasn't about working more or working less to achieve flow. It was about tweaking the process so that everyone working hard would result in the flow. The group had to self organize and evolve so that this steady state existed. Over two shifts of people this did all happen to a certain extent. We didn't have measurements to see who was fastest, but each process did improve over time. Here are some observations, along with how they might apply to software teams:

  • Having no leader meant that every team member contributed new ideas to process improvement. Does the leader of your software team sometimes stifle innovation?
  • Having two teams meant that competition fueled more frequent improvements. What external forces are driving your software team to evolve?
  • Having no roles created a system where shouting "We're out of Agile Hand Lotion" meant that the person most capable of grabbing more lotion at that point in time immediately pitched in to do the job. Are the roles in your organization lightweight enough to allow the right person to contribute?
  • Having one set of workers out-of-sight (running trolleys through elevators and hotels) meant that it was more difficult for the group to self correct their entire process. Finished bags did pile up and we were at a loss as to how to make the trolley's move faster. What parts of your SDLC are out-of-sight and out-of-mind?
  • Not producing a Value Stream Map meant it was difficult to see the whole and fix the real problem, which was slow elevators. VSMs are much lower ceremony than most people realize, and we could have done one. Can your team truly see the whole?
  • Many improvements were small and non-obvious in retrospect - "Why don't we pack the books last because they are heaviest?" and "Open the bags more quickly by pulling the handle like this." Does your company have a process group that focuses on the macro view to the exclusion of the micro view?
At the end of the day, pro facilitator Jean Tabaka of Collaboration Explained fame hosted our retrospective for us. The format was ORID:
  • Objective – Focus on the facts, hard evidence data
  • Reflective – Focus on how that made people feel or other associations
  • Interpretive – Focus on the impact and significance
  • Decisive – Focus on next steps
It was a typical retrospective in that we gathered data and created a shared understanding of the event in the Objective phase, talked about our feelings and personal experiences in the Reflective phase, generated insights in the Interpretive phase, and voted with dots in the Decisive phase to create a list of action items for next year. She and the rest of the team did a great job, and both Kanban and the retrospective were superb ways to kick off the volunteer sessions!

And just because I get a kick out of having foreign characters in my posts: 看板 is the symbol for Kanban. Whee!

Monday, July 5, 2010

Slimmed Down Software – A Lean, Groovy Approach Part 2 – Build Quality In

The 2nd part of "Slimmed Down Software - A Lean, Groovy Approach" is posted over on the Canoo Blog.


This was originally printed in GroovyMag, and parts 3 and 4 are available now from the GroovyMag website.

If you like it then be sure to vote at DZone.

Saturday, January 24, 2009

A Functional Approach to Java Managed Resources

Quick, what's your standard idiom for closing Closeable resources in Java? Is it this?

OutputStream stream = new FileOutputStream(file);
try {
writeMessage(stream);
} finally {
stream.close();
}
I promise this isn't about a lack of a try/catch around the close() invocation. I'd rather clutter the prose with a message to ignore it (ignore it) than clutter the code sample. No, this post is about safely closing resources using generics, an anonymous class, and almost twice as many characters... sweet, an orgy of complexity!
withClose(
new FileOutputStream(file),
new Action<OutputStream>(){
public void call(OutputStream stream) throws IOException {
writeMessage(stream);
}
});
Just because Java makes it hard doesn't mean it isn't the right thing to do. Consider this, what stops you from forgetting the close() on a resource? A unit test? A code review? A pairing partner? Or just an amazing attention to detail? Do you think your method is more or less reliable than the javac compiler?

Let's examine what's going on in the above examples. The first one is simple. You create a stream, write some data into it, and then close it. The second does the same thing slightly differently. You create a stream, and then create a little function that writes some data into a stream. And then you pass them both to a method that will presumably call your function back, passing you the stream, and then safely closing it when it's all done.

The first one is simpler. There's no argument about that. But here's why I prefer the second one:
  • Structure over Convention - Uncle Bob Martin's latest book Clean Code recommends using structure over convention. Odd advice in a post-Rails world, but there is value in having the design decision of closing resources in a single place, the withClose method. The point is that there is no way to incorrectly invoke withClose(). You either give it objects of the correct type of the compiler complains.

  • Lean on the Compiler - Michael Feathers coined the term "Lean on the Compiler" in his book, Working Effectively with Legacy Code. I say, if we can get the compiler to enforce something for us then we should. Why use a statically typed language if that isn't a principle? Unfortunately for me, Michael Feathers meant something totally different in this book. He recommended finding usages of a variable by renaming the definitions and then analyzing the resulting compiler errors. Programmers seem to have no problem with co-opting terms and overloading them with meaning. I'm sticking with my new, invented meaning; let the confusion begin now.

  • Dependency Injection - Another Bob Martin book, Agile Software Development, strongly advocates Dependency Injection and the Hollywood Principle. The idea is the movie producer refrain, "Don't call us, we'll call you." Interpreted here to mean, don't call our object to interact with it, give us a piece of code to execute and we'll give you what you need. Like dropping off your headshot at the casting agency, we're dropping off our Action function object at the withClose() service. You could further make this idiom more encapsulated by making the Action function part of the Closeable package and then making the methods on Closeable package-private, thus forcing usage of this idiom.

  • Monady Goodness? - Man, those functional programming guys get all the cool words: catamorphisms, continuations, and monads. While there is certainly more to monads than just inversion of control, the basic usage is, as Brian Hurt says, "this code needs to execute in a time and place where condition X is true." In this case, the time when an OutputStream is open and usable.

The problem with this approach is the verboseness. It's not just creating the anonymous class, it's the fact that Java requires you to define a named function object with explicitly named types (including Exception types!). In this case, Action:
interface Action <T> {
void call(T input) throws IOException;
}
The Functional Java library helps here by providing a unary function called F1, but seriously, now many F1, F2, F3 types do you want in your codebase. I'd have more luck implementing these myself than convincing the gatekeepers to include Functional Java in the release. In fact, I did and no one noticed. Another problem is the generics of a withClose() function can appear daunting. 3 Ts and an extends? Sounds like my shopping list at Target for my daughter.
static <T extends Closeable> void withClose(T stream, Action<T> delegate) throws IOException {
try {
delegate.call(stream);
} finally {
stream.close();
}
}
I've memorized Josh Bloch's PECS (Producer Extends Consumer Super) as a mnemonic for remembering how to write wildcards and I still never write it correctly the first time. Arguably ever. Oh well, write it once and be done with it.

The last issue is combinatorics. How do you combine a withClose() action and a withOpen() action and a withFoo() action... Well, as static method invocations it would be darn hard. Java uses objects as the unit of composition, so you need to reference the withX() monad style method as an object not a global procedure. More objects means more verboseness. And combining them elegantly requires some sort of logical combination library, in the style of bin4j. How far down the functional programming road do you want to take your Java code? A functional language would "fix" all these problems:

  • Function objects do not need to be named or declared

  • The syntax for creating function objects is trivial

  • The generic types can be inferred rather than declared

  • And functions are the natural unit of composition, and object baggage can be discarded

Perhaps it's time to try a functional language?

Monday, July 11, 2011

Grails Podcast Interview with Hamlet D'Arcy

Last week I sat down with the gang at the Grails Podcast and talked shop for about 45 minutes. We talked about a lot of different topics such as Groovy, Lean software, Spock, Groovy in Action, and of course Hackergarten. Check out the full audio and shownotes over at Grails Podcast Episode 125.

Thursday, October 28, 2010

Slimmed Down Software- A Lean, Groovy Approach Part 5 - Deliver Fast

"It is clear and logical that developing features in small increments means you deliver sooner, and there is value in that. Delivering a partial system on an earlier calendar date means the customer starts accruing a return on investment before project completion, and this can even result in the system paying for itself before the project is even finished. But will delivering smaller increments really increase your output in the long term? The answer from queuing theory research is a resounding "yes"...

Part 5 of Slimmed Down Software is now available on the Canoo Blog. To read the entire article please surf on over there. And if you want to be kind then upvote at DZone.

This article originally appeared in the August 2010 edition of GroovyMag, the Groovy and Grails magazine. Parts 6 and 7 are currently available for download from the magazine’s site, and more will come each month. Previous articles in this series are on the Canoo website: Part 1: Eliminate Waste, Part 2: Build Quality In, Part 3: Create Knowledge, and Part 4: Defer Commitment. Lastly, if you like this, you may want to check out some of my older blog posts from my personal site under the ‘craft’ category. Enjoy!

Tuesday, March 8, 2011

Waste!

In our industry no one recommends increasing waste, there are no waste evangelists, and no pro-waste lobby. So why is there so much of it? As we scramble frantically through the day to please our customers we are often not even aware of the pointless trail of half done work and unwanted features we leave in our wake. This article helps you understand what waste is, where it comes from, and what you can do about it by mapping the seven wastes of Lean Manufacturing into the software development field. If you want both better software and happier customers then quit wasting time and read this article.

This article originally appeared in the October issue of No Fluff Just Stuff magazine. The full article is available on the Canoo blog. As always, you can upvote at DZone.


Thanks for bearing with the teaser/redirect thing I keep having to do.

Tuesday, December 7, 2010

Slimmed Down Software – A Lean, Groovy Approach Part 6 – Respect People

Respecting people means creating an environment where the human element drives innovation and value. Creative problem solving and spontaneity are our most valuable assets, and great companies arrange their development process to let every single employee be able to exercise these traits...
The entire article, as usual, is available over to the Canoo Blog. And you can of course vote on DZone.

This article originally appeared in the September 2010 edition of GroovyMag, the Groovy and Grails magazine. Part 7 is currently available for download from the magazine’s site, and more will come each month. Previous articles in this series are on the Canoo website: Part 1: Eliminate Waste, Part 2: Build Quality In, Part 3: Create Knowledge, Part 4: Defer Commitment, and Part 5: Deliver Fast. Lastly, if you like this, you may want to check out some of my older blog posts from my personal site under the ‘craft’ category. Enjoy!