Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
duck monster
Dec 15, 2004

Aleksei Vasiliev posted:

PHP added gotos in 2009, actually.

For the love of god, bring back pascal as a mandatory educational language PLEASE aarrgghhhhhhh. There is no valid reason to use GOTO ever that does not have as its root cause "Doesn't 'get' structured programming discipline".

Adbot
ADBOT LOVES YOU

THE PLATFORM MASTER
Jun 3, 2008

duck monster posted:

For the love of god, bring back pascal as a mandatory educational language PLEASE aarrgghhhhhhh. There is no valid reason to use GOTO ever that does not have as its root cause "Doesn't 'get' structured programming discipline".

code:
for i in A:
  for j in B:
    if i == j:
      goto error

return some_op(A, B)

error:
// do a bunch of error handling
Would you rather the error handling was moved into the loop?

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."

THE PLATFORM MASTER posted:

Would you rather the error handling was moved into the loop?

There are these things called procedure definitions that allow you to take code out of loop bodies and give them a name, y'know.

HORATIO HORNBLOWER
Sep 21, 2002

no ambition,
no talent,
no chance

duck monster posted:

For the love of god, bring back pascal as a mandatory educational language PLEASE aarrgghhhhhhh. There is no valid reason to use GOTO ever that does not have as its root cause "Doesn't 'get' structured programming discipline".

Oh please. Here's a ladder so you can get over yourself and your paleolithic exhortations.

Why shouldn't you use a goto? Because structured control statements are more expressive. When should you use a goto? When the structured control statements in the language you are using aren't capable of clearly expressing the desired control flow for the program. That's it. It isn't any more difficult or complicated than that. On the last page it was definitively shown one case where goto is inescapably the best solution: error recovery and cleanup in C. This clearly evinces a weakness in the language, but that doesn't change the fact that if you're programming in C--either because you want to or because you have to--the right solution is a goto, like it or not.

And so if you read Djikstra's paper I think you'll find what he was advocating was expressive control statements. You'll note that more modern languages provide facilities that obviate the need for a goto in this case; RAII or try-finally, for example. Languages evolve and, hopefully, their expressiveness grows. The principles Djikstra advocated are alive and well, and we don't need to brain-damage students by exposing them to Pascal in order to prove it.

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

Internet Janitor posted:

There are these things called procedure definitions that allow you to take code out of loop bodies and give them a name, y'know.
Procedures also introduce lots of overhead in the form of branch mispredictions, poor cache locality, and less effective compiler optimization.

GOTO is a horror to have in PHP, but it's perfect for many other languages and use cases.

Contero
Mar 28, 2004

You should make your code as easy to understand and maintain as possible. If that means using a goto, then use a goto.

Getting religious about it is stupid. Use the tools available to you when they're appropriate.

hobbesmaster
Jan 28, 2008

Janin posted:

Procedures also introduce lots of overhead in the form of branch mispredictions, poor cache locality, and less effective compiler optimization.

Premature optimization something something.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Contero posted:

I'm not a professional web dev by any means, but why is this such a horror?

Because it's not how you might expect it to be parsed at first glance. The start and end tags, <?php and ?> are commonly taught as "start PHP" and "end PHP", with everything else just sent directly down the pipe, with no logic behind it.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

hobbesmaster posted:

Premature optimization something something.

I was going to throw the full quote at you and mention how wildly it was being misinterpreted here, but instead I'll just note that the paper in which Knuth used this phrase was Structured Programming with Goto Statements :irony:

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
So remember that PHP article I linked a while back? It now has fan art. Take that, other petty language debate articles.

Toady
Jan 12, 2009

duck monster posted:

For the love of god, bring back pascal as a mandatory educational language PLEASE aarrgghhhhhhh. There is no valid reason to use GOTO ever that does not have as its root cause "Doesn't 'get' structured programming discipline".

From the previously linked lkml thread:

quote:

From: Linus Torvalds
Subject: Re: any chance of 2.6.0-test*?
Date: Sun, 12 Jan 2003 12:22:26 -0800 (PST)

On Sun, 12 Jan 2003, Rob Wilkens wrote:
>
> However, I have always been taught, and have always believed that
> "goto"s are inherently evil. They are the creators of spaghetti code

No, you've been brainwashed by CS people who thought that Niklaus Wirth
actually knew what he was talking about. He didn't. He doesn't have a
frigging clue.

> (you start reading through the code to understand it (months or years
> after its written), and suddenly you jump to somewhere totally
> unrelated, and then jump somewhere else backwards, and it all gets ugly
> quickly). This makes later debugging of code total hell.

Any if-statement is a goto. As are all structured loops.

Ans sometimes structure is good. When it's good, you should use it.

And sometimes structure is _bad_, and gets into the way, and using a
"goto" is just much clearer.

For example, it is quite common to have conditionals THAT DO NOT NEST.

In which case you have two possibilities

- use goto, and be happy, since it doesn't enforce nesting

This makes the code _more_ readable, since the code just does what
the algorithm says it should do.

- duplicate the code, and rewrite it in a nesting form so that you can
use the structured jumps.

This often makes the code much LESS readable, harder to maintain,
and bigger.

The Pascal language is a prime example of the latter problem. Because it
doesn't have a "break" statement, loops in (traditional) Pascal end up
often looking like total poo poo, because you have to add totally arbitrary
logic to say "I'm done now".

Linus

tef
May 30, 2004

-> some l-system crap ->

THE PLATFORM MASTER posted:

code:
for i in A:
  for j in B:
    if i == j:
      goto error

return some_op(A, B)

error:
// do a bunch of error handling
Would you rather the error handling was moved into the loop?

i'd rather error handling, was, y'know, error handling.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
Meaning what?

tef
May 30, 2004

-> some l-system crap ->

Wheany posted:

Meaning what?

I prefer language mechanisms for error handling over unstructured mechanisms for ad-hoc error handling (where available). In the same way I don't use inline assembly, if there is a clearer way to express something within the idioms of the language, I will use it over a more primitive mechanism.

tef fucked around with this message at 11:50 on Apr 20, 2012

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Basically you always want to use structured control flow. Every time.

If the language you're using doesn't natively support the particular control flow structure you want to use, then it's fine to emulate it with gotos.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Smash dogmatism while holding high the banner of modularity. :china:

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Suspicious Dish posted:

So remember that PHP article I linked a while back? It now has fan art. Take that, other petty language debate articles.

I won't be impressed until I've seen a depiction of the house analogy.

beuges
Jul 4, 2005
fluffy bunny butterfly broomstick
Recently, a friend of my ex-gf contacted me about doing some freelance work for him as and when I'm available. He's been running his own software company for a few years, and has built up a number of clients from around the area. Since extra money's always good, and most of the work involves taking an existing project and customizing it via copious amounts of copy/paste, I said why not.

Here are the things I can think of off the top of my head that's wrong with this project:
- It's in VB6
- They have no source control at all. Although I'm not working at their office, their source control consists of copying their work to a central "server" (i.e. the senior dev's pc) and him burning a dvd every day. Different versions of the source are stored as folders called v1.0.0, v1.0.1, v2.0.0, etc. This also means that all of my work will only be backed up by them when I upload to them
- Passwords are stored in plain text
- Money fields are stored in the db as floats
- All fields in the db are nullable, and there are no foreign key constraints
- There are no stored procedures, just direct sql statements in the code
- As a result of their source code storage, there is no common code that is shared centrally between projects - each project gets a copy of the source, so if a bug gets fixed in a core file on one project, no other projects benefit from that automatically. Each project is one big .exe and the only references it has is to the OS and other shared 3rd party apps like Crystal and Office.

What they typically do when they get a new client/project is they take an existing project that is similar enough to the client's needs, copy the source and db, and customize it. As a result, the project source that I was given to customize has a bunch of forms and tables that have nothing to do with the source project, which the dev forgot to remove when he was customizing that project.

Zamujasa
Oct 27, 2010



Bread Liar
Sounds like the exact same thing from the last place I worked, but replace VB6 with PHP. They also made a lot of really arbitrary decisions, like using utf8_bin because it was "more unicodey" than utf8_unicode. (Nevermind the fact that it turned fields in phpMyAdmin into uneditable BLOBs!) :suicide:



duck monster posted:

quote:

} // end of is api command 'doeverything'
hahaha

That was actually a minor name change, but the fact remains that it's the only "function" in that whole mess. (I say "function" because it's actually a mess of if/then/else to choose what "function" to run.)

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

beuges posted:

Recently, a friend of my ex-gf contacted me about doing some freelance work for him as and when I'm available. He's been running his own software company for a few years, and has built up a number of clients from around the area. Since extra money's always good, and most of the work involves taking an existing project and customizing it via copious amounts of copy/paste, I said why not.

Here are the things I can think of off the top of my head that's wrong with this project:
- It's in VB6
- They have no source control at all. Although I'm not working at their office, their source control consists of copying their work to a central "server" (i.e. the senior dev's pc) and him burning a dvd every day. Different versions of the source are stored as folders called v1.0.0, v1.0.1, v2.0.0, etc. This also means that all of my work will only be backed up by them when I upload to them
- Passwords are stored in plain text
- Money fields are stored in the db as floats
- All fields in the db are nullable, and there are no foreign key constraints
- There are no stored procedures, just direct sql statements in the code
- As a result of their source code storage, there is no common code that is shared centrally between projects - each project gets a copy of the source, so if a bug gets fixed in a core file on one project, no other projects benefit from that automatically. Each project is one big .exe and the only references it has is to the OS and other shared 3rd party apps like Crystal and Office.

What they typically do when they get a new client/project is they take an existing project that is similar enough to the client's needs, copy the source and db, and customize it. As a result, the project source that I was given to customize has a bunch of forms and tables that have nothing to do with the source project, which the dev forgot to remove when he was customizing that project.

He has no business running a software company.

Ensign Expendable
Nov 11, 2008

Lager beer is proof that god loves us
Pillbug

duck monster posted:

For the love of god, bring back pascal as a mandatory educational language PLEASE aarrgghhhhhhh. There is no valid reason to use GOTO ever that does not have as its root cause "Doesn't 'get' structured programming discipline".

There is an educational variant of Pascal called Turing that my high school offered in grade 9 and 10 programming courses, with Java in 11 and 12.

duck monster
Dec 15, 2004

Ensign Expendable posted:

There is an educational variant of Pascal called Turing that my high school offered in grade 9 and 10 programming courses, with Java in 11 and 12.

I just wish whatever the gently caress borlands latest hate-spawn is now called would loving wake up and offer a hacker friendly delphi or turbo pascal again at a price (or better still freeness) that makes senes. A fully updated object pascal is still a great language that emphasizes type correctness and is dead set all about doing structured and object oriented correctly. And seriously, follow the pascal rules and your code will make sense and be good and chivalrous.

The sleep of java has produced monsters.

Get off my lawn kids.

how!!
Nov 19, 2011

by angerbot
code:
    @property
    def picked_by_username(self):
        return self.picked_by.username
This crap is all over the current code base I'm stuck working on. Someone must have been allergic to periods or something.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
My Python is weak so dumb question alert, but how does that avoid periods? Don't you need to dot into the instance to access the property anyway?

Might save on parens...

Vanadium
Jan 8, 2005

It's defining a new function so you can say foo.picked_by_username instead of foo.picked_by.username. One less period!

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Oh, I didn't see the dot, I thought it was returning self.picked_by_username.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

beuges posted:

- They have no source control at all.

hg init
hg add
hg commit

or

git init
git add .
git commit

This is literally how easy it is to have version control these days. You don't have to administer servers (until maybe later if you want to make distribution a bit easier). And this works on Windows and Linux (and I assume Mac) :mad:

e: And the best part is: You can start using it right now even if the other guys don't want to. Just commit your own changes, copy their files over your files, then commit again. It sucks but way less than not doing it at all.

Wheany fucked around with this message at 18:34 on Apr 20, 2012

Impotence
Nov 8, 2010
Lipstick Apathy

Wheany posted:

hg init
hg add
hg commit

or

git init
git add .
git commit

This is literally how easy it is to have version control these days. You don't have to administer servers (until maybe later if you want to make distribution a bit easier). And this works on Windows and Linux (and I assume Mac) :mad:

What, I have to type git commit every single time I make a change? :v:

Bhaal
Jul 13, 2001
I ain't going down alone
Dr. Infant, MD
php:
<?
public function sumitcatagoryAction()
   {
       $layout = Zend_Layout::getMvcInstance();
      $layout->setLayout('admin/adminajax');
      $catid =  $this->getRequest()->getParam('catid');
      $catname = $this->getRequest()->getParam('catname');
      echo 'haha got it'.$catid.' '.$catname; 
      $userilftercat = new Model_DBTable_UserFilterCategory();
      if($catid=='parentcatagory' || $catid=='parentcatagorylists')
      $userilftercat->addcatagory($catname);
      else
      $userilftercat->addcatagory($catname,$catid);
      
      
   }
?>
Formatting has been preserved, this function is perfectly representative of the quality of code this guy regularly checks into production. Take it in. Swirl it around in your head as though sampling the flavor of a fine wine. Well, maybe not a fine wine, more like murky bog water--but hey that's full of intricate tastes that ignite the senses, too.

It's quickly turning into one of the most hosed situations I've ever seen, and I'm finding myself wanting to build a case for my boss to fire him, which I can't say I've ever done before. There's so many problems with this guy I could start a blog on it, and I've exhausted myself trying to fix it by friendly coaching, fixing the poo poo on my own post-commit, and hardass routes of rejecting his commits and/or belaboring the constant quality problems each time they show up. Some are more effective than others but nothing improves him and I don't have the bandwidth anymore to keep paying attention.

EDIT: I will give him a fraction of an excuse on spelling -- english isn't his first language. But really he speaks it just fine and it's more about laziness. I mean, I can understand even something like "catagory"..sort of. But "ilfter" as filter is straight up keyboard diarrhea that he doesn't bother to clean up because he can rely on the IDE to autofill. In another area of code, he had the word "agreement" spelled 3 or 4 different ways all in a 14 line function, just factors of what assembly of letters made it out on the variables and functions that involved the word.

Bhaal fucked around with this message at 19:15 on Apr 20, 2012

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Bhaal posted:

php:
<?
public function sumitcatagoryAction()
   {
       $layout = Zend_Layout::getMvcInstance();
      $layout->setLayout('admin/adminajax');
      $catid =  $this->getRequest()->getParam('catid');
      $catname = $this->getRequest()->getParam('catname');
      echo 'haha got it'.$catid.' '.$catname; 
      $userilftercat = new Model_DBTable_UserFilterCategory();
      if($catid=='parentcatagory' || $catid=='parentcatagorylists')
      $userilftercat->addcatagory($catname);
      else
      $userilftercat->addcatagory($catname,$catid);
      
      
   }
?>
Formatting has been preserved, this function is perfectly representative of the quality of code this guy regularly checks into production. Take it in. Swirl it around in your head as though sampling the flavor of a fine wine. Well, maybe not a fine wine, more like murky bog water--but hey that's full of intricate tastes that ignite the senses, too.

It's quickly turning into one of the most hosed situations I've ever seen, and I'm finding myself wanting to build a case for my boss to fire him, which I can't say I've ever done before. There's so many problems with this guy I could start a blog on it, and I've exhausted myself trying to fix it by friendly coaching, fixing the poo poo on my own post-commit, and hardass routes of rejecting his commits and/or belaboring the constant quality problems each time they show up. Some are more effective than others but nothing improves him and I don't have the bandwidth anymore to keep paying attention.

What's terrible about it other than the obvious formatting issues and the "haha got it"? I'm not a PHP guy, but I want to understand how badly this guy sucks for schadenfreude and all that.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Ithaqua posted:

What's terrible about it other than the obvious formatting issues and the "haha got it"? I'm not a PHP guy, but I want to understand how badly this guy sucks for schadenfreude and all that.

I think the point is you should multiply this by someone's entire work product and then imagine having to clean it all up for him because he's too thick to get that he needs to shape up.

:smithicide:

het
Nov 14, 2002

A dark black past
is my most valued
possession

Ithaqua posted:

What's terrible about it other than the obvious formatting issues and the "haha got it"? I'm not a PHP guy, but I want to understand how badly this guy sucks for schadenfreude and all that.
I was thinking the same thing but then I noticed the function name has 2 misspellings and inconsistent capitalization, "category" is consistently misspelled "catagory" except in the call to Model_DBTable_UserFilterCategory, and the return value from that is stored in "userilftercat". Like, misspelling filter as ilfter once or twice is easy to understand but misspelling it and consistently sticking with that misspelling to the point of committing it is pretty hosed up.

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.
He also can't spell for poo poo

e: didn't refresh

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Munkeymon posted:

I think the point is you should multiply this by someone's entire work product and then imagine having to clean it all up for him because he's too thick to get that he needs to shape up.

:smithicide:

It's definitely a place where the guy could improve, but he's not a native English speaker. I wouldn't push to get the guy fired if the code he's writing is otherwise adherent to best practices and functional.

Bhaal
Jul 13, 2001
I ain't going down alone
Dr. Infant, MD
It's functional so I guess it's not really a critique of what his code does at runtime.

It's more to do that this is representative of what he commits all the time. The spelling mistakes (sumit, catagory, ilfter) are ubiquitous. It's literally about once every 3 lines of code. Mix in his refusal to use camelcase for multi-word variable names and sometimes you are deciphering alphabet soup. Debug comments left into production are par for the course, and so on.

beuges
Jul 4, 2005
fluffy bunny butterfly broomstick

Wheany posted:

hg init
hg add
hg commit

or

git init
git add .
git commit

This is literally how easy it is to have version control these days. You don't have to administer servers (until maybe later if you want to make distribution a bit easier). And this works on Windows and Linux (and I assume Mac) :mad:

e: And the best part is: You can start using it right now even if the other guys don't want to. Just commit your own changes, copy their files over your files, then commit again. It sucks but way less than not doing it at all.

When I asked how they manage source control, he told me about the daily DVD backup thing. I said I'd be storing stuff in my own svn repository regardless (unless they had svn or git or whatever, in which case I'd have used theirs). I offered to host a repo for them on my hosted server if they wanted, but he said he didn't want any of his code on some remote machine somewhere.

It's just a very small-minded mentality. He'd rather hire 3 or 4freshly-graduated kids, pay them peanuts, and have them push out copy/paste projects, than one or two more senior guys who will work smart instead of hard, refactor everything (and port it to VB.net at least) and get more projects done quicker.

One other thing I just thought of:

- They have a reasonable separation of data access from the form UIs, which is good. However, say you're capturing information about a client... you have a client details form, and a client details data class (call it cls_ClientDetails) with properties for each field, to query and update the db. All good. Then, lets say you want a report that prints out a client's details via Crystal. There's an entirely new class called cls_ClientDetails_View, which retrieves the same information, just with only Get properties. Which means that if you add a new field to the form, you have to update two classes in order for everything to work.

het
Nov 14, 2002

A dark black past
is my most valued
possession

Bhaal posted:

It's functional so I guess it's not really a critique of what his code does at runtime.

It's more to do that this is representative of what he commits all the time. The spelling mistakes (sumit, catagory, ilfter) are ubiquitous. It's literally about once every 3 lines of code. Mix in his refusal to use camelcase for multi-word variable names and sometimes you are deciphering alphabet soup. Debug comments left into production are par for the course, and so on.
That code actually works??? So everything that references that category stuff in the database spells it "catagory"? That's insane.

Ithaqua posted:

It's definitely a place where the guy could improve, but he's not a native English speaker. I wouldn't push to get the guy fired if the code he's writing is otherwise adherent to best practices and functional.
Codifying misspellings into your data model seems far from just a quirk to overlook.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Bhaal posted:

It's functional so I guess it's not really a critique of what his code does at runtime.

It's more to do that this is representative of what he commits all the time. The spelling mistakes (sumit, catagory, ilfter) are ubiquitous. It's literally about once every 3 lines of code. Mix in his refusal to use camelcase for multi-word variable names and sometimes you are deciphering alphabet soup. Debug comments left into production are par for the course, and so on.

There's no excuse for sloppiness, but this is one of the things that code reviews really help out with. We had a developer from Myanmar a few jobs ago who was smart as poo poo, but was prone to similar mistakes -- and sometimes, when she forgot an English word, she'd just use variable names like "xxx". Luckily, we had mandatory code reviews for all check-ins, and after getting failed a few times, she shaped up. You don't fix it for him, he has to waste his time fixing it himself. If you fix it for him, he never learns.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

beuges posted:

When I asked how they manage source control, he told me about the daily DVD backup thing. I said I'd be storing stuff in my own svn repository regardless (unless they had svn or git or whatever, in which case I'd have used theirs). I offered to host a repo for them on my hosted server if they wanted, but he said he didn't want any of his code on some remote machine somewhere.

That's sane. He wants to make sure that their proprietary code stays within the company. Just use git locally, because you can, and what is he going to do about it?

Adbot
ADBOT LOVES YOU

Bhaal
Jul 13, 2001
I ain't going down alone
Dr. Infant, MD

420 SMOKEAWEED posted:

That code actually works??? So everything that references that category stuff in the database spells it "catagory"? That's insane.

Codifying misspellings into your data model seems far from just a quirk to overlook.
Oh yeah. He's a serious pro at hacking something together that works. I mean we all do it, but we also all learn eventually that you go back and clean up a little once you have the proof of concept figured out.

Misspellings in tables & columns are not immune from him. Also controllers and actions and hey, those turn into URLS and those are client facing. It's madness, but it all works because in the IDE you go "$this->xx[arrow][arrow][enter]" and it all lines up!

I've done a number of code reviews with him. I started as friendly coach, what I said got ignored and after a few months of that I switched to hardass commit-rejector. He'd fix what I told him to (to the letter, no more) and now I think he tries to avoid me.

He's revamping our admin-side UI (we are a SaaS company) with stuff like collapsable navs and fancy bits, and instead of pulling in bootstrap.js like I suggested and all other senior programmers and the CTO agreed, instead he's going with some javascript plugin he found on a blog somewhere. I love this job, it has a million good things going for it, it is a successful startup, and so on. But I'm starting to consider my options.

That and it's PHP and I'm sick to death of PHP and don't see any reasonable introduction of python or ruby or whatever into our app, and I don't want to get stuck doing PHP for the rest of my career and it's starting to dominate my work history.


EDIT:

Ithaqua posted:

There's no excuse for sloppiness, but this is one of the things that code reviews really help out with. We had a developer from Myanmar a few jobs ago who was smart as poo poo, but was prone to similar mistakes -- and sometimes, when she forgot an English word, she'd just use variable names like "xxx". Luckily, we had mandatory code reviews for all check-ins, and after getting failed a few times, she shaped up. You don't fix it for him, he has to waste his time fixing it himself. If you fix it for him, he never learns.
I totally get where you're coming from, and that was my attitude for about the first 3 months. It's been 9 now and nothing's changed. He has a masters in CS and can at least boast being in higher level courses and so on, but when I say "hack together something that works" I'm not talking about some insane widget that nobody in the office could wrap their heads around. I'm talking "We need a many:many relationship defined between tables A and B. Make an intersection table and create a few management pages so we can maintain the many:many relationship through a handy interface", followed with me writing out a point-for-point spec of what logic and layouts and so on will be needed. Basically poo poo that I don't have time to do but can map it out step by step in like 20 minutes. He's 100% aware of every detail in quality problems, and any improvement is hard to perceive because it only exists as a slight reduction in frequency. But these are problems that should have faced eradication, and while I'm leaving out a lot of other details about him and his personality and work ethic (he watches bollywood shows on youtube all day. I mean it is on and running every minute that he's in the office), the code quality is function of laziness, not complexity, not having to write it under duress for getting it out the door, it's from some attitude and I don't know where he got it from that as soon as the code minimally performs, you're done. And he constructs it with that goal in mind.

God now I'm feeling like a dick. Next time we hire I'm going to tell my CTO I want ownership of it.

Bhaal fucked around with this message at 19:50 on Apr 20, 2012

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply