Tapping into the Bird World.

Its been a while since I’ve done a development update and wow there is so much that has happened since.  Because time is short (on your end and mine),  I’ll try to condense this into a quick update.

First some small things I’ve accomplished.  Had two challenges to complete,  one was checking to see if words in different arrays were anagrams and another I was given a bunch of bracket, parenthesis, and curly braces and had to make sure they closed properly.

The anagram initially seemed really hard as I was going through a loop function to check if first the words were same length, and then go through letter by letter to see if one contained the other.  (Btw if you don’t know an anagram is when two words have all the same letters such as ‘lamp’ and ‘palm’).  This worked fine until I noticed ‘aha’ and ‘hah’ was passing as true,  because the loop was only checking and saying ‘Yep there is an A’,  ‘Yep there is an H’, but not how many of them.  So instead I had to export each word into their own array and then do a sort and compare function.  This got it working good.

Next the bracket test.  This one really got me good as there was some tough logic to work out.  Essentially you have an object with different variations of brackets, parenthesis, and curly braces which you have to see if they are properly done.  So this ‘{()}[]’ would be good since each closes properly,  however this ‘[(]){}’ would be incorrect since you are closing the bracket before the parenthesis that was opened inside it.  The logic I came up with was a loop that checks to see if it is an open or closed,  it if is open it marks it as open and moves to the next.  If it is closed, it runs a function to check to make sure it is properly closed (matches the one open),  and that anything inside of it is also closed (so it checks the one to the right and if isn’t its match and isn’t marked as closed then it returns error).  This logic seems to have worked okay.

Now on to the real project,  the Twitter client page.  For this we overcame the challenge of getting it hooked up to LIVE data!  Woooo!  So I went through the Twitter API and get my keys and all that good stuff.  Then plugged it in and flipped the switch to pull in live data.  At first it ended up crashing since the live data structure was a little different from the test data we were using before.  Once I made the adjustments for this,  it started working good.  Then the next challenge presented itself in trying to get endless scroll working.  This took some tweaking and adjustments again,  but after a bit got that working (up to about 7 times before Twitter cuts me off,  will check into that later).

So things are progressing along and I’m now diving into some deeper reading materials as well.

First I order this book: JavaScript Definitive Guide

Then I also found two great online resources I’m reading through as well:

First is Eloquent JavaScript which not only is a great book but the online version hooks up a console so you can test code along the way.

Second is for learning Backbone.js called Backbone.js Applications which was produced by O’Reilly who also produced the JavaScript Definitive Guide.

So I have a lot of reading and playing around ahead and hopefully will be making something cool to show you soon.

Leave a Reply