“Field Trip” fun…

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… unamused

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
Z

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).

http://jsfiddle.net/marshallbu/x9LwD/

Nice new App Creator in ServiceNow

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!

P90X? So 2012. Try the App Creator. | ServiceNow Community.

(Also love the new Santa Clara office building I saw a couple of weeks ago, guess that means no more “renting”)

[update]: Another tidbit one of my friends at the ServiceNow conference just sent me, a way to tie a real editor (Sublime in this case) into working with SN scripting: https://fruition18.service-now.com/sn_sublime.do

Do it the MEAN way

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.

The MongoDB NoSQL Database Blog, The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js.

Can’t get much simpler for quickly and nimbly building an app for a hack, and potentially further expanding it’s awesomeness.

Distractions

While having dinner with some friends, one mentioned how he has blocked distracting sites like social networks, entertainment, etc. on his systems while he works.  I thought lightly of it, until I sat down and realized how much time I spent perusing these sites when I should be getting work done.

As a test, what I started doing was using multiple desktops for specific tasks, and only using certain browsers for stuff (like Firefox for development and Chrome for browsing).  I close all misc apps like twitter, rss readers, or chat, so I won’t be tempted to check out what’s going on on Engadget.  Using my mac and full screen apps also helps greatly, as I have my code editor fullscreen and browser full screen so I can only focus on code, test, code, test, etc.  Doing all the above, I definitely noticed a big difference in focus and throughput.

I think it may be time to try out one of these pomodoro technique apps that I have installed, to play around with break up tasks and fun breaks to see if it helps mentally.  I currently have Concentrate and Vitamin-R installed, which from initial glance appear to have different viewpoints on how to lock down your workflow.  I’ll report back in a few weeks to see how playing with each goes, as I’m sure there’s something I should be doing now instead of blogging.

D3.js

In a recent hack day at work, a coworker approached me about toying around with D3, a cool Javascript library to do really rich, interactive visualizations of data.  Since my last hack day I only decided to quietly redo my marshallupshur.com site, I decided to jump in on the fun.

In a nutshell, D3.js is AWESOME, THE BEES KNEES, EPIC…. and a great way to make you remember geometry laughing

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.

Tech used: node.js, socket.io, d3.js, html5, css3, phantomjs, …

Great fun, I hope to participate in more of these hack days, as it has branched out into me hacking together things for other hobbies of mine…. grin

Good Read: Javascript Enlightenment

Javascript Enlightenment book coverJust finished up this great book a friend passed my way called “Javascript Enlightenment”.  File this under “a book I wish I would have read years ago”.  It is a great read for a couple of days, and if you are really trying to understand some of the key concepts and behaviors of the language, read it.

It doesn’t go into as much depth of why stuff is good or bad, like Javascript: The Good Parts, but it takes the good parts and really hammers them home on how they work, why they work, and when to use them effectively.  If you mostly use provided libraries to get things done, this book will glass door to how these libraries do the things they do, and hopefully start you on a path to writing your own libraries or adding your own contributions.  It also includes the best explanation of closures and the prototype chain that I’ve seen, which finally gave me my light bulb *click* moment of full understanding.

Can’t wait for any other books Cody has in the pipeline.

My new blog!

Since my old blog on mbu Creations is pretty much dead (and I’m working on revamping/upgrading that anyway), I think I’ll start a new one here.  I’ll keep it Tumblr-ish to keep it simple, but I won’t use Tumblr b/c well, I like having more control over my stuff and playing around.

I’ll do posts about general thoughts, things I’m tinkering with, and cool stuff I see around the internet (and in the real world).

This blog may not stay in this overly simplistic state.  Since I love messing around with anything web, I’ll more than likely use this as a test ground for something, be it cool CSS3, some HTML5 wizardry, or some funky JS, expect to see stuff change.

But in the spirit of rapid development, for now you just get quick and simple 🙂