|
I have never had more of a face than I do after reading that post.
|
# ? Jun 14, 2012 15:13 |
|
|
# ? Apr 29, 2024 15:19 |
|
It's horrible interview etiquette to get up and walk out on them right there but man I would have been tempted if that had been sprung on me. What does it do in the larger scope of the product?
|
# ? Jun 14, 2012 15:27 |
|
Kim Jong III posted:And this is what they wanted me to maintain. And the problem with codebases like that is that no decent developer will want to maintain it, so they'll never get quality developers, and the cycle of horrors will continue.
|
# ? Jun 14, 2012 15:31 |
|
Indian code is the best. I might have multiple posts today considering the quality of this codebase.code:
|
# ? Jun 14, 2012 15:58 |
|
e: ^^^^^ oh goody, my favorite exception handling (anti)pattern.csammis posted:It's horrible interview etiquette to get up and walk out on them right there but man I would have been tempted if that had been sprung on me. I never figured it out, to be honest. Every time I try part of my brain just shuts down. I ended up taking the job because they promised me a team lead position on the rewrite of that product & and a senior developer salary. As frightening as that code was, I figured, hey, I can come in and do the rewrite well. They came through with the salary & I started on a Monday. I started meeting the team & planning out the rewrite, but on Thursday they decided they didn't have enough programmers to rewrite that application. Then the fun really started. On Friday, they told me I was going to be a C# developer doing some embedded work. Over the weekend they decided "nah, we don't want to make him learn C#", so on Monday they decided to have me lead a rewrite on a smaller application. But then by Tuesday they realized they didn't have the resources to do even that, and everyone was going to be doing maintenance on their primary horror because some huge fire broke out. Ithaqua posted:And the problem with codebases like that is that no decent developer will want to maintain it, so they'll never get quality developers, and the cycle of horrors will continue. I had a job across town as a Ruby developer by that Thursday. Came in, gave their CIO my most diplomatic "this simply will not work", and was out. One week and four days... shortest employment term by far. But you're absolutely right. I polled the people that were there - their senior developer had 3 years of experience, two other guys had a year or so, and the other ~15 people were straight out of school. I would've entered the place as the most experienced programmer by a handful of years. Turnover was described as "a problem" by their CIO. Can you imagine? Johnny Cache Hit fucked around with this message at 16:09 on Jun 14, 2012 |
# ? Jun 14, 2012 16:05 |
|
ErikTheRed posted:Indian code is the best. I might have multiple posts today considering the quality of this codebase. Why is this a thing? It's all over my codebase too. Including the four (or more) unnecessary colons.
|
# ? Jun 14, 2012 16:18 |
|
Hammerite posted:I guess I'm not going to persuade you on the privilege name thing. It makes perfect sense to me to identify privileges by the names they're referred to in code. So if you decide to refer to your privilege table elsewhere by primary key, you're OK with having to update that table too if you decide to rename your privileges?
|
# ? Jun 14, 2012 16:22 |
|
Zorro KingOfEngland posted:Why is this a thing? It's all over my codebase too. Including the four (or more) unnecessary colons. It's a pretty bad practice to catch(Exception e) { /* log and/or do nothing */ }
|
# ? Jun 14, 2012 16:35 |
|
Zorro KingOfEngland posted:Why is this a thing? It's all over my codebase too. Including the four (or more) unnecessary colons. Probably to make the error messages more visually distinct (and easier to Ctrl+F) amidst the huge mass of meaningless log entries.
|
# ? Jun 14, 2012 16:35 |
|
Zhentar posted:Probably to make the error messages more visually distinct (and easier to Ctrl+F) amidst the huge mass of meaningless log entries. Amongst the huge mass of other entries using "Error" + some number of colons
|
# ? Jun 14, 2012 16:39 |
|
Zorro KingOfEngland posted:Why is this a thing? It's all over my codebase too. Including the four (or more) unnecessary colons. Because all programs should have really loud and noisy error messages Really it's a thing because of terrible programmers fighting checked exceptions. Checked exceptions can be a good thing because you have to think about & deal with the exceptions you might encounter, but it leads to far too many programmers catching & eating it immediately rather than letting it bubble upward & catching it centrally. This is beyond terrible. The absolute worse thing you can do is code:
VVVV oh, wow, yeah, didn't even catch that. Who needs a logger? Real programmers just dump text somewhere
|
# ? Jun 14, 2012 16:41 |
|
quote:Amongst the huge mass of other entries using "Error" + some number of colons
|
# ? Jun 14, 2012 16:41 |
|
Zorro KingOfEngland posted:Why is this a thing? It's all over my codebase too. Including the four (or more) unnecessary colons. Possibly because their log is full of noise, and indenting certain amount helps one visually parse the wall of text? E: wow beaten badly epswing fucked around with this message at 18:03 on Jun 14, 2012 |
# ? Jun 14, 2012 16:55 |
|
yaoi prophet posted:So if you decide to refer to your privilege table elsewhere by primary key, you're OK with having to update that table too if you decide to rename your privileges? on update cascade
|
# ? Jun 14, 2012 17:17 |
|
grandma plus plus
|
# ? Jun 14, 2012 17:35 |
|
Kim Jong III posted:The new senior developer then proceeded to tell me that the database tables were pretty similar, and to illustrate, showed me the most important table in the database. It contained 55 columns, all of them VARCHAR(45), and the first three that I saw were named "AAAA", "AAAAA", and "AAAAB". The proper response to this one is "my salary requirements just went up."
|
# ? Jun 14, 2012 18:02 |
|
Kim Jong III posted:This was code I was asked to critique during an interview. See if you can figure out what it does. I have been trying to figure out what the hell that code does for five minutes and just It clearly does something involving dates but augh. The more I look at it the worse of a headache I get. I wouldn't be able to run away faster. Out of sheer curiosity how much was your salary requirement for that one?
|
# ? Jun 14, 2012 18:59 |
|
Well, here's some more:code:
|
# ? Jun 14, 2012 19:26 |
|
It fills two arrays with hour names (like '11am') for each hour in the day. $grandma is the 24-hour hour, somehow.
|
# ? Jun 14, 2012 19:29 |
|
Munkeymon posted:It fills two arrays with hour names (like '11am') for each hour in the day. $grandma is the 24-hour hour, somehow.
|
# ? Jun 14, 2012 19:30 |
|
Munkeymon posted:I'm assuming the bank's data service (you didn't think Mint logged into their web site and scraped it did you?) Log into mint.com and refresh. Log into bank. "Last access: Windows 2000, IE 5.0"
|
# ? Jun 14, 2012 19:31 |
|
xarph posted:Log into mint.com and refresh. I can't replicate that because my friendly local megabank doesn't tell me stuff like that, but it does weird me out a bit.
|
# ? Jun 14, 2012 19:47 |
|
Hammerite posted:on update cascade With a primary key?
|
# ? Jun 14, 2012 19:51 |
|
Kim Jong III posted:
code:
why
|
# ? Jun 14, 2012 19:51 |
|
Today in MySQL: http://stackoverflow.com/questions/9819271/why-is-mysql-innodb-insert-so-slow That's about 300 rows per second.
|
# ? Jun 14, 2012 19:53 |
|
Zamujasa posted:Out of sheer curiosity how much was your salary requirement for that one? I negotiated in the $60k range, which is on the starting end for senior level salaries in this area. But I was a starting senior developer, so hey, worked for me. I don't think I could've negotiated a sanity-preserving salary at that place.
|
# ? Jun 14, 2012 21:35 |
|
xarph posted:Log into mint.com and refresh. Maybe it's a safe default so most banks degrade their experience to the one with the fewest bells and whistles?
|
# ? Jun 14, 2012 22:06 |
|
The best part about that horrible code is that rather than considering just hardcoding the arrays with the 24 values he just decides to dynamically create them in the worst horrible way. I guess this is just in case we decide to stretch our days into 26 hours cycles? I mean there is just so much wrong in there yet someone thought this was OK to put into production. I mean it has a little bit of everything you shouldn't do programming wise.
|
# ? Jun 14, 2012 22:18 |
|
Strong Sauce posted:The best part about that horrible code is that rather than considering just hardcoding the arrays with the 24 values he just decides to dynamically create them in the worst horrible way. I guess this is just in case we decide to stretch our days into 26 hours cycles? If he had used strftime instead of date, setting the locale before running that loop would produce localized strings, but then if he were competent enough to know that, he'd have done it right, so I got nothin
|
# ? Jun 14, 2012 22:41 |
|
Zombywuf posted:Today in MySQL: http://stackoverflow.com/questions/9819271/why-is-mysql-innodb-insert-so-slow In InnoDB, the primary key is also used as a clustering key. Someone familiar with MySQL might realize that this makes using strings as primary keys a bad idea
|
# ? Jun 14, 2012 23:18 |
|
Jabor posted:In InnoDB, the primary key is also used as a clustering key. Another issue is that strings are not a motherfucking data type in SQL. I actually have no idea if he was talking about text or varchar.
|
# ? Jun 14, 2012 23:22 |
|
hieronymus posted:Another issue is that strings are not a motherfucking data type in SQL. I actually have no idea if he was talking about text or varchar. The conversation started off as being about character sets, which is a notion that applies to all string types in SQL. That is why I was not especially rigorous in differentiating between different string types. However, if you'd read my posts I think it is actually clear enough that as far as the indexes thing is concerned I'm talking about short CHAR (or I suppose in principle VARCHAR) columns. And I am perfectly familiar with the way InnoDB table structure works and the fact that long primary keys are disadvantageous!
|
# ? Jun 14, 2012 23:44 |
|
Hammerite posted:And I am perfectly familiar with the way InnoDB table structure works and the fact that long primary keys are disadvantageous! Well I was more talking about the fact that inserting your primary key in unsorted order is substantially slower than having a synthetic ordered primary key, but yes long primary keys are also bad.
|
# ? Jun 14, 2012 23:59 |
|
On average, what are the odds that any given "PHP Developer" opening is to fix a production application with all VARCHAR columns in an unindexed MySQL table, queries written with no concept of table joins, and tons of coded-by-exception if statements?
|
# ? Jun 15, 2012 01:51 |
|
sniperchance posted:On average, what are the odds that any given "PHP Developer" opening is to fix a production application with all VARCHAR columns in an unindexed MySQL table, queries written with no concept of table joins, and tons of coded-by-exception if statements? 103%, because there will be many other horrors as well.
|
# ? Jun 15, 2012 01:57 |
|
sniperchance posted:On average, what are the odds that any given "PHP Developer" opening is to fix a production application with all VARCHAR columns in an unindexed MySQL table, queries written with no concept of table joins, and tons of coded-by-exception if statements? Pretty much what Sinestro said, you're almost guaranteed to stumble into a viper's pit of hellish practices. There's just something special about PHP that brings out the worst in people. If you want to be a mercenary you really can make decent money doing that type of maintenance work, especially when a business becomes sufficiently desperate for good help. I have a friend that has built a nice little business 1099 contracting from company to company, sweeping up messes & billing major bucks.
|
# ? Jun 15, 2012 04:07 |
|
Kim Jong III posted:Pretty much what Sinestro said, you're almost guaranteed to stumble into a viper's pit of hellish practices. There's just something special about PHP that brings out the worst in people.
|
# ? Jun 15, 2012 07:27 |
|
Trying to add nice error handling to some stored procedures I wrote, I cannot believe how ugly error handling is in MS SQL Server. Pre-2005 before TRY/CATCH blocks, you literally wrapped every statement that could cause a problem in an ugly boilerplate. According to MSDN in 2008R2 this is considered best practices for robust error handling:code:
Are all databases this terrible for developing robust stored procs?
|
# ? Jun 15, 2012 09:31 |
|
Every once in a while, when I wonder what I'm still doing in academia, I check this thread.
|
# ? Jun 15, 2012 12:31 |
|
|
# ? Apr 29, 2024 15:19 |
|
Jabor posted:In InnoDB, the primary key is also used as a clustering key. SQL server does that too. The problem appears to be that it flushes the transaction log far to aggressively (which can apparently be tuned somewhere).
|
# ? Jun 15, 2012 12:35 |