I hate getting tripped up on silly interview questions, and I usually always rework them afterwards to see what brief moment of dumbness I was suffering during the interview.
On a “field trip” I took recently just for fun b/c of who it was, I had a problem presented like this, with a jsFiddle link to my current solution below.
GRRRR at how easy this was in thought after the interview…
An interview question, to create a generic function that will give a path for cursor animation on a “search menu” that is displayed like:
A B C D E
F G H I J
K L M N O
P Q R S T
U V W X Y
With a path given like “R!L!DDDRRRR!” when searching for “BAT”.
The problem assumptions were that you are always dealing with uppercase letters, no special characters, no spaces, etc. The beginning always starts at ‘A’. You are also given a dynamic width (to worry about), so your function can traverse any size menu. I got tripped up on this after getting barraged with a bunch of core JS language questions, so here’s a stab at the solution, minus some additional work to not traverse boundaries (outside the matrix or in places where there are no selectable letters).
Well, I wish I would have had this at a previous job. This is really nice approach to building apps in the system, and will definitely make it easier and quicker to build IT apps without muddying up the core application, and further “hindering people from trivial tasks”. With the amount of hacking I used to do in there, I wonder how hackable this is in the sense of keeping everything contained. I’ll probably do some tinkering with their demo site just to see. Well done ServiceNow!
After fully playing with AngularJS for a recent hack at work, I fell in love with it’s simplicity. Using ExpressJS, NodeJS, and AngularJS together is awesome, but then I ran into some headaches (that I easily worked through) using Redis as the NoSQL db. After reading this article, I think I know what I’ll be experimenting with on the next (next) hack day.
In a nutshell, D3.js is AWESOME, THE BEES KNEES, EPIC…. and a great way to make you remember geometry
We ended up creating a visualized way of monitoring events with our home product, so you can see alarm notifications, arming info, etc. all on a cool little graph. Best thing about, it’s all real-time, must better than the cached long poll list that is there now.