Tag Info

New answers tagged

8

I agree with the comments that he was likely looking for HTML5 local storage, and may have expected you to have experience with it. Frankly, unless it was an integral requirement of the job and you stated you had experience with it, his expectation and reaction were unreasonable, in my opinion, for anyone with any amount of experience. Why? Because, three ...


5

The 'correct' answer - at least, the one they were looking for - was indeed HTML5 LocalStorage (an excellent link by Steven Burnap). And the interviewer was probably being...well, I believe the technical phrase is "a bit of a knob". This is basically arrived at by process of elimination, in that a cookie cannot be anywhere near big enough, sessions are ...


0

I'd look at it as a question about how do you learn and what sources do you use. For example, would you look up questions on "StackOverflow" or blogs or books? Some people may not use such sources and thus the question can be hard to truthfully answer as the follow-up question would be about what was the last time you used one of those and how did that go? ...


0

I think it's not a reasonable thing. We try to find candidates, which are good at the task we want them to do. Writing code on a whiteboard is not one of them and I don't think it's a valid filter to find good candidates. Good code doesn't get written, it gets rewritten. A whiteboard is pretty much immutable, as it's hard to change once you wrote it. It ...


0

My best tips for interviews is to (1) have some stories ready about times when you accomplished something quite well; (2) emphasize what you can do for them rather than explaining your attributes, and (3) keep your answers short, but more than a sentence. My favorite interview article source is Ramit Sethi: ...


3

Don't prepare. An interview, when done reasonably, isn't a test that you can cram for. Sure, you can go and memorize all the different ways that static is used in Java. Or go and try to remember if some language is call by value or call by reference. Or the specifics of MVC and what each layer does and what not. However, those are really the boring ...


4

This is my advice, and it has nothing to do with whether using break is good or bad: Code the way you code. They want to know how you code, not how you think they code. You may be thinking that it's best to outsmart the interviewer by telling them what they want to hear. In a worst case scenario they'll hire you, and then you'll look like an idiot because ...


2

This question is at risk of being a duplicate of Are `break` and `continue` bad programming practices? but I will try to give a more theoretical explanation. I forgot the reference but I would appreciate if someone can find it and I will be happy to include it here, or you can edit into my answer without asking if you have the reps. The theoretical ...


-3

Personally, I would frown upon break outside of switch statements. But that said, I would frown more if the code was wrong. If break is what you're used to and you can produce functional code with it, go nuts. It shouldn't disqualify you from any job. It's hard enough to find competent programmers. Competent programmers that code in my preferred style are ...


4

Along with use of semicolons in Javascript, whether to use vi or emacs in the Unix world and whether to use a single return statement in a function it's a controversy that often doesn't make sense to most production coders. If it makes sense to use it and the code remains clear, then I think you'll be fine. If not, then don't use it. Now knowing the ...


4

I once asked that question to a friend whom is currently employed at microsoft (at was at the time employed in the team working on Project Volta, now known as "Reactive Extensions"), because at university my lecturers used to say that "breaks are bad". He had a chuckle and said it was probably a lecturer whom never wrote industry code. Seeing as they use ...


0

Do you use the exact same code that is more than one or two lines in other parts? split Will you do it in the future? split


1

This is heavily dependent on your situation at hand. You don't give much surrounding context. Who are you writing this for? Is it a throwaway script to fulfil a specific need right now or do you intend for it to be used and maintained further on down the line? If you're writing it for yourself then you can do whatever you want, it's only you that will be ...


4

There is not a "right way", you have to choose when "promote" a fragment of code in a method. Usually it make sense create a new method: when your main method is too long, bloated or complex (code readability/maintainability) when that fragment is used two times or more (no code duplication) when that frament could be used from two methods or more (code ...



Top 50 recent answers are included