|
About
My Infrequently Updated Blog. The web-based journal of M. Forde, computer nerd, endurance athlete, and DeLorean owner
contact
Subscribe
Subscribe to a syndicated feed of my weblog,
brought to you by the wonders of RSS.
Flavors
There's more than one way to view this weblog; try these flavors on
for size.
index
circa 1993
Sections
main
musings
running
DeLorean
code
unix
album
TBM
Archives
2023
2022
2021
2020
2019
2018
2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
Disclaimers, Copyrights, Privacy, Etc.
ToS
Copyrights
Links
olix0r.net
netmeister.org
Giraffes
Eat. Run. Sleep.
|
|
|
C#, XNA, and 8 Queens
I spent some time this weekend learning some C# and getting working a
bit with the XNA framework. I implemented a solution for the 8 Queens
problem in C++, then ported that class to C#. After getting that working
in Windows, I started moving it to the Xbox.
It works there with little issue, but, as expected, writing to
system.console doesn't produce useful output. My next step is to get
some sort of graphical representation of the chessboard displayed with
the solution set.
[/code]
[permanent link]
Staten Island Half Marathon
Sunday was the Staten Island Half Marathon. I've been dealing with
overuse injuries as of late, my IT-band has been acting up and I
strained my right hamstring.
I wasn't sure if I'd be running or not, and the temperature was
predicted to be in the low- to mid-50's, so I wore my coldgear; I didn't
want to end up with hypothermia again if I was standing around for 2
hours in shorts.
It turned out that one of my teammates, Liz, wasn't sure if she'd be
able to finish. We decided to run together. And we did. We finished with
the exact same time of 2:34:00. I kept her from stopping and she kept me
from going to fast and re-injuring myself.
It took me an hour longer to finish the race than it normally would, but
I think it went quite well. My hamstring actually felt better after the
run. My IT-band was a little sore the next day, but it was better by
Tuesday.
Running at the slower pace, I was able to actually look around and enjoy
the scenery. The shores Staten Island were not as bad as I was
expecting. Over all, it was a good recovery run. A 13.1 mile recovery
run.
[/running]
[permanent link]
Bing!
It has come to my attention that searching bing for pictures of closed doors yields
pictures of my DeLorean.
[/dmc]
[permanent link]
Self Documenting Code
Despite what you think about your code, it is not self documenting. When
writing code add comments, describe what a function does, explain why
you're using that convoluted pointer arithmetic and bit shifting. I'm
sure it makes sense now, but someday you'll have to go back and look at
it and figure out what the hell you were doing. Or worse, I'll
have to go back and look at it and figure out what the hell you were
doing.
Sometimes it is important to have some sort of separate documentation
for the code; maybe some UML or ER diagrams, maybe some English text.
Use what ever it takes to explain what you were doing. Do not paste
snippets of your code into the text and call it documentation.That
is not documentation, that is code.
[/code]
[permanent link]
AFI: Starland Ballroom, October 10, 2009
Show was great last night. Here's the setlist from the show:
- Torch Song
- Leaving Song Pt. II
- Veronica Sawyer Smokes
- Ever and a Day
- Kill Caustic (With Lou Koller of Sick of It All)
- End Transmission
- Love is a Many Splendored Thing
- Beautiful Thieves
- Dancing Through Sunday
- Leaving Song
- On the Arrow
- Death of Seasons
- Medicate
- Love Like Winter
- Just Like Heaven
- Miss Murder
- Silver and Cold
I'll write more later, now it's time to get ready for the Staten Island
Half Marathon.
[/musings]
[permanent link]
It exists
As part of the DeLorean's restoration, I've been considering a backlit
dash. I had considered sticking with the stock dash with the white light
bulb in front of the gauges, but I thought a red backlit display would
be better for night vision.
Then came the issue of whether or not something like that exists. Turns
out it does. Speed
Hut carries a line of customizable gauges for the DMC-12 as part of
the EL-Glo line.
[/dmc]
[permanent link]
Gmail and mutt
I like mutt. Of all the mail clients I've used over the years, it
sucks the least. It works well with my mail server.
Despite having my own domain and mail server, I still use gmail for
certain things; things I don't mind being retained for 3 years after I
delete them, or more specifically, things I want retained for 3 years
after I delete them.
I don't like the gmail web interface. I find checking my gmail to be
annoying because of this. I remembered gmail offering POP and IMAP.
I figured I could use that to get my gmail. Shouldn't be too hard right?
A quick search of Mr. Yahoo and Mr. Google gave me two good starting
points: Lifehacker.com
and MattCutts.com.
I read the sites and the getmail man page and figured out what I needed
to do. First I enabled IMAP for my gmail account. Next, I created the
.getmail directory in my home directory then created a getmailrc file
there. I want all gmail mail to be delivered to a specific mbox file
without going through my normal mail delivery channels. The contents of
the getmailrc file are quite simple:
[retriever]
type = SimpleIMAPSSLRetriever
server = imap.gmail.com
username = username@gmail.com
password = usernamespasswordgoeshere
mailboxes = ("inbox",)
[destination]
type = Mboxrd
path = /usr/home/mforde/Mail/GMAIL
The retriever section defines how getmail will retrieve the mail. In
this case it uses IMAP over SSL to connect to imap.gmail.com. The
mailboxes setting can be used to specify only certain gmail labels to
retrieve, but I want anything in the inbox.
The destination section tells getmail what to do with the mail once it
has grabbed it from gmail. This configuration dumps it into an mbox file
I've named GMAIL.
I chose IMAP over POP because of the slightly-less-than-documented
"feature" of gmail only allowing 99 messages at a time over POP.
So to get the initial batch of 7000+ emails, I ran
> getmail -vvv -l
to get verbose output and to leave messages on the gmail server. When
that was done I pointed mutt at the GMAIL mbox and like magic, there was
my gmail, organized nicely in my terminal.
Now, I want to check to get the latest mail fairly often, and I don't
want to download messages already copied over. To accomplish this, I
added a crontab to run every 10 minutes and invoke
getmail -l -n -q
This tells getmail to leave copies on the server, only get new messages
it hasn't already retrieved, and be quiet about it.
This has worked out well for me. If you're interested in setting up
something like this, I highly recommend reading the article at matcutts.com.
That article also links to several sample getmailrc files.
[/unix]
[permanent link]
Marathon Tune-UP
This past Sunday was the Marathon Tune-Up, an 18 mile run through
Central Park. My goal was to run it maintaining roughly a 7:30/mile
pace. I had set a range of 135 to 140 minutes for myself. I would have
been satisfied with any finish time in that five minute span.
At the 10 mile mark, I was averaging 7:27/mile. During that 11th mile, I
decided to use a Gu energy gel. I was still feeling pretty good at that
pace and I was hoping to time the gel right so as to not "hit the wall"
at mile 14 or 15.
Instead, the gel started giving me stomach cramps. At mile 12 I was
still well under an 8 minute pace and at the half-marathon mark, I was a
minute off my best official half. I was clearly slowing down as the
stomach pain increased.
I struggled through miles 14 and 15, alternating running and walking
every quarter mile. By mile 16, I could not run. The pain was almost
unbearable. I ended up walking the last two miles, in the rain, with all
my blood concentrated in my core, dealing with the Gu in my stomach. By
time I crossed the finish line, I was a half over my 135 minute goal and
had almost no feeling in my hands or feet.
I went to the medical tent and told the volunteer that I had severe
stomach cramps and I was so cold that I couldn't feel my hands. He
responded, "We don't got no blankets or nuthin' so we can't do nuthin'
for ya." So I walked away.
I went to the tables where volunteers were handing out gatorade and
pretzels. I stood there, shaking, until another runner came up to me
and asked if I was okay. Before I knew it, another runner was keeping me
from falling over while the first runner was coming back with two NYRR
volunteers. One of them wrapped me in a plastic bag to keep the rain off
while the other went for help. I explained what happened at the medical
tent.
Two more people from medial came back and put me on a gurney and took me
back to the tent. I told them what had happened at the tent and
explained what I was feeling. At the tent I removed my soaked shirts and
was wrapped in a mylar sheet and two blankets. I pointed out the guy who
told me they couldn't do anything for me.
I managed to get in touch with my fellow Giraffe who ran back to our car
to get my dry clothes. After about a half hour or so, I was feeling much
better and feeling had returned to my extremities. I got in my dry
clothes and my teammate and I walked back to the car.
So taking a Gu ended up with me being treated for hypothermia. I had had
mild stomach irritation when using Gu in training, but never this bad.
I'm glad I found out now instead of next month in Philadelphia.
during my 22 mile training run at the Tourne, I used prepared bottles of
GuBrew and Gu2O. These liquids never caused the irritation that the gel
did, so I should be okay using them during the race.
I've purchased a bottle that gets strapped to your hand for the purpose
of carrying the GuBrew with me. I filled it with water and ran with it
on the treadmill last night. It seems a little awkward, but it
shouldn't be too bad. I'll use it to carry the GuBrew with me during the
Staten Island Half Marathon on the 11th and see how that works out.
[/running]
[permanent link]
|
|