Friday, August 19, 2016

Refactoring the Enterprise

Why Refactoring – Is this yet another Agile Method

First, this is not a call for another Agile Method.  I won’t try to write a book and repackage a bunch of stuff you already know and then offer to certify you.  Nothing wrong with that but not my thing.  Second, I am using Refactoring because I have been recently re-inspired by doing refactoring katas thanks to Llewellyn Falco and Woody Zuill and reading some great books The Nature of Software Development by Ron Jeffries and Building Microservices to name two. What I describe below is similar in some ways to refactoring legacy code.

I have been talking about this idea of carving out a bit of business capability that a single team can deliver and run without the need to coordinate with other teams. The fancy name for this is Domain Driven design with Bounded Context.

Most businesses these days, regardless of the product or service they deliver, have become software development companies. Many of these companies are running a fragile, organically grown, or acquired, collection of code and infrastructure that is difficult and risky to change. At the same time, market demands, competition, and a changing technology landscape make business agility more important than ever. 

There are already some enterprise frameworks for agile but they feel heavy to me and they seem to put the focus on detailed upfront planning and ongoing processes which seems inconsistent with the Agile Manifesto.

I think a refactoring approach can be used to transform organizations in an iterative, emergent way that limits risk and maximizes long term ROI.  Here’s what that might look like.

Meet with executives at any level in the organization to understand their strategic objectives and known barriers to achieving them.

·      A strategic objective might be to provide device specific, yet consistent access to product information.
·      A barrier to achieving that might be that the business rules are embedded in the webpage code and backend systems without a clear delineation. Creating a mobile app that provides the same selection and pricing as the existing website could be very expensive and require a huge amount of testing with a long time line.

Enterprise and Solution Architects are in the best position to identify challenges and opportunities in the IT space that align to those objectives and remove barriers. The architects will also have a key role in integrating new services into the existing architecture.

Because we must be able to deploy at any time – even multiple times per day - organizational leaders must clear a path for a parallel delivery pipeline that allows on demand deployment to production environments. Versioning and feature flags allow partial feature upgrades and multiple versions of software to coexist in the production environment.  Creating a parallel delivery path allows the lights to stay on while we iterate to the fully workable solution.

One way to start the journey would be to select a specific business capability that needs to change, or scale, but is difficult or risky in the current process. After creating the bounded context; design a product that provides that business capability to customers – who may be internal or external. 

For our example above we might create a service that encapsulates the business rules and the product data to determine which products should be offered to a customer. The service could be called via a restful interface that includes specific selection criteria.  The service would return a list of products (prices might be included or might be provided by a different service.) The development team for each device platform could decide how best to display the offerings.

To get started on the new service we would form a product team (Product Owner, Developers) that will develop and support the product starting with the smallest useful feature set, MVP, in parallel with the current delivery scheme. The Developers are responsible for testing and supporting their product – even in production.  The Product Owner is responsible for maximizing value and being available to the team at all times – What Woody calls Decision Queue Time – can easily multiply the time to value for a development effort.

To ensure the business agility we promise, it’s not enough to just write the software. The product team must be able to deliver running tested features into production on their first iteration.  This means they need to have version control, build automation, acceptance test automation, non-functional test automation, and automated deployment from the very beginning. Assign a Coach to help with these things and the ongoing challenges they will face.  The first running tested feature may be as simple as “Hello World” but it will be in version control, have been automatically built, passed its acceptance tests, passed non-functional requirements testing, been automatically deployed into the production environment, and validated as available and responsive. This is the proof that all the parts work together and it’s a great way for the team to experience the definition of done.

It is important to make clear the expectation of excellent technical practices.  Release to production every iteration using automated tests and automated build/deploy.  Version APIs and use feature flags as required to enable trunk based development.  Design and build in monitoring, high availability, recovery, graceful degradation, and scaling from the beginning.

Also, every developer must be familiar with and responsible for the quality of every piece of code. This is a key risk mitigation strategy; nobody wants to worry about crucial code that only one person can work on or complex code that fights modification.

This approach provides learning early and often but still requires patience. The first effort will be slow – people will need training and experience.  There will be missteps and disappointment along the way.  Understand and plan for this – you have already reduced risk by undertaking this as a parallel effort to whatever process is already in place and by automating tests and deployment.

We started off talking about an enterprise transformation but we’ve only talked about a single team so far. In the spirit of the agile manifesto we want to iterate and learn. When the first effort starts to show success, add another product and team.  Use this pattern of adoption until you run out of products and markets that need attention.  Your organizational structure will change over time to reflect the new architecture.  Many teams will be able to support more than one related product – that will emerge as you go.

Changing the focus from the activities of Agile/DevOps adoption to the achievement of strategic business objectives through refactoring allows us to start learning faster and to stop at any time with minimal waste. Moving to a product focus allows us to leverage Conway’s law in reverse to transform the organizational structure around the business outcomes we are trying to create.

I am interested in your feedback especially if you have specific examples and ideas on why this could never work in the complex domains of the real world.

Thanks for reading --Mike





Saturday, July 30, 2016

Strong Pairing, Mobbing, and Woody's Workshop

First - some background.

I don't program computers for a living and haven't in a long time.  I am interested in programming techniques, languages, and approaches though; I could code my way out of paper bag if my life depended on it.

For a long time I have been a proponent of XP practices like pair programming, TDD, small stories, frequent delivery, etc. 

At my last company I had started to sit with developers while they worked and talk with them about some of the issues they faced.  General problem solving, simplifying, and helping to focus on one thing at a time.  This would be very weak pairing as I would be conversant but not fluent in the tools.

At the same company, two of the teams had started to do a lot of group sessions where they would work through problems and solutions together in an informal way that allowed people to join and leave as they needed to while the group continued to make progress.  We didn't have a name for it but it seemed to work well.  This had grown out of our hiring process where all available members would participate in interviews and technical challenges that required collaboration, resourcefulness, and the courage to ask questions and sometimes say "I don't know."

A few months ago on the AgileMentoring.com Slack board, somebody mentioned Mob Programming which I had not heard of.  I was very interested though based on the previous good experience with group sessions, and intrigued by some of the details such as frequent driver changes.

I watched the video, bought the Mob Programming book and reached out to Woody on Twitter.  We had a phone call one Sunday afternoon and I decided I needed to learn as much as possible about this way of working.

Cut to #Agile2016 and an available Mob Programming workshop in Atlanta after the conference. While walking around and talking to a large number of interesting people, I noticed there was a Mob in session working on a Refactoring Kata for a simple Tennis Scoring program.

I walked over and sat down to observe.  In the space of less than 10 minutes, several approaches to refactoring the ugly If block were coded.  All of them worked but left one or another team member dissatisfied because they were clever, or confusing, or ugly, finally - still in the 10 minutes or so - somebody suggested a clean, simple, and elegant solution.  The tests passed and it was over.

Llewellyn Falco mentioned that they would be doing another Kata as a Mob the next morning.  Well the next morning the projector had disappeared and there had been a party the previous night so only Llewellyn and I showed up.  He offered to do a Strong Style Pairing session with me.  Strong Pairing is where any coding idea must go through somebody else's hand on the keyboard.  I was a bit nervous, we would be coding in C# - a language I have not used or even looked at - and with just the two of us there would be no cover for my ignorance.  It turned out that Llewellyn was very patient, we came to a nice refactoring solution in a about 40 minutes with some good conversation and advice thrown in.

Shortly after that, I realized I was a train ride and car drive away from Woody's Mob Programming workshop.  I arrived a few minutes late and Woody was still covering stuff that's in his book - whew!

Woody walked 4 volunteers through the rotation process while the rest of us tried not to interject and learned to feel what that is like.

In no time, we broke into groups of 4-5 - each with our own computer setup - and strict directions that only the current navigator could suggest what to code and only the current driver could type stuff in.  

This was hard.  As the navigator, I really wanted to consult with the team.  As an observer, I really wanted to help the navigator.  As the driver - all my recently learned keyboard shortcuts were useless because we were using a different IDE from what Llewellyn and I had used.

After satisfying a couple of requirements, we were allowed to call for a consult at any time and talk as group but with hands off the keyboard.  This was a lot better, but we found it easy to spend too much time evaluating different ideas without putting them to code.  A couple of times when we wanted to refactor because the code was getting ugly, we couldn't agree on an approach right away so we just made the test go green and put refactoring on the back burner.  I did mention that we were doing TDD - right?

A quick word about TDD.  With the group it was easy to write the test for each new requirement first. We quickly grew comfortable with this approach and it made refactoring attempts really easy and stress free.  One time we made too many changes and turned about half our tests red.  Woody had us revert until all the tests were green and try again.  His view - which I now share - is that you should only start a refactoring when all your tests are green, and that you should never be more than a couple of edits between passing all tests.

Finally, as we continued to knock out requirements more and more quickly, and Woody - our product owner - was busy with other teams, we started to use the gaps to review our approach and identify refactoring opportunities that would make us happier with our code.  Better names, cleaner tests, etc.

The last stage as a team was to be in full Mob mode - anybody could make a suggestion at any time while remaining Kind, Considerate, and Respectful.  This was a lot of fun and we already felt like a team after something like 1 hour of working together.

When we started only one person on the team was an actual C# programmer.  This was scary but turned out to not matter. Almost any problem is going to require only a small set of language features and you learn the ones you need pretty fast.  A nice side effect is that everybody learns them.

I also thought that the frequent Driver Rotation would be disruptive - we were using 4 minutes.  It was not a problem and seemed to have the effect of time-boxing our work.  We would think about how we could go green in the space of a rotation - whether it was a new requirement or a refactoring.

I want to do a lot more of this and find a really good way to Mob Remotely.  I highly recommend that you get Woody to do a Workshop for your teams and give this a solid try.  The concepts are simple but I think your chances of success and adoption go up with the workshop.





Sunday, September 22, 2013

The Mouse is dead - long live something else

My wife came home with a new issue the other day.  Kindergartners will take a pass on computer time rather than learn how to use a mouse.  You might say - they're five, what are you talking about and who cares anyway.

Well the thing is five year olds have, for the past several years, loved their computer time.  So what's different this year?  Tablets.  Well Tablets and the Smart Board which is like a wall sized tablet.  The kids are completely unimpressed with with the abstraction of movement and selection required to use a mouse.

So in the immediate future I think it's going to be touch, the guys at leap like hand waving and that might catch on, or it might have the same problem as the mouse for these kids - not direct enough.

I can see a near future where something like Google Glass is all I need.  I'll tell Putty what window to open and the *nix aware voice recognition will take all the vowels out to make good command lines.

Saturday, December 3, 2011

Data Sharing Among Applications

Too Much Complexity - It's a big Pain In My Ass

I have this theory that most of the shit we do in IT is more complex than it needs to be  There are entire industries built around creating new vocabularies for old concepts and packaging fundamental data processing concepts into new buzzwords - almost always making simple things less simple.

This is not new, it's been common practice for at least 15 years.  I think prior to about 15-20 years ago there were too few IT pros to get away with it - we would call BS on your "new idea" if it was already commonly understood or too obvious.

Recently, I've been thinking of how to de-couple applications that have grown up organically as close siblings.  You've seen this where each application has to have its own copy of the data from other apps.  We have an institutionalized scheme for noticing changes and pushing them to all interested parties.  Or where one application is doing complex multi-table queries against the physical tables in another application's database.  Or even worse where my app consumes some of your data and changes the status of the records directly in your DB.

Many people don't seem to think this is a problem or even particularly ugly.  I might just be a whiny old guy to think something more elegant would be better - maybe so but I'm gonna whine.

Problems with close sibling applications

You're too much in my business.  I mean where's the privacy?  Where's the respect?  And now I have to get your permission to re-arrange my furniture?  I feel constrained.  I feel put upon.  We need to re-evaluate our relationship.

All this everybody's in everybody else's business mean it's really hard to make simple changes.  I might break your app.  You might break mine.  Who uses what?  What apps are at risk if I make this change?  It's all very scary and leads to paralysis, delays, and really frustrated business stakeholders that just want to get shit done.

Popular Solution Approaches

Generally you see a few approaches.  One is to decide that the entire enterprise is going to implement some sort of Enterprise Service/Data bus and become SOA everywhere.  Just a few million bucks on consulting, hardware, software, projects to create web services for all our apps, and we'll be good to go.  Three years - tops.

Another approach is to undertake a CMDB project.  We'll document all our dependencies, design a data store to put everything in and then we'll be able to see exactly what changes will affect what processes and applications.  Again it'll only cost a few million bucks and we should be able to do this in no time - two or three years.  Let's ignore for a moment that we have a poor understanding of our dependencies to somehow overcome.

For both  of these you also have to ignore that the business still wants to get shit done and they compete for the resources you're using on these "nice to have" IT initiatives.  They compete using business cases with revenue, presented by professional sales people.

In the old days we had the idea that there should be an enterprise database - a single, shared, easily accessible database that everybody would use.  We would define every data element in the data dictionary and if your app needed to have last names, you would go to the data dictionary to find out that last names are always varchar(25) or whatever.  Of course this was a complete failure, with data dictionaries having at least as many definitions for a standard last name as there were existing applications that use last name.  The idea is still attractive - but it just does not work in the real world.

My opinion is that these approaches are too complex to undertake as a project and are doomed to failure - I would love to hear some success stories though.

What we can start doing now

I'm also a big fan of Fundamentals - setting a pick, getting down on the ball, looking where you want to go - before advanced techniques like driving to the basket, turning a double play, and getting a knee down.

So I suggest starting with something simple.  One or two apps at a time, find out what data they share and how. 

If they're doing queries directly against your tables - move that to a view that also does whatever joins are required to give them the data set they need.  Think about things like - my app looks for a record in one table and if it's not found, queries a history table for the same info - could you create a view that allows me to look just once?

What if I need to change values in your data?  First explore whether that's really needed, if it is, create a stored procedure that you control and I just call.  Then you are free to do whatever you need in your app as long as my view and update procedure stay the same - you don't even need to talk to me about it...

After this first step of creating Views and Procedures we can start thinking about creating endpoints.  Web Services, an intermediate Database server that Federates access without replicating data (use a data warehouse to Federate big data), or whatever other endpoint you can think of.

Views?  That's so 1990 - we are SOA all the way XML, HTML...

Views are an enabler that support whatever you want to do next while providing immediate benefits - not the least of which is figuring out what data you actually share.

Views might be 1990 but just about everybody can understand a select statement.  And think about the benefits to testing.  Rather than needing a full blown environment with all the services up and running.  Or mocking all those services.  I can have test data in a Spreadsheet or Access or MySQL or whatever I want and simply point the app to the datasource.  I can also peruse the data that my app sees without having to know all about the schema in the source DB.

Conclusion

It's our job to resist gratuitous complexity.  Go to the fundamentals that enable whatever is next and only add moving pieces that can carry their weight and more.

Thanks for reading - Mike




Thursday, January 13, 2011

Turnaround Toolbox - Set Scope and Accountability for the team

Having explored what everybody thinks we should do - Expectations - and getting control of how folks engage us - Inputs - it's time to set the scope for the team.  

Scope includes all the tasks we do, products we deliver, and also what we're accountable for.

Tasks and Deliverables:  
For each task your team does and deliverable you produce, you need to know the Who, What, Where, When, Why, and How.  

Who on the team does the work?  If the task is one-deep, who would provide secondary, and tertiary coverage?  A lot of times you find these little one off items that one person knows about and knows how to do.  If it's going to stay in your box, you must be able to support it through vacations, resignations, etc.  Counting on a single person is an unacceptable risk.

What is the task?  Is it an operational procedure, document creation, external communication?  Categorizing the What of items makes it easier to organize them for documentation and assignment.

Where does the activity occur?  What you want to understand here is whether it's location specific.  Manning a teller window in a bank is location specific.  Creating a spreadsheet from a report can probably be done anywhere.

When and with what frequency does the activity happen - or need to happen?  You might find that you have tasks at a frequency that you're not staffed for.  For instance 24/7 operational monitoring without 24/7 staffing.  It might still stay in your scope, but with a different How component.     

Why do you do it?  Everything must be supported by a compelling reason - everything you do comes at a price.  Arriving at the cost can be difficult when nobody has to write a discrete check for the item, but it's important to get some idea.  Is it a good value?  Does it mitigate a risk?  Does it meet a contractual or regulatory requirement?

How is it done?  If we don't have documentation we'll need it - either to keep the task, or to transition it to a more appropriate home.   

A few words about accountability.  If it's in your box, you are accountable for it.  Given that, you want to make sure that you have control over everything in your box.  This means you must push out stuff where you're just the middle man.  Being the middle man is fine if you add some value and you limit your accountability to your performance as the middle man.  

The most important thing is that you do not want to end up accountable for things you cannot control.  So if your job is to predict or report on the sunrise - that's fine - if somebody expects you to control the sunrise - well that's a recipe for disappointment.

So, figure out what your team should do, make sure you can perform, and limit your accountability to things that you can control.

Thanks for reading - Mike

Tuesday, January 4, 2011

Turnaround Toolbox - Define, Limit, and Enforce your inputs

In the last post I talked about Expectations.  Today I want to talk about getting control of the inputs.  It's really hard to provide good customer service if you take requests via multiple, uncontrolled channels.  Think about trying to grocery shop to a budget with random people throwing stuff in your buggy at random times - you could probably keep track of most of it, but that ipod touch from the electronics department would be a painful miss when you got to the register.

We've all had experience with a lot of input channels - email, IM, telephone, one or more ticketing system, scheduled tasks, etc.  Any or even all of these together can work if you have a process in place to manage and track them.  Some organizations even take tweets now.  The key is getting control so that nothing falls through the cracks.

Define your inputs:

If you take email does it go to individual in-boxes, an organizational in-box, or a distribution list?  Who is responsible for keeping track of the requests?  How are items assigned?  Do responses come from individuals or from an organizational sending address?  What happens when somebody goes on vacation?  I am not a fan of taking requests via email because there are just so many cracks for things to fall into.  I get hundreds of emails a day and the signal to noise ratio is not very good.  But it might be a different story for you so if email works use it; you still must define how you are going to handle email requests.

Instant messaging  would seem to be an even harder nut to crack than email, in my experience IM provides a natural indicator for immediate requests - if I don't respond to your IM you can be pretty sure I am not working on your issue.  IMs don't work as well for problems that require more time or coordination.  Much like a phone call, once we quit talking, I am on to something else and your issue is a fast fading memory.

Phone calls - see IMs.  Good for immediate stuff but once we hang up it is over.

I like some sort of ticketing system something like Fogbugz that is easy to use like email but keeps track of ownership, history and related artifacts is nice.  Salesforce works as well as a lot of others.  It does not matter so much which system you use as long as you use one.  Ticketing systems give the issue a unique handle that people can refer back to, use as a license to work, and do reporting on.  Try to avoid multiple disconnected systems though.

Limit your inputs:


Only take requests via inputs you have defined and can manage.  This should be obvious but I can tell you from experience that it is not.  People that want stuff from you will use any path they can, but they will crucify you when their request falls into the Grand Canyon sized crack in the "interupt an ongoing hallway conversation to mention this little item" method of request input.  If you have a process for managing requests via Tweets, Email, Tickets, and Phone Calls then go ahead and takes requests through those channels - just don't take requests through Facebook Wall Posts until you figure out how to manage them to completion and get that defined for your customers and staff.

Enforce your inputs:


This is both the most difficult and most important, especially if the team has historically taken requests however they come in.  When you first start enforcing your inputs with customers it can seem like they're getting the run-around.  You want to avoid this by gradually moving from taking the requests as you always have to only accepting requests through the defined channels.  It's a journey.

At first I will start with some canned language that tells the requester how to get the best results along with a personal note that I have opened the request for them and here's the number for tracking purposes.  Say I get a request from a Sales Rep asking why Customer x was charged for Product y.

I'll send back something like:

Mary,

I have opened request xxxxx for you.  You can track it's status here [link to the ticket].  In the future please open a request by going to [some URL] and filling out the request form.  This will allow us to assign your request to the best resource and track it to completion.

Thanks,

On the next two or three requests from Mary I would send:

Mary,

For best results please open a request by going to [some URL] and filling out the request form.  This will allow us to assign your request to the best resource and track it to completion.

Thanks,

Finally, I would move to:

Mary,

What's the ticket number?

Thanks,

This is not really a science and I might also have a lot of phone calls and chat sessions extolling the virtues of the defined system.  It does work over time.

That's one half of the battle - the other half is getting your staff on board.  It going to feel like they are being unhelpful and wasting time because it's easier, quicker, and all around better to just dispatch the request then and there.

They're right of course for the ones they know about - the problem is the ones they don't notice and come back to you two weeks later as a "your whole team sucks" escalation.

I expend a lot of effort in the beginning trying to see what people are working on and how it came to them.  When I see somebody working on a proper request, I praise them.  When I see somebody working from a non-sanctioned request, I reiterate the need for using the defined inputs, and make them put the request in process.  It's a huge pain in the ass for both of us, but I know it will pay off quicker than expected.

A few words about ticketing systems.  Once you have a request in process it's fine to do some out-of-band communication to move the request along.  IM the requester for a clarification, pick up the phone, host a conference call.  Whatever works to help get the job done.  What you should definitely not do or tolerate is the deal where your customer puts in a request and then your team updates the request with something like "Need more information" and does not reach out to the requester.

Most people do not live in the ticketing system and will not continue to check status.  They will check on the day of the deadline and be pissed off that the work is not done - leading to a well deserved "your whole team sucks" escalation.

Defining, Limiting, and Enforcing your inputs will go a long way toward helping you meet the organizations expectations for your team.  It takes work, time, and discipline but the payoff is a smoother flow of work and many fewer complaints.

Thanks for Reading - Mike

Friday, December 31, 2010

Turnaround Toolbox - Learning the Current Expectations

There is a set of expectations for every team.  You would hope they would be well defined, reasonable, and achievable.  You would hope that existing systems, processes, reports and documentation would support the team in fulfilling those expectations.

Of course, if that was the case there would be nothing for me to do.

You have to figure out - as quickly as possible - what the organization expects of your team.  This is hard because different people will have different ideas of your mission, responsibilities, and capabilities.  Other teams or executives may use the time of transition to add scope - team members may try to reduce scope.  It's your job to figure out what the team can and should be responsible for.  Pay particular and immediate attention to any SLAs.

Meet with your team - inventory the tasks, deliverables, reports, and documentation.  Don't be surprised to find this stuff scattered around, non-existent, or not forthcoming.  The longer the team has been in existence and working together the harder it will be to get even simple things like a complete list of tasks and deliverables.

You're going to have to dig in and sit with people to see what they are really doing.  You will often find that the person doing some ten-step procedure to overcome a common issue does not even recognize it as a task - it's just something you have to do...  Same for deliverables; people might produce and distribute needed work product without recognizing it as a required deliverable.

Figuring out everything that your team does takes a lot longer than you might expect - keep looking, send people on vacation, question everything that seems like it should be on the list but isn't.  Why is Joe Blow asking for that from us?

Meet with your boss(es) - try to understand their idea of your mission.  Get copies of any deliverables they routinely receive from your team.  Talk about success criteria - expect this to be something very helpful like "be perfect", "100 percent error free", or "Make sure nobody escalates to me."  If you're very lucky you will get some objective criteria that is both within your control and something you can measure.

Something to be on guard for is bogus reporting from your predecessor and areas where the picture has been presented very carefully, giving the impression of more capability than really exists.  This stuff can make your job a lot harder, and your life miserable when it takes you by surprise.  I have taken over an area only to be asked for a recurring report that nobody on the team has any idea how to produce - and has shown improvement.  Upon further investigation all I could determine was that the guy was making up the numbers. Worse, the numbers he was reporting on would not measure the team's effectiveness.

Meet with your customers - anybody that expects your team to produce work product, perform tasks, etc. is your customer.  Find out what they think your team does and make sure you capture any sort of report or other deliverable.  As you develop the relationship your customers will become your allies - but you have to make sure you know what they need, why they need it, and what they do with it.

Almost assuredly your team, bosses, and customers are on different pages or even reading different books.  All the work in the world won't lead to success if what you deliver is not what they expect.

Thanks for reading - Mike

Turnaround Toolbox - Introduction

It's been a long time since I wrote anything - I have been up to my neck in work for the last 20 months.  It seems like a good time to capture some old, new, and re-learned lessons.

As a generalist in the IT world, it is sometimes difficult to tell people exactly what you do.  Specialization might make the details incomprehensible, but if you say "I am an Oracle DBA" that's a box people understand.  I usually just tell people "I do computer stuff" which is a lot like saying "I am purple."

What I really do is use decades of broad IT, Business, and Personal experience to help teams perform at a very high level.  I plan to write a series of short articles detailing the approaches I have found useful.

Please feel free to comment, question, or argue with me.

Here's the list of topics - maybe not in the order I will write them - most of these have to happen in parallel and through many iterations.


  • Learn the Current Expectations
  • Identify and understand the existing Gaps between Expectations and results
  • Find out what Metrics matter
  • Start Measuring - Know your numbers
  • Create your Box
  • Reset Expectations - internal and external
  • Develop and Articulate your vision of a better future
  • Take actions that do not require permission, cooperation, or coordination
  • Define, Limit, and Enforce you inputs
  • Reach beyond your borders to partner with others
Follow along if you like - I'll try to exert some discipline and write one topic a week.

Thanks for Reading - Mike

Friday, March 27, 2009

Be a Go Getter

One of the biggest barriers to advancement for a lot of smart, hard working people is the "Does not show initiative" knock or some variation on the same theme.  You would not believe how many times I've been in discussions about who's ready for a promotion and heard something like "Joe does a great job at whatever I tell him to do, but only what I tell him to do" this is the kiss of death because we don't want to tell everybody what to do.

This might be a great surprise to many because from the trenches we feel micromanaged and thwarted in our attempts to make the great improvements we know we could make if only we were allowed.  It's a conundrum - I admit it.

How do you show you're a "Go Getter" ready for advancement while being micromanaged and thwarted by evil Pointy Haired Bosses that cannot code their way out of an open grocery bag - such as myself.

Well it's simple really.  Do the small stuff for yourself or for the PHB of your choice.  For instance if I say "let me get with Don and get back to you with an answer" you say "I can check with Don and make sure I have everything I need."  This is the perfect response because it takes a task off my plate, and it allows you to get the work done more quickly - not waiting for me or annoying me with constant badgering about did I get with Don yet.  Btw the badgering thing will just makes you look like a high maintenance pain in the ass.  I do not want to be reminded of my status as a bottleneck...  

The scenario above is just the starting point of an upward spiral of Go Getter goodness.  Now you are the focal point for the task with Don too - he's likely to be just another PHB and might say "Let me get with Tim and I'll get back to you"  For the life of me I do not understand why middle managers so often turn themselves into Gofors.  Anyway, same thing, tell Don you can get with Tim directly and that you'll keep Don in the loop if he wants.

So at this point you've helped two managers without doing any more work than you would already be doing.  You've made life better for you and Tim because you guys don't have to wait for PHBs to communicate.  And you've made it much easier to iterate through possible solutions with Tim - if that's applicable.

Make this little technique a habit and you'll get more interesting assignments, managers will start to listen to your ideas because they'll know that you are not just thinking of stuff for them to do, and when it comes time to select somebody for promotion you are way more likely be on the list.  Get on the list often enough and you'll get the nod.

Thanks for reading - Mike

Saturday, March 14, 2009

A dozen things Deployment Scripts must do

Just like the barefoot kids of the local cobbler I find the installation of many software packages ironic and painful.  Lately I've been talking, a lot, to development managers about getting their deployments scripted and to business people about why Fast, Easy, Reliable deployments are important to them.

Strangely, there seems to be a real lack of understanding on the part of developers about what a build script should do.  I blame IDEs for allowing developers to mostly ignore how things get built and deployed - but I could be wrong.

Anyway,  I've written a list of generic requirements for an automated deployment and this seems to have helped several folks focus their efforts so I thought I would share.  I have gotten some feedback that this list is 'pie in the sky' but I reject that while allowing that some of these things are not all that easy.

An automated deployment should:

  1. Start with a single package.
  2. Reliably put the target environment into a known state.
  3. Ensure that required disk space is available.
  4. Save anything needed for rollback.
  5. Place all files where they belong.
  6. Register anything that needs to be registered.
  7. Configure anything that needs to be configured.
  8. Start everything that needs to be started.
  9. Validate the state of the application.
  10. Validate connectivity to all required resources such as databases.
  11. Report Success or failure and the name of the artifact you have deployed.
  12. Log all relevant deployment activities.

Starting with a single package is important because it's a lot easier and less error prone to move one jar file than a jar file, a couple of properties files, a config.xml etc.  Plus you can give the package a name and store it someplace for later.

By "Reliably put the target environment in a known state" I mean just that.  If you need to shut down an application server you should also search for and kill any hung processes.  If there are status flags, set them to the correct value; basically clean the kitchen before you start cooking.

Nobody wants to get part way through a deployment just to run out of disk.  Check it first.  This is a no-brainer, but often overlooked.

Save your old stuff so you can drop back and punt if needed.  I would urge you to save it into a single package just like the one you're deploying.  I don't think you should rely on going back to the old package as there may be required changes in the current environment.  Those changes should have been the result of a proper deployment, but stuff happens...

Place your files.  I usually call this sprinkling - the deal is that your script needs to put every file where it belongs, using an appropriate path reference.  If it is always going to be the same in relation to the root directory, I like fully qualified path names.  Otherwise I like paths names relative to the installation directory - hopefully all within the installation directory.

Register things that are registered.  I don't know what you might be registering, but get it done here.  Also, start from scratch each time.  If you rely on something already being there, at some point it won't be, so trust nothing. 

Configure things that need to be configured - whatever they are - same as above, start from scratch.  Rather than sending a deltas for a config.xml send the whole (version controlled) file with the contents you want.

Start everything up.  Do this in the script rather than expecting the guy doing the deployment to do it manually.  There's no telling how many hours of otherwise useful human activity have been squandered on troubleshooting just to find that something did not get started when it should have.

Having started everything, go look to see that it is really running.  Seems simple because it is.

Validate connectivity.  If you need it for production make sure you can talk to it and that it answers.  This does not have to be complex, a simple select statement, ping or whatever makes sense for the end point you need.

When something is completed, say so, when something fails, make some noise.  Let the poor guy doing this in the middle of the night know what's going on.  Also, reiterate what version has just been deployed; I have seen people go through a long deployment and troubleshooting session just to find that they deployed the stuff from the previous release.

Build a log as you go.  Tell me when each thing starts and stops and what you did.  Do not dump a bunch of useless noise in the log though.  It should read like a detective's notebook.  
  • 22:17 Copied Blahblah1.2.jar to...
  • 22:20 Change directory to /user/loc...
  • 22:20 Executed jar - xf...

Above all put yourself in the shoes of somebody that has to deploy your app along with 20 others, in the middle of the night, while taking calls from people that want status, and trying to grab a bite to eat.

Thanks for reading - Mike


Tuesday, January 20, 2009

Has Google lost the cool?

I really like my Google stuff.  Blogger, Gmail, Groups, Picasa, Maps etc. etc. etc.  

So why on earth would I be concerned about Google losing the cool factor?  Well at home I run Ubuntu - the first little warning for me was that Picasa on Linux is a wine app.  It offended my sensibilities some, but they had at least made a good installer and it was easy for me - I don't remember the details but it's on my desktop and works so it must have been easy, or I would have pissed and moaned back then.  

They have kinda pissed me off with Chrome.  I mean sure it renders quick and has the cool, visual thing about where I go, I can just click the x for a new tab, and the interface is super clean.  But Google provides no help with a Linux or OSX version.  I went to the trouble of installing Crossover Chromium - a good effort but even CodeWeavers knows it not very good.  So now, like some street corner crack dealer, Google has  given me a taste of the new browser drug and ruined me for Firefox - but I gotta run windows?

For most companies I would not care, but Google started off so cool and they've hired all sorts of smart OSS guys that are presumably Linux and Mac users.  Why then are new Google applications targeted so relentlessly at Windows?  I know that's an overstatement but only by a bit.  Is it really so hard to make the cool stuff cross platform?  Do the non-windows users of the world really mean so little to Google that they don't even bother to give us a semi-elegant hack anymore?

Has Google already gone lame and big business on us?  Do Guido, Stevie, and so many others need to look for the next cool place to work - are they even vested yet?  I hope I get some spam from Google before the end of the week saying all their stuff is available for OSX, Linux (in Deb and RPM) as well as windows.  They could even blow a little smoke up my skirt about how cool they still are.  While they're at it maybe they could update the spell checker in Blogger.

Thanks for reading my rant - Mike

Saturday, October 11, 2008

Movin' on up

It's late September and I really should be back at school - but that was nearly thirty years back for me and the boat has sailed. So late September or early October just means review time for me and the folks that I keep amused.

Top questions this quarter;

How do I move up?
When do I get a promotion?
Do I get a raise for attaining this certificate, degree, tenure?

It's got me thinking a lot about who moves up, who doesn't, and why. Or at least I'm thinking about who I want to help and who I don't care so much about helping. So here are some attributes in no particular order:

Focus more on making my life better. I don't mean kiss my ass or pick up my cleaning. I mean get better at your job so I can deliver good news in meetings with my boss.

Focus more on making your teammates lives better. Come up with, and share, better ways of accomplishing the mission. Cross train in their job so you can back them up when needed. Smile instead of frown. Acknowledge their value to the team and help them get better too. Give credit whenever you can - it makes you look better and builds trust.

Focus on making our customers happy and comfortable. Our customer is anybody we deal with outside the team - even the folks who service our requests. Be polite, humble, and easy to deal with even when the customer is wrong or is acting like an ass. I'll step in during those occasions and get things straightened out for you.

Get passionate about what you do, or find out what already turns you on and do more of that. Nothing is more frustrating to me than a smart person who just does what I tell them to do. I don't have the time, or inclination to tell you everything - show some initiative. If what you want to do is in a different area of the company I'll help you get there, if I believe your story. It's better though if you're excited about the job you have and want to make improvements there.

Think big and persevere. It can be frustrating because organizations resist change with more vigor than they do anything else; think big anyway and keep pushing forward a fraction of a step at a time toward those goals; it always takes longer than we want and still happens faster than we realized if we just keep moving.

Do the above and quit worrying about your career progression so much. The people that do this stuff have me working on their career even if they don't know it.

Thanks for reading - Mike

Thursday, September 25, 2008

Why Masters Matter

So I've been getting beat up a bit on the extremeprogramming mailing list. Part of the issue is that I often don't know what the hell I'm talking about; even when I do I don't express it as well as I should.

I post questions or statements about what I want to try, and I get back responses that I'm trying the wrong thing or going about it in the wrong way. And that what I need is to hire a coach, get some assessment, and have some more conversations.

I have to admit it was getting on my nerves. I can read, the practices are not super complex - what the hell?

Anyway, on the theory that if a lot of people that have been in the field are saying the same thing and seem to agree with each other, I should listen, I called Ron Jeffries to talk for a bit this morning. We talked about some of the things I had posted and some other stuff but rather than getting any kind of prescription I got nuggets of wisdom - some of which have been percolating all day.

As an example I had the idea that I should require a set of XP practices and provide training in those practices. On the list I got a lot of feedback that requiring practices is a horrible idea. I was confused by this - I'm talking about having people do the stuff you guys say work and I'm getting a bunch of noise back - again, what the hell? Am I supposed to just hope that people will do the right thing? Who's gonna feed my kids when I get fired?

Ron cleared the whole thing up for me in like one paragraph of talking. I'm paraphrasing here but he essentially said that I could require running software that passes my tests. In other writings he calls that Running Tested Features (RTF.) Anyway, having a requirement for RTF, developers might look for easier ways to satisfy the requirement and the proverbial we could suggest practices and provide training/coaching.

Ding Ding Ding - that makes perfect sense to me. It clears up many of the responses I got on the list, and it completely illustrates why I should indeed sit at the feet of the masters. I could perfect every practice and make people do them, but still not get the RTF I need.

So now I'm going back to see about shaking budget loose to bring Ron and Chet in for a few days of master wisdom - wish me luck

Thanks for reading - Mike