Made with Drew

Go enthusiast

jodoc-js

So it’s about time to post an update on things I’m working on lately which have been a lot, just look at my github feed: https://github.com/drewwells Today I want to talk a bit about the documentation framework we are now using at work. It’s rather fantastic and based on a python implementation: https://github.com/davebalmer/joDoc. It hasn’t been updated at all this year, but azakus has ported the whole thing to NodeJS!

Testing for optional false params in JavaScript

Sounds like a silly thing, but sometimes you want optional false parameters. If for nothing else than to make your parameters human readable, not just syntactically convenient. So let’s start out: var config = { //blur: false }; !config.blur //Oh noes reports true The trick here is to detect whether the variable is undefined, then for it’s truthy value. Fixed implementation: if( !config.blur === false ){ //Won't execute } config.

Github

As someone that isn’t afraid to get his hands dirty, I find Github to be a god send. It really makes coding a dream, and it makes collaborative coding amazingly easy. The current project I’m working on involves nearly a dozen libraries. There’s a huge difference between those on Github and those hosted else where. For one, the code hosted else where just sits in my lib directory. I make modifications to it and commit to our internal version control system (Perforce).

Leaflet

This is just a quick post, I’m working on putting together a demo using Leaflet. I’m curious if it has the necessary features to port Craigmaps to it, then I will finally have something that runs on mobile devices and can find a new place to live on the go! Anyways, quick demo here

SyntaxHighlighter Evolved is broken

I apologize all of the code of my posts now is completely unformatted and missing syntax highlighting. I have looked into the problem numerous times, and fixed it numerous times. It usually involves removing and re-adding the plugin or doing other things. I am now very annoyed there has been no update to the reason syntax highlighter will stop working after a few days, weeks. I am looking for a new one, preferably one that will not break every couple of days.

Craigmaps

Quick post, I finally got Craigmaps generally stable. It’s a huge series of ajax calls on average 150. This could use some fine tuning or caching. Try it out Craigmaps

Better know JavaScript - Google Static Map

I’ve decided to start exploring JavaScript –not frameworks ontop of JavaScript– in order to better understand what I use but do not understand. First candidate: Creating-map-previews-with-jQuery-and-Googles-Static-Map-API My job is not to directly emulate what is going on in Ray’s Post, but to explore ways to do this in just JavaScript no pesky script tags above your raw code. The only tricky part is tracking onkeyup, I refer to http://www.quirksmode.org/js/keys.htmlfor browser compliance.

NodeJS proxy to simplify IWS API

Normally I learn a new platform by painfully doing some file operations in that language. This is a good way to find out about some of the languages ability to provide synatic sugar atop bad APIs, but a poor way to explore the language. Fortunately, I found a great use for node js. Our corporate server technology is very behind on REST. So I wanted to build a proxy server to convert their API into a RESTful or as RESTful as possible API.

Installing NPM on Ubuntu 10.10 w/o sudo

It took a little digging, I started with these instructions. However you must use npm with sudo and any scripts you download have full access to ravage your system.Running node js on Ubuntu 10 04 The process is simple. If you followed these instructions previously, you need to uninstall it or NPM will continue to install in /usr/local/bin. If you are starting fresh move onto step 2. Step 1. Remove old npm/node cd ~/node-previously-installed .

Sentence Linking and Highlighting

A couple new server upgrades. I’ve moved to Wordlpress 3.0.2 no hiccups so far and I have upgraded to using Disquss. This should make it super easy to post comments on my blog. All old posts have been upgraded to use this. On to this new non-plugin… located Here. I noticed BBQ support is missing, I must have forgotten to push that. I’ll get to that on Monday. NYT has added a cool new feature that this website is calling The Evolution of the Hyperlink.