- 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
If a company wants me to compile code just to see their ad, it doesn't matter whether it works or not; I'm not interested. Just put up a normal ad, and be done with it.
Admin
The thing is, you don't need to compile anything; just read the damn string literals.
Admin
So much this. If you genuinely worry that a slightly light-hearted ad contains source that doesn't compile, you take yourself far too seriously. Adjust your meds and go about your day.
Admin
The most glaring reasons it wont' compile: curly quotes (clearly put in by the typesetter), spaces in the class name (likely also put in by the typesetter), and lack of library Php, which, whatever. The only major error I see is that you can't use Aggregate directly on a string array, it has to be a collection object. Which, meh. Nobody wants to muddy up their advert with a bunch of array operations.
The EA Canada billboard, now, that's super annoying.
Admin
You forgot something:
It's missing a closing parenthesis. And the second half of the ternary operator.
Admin
Admin
But not String []. I stuck it in DotNetFiddle to confirm.
You're right, I forgot I closed that off. That's TRWTF then. I'm inclined to blame long line lengths getting cut off when they set the ad tho.
Admin
Did you add
using System.Linq;
?Admin
No, I'm not actually a C# developer so I didn't know what libraries to add. But I got it 90% there in a few minutes while sipping my morning tea, which makes it Not That Bad IMO.
Admin
Admin
While looking for a half-remembered poorly-written ad like this, I stumbled across one that's actually in PhP:
http://codeinthehole.com/writing/a-pseudo-code-job-advert-and-its-discontents/
Admin
So they see who's knowledgeable enough to nitpick the ad, thus testing their error-finding skills. Brillant!
Admin
On the other hand, the effort of actually making it valid code is so low compared to the rest of the effort/money that went into making those ads that it's mostly just embarrassing that it doesn't work. So why not just do it right(tm)?
Admin
Looks like a poorly modified version of this: http://careers.stackoverflow.com/jobs/47026/criteoseniordevelopercs-senior-software-criteo At least that version looks like it may actually compile and run (NB: not actually a C# dev either)
Admin
Why the hell is the
offerJob
method static? So they can offer me a job while having no actual offices open?Admin
Likely it was originally right, but multiple revisions of copy editor types made it look nicer / cleaner to them but less nice to a compiler.
Admin
WOW.
Yes. That's what they did.
All benefit of the doubt rescinded. They copied that, edited it, left off the bit with Critero's web address (and that's where the other half of the ternary went), didn't apparently realize that php is a different language than c#, and put in typesetting errors like curly quotes.
Great find.
Admin
And in one stroke, the :wtf: factor of the submission has doubled
Admin
I swear we discussed another ad like this before. I thought in the old forums, but haven't been able to find it.
Admin
Like a year ago, and already here:
http://what.thedailywtf.com/uploads/default/_optimized/ab2/140/2a7e08cfc9_666x500.jpg
Admin
The funny thing about the code on billboard is that the else clause will only be executed once in 231 times on average.
Admin
hmm?
unless operator predidence is other than i remember it being wouldn't that be every other time on average?
becomes
right?
Admin
Wait, disregard that. I totally misread the whole expression.
Admin
Right.
Admin
Two possibilities here:
The code is fair warning to any prospective job applicants. They will have no grounds for seeking mental health benefits from the employer when they inevitably go nuts on the job.
The code is an encoded signal for help. HR asked for a "code example" for the website. The poor schmucks trapped in the salt mines concocted this abomination to send a message to the outside in hopes of finding a way out.
Admin
Other things that are wrong: Using Aggregate to ask a series of questions and sum the answer strikes me as trying too hard to make clever use of Linq and ending up with something unnecessarily confusing and complex. Just use a foreach loop instead. If that's the kind of code that they think demonstrates their skills and standards, I'll pass before I have a chance to see what monstrosity they wrote trying to look clever for any task that's actually complex.
On the code not compiling - We usually say that a candidate writing code in an interview that will obviously never compile means that he is unqualified and should not be hired. I would also say that a software company posting a job ad with code that obviously won't compile is a dysfunctional and unprofessional place to work, and no qualified candidate should bother applying.
Admin
Admin
Admin
http://what.thedailywtf.com/t/i-did-the-dumb-coding-challenge-r/48520/156?u=boomzilla
FIGHT FIGHT FIGHT FIGHT
Admin
Came here to say this. Using Aggregate as a for loop is abusing Linq. I wouldn't be surprised if a future incarnation of Linq introduces intermediate result caching and makes this practice dangerous.
Admin
Admin
I'll go for Whitespace
Admin
Ni ce cl ass : class Senior Developer
Admin
I think I understand this--they're writing ads in code because they realize programmers are more likely to read code than a traditional ad.
I also wouldn't be too harsh about the errors here, either--the errors strike me as the result of non-tech people getting their grubby paws on code that did work. It's quite readable as it stands.
Now, using C# to advertize a PHP job is definitely in line with the theme of this board!
Admin
Why? It's well known that PHP coders are bad coders by definition, so why would you want to hire one? You find a good C# developer, train them in PHP, work them until the language destroys their brain then let them go. Easy
Admin
;-)
FTFY
Admin
I don't know why you'd say that PHP coders have destroyed brains.
Filed under: Damn it, BRB, the dragon pig escaped again! Someone hand me my shears and a lollipop!
Admin
Admin
Here's my solution for an job ad:
d991bde5970f7782a2c767c59e399bb3
What? You don't understand md5? You can't work with us :smiling_imp:
Admin
huh.... usually whacking one of those MD5 sums into google will spit out the value that was MD5 summed to get that value.....
not this time it seems. maybe google stopped indexing those rainbow table sites?
Admin
The value is not unique, though. The goal, in this case, is not merely to get a value with that hash, but the specific, original text of the job ad. That's rather a bit harder.
Admin
Anything that appears to be a job ad without random garbage in it is probably the solution then, as the likelihood of two meaningful strings having the same MD5 is pretty low. (Garbage requirements would be different…)
Admin
which is why salting works to improve the security of MD5 (not that you should use MD5 at all anymore. it's too broken use blowfish or SHA512 at the minimum, or even better use an external auth service and let them deal with passwords via OAUTH2 or similar authentication framework)
Admin
Agreed. I know MD5 is considered highly flawed because it's not too hard to find inputs that hash to the same output, but I don't know enough about it to know how hard it is to search the set of matching inputs for a specific one, nor how to go about doing so if it's possible. The best idea I can come up with is a brute force attack — something like seeding a Markov generator with appropriate job ad words and phrases, and hoping that eventually some output hash matches. That could take a long time.
Filed under: I am not a cryptographer, and I don't even play one on TV.
Admin
"Hey guys, we really really need a PHP programmer, this is how badly ..."
Admin
If you want to show someone how badly you need a PHP programmer, just provide a link to your site where everything is the same, but you add
On top of your files.
Then again, that might just scare people off...
Admin
I can comprehend the point of the EA Canada ad: only people who know at least a little something about programming will understand it, and thus they cut out a lot of junk inquiries. But the PHP job ad ... what's the point? The text is plainly visible. Is it just supposed to be cute?
Admin
One should still stick to other hash functions though. :-)
Admin
Eh, it's still fine for verifying file transfers and such. By which I mean for backups and such, not files downloaded off the Internet, because sticking a payload into them is plausible enough.
Admin
I just had a "Be sure to drink your Ovaltine" moment.
F U EA Canada