Skip to content

Quick Hack: Clockr

Quick Hack: Clockr

Quick Hack: Clockr

So, I’m trying to come up with some ideas for some “features” or post categories, like the previous “Dinner Tonight” (which I realized within the past few days was blatantly ripped off from Cooking Light). I feel like this will help me to execute ideas well, and to keep things interesting.

So, for the inaugural Quick Hack, we have something I put together in the past couple of days. I just started TAing for a class at University of Washington in the DXARTS department, which I called home for the last 3.5 years. The class is one that I took in the spring of 2006, called DXARTS 460: Digital Sound. The class covers basics of the history of electronic music, some basic editing/mixing/synthesis techniques, and basically prepares students for diving into the year-long audio course offered by the department.

Anyhow, I’m now gainfully employed for the next few weeks, and with employment comes timecards. I knew I was going to be spending time out of class actually working (both office hours and grading), so I wanted to come up with a good way of easily tracking my time that would be relatively painless and of course, very slick. Enter Clockr (silly name I know, especially for how ridiculously simple the app is).

Now, another quick tangent! One of my goals for this summer was to learn a few more programming languages in order to expand my computer science repertoire. I settled on some type of C and Cocoa, since both go relatively hand in hand, and I have an inkling to write an iPhone app. More on that later. Now, I already know a fair amount of AppleScript, so I set about writing my  little hack with that. In my google searches for various code snippets, or for apps people had written before, I came across a tutorial for using checkboxes with AppleScript. Apparently, there’s not any way you can just hack them together using AppleScript alone. You need to get Xcode involved. So, I followed the tutorial, which basically has you build up a GUI in Interface Builder first.

Building the interface.

Building the interface.

Everyone loves HUD windows (right?), so I went with that, made some checkboxes and a big pushbutton. The rest of the magic all happened in AppleScript. All I had to do was give the checkboxes and button some names that I could reference, then write out the script itself.

The Script

The Script

So basically, what you do see in this script is the check for which checkbox is selected, and some built in sexiness using Growl. If you use a Mac and you’ve never seen or tried Growl, you definitely need to. Not only does it look incredibly sexy, but it really becomes a vital part of your user experience when you are doing stuff on your computer. Anyhow, what you DON’T see happening is actually the whole point of the app. At the end of the script, it grabs the current date, then prepends the date string with “CLOCK IN:” or “CLOCK OUT:” (depending on what checkbox is selected),  and writes it to a text file.

The output.

The output.

I just started using the application today, so there’s not much there yet, but at the end of the current pay period, I’ll be able to go right in and easily add up all of my time fairly accurately. And if I do happen to mess something up, or forget to clock in, I can always go and edit it by hand as it’s just a text file.

It might seem like a lot of work for something as simple as writing down clock hours, but it was more about fiddling with Xcode and flexing my AppleScript muscles a little bit more. I’m excited to start working more with Cocoa, in hopes of developing more useful and practical applications.

Dinner Tonight: Grilled Shrimp

So, I knew I would be making dinner tonight, and it’s been a while since we hit up the grocery store. I knew we had some shrimp in the freezer so I thought I’d use them. My normal favorite for shrimp is a super simple Shrimp Linguine, with garlic, olive oil, lemon (+zest) and fresh basil. Yum! However, Shannon and I had gone to the Meadowbrook Farmer’s Market this morning, and picked up some awesome Tahini dressing from Mr. Mobley’s. Upon tasting it at his stall, I was instantly reminded of Satay, and knew I wanted to try it on the shrimp. We also picked up some sugar snap peas, which are always good.

To get started, I de-shelled and de-veined a bunch of shrimp, then threw them in a bowl to marinate with some of the Spicy Tahini Dressing, a tablespoon or so of red curry paste and a little bit of honey for sweetness. They marinated for abour 45-50 minutes, then I threaded them onto skewers and grilled them up. I was a little underwhelmed with the snap peas. I did them up with some curry paste, lime juice and some thinly sliced mint leaves. Unfortunately, I think I cooked them a bit too long. Anyhow, here are some pictures.

I then proceeded to commence some major scarfing. Shannon kept leaning on her elbow, and I kept thinking she had a bad headache or something, but it was in fact Shannon being overwhelmed by the awesomeness of the meal. Score! I decided to grab the camera again and conduct a brief interview:


Finally, I’m about to embark on a project for the week, although I may have already lost my window of opportunity, I was supposed to start an hour ago! Drat!

Clipped & Diced returns

Well, now that I’ve started up on this blog, and am beginning my journey into Lifehackery, Shannon has decided to fire up the burners underneath our joint cooking/research blog, Clipped & Diced. It’s a place where we write (Shannon) about recipes we cook (mostly Me) that come from newspapers. Fun stuff. She wrote a nice little post explaining what we’ve been up to the past few months, and the kind of life-hacking stuff I’m going to be attempting

Clipped & Diced

Check it out and stay tuned for some photos of dinner from this evening, and of a project I’m starting today!

Time to get this thing fired up

So, since I’m going to have more time for things, I should probably have a place to keep track of that stuff. This is it. Stay tuned…