|
Sometimes I wonder!!
You have the thought that modern physics just relay on assumptions, that somehow depends on a smile of a cat, which isn’t there.( Albert Einstein)
|
|
|
|
|
Chalk it up to another reason why to never use Visual SourceShredder.
|
|
|
|
|
View the complete horror here: http://svn.openstreetmap.org/applications/utils/wiki-extensions/SlippyMap-local/SlippyMap.class.php[^]
Some snippets:
if ( isset( $argv['lat'] ) ) {
$lat = $argv['lat'];
} else {
$lat = '';
}
if ( isset( $argv['lon'] ) ) {
$lon = $argv['lon'];
} else {
$lon = '';
}
if ( isset( $argv['z'] ) ) {
$zoom = $argv['z'];
} else {
...
Should use array_key_exists and probably simply loop through, and do ${$varName} = $value or something similar.
$error = wfMsg( 'slippymap_heightbig' ) . '<br>';
} else if ( $height < 100 ) {
$error = wfMsg( 'slippymap_heightsmall' ) . '<br>';
} else if ( $lat > 90 ) {
$error = wfMsg( 'slippymap_latbig' ) . '<br>';
} else if ( $lat < -90 ) {
$error = wfMsg( 'slippymap_latsmall' ) . '<br>';
} else if ( $lon > 180 ) {
$error = wfMsg( 'slippymap_lonbig' ) . '<br>';
Extremely nice redundancy.
$output .= '<script type="text/javascript">';
$output .= "var lon= ${lon}; var lat= ${lat}; var zoom= ${zoom}; var lonLat;";
$output .= 'var map; ';
$output .= 'addOnloadHook( slippymap_init ); ';
$output .= 'function slippymap_resetPosition() {';
$output .= ' map.setCenter(lonLat, zoom);';
$output .= '}';
You are NOT dreaming. This is JavaScript getting echo'd line by line!!
GSoC 2009 student for SMW!
---
My little forums: http://code.bn2vs.com
---
70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!
|
|
|
|
|
But the code works so well!
This statement is false.
|
|
|
|
|
This isn't quite a coding horror: I have no example code to show you.
But, it is an example of when systems designers get it wrong.
I had to go to my local library today - a book I reserved had arrived. When I got there I was suprised to see that all booking in and out was being done by hand - normally they use a bar code scanner.
Why? The internet connection had gone down.
Not a major problem, just call up the support team...
Except all the phones are VOIP. No internet, no phones.
Not a major problem, just use a mobile...
Except the telephone directory is on-line. No internet, no idea what number to call to get it back...
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Ask the janitor what he unplugged.
|
|
|
|
|
What's wrong with them, a quick google and...
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
The lesson,
Write your support numbers down. We have a few copies of our vendor numbers and such floating around here for when IT isn't around, I swear it saves lives. Well, social lives, mostly those of myself and my boss.
|
|
|
|
|
heh.
I put in couple of years in a trouble-shootery kind of post, where I had to look into network failures in the global network of a major multi-national (which Shell remain nameless) with several million terminals, including office PCs, POS units, and just about every kind of access point and shared gubbins you can think of, and find ways to make it never happen again.
One of the most fun failures took out the entire VPN in China (That's a LOT of people sitting at terminals that can't access data) for several hours.
It turned out that, in one of the network areas that we didn't have direct control of, someone had plugged both ends of a fibre into the same switch, causing a broadcast storm (on the bit we controlled, the broadcast storm couldn't have happened).
The 3rd-level support team was reduced to calling mobile phones all over China, almost at random, to try to find out what was happening. Huge amounts of money were being lost, and everyone took resolving the problem very seriously, but we still had a lot of laughs, dealing with it. A party atmosphere, almost.
When I sent out my report, I closed the accompanying intro with "I now keep an ethernet cable in my middle desk drawer, in case I want an afternoon off".
The response was mixed,
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark Wallace wrote: The response was mixed
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
ha ha ha, sounds like a similar sense of humour their
i find a happy engineer is a more productive engineer, and after losing so much time and money you might as well try and lighten up the report readers day!
|
|
|
|
|
Mark Wallace wrote: When I sent out my report, I closed the accompanying intro with "I now keep an ethernet cable in my middle desk drawer, in case I want an afternoon off".
That's bad.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I have this problem... And i dont what to do...
|
|
|
|
|
rotflmao!!!! triple epic fail
|
|
|
|
|
We are dealing with application left by our former developer.
I could mention here a lot of things like putting all of the code in one file (15k lines, 680kB), putting all controls on one form and using BringToFront , naming all controls like textBox85 , hardcoding the same connection string in three different places, and so on.
But criteria if one of the buttons should be shown beats all of it:
if ((textBox39.BackColor == Color.White) && (textBox40.BackColor == Color.PapayaWhip))
button37.Visible=true;
else
button37.Visible=false;
|
|
|
|
|
Think of it this way... If it was WPF, it would be data-bound through two object models and a multi-converter to be absolutely certain that if those backgrounds (backcolors) EVER changed for any reason, the button would immediately disappear.......
.....With a psychadelic *poof* animation...
.....and background music...
.....in full DirectX-rendered 3D.
|
|
|
|
|
<Homer>
Mmmm... papaya whip...
</Homer>
|
|
|
|
|
Ar we talking whips made of papaya or papaya whipped up with cream?
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Nagy Vilmos wrote: papaya whipped?
actually squashed PeachPuff
PS to Homer: even more Mmmm
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Brilliant!
Well, I'm a great The Simpsons fan. I truly heard Homer saying it.
|
|
|
|
|
What an idiot. Clearly he should have done.
button37.Visible = textBox39.BackColor == Color.White && textBox40.BackColor == Color.PapayaWhip;
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
You know what is worst in this situation? That, this was my first thought.
Idea of putting background color into the condition fits so perfect in his methodology, that I missed it first.
|
|
|
|
|
jkruza wrote: Idea of putting background color into the condition fits so perfect in his methodology, that I missed it first.
Doesn't everyone use background colors for their control logic?
This code probably even works, but see my tag line…
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
jkruza wrote: naming all controls like textBox85
Yikes! I cannot stand it when people do that. My course I teach, I penalize points from students who name controls in this manner, and people still do it (then they wonder why they receive a lower grade than the grade they think they were going to earn)
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
naming all controls like textBox85
I wish Microsoft had made it easy (if not default) to have VS ask the name of new objects being created, especially since the text field will get initialized to the default name (so even if the name and text field should be the same, both will have to be keyed in).
BTW, any recommendations for the best plug-in for 2005 and 2008 to fix that?
|
|
|
|