|
Look Around You posted:I like how instead of letting it keep crashing and figuring out why "this cannot happen" happened, they just decided to say "gently caress it, let's keep on trucking" with the program in a potentially catastrophically invalid state. I see this kind of bandaid programming all the time and it infuriates me. It's got so much code-rot going on - usually it comes with a bunch of "fixes" commented out because they didn't work, and correct code also commented out and replaced with fragile hacks because they didn't take the time to figure out what is actually wrong. I think this is my favorite bandaid code: C++ code:
|
# ? Jan 31, 2014 08:02 |
|
|
# ? May 16, 2024 12:20 |
|
Look Around You posted:I like how instead of letting it keep crashing and figuring out why "this cannot happen" happened, they just decided to say "gently caress it, let's keep on trucking" with the program in a potentially catastrophically invalid state. But it doesn't crash anymore?! Success???
|
# ? Jan 31, 2014 08:30 |
|
Harik posted:I see this kind of bandaid programming all the time and it infuriates me. It's got so much code-rot going on - usually it comes with a bunch of "fixes" commented out because they didn't work, and correct code also commented out and replaced with fragile hacks because they didn't take the time to figure out what is actually wrong. I worked with a guy like that. He eventually got fired because our boss got tired of the "Okay I fixed it oops it's still broken / broken worse" cycle. Productivity went way up.
|
# ? Jan 31, 2014 15:49 |
|
Ithaqua posted:I worked with a guy like that. He eventually got fired because our boss got tired of the "Okay I fixed it oops it's still broken / broken worse" cycle. Productivity went way up. Is there a systemic issue there, where there's not enough design control? Or just the real world
|
# ? Jan 31, 2014 15:52 |
|
ewe2 posted:Is there a systemic issue there, where there's not enough design control? Or just the real world It was a place where we had gone from 1 developer (me) and a hands-on architect/senior developer/CTO to a small team, expanding rapidly to a medium-sized team. This dude managed to put up a smokescreen of bullshit during the interview and fooled us. He only lasted about 9 months, and by the end he was relegated to maintaining a clunky old classic ASP application while everyone else was working on the flagship product. The hiring process became much more involved after that and we never had another problem with hiring an idiot.
|
# ? Jan 31, 2014 16:11 |
|
Harik posted:I see this kind of bandaid programming all the time and it infuriates me. It's got so much code-rot going on - usually it comes with a bunch of "fixes" commented out because they didn't work, and correct code also commented out and replaced with fragile hacks because they didn't take the time to figure out what is actually wrong. I can't read "persentage" without also seeing brain damage. And uhhh nice uninitialized variable there also
|
# ? Jan 31, 2014 16:51 |
|
I was confused about why "warning = limit * persentage" wouldn't work. I haven't worked with C++ in a little while so I thought "hm, does 'limit * persentage' create a new unsigned char of the multiplication, then cast that to long? I thought that makes sense so I did a quick test to see what the output would be. I got:C++ code:
code:
Jewel fucked around with this message at 17:28 on Jan 31, 2014 |
# ? Jan 31, 2014 17:03 |
|
Based on the quality of the code I think the safest assumption is that there was an issue elsewhere that they failed to identify and simultaneously "solved" it, leaving this gem in the codebase as an attribution error. I see it all the time at my job.
|
# ? Jan 31, 2014 17:23 |
|
Jewel posted:Why is this? It seems to work? So my two questions: Why did his code snippet not work, and why does this work with regards to casting and overflow? What is the problem? unsigned long can store values bigger than 255*255. unsigned chars are just integers.
|
# ? Jan 31, 2014 17:29 |
|
Strong Sauce posted:What is the problem? unsigned long can store values bigger than 255*255. unsigned chars are just integers. Can't unsigned char only store 0-255? What do you mean "are just integers"? What happens when you multiply two unsigned chars and store them as long? Should they not multiply as an unsigned char, which would have overflow issues, THEN get casted to long (or any other type that holds more than a char, the end type is not important)?
|
# ? Jan 31, 2014 17:32 |
|
this post specifically references C but i have a feeling C++ behaves the same way. chars are integer types subject to the rules of integer promotion: 673 If an int can represent all values of the original type, the value is converted to an int; 674 otherwise, it is converted to an unsigned int. Pie Colony fucked around with this message at 17:47 on Jan 31, 2014 |
# ? Jan 31, 2014 17:36 |
|
Jewel posted:Can't unsigned char only store 0-255? What do you mean "are just integers"? What happens when you multiply two unsigned chars and store them as long? Should they not multiply as an unsigned char, which would have overflow issues, THEN get casted to long (or any other type that holds more than a char, the end type is not important)? unsigned chars get promoted into ints when multiplying. I'm not an expert on this but I'm also guessing defining it as an unsigned char forces the promotion to be an unsigned int.
|
# ? Jan 31, 2014 18:32 |
|
We have a lot of our config stuff stored in a table on a database which is apparently the only static thing. This kind of ~MAGIC~ that you can't know until runtime makes me feel icky. I mean I can always check the table but it feels like it should be in the drat config file WELP they changed the references in that table to something that isn't set up yet and our poo poo is broke. Now I feel bad, can't test anything, and if I stub out pathing to the old server that used to work I get FileIO errors all over the place. w3wp.exe is not happy. Is this just a State Government Thing™ or is this more widespread? Or am I the horror and config should be kept in a table on your database? HAPPY FRIDAY
|
# ? Jan 31, 2014 18:44 |
|
I dunno, seems roughly equivalent to me. It's either a hardcoded path string to a config file with file IO to read/parse information, or a hardcoded connection string to a database with SQL to read/parse information. Either way, things can go wrong at runtime.
|
# ? Jan 31, 2014 18:56 |
|
2banks1swap.avi posted:We have a lot of our config stuff stored in a table on a database which is apparently the only static thing. This kind of ~MAGIC~ that you can't know until runtime makes me feel icky. I mean I can always check the table but it feels like it should be in the drat config file Hearing about your situation reminds me of my own. Where I work everything is kept in a database because any config files are considered code in our promotion chain and we made the promotion chain so difficult that it's not possible to do in a single day. I think everyone would be happier if we had config files or some kind of tool to insert records in a human friendly way, but instead everyone is just pumping raw SQL or using phpMyAdmin. This is fun because people are anonymously modifying rules that cause the entire application to grind and no longer function.
|
# ? Jan 31, 2014 18:56 |
|
2banks1swap.avi posted:We have a lot of our config stuff stored in a table on a database which is apparently the only static thing. This kind of ~MAGIC~ that you can't know until runtime makes me feel icky. I mean I can always check the table but it feels like it should be in the drat config file Storing config information in a table definitely has it's downsides, but it can work. I wouldn't store everything there, but if there is a rule engine I would definitely store the rules there. EntranceJew posted:Hearing about your situation reminds me of my own. Where I work everything is kept in a database because any config files are considered code in our promotion chain and we made the promotion chain so difficult that it's not possible to do in a single day. I think everyone would be happier if we had config files or some kind of tool to insert records in a human friendly way, but instead everyone is just pumping raw SQL or using phpMyAdmin. This is fun because people are anonymously modifying rules that cause the entire application to grind and no longer function. Having some kind of seed system for database-stored configs is very important. Even if it doesn't match production all of the time (there should be some way of syncing with production, at least) it should have a minimum working set of data. But even with that straight editing a rule engine with SQL is absurd.
|
# ? Jan 31, 2014 18:57 |
|
Jewel posted:I was confused about why "warning = limit * persentage" wouldn't work. I haven't worked with C++ in a little while so I thought "hm, does 'limit * persentage' create a new unsigned char of the multiplication, then cast that to long? I thought that makes sense so I did a quick test to see what the output would be. I got: Maybe it's C++ and operator * is overloaded and crashes?
|
# ? Jan 31, 2014 20:29 |
|
You can't overload operators unless one of the operands is a user-defined type.
|
# ? Jan 31, 2014 22:31 |
|
2banks1swap.avi posted:We have a lot of our config stuff stored in a table on a database which is apparently the only static thing. This kind of ~MAGIC~ that you can't know until runtime makes me feel icky. I mean I can always check the table but it feels like it should be in the drat config file build time configuration should be with code, runtime configuration should be with deployment. you should have a clean way to override runtime configuration for development purposes. automate however much you feel is necessary.
|
# ? Jan 31, 2014 23:09 |
|
GrumpyDoctor posted:You can't overload operators unless one of the operands is a user-defined type. And it looks like the horror is meeeeeee! Only ever done/seen it for custom math types but didnt know it was illegal for built-in.
|
# ? Jan 31, 2014 23:16 |
|
Ithaqua posted:It was a place where we had gone from 1 developer (me) and a hands-on architect/senior developer/CTO to a small team, expanding rapidly to a medium-sized team. I feel like any verbal or open-ended interviewing question I might ask could be passed with memorized bullshit despite being a horrible coder. Anything that falls outside the realm of common questions just becomes trivia that would filter out good candidates. I feel like there is a high likelihood someone would at least be net productive on a team if they can quickly knock out some fizzbuzz-level and a bit above fizzbuzz-level programming tests where they have to actually program an implementation on a computer and preferably not a whiteboard. How naive am I in thinking that is a good enough bar for productive developers? How important is it for me to ask candidates to implement programs in such a way as to demonstrate understanding of basic data structures and simple computational complexity of algorithms? Edit: The problem space for the developers on the job would just be basic enterprise/business stuff with a web front end. comedyblissoption fucked around with this message at 03:15 on Feb 1, 2014 |
# ? Feb 1, 2014 03:06 |
|
Ithaqua posted:It was a place where we had gone from 1 developer (me) and a hands-on architect/senior developer/CTO to a small team, expanding rapidly to a medium-sized team. Out of curiosity, what kind of smokescreen was it? How did he manage to BS you guys into hiring him?
|
# ? Feb 1, 2014 04:15 |
|
comedyblissoption posted:Did you guys do a basic technical evaluation that involved writing code for the bullshitter? I am trying to rectify a broken interview process that I previously had no input in since my team has been burned by something like this. I have almost no experience in interviewing candidates. Pollyanna posted:Out of curiosity, what kind of smokescreen was it? How did he manage to BS you guys into hiring him? He didn't have to write code, which was one of our major mistakes. After this guy, the interview process became a lot harder and stricter:
The guy who didn't have to do all of this stuff managed to sort of derail the interview. We didn't have any formal procedure we followed at the time, so it was easy enough to derail. He talked a good game about all of the things he did and how awesome he was. Unfortunately, that was his major skill: talking. He loved to make lists and plans for all of the things he could improve, then never do any of them, or fail to do them properly. I e-stalked him a little recently, and he's not a developer anymore... he's a project manager. So he found the perfect job for his skillset. New Yorp New Yorp fucked around with this message at 04:33 on Feb 1, 2014 |
# ? Feb 1, 2014 04:23 |
|
Ithaqua posted:
I like this a lot. Stealing it!
|
# ? Feb 1, 2014 04:28 |
|
Glimm posted:I like this a lot. Stealing it! Good! It was actually really useful for us. I recall we had the following categories of bad code:
And then mixed in, we had various examples of good code.
|
# ? Feb 1, 2014 04:38 |
|
Ithaqua posted:He didn't have to write code, which was one of our major mistakes. After this guy, the interview process became a lot harder and stricter: You have a pretty good process, at least good enough that you should defer the very worst. For reference, you would not... actually, you would believe the sheer number of "developers" I've done phone screens for who cannot, given 30 minutes, write a method to remove a node from a linked list. The number who could actually write a reasonable method signature is scandalously low. Never, ever, ever assume that the candidate can code. Always make them prove it.
|
# ? Feb 1, 2014 05:35 |
|
Also, never, ever allow a developer to be interviewed while the primary developer is on vacation. This sounds like a no-brainer, but I had this happen to me. I was on my honeymoon and the idiot that ran operations in my department brought in a temp without any technical interview and surprise surprise, the guy turned out to be awful. We spent roughly the same amount of time he billed fixing the mistakes he made. Contrast to when I interviewed the next guy, we did a coding test by email, FizzBuzz and similar in the interview, and a "boxes and arrows" design test. Never let analysts and managers run the developer hiring process. Just don't let it happen. Interrupt and shout people down if you have to.
|
# ? Feb 1, 2014 16:13 |
|
Pollyanna posted:Out of curiosity, what kind of smokescreen was it? How did he manage to BS you guys into hiring him? I'm not completely sure why, but the fact that you're asking this is super hilarious.
|
# ? Feb 1, 2014 16:57 |
|
EAT THE EGGS RICOLA posted:I'm not completely sure why, but the fact that you're asking this is super hilarious. I am completely honest thank you very much I was wondering what separated a good developer from a bad developer in terms of performance, and also what they considered a good developer to be.
|
# ? Feb 1, 2014 19:02 |
|
Pollyanna posted:I am completely honest thank you very much Do you know O(n) of what you're writing? Did you handle corner cases? Can you (informally) prove your code correct? Do you consider how to test the code that you're writing? Did you actually run through the code out loud before declaring "I'm Done" to verify that it at least correctly works for one case? Is your code ugly as poo poo? Do you use variable names like "d" and "q" ? You get a pass for using "i" for index in a for loop on the whiteboard, but the rest had better make some sense. Does your architecture make sense? Did you just write a static method to do what an instance method should have done, which accepts an instance as an argument? Do you understand what a pointer/reference is? Do you understand what a pointer to a pointer is? That's just the basics for "Is the candidate terrible y/n", but it's probably all you need for a Dev I position. For II or III positions, the interviewer will consider the architecture of what you're writing, because you're probably going to be asked to design a class or project in addition to coding something on a whiteboard. Volmarias fucked around with this message at 19:16 on Feb 1, 2014 |
# ? Feb 1, 2014 19:14 |
|
FamDav posted:build time configuration should be with code, runtime configuration should be with deployment. you should have a clean way to override runtime configuration for development purposes. automate however much you feel is necessary. You're right. We already use an IoC container to stub out what we'd expect from a database to test the middle and front end, but don't have a dev file server, or run the web services ourselves for development. We should stub those out too, now that we need to touch them. What really sucked is it turns out the old file server was making GBS threads the bed when I tried to point back to it, and the web services ended up dying, too - for everyone! Best Friday ever. Hopefully I can talk the team lead into running out own dev services and file server.
|
# ? Feb 1, 2014 20:02 |
|
Volmarias posted:You have a pretty good process, at least good enough that you should defer the very worst. My go-to question is implementing String.Replace and you would not believe the number of people who fail miserably and don't even bother asking if they can use library functions (no, but you get extra points for asking)
|
# ? Feb 1, 2014 22:40 |
|
Do people just not learn about data structures anymore? Is it poorly retained? As far as String.replace goes how much time would you allot? Could they do it in a text editor? The thought of doing that on a whiteboard kills me.
|
# ? Feb 1, 2014 22:54 |
|
Is it better to not ask implementation of simple library functions or fizzbuzz just because someone might have memorized pseudocode for that? It seems like if you can google the problem and find it in the first page hit, it might not be a good question.
|
# ? Feb 1, 2014 22:58 |
|
Dessert Rose posted:My go-to question is implementing String.Replace and you would not believe the number of people who fail miserably and don't even bother asking if they can use library functions (no, but you get extra points for asking) With or without Unicode support?
|
# ? Feb 1, 2014 23:16 |
|
UTF-EBCDIC to standard UTF8 without a reference table to help you.
|
# ? Feb 1, 2014 23:29 |
|
2banks1swap.avi posted:Do people just not learn about data structures anymore? Is it poorly retained? I always give people Visual Studio and an internet connection because gently caress, if I can't write code without an API reference and intellisense in front of me, why should I expect someone to be able to do it in an interview? This comes with the corollary that your code must actually compile, though. It's also nice because I get to see your debugging process when it inevitably doesn't work in a corner case or I suggest a change. Ithaqua posted:With or without Unicode support? It's C#... but now I have to do a little research because you've given me an idea for another gotcha in the question.
|
# ? Feb 1, 2014 23:34 |
|
Is C#'s string being an enumerable of 16-bit char instead of unicode code points a coding horror?
|
# ? Feb 1, 2014 23:35 |
|
Also, re: data structures, I never had formal training and so always retained a faint dislike of data structure questions. I did have to code an implementation of a linked list in an interview where each entry has a forward pointer that goes two items forward and a back pointer that goes one back, though. That was an interesting one.
|
# ? Feb 1, 2014 23:37 |
|
|
# ? May 16, 2024 12:20 |
|
The candidates I've interviewed so far I've done through remote-ing and them using an IDE and filling in an implementation of a function to pass a test. I would think whiteboards for coding should be the last resort.
|
# ? Feb 1, 2014 23:38 |