|
Jesus christ, it's an interview problem. Most interview problems you do will be written on a whiteboard. As an interviewer, when we ask those kinds of questions, we're not focusing on code clarity, test-driven design, extensive comments, beautiful indentation or anything else. When I ask interview questions like the game of life, I'm basically looking for one thing: can this person take a real-world problem, described in English, and come up with an algorithmic solution to it. If it's a particularly hard problem towards the end of the interview, I don't even care if you write code. Explaining your algorithm and jotting down some pseudo-code is fine if we're under time pressure. I just want you to express to me that you can solve problems. Syntax is secondary. how!!, I love that you have a beautiful and thorough process for writing your code, that's awesome. However, I have 45 minutes to spend with you during my interview. If you can't convince me that you can solve a problem in 45 minutes, we've got a stack of resumes about a yard high and I'll move on to the next one without a second thought. Interviews are about getting poo poo done.
|
# ? Jul 10, 2012 18:52 |
|
|
# ? Jun 5, 2024 04:30 |
|
pigdog posted:What may be impressive for a smarty forums reader looking for a hip and elegant brain tease may not be as impressive for someone looking to recruit a professional programmer. Just sayin. It's a good thing I don't look for jobs here, or apply for jobs with my posting as an attachment. Zombywuf posted:
yep that looks about right for my code.
|
# ? Jul 10, 2012 19:03 |
|
tef posted:c.f Peter Norvig on sudoku vs TDD blogger. I hate that I've never seen this before. Amazing.
|
# ? Jul 10, 2012 20:55 |
|
shrughes posted:I can answer that: I just made the connection that it's the same person from both threads. Makes a lot more sense now.
|
# ? Jul 10, 2012 22:39 |
|
This has been a really interesting discussion to read through- I'm a (the) web dev at a small marketing firm, and I always have to find the line to balance between writing good code and getting it done. I guess it was stupid of me to think that no one else ever had that problem, but it's relieving to see this play out. I'm self-taught, so I'm concerned with putting out good code so that I can build a portfolio- but like it's been stated, there's rarely a day where I can sit down for more than 45 minutes at a time without doing some stupid little task that no one else seems bothered to learn. I love my job though, any job where the only gripe is the equivalent of a couple of eye rolls is all right by me.
|
# ? Jul 10, 2012 23:09 |
|
biochemist posted:This has been a really interesting discussion to read through- I'm a (the) web dev at a small marketing firm, and I always have to find the line to balance between writing good code and getting it done. The balance isn't as hard as it's often made out to be. The trick is realising that "writing good code" doesn't mean "adding lots of classes." Consider the following (taken from a real world example): code:
code:
Often the best code is clear, readable and really really easy to write.
|
# ? Jul 11, 2012 00:26 |
|
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 |
|
Today I finally got to work with the testing scripts at my internship. Found a quadruple-level for-loop.
|
# ? Jul 11, 2012 02:15 |
|
Safe and Secure! posted:Today I finally got to work with the testing scripts at my internship. Found a quadruple-level for-loop. Imagine that code does something life-critical. Imagine someone opened a crash bug against it. Imagine the dude who wrote it's been gone for years.
|
# ? Jul 11, 2012 05:10 |
|
The only way I would ever write that is if "life critical" meant "you have 15 minutes to fix this or we're all going to die".
|
# ? Jul 11, 2012 05:17 |
|
Ensign Expendable posted:The only way I would ever write that is if "life critical" meant "you have 15 minutes to fix this or we're all going to die". Or it operates an X-Ray machine.
|
# ? Jul 11, 2012 16:24 |
|
MEAT TREAT posted:Or it operates an X-Ray machine.
|
# ? Jul 11, 2012 20:58 |
|
hieronymus posted:Medical device software is a great way to go gray really fast. Say you're a principal engineer for software that operates a cardiac assist device.... and it leaks memory. I've always sort of been interested in embedded stuff and though this might be a great field to go into. Does anyone have any experience in the medical device industry? Is super high amounts of stress actually a common thing?
|
# ? Jul 11, 2012 21:34 |
|
I don't have any experience in it, but I wouldn't expect much stress in it. Your burden of responsibility will be shared with (and documented as such) dozens of people managing testing and approval.
|
# ? Jul 11, 2012 23:30 |
|
I used to work for a large company that made medical software - not the hardware, just the software - but since it was used to aid in diagnoses it was FDA regulated. There was plenty of bureaucracy, literal paperwork, and zero chance to make changes just to improve things. It wasn't stressful in terms of deadlines but it was stressful because you had to make goddamned sure each piece of code you wrote was reviewed six ways and back before it could proceed in the build pipelines. I'd think device manufacturers would have it even worse since you can't just issue updates.
|
# ? Jul 12, 2012 02:36 |
|
So I'm in school at Rutgers just finished Computers and Programming 101. I'm taking 102 in the fall, and then Computer Orginization and Data Structures & Algorithm Design. I'm doing Udacity(currently doing their 101) to supplement my learning and trying my hand at Project Euler(currently stuck on #3). Will this be enough to start applying for internships for next summer? I don't really feel comfortable enough to start contributing to open source on github yet. Though I do have one where I have uploaded my Euler attempts.
|
# ? Jul 12, 2012 12:16 |
|
KidDynamite posted:Will this be enough to start applying for internships for next summer? Well to be honest, that's a really difficult question to gauge. I would say gently caress it, apply for internships regardless. Best case scenario: You know your poo poo, you get an internship and learn a lot and maybe land a job Worst case scenario: You don't know your stuff, feel like a heel for wasting this guys time but gently caress him, you got interview experience under your belt now. So I posted in here two days ago I think it was saying how I emailed my boss at my internship basically asking if I'd have a job here when I graduate in September or not. He told me I would, and that we could discuss it more this week. I assume that will be tomorrow. What kind of questions should I ask? Unfortunately for me, I don't come from a well educated (or educated at all, really) background. Neither of my parents really had "full time / benefits" job with any real retirement plans or anything like that so they can't help me out much. It just occurred to me that I really don't know the first thing about any of this kind of thing.
|
# ? Jul 12, 2012 17:22 |
|
Sab669 posted:Well to be honest, that's a really difficult question to gauge. I would say gently caress it, apply for internships regardless. 1) What % of health/dental/vision insurance is covered for you/spouse/children 2) How good your health/dental/vision insurance is 3) 401k company contribution, if any, and how long you have to stay there to keep it 4) How easy it is to take vacation (don't ask your boss this), how many days and whether or not you lose them if you don't use them within 1 year -- also, possibly, if you get paid for unused ones if/once you leave (which will likely depend upon RI state law) 5) Sick day policy 6) Relocation policy, if required/desired 7) Signing bonus and terms of signing bonus (i.e. have to give it back if you don't stay a year) Everything is negotiable, usually. If you think you got lowballed salary-wise and your boss is not budging, try getting more non-monetary benefits or a larger signing/1-year bonus.
|
# ? Jul 12, 2012 18:01 |
|
Are signing bonuses a common thing in IT / the workplace in general? To me it always seemed like a thing only for more experienced / high up positions. It's a pretty small shop, so I'd be extremely surprised if that was a thing here.
|
# ? Jul 12, 2012 18:21 |
|
Why aren't you applying to other places?
|
# ? Jul 12, 2012 18:31 |
|
I don't really have an answer to that. I guess mostly a lot of doubt in my ability as a programmer so I've kind of felt, 'Hey I got some where that will take me. May as well stop looking.'
|
# ? Jul 12, 2012 18:44 |
|
Sab669 posted:I don't really have an answer to that. I guess mostly a lot of doubt in my ability as a programmer so I've kind of felt, 'Hey I got some where that will take me. May as well stop looking.' As for your self-doubt, if you push yourself to apply to places even though you already have a job lined up if you want it, you will make yourself a better programmer and be much more confident if and when you have to interview for your second job. There are a bunch of companies out there that encourage applicants to solve some problem to apply (i.e. Facebook, Quora, Rapleaf, Thumbtack, lots of SF/SV startups, stuff at InterviewStreet.com). If you get interviews, you'll get a bunch of practice answering relatively difficult questions, and if you don't, you'll know that you need to improve your programming skills under pressure if you want a more lucrative/exciting/etc. job. If you don't aspire to such things once you realize it will take a lot of work to achieve them, that is perfectly fine, but it seems a little premature to do so right now because you don't yet know where you stand. ccrazy88 fucked around with this message at 19:20 on Jul 12, 2012 |
# ? Jul 12, 2012 19:11 |
|
Sab669 posted:Are signing bonuses a common thing in IT / the workplace in general? To me it always seemed like a thing only for more experienced / high up positions. It's a pretty small shop, so I'd be extremely surprised if that was a thing here. I had a relocation bonus, pay-backable if I left before a year, once. That place was a fairly horrible IT/management consultancy that had people work 60 hour weeks, that I left 366 days after joining. Otherwise it's never come up in the 7 jobs I've had in the last 15 years or so.
|
# ? Jul 12, 2012 20:17 |
|
KidDynamite posted:So I'm in school at Rutgers just finished Computers and Programming 101. I'm taking 102 in the fall, and then Computer Orginization and Data Structures & Algorithm Design. I'm doing Udacity(currently doing their 101) to supplement my learning and trying my hand at Project Euler(currently stuck on #3). Will this be enough to start applying for internships for next summer? Doing problem 3 in the obvious way gets me the answer in under a second. I'm not trying to be mean, but I really think you should work on your programming (or math?) skills before thinking about applying to internships. Problem 3 is not a hard problem. I literally started learning to program 2 days ago and I got it in under 5 minutes, and most of that time was spent looking up syntax.
|
# ? Jul 12, 2012 21:05 |
|
I'm a newbie who needs some advice about careers in the software field. I have no background in coding except for CS 101 in college. I loved it, and have a passion for programming despite my lack of experience. I'm currently working in the psychology field, have a bachelor of arts degree, and perhaps want to move into software development. Looking at my options, going back to university for a second degree might be the way to go, but I'm hoping there are other options. I hear that a second bachelor's degree is usually a waste of time and money. My local technical institute offers a "digital media and IT" program which is the closest thing to straight programming they have. There are also online options like Athabasca University which would be nice since I could work. Finally, there's a university in another province that offers a 20-week program to springboard into a masters of CS. Does any of this seem alright? I'm a fast learner and with the know-how I believe I could create nice programs. I wouldn't be happy with basic programming grunt work the rest of my life and would eventually like to work on or produce large, important software or games Is there any hope of self-teaching to make a career in software dev?
|
# ? Jul 12, 2012 21:15 |
|
Judging by your use of 'province' I'm going to take a shot in the dark and guess you're Canadian or otherwise non-US citizen? I don't know of outside the US, but I've seen plenty of job postings that say "Bachelors or equivalent experience" so if you can self-teach yourself well enough and get a nice portfolio I don't see why you would be considered unemployable. 'Digital Media and IT' unless they explicitly state there are programming courses sounds much more like a design degree, focusing on perhaps web design / graphics or other multi media stuff.... My roommate is doing that and they don't teach her Javascript, PHP, nothing. The closest she got to code was HTML.
|
# ? Jul 12, 2012 21:36 |
|
You can get development jobs without a CS degree, it just means you'll always have to work harder to prove that you do know how to program. A "local technical institute" program is not likely to get you a whole lot of mileage there either. A CS Masters degree will work just fine. But actually knowing how to program is more important.
|
# ? Jul 12, 2012 22:19 |
|
HineyBorelTheorem posted:Doing problem 3 in the obvious way gets me the answer in under a second. I'm not trying to be mean, but I really think you should work on your programming (or math?) skills before thinking about applying to internships. Problem 3 is not a hard problem. I literally started learning to program 2 days ago and I got it in under 5 minutes, and most of that time was spent looking up syntax. I got something quickly too I just can't get my implementation to run in under a minute.
|
# ? Jul 12, 2012 22:42 |
|
14 months ago I got a helpdesk job, dicked around with CRT and shell scripts until the devs took notice and I was offered an entry level dev job 2 months ago. On 7am Monday, for the first time ever, a little piece of code with my name all over it will be pushed to servers on over 9,000 of our customer's locations. I've gotten tons of guidance and education by lurking CoC and this thread, and wanted to give a little credit. Too bad you can't break a champagne bottle on a perl script.
|
# ? Jul 12, 2012 23:18 |
|
KidDynamite posted:I got something quickly too I just can't get my implementation to run in under a minute. If you're trying to factor a number n, you only need to test factors up to sqrt(n). You can find the rest based on those. You can also just test the odds on this one. If those don't help, post the code. My implementation in Haskell takes less than a second, so there's probably something really inefficient and easy to fix.
|
# ? Jul 12, 2012 23:29 |
|
Jonny 290 posted:Too bad you can't break a champagne bottle on a perl script. Put the script on an el cheapo flash drive and open a beer with it imo
|
# ? Jul 12, 2012 23:32 |
|
HineyBorelTheorem posted:If you're trying to factor a number n, you only need to test factors up to sqrt(n). You can find the rest based on those. You can also just test the odds on this one. This is what I did. I made a class. code:
code:
Edit: even replacing code:
code:
it still hangs up. KidDynamite fucked around with this message at 01:46 on Jul 13, 2012 |
# ? Jul 13, 2012 01:43 |
|
The reason it hangs is that your for-loop goes through 600851475141 iterations. Note that the factors of a number N are symmetrical about the square root of that number, in the sense that if K is a factor less than the square root, then N/K is a factor greater than the square root (do you see why?). One way to do it is to find all of the factors less than sqrt(600851475143), find the corresponding factor greater than the square root, and then check to see which of the factors are prime. This way is approximately 800,000 times more efficient (why?). EDIT: Also I think it would be more efficient to see if the number divides 600851475143 first and then see if it is prime, instead of the other way around, as you have it. Fewer divisions that way. Also, what the poster below said. buttcoin smuggler fucked around with this message at 01:55 on Jul 13, 2012 |
# ? Jul 13, 2012 01:50 |
|
In addition to the math related changes, you're also creating 600851475141 PrimeNumber objects. Why did you choose to make the PrimeNumber calculation a class?
|
# ? Jul 13, 2012 01:51 |
|
Yeah, sorry I missed that (I don't know anything about object oriented languages). Why can't you just write a method or function or whatever you call it instead of creating hundreds of thousands of objects?
buttcoin smuggler fucked around with this message at 02:03 on Jul 13, 2012 |
# ? Jul 13, 2012 01:58 |
|
HineyBorelTheorem posted:Yeah, sorry I missed that (I don't know anything about object oriented languages). Why can't you just write a method or function or whatever you call it instead of creating hundreds of thousands of objects? You can? Or you could make a static class with a static method to test primeness. You have to create objects because it's an object-oriented language. You decompose your problems into small classes that are responsible for solving one aspect of your problem. For this particular problem, one class is more than sufficient.
|
# ? Jul 13, 2012 02:14 |
|
csammis posted:In addition to the math related changes, you're also creating 600851475141 PrimeNumber objects. Why did you choose to make the PrimeNumber calculation a class? 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
|
# ? Jul 13, 2012 02:15 |
KidDynamite posted:This is what I did. I made a class. Hey man if you want reference material for Project Euler I have a git repository with a few solutions, https://github.com/ebcomalex/project-euler
|
|
# ? Jul 13, 2012 02:33 |
|
how!! posted:
At my current job, I had to write and release publicly an Android library five weeks after starting, as the sole employee on the project. If I worked at your pace, it would of had one feature. Speed matters. So does maintainability, but just remember: YAGNI. Build a bunch of unit tests (do TDD), make them pass, and when you need to refactor just do it. Make it as simple as possible.
|
# ? Jul 13, 2012 04:12 |
|
|
# ? Jun 5, 2024 04:30 |
|
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 |