|
In Palermo they know what they are doing. They knock at the door and make some offers you can't refuse. Then they take you for a boat ride, where they will provide the traditional cement footbath. At the end of the boat ride you will get to do some swimming and diving.
A while ago he asked me what he should have printed on my business cards. I said 'Wizard'.
I read books which nobody else understand. Then I do something which nobody understands. After that the computer does something which nobody understands. When asked, I say things about the results which nobody understand. But everybody expects miracles from me on a regular basis. Looks to me like the classical definition of a wizard.
|
|
|
|
|
OMG -- so THAT is why I'm not raking in the big bucks. I write layered code that is reusable, maintainable, extensible, and uhhhhmmm works.
|
|
|
|
|
You mean such class exist in production code.
|
|
|
|
|
Oh yes. I doubt this man ever distinguished between production code or any other kind. And testing goes only far enough to sucessfully eliminate any exceptions by catching them in empty catch blocks. After that we can simply pretend that nothing happened and the man never even tried to get the thing working properly. This way everything appears to be ok and the users don't even suspect how bad the program really is.
I am completing an entirely new application to replace it and ironically the users keep complaining about error messages which correctly report any inconsistencies in the database. They refuse to believe that the 'good' old application simply swept all errors under the rug.
A while ago he asked me what he should have printed on my business cards. I said 'Wizard'.
I read books which nobody else understand. Then I do something which nobody understands. After that the computer does something which nobody understands. When asked, I say things about the results which nobody understand. But everybody expects miracles from me on a regular basis. Looks to me like the classical definition of a wizard.
|
|
|
|
|
Was the name of the class MiscFunctions by any chance?
Mike Lasseter
|
|
|
|
|
Nope, it was 'DataSets'. At least this name is partially true. It has some (static) methods to fill DataSets in some more or less lunatic fashion. But there are also methods to send useless notification mails and a million other things.
A while ago he asked me what he should have printed on my business cards. I said 'Wizard'.
I read books which nobody else understand. Then I do something which nobody understands. After that the computer does something which nobody understands. When asked, I say things about the results which nobody understand. But everybody expects miracles from me on a regular basis. Looks to me like the classical definition of a wizard.
|
|
|
|
|
I read that hand had to double check if I wrote it last night in my sleep.
Then I saw that your "Uberclass" had only 7000 lines of code.
Pffft.
I'm dealing with one class just like yours but with 14000 LOC.
The entire App is heading for 70,000 LOC and from what I can see it could be rewritten in less than 10,000 LOC.
As for why some people can "look good" writing this stuff. The people who pay them have no idea what the code looks like and what constitutes good code.
You can fix a bug and handle a new special case in 10 minutes by copying and pasting 500 lines of code and sticking them in the ELSE part of a new IF statement, perhaps nested inside 5 other levels of IF Statements.
Or you can spend half a day trying to refactor the code so that this new special case doesn't add more twisted logic and code bloat.
10 mins vs Half a day or more. Who do you think the Project Manager loves?
Granted the bloated twisted version spends forever in testing and goes live full of bugs, but most project managers seem to think that's how software works, which is why they love guys who can fix bugs in 10 minutes.
|
|
|
|
|
Ok, you win... or perhaps lose
Certainly the bosses love it, but only until this mess must be expanded in some way and it turns out to be near impossible without rewriting at least half of it. Then they must explain how an apparently simple change can turn out to cost so much time and money.
But it's even more incredible that such monstrosities somehow pretend to work and somehow pass whatever kind of testing is done and then slumber for years without anybody asking any questions.
A while ago he asked me what he should have printed on my business cards. I said 'Wizard'.
I read books which nobody else understand. Then I do something which nobody understands. After that the computer does something which nobody understands. When asked, I say things about the results which nobody understand. But everybody expects miracles from me on a regular basis. Looks to me like the classical definition of a wizard.
|
|
|
|
|
To be fair to the project managers etc, the software development "profession" hasn't exactly covered itself in glory.
It's undetstandable why they assume that software is always going to be buggy and therefore quick fixes should be prioritised over this nebulous notion of "good code".
Be honest, if you picked a company at random and looked at their source code for internal apps, would you "expect" to find good code or bad?
The overwhelming majority of code in the world is bad bad bad.
As a profession we're still living in caves and drawing crude pictures of animals.
There are signs that things are improving. The Ugg family in Cave 7 are playing with Test Driven Development. The Oggs in Cave 8 have this thing called Refactoring. The Flintstones over in Bedrock have been using something called Design Patterns.
We're on a slow upward climb towards being a real profession but we won't get there doign the things we've done in the past.
It should take as long to become a software developer as it does to become a doctor, and we should probably be choosing specialties in much the same way. Sadly you can become a "programmer" with less training than a Burger Flipper.
-Richard
|
|
|
|
|
All true, but that's several more reasons to try to at least advance to the bronze age. Why, of all things, should I work in a profession when I don't care about it or my skills at all?
Richard, too
A while ago he asked me what he should have printed on my business cards. I said 'Wizard'.
I read books which nobody else understand. Then I do something which nobody understands. After that the computer does something which nobody understands. When asked, I say things about the results which nobody understand. But everybody expects miracles from me on a regular basis. Looks to me like the classical definition of a wizard.
|
|
|
|
|
> Why, of all things, should I work in a profession when I
> don't care about it or my skills at all?
Oh, you should definitely care about your skills and the profession, that's not what I'm saying at all.
What I'm saying is that it might not be easy to get the "right way" message accross.
You may find that it's better to seek out the people who are building software the right way, rather than try to change the culture you are faced with.
But good luck finding them.
-Rd
|
|
|
|
|
The instruction was very clear, exercise all aspects of the language features.
|
|
|
|
|
+3
Twas more like "as many features as you can muster"
...byte till it megahertz...
|
|
|
|
|
i didn't even know goto statement still exist...
dev
|
|
|
|
|
One of the worst programming practice i have ever seen was like this,
Dim Comma As String = ","
and then he used this variable whenever he wanted to used Comma in other strings.
Initially i wondered what this Comma means and then clicked go to definition and just horrified.
murder of programming......
|
|
|
|
|
if someone start to create a role play game like this:
int enemyHP = 10;
int playerStrength = 3;
_TakeDamage:
switch (playerStrength)
{
case 1:
if (enemyHP == 1)
{
goto _EnemyDeath;
}
else
{
enemyHP = enemyHP - 1;
}
case 2:
if (enemyHP == 2)
{
goto _EnemyDeath;
}
else
{
enemyHP = enemyHP - 2;
}
case 3:
if (enemyHP == 3)
{
goto _EnemyDeath;
}
else
{
enemyHP = enemyHP - 3;
}
case 4:
if (enemyHP == 4)
{
goto _EnemyDeath;
}
else
{
enemyHP = enemyHP - 4;
}
case 5:
if (enemyHP == 5)
{
goto _EnemyDeath;
}
else
{
enemyHP = enemyHP - 5;
}
}
_EnemyDeath:
Console.WriteLine("Enemy is death!");
Then there is no hope for the game... xD
This is really untopable!
|
|
|
|
|
In some old code, I discovered following gem:
do
{
try
{
BDTLine line = new BDTLine(File);
line.Read();
Lines.Add(line);
}
catch (Exception ex)
{
System.Diagnostics.Trace.WriteLine("Exception reading BDT file: "+ex.Message);
break;
}
} while(true);
The file seems to be read line by line, but actually line.Read() reads a number of bytes. Some when the end of the file is reached, and it reads the next 7 bytes, an exception is thrown which is caught in the block above, which then stops further reading of the file; the error message nicely fills the log file. Great idea!
|
|
|
|
|
Is this in Java?
The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word.
Advertise here – minimum three posts per day are guaranteed.
|
|
|
|
|
Nope, Java would have camelCase method names.
|
|
|
|
|
I'm not really a .NET programmer, so I might be missing something here. I would expect this to break out of the do-while loop after the exception has been logged. So, if it breaks out of the infinite loop after writing to the log, why would it fill the log file? And surely it will only write to the log file if Trace is enabled? So in a production environment I wouldn't expect it to write anything at all.
I'm not defending using infinite loops to process something that isn't endless like this, I think it's bad practice, but I don't understand why this would just keep writing error messages endlessly to the System Trace log, which is what the poster seems to suggest.
As I said, I'm not a C# programmer really, so maybe there's something going on here I'm not aware of.
|
|
|
|
|
you would be right if the while loop were inside the try block; as it is now, once something goes wrong the while loop keeps executing, causing ever more exceptions.
|
|
|
|
|
So, if this is C#, the break takes you where?
To find out, I tried this:
do
{
try
{
int a = 1;
int b = 0;
int c = a / b;
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
break;
}
} while (true);
When the DivideByZeroException gets caught, it breaks out of the do-while loop, and does not keep showing the MessageBox over and over. Why is this different from the original example? I must be missing something obvious here.
|
|
|
|
|
You're right, the break prevents an eternal loop. Nevertheless the following is the normal way:
try
{
do
{
int a = 1;
int b = 0;
int c = a / b;
} while (true);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
as its structure better matches the intended operation, which is illustrated by the fact the break is not present anymore.
|
|
|
|
|
Either way, it's a pretty sucky way to do things. I'm guessing that this is forced on the programmer because the BDTLine class is badly designed so the only choice is to continue to read until it throws an exception.
|
|
|
|
|
But why us do with while(true) ?
|
|
|
|