A brand-new project and my first (here) in Node. It’s a simple-to-use converter to make HTML out of XML docs. I’m hoping to add other output formats later on.
Category: Code
Using JavaScript to Find Prime Numbers
There’s a relatively common interview question that asks you to write a chunk of JavaScript to find prime numbers. I thought I’d tackle it without the pressure of someone watching over my shoulder. To that end, I built getPrimes.js to do the work for me.
Using HTML5 Data Attributes
One of the coolest features in HTML5 is the data attribute. You can now build out attributes on your own to customize content as you see fit. They aren’t rendered by the browser, simply added to the objects as data for you to play with. Let’s have a look.
PodRadio.js – Cross-Domain JS Podcast Player
Ever wanted to load a podcast (or several) onto your web site, but didn’t have the resources to make a proxy to get around cross-domain scripting issues? Worry no more! PodRadio.js is here.
Building an Array of Tags/Categories Using jQuery.inArray
I had a problem that I got to solve using something I rarely (if ever) use: jQuery.inArray(). While working on a new tool for doing Improv practice, I came across an interesting problem that might be worth sharing.
Gwaker – Chrome Extension Tutorial
Got to playing around with Chrome extensions and put this one together. There are a few simple plugin demos out there, but I thought this one was short and sweet.
Snap-Points.js – Add snap-to functionality to your page
If you want to add snap-to functionality to your web page, check out this ridiculously easy-to-use JavaScript library.
Just add it (and jQuery) to your page, then define which HTML elements you want to make the snap points. I love simple-to-use code, don’t you?
I’ll add onto it later as new ideas pop into my head. Right now, it’s using a timeout to account for the fact that there’s no scroll-end event in the DOM or jQuery. I’m not a huge fan of timeouts, but in this case it seems to work. I’d like something more elegant going forward.
A Simple JavaScript API
Getting started building an API can be tough if all you’re looking at are big, monstrous (but useful) APIs. To combat this, I’ve built a really simple API to redirect users based on the hash in their URL. It initializes, take external data, and returns a response block.
HTML5 Tags You Should Be Using Right Now
I’m still amazed at how often we’re passing up the chance to use HTML5 tags in our documents. It’s hard to break old habits, I know, but it’s time to dump the mountains of DIV tags and get with some semantic markup. There are several awesome tags to start using in HTML5, but I wanted to hit six good ones to start people off.
Continue reading
Modular JavaScript as Parts of Speech
You all remember parts of speech, right? Nouns, verbs, adjectives, pronouns, and so on from elementary school, right?
Well, some of you do.
This came up during a discussion of object-based programming with JavaScript. I was searching for a way to best describe how the various parts of JavaScript can work together in a structured, maintainable manner. Rather than trying to explain MVC to junior devs, I came upon the idea of using parts of speech. In particular: Verbs, Nouns, and Adjectives.