Calculating Page Percentage with AngularJS

September 8, 2014 - Tags: , , , ,


While browsing /r/webdev this morning I found a post by /u/ellenbrook regarding a nifty script using jQuery to calculate page percentage on scroll. Since I’ve started to learn AngularJS I’ve been trying to transition from jQuery and took the opportunity to challenge myself. In this write up I’ll be using RequireJS, Sass, CoffeeScript, if you aren’t familiar with it you can use js2coffee for in-browser two-way conversion. Scroll to the bottom for the demo, or read through and follow along.
Read more…

Using AngularJS to Pull a Searchable Facebook Event List

May 29, 2014 - Tags: , , , ,

If you fall into the 1.11 billion users (Source: Facebook Inc.) then there is a chance that you have ‘Joined’, ‘Declined’, or even said ‘Maybe’ to an event invitation. Some Facebook Pages have a lot of events and I wish there was an easier way to filter through the muck (sure there’s a search, but it could use work). Today I’m going to show you how I used the Facebook Graph API in conjunction with AngularJS to call, display, and seamlessly search for Facebook Events provided by a local venue: Brighton Music Hall.

Creating Your Facebook Application

Before you begin, you will need to create a Facebook Developers account. You can find this under Apps > Register as a Developer (Figure 1) and accept the terms (Figure 2). Next you will need to navigate to Apps > Create a New App. After that is done, you will be asked to name your application (Figure 3) and we can finally begin configuring our options.
Read more…

LESS and SASS Presentation

June 5, 2013 - Tags: , , , , , , ,

On Thursday, May 30th, I held a presentation for the Worcester Web Technology Meetup group regarding LESS and SASS, two style sheet pre-processors that will make a developer more efficient. Last year I wrote an article introducing LESS, which touched the surface, and I hope the presentation gives even more insight to the tool I use every day. Read more…

Fun With Numbers… and Python

October 24, 2012 - Tags: ,

My Professor

We have all had the professor like the one I’m about to introduce, and if not– I’m sorry you missed out. He starts the class most of the time with brain teasers of various skill levels. From metal ring puzzles, to sly formulas he entitles: math-a-magic. Before today’s lecture of proving the volume of a cone, he gave us this math-a-magic:

Take any number greater than 1 and less than 10
Multiply it by 2
Add 5
Multiply it by 50
If you had a birthday before today, this year, add 1762
If not, add 1761
Subtract the year of your birth (e.g. 1990)
The first number of the answer is the number you began with
The next two numbers designate your age.

As a self-taught computer scientist I immediately saw it in terms of conditional statements, inputs and outputs. So what would any student that is paying to go to college and is assumed to listen to lecture do? That’s right, took out my laptop and brushed up on my python skills. You can run it online, courtesy of, but here’s the code below: Read more…

Creating a WordPress plugin

September 30, 2012 - Tags: , , ,

Up until now, I had no prior experience with creating a WordPress plugin– sure, I know a decent amount of PHP and how WordPress works, but this opened a new door for me.  I’ll show you my step-by-step process in creating a plugin that adds the open graph tag (og:image), to your header, or more commonly known as the Default Thumbnail displayed when posting your link on Facebook.

What is a plugin?

A plugin is a way to extend WordPress to almost anything imaginable. From Twitter feeds, to Google Analytics settings, WordPress allows you to extend the functionality of their product to a developer.  In this case, it allows us to select the image or URL we want to display when posting our website to Facebook. Read more…

To myself and others: RTM

September 18, 2012 - Tags: , ,

In addition to code snippets and other small projects, I have used this blog as a way to keep notes to later reflect upon. However, unlike the previous posts: experience with json, introduction to less, and others, all code will one day be legacy and no longer used as frequently. There will be a time where PHP isn’t used as heavily, and we’re starting to see that as the rise of python, ruby, and others make their way to web applications. What will be used in the next day, month, year, eon, will be the philosophy: Read The Manual.

Make The Docs Your Holy Book

Whatever machine you’re developing on, you will always have access to some form of manual pages (man on *nix, /? or /h flag on Windows), and it is this that truly will make you a better programmer, a better problem solver. While taking a programming course in High School we weren’t allowed to use many resources except the documentation, and this amazed me as some students still did not have enough resources they need to result in a passing grade. Where they fell short was the lack of understanding with the documentation; the language was foreign to them, like an old-English holy book. The documentation and man-pages are the rules of the code. Today, in Python, the documentation is bundled with us; allowing us to type help(..subject..) and we are given the docs to this function, however, if we can’t decipher what it is trying to tell us– it’s useless. Read more…

LESS code, more fun

September 2, 2012 - Tags: , , , ,

There’s always a moment when you or I are programming and we say to ourselves, “I wish X had Y functionality,” and at that moment there’s a John Resig there to make us JQuery for Javascript. Well this time we are talking about the CSS ‘framework,’ LESS by Alexis Sellier who has saved me lots of time, and lines of CSS. If you haven’t already given LESS a try, now is the time.

What’s wrong with CSS?

Nothing is considerably wrong with CSS, however, much like an over-privileged child, we will continue to want something more, and LESS is more. If you have written thousands of lines of CSS in your web development career and have wanted simple things that other languages have: variables, nested capability, and functions… LESS has these, and a lot more. Ever get tired of copy and pasting all the different browser prefixes for each radius, shadow, et al? “Mixins” will take care of that. Read more…

Austin, meet Processing

September 1, 2012 - Tags: , , , ,

For those who do not know me on a nerdy level, allow me to introduce my nasty habit. I like to dive into new languages and try them out for a bit, see how they work and occasionally move on, very much like my book collection.  Though I do have my web arsenal of PHP, MySQL, HTML, Javascript and CSS I have become familiar with other types: Java, C++, Python, Ruby as well as popular frameworks they carry. Recently, one of my friends have introduced a new language to me, “it’s cool, it’s blazing fast, it’s going to be the next biggest thing, it’s called Processing,” he explained to me, and I had so many questions. Read more…

Working with Last.FM and JSON

February 18, 2012 - Tags: , , , , ,

More and more recently, applications are opening their doors to developers that want to build off their system. API — application programming interface, is such a way for creators to give you the code you need for certain parts of their apps. Many of these API calls will result in an XML file that which supplies ‘Elements’ with corresponding ‘Attributes.’

These days we need different options to work with data on the web due to advancements in JavaScript. JSON — JavaScript Object Notation, has been that advancement for us. An application submitted to An Event Apart’s 10K, entitled Front Row, used JSON and tMDB’s API to search for a poster by movie title. Seeing this application in action fueled me to create my own JSON application, and I call it: Disco.graph. Read more…

Building a Social Network

February 13, 2012 - Tags: ,

Many argue over the quote, “it’s not what you know, but who you know.” I find both to be equally as important, with a bit more weight on the connections. In the February 6, 2012 issue of Fortune magazine, Reid Hoffman, founder of LinkedIn, explains the importance of networking in his article: The Real Way to Build a Social Network. Hoffman breaks down what a true network should be by growing your alliance, explaining how to appear authentic, determining the importance of a “weak tie”, and how offering help can work in your favor instead of resulting in failure.

If you currently look at your network of connections you may realize that it needs improvement. Hoffman suggests that, “most professionals maintain five to ten active alliances.” He also suggests that in order to obtain a greater social network, you must first strengthen your alliance. That sounds easy, get a bunch of professionals and hand them your card; If only it were so. Cold-calling and throwing around your business card at cocktail parties is a sure way for your number to be rejected and your card to be converted to a coaster. Read more…