Thursday, May 20, 2010

JavaScript phone number reformatting, programmatically setting onblur

There are two problems I solved in a hurry last night that are apparently talked about a lot in JavaScript forums:
- Detecting something in a text input field that looks like a phone number. and remformatting it to the standard (xxx) xxx-xxxx layout
- Programmatically setting the onblur of a text input field

Thursday, May 13, 2010

Some feedback, s'il vous plaît

I've been keeping an online journal for about 10 years now, in one form or another. I kept the site auterytech.com as my domain running on a headless, older Debian box running in a closet until about 5 years ago, when I converted to Blogger. I signed up a gmail account shortly before losing the awesome "curtis@auterytech.com" email address when I let my domain expire, and opted to combat spam by not listing my email address on the new blog. (The old domain was quickly snatched up by a squatter, and he is happily spending his $10 per year, or whatever domains cost these days, on static lists of search keywords for some nefarious purpose or other.)

Before the conversion, I would occasionally get emails from people I knew but lost contact with, who would tell me they stumbled on the page, liked my writing, and wished me well. Other than that, I had no contact with the site's readers.

I've been on Facebook for a couple years now, which has taught me that a lack of response to a thing does not imply a lack of an audience. When FBers threw events that I would attend, occasionally someone would mention something to me about something I'd posted but no one commented on. "Oh, " I would say, "I had no idea anyone even saw that."



Sunday, May 09, 2010

Creating an Archimedean Spiral generator in Java using the NetBeans IDE

[The images below can be enlarged by clicking on them]

My wife, Liberty, is an amalgam of seamstress, hippy, punk, old-school goth (real goth, not depressed teen sparkly lip gloss emo nonsense), WWII and vintage clothing buff, musical and action movie lover. I am a computer programmer, recovering video game and comic book geek, soccer and puzzle buff, ex helicopter parent. Other than a love of things not mainstream, we sometimes struggle to find areas where our interests overlap.

A few months ago, Liberty thought of something I could do with one of my specialties to assist her with one of her hobbies: write a program to design her next tattoo. Specifically, I would write a program to create interlaced spirals. I told her it would be tough, as most of my coding over the years hasn't included graphics. I experimented with a Java painting applet close to 10 years ago, and, although fearing what I used back then would have been deprecated from the language, or that I would be too far behind the curve with modern IDEs, I set out to give it the old college try. You see, I love my wife, and I'm usually up for a new challenge or puzzle to solve.

I tinkered away in the evenings and early mornings, learning how to use NetBeans, relearning how to create image and graphics objects in Java, how to correctly override the paint() method, and the math of spirals.

I decided to use the Archimedean Spiral, sometimes called the Hypnosis Spiral, whose spines are always equidistant from each other. Wikipedia has an article on that here, which I'll summarize briefly: r = aθ, meaning the radius is some constant times the angle.

Monday, May 03, 2010

40 creeps one year closer

Six years and nine months ago, I was hired at AEP, on the recommendation of a man I worked with at Sterling Commerce. Jerod has since gone on to bigger and better things (I believe he is currently the head of IT Security at Abercrombie & Fitch), and I have remained here, notable only because I have never stayed at a job this long before. My usual itch to flee and seek my fortune elsewhere comes and goes, as always, but I am comfortable enough where I'm at to not act on it. At least, to not act on it for a few more years.

Recently AEP gave me a permanent parking spot in the main building's garage. The spots are doled out as people retire and your place in the queue is determined by your hire date. The spot saves me about 10 minutes daily of searching for a spot in the "unassigned" garage across the street from the main building, and walking down a few flights of stairs where business-casual cubicle dwellers (like myself) crowd me in a panic, and storm past me in a huff for being slowed down on the way to their morning coffee, meetings, and arbitrary clerical deadline of being inside the building. Unlike myself. I'm a stroller in the morning, a meanderer still recovering from my commute-induced daydreams. My coworkers are nothing of the sort, and for 6 years I've been watching them scurry about hurriedly first thing in the morning, which I thought was nothing more than a minor annoyance, until I stopped seeing it every day. Suddenly my commute is peaceful from start to finish, and I reach my desk calm and content.

The seemingly small change of removing that daily stress has had a remarkable effect on my mood and my work, and has sparked in me a reflection on my path through life to get where I'm at. Where am I? 39 years old today, comfortable in a job where I get to be creative intermittently, watching my little girl grow up and get the social successes my bumbling always kept her from in the past, struggling to keep a happy wife and stepdaughter, and a roof over all our heads. I'm hoping to find through my reflection where my ambition went, why my eventual death is suddenly more real to me, and a clue as to where I'll be in another decade. Still at the same job? Still married? Will I be in the same house?