|
den2k88 wrote: but only if the condition of the ternary operator is true.
There's certain elegance to that which I can't help but admire.
Latest Article - A Concise Overview of Threads
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
At least it's all on one line.
|
|
|
|
|
There's a lack of prefix and postfix operators, don't you see that? The code should be corrected to:
something = Anotherthing - ((++condition == 0) ? (assignment_here = object->method()) : --someothervalue);
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!
|
|
|
|
|
There are in other bits of code. This is as of now the single line of code with the most horrors I ever seen.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
|
Well, object->method() could be a recursive call so it's not that bad.
|
|
|
|
|
Kodi is a home theater video/music player. It's available for Windows, Mac, and Linux. It uses a sqllite database to store video file info. I was cruising their wiki, and at the top of the wiki is this statement:
Warning: The databases are critical components of Kodi. We strongly urge that you do not interfere with
them, unless you have knowledge and experience with database designs.
Imediately following this statement are the schemas for the various tables, which includes the following column names:
c00
c01
c02
...
c23
Maybe they should heed their own warning.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Well duh! c for 'collumn'. What else you gonna name them?
|
|
|
|
|
All rows start with an "r"?
I.e. Hungurian notation as suggested by Simonyi done right according to Joel Spolsky?
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!
|
|
|
|
|
So the intersection of a row and a column in a table that uses this naming convention is an "rc", or 'arse"?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
David O'Neil wrote: collumn
Collumn! Collumn! The Master knowsss where the preciousss design is.
GCS d-- s-/++ a- C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Software Zen: delete this;
|
|
|
|
|
Saves them a pain in the I18n.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
#ifdef ERROR
#undef ERROR
#endif
#define ERROR (-1)
#define OK (0)
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL 0
#endif This is in a body of 'C' code I'm stuck with maintaining. This crap was originally written by a Sun UNIX jock who was a zero-order asshat.
Software Zen: delete this;
|
|
|
|
|
Good heavens. That's not only atrocious, it's just plain wrong.
|
|
|
|
|
Yep, I've got over 100 source files chock-full of this kind of stuff. The average identifier length is about 5 characters, and eeeeeverything's global, sports fans! I'd like to kill the mother er who wrote it.
Software Zen: delete this;
|
|
|
|
|
Gary Wheeler wrote: I'd like to kill the mother[mastadon] er who wrote it.
Sounds like you and Marc Clifton need to form a posse and clean house.
|
|
|
|
|
They made a movie[^] about us.
Software Zen: delete this;
|
|
|
|
|
Great movie, one of my favorites actually! You guys were awesome! Very funny.
|
|
|
|
|
I had to deal with some code like that. I compiled all of the global variables into one list and there were over 800 of them. To make matters worse, some functions had local variables of the same name in the same module. Single-letter, global variables were the ones that really, really annoyed me. It gets worse but I'll stop there.
|
|
|
|
|
Maybe you should port it to Excel, since that's obviously what they want.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
|
That's indeed (bool)-1
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 have seen
#define TRUE (1==1) Which is kinda OK
But in the same code there was
#define TRUE (2+2==4)
#define FALSE (2+2=5) Which just goes to show testing wasn't his strong suit.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|