In this day and age, how is Java still confused with JavaScript?

Back in 1998, when I was only 15, I called into a Q&A style tech show on ZDTV to ask one question that was bothering me: What was the difference between Java and JavaScript. My call was never taken, and my question didn’t come up on the show, but I eventually figured it out on my own.

Many web developers over the years has bemoaned Netscape’s decision to name their new programming language JavaScript, which was apparently an attempt to bank off of the recent success of the Java programming language. It has since led to much confusion, but I had thought that anybody who was even remotely technically savvy would know the difference by now. Apparently I was wrong. Continue reading “In this day and age, how is Java still confused with JavaScript?”

A simple accordion with jQuery, without worrying about off-by-one errors.

As you may well know, it is common in web development to include accordion menus on websites nowadays. It frequently hear people mention around the office how they’re currently working on, “yet another accordion”. Reusable code libraries aside (i.e. saving your accordion code for reuse later), I also often hear people mention difficulties getting the correct accordion row to expand. Whether it is that ALL the rows expand, or the wrong row. Continue reading “A simple accordion with jQuery, without worrying about off-by-one errors.”

How the desktop notification saved the day (sort of)

I was sitting at work this afternoon, getting things done, when I noticed a notification pop up from the notification daemon I’ve been working on. It was for Google Voice (one of the types of notification requests I have written in so far), and read “MISSED: Front Door at Home (62 seconds ago)“. I immediately knew two things:

1. I JUST missed a call
2. That call was from the call box at my apartment, which meant I had just missed a delivery Continue reading “How the desktop notification saved the day (sort of)”

Social Notifier: Now with extra Google Voice and Gmail following

I decided this week that I wanted to add a few request types to the Social Notifier application I’ve been writing in Ruby for the past month or so. If you’ve been following along, it has previously supported following a twitter home feed, twitter list, or twitter search term.

This week, I decided to add functionality to check for new emails in my Gmail account and new text messages in my Google Voice account. Continue reading “Social Notifier: Now with extra Google Voice and Gmail following”

Twitter Notifier application for Linux in Ruby: Overhauled

Last month, I spent a weekend writing a short application to retrieve updates from Twitter and display notifications using libnotify in Ubuntu. Although it “worked” after that weekend, I’ve put a great deal of effort during my free time over the last month toward completely rewriting it to be much more of an application, instead of just a functional script.

Over the last month, I’ve made drastic changes and improvements to the functionality, the code structure, and have made numerous bug fixes. I might has well have ripped out its guts and started over, but it has been absolutely worth it. (code at the end of the post) Continue reading “Twitter Notifier application for Linux in Ruby: Overhauled”

Weekend project: A ruby application to pass new tweets to libnotify in Ubuntu

I was thinking on Saturday morning that it would be nice to have a way to receive ongoing notifications of new tweets while I’m running linux, without having to check my phone, switch to a browser or twitter application, or stop doing whatever it is I’m doing. My first thought was to create a bash script to work in conjunction with twidge, filter out the data, and pass it to libnotify via the command line, but it started to get a little more complex than I was intending. I had wanted the script to be simple, and twidge’s output wasn’t working with me. I decided instead to start over, using ruby to accomplish the same goal: Twitter notifications over libnotify. Continue reading “Weekend project: A ruby application to pass new tweets to libnotify in Ubuntu”

Experiment: Ruby calculator using GTK2

As a project to assist in learning Ruby, the decision was made to build a calculator. I believe it’s a common challenge that developers undertake to learn a new language because—despite the initial thought that it is an easy task—it’s challenging and can serve to sharpen your understanding of the language and how the language handles numeric types. Additionally, part of my original goals was to allow for interchangeable user interfaces, even though I only ever wrote the one, using GTK2 to provide a windowed interface.
Continue reading “Experiment: Ruby calculator using GTK2”

Recursive initialization of JavaScript objects

It’s been a frequent practice of mine lately to write my Javascript as “object oriented” as is realistically possible. Doing so has made my code incredibly easier for me to maintain, document, and read. The more I write this way, the more non-OO Javascript stands out to me as the less desirable alternative.

The purpose of this post is not to explain how or why to write Javascript objects or even best practices. (A good, quick article to read first can be found on Konr Ness‘s post How to Create Javascript Objects.) Rather, I wanted to introduce the idea of recursive initialization of objects and their “children”, if you will.
Continue reading “Recursive initialization of JavaScript objects”