- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Jokes should go to production systems, all our systems have asr-manpages.
Admin
A Linux Users group used to maintain a gravity forecast website, which is now sadly maintained by archive.org:
http://web.archive.org/web/20030802144823/http://www.ae.msstate.edu/gforecast/
How will I know what tomorrow's gravity will be now?
(I always thought that it was funny how they specified, 9.81 m/s/s DOWN)
Admin
One of the cost for a pipeline CPU is that instructions that follow a break in the instruction stream are partially execute. This means that the CPU has to use some time and effort to undo the effects of instructions which followed a call or branch.
But since this cost is usually less than the gain added by using a pipeline archecture, its usually a win. This is true even without the branch prediction or other software or hardware fancy footwork. Of course, this equation goes horrobly wrong as the nubmer of calls or branches increase.
Admin
Reminds me of an old joke from Usenet:
HALT NOP ; skid pad for pipelined processor NOP NOP NOP
Admin
The comment is wrong. It's stripping out the bold tag.
Admin
bonus points for anyone who knows which piece of open source code he's referenced in!
Admin
Admin
If anyone doesn't understand why you'd want to use a constant (probably better than a function) for Newton instead of magic numbers everywhere, I'd like to have a look at their code. I'll bet there's a lot of fodder in there for this site.
Admin
One of the best Code WTFs compilations in a long time! Reminds of the original posts back in the day.
Admin
You're misreading the function declaration there.
It's clearly "De un- code:"
Admin
It seems to me that the newton function could have been added with a simple return value more as a stub for testing, at which point you could return to it later and add the code for elevation, lunar cycle, etc as you saw fit.
Admin
The Exit For is actually 100% correct and Best Practice. Otherwise, the loop has to iterate through the rest of the collection even though it already has the value it wants. It will make the code "rush" if that's what you want to call it.
Then again, it's VB, so the Exit For probably uses as many cycles as the iteration does.
Admin
Your ideas intrigue me. I would like to subscribe to your newsletter.
Admin
There, I fixed strong for you.
Admin
You sure about that?
XD
Admin
There is no such thing as an italics tag. There is an tag, which defines: "a span of text in an alternate voice or mood, or otherwise offset from the normal prose, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, a ship name, or some other prose whose typical typographic presentation is italicized."
Perhaps the subtmitter should learn the difference between content and styling before mocking the front end developer.
Admin
I prefer
#define THE_LONELIEST_NUMBER 1 #define THE_LONELIEST_NUMBER_SINCE_THE_NUMBER_ONE 2
Admin
public long getLength() { Random r = new Random(long PieceOfString); return r.NextLong; }
… wouldn't it?
I particularly love the fact that this function has no parameters. Proper WTFery!
Admin
If (as I suspect) the original was VB/VBA/VBS, that should actually read:
' Fixed for naming and precision and efficiency Public Global Const kgf = 9.80665
// is not a comment indicator in VB and its spawn. ;)
Admin
Admin
Admin
Yours truly wrote a simplistic interface to vacuum data from these devices and likewise send data to them using an serial port (stop giggling: this was MANY years ago). I named the software PUSS (PCT Upload/download Software System).
A few days later, a normally sedate colleague approached my cubicle in a furious temper. "You btd!" he said—which was truly shocking language for this guy. "Uh … what's the problem?" I stammered. "I've just had to do a presentation to senior management about the PUSS-LIPS interface!!!" he roared.
My protestations that I genuinely hadn't foreseen nor intended that did little to placate him.
The annoying thing was that I genuinely hadn't foreseen nor intended that! To be fair, I had already been "asked" to change the name of little bit of software: it was originally called Cash Register Async Program, which "management" objected to; but they were okay with PUSS.
Admin
Admin
Indeed, it does not. Imagine that.
http://en.wikipedia.org/wiki/Special:Search?search=gullable&go=Go
Admin
Why are there so many asshats on this forum?
Admin
This is not a forum. This is a comments section, which is a notorious asshat magnet (...one of us...).
Admin
I look forward to seeing 'optimusPrime.transform(...)'
Admin
Damn you! I compiled and ran your code and my PC transformed and tried to kill me :(
Admin
If you look into it a little, you'll learn that black American dialect grew from the nonstandard English dialects spoken by the people who settled the southern states. Your "correct" form is just the standard dialect, i.e. the dialect that happens to be spoken by the people who happened to become the most influential.
The dialect used depends on context. So if a black man was drafting legislation or lecturing at Harvard, he'd correctly use "ask". If he instead said to you,"I aksed you already, get me some fries with that", he'd also be correct.
Admin
Make more sense now?
Admin
Be glad you don't work around here. You would only be promoting their use.
Admin
Crap, I think this is mine:
Transformer optimusPrime = new Transformer();
Admin
Besides, it's not like the users are ever going to see the source code anyway.
Admin
That's because it's in teh wiktionary... fools
Admin
(Look it up, I'm too lazy to explain it for you.)
Not valetudo again...
Admin
-- Another note from Alex: I am totally gay, i seriously love the cock.
Note from Bonghit: Threatening anyone that disagrees with you, with comment deletion, is prick behaviour. Deleting non spam comments is prick behaviour. No one likes a prick.
incassum - incase you are unsure, just say "ummmmm".
Admin
Um - according to that utterly authentic looking note, Alex does. Also, it's merely your obvious homophobia that's making an issue of it at all :-)
While I do see your point though, I'd like to state in Alex's defence that personally I prefer not having to skip through 25 nitpicks lamenting obvious errors in the article submission, especially when I can no longer see what those errors were.
Admin
You're a decepticon?
Admin
It's quadruple meta.
And don't call me Strangly.
Admin
public constant Newton = 9.81 ?????
Admin
Admin
NOT just Latitude, there are also many areas where there are "anomolies". A few (26) years ago I developed a submarine system that calculated depth. It needed to be EXTREMELY accurate (especially at shallow depths becuase of the periscope). Water Pressure was the primary input, but an accelerometer was also a big part of the equation. This had to be "nulled out" as the submarine traveled.
Admin
So what if he needed an amberlampse?
Admin
Admin
Actually, it's a function of the distance between the centers of mass. Up in a plane, up a mountain, or just a modern building, (or down a mine) have a non negligible effect.
(defun g (r) (/ (* G earth-mass) r r)) G --> 6.672e-11 earth-mass --> 5.9736e+24 (g earth-radius-mean) --> 9.819219440743515 (g earth-radius-polar) --> 9.863137339893514 (g earth-radius-equatorial) --> 9.797370409088225
;; Eiffel Tower; (- (g (+ earth-radius-mean 324)) (g earth-radius-mean)) --> -0.0009986452443744298
;; Freedom Tower: (- (g (+ earth-radius-mean (* 1776 (* 0.0254 12)))) (g earth-radius-mean)) --> -0.0016684067266901081
;; A320-200 from Valencia to Paris (- (g (+ earth-radius-mean (* 32000 (* 0.0254 12)))) (g earth-radius-mean)) --> -0.029996312593159047
Admin
optimusPrime.transform(); optimusPrime.rollOut();
Admin
Huh, it even does deployment too!
Admin
The partial work is easy to throw away, just zero all the pipeline registers (and flash copy the rename table). What's a lot harder is to emulate a one (or two!) cycle branch delay slot, when the real delay is something different.
Also, unconditional branches (including call and return) can often be predicted at 100% (returns will require a return address stack predictor). They cause a break in the current cycle's instruction decoding, but instruction decode is usually well ahead of execute anyway...
TL;DR - write your code however you want. The CPU will make it fast.
Admin
Because you people multiply like rabbits.
Admin
Either the provided sample code is wrong, or that whole function is equivalent to
If the function is called "GetItemFromValue", shouldn't it return the item?