|
Single letter names are ok if the scope of the variable fits in a few lines, so that you can see the definition along with all the uses. Iterators are (usually) an example of this rule. For people who have been programming long enough, i,j, and k naturally name the first, second, and third array dimensions. It's an ancient FORTRAN thing that lives on in the modern world, the way foo, bar, and blah from LISP 1.5 do).
Like all coding rules, this one has to be used with judgement. If using single-letter variable names is the alternative to 150-character long statements, which adds the most complexity.
|
|
|
|
|
BBC Report[^]
Anyone else suspect he just wanted to find out what it was like to have a bee sting his penis and was surprised as anyone when he got funding for it.
Quote: Another recipient, Michael Smith from Cornell University, ranked the pain of bee stings on different parts of the body, by orchestrating repeated stings to the four corners of his own anatomy. These ranged from the skull, the middle toe and the upper arm (at the less painful end) to the penis shaft, the upper lip and the nostril.
Wonderful, just wonderful.
Quote: Dr Rodrigo Vasquez, from the University of Chile, received the biology Ig Nobel for the crucial observation that if you raise a chicken with a weighted, artificial tail stuck to its backside, it will walk like a dinosaur.
I particularly like this one.
Quote: Diagnostic medicine - Diallah Karim (Stoke Mandeville Hospital, UK) and colleagues, for determining that acute appendicitis can be accurately diagnosed by the amount of pain evident when the patient is driven over speed bumps.
When I had appendicitis it was pushing a supermarket trolley that caused me incredible pain, led me to look up my symptoms (not usually a sensible thing to do) and take myself off to the hospital that night. If it hadn't been for the shopping I'd probably have sat on it for a while. Cannot remember crossing speed bumps now, but do remember that the position of sitting in the car (I drive with the seat leaning further back than most) was very comfortable. When I reported to Minor Injuries they decided that I needed to go to a proper hospital and offered to let me drive myself or go by ambulance. I decided to drive myself in case I got discharged (this was about 1 in the morning by now IIRC). Unfortunately what I was going to do about my car which would become illegally parked the following morning after I got admitted didn't cross my mind.
Some men are born mediocre, some men achieve mediocrity, and some men have mediocrity thrust upon them.
|
|
|
|
|
chriselst wrote: Anyone else suspect he just wanted to find out what it was like to have a bee sting his penis was down the pub when he came up with the research plan and was surprised as anyone horrified when he got funding for it.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
chriselst wrote: by orchestrating repeated stings to the four corners of his own anatomy. These ranged from the skull, the middle toe and the upper arm (at the less painful end) to the penis shaft, the upper lip and the nostril.
I don't know about the rest of you guys, but my reproductive gear isn't on one of the "four corners of my body"..
Incidentally, I've been stung inside the lower lip by a wasp (multiple times, by the same angry wasp) when it flew into my mouth by accident as I was walking down the street. Also inside my ear too when I was a kid. Neither incidents were pleasant
chriselst wrote: When I had appendicitis it was pushing a supermarket trolley that caused me incredible pain, led me to look up my symptoms (not usually a sensible thing to do) and take myself off to the hospital that night. If it hadn't been for the shopping I'd probably have sat on it for a while.
Another mutant like the guy with the penis on the corner of his body?
How do you know so much about swallows? Well, you have to know these things when you're a king, you know.
modified 31-Aug-21 21:01pm.
|
|
|
|
|
I had a wasp go down the front of my t-shirt whilst I was cycling, that was fun. Got stung in the neck whilst umpiring at square leg. Quite a few others over the years, but nothing too traumatic.
A couple of months ago I was clearing a new allotment plot when I dug out a a clump of grass, dragged it out, felt my lower leg sting, thought I hadn't noticed any nettles, looked down, saw about a dozen wasps on and around my leg, ran for it. I'd disturbed a wasps nest.
Many, many years ago (I think I've told this story her before) there was a chat taking place where I worked between a few of us and a Dutch fella who had come over to do some work with us. The Dutch fella had just finished telling how he was allergic to bee stings and should he be stung we have to get him to a hospital when a bee alighted on the arm of one of the other lads. He absent mindedly flicked it, straight at the Dutch fella, where it promptly stung him and we rushed him off to hospital.
Some men are born mediocre, some men achieve mediocrity, and some men have mediocrity thrust upon them.
|
|
|
|
|
Quote: Economics - The Bangkok Metropolitan Police (Thailand) for offering to pay policemen extra cash if the policemen refuse to take bribes.
Genius!
|
|
|
|
|
For a couple of years I've used an Excel spreadsheet to do some daily data analysis, and its' worked well.
It gets a couples of values every morning which I manually enter from some equipment and it works out the delta, average, and 10 & 30 day moving averages for me for each bit.
But...it's getting a bit unwieldy, and it'd be nice to have graphs, and automate the data entry. So I knocked up a quick C# program that uses SQL Server as the backing store, and which does it all for me based on that, and I'm running them in parallel to make sure it all works.
And I've noticed that while the Delta, Average, and 10 day moving average are as close as possible given that the readings are slightly different (because they aren't taken at exactly the same time and the new system uses integer maths and the spreadsheet uses floating point / rounding) the 30day moving average is miles out. So I'm digging through my code, adding things up with a calculator, and nothing makes much sense.
Until I realise the Excel formula is using 29 days data and dividing by 30...and has been doing that for 3 years
Don't you hate it when that happens?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: and has been doing that for 3 years
In my place, I would have had to start looking out for other career opportunities.
|
|
|
|
|
In my place he'd get promoted
How do you know so much about swallows? Well, you have to know these things when you're a king, you know.
modified 31-Aug-21 21:01pm.
|
|
|
|
|
Brent Jenkins wrote: In my place he'd get promoted
Can I send you my resume?
|
|
|
|
|
The same here.
|
|
|
|
|
No, I actually don't care (when it happens to you)
However that prove two facts:
1. Independent testing works very well.
2. The 'moving average' of whatever physical quantity you are measuring isn't that important.
|
|
|
|
|
CPallini wrote: The 'moving average' of whatever physical quantity you are measuring isn't that important.
No, it's only an indicator, used to "smooth out" the daily deltas and provide a "rough guess" of future values.
But it's damn annoying to have it be wrong for so long and not notice...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
You have to be positive and see the bright side of it, you know, every leap years, at February...
By the way, I know a guy who made a mistake in the computation of human sera dilution in the program controlling an electromedical device...
|
|
|
|
|
Seen it, done it.
One favourite was a statutory pension calculation and having a right old barney with the client. They were convinced our numbers were too low and, should any member have a low pension the statutory part should have caused it to be higher and they would be breaking the law if they didn't meet the statutory component.
After several test cases with real data, I found the problem. They had been rounding the wrong way. For years! In some cases they had even been over paying pensions.
veni bibi saltavi
|
|
|
|
|
I have had similar experiences where data has been checked by three people and none of them spotted the incorrect population of data. We ended up sending out 30,000 emails to largely the wrong people.
In the case mentioned above it was because when you sort a dataset within SAS the sorting is lost as soon as that dataset is used within a SQL statement. So our data looked good on the sort, however as the sort was lost when that dataset was subsequently queried nobody spotted it.
It happens to everyone given time
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
OriginalGriff wrote: Until I realise the Excel formula is using 29 days data and dividing by 30...and has been doing that for 3 years Your whole life was a lie!
|
|
|
|
|
I thought that was the cake?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
That would be convenient as there is no spoon to eat the cake with
|
|
|
|
|
OriginalGriff wrote: Excel formula is using 29 days data and dividing by 30...and has been doing that for 3 years
So you could have been a trillionaire, but now you just get by?
|
|
|
|
|
Out of curiosity, why do you have the number of days hard-coded? Excel can easily determine the number of days in a range.
|
|
|
|
|
Well, that's just silly talk!
|
|
|
|
|
Gets the cake from honoured leader [6]
What process is used in making cake?
veni bibi saltavi
modified 18-Sep-15 6:31am.
|
|
|
|
|
I would say "REDLEA" but is that a cake?
I do know that's a chicken shop.
I ain't got no signature.
|
|
|
|
|
No, that isn't right, you got one white peg though
veni bibi saltavi
|
|
|
|