- 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
Foo or foo not, there is no try.
Admin
To foo or not to foo, that is the code
Admin
Damn it, that was the joke I was going to make.
Admin
snoofle, why did you put "so-called" before "professionals"?
I always believed that "professional" actually implied "business".
Btw, isn't that snippet of code the standard way of handling Boolean values of FILE_NOT_FOUND?
Admin
If there is no try, there is no catch, either.
Admin
'professional' does not say anything about skills - only about self confidence
Admin
@Reader Those who are experts are not always professionals, and those who are professionals are not always experts.
Admin
Or just someone payed (or getting bonuses) by the line. Or someone who doesn't want to do real work while giving the impression to have done something.
Admin
Professional simply means "Paid to do it"
Admin
"Being a professional means going in and doing a good job, even when you don't feel like it." - Sammy Davis Jr.
Admin
DH is lucky he found out as an intern; i had to learn after i got into the real world.
Admin
"When you get your first pay check at your first real job and discover that the government gets the first bite, you get a little disenchanted as you grow up."
First bite? More like they shove their grubby hands into your bag, eat half your burger, shove a handful of fries into their mouth, slurp down your soda with plenty of backwash, then hand it back to you and say "here, I'm finished."
Admin
Sure, but it feels a lot less bad when the government says in the end "Here, I'm finished. Oh, and here's your mom's $1500 a shot cancer medicine, it's on me."
Of course I may live in the only country in the world where that happens. If so, yay me!
Admin
"Oh, and by the way, have some free roads, police, fire protection, schooling, and garbage collection."
Admin
Exactly. You have a profession. You might be good at it or not so good but you get paid for doing it. You might even have an education for it. Still does not mean you are good at it or even competent. Someone even get a certificates. Still does not mean you are competent!
Admin
Where I used to work we'd always have to argue about what combination of columns would make a row unique to a table because the powers that be hated the idea of "just making up a number that doesn't mean anything". There was no convincing them that having 5 columns from table A acting as the foreign key in table B is terrible, or that they work with these "made up numbers" all the time, they're just used to those. (Order numbers, for example).
Admin
If foo is a real type (such as double or float), IIRC, NaN is an interesting value when coming to evaluate foo || !foo
Admin
Just in case you want your program to crash on some alien boolean FileNotFound type but are worried that it might evaluate foo||!foo to false and skip all the "important" code instead.
Admin
I'm a guy who's attracted to gals, so I'm in the majority in this industry...but I can still recognize that:
"When you realize that the prettiest members of the opposite sex aren't always as nice and sweet as you might fantasize, you face a reality of life and grow up."
does not reflect the diversity of my co-workers and can be off-putting in a way that was likely not intended.
Admin
You know I can see why he was disillusioned, the code is obviously insufficient:
try if (foo||!foo) { // code else { // same code } catch { //third verse same as the first }
Admin
This didn't make me go WTF - this made me throw up in my mouth a little
Admin
Get even with the person who demanded those four radio buttons. Link all of them to a random number generator.
Admin
And that's just the start. After you pay your fed & state income tax, medicare, disability, and social security taxes, then when you spend your already-taxed dollars you get to pay gasoline taxes at the pump, sales taxes at the stores and property taxes on your home.
And then maybe you have some left to buy food and electricity.
Pre-emptive snarky comment: 1st World Problems.
Admin
It's impossible to write anything of substance without offending some group. Actually, it's hard enough to successfully target your writing to even half of a general audience.
Admin
I'm offended by your use of the word "impossible." signed, God
Admin
At least everywhere EXCEPT the United States, you get something for the money you put in.
Here, we're so afraid of "government control" that we pay as much as everyone else, but get no healthcare, etc.
Admin
"When you get your first pay check at your first real job and discover that the government gets the first bite, you get a little disenchanted as you grow up." I see this trope a lot in US TV and movies, and I have to ask; do US schools not teach about the concept of taxes? How do people become old enough to have a job but not know that some of their income is going to be taxed?
Admin
so-called "professional"? Oh gods, every time I see code from someone who claims they are "professional" I see stuff that makes the quoted example look clean and wonderful. Can you imagine something that would qualify as bad fortran, but written in C++.
But apparently it is professional to write unmaintainable code that breaks horribly but utterly silently if the undocumented assumptions it makes aren't met.
Admin
You're wrong. About the snarky comment, I mean.
I live in a third-world country and taxes are an even worse problem here. In fact, that is more of a problem to poorer countries because: a) lower-income people are more severely affected by taxes, even if they pay less; and b) the poorer the country, the higher is its corruption. Which leads to money not always being enough, which leads to the brillant idea from government to raise taxes instead of fighting corruption. That's not to say the 1st world doesn't have to deal with corruption, it's just at a lower level. This is a subject my country's politicians know like no other. Thankfully I'm seeing things starting to change due to social unrest.
Admin
I could swear I had a few line feeds placed here and there. Oh well...
Admin
Yes, management can get its hands into EVERYTHING. In my case, I thought that a good idea for the version output was to make it a date associated with the last edit, in nice simple terms. So if today were the last edit, the version would be "Jun_15_2016". Of course this made all sorts of sense. No, the manager wanted a NUMBER no matter how obscure, so I decided to make up a proper number. Plug the date into the routine that gives you seconds from the epoch, advance to NOON (GMT), and lop off 4 digits. This would give a number that when 4 zeros were added back would give a proper date. So the version NUMBER became 146599, which will work nicely for input to the date command after you add the proper number of zeros back in, even with the display being in the pacific time zone in most cases.
Problem "solved"!!
Admin
Nothing is free!
Admin
The trick is to get someone else to pay for it.
Admin
It's funny that you bring that up, because I did almost break out the editorial hat and modify that line, but I decided to let it pass.
Admin
[YY]YYMMDD not a good enough number for you?
Admin
Now I'm confused. Was that a pretty one or a sweet one?
Admin
"if (foo || !foo) { /Code/ } else { /same code as above/ }"
Someone wanted the same result for #define foo 3,14159 as for #define foo 3.14159
Admin
The WTF would be passing a floating point number to a boolean expression. Passing integers is bad enough.
Loss of innocence is when you realize that the people behind PHP thought that the string variable "0.00" is empty.
if (empty("")) { true; } if (empty(0.0)) { true; } if (empty("0.0")) { ... also true; // WTF! }
Admin
I must admit I thought exactly the same when I read that. Self fulfilling audience assumptions?
Admin
class FooClass { operator bool const { return ((double) rand() / RAND_MAX > 0.5) }; bool operator! () const { return ((double) rand() / RAND_MAX > 0.5) }; }
FooClass foo;
if (foo || !foo) // that is the question
Admin
If you ever deploy
FooClass
in production code, I'll be there, digging your endocrine glands out with a rusty screwdriver.Admin
As you seem to have recognized it was likely not intended. Going out of one's way to be offended is not something others should avoid. Professional offendees are off-putting in a way that is certainly intended.
Admin
I don't think it is the fact that taxes have to be paid, it's more that you don't fully appreciate exactly how much the actual real world value of 21% here and 20% there actually add up to. I am most definitely an adult (and have been for many years, in a legal sense anyway) and I am still surprised/disappointed at this.
Admin
Why is it OK to express 'oh well' over popular adulthood epiphanies re: Santa, the Easter bunny, and government, but not a certain opposite sex? Oh noes, someone better put snoofle on the offender's list, smh.
Admin
Seriously dude? Who cares? Damned political correctness...get a life.
Admin
I've linked to this before, but it's useful again now: http://www.xkcd.com/438/
People say things for reasons. Bob makes a good point: if we don't want IT to continue being a sausage fest, then we need to make sure women feel comfortable in the industry, and language makes a difference. Sticks and stones can break bones, but words can break spirits, even strong ones. And in the long run that doesn't benefit anyone.
Admin
Yo, dickwad, he meant gay people. I mean, the same argument applies, but you could have paid enough attention to make it correctly.
Admin
Patronize much? I'm not going to bend over backwards so someone can "feel welcome". I trust that my coworkers can engage in conversation without bursting into tears because someone uttered something uncomfortable but true.
Admin
Amongst all these comments about the "gubmint", or white-knighting for women/gays, I find it amazing no one complains about how the articles claims repeated instances of management stupidity, but doesn't provide concrete evidence for a single one.
"only select one out of several radio buttons on screen" -- if the UI designer used radio buttons where it should have been checkboxes, that's not management being stupid.
"Would you like to review your answers?" Yes, No, followed by two buttons: "Review" and "Continue" -- this is an atrocious UI design. Anyone with half a brain (i.e. not the pointy-hairs) should know to present the question unambiguously, so the pointy-hairs can't stack on further layers of stupid.
"3 characters for a promotion code" "surname with a space." "same address, birthdate, and surname" "international phone numbers" "street addresses."
I don't really see how any of these should be "hard problems", but they're all developer-based WTF's unless management somehow pre-emptively micromanaged bad assumptions about phone numbers, street addresses, or UI design -- none of which Snoofle articulates.
"if (FileNotFound || FileFound) /Code/"
I rest my case. The so-called Professionals were all software developers.
Admin
Professor Plum butchered the UI design in the Library with a Knife.