- 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
Admin
Wow.
Reminds me of the fresh out of school Uber .NET programmer we hired.
Admin
Would the & at the end of the first mysql command cause exec to launch as a background task?
Nice race condition...
I also thought that WTF policy was not to bash newbie code? I would count a summer intern as a newb.
Admin
Shhhh. It's a new kind of WTF where they see how many devs will pick on beginners. Looks like you're number one.
Admin
So... the kid wrote a stand alone PHP script to import users back into the database they came from? His lack of programming skills are the least of his problems, he seems to be missing a basic grasp of the task he was asked to perform. I would suggest that this isn't a WTF because it's not nice to pick on the handicapped.
Admin
Admin
Admin
There's probably a hundred different ways he could optimize this sucker, and it'd still be wrong.
Admin
My guess is this may have something to do with it: "several years in a well-known computer science program ... He did have a 3.9 average after all."
Admin
So TRWTF is that he didn't do a if (Bool.FILE_NOT_FOUND)?
Admin
Never trust the guys with a 3.9 average, especially the ones who self-confidently claim that this is proof they know what they're doing. More often than not, their 3.9 average only means they're A-type personalities, not actually skilled programmers.
Admin
'newb' is 'newb' no matter what the educational background is.
Admin
Admin
TRWTF is that this isn't at all surprising. You'd think college professors would think of "write code that doesn't suck!" as a concept they should teach, but nooooooo.
Admin
Admin
Also, wie soll ich dann arbeit finden? Man findet "uber" uberall! (umlaut, andererseits, finde ich nicht - verdammte work machine...)
Admin
//Open 26 comments to post to
Admin
What language is this? It's not PHP.
Admin
this is exactly why I never went to college, and yet for some reason I'm sought after more than programmers of equivalent experience to me who did.
Admin
Admin
OK, so maybe it's a newb error and not really a completely fair WTF, but... it starts out kind of OK. You can see that, yes, he's going to query for each locale, OK I guess this makes a kind of sense. And then we open a file for each, um, wait a minute, uh...
The slowly growing horror as you progress through the code is what makes this priceless.
Admin
I would never hire a Dead Kennedys fan either.
Admin
If Stephen doesn't know how to guide an intern to a better solution, maybe he should stop working with interns.
Admin
Reading thru this code was like watching the original Terminator... just when you think things are as bad as they can possibly get, they get worse! This is the first WTF in a while that actually made me say "No!" ... "He didn't" ... "What???!!" ... "Ohmygod"
Oh, and it's not PHP. It's VB. Must be. Amirite guys?
Admin
TRWTF is Stephen's lack of management and/or teamwork skills. He should have taken the time to step Nathan through how to do it correctly after the task took too long. Stephen sounds like an elitist prick who can't communicate. I wouldn't want to work with or for him.
Admin
Yeah I'm going to cry foal on this one. A junior in college and he's being blasted on this site? I'm fresh out of college and the 'old guard' is getting on my nerves with all the high and mighty attitude.
You were perfect when you started working? That's what internships are for.
Admin
#1 - I started as an intern - fresh out of high school (in 1977 having a few years of programming experience at the age of 17 on ini-computers was extremely rare.
#2 - I have encouraged every company I have been involved with (and as the owner of a consulting firm, that is quite a few) to setup an internship.
With those disclaimers out of the way.....
If there is a problem with anything (well at least in the technical realm) that the intern does, it is the responsibility of the person acting as the mentor.
Remember the purpose of an internship is to provide on the job experience and training. If any actual work gets done by the intern, then that is a bonus.
The TRWTF here is someone who is not working with the intern, looking at their approach and progress and providing guidance at least 2 or 3 times a day.
Admin
correction: foul, !foal
Admin
Admin
He was a 3.9 GPA student.
MArk B.
Admin
So for japanese (where none of the words start with a, b, c, etc., everything would be written to the same file (handleZ)?
Also, what's the point of multiple files, why not sort the original file with the same sort command?
Admin
Admin
Admin
I've had several interns myself over the years, I can say that they never get work that the company needs, its usually a small laundry list of things "that would be nice to do if I had the time" I start them off with the easiest one on the list and give them space. This is only to begin, I want to see how they approach a task. The tasks are well defined and sufficiently small to grasp the entire process. That said more times than not I'm ridiculously dissapointed. I once had a young woman who was 2 weeks from finishing a masters in comp sci and she couldn't write a basic sql query, didn't have any concept of actually putting together code practically and expected we'd hire her for 100k when the internship was over.
Back to the point, if they do an awful job that's fine they are interns, but I think there is a more important observation. You don't have to have any programming skill to see a problem, evaluate possible solutions, then select a reasonable approach. Especially when someone gives you a list of important things to keep in mind (eg order by) So the wtf is not the code but the failure to listen and select a better approach.
my 2c
Admin
Admin
'ü' is Alt + 0252 in most machines.
Admin
Because that would take too long! ;-)
Admin
Eh.
It's still student code, no matter how misguided or pompous.
That's why there are internships, among more legitimate reasons- To knock the wind out of their sails. That way, Mr. 3.9 GPA knows he isn't the ace he thought he was with his wtf code before going into the world.
Admin
On the contrary, he should work more with interns in order to learn how to guide them better next time. What he should do, though, is find someone who knows how to and learn from him.
Admin
Since I'm not a programmer I often don't completely get the WTF of CodeSODs. In this case however, given the nature of the problem, as soon as I saw "mkdir" I knew that the "solution" was going to be really, really bad.
Admin
I wonder what he has in store for $handleЧ
Admin
Most Windows machines, you mean. Damned work computer.
Admin
And you would be right, if the issue was the code.
Nobody is complaining about the code here, we all have been newbies and know that programming isn't easy at all. It is expected bad code from students and also from seasoned programmers, from time to time (although not as bad as the code featured in this site.) Somebody else asked if you "were" perfect as an intern. Well, after some years I'm still not perfect at all, and I have the feeling that I never will...
What I also expect from students, though, is the ability and the willingness to listen and learn from more experienced professionals, instead of always doing "their way" alluding to a number that have nothing to do with experience. That is the other half of an internship's purpose. In this case, we have a clear WTF example of such an attitude, not (just) the code.
Admin
Steven: Bossman, this kid can't code worth anything! Steven's boss: And who is his mentor again?
Admin
Admin
The difference? My solutions weren't so bad that they ended up here.
Admin
"Several weeks later, despite Stephen’s best efforts, Nathan was still working on Stephen's requested improvements, his way"
To abuse a cliche, TRWTF. Not the clueless noob's inability- everyone starts somewhere. It's the clueless noob's assumption that he has nothing to learn.
Admin
TRWTF-TM is the behaviour to data of customers?
"We have millions of users, but the search engines don't know that. We show just enough information about each user publicly so that when you Google for this person, you can find their profile on our site. For this to be truly effective, however, we need a user directory the search engines can crawl."
oh wait this is facebook?
Admin
I'm going to cry "foal", but that's only because I'm a little horse. Rimshot
Admin
How the heck is the mommy unicorn still alive after birthing that thing?