2 Replies - 1448 Views - Last Post: 15 June 2012 - 06:54 AM Rate Topic: -----

#1 deafeye  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 1
  • Joined: 14-June 12

No code review? I'll make you start having them!

Posted 14 June 2012 - 09:17 PM

So, we all know that bad developers come up with really terrible/laughable solutions. After seeing enough in my current job to fill this entire forum while pushing for code review and getting denied, I decided to take matters in my own hands. If they can come up with helmet wearing unreadables without trying, surely a better engineer can design something completely impossible to maintain.


The basics of it were this. Django Template (almost any templating language with inheritance will work). The first is a base template, several hundred lines long, and within is a neat little block like:

<button type="button" onclick="{% block buttonoverride %}some_javascript_function();{% endblock %}">CLICKY ME</button>



Then there is the template that inherits from the base, also several hundred lines long. It gets to a point like:

<script type="text/javascript>
//this function does stuff
//because i like to describe functions in english
//because i write so terrible, name my variables so poorly, have no sense of data structures
//that you cannot figure out wtf my original task was
//there's blocks of code here that i comment out as well
//because i'm too scared to press the delete button out of fear that i might need to
//copy paste {% block buttonoverride %}javascript_function_that_actually_executes_LOL_gl_finding_this(){%endblock%}
//some of this old code that's commented out. I mean, most people ignore this stuff
//or even worse delete these without thinking. Because why would you, it's a comment
//who would ever put functional code inside a comment, is that even possible? Oh wait..
function javascript_resumes(){
  var do_more = "mind_numbing_stuff";
  var loopvar = 0
  while(loopvar < 1)
        console.out.log('LOL You'll never find the problem');
}
</script>




Now, this post completely gives away the fact that I've hidden functional code inside a comment. However, imagine that instead of a bunch of sarcastic code it's actual business logic that conforms to the rest of the way the terribly written project works. Now imagine a low level "experienced" developer who commits the sins you see on this forum try to debug a minor problem with that function.

So, yeah, code review.

Is This A Good Question/Topic? 2
  • +

Replies To: No code review? I'll make you start having them!

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,437
  • Joined: 23-August 08

Re: No code review? I'll make you start having them!

Posted 15 June 2012 - 06:45 AM

That there's a real facepalmer! Thanks for sharing!
Was This Post Helpful? 0
  • +
  • -

#3 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7578
  • View blog
  • Posts: 12,743
  • Joined: 19-March 11

Re: No code review? I'll make you start having them!

Posted 15 June 2012 - 06:54 AM

Mmmm... so bad it's good.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1