|
I'm with you on this one! Sometimes verbosity improves readability, but there are many cases where it's just dumb.
The first example is terrible:
bool is_queue_empty(void)
{
if (queue_length==0)
{
return true;
}
else
{
return false;
}
}
More code & multiple exit points -- for zero benefit???!!!
This would be better:
bool is_queue_empty(void)
{
return queue_length == 0;
}
|
|
|
|
|
Over 9GB of log files in the log folder of one of our "technology partners"
now - request change in logging behavior or install bigger HD's? What's cheaper?
|
|
|
|
|
Yes, a common pattern. Log every totally uninteresting event, so that the real errors can't be found anymore. And if they are found, they provide little to no information which might give you a hint to what has happened. Who do they think wants to read that stuff?
I had a program that sent a mail with 'An error has occured in application XXX'. No more. No error message, no stack trace, no parameters, no further information. When that thing had a bad day, it flooded your mailbox with those messages.
And from the clouds a mighty voice spoke: "Smile and be happy, for it could come worse!"
And I smiled and was happy And it came worse.
|
|
|
|
|
In a previous job, we had a pretty good logging system. Every message had a location and severity level from 1 for crash bang to 9 for suicidal debug on nearly every step. The code monkeys were reasonably good at putting in logging at the right level.
The clients were pretty bad at setting the logging to catch level 9 for all modules. Figuring they can always filter out the crap later.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
Wow... you can always delete the files... can you disable the logging?
|
|
|
|
|
Over 9GB of log fileS? Seems like you did a pretty good job. We got a xml log file that's 9GB. Opening it instantly crashes the server
And seeing what my company logs in other applications I suspect it's 9GB full of crap that wouldn't help any programmer to fix any bug
It's an OO world.
public class Naerling : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
}
|
|
|
|
|
What makes a happy programmer?
|
|
|
|
|
A happy programmer happens when you see a flabbergasted look from your client, because you delivered something they thought was impossible, in a most amazing way.....
|
|
|
|
|
I bet a happy programmer isn't one who gets their post "Message Automatically Removed"
|
|
|
|
|
When it comes in ahead of schedule, under-budget, bug-free and is accepted by the client who offers you a large bonus for your efforts and a new contract.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Dalek Dave wrote: comes in ahead of schedule, under-budget, bug-free and is accepted by the client
I am sure you must be from a different planet.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
Wayne Gaylard wrote: I am sure you must be from a different planet.
He's an accountant, so you might be correct.
|
|
|
|
|
Items 1 (ahead of schedule), 2 (under-budget), and 3 (bug-free) are neither necessary nor sufficient. Client/customer acceptance, as signified by the fact they paid you, is the sole criteria for a successful programmer.
None of the criteria, with the possible exception of 'bug-free', are conditions that impact my happiness as a programmer. For me, as bug-free as I can make it is a minimum condition for happiness with a piece of code.
Software Zen: delete this;
|
|
|
|
|
Fata Morgana
Alberto Bar-Noy
---------------
“The city’s central computer told you? R2D2, you know better than to trust a strange computer!”
(C3PO)
|
|
|
|
|
When it comes in ahead of schedule, underover-budget, bug-free and is accepted by the client who offers you a large bonus for your efforts and a new contract.
|
|
|
|
|
Exactly, because doing just one impossible thing a day isn't enough.
Giraffes are not real.
|
|
|
|
|
Didn't your parents explain that to you?
|
|
|
|
|
Wonde Tadesse
MCTS
|
|
|
|
|
|
5:00 PM Friday and more so 23 Dec
|
|
|
|
|
i think accomplishment does
|
|
|
|
|
Having the users constantly thank you for your brilliance.
That's #1 for me.
*smiles* "Oh, just doing my job..!"
#2 is having the right music while coding...
|
|
|
|
|
When I see a stanger in a hallway happily studying a report I created.
Ok Im easily pleased.
The more things change the more they stay the same..(Dos is Boss)
|
|
|
|
|
Working on your own software products
|
|
|
|
|