﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ryan commented on Negative hiring decisions, Part II</title><description>I am absolutely shocked at how many people are defending this code!

This has nothing to do with favoring OO over any other style.

There are two very BLATANT security holes that would be fire-on-the-spot offenses at any software company worth it's weight in rice.

I can deal with the sloppy/n00bish code outside of that, maybe this guy is just out of college or something.  But it's clear he has no idea how dangerous that code would be in production or he would have never even considered sending it in as job application material.</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment74</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment74</guid><pubDate>Thu, 03 Nov 2011 20:42:39 GMT</pubDate></item><item><title>Wyatt Barnett commented on Negative hiring decisions, Part II</title><description>Spotted another good one -- who here writes their queries like "SELECT [DbName].[SchemaName].[TableName] . . . "?

Not I, but MSSql Studio sure does . . .</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment73</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment73</guid><pubDate>Thu, 13 Oct 2011 22:54:53 GMT</pubDate></item><item><title>Tom commented on Negative hiring decisions, Part II</title><description>Bad code.  BAD code.

But you know what?  In an interview, if I had half an hour to solve a specific problem, I might write something as sloppy.  But well-commented, with a great many "this is bad practice, usually I would do X instead for this reason."   

At home, with a reasonable amount of  time?  That's just embarrassing (though I probably still wouldn't bother renaming WebForm2.)  And in production, just inexcusable.  </description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment72</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment72</guid><pubDate>Thu, 13 Oct 2011 16:35:35 GMT</pubDate></item><item><title>Sony Arouje commented on Negative hiring decisions, Part II</title><description>Even if it's a Junior developer, he should be careful about the passing critical data as query string.

Have a look at a code in one of the Microsoft KB article http://support.microsoft.com/kb/308060



</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment71</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment71</guid><pubDate>Thu, 13 Oct 2011 13:29:07 GMT</pubDate></item><item><title>Colin Jack commented on Negative hiring decisions, Part II</title><description>Considering this is a junior candidate is it really classy to post this on the Web?</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment70</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment70</guid><pubDate>Thu, 13 Oct 2011 13:13:48 GMT</pubDate></item><item><title>Blackwasp commented on Negative hiring decisions, Part II</title><description>At least he disposed of the SqlConnection. :)

TBH, I've seen code much worse than this (though this wouldn't be acceptable, of course). I've seen code like this in production too. That said, this guy shouldn't be written off totally. He needs an internship or some serious mentoring before being let loose on a real system but everyone has to start somewhere and learn from their mistakes.</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment69</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment69</guid><pubDate>Thu, 13 Oct 2011 09:28:38 GMT</pubDate></item><item><title>Dan commented on Negative hiring decisions, Part II</title><description>Frighteningly, at my company we have many developers who regularly write code that is just as bad or worse.  A lot of it makes it to production.  This is for financial services of many hedge funds in New York City.</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment68</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment68</guid><pubDate>Wed, 12 Oct 2011 18:50:01 GMT</pubDate></item><item><title>Derik commented on Negative hiring decisions, Part II</title><description>rookiesadvocate - read post by Bob and you'll understand only the k00l kidz are all0wed t0 read this bl0g.  run al0ng n0w because y0u're wasting every0nes time</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment67</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment67</guid><pubDate>Wed, 12 Oct 2011 15:01:05 GMT</pubDate></item><item><title>rookiesadvocate commented on Negative hiring decisions, Part II</title><description>I just wanna point, that not all of the readers of this blog are programming Gods - all knowing creatures that sees everything so obvious, and for them comments like "omg what a noob, teribble etc."  have zero value, and therefore I would like to thank people like Rabo, to actually point what's wrong,</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment66</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment66</guid><pubDate>Wed, 12 Oct 2011 00:52:24 GMT</pubDate></item><item><title>Jeffrey Fritz commented on Negative hiring decisions, Part II</title><description>More interesting than the complete lack of security protocol in the quality of the code that this interviewee has written, is the fact that all of the commenters above me have completely missed the fact that the passwords are stored CLEARTEXT in this sample database.</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment65</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment65</guid><pubDate>Tue, 11 Oct 2011 23:46:33 GMT</pubDate></item><item><title>Jose Gonzalez commented on Negative hiring decisions, Part II</title><description>@Balko
Same. It's not fun maintaining a class with all logic inside a single method...

@Wayne
If a jr dev wrote this, I'd ask him/her why he/she didn't bother naming the variables or if there is anything wrong with the submitted code. I'll proceed depending on his/her response. I guess I'd try to be more fair because I'm still a jr dev for the most part. But Ayende takes no prisoners :)
</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment64</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment64</guid><pubDate>Tue, 11 Oct 2011 20:56:00 GMT</pubDate></item><item><title>Alex commented on Negative hiring decisions, Part II</title><description>Troll anyone?</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment63</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment63</guid><pubDate>Tue, 11 Oct 2011 19:28:35 GMT</pubDate></item><item><title>Wayne commented on Negative hiring decisions, Part II</title><description>I can top that, Balko.  The legacy WebForms code I work with has pretty much everything either in a code behind or lumped into one library file, sometimes with a single code file having multiple classes inside it.  The code uses a mix of Hungarian notation for no reason, returns ints/bools on methods that should be void and throw exceptions on failure, returns raw untyped DataSets instead of objects/collections of objects, and has zero concept of SoC, SOLID or even basic OOP.

There are several classes that do a dozen different things, and to top it off there is one class that has some 6000 lines of static methods and relies on copy/pasted **GOTO** statements (Yes, I said GOTO in C# 3.5).  We are not able to refactor it because everything is so tightly coupled that a simple refactor will probably break most of the code (and there are no unit tests whatsoever).</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment62</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment62</guid><pubDate>Tue, 11 Oct 2011 15:28:57 GMT</pubDate></item><item><title>Balko commented on Negative hiring decisions, Part II</title><description>I'm currently refactoring some legacy asp.net webforms code, let me tell you that this snippet is nothing compared to what I'm seeing. We're talking about 500 lines of code in a button click handler...Oh the fun !</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment61</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment61</guid><pubDate>Tue, 11 Oct 2011 14:58:03 GMT</pubDate></item><item><title>Wayne Molina commented on Negative hiring decisions, Part II</title><description>As I recall Ayende is hiring for a junior candidate, right?  Given that, it can be forgiven that there isn't a clean separation or use of Repository/Gateway/pattern du jour.  

I could even maybe excuse the SQL Injection as someone fresh out of school or not yet graduated might not know of SQL Injection, since I doubt most curriculum covers it (here in Florida USA at any rate).

However, what can't be excused is the lack of effort, and I think *that* is what Ayende is getting at (I could be wrong, however).  It's inexcusable to not do something as trivial as use meaningful names, and shows a lack of caring.  The other issues (hard-coded SQL, non-parameterized queries) can be fixed with guidance and explanation, the lack of professionalism cannot.  Even for throwaway test code, this is bad because the person who wrote it obviously didn't care about anything other than getting it done fast - the worst possible thing a working developer can do.</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment60</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment60</guid><pubDate>Tue, 11 Oct 2011 13:45:34 GMT</pubDate></item><item><title>ThomasX commented on Negative hiring decisions, Part II</title><description>Did the candidate apply for a junior or a senior position?
</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment59</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment59</guid><pubDate>Tue, 11 Oct 2011 12:36:48 GMT</pubDate></item><item><title>Xing Yang commented on Negative hiring decisions, Part II</title><description>Too bad a lot of developers are doing this years after years, and schools, textbooks and even employers are encouraging developers to produce shit code.</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment58</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment58</guid><pubDate>Tue, 11 Oct 2011 10:42:02 GMT</pubDate></item><item><title>Andreas commented on Negative hiring decisions, Part II</title><description>I guess it all boils down to which level this developer supposedly is on. If he/she is straight out of school I think it may be ok if the person is to be hired as a trainee of some sort (though very sloppy naming). If this is supposed to be a senior, it's way of all standards.</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment57</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment57</guid><pubDate>Tue, 11 Oct 2011 05:53:05 GMT</pubDate></item><item><title>Drew Wells commented on Negative hiring decisions, Part II</title><description>I agree who has a white background behind code, I went blind before I finished reading it</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment56</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment56</guid><pubDate>Tue, 11 Oct 2011 04:43:57 GMT</pubDate></item><item><title>Mario Pareja commented on Negative hiring decisions, Part II</title><description>This reminds me of old DailyWTF posts.</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment55</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment55</guid><pubDate>Tue, 11 Oct 2011 04:31:18 GMT</pubDate></item><item><title>David commented on Negative hiring decisions, Part II</title><description>deja-vu! I'm sure i've seen similar code at work, mutter mutter.
@Mykel, made me smile too.</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment54</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment54</guid><pubDate>Tue, 11 Oct 2011 03:25:56 GMT</pubDate></item><item><title>Mykel commented on Negative hiring decisions, Part II</title><description>As a designer, the straw that broke the camel's back was seeing your code example completely break the bounds of your grid.

Irony?</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment53</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment53</guid><pubDate>Tue, 11 Oct 2011 02:03:29 GMT</pubDate></item><item><title>Anoonney commented on Negative hiring decisions, Part II</title><description>You're complaining about a candidate's code but your pasted code runs across the page, and if Google JavaScript is blocked the reCAPTCHA plugin breaks this page and displays raw code.</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment51</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment51</guid><pubDate>Tue, 11 Oct 2011 01:56:17 GMT</pubDate></item><item><title>Remco Ros commented on Negative hiring decisions, Part II</title><description>Guess this guy just wants an entry on your blog.

he's funny :)</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment50</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment50</guid><pubDate>Mon, 10 Oct 2011 22:50:25 GMT</pubDate></item><item><title>Scott White commented on Negative hiring decisions, Part II</title><description>@Zee umm, yea we do.  And I surely hope that one cannot copyright a HelloWorld app but nothing would surprise me.  Don't be offended because ignorance != stupidity so for people getting defensive, pulling your emotions away from your code is the first step to becoming a better programmer.</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment49</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment49</guid><pubDate>Mon, 10 Oct 2011 21:48:45 GMT</pubDate></item><item><title>Fish commented on Negative hiring decisions, Part II</title><description>Yes this is overall really bad code, especially if he had the time to do it at home with enough time to think about it. But in the end this is code many developers are producing every day in real world projects. Maybe one reason for this is, that no one takes the time to teach them, how to do things right. I think if you want to hire an Ayende - MK II we will read such posts for the next few years...</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment48</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment48</guid><pubDate>Mon, 10 Oct 2011 21:20:35 GMT</pubDate></item><item><title>Alessandro Riolo commented on Negative hiring decisions, Part II</title><description>You should really pay someone to spend their time sifting through this sort of candidates. I cannot imagine this being a very productive use of your time.</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment47</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment47</guid><pubDate>Mon, 10 Oct 2011 21:07:10 GMT</pubDate></item><item><title>hmm commented on Negative hiring decisions, Part II</title><description>Standard quality. Not very horrible.</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment46</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment46</guid><pubDate>Mon, 10 Oct 2011 20:02:49 GMT</pubDate></item><item><title>jmr commented on Negative hiring decisions, Part II</title><description>Me thinks its the picture of camel and straw that are the real reason for not hiring. How can you maintain code that is littered with pictures?</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment45</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment45</guid><pubDate>Mon, 10 Oct 2011 19:41:38 GMT</pubDate></item><item><title>Nick commented on Negative hiring decisions, Part II</title><description>Damn, who is this guy? He knows more sql than me,</description><link>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment44</link><guid>http://ayende.com/102402/negative-hiring-decisions-part-ii#comment44</guid><pubDate>Mon, 10 Oct 2011 19:08:16 GMT</pubDate></item></channel></rss>