Comment On Psychic Code

Like snakes and mongooses , QA and developers are natural enemies. Through an unfortunate series of events, developer Bridget found herself working on a QA team. She was deep in enemy territory, and not full prepared for the rigors of QA, so she focused on her core developer skills. She helped the testers automate things. [expand full text]
« PrevPage 1 | Page 2Next »

Re: Psychic Code

2012-11-07 08:35 • by Swedish tard (unregistered)
Ouch.
I've seen som rancid scripts, but that really takes the cake. Rather belongs in IOCCC or similar.

Re: Psychic Code

2012-11-07 08:40 • by Warren (unregistered)
They need to test that no-one's checked this bit of code back in. So now they need a test script that runs svn....

Re: Psychic Code

2012-11-07 08:44 • by mz001 (unregistered)
Sounds kinda familiar.
I recently inherited an application where the previous guy screwed up so badly that the only solution is to keep the basic idea and to a complete rewrite. On the bright side, the guy's now working at a younger competitor and will probably have run them into the ground in less than a year.

Re: Psychic Code

2012-11-07 08:48 • by Kushan
Simple rule with regex, if it's more than the old terminal width of 80 characters, you're doing it wrong. Hell, even that's pushing it.

Re: Psychic Code

2012-11-07 08:55 • by Yaos
If your code does not look like your rolled your face over the keyboard you're not doing regular expressions right.

Re: Psychic Code

2012-11-07 08:56 • by dkackman
"Like snakes and mongooses , QA and developers are natural enemies."

Best quote ever. Putting on my whiteboard

Re: Psychic Code

2012-11-07 08:57 • by @Deprecated
394342 in reply to 394339
Kushan:
Simple rule with regex, if it's more than the old terminal width of 80 characters, you're doing it wrong. Hell, even that's pushing it.

Thank FSM, I thought you were going to roll out that tired old "Now you have two problems" bit.

Re: Psychic Code

2012-11-07 09:00 • by Remy Porter
394343 in reply to 394342
A developer wants to make a joke about regexes, so they trot out the "two problems" bit. Now they have two jokes.

... I'm not sure that worked.

Re: Psychic Code

2012-11-07 09:01 • by El Dorko (unregistered)
What I've been saying all the time to my team: you can write all the regex you want to save some typing or characters or whatever, but you'll end up writing way more documentation to go with that. Here, there is no undocumented regex (yes they still use it for some tasks and that's fine by me). And I check that the documentation makes sense. And I snap at the culprit when it doesn't.

Re: Psychic Code

2012-11-07 09:02 • by NameNotFoundException (unregistered)
Why, oh why did they let the other guy go? My job security dreams just vanished...

Re: Psychic Code

2012-11-07 09:04 • by Rhywden
394346 in reply to 394343
http://ars.userfriendly.org/cartoons/?id=20070628&mode=classic

Re: Psychic Code

2012-11-07 09:10 • by Bongo (unregistered)
No unicorns :(

Re: Psychic Code

2012-11-07 09:36 • by gar37bic
The idea of a script reading itself reminds me of Mortran, a 'structured FORTRAN preprocessor', developed (IIRC) at U of Waterloo. The preprocessor was a quite simple macro processor. The key to the preprocessor was an initial macro, which expanded to become the de facto processor, which processed the macros that implemented the language structures. (All of this IIRC). In essence, that original 'rule' (macro) defined the direction of construction of the language.

This bootstrap process gave me to think about creation and evolution, in the following manner. It's one thing to create something out of whole cloth - a butterfly, for instance. But it's an entirely different and much more interesting thing to create something by merely defining a set of rules by which an entire universe constructs itself, that evolves resulting in, of course, (and among other 'things'), us. :) It's sort of like aiming a gun by growing a tree to support the barrel. So since then I have never seen any essential conflict between this sort of original 'creation' (by whatever means) and 'evolution'.

Of course, it is also useful to add one element from systems science - the principal that a controller of a system must have more complexity than the system, else it is not a controller. This means that no member of the system can determine whether there is a controller or not. So the whole creation/evolution argument is undecidable. In any case, it's fun to think that a programming language is a metaphor for evolution!

Re: Psychic Code

2012-11-07 09:57 • by Ron (unregistered)
Note that the comment says "I forget what this does", not "I forgot what this does".

Sounds more like a declaration of intent: "I _will_ forget what this does". I can understand why. I wouldn't want to remember this, either.



Re: Psychic Code

2012-11-07 10:00 • by AGray (unregistered)
So, a true story on this note, but heavily sanitized to protect the innocent.

I recently moved into a developer postion, from automated QA. The problem? On my team, I'm the only person with that skillset left.

Enter a series of Ranorex/C# programs written by my predecessors. Some of these scripts are bad in the simplest sense - they sometimes work in theory (often not), but rarely work in practice. My last week since originally being tasked with maintaining these functional tests has been mostly rewriting, since the previous contributors weren't exactly clear on things like a 'Common' library being...well, common. Or, that whitespace does wonders to make code legible. Or the difference between bitwise OR and short-circuit OR in C#.

Long story short...I feel this possibly fictionalized programmer's pain. I'm just glad my pain is not the equal of that.

Re: Psychic Code

2012-11-07 10:02 • by atk (unregistered)
Like snakes and mongooses , QA and developers are natural enemies.


I've heard that bu11$#!t before, and it's still BS - even with the possibility that it's here only for humor. You'd expect to see attitudes like this from immature, fresh-out-of-school programmers. But sadly, we see it from many experienced developers, management, and even college professors. It's attitudes like this that create unnecessary tension between teams whose joint purpose is to deliver a product to market that people will buy.

All quality and all bugs come from development. Development is fully responsible for the quality (or lack thereof) in a product. Nobody else writes the code. Nobody else creates the bugs. (For the pedants, product management is responsible for requesting a product that customers will want, but they're still not the ones that do or do not build in quality.)

If the product is lacking in quality, either customers won't buy it, or they'll demand support. If they don't buy it, the company doesn't make money and nobody gets paid. If customers demand support, that costs the company money. If it costs the company too much money, and support is equally or more expensive than profits, the company loses money and nobody gets paid. And the second order issues like low quality risking the company's reputation (other potential customers may not buy the product of a company with a bad reputation) and customer good will (lack thereof leads to loss of future sales and sometimes customers demanding their money back or expensive freebees).

QA exists to identify the level of quality in a product before it ships so that a decision can be made as to whether it will make the company money or cost the company money.

So that they company can make money.

Whether developers, professors, or anyone else realize it or not, this is the same goal as development has - to make the company money and get paid.



BTW, I'm a developer.

Re: Psychic Code

2012-11-07 10:03 • by Bubbles (unregistered)
What's with the dev/QA hate? I love our QA team, they're very good and they help us devs a ton. And we go out for beers together too.

Re: Psychic Code

2012-11-07 10:08 • by Chris (unregistered)
Bridget is obviously not a Real(tm) developer.

Any developer worth their salt wouldn't spend more than about 30 minutes tracing through a pile of unused crap before declaring that it is indeed crap.

This is always quickly followed by the developer starting over with the given code. Usually leading to another pile of unused crap that needs to be replaced.

Re: Psychic Code

2012-11-07 10:12 • by Foo (unregistered)
394355 in reply to 394343
Remy Porter:
A developer wants to make a joke about regexes, so they trot out the "two problems" bit. Now they have two jokes.

... I'm not sure that worked.

how about "a dev wants to make a joke about regexes, so they trot out the "two problems" bit. Now they have two memes.

Re: Psychic Code

2012-11-07 10:15 • by Foo (unregistered)
This kinda stuff probably comes from an automated script which tries to update itself. If you've got a few machines in a cupboard somewhere churning a large regression set, you want them to auto-update... and I can't say I've ever seen a neat solution to auto-update.
This sounds like it attempted to get the latest version of itself and everything it needed from source control, which is a great concept, but sucky implementation.

Re: Psychic Code

2012-11-07 10:16 • by dkallen (unregistered)
394357 in reply to 394343
Remy Porter:
A developer wants to make a joke about regexes, so they trot out the "two problems" bit. Now they have two jokes.

... I'm not sure that worked.


A commenter wants to make a joke out of a comment, so he trots out the quote/comment/joke meme. Now he has two comments, and no jokes.

Re: Psychic Code

2012-11-07 10:26 • by dkallen (unregistered)
394358 in reply to 394352
atk:
Like snakes and mongooses , QA and developers are natural enemies.


You'd expect to see attitudes like this from immature, fresh-out-of-work trolls.

If the product is lacking in quality ship it [s]o that [the] company can make money before laying off the developers.

...this is the same goal as development has - to take the company's money and get laid.


BTW, I'm a troll


There, FTFY.

Re: Psychic Code

2012-11-07 10:27 • by RichP
Shouldn't the plural of "mongoose" be "mongeese"?

Re: Psychic Code

2012-11-07 10:34 • by DCRoss
394360 in reply to 394359
RichP:
Shouldn't the plural of "mongoose" be "mongeese"?


It's mongooses. Or mongui, if you prefer.

Re: Psychic Code

2012-11-07 10:35 • by Anon') or 1=1 (unregistered)
394361 in reply to 394359
RichP:
Shouldn't the plural of "mongoose" be "mongeese"?


You didn't read the HTML comments, did you?

Re: Psychic Code

2012-11-07 10:36 • by JC (unregistered)
Devs can hate QA as much as they like. Trust me, you'll hate it much more when you dont have a QA team and you have to DIY.

Re: Psychic Code

2012-11-07 10:38 • by Remy Porter
394363 in reply to 394362
I'm in a situation where the BA writes the test cases (poorly, usually), and then the developer executes the test cases (also poorly). But the customers refuse to pay for QA.

Re: Psychic Code

2012-11-07 10:49 • by neminem (unregistered)
394364 in reply to 394360
DCRoss:
RichP:
Shouldn't the plural of "mongoose" be "mongeese"?


It's mongooses. Or mongui, if you prefer.


No, a mongui would be a (slightly racially insensitive, if you track down the etymology) derogatory term for a really terrible user interface.

I like "mongeese". Totally incorrect, but I still like it.

Re: Psychic Code

2012-11-07 10:58 • by Nemo (unregistered)
Bah! Developers and QA get along great! The real fight is between the developers and the admins.

Re: Psychic Code

2012-11-07 11:03 • by justsomedudette (unregistered)
394366 in reply to 394364
neminem:
DCRoss:
RichP:
Shouldn't the plural of "mongoose" be "mongeese"?


It's mongooses. Or mongui, if you prefer.


No, a mongui would be a (slightly racially insensitive, if you track down the etymology) derogatory term for a really terrible user interface.

I like "mongeese". Totally incorrect, but I still like it.
I like mongeeses which is even worse, but I still like it.

Re: Psychic Code

2012-11-07 11:14 • by Neil (unregistered)
394370 in reply to 394361
Anon') or 1=1:
RichP:
Shouldn't the plural of "mongoose" be "mongeese"?
You didn't read the HTML comments, did you?
I just wanted to note that the space before the comma is a dead giveaway.

CAPTCHA: sagaciter - someone who cites sagas.

Re: Psychic Code

2012-11-07 11:17 • by callcopse
Jeez, me and the QAs, and the admins, and the PMs are all down.

It's the SALES folk who are sworn enemies at DNA level. Get it right.

Re: Psychic Code

2012-11-07 11:21 • by Ralph (unregistered)
394373 in reply to 394352
atk:
If the product is lacking in quality, ... customers won't buy it
OK, I know I'm evaluating one half of an "or", but clearly this has a vanishingly small probability and therefore should be optimized out. Consider:

Microsoft
Oracle
Adobe
SAP
HP
...
Members of Congress
...

Re: Psychic Code

2012-11-07 11:29 • by Jack (unregistered)
394375 in reply to 394363
Remy Porter:
I'm in a situation where the BA writes the test cases (poorly, usually), and then the developer executes the test cases (also poorly).
Test cases? I envy your luxurious life in a mature organization. Here's how it works here:

1. Internal customer describes what they want.

2. Development builds whatever they feel like making, spending countless hours obsessing over exactly how round the corners should be, but giving no thought to data structures.

3. Customer is responsible for testing; documents 100 bugs.

4. Developers give up and go on to another project.

5. Rinse and repeat.

6. ???

7. Profit!

We just hired our first QA guy. And this is in an IT organization with over 300 employees.

P.S. We have never made it to step 7, perhaps because of the endless loop in 5.

Re: Psychic Code

2012-11-07 11:35 • by Ozz (unregistered)
I thought everyone knew that the plural of "mongoose" is "polygoose".

Re: Psychic Code

2012-11-07 11:50 • by chubertdev
Nice Gir reference in the HTML comments.

"I saw a squirrel!"

Re: Psychic Code

2012-11-07 12:14 • by Sebastian Buchanan (unregistered)
it would be cooler if the regex created an svn client

Re: Psychic Code

2012-11-07 12:15 • by chubertdev
394380 in reply to 394379
Sebastian Buchanan:
it would be cooler if the regex created an svn client


And that is how SourceSafe was created.

Re: Psychic Code

2012-11-07 12:34 • by SunGoose (unregistered)
394383 in reply to 394376
Ozz:
I thought everyone knew that the plural of "mongoose" is "polygoose".


Good one.

Another possible sequence is: "MonGoose", "TueGoose", "WedGoose"...

Re: Psychic Code

2012-11-07 12:51 • by someone (unregistered)
That actually sounds like a good way to check for typos/errors. Like the static type checking you had in a compiled language.

The TWTF is that they deleted the function

Re: Psychic Code

2012-11-07 12:55 • by Alin (unregistered)
394389 in reply to 394340
Yaos:
If your code does not look like your rolled your face over the keyboard you're not doing regular expressions right.


Made my day :)

Re: Psychic Code

2012-11-07 13:15 • by Herp (unregistered)
394391 in reply to 394354
Chris:
Bridget is obviously not a Real(tm) developer.

Any developer worth their salt wouldn't spend more than about 30 minutes tracing through a pile of unused crap before declaring that it is indeed crap.

This is always quickly followed by the developer starting over with the given code. Usually leading to another pile of unused crap that needs to be replaced.


Would politely disagree. Yes, some bad code is so bad that it is not salvageable. In many cases, though, the cost of refactoring is less than the cost of starting over from scratch.

Re: Psychic Code

2012-11-07 13:20 • by Nagesh
394393 in reply to 394338
mz001:
Sounds kinda familiar.
I recently inherited an application where the previous guy screwed up so badly that the only solution is to keep the basic idea and to a complete rewrite. On the bright side, the guy's now working at a younger competitor and will probably have run them into the ground in less than a year.


IT CANNOT BRING OPERATION TO STANDSTILL. THAT IS TRUTH OF MATTER.

Re: Psychic Code

2012-11-07 13:33 • by Daniel (unregistered)
Oh my. I'm laughing and crying at the same time. Wouldn't be funny or tragic if it weren't so terrifyingly accurate.

Re: Psychic Code

2012-11-07 13:37 • by Hasse (unregistered)
Any person that want to call himself a developer/programmer should work 2 years:

1: as a system administrator
2: in QA
3: as a maintenance programmer

Then they learn how badly maintainable programs could be.
How horrible functionality a program can have
How bad code looks like

Re: Psychic Code

2012-11-07 14:15 • by eVil (unregistered)
394396 in reply to 394383
SunGoose:
Ozz:
I thought everyone knew that the plural of "mongoose" is "polygoose".


Good one.

Another possible sequence is: "MonGoose", "TueGoose", "WedGoose"...


WednesGoose surely?

Re: Psychic Code

2012-11-07 14:26 • by lesle (unregistered)
Collective Nouns for Mongoose

A business of mongoose (most commonly cited)
A band of mongoose
A pack of mongoose
A mongaggle of mongoose (probably made up, but nice!)
---
A mongoose is a type of weasel.

Re: Psychic Code

2012-11-07 14:30 • by Zylon
394398 in reply to 394347
Bongo:
No unicorns :(

But we got the usual slipshod editing, so there's that.

...she needed to know out what it was actually trying to do...

Yes, let us all sally forth and know out the problem!

Re: Psychic Code

2012-11-07 14:33 • by da Doctah
394399 in reply to 394353
Bubbles:
What's with the dev/QA hate? I love our QA team, they're very good and they help us devs a ton. And we go out for beers together too.


IWPTA as "go out for bears together".

(Now, where's this Eskimo woman you want me to wrestle?)

Re: Psychic Code

2012-11-07 14:42 • by Anonymous bastard (unregistered)
394400 in reply to 394365
Nemo:
Bah! Developers and QA get along great! The real fight is between the developers and the admins.

Specially the windows admins...
« PrevPage 1 | Page 2Next »

Add Comment