Contact MeContact Me

minor milestones

Thursday, July 30, 2009

Maybe related... I'm waging my first successful campaign against fat through diet and exercise, and I've been writing some really effective code that's more smart than clever both at home and at work. The former started about two-and-a-half weeks ago and I've lost eleven pounds so far, going from 236 down to 225. I'm pretty sure I won't sustain that rate of loss—my goal is to lose at least two pounds per week and get under 200 by mid October. I've been diligent about working out every weekday, but most of the weight loss can probably be attributed to the great, free iPhone app Lose It!, which tracks every calorie I consume.

One neat side effect of all this dieting business is that I actually enjoy food more, which in turn gets me to appreciate formerly unpalatable "health foods" and makes the "bad foods" that much more awesome and memorable. Example: Maudie's had always struck me as barely passable purveyor of Mexican food. It's always busy, but I assume that's because most Austinites haven't experienced an abundance of really good, authentic Mexican cuisine. Well, I've been to Maudie's exactly once since I started dieting... let me tell you... every morsel I consumed that night is captured in high-def slow-motion in my mind and has a memorable story all its own.

An even better side effect of the diet and exercise has been an overall boost in energy. I've gone from "needing" one or two espresso beverages per day down to (maybe) one cup of coffee per day. That equates to a significant drop in calories, caffeine, and expense. My blood circulation is improving, getting more oxygen to my brain, which makes it work better. Like I said earlier, I've been writing better, stronger, smarter code... and enjoying doing so more. Probably every other night, just for fun I'll drop into my Apple II's built-in mini assembler (a really basic line-by-line assembler... no symbols, labels, equates, or anything) and scratch out some fairly complex logic that does fun stuff, like make sound effects or do fun things with the hi-res graphics pages. In the mini-assembler, most small mistakes usually mean retyping lots of code. Somehow, this is fun to me.

The moral of the story is: It's really late and I hadn't blogged in forever, so I figured... what the hey. (Plus, I was getting sick of looking at that sewing machine in my previous post. [That's right, I just got all meta on your ass.])

Labels: , , , , ,



wpf applications made better

Saturday, March 14, 2009

I like .NET, WPF, and C# a lot. But I really should be obsessing over them like a creepy ex-boyfriend—making wall-sized collages of all my favorite code-snippets pulled from .NET Reflector, having awkward conversations about them with my wife, calling them at 2AM. How can .NET be my new 6502 assembly?

Enter Composite Application Library (aka Prism). At the recommendation of one of frog's most respected .NET gurus, Brian Romanko, I've begun looking into this framework for a project idea I've been toying with for a few months. So far, it looks like it supports the type of modularity my project could benefit from. If you have personal experience with Prism and have strong opinions about it, I'd love to hear them. I'll keep you posted!

Labels: , , , , ,



i resolve to...

Thursday, January 01, 2009

Labels: , , , , , , , ,



littlebigplanet beta has come and gone

Wednesday, October 15, 2008

This began as a reply to this post, but it got a little long-winded.

Yes, the beta went quietly into this good night. I was at work when it happened (yes, the LBP beta ending is worthy of a "where were you when..." footnote in history). The next day, when I tried to launch LBP, I simply got a message stating that the content had expired. Simple and rather unceremonious, but that's how betas go, I guess.

I was one of the proponents of wiping the slate clean for the official release; clearing out all the uploaded levels and local user-generated content, but after Mm's announcement that they'd keep beta content, I really pushed hard on an RPG-like level I was building, but never got to publish it. I hope to publish it within a day or two of the retail release. I think it has a design aesthetic and narrative that could get traction with a lot of players.

For now, I find myself with graph paper and colored pencils trying to come up with creative mechanisms and puzzles to build when the game officially comes out.

I've been spending much of that time finding ways to represent logic gates, counters, memory and possibly a Turing-complete programming language... a very simple Turing-complete programming language. :) And the fact that I've used the term "Turing-complete" three times now should be a clue as to which language I will probably implement. :)

Looking forward to seeing all my LBP beta friends and plenty of new folks online on the 21st. That's only six days away!

Labels: , , , ,



geek thread

Wednesday, March 05, 2008

Since some people have gotten tired of staring at my last post, and also since it's some whacky hour in the middle of the night when I should be sleeping, but ain't, I decided to share some work-related geekery.

This is probably stupid and you probably already know about this, but... You know that one bit of coding advice that's been going around about how you should initialize a local variable to the length of an array and use that in your "for" loop condition instead of accessing the length property on the array every iteration? Yeah. That one. Well, a couple colleagues and I were curious if this practice applied to all languages. Long story short, it seems that generally speaking, modern compilers (e.g., C#, VB, Java) should make such optimizations for you and to do so in those languages may be superfluous and only serve to make the code harder to read. However, such manual tweaking is still a good practice if you're developing Javascript for web pages (being that there is currently no smart JIT optimization going on under the hood of your typical browser today).

A compact, clean method of doing this involves initializing the length variable along with the iterator in the for loop construct:

for (var i = 0, len = myArray.length; i < len; i++) {}

Not only is this compact, but it also scopes the variable "len" to the loop itself, meaning it's eligible for garbage collection immediately after the loop is done iterating.

As for compiled languages (and even non-compiled languages), there are still options for speeding up array access in a "for" loop. One that I thought was interesting, but really makes app logic tough to follow, is initializing the iterator with the length of the array minus one, then counting backwards.

for (var i = myArr.length - 1; i >= 0; i--) {}

That really just buys you some extra cycles during the initialization of the loop, but not throughout subsequent iterations, and as I said, it's hard to immediately determine the purpose of that loop. One situation where you might get a noticeable increase in performance using that construct is when iterating through a large jagged multi-dimensional array. Like anyone ever does that.

Anyway, that's what you get for complaining about stale posts on my blog.

Labels: , ,



statCollector