What is the origin of "launch the missiles"? - functional-programming

In the context of functional programming, a typical example of a side effect is "launch the missiles". Where does that expression come from historically?

Where does "launch the missiles" come from historically?
Good luck with that—it's more of a research question than a programming one.
Here are two data points:
I have heard Simon Peyton Jones use the exact phrase as an example in talks at least ten years ago.
In the early 1990s, maybe even in 1990, Computer Professionals for Social Responsibility had T-shirts made showing a picture of an atomic blast and the written legend
The ultimate error message
I'll wager the phrase goes back at least that far.
To get a real answer, you need a lexicographer, not a programmer.

I have no proof of this but I always assumed it comes from a similar piece of buggy C code:
if (hasSecurityClearance = true)
{
launchMissiles();
}

"Launch the Missiles," in transactional memory, is used to emphasize that I/O is irrevocable. Once the missiles are launched (i.e. the network packet is sent), it's on its way and can't be called back. For a transaction, that means that you can't abort anymore. Instead, since you've already published your results (BOOM), you must find a way to finish.
Transactional memory was first proposed in 1993, well after Wargames was released and stopped being cool. This 2006 TM paper from Simon Peyton-Jones (page 2) is the first place where I've found the "launch the missiles" analogy. Could this be the origin?

There are software apps out there which do indeed manage the launching of ICBMs, so there must be projects whose Risk Assessment must cover the accidental triggering of nuclear annihilation. However, it doesn't seem as though the phrase refers to a real incident. Of course, if such a thing did ever happen, you can bet the Black Helicopters were out smartish to suppress all traces of it.
Anyway, I think it's just a hyperbolic answer to the question "What's the worst that could happen?" The origins probably come from something like the film 'Wargames', where an AI almost starts a nuclear war because it thinks it is playing a game.
I suppose the other thing is, it isn't really a side-effect. Missile launch control programs are supposed to launch the missiles; it's just, they should only launch 'em after all the necessary checks have been made. So it's about ensuring that we don't get to step 10: Launch the missiles until after we've been through Step 1: Wake the president, Step 2: Check the target coordinates, etc

I've heard it in the context of rollbacking database transactions, as an example of an action that can't be undone: "it's hard to un-launch a missile."

Related

Career day in kindergarten: how to demonstrate programming in 20 minutes? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Original Question
I was invited to the kindergarten group of my elder daughter to talk and answer the kids' questions about my profession. There are 26 kids of age 4-6 in the group, plus 3 teachers who are fairly scared of anything related to programming and IT themselves, but bold enough to learn new tricks. I would have about 20-30 minutes, without projector or anything. They have an old computer though, which by its look may be a 486, and I am not even sure if it's functioning (Update: it isn't).
My research turned up excellent earlier threads, with lots of good tips:
How would you explain your job to a 5-year old?
Career Day: how do I make “computer programmer” sound cool to 8 year olds?
What things can I teach a group of children about programming in one day?
My situation is different from each of the above though: the latter ones are concerned with older children, while the first one is about talking to a single kid (or elder person) — a group of 20 is a whole different challenge.
How can I teach the kids and their teachers about programming in a fun way?
Plan Based on Answers
Thanks for all the amazing answers, guys :-) I don't think it makes sense to accept a single answer, but I like Jim's the most, just as the majority of SOers apparently do. However, a lot of other answers contain useful hints and ideas (some of which I will surely use on future Career days in the school...).
I put together a rough plan:
Briefly explain what programming is, like in this answer.
Tell that computers are everywhere, and collect examples with the kids (as suggested in several answers below).
Do Jim's presentation with the sandwiches.
If time allows, build it further:
explain that the strength of computers is that they remember exactly what they are once taught (and demonstrate it by preparing a second sandwich, repeating all the faults of the first attempt)
have a second round trying to fix the bugs in the process
explain the concept of loops: you can make the computer prepare n sandwiches with a single instruction
This is my plan - I am pretty sure it will turn out very differently, so I will improvise according to the situation. The presentation is scheduled in about 2 weeks time - I will update the post afterwards and tell how it actually went...
Results
Finally the day of the presentation arrived today... in brief, all went fine and it was a huge success :-)
The group turned out to be quite restless and energetic this time, so the conversation occasionally went a bit chaotic. I had to cut it short and get to the Big Sandwich Maker Show. Just as Jim described, the kids loved it.
There was one unforeseen side effect though: after the first slice of bread finally got ready, everyone wanted to eat! So for a while - during which I tried to keep up the conversation and explain more about programming - we had to install a sort of emergency service line with the kindergarten teachers to produce immense amounts of marmalade bread and feed the hungry crowd (this was half an hour after breakfast, for the record :-). Then we ran out of bread, which clearly meant the end of the presentation. The biggest burst of laugh erupted when after cleaning up the mess, the kids noticed that the poor computer stepped on a patch of marmalade which ruined his sock :-)
The teachers themselves were also very positively impressed - judging from the feedback, this was the best and funniest Career day in this group so far. Thanks again to all of you for the great ideas!
Things that could be improved (next time):
When I asked "do you think computers are smart?", to my surprise most of them answered "no". I then asked who thinks computers are smart, and why. However I neglected to ask who thinks computers are dumb, and why - thus I think I missed some potentially intriguing answers.
Inviting the kids to come around the table got them actively involved... but maybe a bit too actively at times. Bread slices started to disappear from the table and some of the audience mimicked the computer as closely as dipping their own fingers into the butter and the marmalade :-) So it is better to keep some distance.
To keep the hungry crowd under control, the kids should be clearly told in advance: "you can eat all the bread, but only after the demonstration!"
But overall, I am quite happy with the outcome. And I am sure the kids got the core message: as a programmer, if you avoid creating a mess, you can make your bread (even with marmalade :-)
I've done this before.
I laid down a lot of paper towels on a table, and got out a loaf of (cheap) bread, a small tub of butter, a small jar of jelly, and a plastic butter knife.
I said to the kids, "How many of you think computers are smart?" Most of them raised their hands. I said, "Computers are really dumb. People are smart. You have to tell a computer everything. It doesn't know how to do anything. I'm going to show you what I mean. I'm going to pretend I'm as dumb as a computer, and you guys tell me how to make a sandwich."
And when the first kid said "open the bag of bread!" I ripped the bag apart and let bread fall randomly all over the table. That got a lot of giggles. I continued to take the kids literally at their words until they learned to give short, specific commands, and eventually we ended up with a butter and jelly sandwich. There was a lot of laughter but they came away understanding, at least a little, what a programmer does for a living.
(I should note, I've also done this demonstration with adults in an "intro to programming" class, and it works just as well with them.)
What about doing a kinesthetic version of Logo?
Say you have two kids side by side. Can they figure out how to switch places using only the commands Step Forward, Step Back, Turn Left 90 Degrees, and Turn Right 90 Degrees? I'm sure there are other games like going through a maze, etc.
I'd think you'd keep their attention if you can keep them moving. This will spark the interest. They'll figure out later that the job is sedentary. ;)
Don't try to show them anything on the computer. Watching someone else type is boring for adults. For 5-year-olds, it's a recipe for anarchy.
Instead, make it interactive. Some form of "Simon Says," but have them be the programmer.
I've never tried this, but it might be fun.
Physically demonstrate an algorithm by using some attribute of each kid as the input data.
For example, get them to form a line (in whatever order they go to initially), side by side. This might work better in a semi-circle so they can see each other doing the exercise, but there has to be a break in the line somewhere. Then, starting at one end of the line, get them to take turns doing "if the classmate on your left is taller than you, switch places; otherwise, stay put." The game ends when you go through the line and no one switches places. Get them to observe the results. (Hint: bubble sort!)
Make them write short programs for you to do simple things (like enter the room and take a seat) and then execute them literally to demonstrate the "bugs" -- where they were not specific enough or didn't take something into account, so that you will do things wrong. Try not to hurt yourself in the process. It should be funny and will get them a pretty good idea of what an algorithm is.
To turn the kids onto programming, you drive up to the kindergarten in your Rolls Royce and walk in with your gorgeous significant other.
If you're not Bill Gates, then you'll just have to explain that you sit in boring meetings for 4 hours a day, print cover sheets for TPS reports for 2 hours, and stare at stupid stuff written by preceding clueless programmers for the other 6 hours. (No need to mention that then you field calls from people who are maintaining your last program and who think YOU are the preceding clueless guy).
No, i'm not bitter, why do you ask?
Seriously, (I am sure I'm plagiarizing from one of those 3 threads subconsciously), have them play "give instructions to me on how to do Y", with you doing things the Genie way - all wrong unless instructions are very precise and clear. Actually mention genie as good example assuming the kids saw Aladdin.
;^)
I think you could do the following demonstration in 20 minutes. Maybe it's more suited for older children. I don't really know what kindergarteners are capable of. I'd personally avoid trying to explain programming, and instead describe a problem that we as programmers solve. For example, if there are enough children, you can demonstrate the Internet to them interactively.
Part I: How it Works
First describe to them, preferably with props, how the Internet works. Bring in a laptop connected by a cable (for visual effect) to a home router. Tell how computer programmers make all sorts of devices, including the programs on the laptop, the program in the router, and applications in other devices connected to the Internet, like cell phones.
Explain how computers aren't connected directly to each other because it's impossible to connect a cable from every computer in the world to every computer. You'd need a billion cables in your house. So instead, computers connect to routers. And routers give packets of data (for example, e-mails, pictures, or videos) to other routers until it finally gets to the other computer.
Describe the rules for a computer to talk to another:
A computer can only give a packet to its router.
A router can give a packet to the computers connected to it, or to the nearest router.
This explanation should be very short, but emphasize the rules. You should probably equate packets with e-mail or pictures.
Part II: Interactive Time
Then have 3 children volunteer to be routers. Everyone else is a computer and divide them up evenly. It'd help to have colored cards they can hold. Like the person holding the dark blue card is router that can talk to all the people holding light blue cards. Let's say you give out blue, red, and yellow cards.
Arrange the "routers" in a line, blue, then red, then yellow. The blue router will then have to give a packet to the red router to give it to the yellow router. Group the other kids around their routers.
Bring "packets" for each child. Mix it up with photos, letters, a print-out of tic-tac-toe to symbolize a game, or whatever. Start by having a single red computer send to a yellow computer.
"Ashley, pick a yellow computer that you want to send your picture to. OK, to send the picture to Brian, you have to give it to your router, Kelly. Tell Kelley who should get the picture. Kelley, you are blue, so you can't give the picture to Brian. You have to give it to Timmy. Tell Timmy who should get the picture. Timmy is red, so he can't give it to Brian. He has to give it to Renee. Renee, you can give the picture to Brian since he is a yellow computer and you are the yellow router."
Then have everyone think of one person to send their "packet" to, and watch your impromptu network in action.
Part III: Relate back to computer programming
To conclude, ask the routers whether it was easy to be a router, or hard because there was a lot of people trying to give you pictures at one time. Point out where things went wrong and tie it into real problems that we solve.
"I could see that Timmy was overloaded with packets because everyone had to send their packet through him. As computer programmers, we have to solve problems like this every day. One way we could solve it is to give Timmy 4 arms. Or maybe add another router so that if Timmy has too many packets to deliver, you could give it to a different router instead." Or "Maybe we want pictures to be delievered faster, so we could ask the router to deliver the picture first before delivering any other packets."
To kind of borrow from the other ideas already posted, a game of Simon Says may be the way to go. However, you can stress how computers will do EXACTLY what you tell them to do. So, if the kids are Simon, and they say, "Simon says sit down." then you just sit down on the floor (not in a nearby chair or anything). Follow instructions to the letter and not to the spirit. (Of course, this may be tricky getting the kids to give ambiguous instructions, but I'm sure you can come up with something.)
Other than that, you could also talk about video games or other computer "things" that the kids may have used and you can say that programmers, like yourself, create those. And then maybe jump into the Simon Says to show how it works. Of course, this could result in a bunch of kids growing up thinking that you spend your entire day at work playing Simon Says with a computer...
I sometimes regard my job as playing with Lego bricks. You start with a set of bricks of different sizes, shapes and colors, and from that you build larger things. You can build castles or star wars robots using the same set of bricks.
And, it's about the same amount of fun!
One of the major perks of programming is the ability to create things. To make dreams come true. I don’t think this will appeal very much to small children who have no problem to let their imagination roam free anyway. What do computers bring to the table?
Instead, you could probably interest them in problem-solving, puzzles. The kind of thinking that is needed for programming. I probably wouldn’t use a computer at all; instead, let them solve an engaging mathematical puzzle. It doesn’t have to be hard but it should involve creative thinking.
When I try to explain programming in a short amount of time to people who aren't familiar with programming, I explain it using Legos. With Legos you have a bunch of simple pieces, this is like the programming language. Then you can piece them together however you want and make anything that you can imagine as long as you have the correct pieces.
To adults and kid this is likely to be a very interesting analogy and it still demonstrates the concept of programming.
Also, you could even build a Lego car poorly, then also display a Lego car with very nice design, and show them that programming is just like this. You can program cars or robots or whatever you can imagine, but there's not only one way to do it, there are many ways to do it. some better than others.
I have gotten so many people to begin programming and even switch their majors with this analogy. :)
I think I'd begin by talking for 2-3 minutes about computers, and that they follow instructions about what to do.
Then I'd demonstrate with a prebuilt LEGO Mindstorms robot and program it a couple of times and run it, just to show them that it follows the program. Mindstorms programming is pretty visual and simple to grasp.
Finally I'd try to explain that there are computers running programs almost everywhere, even in traffic lights, microwave ovens and their favourite toys.
Talk about how pervasive computer programming is - it guides airlines, phones, cars, how you buy your tickets online etc.
Then teach them to write a simple program symbolically -
1.Draw a grid on the blackboard.
2.Draw cheese at one end, and a mouse at the other end.
3.Have them "program" the moues to get the cheese!
Walk them through their failed attempts as a class, maybe have the mouse fall in traps or something in the grid. They would get a thrill out of it.
How to teach kids what programming is?
Well, the first step is likely to get some cows involved!
Download a simple programming game (like IQ Marathon) onto the laptop and hook that up to a projector. While you're doing this you can talk about how being a programmer often means working with recent technology (and thereby giving a demonstration of you doing so).
Once you've got it set up (practice so you can make it work in 5 minutes or less), you can use the game to show very visually (and with cows!) how the computer only does exactly what you tell it to, and how you (the programmer) have to figure out what instructions are necessary to make it do what you want. When you get it right, everybody is so happy about your success that there are dancing cows!
From there you can answer any questions, or perhaps just let the kids try and figure out how to program cows themselves. Wherever they want to go, really.
Cows!
Give each child a cut out shape; circles, squares, triangles, different colors etc. Explain how programming is giving instructions in specific order. Hold up a picture of a smiley face and walk the kids through how to construct it. Yellow circle, black dot, black dot, arc. Then show a more complicated picture, and have the kids come up in order based on your instructions. You can even make a mistake (like putting the yellow circle over the black dots) to show how 'Bugs' creep into a program.
Demonstrate a simple lego mindstorm robot and its corresponding flow chart. You wont have to show then any code and they can see the end result of your logic by watching the lego execute your program.
Kids likes things that "do something" and flashing lights.
For my sons birthday, I made a safe (box with electric lock and lots of leds) that was connected with the PC.
They had some questions to answer, and each response resulted in flashing leds (green for good answers and red for wrong answers). If they answered enough questions right, the leds started a simple animation which ended with a loud "clonk". The safe was now open and they could collect their rewards.
It was fun to build and the kids loved it.
Sell them on the value of unattended automation. Have a kid walk to the front of the room and show the class what he does each night when he's brushing his teeth. Then have that same kid show you what he'd be doing during that time if he didn't have to brush his teeth.
Then tell that kid that you know how to move that brush across his teeth while he's doing that other thing that he'd rather be doing, and tell him he'll never even feel it. His teeth will just magically be clean next time his mother goes to inspect them.
Then maybe write some pseudocode on the chalk board that shows the Brush API accessing the Tooth resource in a background thread behind the Favorite activity.

AntFarm anti-pattern -- strategies to avoid, antidotes to help heal from

I'm working on a 10 page web site with a database back-end. There are 500+ objects in use, trying to implement the MVP pattern in ASP.Net. I'm tracing the code-execution from a single-page, my finger has been on F-11 in Visual Studio for about 40 minutes, there seems to be no end, possibly 1000+ method calls for one web page! If it was just 50 objects that would be one thing, however, code execution snakes through all these objects just like millions of ants frantically woring in their giant dirt mound house, riddled with object tunnels. Hence, a new anti-pattern is born : AntFarm.
AntFarm is also known as "OO-Madnes", "OO-Fever", OO-ADD, or simply design-pattern junkie.
This is not the first time I've seen this, nor my associates at other companies. It seems that this style is being actively propogated, or in any case is a misunderstanding of the numerous OO/DP gospels going around...
I'd like to introduce an anti-pattern to the anti-pattern: GST or "Get Stuff Done" AKA "Get Sh** done" AKA GRD (GetRDone). This pattern focused on just what it says, getting stuff done, in a simple way. I may try to outline it more in a later post, or please share your ideas on this antidote pattern.
Anyway, I'm in the midst of a great example of AntFarm anti-pattern as I write (as a bonus, there is no documentation or comments). Please share you thoughts on how this anti-pattern has become so prevelant, how we can avoid it, and how can one undo or deal with this pattern in a live system one must work with!
I think that Parnas pretty much nailed it in On the Criteria to be used in Decomposing Systems into Modules. Each module should hide a design decision, one that may change in the future. In general, a module with nothing to hide is usually just overhead. He wasn't talking about classes exactly, but I think the reasoning still applies.
If is is indeed due to over design (and it sounds like it) then here are some synonyms for you:
Gas Factory
Rube Goldberg machine
Heath Robinson contraption
But my personal name for this "trying too F#$%3n hard". My condolences.
Cheers
Adrian
Many files where one would do. Nasty. 500 objects for 10 webpages seems a crazy ratio.
Have you considered running code analysis on the solution? Might give you some interesting stats to fight back with.
Also I'd call the anti-anti-pattern KISS.
Thanks Glomek the article is for an interesting problem-space, going to the core of what is OO, i.e. how to design your objects...for success or failure, thanks for the link.
Oh yeah, the anti-pattern design could be called "Ant Hill", that's a clearer description I think. I do believe it is quite prevelant right now, and seems to be growing...I'm still wondering how we can get away from it in general, and write clearer, simpler code that gets the job done with just the minimal complexity needed.
The problem here is that your design pattern is, itself, non-OO. Start with a non-OO pattern, try to implement it as "objects", you end up with a mess.
Just because the system is written in an OOPL doesn't make the system OO.
If you consider that an ant farm is an efficient way to explore a complex problem space (the ant farm) through the use of simple agents (the ants) then this starts to look decidedly less anti-patternish.
Critiques of OOP based on the complexity of 'fitting it all in your head' always ignore that (a) its hard to fit all of anything in your head (regardless of whether its OO or not) and (b) that OO actively reduces the need to have it all in your head anyway

What measurement do you use in your development process to determine *Doneness* of your software? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I just finished listening to a very eye-opening podcast on Hanselminutes about the definition of "Done". So my question to everyone is "When do you consider a piece of software to be "Done"? Is it when it's fully unit tested? Is it when it's completely documented? What measurement do you use in your development process to determine Doneness of your software?
When the check clears?
Seriously, every time you write a piece of software, you should have defined what "done" means. First. If you have a customer, then there should be a contract -- specific, measurable, agreed, and testable -- that defines done.
If you don't know where you're going, how will you know when you get there?
Surely dependent on context and purpose of the software?
Lunar Lander (the real thing) would have a very different definition of Done to Lunar Lander the Flash game.
Where I work, DONE is defined by a committee of non-technical managers. You can imagine the fun and games.
Test, unit test, integration test, webtest, peer QA and end user review in the sprint review. Peer QA decides if anything else is necessary, all tests must pass in CI environment. This is in a scrum web-project.
When they client(1) considers it done, it's checked in, backed up, and documented.
Also: "done" rarely exists in web dev.
(1) where client may be an internal PM or such
A good measurement is code churn. Using your source code control software, measure the rate of change. How many lines of code are being removed/added/changed per day. Graph this over time. As you approach being ready to release, this should trend downwards and give an indication of stability and readiness to ship. This assumes that you are actually testing well and making changes to fix bugs or respond to change requests. If your user acceptance test users and integration/unit test activity are continuing to regress and test and you aren't having to make code changes (because they aren't finding anything necessitating a change) then you are probably ready to ship.
If big chunks of code are churning a few days before an arbitrary or externally driven ship date, look out!
When the software can be used to satisfy the requirements that define the system.
But I've always thought, "software is never done, it just reaches an acceptable level of incompleteness."
From a development viewpoint 'done' is described quite well by my friend and mentor Simon Baker, here
Alistair Cockburn, Jeff Patton and Mike Cohn also have the following collected views
Shippable quality, which has to be exercised in a go-live, forces teams to really focus on ensuring that incremental work is more carefully thought through.
'Done' is something which all the above quoted would be the first to agree is always different per team and project; however to satisfy knowing that a given piece of work is done, the team must conduct an exercise at the start to flesh out the measure of done-ness and list those criteria.
In so doing, everyone has agreed by consensus what an acceptable completion point is - whether that includes noting the Task in Excel, or writing documentation (or not) becomes an implementation detail for that team/project. The overriding thing is that everyone's understanding of Done is uniform.
Equally, assuming you reach that definition by consensus, it can also be changed as required by consensus.
When all of the requirements are met and all the tests pass.
It's never done, simply versioned and released.
Each project will have it's own definition of done, ours is code complete (compiles successfully, etc), unit tested (or some kind of local testing if not possible) and released within one of our packages (so it's available to the other teams).
But the MOST important thing in DoD is every parties should agree on what it is (team, product owner, manager, etc) and it should be some kind of public contract, published in a team portal is a good idea.
Any piece of software at any time is always 80% done. At least, that's what my experience teaches ...
When the customer thinks it is.

How to make a build (java) as "CM-independent" as possible? (CM=Configuration Manager)

I have been thinking of making one of the project builds I handle, as "independent" of me(CM)as I possibly can. By this I dont just mean automation via scripts/tools - although it definitely includes it. This is a project subject to much chaos and so "total" automation would not be realistic.
Here is what I'm aiming for:
Anybody should be able to do the build (with some automation and a bit of documentation/guidelines) - for instance - a newbie CM, or even a developer with no CM experience.
My first thoughts are to achieve this by:
Nailing the Build request process (via build forms which capture ALL details required for the build so that nothing falls down the cracks just because its in someone's head)
Simplifying the build steps so that they can be captured in a simple documentation as a sequence of commands - a trained monkey should be able to run with the build (well.. not hurling insults but - you get the idea :-) )
Using the tool's features to the hilt (read ANT,SVN) such that the potential issues are caught well in advance and also help provide better alerts in case of failures/issues.
Having the freedom to fall ill or take those occasional holidays without the project manager getting panic attacks everytime i mention a couple of days' off. :-)
I'd be glad to have some thoughts and ideas to help me in this direction. Thanks all!
At Urbancode, we refer to this as the "Bob the Builder" anti-pattern. The good news is that Bob (you) wants to get out of the loop. When the build guy can't go on vacation or get sick without parts of the process grinding to a halt, there really is an unacceptable problem. If I'm a betting man, as you start the process of simplifying the process down to "trained monkey" levels, you'll wonder why you're spending your time doing this rote stuff when you're smart and could actually be adding value somewhere.
The symptoms of "Bob the Builder" syndrome in our book:
All requests for builds, or builds of a certain type, go through an individual or small team.
Response to these build requests is annoyingly slow for developers. If the build team is at lunch, they wait hours.
Bob, or the team of Bobs, spend a significant percentage of their time doing rote tasks.
The Bobs going home for the day, going to lunch, going on vacation, or getting sick impede the ability of the team to get things done.
We tell our AnthillPro customers to push all of this kind of stuff into their automation. Having two build types that use different machines, different build numbers, etc shouldn't be a problem.
The first step is to dumb down the process. Drive as much complexity out as possible so that you can get down to the "trained monkey" process. Once you have something approaching that, replacing the monkey with a computer is pretty easy.
I'd give more specific advice, but I don't think you've told us where the complexity comes from, other than chaos. Sometimes in this situation you need to attack chaotic and bad practices. Are you doing builds that are "This baseline in source code and those two files and these three files?" That would be tricky and probably need a CMer in the loop. Find a way to forbid it. Replacing that with "Create a branch, and make specific changes to that branch" makes constructing the build doable by that monkey.
You should be able to argue for those changes as high risk. Even though you are good, you will have bad days and want to take human error out of the equation as much as possible. At the same time, if you're shooting for faster response to the developers and self service (which presumably development and management want) some things will need to be made automateable / monkeyable.
Having better forms can be good in the interim, and using your tools well is always good but I would attack the the "trained monkey" problem pretty aggressively. Anything that can't be done by a trained monkey (or a computer) should be a candidate for leaving the process. Once you have it down to "trained monkey" status, get your build automation in place so neither you nor the developers need to be monkeys. That changes your role from "Bob the Builder" to "Bob the Build System Owner".
Simplifying the build steps so that they can be captured in a simple documentation as a sequence of commands - a trained monkey should be able to run with the build (well.. not hurling insults but - you get the idea :-) )
If that is possible than it should be possible to run the build in one step via a script (mayy it be an ant, bash, maven or whatever script). That should be the goal, so basically anybody can do the build.
The goal of developing a build process should be this:
Start with an empty directory anywhere (tabula rasa, if you will)
Make sure a very small tools of basic tools is intalled (for me that's usually Java + Maven + SVN command line client)
Check out a single directory from your SVN/CVS/...
Start a single command (and that means something that doesn't have 25 parameters)
Wait (possibly quite a while)
Have your complete build
If you can't do that, then your build process is still not good enough.
If you think that you can't achieve it, then describe in detail which actions you need to do in addition to that list are not possible to do by a turing-complete machine.
Usually there isn't such a point. It's only the missing tools/know-how/motivation. I, personally, found out that it's easier to do this, than to describe why it can't be done.
Good luck.

How to Deal with chronic time issues? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I have a developer on my staff that chronically overshoots deadlines, and estimates. On several projects the last week or two everyday I hear "It should be done by the end of the day". This developer does good work.
I have already spoke to him about his problems. He seems genuinely frustrated, and miffed about what to do to correct them.
My Questions are:
What kinds of punishments for passing a deadline are effective?
What ways can I coerce this employee to police his actions (time estimates, etc.,) himself?
UPDATE:
Based on the responses; here's what I have figured out.
Punishment is a bad idea.
It is natural for an employee to be unable to fix estimating problems without intervention.
Don't make deadlines unless there's company consequences (lost contract) for not being done by then.
Utilize available methods (Agile, Joel's checklist) to help the developer estimate better.
Thanks for the links and information. Also thanks for updating my thinking.
I don't think the problem is that he is missing these deadlines.
I think he has a real problem in estimating the amount of time it will take to complete a task.
Have him start keeping a journal of what he says a task will take and how long it actually took him to complete the task. Eventually, this journal will become a sort of guide for him to create better estimates. Once he becomes better at estimating, he shouldn't feel as rushed or harried.
There is an interesting article by Joel Spolsky: Evidence Based Scheduling
1) Break ‘er down
When I see a schedule measured in days, or even weeks, I know it’s not going to work. You have to break your schedule into very small tasks that can be measured in hours. Nothing longer than 16 hours.
This forces you to actually figure out what you are going to do. Write subroutine foo. Create this dialog box. Parse the Fizzbott file. Individual development tasks are easy to estimate, because you’ve written subroutines, created dialogs, and parsed files before.
If you are sloppy, and pick big three-week tasks (e.g., “Implement Ajax photo editor”), then you haven’t thought about what you are going to do. In detail. Step by step. And when you haven’t thought about what you’re going to do, you can’t know how long it will take.
Setting a 16-hour maximum forces you to design the damn feature. If you have a hand-wavy three week feature called “Ajax photo editor” without a detailed design, I’m sorry to be the one to break it to you but you are officially doomed. You never thought about the steps it’s going to take and you’re sure to be forgetting a lot of them.
The main point is that he (and you) should learn from his mistakes, and take them into account on the next estimation.
Also, if you are a developer, I would do regular code review at the end of the day to get a better insight into his development process.
And, of course, smaller iterations and more granularity with tasks. Set the maximum task duration to 1 day. That's the rule we have.
If your first question is
what kind of punishments to be considering
I think you're on a loser straight off. If you feel he does good work you may have to look at the deadlines/estimates and see if they were realistic in the first place. Who set them, if the developer in question was not involved then that may be part of the problem.
I agree with #OTisler that pair programming and possibly a regular end of day progress review with yourself can help him through... although if the deadlines/estimates were unrealistic to begin with thats not where your problem lies.
Closer monitoring on a few specific tasks should highlight where any issues lie.
What kinds of punishments for passing
a deadline are effective?
None. If you anger him, he won't do the work, or he'll find another job. You should help him figure out why his estimates are off. There is a book by steve McConnell about making estimates. i would start there.
What ways can I coherence this
employee to police his actions(time
estimates, etc.,) himself?
By helping him find the right way to make estimates.
First, make sure you are crystal clear in your requirements.
I hate to say it, but in my experience, blown deadlines are just as often a matter of unclear requirements or weak specifications on the part of a supervisor. First thing to do is to make sure the problem isn't either originating with, or exacerbated by, you.
Also, make sure your requirements are realistic, as well as his estimates.
Make sure that your own expectations aren't pushing him to make unrealistic estimates in order to meet unrealistic requirements.
Remember, you do the requirements, but the developer ALWAYS does the estimates, and should not be swayed with "can we do this any faster" unless you are also specifying functionality to be dropped.
Then, make sure he is tracking his time/tasks accurately, so you can get a good view of what is going on with the project.
This process will show any lack of proper time/task tracking, which may end up being the first step to improvement. If you can't see after the project how long a particular item took, that is probably the cause of the problem right there - not enough definition in the estimate, or missing "dependency" tasks that are discovered mid-project, but never estimated.
You HAVE to know how much time was spent doing what, accurately, before you can find out where the creep was, or what can be done about it.
Then, see where his estimates are failing and figure out why. Go over an estimate of a blown project, make that into a project itself - a problem to be solved.
Once you've determined that his estimates are indeed the source of the problem, go over an estimate that went over with him, and perhaps another developer, and figure out why.
This will help you figure out what the cause of the problem is. A solid understanding of the problem will likely be the actual solution.
Lastly, if you actually reach a point where you have to try punishment or coercion, it's time to fire him and start over.
Punishment and Coercion are appropriate responses to willful wrongdoing in certain situations.
However, if this developer is actively trying to do a good job, then you would only worsen the situation by generating negative attitude and frustration.
If the problem can't be solved, and you are sure the problem is with him, and not you, then it's time to fire him and get a developer who can meet deadlines. Great work doesn't mean much when your costs are blown up and profit goes out the window.
Okay, this is fairly common--developers being optimistic. It's the job of Management to deal with it. If anyone should be punished, it's the manager (you?)
I'm glad you at least asked, It looks like you got some good answers off this list, I hope they help and you find a way to actually implement some that work.
When I was young, my first good manager dealt with it this way:
First of all, he had me come up with an itemized list--breaking tasks down to hours, and estimating each one with a very liberal estimate--no period should be less than 4 hours regardless of how small the task was.
Then he looked at them and told me to double all my estimates. (Developers, especially younger developers, don't think about the fact that you are only productive for about 1/2 the day, if you're lucky--and half of that is spent at things you didn't expect to have to do).
Then, before creating his schedule, he doubled all my estimates (Without telling me).
He turned them in this way regardless of schedule requirements from above. A good manager should realize that saying it needs to be done in 2 days, doesn't make it possible.
As I got better at estimating we both noticed and adjusted accordingly.
A managers job isn't just to make a project, it's to build a team. More often than not that's going to require training of some sort. This is also the reason that an engineering manager that is not an engineer is unacceptable, they can't really help with this kind of thing.
Failure of a project or schedule is VIRTUALLY NEVER the fault of the developer (except in a few chronic cases where he isn't really fixable or of any worth and needs to be fired). The manager has made bad decisions either in hiring the developer, trusting him, managing him or staffing the project.
And really, what is fault anyway? I suppose if the manager isn't very good at making the project happen, he's going to need someone to point at... If HIS manager is any good, he'll ask why it got this far, what you did to fix it, etc.
Hiring a manager is hiring someone to solve the problems. To make the developers productive. If he can't make them productive, he isn't the right person.
To your questions:
If you choose to punish people for missing deadlines you will not get good results. They will be demotivated and feel belittled. If you keep pushing people to meet deadlines the quality of work will suffer and you will end up with a lot of time spent bug fixing afterwards.
To improve his time estimates you could try using Joel Spolsky's evidence based scheduling which has a nice feedback loop to improve the resulting estimates.
But I have some questions that I think you need to think about.
Is he later than everybody else? If so why - is it because he is an over optimistic estimator or a slow worker? Over optimistic estimates are easy to fix - just multiply all his numbers by a factor as per evidence based scheduling above. If he is a slow worker why? Does he get distracted? Is he very careful to produce very low defect code? Is he over engineering solutions? Is he not re-using code effectively?
Do the deadlines matter, or are they just arbitrary dates based on the estimates for the purposes of reporting progress up the management hierarchy? If the latter you can solve this by tweaking his estimates yourself.
What kinds of punishments for passing
a deadline are effective?
You stated the point and missed it. The obvious punishment for passing a deadline is death. If the developer is still alive after passing a deadline the "deadline" obviously was not a real deadline. Do you think it's funny to put developers under pressure using martial language?
Fix your wording.
Motivation
First of all: Read Peopleware
Next. Why do you think punishment will be an effective way to manage people that is supposed to be creative? I think you have to rethink the whole approach to management vs. team.
As I see it the managers first, and most important, role is to make sure that the developers can be creative and productive. Not that they are productive. There is a big difference in those small words. To be creative you need a safe environment. By being constantly under pressure from both deadlines and threats of punishment you create the exact opposite of safe.
Also, as a manager, you need accurate information on which to base decisions. This also requires a safe environment. If there is a risk for punishment for being honest and outspoken you are guaranteed to get lies and absence of information. A very dangerous base to take decisions from.
Estimates
As other as pointed out, estimates are estimates. In our team we don't do any individual estimates at all, we do estimates as a team. (I'm a bit reluctant to call what we do Scrum, but most of it tries to emulate if nothing less) I think this is a really great way to do estimates: Each team member is given a deck of cards consisting of numbers 0,1/2,1,3,5,8,13,20,40,60,100 and when estimating a task each developer picks a card (the cards are hidden until everyone has picked a card to avoid influencing estimates) and the average of the selected cards is taken as the estimate.
Notice how the numbers gets progressively less accurate. This is by design because large estimates are by necessity less accurate.
For our team we have opted to use the unit "ideal man days" for estimates. As far back as any of us can remember an ideal day hasn't occurred yet, but it is a good basis when you know how to translate calender days to "ideal man days".
As Scrum prescribes, development is done in sprints of two weeks after which the new version is deployed in the production environment. After each sprint we take the sum of the estimates of the completed tasks and divide that by the planned man days for the sprint. This factor is then the basis of estimating how many "ideal man days" the team can spend in a two week period.
Actual work items done by an individual developer don't need an estimate. The first approximation is always 1/2 - 1 day to complete. If this estimate turns out to be false you just grab a fellow developer and do it together to get it done. Or you break down the work item in smaller tasks so it can be distributed better.
Set Milestones and try Agile as #OTisler suggested.
I don't think you should punish him. Just get him to understand how to make accurate estimates.
As a team lead I've had my team members tell me that it will be "no problem" to finish X feature by the deadline. Then I usually sit down with them and go over what tasks and sub-tasks I think need to be done in order for the feature to be finished, and how long the developer thinks each will take.
After we do this exercise, and add up all the task and sub-task estimates, it will inevitably take much longer than the developer thinks in their original estimate. I usually only have to do this exercise with them a few times before they start making more accurate estimates.
What amazes me is that you only have one of these guys.
Engineers are horrible at estimating how much time something will take. I bet if you look carefully at your other developers' estimates, you'll find a lot of padding. Sometimes the padding isn't necessary, but the task expands to fill the available time anyway.
The solution to this is to change around how you do estimates - for everyone. Developers may be bad at estimating absolute time, but they're pretty good at relative time. So on Monday, instead of "how long will it take to add a whoosiwhatsit?," ask "what can you get done on the whoosiwhatsit in less than a week?" That becomes their task for the week.
The following Monday you look at how it went. "Well, I got the floogle installed in two days but it turns out it impacted the mcphee...so this week I need to decouple those guys so the whoosiwhatsit files don't get overwritten." Ok, there's their task for the week.
You might think it won't help, because you still don't know when the whoosiwhatsit is going to be ready. That's true. You have two choices here:
If you need a deadline, then you have to force your errant developer to pad his estimates like everyone else. It won't take him long to get the hang of it, and in no time at all he'll be taking "2 weeks" to write something that should have taken a day.
Your other choice is to trade the fictitious estimates for more visibility. In the long run this approach gets you more productive and much happier engineers.
So the developer does good work, but is poor at estimating the amount of time for delivery? I'm not sure you have a punishment situation on your hands just yet.
Maybe going forward for some time, have him walk you through his process for estimating a delivery point. This can be an opportunity to ask him why steps X,Y, and Z take certain amounts of time. He may find himself revising his estimates simply by doing the exercise at what is almost certainly a slower pace.
ask yourself this: What entails your job?
If you're just blindly passing estimates from developers (who you know can't give good estimates) up the management line, and not deciding for yourself whether that estimate is achievable, then you're not doing your job.
Try to think in terms of "value-add" (One of my old employers used that term a lot , and I hated it, but it probably works for you in this situation). What value are you adding? If you're just passing stuff in both directions between upper management and the developers, then ultimately you're not earning your money. You could be removed , and nothing would change.
The best manager I ever had was one that looked through a set of requirements given to him by another team , and told them straight out that almost a third of them was bull, and had them removed, before I ever even saw the list. The worst one I ever had made me write all this extra management-type documentation which none of the other managers I'd ever had asked me to do (I really got the impression I was literally doing his job for him), didn't even give me project due dates, and hardly turned up to work. They were both in the same company , bizarrely enough.
90 hours is one common short project deadline. The easy way is instead of estimating "your time", you measure another. Computer programmers shoudn't make time estimates for their projects since evidence shows calculating one's own time results in larger error than observing another.

Resources