12 ms·
Coding Interview Preparation in JavaScript
- belzebub 11y agoSite is down unfortunately. Edit: In safari, javascript error in web inspector ironically.
- fahimulhaq 11y agoHi belzebub, Co-founder here. Can you send me more details at fahim {-at-} educative.io?
- softawre 11y agoDown for me too, just run the app in mobile safari. Works on Firefox OSX.
- fahimulhaq 11y agoWe've found an issue with Safari Private Mode (OSX and Mobile). Thanks for letting us know.
- coverband 11y agoI didn't observe the problem but I'm curious -- what property of the Private mode caused your bug, can you share?
- fahimulhaq 11y agoSure :). We are using local storage to cache some information and apparently local storage is not available in Safari's private windows.
- Bahamut 11y agoFWIW, that is a fairly known frontend issue :) . One cannot rely on that returning any data.
- fahimulhaq 11y agoHaha yes it's a learning phase for us. We are a team of 3 who spent last ~10 years programming backends in C/C++. So we are learning Web Technologies and fairly known frontend issues are new to us.
- sobanhameed 11y agoAnother co-founder here. +1 on us being beginners on Front-end technologies. To be a bit more specific about this issue we are actually using an outdated version of a dependency 'pace' that uses local storage (they have taken it out in new version) so hopefully with an upgrade this issue will be resolved. Based on your feedback we will make sure to prioritize fixing this.
- jlas 11y agoTurns out getting a production site up and working has little to do with finding the k-th permutation...
- mlvljr 11y agoGolden.
- polishninja 11y agoI laughed out loud at this one after reading all the serious, in-depth posts above.
- mycroft-holmes 11y agoThe sample problems are...well let's just say if every dev I work with had to solve those problems on the spot right now, there'd be no developers in the office tomorrow. And guess what? We still push code. Our application is still being built. It's problems like that which terrify newbies.
- jordache 11y agoagreed.. hate these algorithmic questions... very applicable if you just finished taking a comp sci midterm. I would venture to say there are a small set of positions where you'd use these exact skills on a fairly frequent basis.
- mycroft-holmes 11y agoExactly. I can't tell you the number of positions I've interviewed for with very challenging questions when their entire app is a basic CRUD app. Many views, basic CRUD. Everyone thinks they need the best.
- belzebub 11y agoWhich one are you referring to specifically?
- softawre 11y agoAgreed. I have a spot open now and have done ~10 interviews in the past couple months. We do something much easier - "write a function to return whether a string has a balanced number of parenthesis". Essentially a number, +1 for (, -1 for ), return false if <0, return true if 0 at end of loop. 20% of our applicants pass this, and they all go through a phone screen first..
- Chefkoochooloo 11y agoThis is what is so intriguing to me about education. We all go to school and learn about problems like these, but we retain so little information without brushing the dust off of our old Comp classes and review the material.
- jordache 11y agomaybe we learned how painful those were and solution our ways around to needing them? :)
- nawitus 11y agoI would love to implement more algorithms at my job, but it's a really rare occurrence. Mostly it's just CRUD, gluing stuff together and making tech choices.
- pramodliv1 11y agoMy role is similar to yours too. But I'm not confident of solving tough algorithmic problems under deadlines yet. I'd rather work on a side project which involves designing and implementing neat algorithms.
- GoToRO 11y agoit's quite simple actually: football players train by doing all kinds of crazy exercises, none of which you will see in an actual match. But this is what training is. You won't hear a football player say "why do I have to do push-ups? I've played 1000 matches and never, not even once, did I need to do a push-up!". School is training too, it makes your brain stronger. School is also a filter for future scientists. In my country school was always about learning the fundamentals. What you will actually do on the job you will learn... on the job. Nowadays there are more and more voices asking for more practical classes but I feel this is risky: if you know the fundamentals you can quickly adapt. If you only learn how to do one practical thing you will have to retrain when that thing becomes obsolete.
- 11y ago
- jbob2000 11y agoSo today I had to implement the XDomainRequest API to support IE9 for one of our features. Yesterday I worked on a branch to upgrade our front end framework to a newer version. The day before that I was refactoring out our old API from an older module. Last week I was working through a specification document from our product team to implement a new interface. Where, in any of my day-to-day job duties, am I going to need to find the kth permutation of a set of numbers? or clone a directed graph? If someone presented me with these questions in an interview, I would be tempted to leave. And in reflecting on my job as a coder, I find that most of the work I do is janitorial; clean this up, add support for this, fix this, talk with product about this, break this up into smaller pieces... Never once have I had to implement a feature that would require these types of algorithms. Like 98% of my challenges are "this needs to work this way, but that needs to work that way, how can we make them work together?". I'm not picking at educative.io per se, they're just a symptom. It just really sucks that there are some companies out that believe that if you can rattle off an algorithm, then you must be a good coder.
- nothrabannosir 11y agoNot defending the interview, but: It just really sucks that there are some companies out that believe that if you can rattle off an algorithm, then you must be a good coder. The implication is (not able to do X) → (not a good coder), not the other way around. They imply: "Doing this esoteric mathematical stuff is a requirement for being a good coder. And there are more requirements." EDIT: strictly speaking, they don't even imply that. It may be they just consider this one of the many possible signals. Maybe they only count it if you pass. Again, most cases may actually well be as you describe. But some might not be.
- marsinvasion 11y agoI remember an interview where I was asked to solve an algorithm from my college days. In the 10 years out of college, I've never needed it and to remember how to solve it during a timed interview seems completely unreasonable.
- krapp 11y ago
- iamflimflam1 11y agoI don't think I'd ever ask these algorithm questions in an interview. Much better to sit down with a candidate and do some pair programmer. Add some unit tests to some code, add some small new features. Can they grok an existing code base easily. Do they understand why we are writing unit tests. Etc..
- fapjacks 11y agoI interview for fun as a habit, and pair programming is definitely my favorite kind of interviewing. Like I still get nervous even for interviews I have no intention of following up on, but a lot of those butterflies go away when they mention there will be pair programming. It's just more fun, I get to meet a specific engineer at their company, and I feel like they get their answer way better than if they'd used another technique. Answer as in "is this dude who we're looking for?".
- reledi 11y agoWhat do you mean you interview for fun as a habit?
- fapjacks 11y agoI started "practicing" my interview skills a few years ago by... interviewing with companies. Interviewing is great for keeping your skills fresh, for learning new things, and for meeting cool people working on cool projects. It's a lot of fun! And it has the added benefit of giving you opportunities at new companies, if you end up finding a better position than the one you're in. Just keep it on the DL from management at your current company. For some reason, they don't like it when employees do that.
- truncate 11y agoI would love these kind of interviews to happen, but it comes to this question - does the interviewer or the candidate is willing to spend this much time? I'm in university, and it would be hectic to give every interview this way. I see this work better with non-entry level positions, assuming candidates apply to fewer companies and companies have fewer candidates to interview.
- joeax 11y agoMy two cents, but for these algorithmic questions the language shouldn't matter. Are you hiring someone deeply proficient in data structures and algorithmic programming? Then let them solve it in their language of choice. If the role is JavaScript-centric, how about a question specific to the language like Describe the difference between var and let, and when you would use one over the other?
- z3t4 11y agoPermutations are more a IQ test. The closest we have in JS is implementing a "marquee tag". Traversing JSON, or cloning an object or array is actually somewhat common. But I find it funny that the solution is to make a Class, having a "for in" loop, and variable declarations in a loop. It's clear that the one who made that solution has never done any serious JS coding silly smile I could make another rant about making a new Class for each problem. You want to write code that is easily removed, not complexed!