- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Um well... http://www.visit4info.com/advert/Bluetooth-Duet-with-Peugeot-207-Verve-Peugeot-207-Range/68782 Peugeot seems to think so!
We are currently living in a massively disposable society which promotes the idea that new&shiny==wonderful and old/repair==baaad. That seems to be coming through in the current attitude of many software developers too: a lot of job ads now promote the fact you will be working on a greenfield project with 'none of that horrible crusty legacy code to deal with' as the sub-text.
I'm currently working on a project which is at least 80% legacy code (from 1990-ish). Most of it is pretty horrendous but the main cause of that seems to me to be that devs have used the principle of least change when adding new functionality/fixing bugs, so the original clean structure has become a tangled mess. If there were some kind of automated regression testing in place I think devs would have been more willing to refactor when they put new code in place and less fearful of breaking the system. Unit test & some level of automated integration testing would have helped greatly. Of course the challenge now is that the design of exisiting components doesn't lend itself to unit tests.
Admin
Yes, it stands for "Driven". I don't really see how that's relevant.
I don't NEED to provide any other counter arguments, if you're crap at designing, don't know much about patterns, refactoring, IoC, SOLID, etc... TDD isn't going to help you. If you write shit code, using TDD will just allow you to write more shit code.
If you write good code TDD will probably make it even better, and I don't need to refer to any studies of indian fast-track MS Certified developers to prove that, because it worked for me - and that's all the proof that I need.
Admin
Admin
At least, if that test fails you'll know something's REALLY wrong.
Admin
So very wrong.
Developers make working code, testers test functionality. If making working code requires you to write some code to exercise that code, that's also your work. Don't walk up to a developer telling him to test, that won't and will never work.
Admin
300 developers? THIS! IS! JAVA!!!
sorry...
Admin
Can somebody come up with a formula to describe the point at which the comments descend into trolling and counter-trolling? I usually find it's around about half way down the second page - which where I generally stop reading.
Back on topic, if you have any pride in your work whatsoever, you'll use every tool you can lay your hands on that will help you produce quality code.
Admin
Admin
This comment should be not outlawed if not outlawing the comment does not make sense.
Admin
Don't like Unit tests? Don't write them!
Don't like programming? Find a new profession.
Don't like personal responsibility or project accountability? Agree to squeeze one more feature or untested hardware configuration into your release post-RTD.
These are all your problems, and anyone's who thinks in broken chords as you do.
Unit tests are about stating business requirements first, and encapsulating edge cases second. If your business facts change, you damn well better change the requirements on the code!
Whether you keep those requirements in .txt or .doc or .ppt or .xls or .wtf, they will get stale if you don't maintain them. The benefit of keeping the requirements themselves in repeatable code is the bi-directional enforcement; not: "Have i made trivial mistakes?", but: "Does it do what i was engaged to make it do".
Oh, and then of course, there're the poor miserable sods that follow in your wake, adding to or cleaning up the mess you left behind.
You know. The people that post your "last-minute fixes" ...here.
Admin
This post highlights the COMPLETE LACK of UNDERSTANDING even first level LOGIC [which should be taught in Grade School - Preferably in Elementary School [ages 6-12 approx]
if A then B does NOT imply: if B then A nor if NOT A then not B.
It simply amazes me that people with such a lack of basic knowledge are even ALLOW NEAR computers or forums!
Admin
The original article has this quote, "Less bugs, less time manual testing,"
It is FEWER bugs, less time testing. That is, unless you've found a way to create half a bug...
Admin
And the quality of trolling is on the low lately. They're throwing any stupid statement these days just to try and provoke a reaction.
T0pCod3r, wherefore art thou?
Admin
Admin
The real WTF is in six months time not being able to do anything else but force a cargo cult methodology on people. For new projects it might be ok, to force a unit testing with integration approach on an existing project is just madness.
Admin
NASDAQ and Philadelphia stock exchange merged not long ago. Had a friend there helping out. Philly people asked about QA. NASDAQ, said, "QA? We don't have QA. You write your code, You test your code. You deploy your code. You make too many mistakes, you don't work here anymore."
Interestingly, I am at DevNexus where CTO of ICE made the statement that the NASDAQ's engine runs as a single thread on a single machine, on Java and they have submilli transaction rates.
Is this not a shining indictment of modern software engineering and its constant kowtowing to the methodology de jour.
Admin
Exactly this.
Admin
Because there was a void that needed to be filled with high-quality trolls, of course!
But that question itself seems trollish...unless you were responding to a flame about knowledge and education with a literary comprehension fail... and were actually asking about his (meta/)physical locus?
Admin
On your hurk, you'll find facebook, AOLolcats and fox "news". On your kwan, you'll notice /b/, fark and digg.
Now gtfo my /r/ and TDWTF.
Admin
Test Driven Development is more about efficient development than code quality. Luckily, with more efficient development, you have more resources to devote to other forms of testing.
Unit tests are to your code project as a scaffold is to a construction project. They allow you to build a unit of the application without needing the rest of the program to be implemented.
Admin
Why don't you point some of them out then?
I don't.
I love programming. I don't love wasting my time on something which is pointless.
Yes, because programmers are ALWAYS the ones that decide which features actually end up shipping. The business NEVER comes down and insists that something MUST be done because "it's critical".
You seem to live in a magical world where programmers are the ones in charge of the project, as opposed to the business managers and the clients who are paying for it.
Remember theoretical project world that I spoke about? You've living there.
Business requirements are stated in the SRS which is where they belong. Recoding the business requirements as unit tests wastes time and constrains your design up front. That's fine if nothing ever changes, but once you have a mammoth suite of tests constraining everything, every change is now much more difficult to make.
The key to project success is flexibility, the ability to adapt your software quickly. Any experienced professional knows that. So why you would advocate a practice which actively inhibits flexibility right from the start is beyond me.
The requirements STILL have to be stated in some form of document somewhere. The client isn't going to sign off on your unit test suite and go 'yep, go for it'. So now you have TWO places where the requirements must be updated, AND the code must be updated too! Where on earth do you get the time to do all this? In theoretical project world, of course.
Furthermore, it should be obvious that more code means more bugs. Unit tests can actually introduce bugs themselves. It seems test advocates expect programmers to make simple, basic errors in the code they write - the sort of errors unit tests would catch - and THEN expect those same programmers to write pristine error free unit tests.
So again, these perfect unit tests are absolutely theoretical. Theoretical hogwash in theoretical project world.
I don't know about you, but I write good code. I am capable of ensuring my code meets the requirements with the use of a debugger and the ability to read a spec, or call a customer for clarification. I don't need my hand held by tests as I am responsible enough to get it done right the first time.
Last minute fixes are a project reality in anything but the most trivial applications. Maybe in theoretical project world, where you come from, they don't exist, but here in reality they do.
Admin
Also an early introduction to homosexuality, for those who like that sort of thing.
Admin
Admin
Assumptions (Erroneous):
etc...Logic Fails:
etc...On to the rest of your contentions, then!
Clearly. But i suspect what you learned to hate were actually integration tests in masquerade. This is a first order Logic Fail, unless i mistake your context: Consuming your own APIs is neither pointless nor a waste of time. You control your own destiny. If you let this happen, you deserve your "real world". These types of shenanigans will only accelerate if you endorse them as you describe. Q: If you were asked to deliver a software project without a project manager, could you do it?A: Probably, though less comfortably than with. (Caveat: some people are thoroughly incapable of dealing with other humans. As reference, see this comment board.)
Q: If a project manager were asked to deliver a software project without any devs, could they?
A: Highly unlikely. (Caveat: certain exceptions can be made for Dev-turned-PM, but this is a dishonest career path, and it is unlikely such a person was ever a viable developer. Even then, it's usually been so long since the Dev->PM abortion has thought in terms of logic rather than resources that it's unlikely they will deliver anything at all, let alone of value.)
You are in charge. You are the talent.
If a project manager mismanages my project and blames me for it, that's the last time i work with that project manager. If an account or business manager doesn't spell out deliverables (success criteria) with a client and attach cost values to them after consulting with the devs who will be working on the project, i will not work with them a first time. Theoretical project world is actually a step down from where i live and work, my dogmatically stubborn friend.
The SRS is not consumable by maintenance developers, or cave-dwelling experts, or anyone not versed in marketing speech. If any of your devs are versed in marketing speech, FIRE THEM. Their logic modules are already compromised. Absolutely correct. Ooh, you were soooo close. Nope. They don't inhibit flexibility, they document usage. Which is to say, they preclude the need for flexibility when you start by consuming (excercising, some call it) the code from the perspective of your result down, rather than from your framework up. Not to mention the time you save not implementing useless shit that you then claim to need to be flexible enough to change. Again, correct. Again, sooooo close. The requirements "doc" is handled by the person that gathers the requirements and attaches monetary estimates to them. It's called division of labor, and enforces accountability on the behalf of the often otherwise hapless layers of middle management between you (me) and success.Demand they do their part. Ensure they do it correctly by refusing half-assed results. They refuse half-assed results from you, why shouldn't you require error-free requirements?
If the customer requested a feature or change outside of the original scope, that feature or change will be additive in time and cost. If it complicates or invalidates previous work, that is noted, and estimated. Yes, that second part is correct. However, more code does not explicitly mean more bugs, just more potential, or opportunity for bugs. Well, no. As i stated, the first goal of unit tests is verifying functionality (happy path usage) in a manner compatible with proper code design (Isolation of Concerns). Secondary goals include verifying known or discovered edge cases and code coverage (mostly conditional branching); also, surfacing emergent side effects. This last one is part of happy path validation AND edge case verification.I'm guessing your sour experience has been caused by "test advocates" insisting that "unit" tests prove the system is error-free. This is simply not true.
Yes, "perfect" unit tests probably are theoretical. Especially in the manner you describe them. But i suspect you're doing it wrong, probably through no fault of your own, but rather because of a misguided demonstration or explanation of purpose. Note that i was talking about the people that come after you. In-house developers, juniors on the maintenance team, new hires unfamiliar with the project or your intent at the time. Perhaps you've noticed that a good number of snippets that end up here probably started as "good code", but mutated through path of least resistance changes into hellish abominations devoid of reason and intent.But i'm sure they were originally written in a clear manner by capable developers like you, who thoroughly exercised every code path in a debugger.
...well, at the time.
Take control of your destiny, friend.They can only do this to you when you yourself are complicit in the crime.
If it makes any difference to you, I was squarely in the unit-tests-are-for-suckers camp not more than three years ago. I was firmly of the opinion that unit tests were doing nothing but encouraging mediocrity; lowering the barrier of entry to a field i already perceived to be flush with amateurs and hacks.
Note this site, and the koff "dearth" koff of wtf-ey submissions.
It wasn't until i met a few truly brilliant programmers who managed to explain to me the value of determining usage in the terms of business facts (true requirements) before determining the implementation thereof, that i was even willing to listen to anyone on the subject.
Since then, i've learned that the value unit tests provide actually frees me to be more creative and flexible--not less--by removing from my brain space the dead weight of the implementation details of every intricate component of each highly complex system.
But, hey. YMMV.
XD
Waaaaay TL;DR:
Create the reality you want to work in.
Stop trying to be a hero. They'll bleed you dry.
Unit tests aren't magical guardians. They are a tool.
Like any tool, you can misuse them to great frustration.
Try to avoid that.
Admin
Developers do not want to write unit tests because then it might be easy for other developers to maintain, putting their own jobs at risk when currently they are the only ones who know how their code works and will know that nobody else dare change things in case they break something. But if there are tests then it leaves their code open to change and to be outsourced.
Admin
Whether you espouse or but describe the attitude is immaterial (though i suspect the latter):
I would counter this attitude as i find it with: and and and, ultimately Thanks for the perceptive response, Cassius.Admin
Well, let's hope that they can at least form a coherent sentence, and don't just go straight for the baseless ad hominem attack. LOL. BTW more often that not the maintenance programmers are the original developers, and TDD isn't about using the tests as documentation or in place of a specification.
Admin
A further common occurrence is for senior developers to hand off completed projects for maintenance to juniors and new hires to crack their teeth on (hopefully) well-designed and mature systems. Based on these real-world scenarios, your argument holds no water; or your perspective is severely limited in scope and duration.
Neither you nor I ever mentioned TDD or formed an argument around it. In your original comment, you were talking about unit tests in general. Dismissed.
As to calling you an arrogant fuck, that is quite simply not an ad hominem. An example of an ad hominem would be: "You're such an arrogant bombastic dumb-fuck that all of your arguments about programming and unit testing are, by extension, tosh."
Additionally, it's certainly not baseless to call you arrogant as such distinction is more than warranted by asinine statements such as:
I suspect you have never actually worked on a complex system involving hundreds of components each involving hundreds of their own sub-components or dependencies. Or been short on "white-box" testers due to budget or time constraints. Or integrated multiple legacy systems into a new system. Or come on to a mature project, and jumped right into the middle of it, since you insist you so clearly and instantly understand the inner workings and machinery of "your" software. That's practically the definition of arrogance.As to my coherence or lack thereof? Sentence fragments often convey style, emotion and content as well or better than any properly sub-claused, punctuated and grammatically correct exposition. Welcome to context, ass-clown. There's a reason American is the most flexible language in the world.
Further still, the terseness afforded by fragments preserves my sanity when I feel compelled to respond to amateur opinions offered as "advice" to unsuspecting but well-intentioned scholars seeking practical tips and best practices on forums such as this; but I can't afford to spend the requisite amount of time to put the author thereof in their proper place.
In short, you're an arrogant fuck.
So am I, but at least I can defend my position.
Admin
Based on this discussion I'm hiring sino over KP any day.
Admin
Admin
Wow, what can anyone say to that.
I might be offended by your comments, except for the fact that they really do speak to your own character, and for that I extend my sympathies to you, but more so to those that must have had the displeasure of working with you.
For someone to get so completely unhinged as you have demonstrated with your own words is really quite remarkable.
When I wrote what?
Had your original comment been syntactically parse-able your comments might have stood for something more than just an example of you own insanity.
Congratulations on truly embodying the very spirit of WTF.
Admin
I was restating as tl;dr the original epithet at which you so noticeably took offense, after a rather lengthy dissection of the faulty premise you originally presented.
Unhinged never came into it.
Please clear your head and re-read my entire reply. You know, the part you conveniently omitted, for lack of retort. I calmly and rationally refuted each of your arguments, the denouement of which was my (now validated) re-assessment of your character based on your frivolous and logically unsound claims. This was the least of my points, but is now quite lulz-ful, given your reaction.
Really?Ok, I'll play your little game.
In this sentence, the pronoun what was used to indicate each instance of an unknown quantity and implementation of [a thing that was written by you]. I could have also restructured the sentence thusly: "[The egregious insult and disservice you do to the] Maintenance programmers and juniors [who have to understand and manipulate the code you left them, who] have no idea what the fuck you had in mind when you wrote [each of the various unknown components and pieces of what is surely, as you indicate, a non-trivial system]."
Seriously, I'm mildly concerned by your linguistic inflexibility.
Hope it's not endemic. :D
Admin
I was a contract test manager on a very old legacy system upgrade project - 30+ developers all over 50, writing Linc code (never heard of it? - neither had I...).
The "IS manager" (in quotes for a reason) had basically employed all his old mates to implement a project so stupid even my mother understood how stupid it actually was.
I tried to implement unit testing for the Devs as the code the testers were getting was beyond abysmal - there was something called unit testing, but it actually just boiled down to 'does the code compile or not'. I explained the benefits ad infinitum, we had workshops, I got in the three .Net guys under 50 to come in and explain the benefits - all for nothing.
Choose your battles, walk away if there's no hope - which I should have done a lot earlier, but you live and learn.
Admin
you want to meet the s i n gl es, sex y beauties. ...It takes only a few minutes to submit a profile which, however, will bring you more fun!!!!! Believe me!!!!!!!
...____ S e e k I n t e r r a c i a l [DOT] c o m ___= free to join C'MON NOW!!! ____ S e e k I n t e r r a c i a l [DOT] c o m __
____ S e e k I n t e r r a c i a l [DOT] c o m ___= free to join C'MON NOW!!! :) :) :) :) :) :) :) :) :) :) :) :) :)
:) :) :) :) :) :) :) :) :) :) :) :) :) :)
:) :) :) :) :) :) :) :) :) :) :) :) :) :)
:) :) :) :) :) :) :) :) :) :) :) :) :) :)
:) :) :) :) :) :) :) :) :) :) :) :) :) :)
:) ____ S e e k I n t e r r a c i a l [DOT] c o m ___= free to join C'MON NOW!!!
Admin
If the comments here are any indicator the state of our profession is grim.
Think of any other professional, whether it be a plumber, architect, or civil engineer. If you come to him or her and ask some difficult task that cannot be done without significantly sacrificing quality, they are going to tell you there is no way in hell they will do it. Because guess who gets blamed when the shit hits the fan.
Yet for some reason many software guys insist on bending over backwards and throwing professionalism out of the window when some scary business guy says "do this".
Blah.
Admin
Sounds pretty reasonable to me dude.
jess www.online-anonymity.us.tc
Admin
Hello, I am in second year computer programming and we are just studying unit testing. Can someone tell me what's wrong with this testing?
Thank You.
Admin
yes, you got what you asked for. that kind of approach never works with that kind of people, and thedailywtf is full of examples. the problem is that somebody failed to see the problem was not the lack of unit testing, but perhaps the education of the devs, or maybe even their motivation. in general, you can't lead intelligent people through: appeal to authority, constraint, candy (aka: bonuses and prizes); you need to convince them, instead. if you fail, and try constraint, for instance, they will screw you (while yielding to your constraints). the wtf is that you didn't see that coming. sorry.
Admin
To all people posting/quoting novels: Fuck you.
Admin
A spot of P45 driven development methodology might have helped.
Admin
Now stfu/gtfo.
Admin
All that while developers get stuck with 2% raises and having to put in 50+ hrs/wk so their managers can look good and get bigger bonuses.
Admin
Actually the Coupling and Cyclomatic complexity code metrics ,are much better when you want to improve code.
Admin
You want something much more annoying? The desktop client is pretty quick. Our Finance department absolutely cannot see the complaints about Maconomy because they don't use the same unbelievably bad interface as us.
As for the nag e-mails... you wouldn't happen to work at a certain dev shop whereby you would know what I meant if I mentioned mice, would you?
Amusingly the CAPTCHA this time is 'erat'. Rat's aren't mice.
Admin
That's nothing. I couldn't tell you how many 'unit tests' I've seen that do nothing more than write something to System.out (not even writing to the appropriate logging system), containing no assertions. At least this developer discovered the assert* method(s).
No project should ever have 300 developers. Has anyone defined a law for diminishing returns in such a situation?
Admin
I honestly hope am not the only female reader here, or the only female developer who read this and does not find it funny.
Look up 'hostile work environment' and go figure why we are the absolute minorities, by choice. In case you are wondering, one of the many reasons is of course because we are sensitive for your needs, and we do not want to engineer software so well that will put all men out of work ;)
Admin
That would actually make a slight bit of sense if it had been written (as I suspect the programmer meant to write):
At least the theory makes sense, then: Try to do something, catch any errors, and throw an error back with a custom error message so that you'll know where to look. The programmer should still be flogged for the abuse of assert(), but at least it would make a little sense.BTW, wtf is with all the near-unreadable light colored text? Seriously, cut that out.