- 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
This is an example of..."You can lead a horse to water, but you can't make him drink."
Admin
Where's my damn article?
Admin
AKA, "crying foal".
Admin
I had an internship working on a multimillion dollar simulation system. I had a mentor that I listened too and peer reviews to help me correct mistakes. The kid's attitude of doing it "his" way is the WTF. In fact, his task was a "simple" one so that he could learn how this company does things, not so he could be the best thing since sliced bread.
No. I was perfect before I started working. Working has destroyed that once perfect innocence, leaving a hardened, jaded professional. ;p
Admin
It is not typical to "not follow instructions." It is far more typical that instructions were not understood, and then you have several follow up one-on-one meetings where you reiterate and clarify the instructions.
Admin
Nathan was keen. He worked on the problem over the weekend. So let's say he was given the assignment on Thursday and came up with that on Monday. Not elegant but it worked.
Seems Stephen's reaction was the problem at this point. The polite way would be "let's arrange a meeting, an hour, or whatever, dedicated to reviewing your solution".
Had Nathan not worked over a weekend I might have arranged this after 2 days to see how he had got on so far.
My guess is that Stephen's reaction was no more than "that's not how you were told to do it" and Nathan got this feeling that Stephen had not even bothered to look properly at his solution and was just rejecting it because it wasn't exactly the way he was asked to do it. Having worked a weekend on it, he had the right at least to know it was being reviewed properly.
Stephen could point to parts at the code and suggest "we could do it this way.." They could then discuss properly and Nathan might actually learn something.
Admin
Admin
Admin
I would consider myself to be at near expert with PHP, although given some of the PHP developers I've encountered I'm not sure if that would mean much to anyone.
A skim through here reveals many apparent problems. Names in a different locale aren't actually supported, Z is going to be huge. Not using native DB libraries (theres at least three for mysql) is a huge wtf. "$conn = get_db_conn();" I can't imagine what that is about. Not using the ORDER BY in SQL. Not using the same loop style for the preg_matches which is technically wrong but bizarre given you would think he knew how to do that. Not using explode for the locales, or a CI COLLATION or extracting from a list somewhere or even at least a group by to get it from users. The biggest thing being the failure again, is the inability to actually use the appropriate alphabet for each locale.
Never-the-less, in my experience I have seen many far far worse PHP programmers.
Admin
And in my skimming I missed the part where he ends up just making a user name table for each locale. Way to fill up the DB with massively duplicated junk. That's pretty bad, but I have still seen worse (from paid programmers, not interns).
Admin
Amen. There's a certain life lesson missed by never having had you ass handed to you by a course. I'd much rather hire someone with a 2.7 GPA.
Admin
In this case, no, not at all. Even without the handful of code WTFs, the code altogether fails to justify its own existence. That's TRWTF.
Admin
Admin
Yes, the code is one massive WTF. So are Nathan's problem-solving skills. TRWTF is that Nathan has a 3.9 GPA and apparently has picked up no programming skill whatsoever in 3 years of college. Yes, problem-solving skills are essential to programming, and some things can't be taught. The issue remains, how the hell did he keep a 3.9 GPA? Did he cheat on every assignment and test? Did he bribe his professors? Yes, it's possible to skate through college and even graduate while doing as little as possible, but no way in hell can you do that and maintain a 3.9 GPA.
The other RWTF is Stephen's handling of the situation. If you got code like that back from an intern, would you let him keep messing with it for several weeks doing it "his way"? Let him try to fix it if he wants. If it's still not improved the next time you check his progress, make him start from scratch and hold his hand. At least give the intern a written spec, he obviously can't remember the spec from a conversation he had once before starting the project.
It sucks to have an intern that needs to be hand-held through everything. Having an internship program is a gamble, just like hiring an employee. Some interns can cut it, some can't program their way out of a paper bag. The nice thing about interns is that you can get rid of the bad ones after a semester.
The bottom line is that an internship is supposed to be a learning experience. Obviously this intern has a lot to learn and Stephen needs to teach him. If the intern doesn't improve his skills after extensive hand-holding, maybe he isn't cut out for programming. If Nathan has an attitude problem and doesn't want to learn, that needs to be reflected in the internship report Stephen most likely has to write.
Admin
question: Do interns write sucky code? fact: ALL interns suck hypothesis: unmanaged interns write sucky code test: give interns projects with no direction/instruction analysis: all the code sucks interpretation: interns write sucky code retest: give interns projects WITH direction/instruction analysis: code no longer sucks (or is less sucky) conclusion: interns may suck, but project leads suck more
Admin
Admin
Admin
How did you get all that out of "Several weeks later, despite Stephen’s best efforts, Nathan was still working on Stephen's requested improvements, his way, and Stephen could hardly wait for the summer to end." We don't know what Stephen did. We know he gave it his best effort (maybe that even included the hand holding people asked for.)
What it comes down to is internships are suppose to teach students how programming is done in the real world, not HOW to program. They should learn that in their years at uni, or own their own.
Admin
If Nathan actually received instructions as they were written here, it's no wonder he produced WTF code. It would have been a favor to the readers to skip the intro and just post the code on the site.
Admin
Admin
Admin
GTK+ supports inputting unicode as a hex value with ctrl+shift+u.
Admin
Interesting...
Admin
Yeah, but that's just so you can fix your shonky code. ;)
Admin
TRWTF is that this will not work on an embedded system with no file system. Amirite?
Admin
Nathan is probably not arrogant, he's just not used to working in a software development company. In college, receiving help from other students on a homework is bad. In the work environment, everyone expects the new guy to constantly ask questions for the first few weeks. Nathan was probably confident, motivated and wanted to do his part without "bothering" anyone.
He thought he knew what he was dealing with because most of it LOOKED like what he had studied in his Computer Science classes: courses are neatly packaged modules of information; real world software is a lot messier: something Nathan's never ever dealt with, unbeknown to him.
That's a classic intern mistake (proof: interns have a bad reputation, they get called arrogant and incompetent all the time). IMHO, Steve sucks more at managing people than Nathan does at coding (which is saying a lot).
I'm sure Nathan is a bright kid - after all, he DOES have a 3.9 GPA at one of the top Comp. Sci programs ;) - he'll understand what attitude he's expected to adopt in a work environment, and maybe after a few days/months/years of experience, he'll write better code. He'll get better and better until he's promoted to manager. He'll make a great manager, since he'll be able to relate when a wide-eyed intern shows up in summer and proudly hands in atrocities similar to those he would hand in as an intern. He won't do the same mistakes Steve did (leave the blissfully ignorant intern alone and let him code garbage till the end of Summer) and will gently push the kid in the right direction. He'll get paid tons of money and will have a lovely wife and kids. Also he'll live happily ever after. THE END
Admin
Although Nathan should have involved Stephen more, listened more, and asked more clarification questions, it's pretty hard for me to rag on his code.
6 months ago, I got my very first ever software development internship, working for the state government. Although I had several years of programming experience at that point (including some freelance professional work of dubious quality), I had very little hands-on experience with databases. While my university offers many classes on relational databases, they come from a VERY, VERY theoretical place. I didn't touch SQL (on paper) until the 7th week of the quarter, or so - on a computer, never. The beginning was entirely relational algebra, relational calculus, etc.
So, the second day on the job, I was given a task that was way outside of my comfort level - by Friday's monthly demo, make sure that a certain webpage can save and pull data to/from the database. This was worrisome because:
a) I had never touched ASP.NET, which we were using for our front end. All I had been asked in the interview was how comfortable I was with VB.NET. This wasn't too bad, since most of the website was designed, and I could copy/paste as necessary.
b) I had never worked with a database on a computer before. Every query I'd ever written had been on paper, and I'd never even approached actually designing the structure of a table to solve business problems.
c) I had 3 days to figure it out.
I ended up implementing the database poorly, to nobody's surprise. While working on it, I was keenly aware that my design was terrible. I tried asking more senior staff members for help, but they were far too busy working on their own pieces for the looming Friday demo. The project manager who oversaw me daily was a non-technical person, so he was unable to help. My hiring manager was extremely busy, and also had no time to work with me. With the exception of the other intern (who didn't know a thing about databases), nobody had time. Had I not been given a task, I probably could have gotten away with not even showing up. The result was that I churned out a webpage that DID save and load...to a 100-something columun-wide database. It was atrocious.
The clients were happy with the demo. All they saw is that the webpage worked. One of the other programmers was furious, however. While upsetting anybody on the first week wasn't good, this guy in particular was not one to cross. For a variety of reasons, he was the Ace Programmer. Ace had management's ear, although he was practically a manager himself - he controlled every project undertaken by the IT department, whether or not he was involved.
Ace didn't have anything to do with our particular project, but when he saw what I had done with the database, he was LIVID. For weeks afterwards, anytime our project was mentioned in a meeting, he would stop the meeting to point out the idiot design by the stupid intern. It took me a very long time to earn the respect of management after that. While I managed to walk away with a good reputation (I was encouraged to apply for a full-time position before it was discovered that a hiring-policy technicality was going to keep me out), this made the job far more difficult and unpleasant than it needed to be.
Moral of the story: I'm not going to laugh at an intern's crappy code.
Moral of the story 2: Normalization is good.
Admin
The number of situations that justify using exec() or eval() can be counted on one hand.
Admin
Sounds like you were spared the hell of getting a full-time job working with an insecure arrogant type who will belittle others at every opportunity at a company where management things that such employees are an asset to their business.
Admin
hmm the RTWF is the approach wont work I work on big scale SEO and what you need hear is a set of xml sitemaps that point at some decent profile pages.
and you would have to have good quality profile pages and do geotargeting either with subdomins or folders.