SyntaxHighlighter

Showing posts with label process. Show all posts
Showing posts with label process. Show all posts

Tuesday, August 30, 2016

The Rush, in Retrospect

Preparing for the meeting did not go well. Live, on-site, with client and end customer, and it could have been better.

Crud.

The actual demo was a success, but getting there was not. What happened was not fun. It was not fun for the client, whose expectations were not met. Not fun for our bosses, who dealt with the brunt of the fallout and had reputations on the line. Not fun for the dev team, who worked hard to get the demo even to the state it was in, plus felt the guilt for a less-than-stellar technology rollout.

Now that the smoke has cleared, the yelling and finger-waving has stopped, and blame has been passed around, we can take a look at what happened. Two questions need to be asked:

How did we get here?
How do we keep from happening again?

Getting here was the easy part. Because everything is fine, before it is not! Looking with hindsight, there were a few things that changed silently. Dates got pushed up a few weeks. Demo changed from a tech team demo to a customer meeting. Meeting turned from a demo into a pre-launch. Feature or two changed from the plan. That little technical hurdle that takes longer than planned.

Thinking everything was on track was easy, but as changes to expectations started trickling in from different places, they were not all in sync when the meeting rolled around. And that is how we got here.

The thing is, by then it was too late. There was not time for fallback plan. Strength of will or more management oversight cannot make anything happen faster, or even just fast enough. The yelling was endured, the plan was laid out, the weekend was worked and with a final push, the launch was successful.

Hooray?

The result of a successful launch is good, but getting there smoothly is a better goal. Since this was not smooth, how can we keep it from happening again? Ultimately it falls on us. The client will always be the client, so they may miss art delivery deadlines by weeks, set meetings without our input, and always ask more (for less). Might be annoying at best and infuriating at worst, but clients will be clients!

The point of process is for situations like these, when expectations are key. There were no defined requirements or checklists of what was needed at what date, just that "it should work and be awesome." Somewhere our software process broke down, which led to bad expectations. Running with a broken process is overly misleading too, so by not assessing things early we did not address issues soon enough. At each change in dates, we needed to have been very clear about what features were going to be ready, not a mix of "everything in the contract, just less, with different dates."

The other thing that would help things run smoother is a defined contract style. In broad terms, the types of contracts we have accepted are fixed price and retainer. Quick recap of each:

Fixed Price

  • Defined set of features to deliver.
  • Defined delivery dates.
  • Set price


Retainer

  • No specific features, but team is available to work
  • Dates are defined for retaining purposes ("start of each month")
  • Price is "per time" (hours worked, or monthly)


Fixed price is good when someone knows what they want, and requires a lot more up front planning. People always want fixed price (and want it to be lower!), but often do not take the time to define features. Good for fixed deadlines (trade show demo, bottom-line price for release), and often has some contention toward the end like "that feature was expected" "it obviously should work this way".

Retainer is a good model when people know they need work done, but cannot define what that is, or have a tendency to change their minds, or need to see it to know if it was "right." Usually things are smooth in the start and middle of a contract, and the problems come up at the end of a retainer, where people always question the effort without knowing how long it should have taken in the first place.

Back to the post at hand, we mixed the two. We were signed up for a fixed price with fixed deadlines, then changed the deadlines and were working like a retainer model. Most any change that was requested was started to be incorporated, which was OK until some people were thinking the original deadlines ("no problem, plenty of time!") and others were thinking the (new) demo dates. Now doing retainer-style work was not meeting specific and defined constraints, so while everyone was "busy", it was not focused on the important things.

The contract is now basically concluded, with time to spare! Learning from ourselves this time, we'll likely improve for the next. 


Friday, April 29, 2016

The Point of Process - Part 2


Once the point of process is understood, it is time to measure your current process. This step is important because the point of doing any software process is not "is it good Agile"" or "did we follow methodology X correctly?". The point is: does it work.

A contract of the past is what spurred on this article. We were working tightly with another company, completely ingrained in their process, and my boss would ask me, "How's it going?" My response was mixed, because on the one hand I knew what I was assigned to work and was working on that. That makes a boss happy. But my boss, being a stakeholder in the work being done, was really asking those two questions from Part 1 so he could evaluate the current contract and plan for new ones. I'd tell him, "I'm doing work, but I have no idea where it's going and when we'll get there!" It was a software process that was missing the point.

The same questions that the stakeholders are asking are the same questions to use to measure one's software process. If you have an answer, the process is working, and if it takes more than 2 minutes generate or explain the answers, there is a problem.

Where is the software going?


Every member of the team should know the answer to this question. If one is a Team Lead or Product Manager, the answer needs to go both ways. It goes up to the stakeholders, like Business Dev, Marketing and the C-Suite. If they are not directly planning what the software must be capable of, they at least need to be made aware what is coming next in terms of features and improvements. 

This question must flow down to the devs as well. If they do not know where the software is going,  motivation drops and future features are not planned for. Keeping an air-gap between business and dev stifles ideas from those that know the technology the best, and lowers the meaning of work they are doing to simply "doing what they're told."

When looking at your software process, each member on the team must be able to know, quickly and easily, where the software is going. 
  • Can anyone look at the list/board/spreadsheet/diagram and know what is coming next? 
  • Can they see where their work fits in right now? 
  • Is there a place to write down new ideas? 
  • Are the milestones front and center? 
  • Can the reason of the feature (or entire project) be summed up in two sentences that give meaning to the devs and makes sense to the business side? 
  • What will come next, after this cycle of development?
Use your process to understand where your software is going.

When will it be ready? 


The schedule is vital to a business, so the development team cannot simply stall for time, or make excuses like, "it's ready when it's ready." Demos, marketing, trade shows, and everyone's paycheck is resting on these dates. Any slips need to be communicated. (Any early finishes should be celebrated!) 

A memorable quote by Walt Disney, which I like to repeat, is "Everyone needs deadlines." Walt goes on, but that's the important part. The software schedule sets everyones expectations of "done". And without it there is confusion, miscommunications and unmet expectations. Developers need to fit their work within the timeframe, and cannot go off the path just "because" ("because this new way looks cooler", "because I want to refactor now"). Estimation is an important skill for any team, and fitting what must be done within time bounds is part of the planning process, not the middle or end of the execution phase.

The schedule has to be clear, and your process must make it clear. Having business side stay out of your hair until the software is supposed to be done, and then breaking down the door after a missed date is terrible. Don't work like that! Use the process to quickly and easily inform the business side and guide the development side. 

  • When is this cycle of software development going to be done?
  • How close is the team to being done? How much more time is needed? 
  • When is the code frozen (if not continuous)? When will QA look at it? When will customer see it?
  • Is the team currently on track? How accurate were previous estimations? 
  • When is the next major milestone?

Use your process to understand when the software will be ready. 

If You're Happy and You Know It


What is the ultimate measure of your software process? Whether or not the stakeholders are happy! That's it. If they are unhappy, look in to ways to improve the process to better answer the two questions. (Hint: this likely involves bringing them into your process, not pushing them away). If they were happy, then great! And take a little time to see how to make your life easier.

Stakeholders looking at your software might not be very technical. Metrics and procedures mean very little to them. When they evaluate they are looking at two things:

  1. Did you do what you said you were going to do?
  2. Was it ready when you said it was going to be ready? 

Be able to answer "yes" to those two questions and you will have some happy stakeholders.

But you knew that was coming, right? Because your software process, quickly and easily, has been answering those two questions all along, so everyone knew exactly where the software was going and when it was going to be ready.

That's the whole point of all this process, and that's how you know it worked.

Thursday, April 14, 2016

The Point of Process - Part 1

A software development process was very real during my time in the defense industry, but basically not taught during my time in college. I could see mixed views from the open range of small businesses and development shops, depending where one worked. There is plenty of material out there too! Manifestos, guidelines, workshops and so on, all geared to learning and following a particular software process. And all this truly has made software development better, and allowed for better software.

If one did not have varied experiences, or there was not time to do extra reading, or was just getting starting in software, they might wonder, "what is the point of all this process?" Or if one was getting frustrated with a software process, because it was too much pointless work or the process never told them anything useful, they might wonder, "what is the point of all this process?" And some people just need to be reminded, because the point of a software process is not the process itself.

Software Process Answers Two Questions


Where is the software going?
When will it be ready?

That's it. Be it waterfall or agile or something else, it all boils down to these two questions.

Where is the software going? 


Software needs a goal. The goal could be planned months ahead or days ahead but there needs to be an end state. That could be a milestone with a defined set of features or requirements, or a rolling set of features as business needs change, and the process keeps everyone involved on track. Each person can state why they are doing the things they are doing (writing code, performing tests, etc) and, to a higher level, where those things fit into the entire software system.

When will it be ready?


Schedule is important. The software process tells everyone when something must be done. This helps the business guys plan sales demos and constrains the developers to stop tinkering. If the team cannot state when the software will be ready, chances are it will not be.

Who Asks the Questions

The process is for the software and the software is for the stakeholders. Only minimally is a stakeholder the developer. Sometimes it could be Tech Lead, Scrum Master, Program Manager or CTO. Indirectly it is the end-user. The stakeholder should be the business side of the house, and very often it's the person writing the check. The stakeholders are the ones asking the questions, and the answers to those two questions (from the dev team) is sometimes their only view into the software process.

Development is not the point. In the end, process is not the point either. Keep your stakeholders happy and meet their expectations, which can be done by answering two simple questions. You might use a software process to help answer those questions, too : )

Tuesday, April 5, 2016

Meaningful Software Tests

Software Testing is vital to any project, though not all software tests are meaningful. Not a big deal if a few extra automated tests get written or run. Debilitating if the tests cannot catch what they should, by forcing errors to be found outside the dev team or becoming a maintenance nightmare. So what tests should you write?

Testing Types


There exist about three types of software tests:

  • Unit Test - the lowest level of test. Against a single "unit" of code (a class, a group of methods, an algorithm, etc). One unit is tested in isolation and any other units are mocked to keep functionality going and maintain control of the test.
  • Integration Test - Multiple units tested together, but still the same software system. Can have dependencies outside the software, like a database or even, gasp, an internet connection. Much less is mocked at this level. 
  • End-To-End Test - the whole deal. Testing from one end of the system (user interface) to the other (database, algorithms) and back. Runs real code in real environment with (custom) test runners. Nothing is mocked - it doesn't need to be!

People might use different terms for these types of tests, and different approaches might blend somewhere in the middle of these. Want a long list to amaze your friends,mor give you some good ideas? Here.

But honestly, the type of testing you do isn't the most important thing. That you have testing is important, but varying opinions and success stories will advocate for one type or another.

Is There Meaning In These Tests


The type of test is not the issue, rather it is "are these tests meaningful?" Each test that is written should have some meaning behind it - test out a particular function or flow so you know it works. Test out a particular business need or requirement so you know its covered. Test a particular corner case so you know that bug will not come up again.

You need to be confident in your testing. These are little bits of automated software that will prevent errors down the line (where they are much more expensive to fix). When you run your tests, you need to know the functionality they tested and be confident that functionality was performed correctly.

Two quick examples from the past.

Back in the defense industry, documentation was king. Requirement number to test number to test results. Who wrote 'em, who performed 'em, who witnessed 'em and did they each test pass or fail. If you ever wondered how complex programs with hundreds or tens of thousands of requirements can get approved, its because of the documentation backing it up. Each test was performed for a specific purpose, and that purpose was written down. Anyone looking at the resulting documents would know what was being proved when some test step was being performed.

A second example was a past contract. They had pure unit tests that were never to turn into integration tests. One test for one unit. Code coverage was measured and the number of tests were counted. If you were to ask why we were writing all those tests, it was to get code coverage up and have all the code tested! The bad part was that every piece of code was tested in a vacuum (no database, no outside services, minimal component communication), so when the software verification group looked at something (or worse, they deployed!), lots of things were found because it was the first time those pieces were mingled outside of developer testing. There should not have been confidence that those unit tests were a predictor of safe software.


It Depends


Like many software answers, "It Depends." The type of testing you use and how much you test will be dependent on your goals and business needs. Make sure your code has tests, that those tests have meaning, and your teams understands why the tests are there.

Don't waste time writing tests just to fill metrics. If 100% code coverage is important to, or required in, the project, write those tests! But if you made up a number for coverage and then force yourself to reach it (or even better, just keep adjusting your target number!), you are wasting time. Don't test code just to check off some software engineering list - the number of tests you run is as meaningful as SLOC metrics. Tests need to be updated and maintained, forever, and are written with each new feature. If time is being wasted, find out sooner rather than later!

Meaningful tests will help the team too. Later work load will be reduced by catching real bugs early, avoiding those crazy weekend or late night sessions to "GET IT FIXED!!!1", not to mention freeing up your Verification or QA groups a bit. The dev team will have confidence and faster feedback that what they write will work, or not, boosting productivity. Continuous Integration is not possible without tests you can trust. Writing tests that have meaning makes test writing valuable, leading devs to avoid half-backed work (and insidious false negatives).

One final tip. Tests will have more meaning the closer you can get to real code on real hardware. This is also a more expensive environment to set up, and maybe cannot be automated, so it is another decision to be made. Where you are able, get as close as you can to real code on a real system.

 Happy Testing.



Thursday, March 17, 2016

Better Faster and Cheaper Expectations

A common theme is software development is the old adage of "Better Faster Cheaper." Which includes everyone involved in the project, whether they know it or not. We all, especially devs, want our software to be better (less bugs, more features, faster performance, painless DevOps). We all, especially managers, want our software to be done faster (because a business/demo schedule is in place). And we all, especially those with the checkbooks, want our software to be done cheaper (in terms of expense, and software is not cheap!). 



As the adage goes, "you can only pick two." The "best" place in the triangle is probably the center, but that's just equalized. Maybe less surprises and less risk, but everyone is out to optimize something and the focal point shifts for a number of reasons. In some cases, it has to! (or at least should.)

So, where is your project aiming?

Better and Faster, but not Cheaper


Great software delivered quickly. Everyone likes great software that does what it is supposed to do without problems. And there are good reasons to need it fast, like being first-to-market, or iterating features faster than your competition, or your investors are getting antsy. It can be done!

And, it comes at a price. For any part of the project that can be developed in parallel, you can throw people at the problem. Maybe some incentives will keep the team working harder. Buy the good machines and latest tools. Maybe you can hire a real rockstar team of experienced devs, or just buy the technology and services your system is missing.

Whatever the approach, the need for better and faster is outweighing the cost constraints . . . and that's the point! If all those reasons to need it fast are right, and the software is great, you have a winner on your hands and would gladly spend that cost all over again.

Better and Cheaper, but not Faster


Great software at an economical price. Everyone likes great software that does what it is supposed to do without problems. And there are good reasons to need to done cheaper, like lack of investment, changing company profit margins or shrinking development resources.

Without resources, time slows down. Be it lack of motivation or reduced effort, the software can still be good but do not expect it to be done quickly. I see this in a lot of Open Source projects which put out great software, but most of those devs are one or two people who have other jobs and interests. They build and maintain great software, for free (can't get cheaper than that!), but sometimes their Issues list is long or v2.0 has been living in beta-mode for a while.

Progress won't happen quickly . . . and that's the point! Resources are being assigned elsewhere (or never existed in the first place), and the project is still moving forward without burdening cost (time and talent).

Faster and Cheaper, but not Better


Everyone likes great software that does what it is supposed to do without problems. And they want it now! For free! This area of the triangle is what causes developers the most strain. They want to spend more time on that problem, follow good development practices, investigate all the alternatives, re-write that ugly piece of code from last month, etc. - but deadlines and budgets don't allow for it. During my time in the defense industry, I was reminded that I wasn't creating the absolute best software for my task . . . I was fulfilling the stated requirements with the contract constraints that were in place. Talk about strain!

While customers and managers are always monitoring for faster and cheaper, they also want better! This is where a dev shop can fall into problems, by promising better without any means of faster (except "work weekends forever") or eating the cheaper themselves. Having someone "on the dev team's side" that can explain this situation is vital to the health of your team and project.

Faster and cheaper are important and often inflexible . . . and that's the point. When those are the biggest priorities, all parties should be made aware just what part of better is going into Phase 2. There are some times where faster and cheaper make a lot of sense as well, like internal prototyping or feature proof-of-concepts. Better can be handled later, when someone else is paying for it!

Expect All Three


Of course, anyone involved with a software project will say, "I want it all!!!" And they're right, they do want it all. They should have it all too! But the grumpy software veteran will say "nope, you can only pick two" and the uninformed customer will be surprised when the target starts drifting towards one corner of the triangle, only to want to focus on a different corner the next week. The unmonitored devs will push to better every time, especially if they're allowed to just refactor it all again, only to wonder why their schedule is shot and they're rushing at the end. Can all three really be done?

There is no mystical triangle to guide our software, but all decisions will have some outcome. If everyone is expecting the same thing, and the team performs, everyone is happy and not thinking if it could have been better, or faster or cheaper. If, however, expectations were not equal, then someone is left wanting more and pointing fingers at the imagined target on the triangle. "It should have been faster." "What about feature X?"

Yes, we can have all three . . . in a way. If expectations are set correctly and maintained throughout the project, everyone is getting what they expect to get and don't think about the triangle . . . and that's the point! With a defined and limited set of requirements that are perceived as "better", the team can work quickly and cheaply. With a defined budget, that "looks economical" and isn't skimmed, for the right team, good software can be created quickly. With achievable milestones that are "fast enough", good software can be created cheaply.

The triangle is useful to explain compromises while setting expectations. It is not a compass to magically redirect software efforts, nor a map that explains "how we got here is your fault." Set clear goals, keep communication lines opens and enjoy great software that is so much better, faster and cheaper that no one even thinks about it : )