1-star reviews of 'Extreme Programming'
amazon.com
amazon.com
And yet…
I remember programmers who disappeared for months at a time to work on "their" modules. Integration phases where we tried to combine wildly incompatible components after 6 months of separate work. The breathless joy of seeing an actual regression test suite for the first time. The endless arguments trying to find the ideal design. And we all thought this was the "right way" to develop software!
I remember Beck's Extreme Programming. For me, it came as a bolt from the sky, obviously radical and brilliant. It turned me from a clueless junior programmer into somebody who took over and turned around a 150,000 line, 14-year-old C++ project, a project which everybody thought had succumbed to terminal bit rot.
Unit tests. Short iterations. The planning game, a.k.a., "Here, let me take your list of features, and tell you what each one costs. Now you decide what order we build them in." Man, does it bring back memories.
Of course, that was pretty much the shining high point. Within just a few years, Beck's idiosyncratic personal vision had been replaced by the "agile manifesto", and then by an entire consulting industry. Good riddance to all that.
But you know, it's been a long time since I heard somebody say "integration phase" or "object-oriented analysis." And I couldn't be happier.
At the risk of sounding somewhat loony, I think Marx said something about the middle class (in his definition: the class between the proletariat engaging in production, and the ruling class of capitalists) trying to preserve the benefits it gets from its social role. Can't find a citation though.
Also, in practice civil services are much more efficient in many situations than their market alternatives (possibly because they pretty much epitomise the proletariat you mentioned).
By and large, the empirical data does not support the public perception of government (and remember there are many layers of "government") being hugely wasteful, especially when looking at money wasted on administration compared to the market.
http://www.governmentisgood.com/articles.php?aid=20
Also, the government is under a market pressure of a sort: can I "sell" this budget to the people who have to vote for me as a politician?
EDIT: Of course, I'm not saying that civil service is good by definition - just that when done right there are places where it's a much better solution than a free market one. Also, corruption can be an issue of course - as I understand one of the big reasons Greece is in trouble is because of the corrupt civil service, which caused it to bloat as well.
Even still, it's hard to be more expensive when your cost of capital is near zero. (Taxpayers foot the bill)
You mean the liquor stores in countries where liquor is extra heavily taxed in an attempt to curb alcoholism? Yeah, no. In fact, that that is exactly what I mean: you are confusing cost-to-the-consumer with cost-to-run.
https://www.marxists.org/archive/marx/works/1863/theories-su...
The criticisms about no metrics supporting the book assertions are valid too (we have more metrics now, though).
That said, a lot of things in this book are now considered good engineering practices, and the methodology guys have come back with a vengeance with the Agile/Scrum/Lean/Whatever waves that filled the blanks left by XP (and ensured a nice revenue stream for pure process consultants).
...was in fact a strawman. The whole horrible waterfall process was an urban legend: http://postagilist.wordpress.com/2012/06/13/the-perennial-wa...
This school has its agile proponents too, though. But compared to the common practices of the penultimate decade, XP and Agile at least acknowledged that failure was the default mode of software development projects, and made contingency plans for it.
Absolutely. If the waterfall isn't working, you need to waterfall harder. Because more time spent up front writing paper architectures and guesswork requirements is what's needed!
To me it felt like they were saying, "You know all the things you did to make your last project a huge success: the short iterations, tight feedback loops, early and frequent customer involvement, designing your systems to accommodate change? Yeah, don't ever do any of that again."
So I left, and found that dogmatic by-the-book scrum shops can also be horrible places to work. Live and learn.
And on moonless nights I still wake up screaming remembering a RUP project I was involved in around 2000.
"No true scotsman" and all, I know.
Bullshit.
Source: I lived through it in the early and mid 1990s.
However there is hope. www.gov.uk is a notable recent success story. https://www.gov.uk/service-manual/agile
The difference is that in the early 1990s, most of us thought that larger software projects were just like that. We didn't know any better.
Which was a gross misinterpretation to this day. We still have naive PMPs running $100 million IT projects in the faux-Waterall style.
https://plus.google.com/+LaurentBossavit/posts/VBJTGru3PeW
Or this.
Not only are there projects where waterfall methodologies were applied, but they are sometimes (gasp!) appropriate.
In the majority of cases, iterative development of some sort is necessary, because the requirements keep changing. Waterfall simply doesn't allow for changing requirements, so it's hopeless in those cases.
But where requirements are stable, waterfall is a reasonable approach. Remember, it had its origins in the big iron days, when vast project teams analysed and replaced existing manual systems. For those projects, waterfall worked.
If you're writing the code for a space probe, or a missile, there's a limited opportunity to iterate once the item is deployed... requirements are stable, waterfall can be a rational choice.
I lived in that world on a DoD program for 3 years. I still have nightmares.
We also had a customer who didn't want to "pay for the same code twice". That meant signal processing algorithm research had to be done in the operational real-time code, and that we could have one and only one codebase (including branches but not including engineer/scientist working copies). The "experts" from Mitre and elsewhere who were managing us were so clueless they didn't realize this was costing them more and adding more risk than allowing the scientists to do their algorithm development in Matlab and Fortran, then have the engineers turn the algorithms into an operational system. Of course, we still had to have requirements and design documentation up-front before we could implement code, so...
It may be related to the dark world as well, but it seems to be waning.
In four words you managed to perfectly encapsulate the problem I have with so much writing about development processes and tools.
It's not good enough to claim to be just incrementally better than what you're probably doing, you need to be the best most super awesome EXTREME thing ever!
The 1-star reviews roughly fall in three categories:
- This is not how proper projects are done.
- We don't need another cult-like methodology
- This will vindicate cow boy coders
2 and 3 may have a point.The real problem with cowboy coding is getting to version 2 (or maybe 1.1). But it should be stated that at least if you've got a successful version 1 you have most of a solid design to start with.
Interestingly, most development methodologies seem to be mainly concerned with getting to version 1 and not with producing a maintainable product or getting a successful but unmaintainable version 1 and evolving it into a maintainable version 3 (say).
The obvious exception is the Software Process Maturity Model or whatever the frack it's called today, which is enormously concerned with maintainability to the point of making initial development (or indeed almost anything outside of pure engineering environments) virtually impossible.
In all seriousness, yes, different methodologies are certainly good for different organizations and different projects, and you're right that cowboy coding is effective at getting things done. I've definitely seen organizations that weren't well-suited to traditional methodologies get mired in documentation and fail to get anything out of alpha. Whatever approach you choose, just don't follow it straight off a cliff.
-----------------
This book advocates extreme coding. It's a disguised way to legitimize "dive-into-coding" with no proper analysis and design. This author advocates little if any comments, documentation etc. He actually states that "design is in the code" and documents get out of date and that's an excuse not to do it. How is that in comparison to the "traceability" principle advocated so strongly by Jacobson and Rumbaugh who believe that the final code should be traced back to the analysis documents (use cases in Jacobson book) He advocates programming in pair instead of code reviews! In short, this book gathers the industry "worst practices" exactly the opposite of OMT, OOSE, RUP etc.
I'm very much of the opinion that good code self documents, and excessive use of comments and documentation is a crutch for bad code.
Some optimised code might be really incomprehensible without commnets, but its the exception rather than the case. By far my biggest use of comments is to highlight inadequate or rushed code that should be revisited later (i.e. TODO: or HACK: rather than NOTE:).
Don't get me wrong - design and documentation is useful in practice as well as being the 'theoretical ideal' that I think should be striven towards. Diving in and making a mess to fix stuff or diverging from an original design is bad in theory - in practice it is a necessary evil with tight deadlines or when rescuing a project that is already in a seriously bad state - or even when the original design was naive or even impossible because it came from an inexperienced or otherwise inadequate source.
I'm very much of the opinion that you are very much of the wrong opinion.
"Good code self-documents" is a myth. Most programmers have trouble coming back and reading their own code, much less other programmers' codes. Comments and documentation written in spoken language ensure that the code can be understood much more quickly and efficiently and any misunderstandings are prevented.
well chosen function and variable names tell you the intention, if it's modular enough then it will all make sense when you read it.
If people could just get over this documentation phase that programming went through in the 80's and 90's due to languages containing obtuse syntax and being so low level you had to hold a dozen things in your head at once (I'm thinking of you COM) - but in this era, with languages that operate at a high level of abstraction the era of documenting the code is over.
"The code is the documentation only works if the code is immutable."
that's actually backwards. If you want to stand any chance of changing the code then it should be readable and well structured, not well documented.
"well chosen function and variable names tell you the intention, if it's modular enough then it will all make sense when you read it."
The two hardest things in computer science are concurrency and naming things. Oh, and off-by-one errors.
You look at code to determine what exactly the system does, but in order to determine what exactly the system should do, you need to look at the users needs or the business process, the code+comments can't tell you that.
I'm talking about being a user/caller of code, not attempting to fix it. Of course you need to know the innards if you're going to fix it, but needing to know all the implementation details in order to even call a piece of code is counter-productive. It's needlessly time-consuming and it violates the concept of separation of concerns.
very good point :)
Tests are also both code and documentation.
Or, you know, the design can also. If you're into having that.
Edit: Not project documentation, strictly code comments.
Those can totally be essential, as they will save someone (your future self, maybe) from attempting to refactor them to something simpler/cleaner that won't actually work.
if tag in tag_list:
data[u"Tag"] = tag
try:
if i["DupilcateAssets"] is not None: # not a typo - misspelled in Dell SOAP response
data[u"Error"] = "Duplicate assets returned"
Would you want to debug that without the comment? sillyMisspelledDellSOAPIdentifier = "DupilcateAssets"
if i[sillyMisspelledDellSOAPIdentifier] is not None: sillyMisspelledDellSOAPIdentifier = "DuplicateAssets"
as the original might have if i["DuplicateAssets"] is not None: # Not a typo...
And your method replaces one line of code with two.Comments have problems, but they solve problems too. They're not evil.
if i["DupilcateAssets"]
is there some Python subtlety I am missing?In ruby you likewise sometimes need to use object.nil? because nil and False are both "false-ish".
If something doesn't work the way it should and it's beyond your control, comment it.
Really? I was just poking through some code I wrote several years ago looking for something I may re-use and I didn't have any trouble figuring out the intention by reading the (largely) uncommented code.
When you work in really large projects, which are not hobby projects, with specs you don't even understand the reason of their existence, it is impossible.
For example I have many experiences similar to what you described, yet today I couldn't remember why I did something in a code fragment I wrote last week.
That's why you'll see all great programmers sharing similar stories. Otherwise you'd be superhuman.
Pure coincidence my friend.
The choices that you make when writing code really do matter.
Yet in large projects, with lots of people, with many interconnected modules, clear code and concise variable naming is not enough.
That's why we have documentation that describes the general architecture and comments for the code parts that aren't so clear cut.
Some problems have many solutions, with different levels of advantages and disadvantages. To think that all people understand or know the solutions and the choices pertaining to them, is of course naive.
To think that you, as a person, would choose the same path at different instances of time, is just entertaining. You are not the same person you were last year, or even last month.
Thus, good comments along with clear and concise code is the only way to go.
Hogwash! maybe if you're writing assembly code or similar low level language, but one of the express benefits of high level languages like python, scala, ruby etc is that they read (to a competent developer) like english (or whatever your native tongue might be)
Maybe you and "most programmers" you know don't write decent code, but I can easily read others or my own code if its well written. The last thing I want is a bunch of comments everywhere. I am all for the occasional comment (as an exception) because my eye will be drawn to it, but in general, unless your code sucks, it should perfectly legible without the need for excessive comments and documentation.
Also if you think that you'd always remember why you did something, at some point in time, for all given circumstances, you haven't lived long enough.
> Maybe you and "most programmers" you know don't write decent code, but I can easily read others or my own code if its well written
You really aren't that good as you think. Your problem is you grossly overestimate your capabilities and achievements. We all were there, most of us outgrow it. You will too at some point.
playing the experience card is poor form and fallacious - also it wouldn't surprise me if that commenter is speaking from extensive experience.
i don't mention my 20 years of experience or background as a AAA game dev having touched every speciality with experience in high volume web and database environments, financial data quality software, language compilers and interpreters or anything like that... its next to worthless vs. what i can do, demonstrate or explain.
Actually you're wrong on the experience card, for only one reason. What I mentioned is experience gained that everyone will gain, just by staying long enough in the game. Not because, I am super cool and worked in positions that few people can work.
It's the same thing, like when we were teenagers and we thought that we were right in every freaking thing and our parents just responded "wait until you grow up". Well they were right in most of the things, weren't they? Were they super smart? Was it relevant if they were? Nope, they just stayed long enough in the "game".
Same thing here.
i don't rate experience highly at all. quality of experience and what you learn from it is what adds value to that 'time served'.
plenty of old men will still dance even though they have been terrible at it for 50 years. they have had a lot of practice, but they still suck. there are ample examples like this
You also gave an interesting example. Dancing is a specialized activity. Thus specialized talent and/or quality experience is required. But not all people go dancing. So I wouldn't quite include it in the set of common experiences that most people will go through in their lives.
You really aren't that good as you think. Your problem is you grossly overestimate your capabilities and achievements. We all were there, most of us outgrow it. You will too at some point.
Writing clear code is the only hope for the poor maintenance programmer, your carefully written comments probably aren't worth the effort.
i know i'm fortunate to be very good at reading other people's code so my view is probably biased - its feedback i constantly get - i've never worked on a codebase where i can't contribute meaningfully on day one even when its of quite a poor quality. i've found myself explaining people's own code to themselves more than once too...
i've worked with lots of programmers and trawled through many code bases old and new... by far the easiest code for me to read is fairly devoid of comments with sensible variable names, lots of whitespace and descriptive function names and using procedural logic or sensible (not excessive) amounts of OO. hungarian notation i can take or leave...
comments don't hurt... documentation doesn't hurt, but more than once i've seen pretty disgusting code with a big comment above it explaining what it does where if they had just named variables properly and split the code into decent functions the comment would have been needless. a classic case is something which looks like:
void HandleProcessing()
{
/// ... insert 1000 lines of code
}which should be
void OptimiseMeshForRuntimeRendering()
{
RemoveDuplicateVertsFromVertexBuffer();
SplitIndexBuffersSoIndicesAre16Bits();
OptimiseIndexOrderingForCacheEffeciency();
PerformValidationChecks();
WriteOptimisedDataToDisk();
}that code requires zero comments or documentation imo it tells you what it does and how it does it... sure its a crude example i just conjured and there is some bad practice there if you take it literally (what data am I throwing around? there should be function parameters...), but i'm not afraid to say that if you struggle to read code like this then you are just not very smart. maybe the concepts (index buffer, cache) need explaining, but thats not what comments are for thats for Google, Wikipedia, hardware and library specifications and generally just knowing enough to be competent in your domain.
comments i like are this:
void OptimiseIndexOrderingForCacheEffeciency()
{
/// use the k-cache optimisation algorithm, this has been measured to work on test1.mesh only
// imagine code here...
}what i never want is a huge blob of comment explaining the algorithm and burying the fact that its effectiveness in this scenario has only been measured in a special case.
its shocking how many programmers are able to produce difficult to read 1000s of lines of code functions and forget the most basic principles of good, simple procedural programming, despite how familiar they may be with design patterns, OO or functional principles, CS theory, complexity bounds etc.
advice i constantly have to give and feel i never should: use functions. name them properly. use good variable names. don't write huge comments. refactoring is a lot quicker and easier than you imagine (and removes technical debt!). don't be afraid - source control will save you.
don't mistake the plethora of terrible programmers and lack of good example code for a sound principle being mythical...
EDIT: wtf is up with the formatting in this box? i see the help link now... but screw that i'm lazy
If only this were the case. Comments are frequently wrong- they were either wrong from the beginning, unhelpful, or never updated when code was changed. Whenever I find myself writing a comment, it is typically because I just wrote bad code. Sometimes, bad code is necessary; most of the time, its better to get rid of the comment and the bad code.
Ultimately, comments are not sufficient; you have to read the code anyway. Comments can only be useful in the regard of recording the intent of the author.
We obviously hear this quite a lot, but I think it's inaccurate - it's bad comments and documentation that are a problem, and comments in particular are often most prolific when they're bad. Comments and documentation often suffer from rot, in that they are not kept current with the code and end up being out of date in short order.
But the fact that comments and documentation can be out of date is a reason to do them better, rather than throw them away. I'm one of those people who typically codes "comment first" - writing a simplified english overview of the steps I expect to take, implementing each of them using real code, and taking a final pass to trim or expand comments as required. So I might start with:
function doit(){
// Load data from the input
// Get the correct records
// Search for the correct field
// Output the results
}
This is followed by implementation: function doit(){
// Load data from the input
records = Data.load()
// Get the correct records
records.uniquify(function(e) { return e.group_id })
// Search for the correct field
results = records.map(function(e) { return e.timestamp })
// Output the results
print(results)
}
We've now got stupid redundant comments of the type that cause problems. Rule of thumb for me is to decide if the statement in the comment can be trivially deduced from the code immediately following it. If it can, then the comment can go. If there's some additional assumption—perhaps about side effects or properties of data which might not be immediately obvious—then the comment can be expanded to include this information. So we might end up with something like the following: function doit(){
records = Data.load()
// Disambiguate records by looking at the group id - records will
// always be sorted by time, so we can do this to make sure we
// only get the first in a given group.
records.uniquify(function(e) { return e.group_id })
results = records.map(function(e) { return e.timestamp })
print(results)
}
Obviously not real code, but you get the point.In general, I find that working on "self-documenting" codebases is actually rather frustrating - especially when I'm coming in on a new project. There's an absolute load of implicit knowledge about software systems that's contained within the code, and while it should be exposed and made explicit wherever possible, it's sometimes not practical - meaning that "self-documenting" code often seems anything but.
function disambiguateRecordsByGroupID() {
recordsSortedByTime = Data.load()
results = recordsSortedByTime.map(function(record) { return record.timestamp })
print(results)
}Not to mention you only captured half of the parent's comment (the "why" of the function), so it should really be something like disambiguateRecordsByGroupIDBecauseRecordsAreAlwaysSortedByTime.
there should probably be a reasonable limit to the length of a name... the IDEs are great, but even without them copy-paste is pretty universal and safe for identifiers.
records.SortedBy(:time).DisambiguateBy(:group_id)Pair programming was THE most distasteful, unpleasant thing I have ever done in any employment. And I include in that my very first job which included cleaning grease traps and bathrooms at McDonalds.
If developers do not like pair programming, is it a problem with pair programming or is it a problem with developers, specifically their unconscious, machine-like it?
The whole point of XP is not only to go against management best practice but also against the comfortable habits of most software developers, in an effort to make them better developers.
I get some of it, because of war stories. But I know I'm missing a huge piece of it.
Like when did some of the older practices come about? Was it in the 90s? Late 90s? 80s? Are most of the reviewers curmudgeons that that watched the SDLC landscape change before their very eyes as their certifications lost value?
- I doubt Lisp, Smalltalk, Forth, time sharing Basic and similar tools were invented for the waterfall model, and all were available in the '70s.
- Weinberger advocated egoless programming in 1971.
Also, looking back at the 1960-1975 timeframe, nobody would have accepted XP as a methodology. I can see the discussion "what do you mean by 'if it turns out we need more memory we simply move to a larger computer'? Ordering one will take months, it will cost us thousands of dollars a month, and we will have to build a new computer room. And no, it is not acceptable if that accounting program you are writing turns out to be a glorified checkbook because that is what you can cram into the machine."
Also, it wasn't as easy to get a MVP because there were so few libraries to build on. IBM would happily license you their 'database' software or their time sharing software, but you better be sure that you needed it, because you paid for it by the month. But it just wasn't possible to work on the idea "don't worry about the 3D graphics. We'll eventually pick a library, but that can wait."
A devil's advocate would argue that the XP book just was a good summary article with great marketing that due to pure luck appeared at just the right time.
Examples: Missile guidance system. Space probe communication subroutine.
I directly saw this as I worked on the BS5750 standard and saw the rise and fall of TQM
I think you will find that in traditional engineering does stick closer to traditional project planning PERT/TQM and so on as its a lot more embarrassing and costly if a bridge falls down :-)
Its also a lot easier to do in manufacturing is easy you can measure the tolerances on a piston on an engine line and flag thats a defect or not - much harder to do in software.
And no, people didn't "just do their jobs." Management methodology isn't a new idea.
[1] http://en.wikipedia.org/wiki/Project_Management_Institute
So time wise something like UML and Unified Process actually occurred after XP and Scrum?
That kind of changes the timeline I had in my head about this. I almost feel like making something to figure out all of this.
Though tbh the same could be said of any of the mountains of methodology books we waded through in the 90s. The word 'evidence' appears precisely once in the RUP white paper, and it's not in reference to evidence for RUP itself being effective.
One of the criticisms I remember some people making of XP when it first came to prominence was that it shifted a lot of the hard work of software development onto the customer, or rather the customer representative; certainly, ever since I heard about what happened to the first XP customer representative (see http://www.coldewey.com/publikationen/conferences/oopsla2001...) I've taken comments about XP being a humane methodology with a pinch of salt.
http://blog.8thlight.com/uncle-bob/2013/12/10/Thankyou-Kent....
Have a look at http://en.wikipedia.org/wiki/Extreme_programming
Many of those principles and practices are followed by my team. They don't all suit every project, but many do.
Xp compared to the things that came before it, or to the things that came after it?
If you compare the opposite poles of Xp, and the things advocated in those 1-star reviews, the way that a lot of successful bushinesses develop software is a lot closer to XP than "pre-Xp" software methods.
It was a watershed for many. In fact, I would agree that the XP and TDD side of the argument won the intellectual debate.
It was a bunch of practitioners sick of being told by MBA-types (or modelling "architects" that couldn't code) of the proper way to write software.
Almost everyone in modern software development has been impacted by XP, if you think through some of the practices that almost no one mainstream had heard of or were discussing in 1999 until XP:
- Customer is on the team (Often the biggest factor in IT projects)
- Test driven development (now BDD)
- Continuous integration (now Continuous delivery and Devops)
- Design improvement (refactoring)
- Small releases (now "Lean Startups")
- Planning game (or estimation without Gantt charts and WBS)
Detractors focus on the controversial practices like pair programming as if they were lunatic. Or on consultants making money flogging a crap methodology. I don't think consultants could make money on XP back in the day - it was too foreign and extreme.
Agile was born off the fumes of XP, to give people methodological freedom while agreeing to the same principles. This unfortunately enabled legions of consultants to invent their own whatever-the-hell method for their client and subject employees to it. But it also helped some teams to deliver faster and higher quality than they would have otherwise.
With XP, sadly, this is true. Most times you bring up the XP practices individually, and they're "good ideas". You say XP, and they say "fuck pairing!"