|
shrughes posted:Any good developer would recognize that you can....
|
# ¿ Mar 19, 2012 01:01 |
|
|
# ¿ Apr 27, 2024 13:39 |
|
Daremyth posted:Jesus christ, it's an interview problem. An hour is generous for this problem, but it's not just about the time. We use architecture to cope with complexity. If you give me a (non-working) solution that leans on some high-level design work, I'm going to assume that you just aren't smart enough to be able to keep a 30-line C function in your head. And I'm probably right, too. how!! posted:The code I was trying to write was going to have obviously no bugs. A lot of the code in my github has obviously no bugs, and that code I'm proud of and will send to employers when they ask for a code sample. That kind code is very possible to write, and very fun to write, but also takes much more time. Null Pointer fucked around with this message at 00:56 on Jul 11, 2012 |
# ¿ Jul 11, 2012 00:50 |
|
HineyBorelTheorem posted:The reason it hangs is that your for-loop goes through 600851475141 iterations. KidDynamite posted:I think since I just finished that programming class that's the last thing I had in my mind. Also afterwords I couldn't figure out how to get my prime number checker working within the code regularly. I'm so bad at coding Hints: Do you even need to test if a factor is prime? Is the least factor always prime? What do you have left if you divide a factor out of a number? Spoiler: http://pastebin.com/fvifHVjL
|
# ¿ Jul 13, 2012 04:26 |
|
HineyBorelTheorem posted:What am I missing? His code is Java. You're correct that there are 600851475143 outer loop iterations, but this isn't the basic operation of the algorithm. For outer loop iteration i, the algorithm also performs i-2 inner loop iterations.
|
# ¿ Jul 13, 2012 05:11 |
|
Zhentar posted:If you pay attention and have a decent professor (and thus, actually learn things), it will probably be useful for a decently sized subset of programming jobs.
|
# ¿ Aug 28, 2012 22:47 |
|
how!! posted:He told me me that my solution is better, but theres an even more optimized solution. At that point I pretty much realized he was looking for someone who thinks exactly like him, and that even if I were to happen to get the same solution as him, he is not the kind of person I want to work for. It wouldn't bother me so much if it weren't for the face that literally 99% of phone interviews end up like this. You should study for your next interview by solving this problem for three numbers in polynomial time.
|
# ¿ Dec 13, 2012 23:28 |
|
Pweller posted:The whole point is that the solution itself doesn't even matter at all so long as you explain what you're thinking along the way and don't give up until the interviewer is satisfied. That, and it's a tractable instance of a well-known NP-hard problem with obvious applications (think finance and manufacturing). I can't say I'd be very impressed if someone I interviewed told me that the problem is unrealistic or can be avoided through architecture.
|
# ¿ Dec 13, 2012 23:58 |
|
how!! posted:Real world problem solving is about understand the context surrounding the problem. A problem without context is not a problem, its a pointless puzzle. Why do you have a list of 1,000,000 integers? Why do you need to get numbers that add up to another number? What possible purpose does this code solve? I have a mutual fund which holds 1,000,000 bonds of various values. A client wants to withdraw $k from the fund. What bonds do I sell? What a contrived problem.
|
# ¿ Dec 14, 2012 00:28 |
|
how!! posted:Databases are great at doing that sort of thing. Ah yes, the infamous SUBSET_SUM aggregation operator. I think they added that in SQL 2192.
|
# ¿ Dec 14, 2012 00:40 |
|
Computer Science degrees are useless because as far as I could tell the people I used to work with (before I got fired for incompetence) never used their degrees for anything. That's why I deserve a pass for not understanding basic theory, or even giving enough of a poo poo about my own field to pick up a copy of CLRS. Also, you know, CLRS is a really heavy book, and it's all the way on the top shelf, so it's totally unreasonable for you to expect me to learn any of it. Sigh. Well, if you're going to insist on asking me a theory question, at least give me a few hours to look it up on Google first.
|
# ¿ Dec 14, 2012 02:13 |
|
shrughes posted:The solution isn't to rewrite the entire product? No, that's just how you avoid NP-hard problems. how!! posted:Instead of trying to optimize through these types of algorithms, its best to redesign the system itself that makes this type of problem happen in the first place.
|
# ¿ Dec 14, 2012 02:50 |
|
Pie Colony posted:So..although I'm relatively happy with my job I want to poke my head out and see what kind of offers I can get. I spent the last two hours updating my resume (so I haven't given it a really good look-over), does anyone have any tips? It's a lot better than my old one but it still feels like a bunch of bullshit Definitely cut your objective statement (everybody already knows your objective: get food so you don't die). Anything meaningful you'd put in your objective statement belongs in a cover letter. I would also suggest elaborating more about your specific responsibilities. There's a dedicated thread in BFC for resumes. Career professionals post there so you'll probably get better advice.
|
# ¿ Feb 1, 2013 21:06 |
|
Suspicious Dish posted:OK, so dependency injection is basically "implementing interfaces". Dependency injection basically means not using "new" in your constructors. Instead of objects instantiating components, they consume them from an external source. This can be as simple as passing components as constructor arguments, or as complex as using a DI tool to automatically inject the dependencies at run-time from a config file. The point is that you are able to isolate the behavior of your code from the code you call.
|
# ¿ Mar 1, 2013 08:35 |
|
Suspicious Dish posted:I thought that was a factory? A factory lets you isolate complex object initialization code. DI is what made the initialization code complex in the first place.
|
# ¿ Mar 1, 2013 09:08 |
|
Tunga posted:What, exactly, can LaTeX do that GDocs or Word can't? LaTeX sounds complicated but it's secretly a much lazier way to write. You can leave all of the styling minutiae up to document classes and packages, and you'll still end up with something that looks very good. But the advantages all sorta fall apart when you start talking about writing a custom document class for a one-off 1-2 page resume.
|
# ¿ Nov 11, 2013 02:10 |
|
|
# ¿ Apr 27, 2024 13:39 |
|
Everybody knows you should write your resume in XML. That way the HR rep can write an XSLT stylesheet to convert it into whatever format and document type they prefer. Nothing screams professionalism like having nothing better to do than eternally chasing the minimally non-technical way of completing simple tasks.
|
# ¿ Nov 11, 2013 02:33 |