Computer Networks on Coursera

Can’t recommend this course highly enough if you’re a web dev of are doing work beyond one device.

It’s a very bittersweet course, as I continuously run into concepts that make me go:“I really should already know this like the back of my hand”, but oh well, it’s never too late.

David Wetherall is a very pleasant instructor and does a superb job.

I have to say I have a much better understanding of networking internals now and this is a good ramp for diving into meatier material such as http://www.amazon.com/TCP-Illustrated-Volume-Addison-Wesley-Professional/dp/0321336313

Computer Networks on Coursera

nREPL

Want to be able to connect to your clojure Ring-based web-app as it’s running and read/edit its code in real time? No problemo.

Add the clojure.tools.nrepl dependency, and defonce the server somewhere in your handler with a port of your choice. Now you can just ssh into the web app’s box and use your repl of choice (I use Leiningen for simplicity) to play around with things. Really convenient for debugging, since with Clojure you almost never attach a traditional step-through debugger to running applications.

For bonus points you can use cemerick’s Drawbridge to enable logging into your app through the existing HTTP(S) routes. No need to expose additional ports and figure out how to secure that properly (since default nREPL is passwordless, as far as I can tell. That will only work until the first nmap). What’s neat is that you can in fact keep using the same auth mechanisms you already have in place, except this time for administrative REPL access.

nREPL

Fueled by coffee

Got a chance to finish converting the rest of the site to CoffeeScript. A bit easier now that 90% of the really nasty math was moved closer to the data into our API code.

http://js2coffee.org/ is a great tool for quick conversions, I haven’t had any trouble with it except for the occasional “arguments” variable being sanitized for me when it really didn’t need to, causing a bug. Other than that, very impressed by how nothing really blew up in the process.

Still a bit conflicted about whitespace delimited languages. I appreciate the cleanliness, but with some of the more complex nested operation it leads to a total mess. Coming from a very predictable parentheses-heavy language makes it even worse.

When there’s a bit of downtime I’ll need to check out ClojureScript. It’d be nice to have the same language on both front-end and back-end and Google Closure compiler might turn out to be saner than r.js and its optimized. I like the idea of using their AMD, but I’ve had issues with r.js’s source mapping (supposedly still in experimental stage) when the site is collapsed into one giant payload, which makes debugging minimized code unfeasible sometimes.