Backbone Apps, Express Apps, Client side unit tests, Korean, Gadgets, Videos

Thanksgiving is coming soon, and these days it does seem like I need a break.

What an interesting year it’s been for me. Multiple broken friendships/relationships, lost over $5k in parking fines, lost over $10k in stock options, multiple missed opportunities, a broken wrist, failed drivers test, I could go on. This year has not been one of my better years.

Just two months ago, I posted about how Bitcoin was a good investment, but never took the time to actually invest in it (due to confusion about how to actually buy them). Well now, Bitcoin is over $1200 (it was $135 at the time I posted that). So a potential windfall opportunity has gone past me.

These days, what do I have to look forward to? Just work, and study. Pretty much my life these days.

Client side unit tests
On the work side, I’ve been writing a lot of client side javascript tests recently, and its really made me more interested in them. Originally, I was not too fond of writing unit tests, as I felt them tedious, but now I find them kind of challenging. Jasmine is a popular client side testing framework, and getting it to work well with Backbone models, routers and views, is a good challenge. I’ve also been using libraries like SinonJS to mock/stub/spy out functions/objects, ChaiJS to unify the TDD/BDD style assertions, Karma as a test-runner, and Jasmine-jquery to test out dom events. Now I’m trying to mock out RequireJS dependencies (Squire.js/). It’s been a frustrating but enlightening few weeks trying to get my head around client unit tests.

BackboneJS extensions
Also, been trying to move from using string based templates like handlebarsJS into using dom-based templates. I really really want to get RivetsJS to integrate with BackboneJS so we have computed properties and data bindings (thanks to dom templating) but it’ll have to wait until we refactor all our handlebars templates to use Rivets Views instead. What other things do I recommend for a large Backbone app? Controllers and Container Views. MarionetteJS provides those. Also, use lodash instead of underscoreJS (It has more features).

NodeJS / express
I’ve really gotten around to liking NodeJS / ExpressJS so far. Using the ExpressJS API is easier than having to learn Apache modules and servlet containers and all that stuff. To be sure though, its quite different than the usual JavaScript you’d expect.

On the studying side, is my Korean getting any better? I’ve been taking classes now, and it feels like they focus more on writing and reading, which are traditionally the pillars of language education. Recently though, I’ve been subscribing to the Pimsleur approach of focusing more on speaking and listening instead. In fact, speaking and listening are the hardest things for me right now, and I constantly struggle when I listen to Koreans and figure out what to say. These days, I’ve been using korean dramas (a la drama fever) to study by listening, and repeating what the actors are saying and watching multiple times with and without subtitles. It’s an exhausting job trying to learn Korean when everyone around you speaks English and the opportunities to meet Koreans are few and far between, seriously. And it also doesn’t help that what Koreans speak and what textbooks teach you are different. For example, my Korean friends told me that 당신 and 실례합니다 are not often used in real life, despite being in the book as ‘you’ and ‘excuse me’.

I bought an iPhone5S, an iPad Air, and also have the chance to get Google Glass (as a BitTorrent developer) as well. What do I think? I really like the iPhone of course, as I tend to prefer smaller screens and the iPhone5S probably has the best camera in the business. The TouchID thing is pretty cool too. The iPad Air also surprised me. I didn’t think an iPad could replace my MacBook, but after using the iPad a few days with a bluetooth keyboard, I can honestly say that 90% of the things I can do with the MacBook (except programming), I can do with the iPad, and the iPad has LTE on top of that and only weighs 1lb so I can use it anywhere. Surprising, I might have to sell my MacBook.

Anyways, I haven’t updated recently because my life is fairly mundane so far. I did upload several videos though, so take a look:

San Francisco’s Hidden Gems (my friend helped me with this one):

iPad Air vs Kindle Fire HDX

Sony HMZ-T3