|
Sapozhnik posted:i mean you probably shouldn't be posting interview questions verbatim either tbh Fair 'nuff, changed it to what it was, merge sort a big rear end file. Did I do anything really wrong with the code? It friggin' works. Should I just make a class period even when I just want a bundle of "file handler and line of file being handled"?
|
# ? Apr 3, 2018 19:17 |
|
|
# ? May 27, 2024 03:47 |
|
Space Whale posted:Fair 'nuff, changed it to what it was, merge sort a big rear end file. should have had tests
|
# ? Apr 3, 2018 19:25 |
|
Please don't take this as petulance: Why? Isn't the output of the program pretty useful? Or should every function be tested period? Edit: Also given that this is a one-off. Unless they're testing for habits? Space Whale fucked around with this message at 19:32 on Apr 3, 2018 |
# ? Apr 3, 2018 19:29 |
|
Space Whale posted:Unless they're testing for habits? this but its dumb also probably are dinging you for the "writing C in C#" style you have there instead of something object oriented. dumb of course but i woudln't be surprised if they did it
|
# ? Apr 3, 2018 19:37 |
|
things they're probably dinging you for, in order of how likely it was the thing * you're managing the list of open streams as a list and ordering them after every iteration instead of using a heap. you're doing O(k log k) work instead of O(log k) on every iteration. * lineToRead is superfluous or misnamed. you can easily determine it from StreamReader.EndOfStream. * The tuple stuff is hard to read, especially with a random primitive int and string. if you dropped lineToRead and made a "PeekableLineReader" I think the code would be easier to read.
|
# ? Apr 3, 2018 20:01 |
|
imo they tossed it because you did code:
code:
|
# ? Apr 3, 2018 20:02 |
|
FamDav posted:things they're probably dinging you for, in order of how likely it was the thing I've been told that you should expect back and forth about it and iterate, not just do it optimally from the start. There's also the fact that reading from disc is way slower than sorting 5000 items in memory. You are right but, wth? Also, would a sortedlist or sortedictionary be best for "use a heap" but not reinvent the wheel? Finally, isn't ++x preferable to x++ if I'm incrementing it, period, end of story?
|
# ? Apr 3, 2018 20:21 |
|
hobbesmaster posted:this but its dumb So basically, just write with objects and poo poo even if it's really pointless and a one off? Fine w/ me.
|
# ? Apr 3, 2018 20:22 |
|
Space Whale posted:So basically, just write with objects and poo poo even if it's really pointless and a one off? some people really love objects
|
# ? Apr 3, 2018 20:25 |
|
Sapozhnik posted:i mean you probably shouldn't be posting interview questions verbatim either tbh Why the gently caress not? He didn’t sign an NDA for the drat interview. Glassdoor is full of people doing the same thing, and good for them
|
# ? Apr 3, 2018 20:30 |
|
OK, I'll make classes all the time, and unit test, all the time. While I'm bored and have free time, is anything functional worth learning or will that interfere with the OOP I apparently need to internalize?
|
# ? Apr 3, 2018 20:31 |
|
Local variables should be camelCased. Method names should be PascalCased. If you've been writing C# for five years this should not be news.
|
# ? Apr 3, 2018 20:36 |
|
Fiedler posted:Local variables should be camelCased. Method names should be PascalCased. If you've been writing C# for five years this should not be news. I always just let resharper do it and don't have it at home. Yeah I should work on this manually.
|
# ? Apr 3, 2018 20:51 |
|
DELETE CASCADE posted:Why the gently caress not? He didn’t sign an NDA for the drat interview. Glassdoor is full of people doing the same thing, and good for them its about ethics in tech company interviewing you know, the same tech companies who colluded to keep salaries low. wouldn't want to do anything unethical
|
# ? Apr 3, 2018 21:03 |
|
Anal Del Raytheon posted:its about ethics in tech company interviewing Did they make a deal with your avatar or another Devil?
|
# ? Apr 3, 2018 21:41 |
|
if they're not going to tell you why your code was wrong other than 'no' then you should assume it's over something pointlessly arbitrary because whoever is judging your code is a shitlord. i wouldn't lose any sleep over it. all of the criticisms that have been posted so far- while true- shouldn't have been disqualifiers unless they specifically said to do or not do whatever in the assignment.
|
# ? Apr 3, 2018 21:47 |
|
Rex-Goliath posted:if they're not going to tell you why your code was wrong other than 'no' then you should assume it's over something pointlessly arbitrary because whoever is judging your code is a shitlord. i wouldn't lose any sleep over it. So about this - I've learned the hard way to do exactly what your requirements are, if you're given a canned set of requirements instead of actually having a gathering session.
|
# ? Apr 3, 2018 21:52 |
|
Rex-Goliath posted:if they're not going to tell you why your code was wrong other than 'no' then you should assume it's over something pointlessly arbitrary because whoever is judging your code is a shitlord. i wouldn't lose any sleep over it. yeah i mean, if they aren't going to give you actual feedback then gently caress 'em
|
# ? Apr 3, 2018 22:15 |
|
For real, don't assume the people interviewing you are competent engineers. I mean think about the worst semi senior coworker you've had, and imagine how terrible he must be at spotting talent. You'll get rejected just because you didn't state his exact precanned answer.
|
# ? Apr 4, 2018 00:17 |
|
Space Whale posted:Please don't take this as petulance: Were there not enough tests or no tests? If there were no tests then yeah add tests you nunce.
|
# ? Apr 4, 2018 00:56 |
|
Space Whale posted:I've been told that you should expect back and forth about it and iterate, not just do it optimally from the start. I would be concerned about taking this approach with an assignment vs something like an hour interview session. i would kind of expect for a take-home that you iterated a few times already and produced something good/great. quote:There's also the fact that reading from disc is way slower than sorting 5000 items in memory. You are right but, wth? yeah this is the lovely and annoying part of most interview questions, which is that for whatever synthetic problem they give you the scaling considerations are just as synthetic. Whatever zip file they gave you will probably see minimal performance improvement from switching from sorting to using a heap, but it's not technically the "optimal" solution. quote:Also, would a sortedlist or sortedictionary be best for "use a heap" but not reinvent the wheel? no idea, I don't know c#.
|
# ? Apr 4, 2018 03:02 |
|
instantiate whatever .net calls a priority queue and chances are its implementation will be a heap.
|
# ? Apr 4, 2018 03:37 |
|
Fiedler posted:Local variables should be camelCased. Method names should be PascalCased. If you've been writing C# for five years this should not be news. the aesthetic of the code was what stuck out the most. it just doesn’t look like typical c# it’s petty but this would be a red flag to me too in any language
|
# ? Apr 4, 2018 04:23 |
|
also I get the feeling reading that code it could be much more concise using LINQ
|
# ? Apr 4, 2018 04:27 |
|
use the v7 native tuple syntax because if they don't recognize that you don't want to work with them
|
# ? Apr 4, 2018 05:03 |
|
welp, just sent off my resume for what is basically my dream job wish me luck dealing with the disappointment when i don't get it (joking aside, I legit feel like they'll probably want someone more experienced than me, but if I don't try I definitely won't get it so hey, what the hell)
|
# ? Apr 4, 2018 05:06 |
|
Munkeymon posted:use the v7 native tuple syntax because if they don't recognize that you don't want to work with them Arcsech posted:welp, just sent off my resume for what is basically my dream job
|
# ? Apr 4, 2018 05:09 |
|
Fiedler posted:You still have dreams. You clearly lack the requisite experience. well I mean, the job is at a nonprofit, so I think I'll still need some naiveté left
|
# ? Apr 4, 2018 05:15 |
|
i could go interview for other jobs and with the title i have now i could probably be making a lot more money but idgaf you know? like how much money do i really need? is it going to be enough to buy a house in the bay area? would i buy even if i had that much? no and no? ok like i'm basically trying to optimize for money/effort ratio, and i just don't feel like spending 6mo-1yr proving myself again i guess at some point i'll get so bored at this company that i require new stimulation, but right now i'm getting that from other areas of my life, and it's nice to have a low-effort job that, upon honest reflection, still pays way more than it loving should, despite how much i might want
|
# ? Apr 4, 2018 05:17 |
|
Fiedler posted:Even better -- don't use tuples. oh I dunno - the new syntax makes them a little cleaner than anonymous objects but of course you can't use them in query syntax
|
# ? Apr 4, 2018 05:21 |
|
AWWNAW posted:the aesthetic of the code was what stuck out the most. it just doesn’t look like typical c# When I go into algomode my brain goes to C mode. At work doing webshit with other programmers I'm in C# mode. I tend to approach work different from coding challenges on a fundamental level. For a one off app it feels weird as gently caress to inject dependencies and have classes everywhere. I'd think they wanted me to focus on the algorithmic aspects of it (having it run in moments not hours) not c sharpiness. But eh whatever I'll rewrite it c sharply to practice. Gotta please the hiring people. It just feels weird going objectey here. YAGNI and such. Also I coded that with a fever.
|
# ? Apr 4, 2018 08:44 |
|
Gazpacho posted:i dreamed that there was another layoff and i was the only one left, and when i tried to quit the company wouldn't let me. i spoke to the HR pawns but they didn't hear me, so I grabbed one and tried to sit her back down to process me but she just kept walking. the global boss insisted that he needed me for a project (do not ask what the project is!) Do Not Read Kafka Before Bed
|
# ? Apr 4, 2018 08:56 |
|
just want to post about living in opposite-world of this thread. current job is going swell, get lots of recognition and healthy raises. so much that i'm not even bothering to open the recruiter messages on linkedin because i really don't care about what they have to say. because Job Hunting and Interviewing is Garbage. a better world is out there!
|
# ? Apr 4, 2018 15:10 |
|
|
# ? Apr 4, 2018 15:55 |
|
Is this the place to ask for a "help me learn to think in objects even outside of my comfort zone of 3 layers to expose a db as REST services" thing? Because I really do need to. All I've really internalized is enough to work on another system that already exists and answer interview questions. I do not want to just answer interviews I want to really get this stuff because I want to actually lead or architect something some day.
|
# ? Apr 4, 2018 22:17 |
I think you're looking for the terrible programmers thread friend
|
|
# ? Apr 4, 2018 22:25 |
|
Space Whale posted:Is this the place to ask for a "help me learn to think in objects even outside of my comfort zone of 3 layers to expose a db as REST services" thing? Because I really do need to. All I've really internalized is enough to work on another system that already exists and answer interview questions. I do not want to just answer interviews I want to really get this stuff because I want to actually lead or architect something some day. What you need to get is not one specific abstraction (like OOP), but that most of programming simply an expression of some kind of data transformation. Relevant Twitter thread: https://twitter.com/lexi_lambda/status/969670598640070656 Learn a purely functional language (no need to go deep into abstract concepts, just to get the basics) and after that return to commercially popular OOP languages and things will make a lot more sense. You'll also get a lifelong depression because it'll be easier to see how terribel everything is.
|
# ? Apr 4, 2018 22:39 |
|
tazjin posted:What you need to get is not one specific abstraction (like OOP), but that most of programming simply an expression of some kind of data transformation. Relevant Twitter thread: https://twitter.com/lexi_lambda/status/969670598640070656 https://twitter.com/lexi_lambda/status/969671047082516480?s=21 isn’t that really about the xy problem though?
|
# ? Apr 4, 2018 23:14 |
|
I failed a nodejs take home for not using OOP. I just used modules cuz I didn’t need state variables but I guess they wanted prototype inheritance or something. The problem was process a text file that’s a list of transactions and print the end state so I just parsed and then used reduce()
|
# ? Apr 4, 2018 23:21 |
|
|
# ? May 27, 2024 03:47 |
|
update: after having different managers yell at each other, I finally officially found out I didn’t get the position with the other group in the company, but the recruiter is shopping me around to other teams in the division and at least 2 are interested, and I should have some phone calls next week. separately, I just submitted for a stint to go be an EPM in manufacturing operations for like 6 months because they’re working on some super-cool stuff and they’re usually pretty thirsty for talent
|
# ? Apr 4, 2018 23:21 |