News for hackers. Stuff that matters.
Re:Ask HN: What's the largest amount of bad code you have ev... by nathan_f77 on Wednesday November 14, 2018 @04:07AM (#18448546)
That is absolutely insane. I can't even begin to imagine the complexity of that codebase. I thought my Rails test suite was slow because it takes 4 minutes. If I wrote it in C or C++ it would probably be 10 seconds.

I can't imagine a C/C++ application where the test suite takes 20-30 hours on a test farm with 100-200 servers. And if you can break 100-1000 tests with a single change, it doesn't like things are very modular and isolated.

And 30 hours between test runs! I would definitely not take that job. That sounds like hell.

Re:Ask HN: What's the largest amount of bad code you have ev... by Maro on Wednesday November 14, 2018 @06:52AM (#18449182)
It's a good exercise to imagine how the job would be sold. Things like this would definitely not come up in the interview process, instead they would sell you on "you get to work on a cutting-edge db kernel that is running most of the Fortune 100s" or sth like that, which is true (!), but doesn't describe the day to day.

The best way to guess this is to extrapolate from the interview questions. If they ask you a lot of low-level debugging/macro/etc questions..

Re:Ask HN: What's the largest amount of bad code you have ev... by pavel_lishin on Wednesday November 14, 2018 @10:13AM (#18450379)
> The best way to guess this is to extrapolate from the interview questions.

Wouldn't you just ask the developers interviewing you outright, "can you walk me through an example of your day? How long does it take you to push out code? What's testing like? Do you run tests locally, or use something like Jenkins?" etc.

Re:Ask HN: What's the largest amount of bad code you have ev... by Endy on Thursday November 15, 2018 @12:22AM (#18457053)
Most new hires are probably not being interviewed by devs, but either by 3rd-party recruiters or internal recruiters with HR. When I was working in recruiting, the last thing either we or the client wanted was for the new hire to talk to either the person who they were replacing or any of the potential coworkers. Heck, one internal recruiter I had to interface with at a company I choose not to disclose said to me, "can we ask if they read Hacker News? There's some bad vibes about us there."

Which is when I got back on HN regularly :-)

(PS I did tell the internal person that there was no way that reading HN was related either to a BFOQ or other job requirement; and thus while it's not illegal, it'd be highly suspicious.)

Re:Ask HN: What's the largest amount of bad code you have ev... by pavel_lishin on Thursday November 15, 2018 @07:45AM (#18458797)
> When I was working in recruiting, the last thing either we or the client wanted was for the new hire to talk to either the person who they were replacing or any of the potential coworkers.

What the fuck? Am I a spoiled tech-bro, or does that sound completely insane to anyone else? I would 100% not take a job if I didn't get a chance to talk to my coworkers and future manager during the interview process.

Re:Ask HN: What's the largest amount of bad code you have ev... by eric_h on Thursday November 15, 2018 @08:26AM (#18459034)
Perhaps you are spoiled (as am I in that regard) but i would absolutely never take a job unless I knew who I was going to be working with and had a chance to ask them honest questions.

Seems like a trap set up for fresh out of college hires. I don’t know any senior developers who would even consider a job under those circumstances.

Re:Ask HN: What's the largest amount of bad code you have ev... by oraguy on Wednesday November 14, 2018 @06:59AM (#18449207)
On the contrary, the interview was an ordinary one. The screening round consisted of very basic fizzbuzz type coding ability checks: Reversing a linked list, finding duplicates in a list, etc.

Further rounds of interviews covered data structure problems (trees, hashtables, etc.), design problems, scalability problems, etc. It was just like any other interview for software engineering role.

Re:Ask HN: What's the largest amount of bad code you have ev... by alexeiz on Wednesday November 14, 2018 @01:52PM (#18452628)
"Well, your interviews went quite well. Now the final question: what would you do if you start losing your mind?"
Re:Ask HN: What's the largest amount of bad code you have ev... by CoolGuySteve on Wednesday November 14, 2018 @09:33PM (#18456403)
"I'd like you to write a graph algorithm that traverses the abyss, the cosmic horror that consumes one's mind, that traverses twilight to the rim of morning, that sees the depths of man's fundamental inability to comprehend.

Oh ya, the markers in here are pretty run down, let me pray to the old ones for some more"

Re:Ask HN: What's the largest amount of bad code you have ev... by breatheoften on Saturday November 17, 2018 @05:41PM (#18477749)
I have written the algorithm you requested - but I wish I hadn’t run it. I hit ctrl-c when I realized what it was doing but it was too late... The damage is done — we are left with only the consequences and fallout.

Forgotten dreams like snowflakes melt on hot dusty ground, soon to turn into hard dry mud beneath a bitter polluted sky.

Re:Ask HN: What's the largest amount of bad code you have ev... by doctorless on Wednesday November 14, 2018 @10:33PM (#18456667)
Pretty sure I was asked that question in an Amazon interview.
Re:Ask HN: What's the largest amount of bad code you have ev... by mlthoughts2018 on Wednesday November 14, 2018 @07:29AM (#18449344)
Were you even given substantial time to ask the interviewers questions? In most interviews I’ve done, even later round interviews whether it’s a finance company, start-up, FAANG, and companies of all sorts in between, I was given at most 5 minutes to ask questions after some dumb shit whiteboard algo trivia.
Re:Ask HN: What's the largest amount of bad code you have ev... by oraguy on Wednesday November 14, 2018 @07:49AM (#18449436)
I was given 5 minutes to ask questions after each round of interview. That part was ordinary too. That's what most of the other companies do (FAANG or otherwise).
Re:Ask HN: What's the largest amount of bad code you have ev... by sodafountan on Wednesday November 14, 2018 @12:33PM (#18451746)
The real risk is for people who are too young to know what to ask
Re:Ask HN: What's the largest amount of bad code you have ev... by numpty13 on Thursday November 15, 2018 @07:17AM (#18458630)
I'd hope they wouldn't even consider somebody for this sort of job who's too young to know what to ask.
Re:Ask HN: What's the largest amount of bad code you have ev... by Latteland on Thursday November 15, 2018 @06:15PM (#18464397)
That's kind of naive, of course you want young people who will work hard and maybe not know what they are getting in to. I was offered a job at oracle back in the day, I would have felt a lot of despair if this is what it was.
Re:Ask HN: What's the largest amount of bad code you have ev... by rumpelbums on Thursday November 15, 2018 @02:18PM (#18462306)
I am not sure what position you were interviewing for and to what level of interview you made it.

When I was interviewing for an SRE position with Google in Dublin, I had about 10min to ask questions in each of the 5 interviews that were conducted on-site.

In between the interviews, a sixth SRE would take me to lunch for about an hour. Anything discussed with him wouldn't be evaluated as part of the interview.

So there was plenty of time for questions, I would say.

Re:Ask HN: What's the largest amount of bad code you have ev... by osrec on Wednesday November 14, 2018 @06:22AM (#18449084)
Hell for the proactive go-getters, but paradise for people who enjoy any excuse for a bit of justifiable down time!

Q: Are you busy? A: Yes, in the middle of running tests...

Re:Ask HN: What's the largest amount of bad code you have ev... by oraguy on Wednesday November 14, 2018 @07:00AM (#18449214)
That would have been fun but in reality there was no downtime. Developers like me were expected to work on two to three bugs/features at a time and context switch between them.

If I submit my test jobs today to the farm, the results would come one or two days later, so I work on another bug tomorrow, and submit that. Day after tomorrow, I return to the first bug, and so on.

Re:Ask HN: What's the largest amount of bad code you have ev... by guscost on Thursday November 15, 2018 @10:31AM (#18459991)
How would you know that merging code from the first bugfix wouldn't break the (just tested) code from the second bugfix?? Would you assume that the first bugfix will be merged first and branch off of that?
Re:Ask HN: What's the largest amount of bad code you have ev... by Blaisorblade0 on Thursday November 15, 2018 @03:41PM (#18463075)
Without knowing Oracle's approach, this sort of problem is no different from any other software, even tho it reaches a larger scale.

Branch from master, and rerun tests before the final merge, like you should in any other software? (Many processes fail that criterion, see https://bors.tech/ for something that gets this right).

Ideally you work on a different enough bug that there's limited interaction, and ideally that's figured out before you fix it, but those criteria are indeed harder to satisfy in a bigger software.

Re:Ask HN: What's the largest amount of bad code you have ev... by guscost on Thursday November 15, 2018 @05:13PM (#18463966)
But if the time needed to test and deploy a change is so ludicrous, it seems like you'd rarely get a big-enough window to rerun your tests before the upstream changes again. Either people are merging in unstable code, or the release lifecycle is a slow byzantine nightmare too (probably the case here).
Re:Ask HN: What's the largest amount of bad code you have ev... by blattimwind on Saturday November 17, 2018 @06:21AM (#18475020)
Usually you don't test a single change before merging, but branch from master, merge any number of changes and then run the tests. So the master branch would move forward every 20-30 hours in this case, unless the tests of a merge batch fail, in which case master would kinda stall for a bit.
Re:Ask HN: What's the largest amount of bad code you have ev... by osrec on Wednesday November 14, 2018 @01:00PM (#18452033)
I understand. It was partially a tongue in cheek remark :)
Re:Ask HN: What's the largest amount of bad code you have ev... by knuffced on Wednesday November 14, 2018 @11:13AM (#18450941)
Tests in C/C++ run shockingly fast. I ported an application from Ruby to C++ and the tests ran in well under a second when it was taking 10+ seconds in Ruby. Granted because of C++'s type system there were fewer tests, but it was fast enough that I kept thinking something was wrong.
Re:Ask HN: What's the largest amount of bad code you have ev... by bufferoverflow on Wednesday November 14, 2018 @12:32PM (#18451730)
It's because Ruby is only of the slowest languages out there, and C/C++ is usually #1-#2 on many benchmarks.
Re:Ask HN: What's the largest amount of bad code you have ev... by maksimum on Wednesday November 14, 2018 @02:00PM (#18452737)
Are you including the time to build/link the tests? This is especially true if you have a bunch of dependencies. Last time I worked on C++ tests most of my time was spent on getting the tests to link quickly. Managed to get it from 25 minutes to 1 minute. But I'd rather have spent that time actually writing more test cases, even if they took 10s to run.
Re:Ask HN: What's the largest amount of bad code you have ev... by eric_h on Thursday November 15, 2018 @08:32AM (#18459061)
Started a new job a few months ago and we’re writing Go - a bunch of the test suites I’ve built run in microseconds. Statically typed compiled languages ftw.