Friday, August 22, 2008

Joe Biden

I'm really getting into the election this year. it would be easy to be disenfranchised with this circus, but I'm so sick of the current administration, that I look forward to something new. Like I said last time I wrote about politics, nothing political is worth discussing unless you have nothing to talk about, and I neatly tied up my entire summer in my last post.

I like Obama. There, I said it. And today, he announced he is running with Joe Biden. Horray! More characters in this drama! :) Congratulations Joe and Barrack, good luck to you both!

Monday, August 18, 2008

Summer

Well it happened again, I haven't kept up with blogging. I feel stuck because I can't create a new post until the old ones are out of my system and the old ones are old. I currently have drafts for 3 posts in my box, and no desire to complete them. But Jen called me out on it this weekend, so I'll quickly sum up and then be done with it. Maybe I'll even be better about blogging :D

1. WWDC happened. It was a lot of work, and I once again presented to a room of over 300 ravenous Quartz Composer developers. I did much better this year too, which is awesome. I also spent some good quality time with Ryan and Jay getting sloshed at the edge of a Hobson's Choice punch bowl.

2. immediately following the daily commute to San Francisco for WWDC, I flew out to NY for some well earned vacation and a visit to my sister, Tabitha. I wasn't sure if I could handle another week of city life, I was kinda sick of San Francisco and last time I visited NY it was oppressive feeling. But I walked, A LOT, and really felt free this time. It was great not to have to drive or even ride in a car for a whole week.

3. I took another vacation to Colorado this past weekend, the 14th of August. My wonderful friends Lily and Andrew were tying the knot (quite literally) and it was a big reunion of some pretty awesome people who have scattered to the wind.

That's the update. Thank goodness that's over now, so I can try updating more often.

Saturday, April 26, 2008

SubEthaEdit as a Journal

I really like SubEthaEdit, a text editor for Mac. It's mostly geared towards programming, but I find that it's a really good editor for anything text-only. For example, my journal is plaintext to avoid file format changes.

I created a script for use within SubEthaEdit's AppleScript menu. It's silly stupid, and doesn't scratch the surface of what SEE's scripts can do but it fits my needs (laziness). Basically, I wanted the same template for all my entries so if I ever want to process them, I have labeled metadata to work with. I also wanted to automatically save them into my Journal directory with a timestamp for sorting.

I know there are other journals, heck I could even use Blogger. But I don't trust online security and other Journal apps either lock you into a file format or are bloated (or both). 

So here's my script. I hope it's useful to someone.
on seescriptsettings()
return {keyboardShortcut:"^~@n", displayName:"TKJournal", inContextMenu:"no"}
end seescriptsettings

-- You should type and select the title before invoking this script
tell application "SubEthaEdit"
set mySelection to contents of selection of front document as text
set myHeader to "title: " & mySelection & return
set myHeader to myHeader & "Date: " & (current date) & return
set myHeader to myHeader & "Category: " & "Personal" & return
set myHeader to myHeader & "Tags: " & "journal" & return & return

set contents of selection of front document to myHeader

set myFilePath to POSIX path of (path to home folder)
set myFilePath to myFilePath & "Documents/TKJournal/"
set {year:y, month:m, day:d} to (current date)
set myDateString to y * 1 & "-" & m * 1 & "-" & d * 1
set myFilePath to myFilePath & myDateString & "-" & mySelection & ".txt"
try
save front document in POSIX file myFilePath
end try
end tell

Friday, April 04, 2008

Food

I have been in California for 2 years and this is the second time I've had Chinese food in that time. Don't get me wrong, I've had Japanese, Thai, Vietnamese, Korean, Mongolian, Philippino, and other Asian cuisine's which would all be lumped together under one roof and called "Chinese" in Colorado. Chef Chu's in Palo Alto was delicious, but like the other place I went to, they didn't even have what I would call Chinese food staples such as Sesame Chicken, Sweet and Sour Pork, etc. The menu was slanted towards seafood, even the hot & sour soup had shrimp in it. I'm sure there's something to be said for authenticity, but sometimes you crave what you're used to.

On the other hand, I am much more sensitive to regional food now. When someone asks if I want to eat Indian, I usually ask whether the restaurant is North or South Indian (I prefer the vegetarian South Indian food). If someone wants to go to a Brittish Pub, I look forward to curry because it's going to be the best thing on the menu (besides the beer).

Wednesday, March 26, 2008

Laziness

I remember when I first realized I wanted to be an engineer, I was working at Target and I was constantly thinking of ways I could replace myself with a machine. I was fascinated with the "LRT" scanners and thought of so many ways to make the process better. "Efficiency is intelligent laziness" has been my motto ever since.

This is in stark contrast to the first time I actually tried programming, my eventual major and career. It was so hard, and took so long to do anything that I hated it. I think it was one summer during middle school when I went across the street to learn wood working with my neighbor's father and my neighbor came over to learn programming with my Dad. I think it's pretty cool that we carried the tradition of apprenticeship and I hope my own son will have a similar experience. But I digress. This experience of programming was to write "Hello World" to the screen using c++. It required so many files, a header and an implementation, not to mention the CodeWarrior project file and I was a hunt and peck typist at the time so it took over 2 hours to copy the program from a paper print-out. If it was so hard to write two words to the screen, how would I possibly write a game with graphics?!

One way or another, I stuck through it and now I am a software engineer and I have found ways to apply my motto to school and work. I still hate all the setup of programming though, especially for scripting languages. I wrote these programs to a.) learn them and b.) have a mkscript script that I can use to create a template for new programs. I think it's pretty cleaver that the template comes from the program itself!

Okay so I know perl, that will be obvious by how much better the perl program looks (or maybe perl is better??). But I thought it was lame to claim this is a good method for learning and not put it into practice, so I did Python and Ruby too.


#!/usr/bin/perl

use strict;

foreach my $file (@ARGV) {
if(not -e $file) {
open (FILE, ">$file");
open (READ, "$0");
while(my $string = <READ>) {
chomp $string;
print FILE "$string\n";
}
system("chmod u+x $file");
}
}





#!/usr/bin/python
import sys
import os.path

def main(argv):
for i in range (1, len(sys.argv)):
if False == os.path.exists(sys.argv[i]):
writeFile = open(sys.argv[i], 'w')
readFile = open(sys.argv[0], 'r')
try:
for line in readFile:
writeFile.write(line);
finally:
readFile.close()
writeFile.close()
os.system("chmod u+x " + sys.argv[i])

if __name__ == "__main__":
main(sys.argv[1:])





#!/usr/bin/ruby

for file in (ARGV) do
puts file
if not File.exist?(file)
writeFile = File.new(file, "w")
readFile = File.new($0)
while (line = readFile.gets)
writeFile.puts(line)
end
system "chmod u+x #{file}"
end
end


If it means anything, I knew perl so that one was easy. I knew Python in College, hated it then and hated it now as I wrote this script. Ruby, I have never used and I must say, I'm impressed. I learned and wrote that script faster than I wrote the Python script, which I should still remember. I still like Perl best, but I'd give Ruby a shot if I needed to.

Thursday, January 24, 2008

How I get things done

When I was in High School, I figured out how to take the shortest shower possible. The secret is one of those things that is really simple when you say it, really simple when you apply it, but really hard to accomplish day after day. Letting my mind wander while hot water pours over my body is the only reason I can get out of bed quickly, and since there's no such motivation (except the clock or water heater running out) to get out of the shower I usually hang out for a while.

So what's the secret? Two things: 1.) Use both hands to clean at all times and 2.) Get out when you're done. People will have other tricks like top to bottom washing or soaping dry but really, if you can keep moving you will be clean in under 5 minutes. If you're clean, why are you staying in the shower? (Except girls who shave in the shower, I'm not going to complain :)

This turns out to be the basis of my strategy for getting things done in the new year. 1.) I need to always use all the tools at my disposal. 2.) I need to stop when I am finished.

So far I've blown through a bunch of things that otherwise would have been forgotten, or done at the last possible minute. I got my car registration done which required an oil change, emissions, check writing, getting stamps and mailing. I cleaned out my closet and will take 3 bags of stuff to good will once I also go through my dresser. I researched and got a new credit card. I'm more productive at work also.

In addition to getting a lot done, I've noticed that this is exhausting and I go to bed tired every night. But it is one of those good fatigues that makes you sleep hard and wake up refreshed. I'm making such good progress that I can soon start on something I really want to do verses these things that I needed to do.

Tuesday, January 08, 2008

2008 Goals

As 2007 was the first year I created goals, I think it went pretty well. This year I'm going to focus on doing more awesome stuff. Not only adventures, but also completing projects and generally living my life more efficiently.

To help with that, I'm going to try out the GTD craze that everyone has been talking about. I may have missed the fad, but I think it could still help me stay focused and Get Things Done.

Maybe later I'll talk about the actual things I want to get done, and that will be my real set of "goals" this year but if I am going to do more, I need shorter deadlines.

Friday, December 28, 2007

2007 wrapup

for all practical purposes, this is the first year I made new year's goals since it's the first time they have been written down. So how did I do?

- Do something awesome:
Not many people know this, but I had a patent filed this year. I wont know for a couple years whether it is accepted but I have a copy of the patent application in my desk at work.

- Do something stupid (in the pursuit of awesome):
Although I never finished the story on my blog, my mustache fits this category quite well. Everybody hated it, and I loved it.

I have to tell this story because stories are what this goal was about. I shaved my mustache off and trimmed my sideburns on Christmas eve after everyone went to bed. I wanted to have Christmas eve pictures proving how long it got, but not ruin Christmas day pictures. Over the 2 months I grew it, it had become fairly thick and everyone noticed my mustache so I didn't have the embarrassing situation of people not noticing right away. I wondered if people noticed it because it was out of place on my normally boyish face, so I didn't tell anyone I had shaved it. Waking up, cooking and eating breakfast, gifts, and getting into the car to a movie were all family affairs and nobody noticed. Kyra was watching a video on her camera from Christmas eve and I said, "aww, remember when I had a mustache? Those were good times." Suddenly the car was in an uproar :) Lots of fun.

- Perform something in public:
I'm going to bring this one back to work, which wasn't the intention of the goal but it still fulfills it. I got to speak in front of over 300 people at WWDC this year. I was so prepared to be nervous speaking in front of lots of people that I didn't even consider that the lights would be too bright to see anyone. It was like practicing to an empty room, and it shocked me so much that my presentation was sub par.

- Keep the plants on my deck alive:
Absolutely failed. No excuses, it just didn't happen.

- Plan and take a vacation:
I went to Panama!

So there you have it. I give myself a 3.5 out of 5, since 3 were total successes and one was sub par. New goals will be made on the new year :)

Thursday, November 08, 2007

Update


My moustache is trickling in at a steady rate. It's good enough now that people can notice and laugh. I'm extending my donation's promise to this claim: If you donate to a good cause, you will be assured immunity towards making fun of me :) I think the entire lunch table at work ought to donate now.

In other news, I'm flying back to Colorado... now-ish. So if you live there, call me up and we'll chill.

Friday, November 02, 2007

Horse Racing

Today Apple had a party at the Horse Races. It was actually a lot of fun. We were given a voucher for some money to play with, and some drink tickets and food. They reserved the entire top section for us and had extra staff around to help teach us how to bet.

One thing I find interesting, not only in this situation but also in life life is how we throw around percentages, and which ones matter. If you can drive across town to save 10 cents per gallon of gas, you save one dollar per tank. I fill up every two weeks so that's 26$ for the year, .03% of my salary. If you just paid off your credit cards earlier, you could be talking about whole percentages saved, quite a bit more than stressing about frugal gas purchases.

Or how about savings? If you move your your extra savings into the stock market, you take on a small risk and (hopefully) your money grows much faster. The goal of any investor is to "beat the market", to get above that magic 20% return that you receive by simply investing in an index fund. But when you go gambling, you don't really feel happy unless you double, or triple your money.

If you played horses like you play the stock market, you would be extremely happy to get 20 cents per dollar. And I don't think that would be very hard. I guess there's some draw to "Winning Big" such as lottery and gambling, that supersedes the plain old "winning".

Thursday, November 01, 2007

Movember


The idea is simple. Bring awareness to prostate cancer by growing out your mustache. How hard can that be? If you're a skinny blond kid like me, it may be a little hard. But I'm going for it anyway. There's a website where you can support my peach fuzz.
https://www.movember.com/us/donate/donate-details.php?action=showrego®o=142643&country=us

I'll even make a deal. I will keep the mustache for 1 month AFTER November for every 5$ you donate. If you want to laugh at my stubble until next year, all you need to do is donate 60$ to prostate cancer (tax deductible). Maybe by then I can grow enough to wax it and curl up like the oldtimey studs. (I'm going to honor the max contribution, so if one person donates 5$ will keep it until the new year, 15$ will keep it through Valentines day)

I'll keep this blog updated with pictures. Be sure to check out Ryan Bruels for a real stud who will probably outgrow me by a meter.
https://www.movember.com/us/donate/donate-details.php?action=showrego®o=141291&country=us