|
OriginalGriff wrote:
So how does a single hardware failure disrupt a mission-critical and very, very public system like that? Somebody didn't do their job properly, did they?
Probably one of their legacy back-end services (trying to give them a break here).
|
|
|
|
|
Someone decided they could cut their operating costs by at least half by eliminating all but the active node in their backend clusters. Those other boxes were just sitting there, doing nothing but increasing the electric bill, after all.
|
|
|
|
|
Obligatory CommitStrip: The price of backups[^]
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Engineering World - YouTube[^]
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Very cool! Thanks for posting!
|
|
|
|
|
WebMSX[^]
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
I crashed it.
10 print "Hello"
20 goto 10
run
Had to power off to restart it!
|
|
|
|
|
Marc Clifton wrote: 10 print "Hello"
20 goto 10
run
This reminds me of the abuse that my classmates & I heaped upon a sperge in our high school comp sci class (BASIC) back in the TRS-80 days. He would ask why he was having problems, and we'd tell him to add this line:
5 NEW
|
|
|
|
|
I was looking for a way to mimic network latency on android and came across this response on stack overflow. This made me laugh.
http://i65.tinypic.com/2i7o0mg.jpg[^]
Poor soul lost his iPhone to the experiment !
Zen and the art of software maintenance : rm -rf *
Maths is like love : a simple idea but it can get complicated.
|
|
|
|
|
Typical iPhone user At least they have an excuse to get the latest version now
|
|
|
|
|
virang_21 wrote: Poor soul
No. No sympathy. None.
|
|
|
|
|
I've seen that before...but still very funny!
"Go forth into the source" - Neal Morse
|
|
|
|
|
Languages like C# have enough built in exception types to handle most situations. But you can also create your own. Do you use custom exceptions? If so, what strategies do you use to determine when to use them and how they look?
Edit - By how they look, I mean do you keep them basic and mostly use message , or do you do things like populate data ?
modified 1-Jun-18 15:51pm.
|
|
|
|
|
Yes. But not frequently.
I don't know what you mean by "how they look".
|
|
|
|
|
Mostly, I limit myself to creating custom exceptions for class libraries. Some of the circumstances in which I find them useful...
1) Allow the consumer to easily differentiate and catch my exception.
2) Share additional information with the consumer, usually via properties, without forcing them to de-serialize the message text.
3) The occasional instance when the built-in exceptions don't fit.
Not sure what you mean by "how they look".
|
|
|
|
|
Generally I only do it to differentiate problems my code detects from those the framework does. So if a file doesn't exist, that's not something I have control over - but if there is a problem with data I'm processing directly, the that's a custom exception candidate so it can be trapped as an exception class rather than as part of a generic framework exception group.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
RandyBuchholz wrote: Do you use custom exceptions? Yes, for situations specific to the business domain of my APIs. I use standard exceptions like ArgumentNullException where necessary, and business specific exceptions like ObjectNotFoundException and NoPrivilegeException in other cases.
RandyBuchholz wrote: do you keep them basic Yes, almost always.
/ravi
|
|
|
|
|
RandyBuchholz wrote: By how they look, I mean do you keep them basic and mostly use message , or do you do things like populate data ?
What OG said. I never populate the exception with data - if useful data is associated with an exception, it gets written out to an error file / table / email / other logging mechanism, by the handler of the exception, never the invoker.
|
|
|
|
|
For me, the occasional exception to this rule is a class library for common consumption. As an example, I've had a case where I had an (uncommon) field-level aware consumer. Sharing the name of the offending field, had benefit to the consumer, but no (obvious) benefit to the provider / consumed resource.
Other than this edge case, I agree completely with your assertion.
|
|
|
|
|
I'm of the opinion that a library should add as few dependencies as possible.
So I'd rather populate the Data property of the exception and send it upwards to a higher level and have it logged there.
|
|
|
|
|
Few years back (back in the days of fulltime) I've saw cases where underling juniors too smart for their own good used 'custom exceptions' to achieve [and attempt to hide] GOTO-out-of-a-loop.
When confronted, 'where I have goto? you see I doing very properly one.'
(It's one of the reasons I avoid public domain source code repositories where anyone can contribute, too many juniors showing off their skills in little known facets of the language often end up producing crap, the above being a regular common example of such.)
This internet thing is amazing! Letting people use it: worst idea ever!
|
|
|
|
|
Add Custom Data to Exceptions -- Visual Studio Magazine[^]
I prefer to fill the data over adding extra logging-statements.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I do create custom exceptions with data, and use them to log whenever they triggered...
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018
|
|
|
|
|
OK just took a call from yet another scammer trying to sell me bogus health insurance. For reasons I cannot explain, I decided to pretend to be French (this only works if the caller doesn't know French). He finally grew frustrated and asked me to be patient and said he was trying to find someone who knew "my" language (I dunno French either - I was just gleefully babbling away). At this point I asked him how it felt to have someone waste his time with a bunch of phony BS the way he was wasting mine. His response, while not fit to post here, was epic. I am definitely gonna do this again.
Sometimes the true reward for completing a task is not the money, but instead the satisfaction of a job well done. But it's usually the money.
|
|
|
|
|
It is sometimes such a wonderful game which I'm doing also when I am in a good mood
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|