Archive for the ‘Programming’

Binary Clock

December 07, 2012 By: erik Category: Geeky, Ireland, Marketing, Photos, Programming, Reviews

Binary ClockLast Christmas, after seeing me express some coveting interest in a geeky product on the internet, my parents gave me a binary clock. Part of what I love about it is that it reminds me of the very first circuit (with a chip) that I made in my high school electronics class. We had a breadboard – that’s a board with lots of holes to push wires into to connect them, not something to serve a cheese platter on – and a timer chip, a counter chip, a battery, some LEDs, and some wires to connect them. Sure enough, they started blinking and counting in binary! It’s sort of the Hello World of computer engineering.
(more…)

Where are all the video emails?

December 30, 2010 By: erik Category: Damn, Nature!, Marketing, Programming

thumbWith the release of the iPhone 4, and similar competitors, in 2010, video phone calls are just now starting to become more commonplace, although they are often less comfortable or convenient than regular voice calls. Webcam video chatting has been gaining in popularity over the last decade, but it has still been a bit cumbersome, usually requiring a lot of pre-communication communication to decide on a time for the call.

I had one of the very first computer webcams, the Connectix QuickCam, back in 1995. I took it with me to college and actually video chatted with my parents a few times from my college dorm room. At the time, the webcam software and propaganda was very excited about the idea of “video email”, and that, in the very near future, we’d all be sending short video recordings to each other like on Star Trek. But then again, everyone thought we’d be surfing the web in 3D with VRML by the end of the millennium, too.
(more…)

Tags: ,

Parenting Taboos

December 22, 2010 By: erik Category: Colindres, Damn, Nature!, Programming

thumbTaboos are fascinating. My life has never been the same since August 8, 2006, when I read an article about examining what we don’t dare say aloud, and how the amount of trouble one can get in for saying certain things is positively correlated with the likelihood that they are true. Today I stumbled upon a TED Talk by a married couple, Rufus Griscom and Alisa Volkman, who run a website about parenting. Their topic was parenting taboos, that is, what you can’t say about parenting.
(more…)

Tags: ,

How was this working?

July 29, 2010 By: erik Category: Geeky, Programming, Weird

Friendly Bug!An oversimplified description of my job as a computer programmer goes something like this.

  1. I get some requirements for a program from my boss or a client.
  2. I write the program as perfectly as I can.
  3. I test the program with all the cases that I think it will need to handle.
  4. The program is done and people start using it.
  5. For whatever reason the requirements change (or a bug is found), and I have to go back and modify the code. Inevitably less testing is done on these changes than the original writing.
  6. Go to #4.

It’s pretty rare for the original writing of a program to have a significant bug in it after testing, although I’m not perfect. Almost all bugs are introduced in step #5. When you first write the program, the entire program and its relationship with other programs is in your mind. But when you go back to look at old code, it’s just not fresh in your memory, and it’s very easy to make a change without taking into consideration all the consequences that change will have.
(more…)

XML Renderer in Clojure

September 08, 2009 By: erik Category: Geeky, Programming, Reviews

clojure logoI’ve spent the past few days playing around with Clojure. Clojure is an implementation of Lisp, the most powerful programming language, that compiles to byte code that runs on the Java Virtual Machine. I won’t go into just how awesome that is, but there are many technical reasons why this platform decision is equivalent to standing on the shoulders of giants.

Clojure comes with a built-in library for parsing XML files into Clojure data structures, but, for the life of me, I could absolutely not find any implementations that went the other way, to render XML from the Clojure structure that the default parser creates. So I wrote one…in 25 lines of code.
(more…)

Bug in java.util.EnumMap.clone()

May 08, 2009 By: erik Category: Complaining, Geeky, Programming

At work today we found ourselves totally confused by the behavior of one of our EnumMap instances. No matter what we did to it (setting new values, clearing, etc.), when we iterated through the entry set, the values were the same. After investigating the source code for java.util.EnumMap, it became clear that the problem was based on the fact that the EnumMap instance we were working with had been generated by calling EnumMap.clone() rather than using the constructor. I’ve written a test program to demonstrate this bug. It should NOT behave like this!
(more…)

Lisp Enlightenment and Emacs Frustration

July 06, 2007 By: erik Category: Complaining, Geeky, Programming

I have recently had my interest piqued about Lisp. I learned a little Lisp back in college for some Artificial Intelligence classes that I took. It struck me as a rather awkward language.
(more…)

Javascript Gunner

May 21, 2007 By: erik Category: Geeky, Programming

Welcome to the Javascript Gunner page. This little script that I wrote is an example of the kind of thing that can be done with the javascript <canvas> tag and a little imagination. Why should your drawings be confined to the <canvas> tag when the <canvas> tags themselves can be moved around the page?
(more…)

The Shadower – Realistic Drop Shadows in Javascript

December 04, 2006 By: erik Category: Geeky, Programming, Wordpress

This has been done before, but not in such a simple and elegant way, in my opinion. This implementation has four important features that separate it from the rest: no images, no messy nested divs in your html code, no CSS, and realistic fading shadows!
(more…)

Multiple Inheritance in Java

October 23, 2006 By: erik Category: Geeky, Musings, Programming

I have come up with a way to accomplish multiple inheritance1 in Java using interfaces with static inner classes, which I will now present to you.
(more…)