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
New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Captain Capacitor posted:

He checked in for the first time since March to his "private" branch in Git. He says that as long as he's not checking in to the main branch he's not subject to code reviews.

Yup.

Yeah, that makes no sense. I guess he just expects that his code is awesome and will pass review. I'm also guessing code reviews at this place are "glance briefly at the code as a formality, where any suggestion for improvement will be ignored, and there is no set of circumstances under which the code will fail at review"

Adbot
ADBOT LOVES YOU

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
So, how does he intend to get the code from his "private" repository to actually running in production?

In a sensible organisation, he'd have to merge his code into the actual repository before it can be deployed anywhere, and the first thing a reviewer would say to a giant merge is "gently caress off with that poo poo, come back with individual changes that I can actually review".

TheresaJayne
Jul 1, 2011

Captain Capacitor posted:

He checked in for the first time since March to his "private" branch in Git. He says that as long as he's not checking in to the main branch he's not subject to code reviews.

Yup.

Raise these issues with a higher level manager/project manager.

I have been coding 20 years and back in 2004 I had to go in and tell the directors how the idiot they had got in as a contractor had just taken them for 3 years and produced nothing.
Then I recoded a working system in 1 month flat.

To be honest that was also bad code and I would do it differently now. (it was J2EE 1.1 on Jedit and Jboss 1.0)

Corla Plankun
May 8, 2007

improve the lives of everyone

Captain Capacitor posted:

He checked in for the first time since March to his "private" branch in Git. He says that as long as he's not checking in to the main branch he's not subject to code reviews.

Yup.

If you send out a Resume + Cover Letter once a day it doesn't feel like too much trouble but you can cover a lot of ground. Figure out the bare minimum amount of work you can do to stay off the radar at your current shithole job and work hard to move elsewhere.

I say this with a huge amount of experience in almost this exact situation. I tried to tough it out for ~2 miserable years and it was a huge mistake. You've got to get out of there!

Captain Capacitor
Jan 21, 2008

The code you say?
I'm already looking into other teams within the company. I've been trying to raise my concerns, but my direct boss (who's technically on the same level as the new dev) says that they'll probably consider his experience over mine. Even though I've been doing web dev for years.

TheresaJayne
Jul 1, 2011

Captain Capacitor posted:

I'm already looking into other teams within the company. I've been trying to raise my concerns, but my direct boss (who's technically on the same level as the new dev) says that they'll probably consider his experience over mine. Even though I've been doing web dev for years.

I would log something in writing with them, (or at least email) so when the brown sticky stuff hits the metal rotating thingy you have some evidence that you tried to tell someone.

Athas
Aug 6, 2007

fuck that joker
Is he at least competent enough to be productive despite his inefficient practices? Even if so, he is still being an antisocial rear end in a top hat and you should find someone else to work with.

Captain Capacitor
Jan 21, 2008

The code you say?
He's productive, but he works 10 hour days and takes the longest way to do anything. So I'm not exactly sure how that adds up in the long run.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
I wrote .ElementAt(0).First() today. There was reasoning to back it up (other nearby uses of ElementAt() on the outer collection) but it still looks ugly as sin.

Polio Vax Scene
Apr 5, 2009



Ithaqua posted:

Yeah, that makes no sense. I guess he just expects that his code is awesome and will pass review. I'm also guessing code reviews at this place are "glance briefly at the code as a formality, where any suggestion for improvement will be ignored, and there is no set of circumstances under which the code will fail at review"

He knows his code is poo poo and wants to keep it hidden away as far as possible so he still gets a paycheck

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Manslaughter posted:

He knows his code is poo poo and wants to keep it hidden away as far as possible so he still gets a paycheck

I bet he doesn't. It's the opposite side of Dunning Kruger: People who are good underestimate their skills, people who are bad wildly overestimate.

Suspicious Dish
Sep 24, 2011

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

Ithaqua posted:

I bet he doesn't. It's the opposite side of Dunning Kruger: People who are good underestimate their skills, people who are bad wildly overestimate.

i'm the psychoanalysis of some other random guy nobody has met based on a code snippet and a few paragraphs, max, talking about his behavior

loinburger
Jul 10, 2004
Sweet Sauce Jones
He probably has sexual fantasies about his mother, but then again, who doesn't.

No Safe Word
Feb 26, 2005

Suspicious Dish posted:

i'm the psychoanalysis of some other random guy nobody has met based on a code snippet and a few paragraphs, max, talking about his behavior
It's true of the industry in general, it doesn't necessarily have to be commentary on the individual to be a good generalization.

sarehu
Apr 20, 2007

(call/cc call/cc)

Ithaqua posted:

I bet he doesn't. It's the opposite side of Dunning Kruger: People who are good underestimate their skills, people who are bad wildly overestimate.

Their estimates are still positively correlated with ability.

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

loinburger posted:

He probably has sexual fantasies about his mother, but then again, who doesn't.

s/his/your/

Suspicious Dish
Sep 24, 2011

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

No Safe Word posted:

It's true of the industry in general, it doesn't necessarily have to be commentary on the individual to be a good generalization.

and you're a judgmental nerd who hates all his coworkers and can't go five seconds in a conversation without saying "well actually"

it's true of the industry in general

Spatial
Nov 15, 2007

Suspicious Dish posted:

and you're a judgmental nerd who hates all his coworkers and can't go five seconds in a conversation without saying "well actually"
looks like we've moved onto projection now :hehe:

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Spatial posted:

looks like we've moved onto projection now :hehe:


Actually,

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

baquerd posted:

Well, that is basically how you would get the index of an object in an array?

Generally you'd just use myArray.indexOf(val) instead of writing your own. Then again, maybe he doesn't trust the built in language type's implementation. :tinfoil:

loinburger
Jul 10, 2004
Sweet Sauce Jones
I used to implement my own hash tables because I didn't trust the standard library's hash tables, but in my defense I was very stupid.

ExcessBLarg!
Sep 1, 2001

loinburger posted:

I used to implement my own hash tables because I didn't trust the standard library's hash tables, but in my defense I was very stupid.
Well, did you have enough foresight to avoid DoS via predictable collisions, or are your implementations still vulnerable?

One of the big problems with roll-your-own everything is that you're generally responsible for bug fixes when the rest of the world moves on.

loinburger
Jul 10, 2004
Sweet Sauce Jones
This was fifteen years ago, so I hope that my code is no longer in use

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
Who started the trend of prefixing names with "my"? It drives me nuts when I see it, because it seems so superfluous. I've even seen stuff like IMyInterface.(Where IInterface would suffice.)

Sedro
Dec 31, 2008
Perl I guess?

sarehu
Apr 20, 2007

(call/cc call/cc)
Microsoft.

But I've never seen it used in type names...

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Lumpy posted:

Generally you'd just use myArray.indexOf(val) instead of writing your own. Then again, maybe he doesn't trust the built in language type's implementation. :tinfoil:

That doesn't look like a "coding horror" example for me at all because

1. it's simple and straightforward?
2. it's javascript, of course you should be wearing your tinfoil hat super hard

IIRC the problem with array.indexOf() is that it's easy to mix it up with string.indexOf() that has a subtly different behaviour. In python terms, one is like list.index() and the other is str.find().

Also I guess array.indexOf() wasn't even a thing for a long time? Anyway, unless you consider yourself a javascript expert, sometimes it just feels safer to write your own for loops for stuff like this than to stop coding and go study all the nuances for poo poo that isn't even interesting.

JawnV6
Jul 4, 2004

So hot ...

sarehu posted:

Mycrosoft.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

If you can't come up with anything descriptive about that object - if there's nothing unique about it or its purpose - I'd much rather read

Thing myThing = new Thing ()

than

Thing thing = new Thing ()

because gently caress case sensitivity.

Dylan16807
May 12, 2010

NihilCredo posted:

If you can't come up with anything descriptive about that object - if there's nothing unique about it or its purpose - I'd much rather read

Thing myThing = new Thing ()

than

Thing thing = new Thing ()

because gently caress case sensitivity.

Well ideally classes and variables should be in different namespaces. Does it still bother you in that situation, even though it's not relying on case sensitivity?

Xerophyte
Mar 17, 2008

This space intentionally left blank

loinburger posted:

I used to implement my own hash tables because I didn't trust the standard library's hash tables, but in my defense I was very stupid.

Eh, depends. It's a good idea to be aware of what your standard library is actually doing, much like with any other library.

For instance, the C++ STL more or less mandates a linked list-backed implementation of std::unordered_map. As a result there are a lot of hand-rolled linear probing versions around, some of them entirely well-motivated.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Xerophyte posted:

Eh, depends. It's a good idea to be aware of what your standard library is actually doing, much like with any other library.

For instance, the C++ STL more or less mandates a linked list-backed implementation of std::unordered_map. As a result there are a lot of hand-rolled linear probing versions around, some of them entirely well-motivated.
That and std::unordered_map only became available in C++11.

Xerophyte
Mar 17, 2008

This space intentionally left blank

SupSuper posted:

That and std::unordered_map only became available in C++11.
True, but the SGI STL hash_map had been around for a while before then and dinkumware and libstdc++ both had their implementations in std, for better or worse. I don't believe the official inclusion in the standard library changed much beyond the name.

MrMoo
Sep 14, 2000

I believe the interface was slightly different in each thus the new name to not break compatibility.

http://fgda.pl/post/7/gcc-hash-map-vs-unordered-map

A bit more informative than this:

http://stackoverflow.com/a/1646288/175849

I always use boost::unordered_map because Microsoft's one is broken, slow and has a limit of 500,000 entries.

http://tinodidriksen.com/2009/10/04/cpp-map-speeds-msvc-edition/

MrMoo fucked around with this message at 14:14 on Jul 16, 2015

Xerophyte
Mar 17, 2008

This space intentionally left blank
So, horrors. I just came across this deep in the bowels of some test code
C++ code:
LightingSchematic* lighting = g_common_client->GenerateLighting(
        light_type, point_count, direct_count, spot_count,
        point_color_type, dirt_color_type, spot_color_type,
        point_offset, dirt_offset, spot_offset,
        point_diffuse_rate, point_ambient_rate, point_specular_rate,
        dirt_diffuse_rate, dirt_ambient_rate, dirt_specular_rate, 
        spot_diffuse_rate, spot_ambient_rate, spot_specular_rate, 
        point_pos_x, point_pos_y, point_pos_z, point_pos_rate,                            
        spot_pos_x, spot_pos_y, spot_pos_z, spot_pos_rate,
        dirt_direct_x, dirt_direct_y, dirt_direct_z, dirt_direct_rate,
        spot_direct_x, spot_direct_y, spot_direct_z, spot_direct_rate,
        cone_value_x, cone_value_y,
        atten_factor_x, atten_factor_y, atten_factor_z, 
        light_range_x, light_range_y, intensity_d
        );
A 43-ary function, in the wild.

xzzy
Mar 5, 2009

Vectors? What are those? :iiam:

feedmegin
Jul 30, 2008

MrMoo posted:

I always use boost::unordered_map because Microsoft's one is broken, slow and has a limit of 500,000 entries.

http://tinodidriksen.com/2009/10/04/cpp-map-speeds-msvc-edition/

To be fair that link is 6 years old and Microsoft's C++ support has improved in general since. Is it still true?

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

Dylan16807 posted:

Well ideally classes and variables should be in different namespaces. Does it still bother you in that situation, even though it's not relying on case sensitivity?

I have a habit of doing 'void Foo(Bar bar){}'. I've always figured this was the only decent exception to not naming variables literally after their type. If I'm inclined to do this in any other case, then I probably hosed something up design wise, the way I figure it.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Dylan16807 posted:

Well ideally classes and variables should be in different namespaces. Does it still bother you in that situation, even though it's not relying on case sensitivity?

That would be ideal, but it's not the case in C/C++ at least.

Adbot
ADBOT LOVES YOU

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

Subjunctive posted:

That would be ideal, but it's not the case in C/C++ at least.

In C, structs and variables are indeed in different namespaces...

C code:
#include <stdio.h>

struct foo {
    int bar;
    int baz;
};

int main(void)
{
    struct foo foo;
    foo.bar = 2;
    foo.baz = 3;
    printf("%d %d", foo.bar, foo.baz);
    return 0;
}

/* prints "2 3" */
Cf. http://codepad.org/6XEbCnwZ

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