Friday, March 28, 2008

Accepted

So I stayed up late last night waiting for an email about Startup School. Turns out I got in! I'm not really sure how selective it is anyway, but it's cool nonetheless. The anticipation before receiving the email was roughly equal to that of Christmas Eve when I was eight.

Now I get to figure out plane tickets and hotels and (most likely) car rentals. I am looking into good old public transportation (since it's at Stanford and San Francisco is supposed to have good public transit), but compared to what I got used to in Europe, it's not looking great.

I'm also hoping to use this as a motivator to get some small project done before I go, so I have something to talk about when people ask 'what I do'. So many of the attendees actually have startups in the wild, and here I am just hoping to start soon.

In other news, NIN is touring again this fall, and they are conveniently headed to Houston, so I will catch them there. Last time I saw them was in St Louis in 2006, so I'm excited to see lots of new stuff.

Tuesday, March 25, 2008

Think of the Coders

Finally, somebody said it: Save The Developers.

I also noticed that the new version of merb has been out for quite some time now. I played with merb briefly (0.5.3) and really liked its design philosophy. It felt like I had control over what I was doing without requiring an absurd amount of configuration. One of my biggest complaints about Rails is that there seems to be four ways to do everything, and the documentation on the options is often out of date or conflicting.

Thankfully, you can barely find any merb docs, so there is less confusion! Seriously though, the current release is making a big push to properly document a public API, and merb seems so well done that I'm sure it'll be easy to grok.

My experience with it was definitely pleasant the first time. Merb + Datamapper for a simple app would serve pages at about 700 req/s on my home machine, when an equivalent Rails + ActiveRecord app would only hit about 120 req/s. Of course all scaling issues don't really matter until you have lots of traffic, but any advantage is useful.

Also, while reading about Rack, I ran across this presentation that included something called Coset. It was basically an extra layer on top of Rack that would serve RESTful web services. The example code was brilliantly easy to understand, but I can't find a site for it anywhere. Anyone have any ideas where to find this thing?

The ideas for this summer continue to pile up.

Friday, March 21, 2008

Accomplished

I just made my $4000 contribution to my Roth IRA for 2007 this morning. Man it feels good to have that done. On top of that, today is payday and I had a confluence of other bills to mail off too, so it generally feels like a financial cleansing just happened.

Now I just need to figure out what to do with that $4k. The general plan is some kind of ETF, since I can't touch the money for another 35 years anyway, but the market is so depressing lately I don't even want to pick.

I already have my $5k contribution for 2008 saved up (factoring in my KPERS rollover), but I'm keeping it in savings until tax time next year. So I guess the next immediate goal is to save up for this summer. Unemployment here I come!

Tuesday, March 18, 2008

More Organization

So after reading Jys's entry on clutter, I am once again resolved to pare down my possessions. I was temporarily working on this problem last fall when we moved into our apartment, and managed to sort everything I no longer used into one closet (my ebay closet). Unfortunately I have been too lazy to even ebay the stuff (leave it to ebay to make selling things seem like work), so it's all still sitting in that closet.

One of my favorite articles on this subject comes from Paul Graham. In Stuff, he writes:

I first realized the worthlessness of stuff when I lived in Italy for a year. All I took with me was one large backpack of stuff. The rest of my stuff I left in my landlady's attic back in the US. And you know what? All I missed were some of the books. By the end of the year I couldn't even remember what else I had stored in that attic.

And yet when I got back I didn't discard so much as a box of it. Throw away a perfectly good rotary telephone? I might need that one day.
If you substitute 'Spain' for 'Italy' above, I could've written this. I even have my old touch-tone telephone in a box somewhere, just in case I decide to reverse a decision I made seven years ago that a cell phone is all I need.

What makes stuff even worse is that it usually costs time/money to get rid of it. I think that is why we accumulate so much of it by default. Getting rid of stuff is suspiciously like cleaning.

There is also the this-could-be-useful problem. I look at that telephone and start thinking up situations where I would need it. Need to test my line to see if it's working? Better have a phone handy so I can check for a dial tone I'll never ever use. I can't think of a use for the nine parallel ATA cables I have in unopened plastic bags, but you never know, the technology could come back into style.

Likewise, that complete set of PC Worlds from 1995 to 2001 might be worth something to someone someday. It's obviously worth breaking my back every time I have to move it.

I think my dumpster might get a visit or two tonight.

Friday, March 14, 2008

Favorite Code Today

I was most proud of this little gem today:

function addparams(query) {
return query.replace(/(&?)([^&=]+)=([^&]*)/g, function(m, amper, key, id) {
var val = document.getElementById(id).value;
return val.length > 0 ? amper + key + "=" + escape(val) : '';
});
}

It only ended up being six lines, but initially it was more and I like trimming code down more than making it bigger. The function itself is dead simple, nothing tricky or insightful here, but it's just downright pretty... even with the line noise regexp. Something about it just seems elegant and symmetrical. I don't even know how to describe how code can be pretty, but I would consider putting this on the wall in poster form.

So I applied for Startup School today. I figure I can waste some cash on a weekend in San Francisco to go meet some people and hear some hopefully inspiring speakers. Just thinking about it makes me look forward to this summer. I plan to be so nerdy.

Wednesday, March 12, 2008

Checking Things Off

I am a very to-do list driven person. Basically, if I don't write something down where I will constantly see it, I won't do it. Because this has bitten me in the past, I also obsessively check my to-do lists and mentally reorganize them constantly.

My problem lately has been the proliferation of the lists themselves. I have my checkbook spreadsheet, which is more or less my financial to-do list. It tells me when to pay bills, when to transfer money to savings, whether I am hitting goals or not, etc. I also have my Google Calendar, which has my social/work to-do list. (Birthdays, meetings, etc.) Then, for things that have no definite date associated with them, I have just a plain to-do list on my Google homepage. This is for stuff like "Get Insurance" and "Call about KPERS rollover." Finally, to top it all off, I have a legal pad full of programming to-dos. Actually, I have four of those, two at home for different things, and two at work (again for different projects).

So, with all these different modal lists running around, it's easy to ignore one or two for a while. This is what I was doing to my no-definite-date list. I finally remedied that a bit this week by checking off the two highest priorities. First, I got some health insurance. Second, I called AT&T to sort out my cell phone.

I had various issues with my cell phone all happen at once. First, the phone itself refused to charge, and eventually went dead. Second, I really wasn't using it enough to justify $50 a month. Third, the fact I had to pay for text messages sent to me by others just really bothered me.

So I called the other morning ready to pay the stupid termination fee (which I regard as rather like extortion) and cancel my plan. I had been putting this off for some time, but I got another bill (for a month during which my phone was dead in a drawer), so I decided to finally deal with it. The cancellation lady was very helpful however, and solved all my issues rather nicely.

First, I found out I could move my phone to my parent's family plan without a fee. This means my monthly cost will shrink from $50/mo to about $20/mo. Second, I added a block to my line which prevents me from getting any text messages. Third, she is sending me a new phone in the mail to replace my broken one. Since I was still under the one year warranty, it's all free of charge.

Amazing what can get done when I stop avoiding the issue.

And now that I have articulated my to-do list issues, I would like to think of a way to consolidate a bit. I'm thinking some kind of consolidated calendar meets checkbook, if I can figure out an easy way to interface with it. Hell, maybe I'll finally have an interesting project with motivation to finish. (To add to my huge list of ideas that I currently am not working on.)

Tuesday, March 04, 2008

API

So the guys at Buxfer.com opened up a REST API to their service today. I really appreciate that they did REST right, rather then some weird not-quite-by-the-rules hybrid. If you have ever had to use SOAP to do anything, you can really appreciate how fresh and lightweight REST feels, especially when it's ROA.

This got me thinking about my favorite parts of programming. I think that API design is a very interesting problem, because of the constant clashing requirements. On the one hand, you want something simple and easy to understand. On the other, you want something rich enough that it is actually really useful. You also have to really think it out beforehand, because once an API is out there, it's a major faux pas to break existing calls. It's kind of like designing a miniature language. A DSL for data if you will.

I have to wonder if the API is actually what makes a site have lasting value. All of the big important sites I can think of on the net are important to me because they can be built upon. Facebook exploded when they introduced their Platform. Amazon transcended its place as the Walmart of the Internet when it started offering AWS (and became more like the Power Utility of the Internet). Paypal became a real merchant option with their API, Google Maps exploded with it's API, and the most obvious of all is Twitter, which receives 90% of their requests through their API.

If anything, it seems like the API is the real killer feature that makes or breaks a site. It's like selling directly to the customer as opposed to selling to other salesmen. If you sell to a salesman (get them to use your API as a backend service), then you get all his customers too, without having to chase each of them down directly. On top of that, your API clients are much more likely to be willing to pay for what you offer, because they will be using it to make money. They will also be more likely to stay around long term.

Thankfully I think API design is wicked fun, so hopefully I can make something out of this.

Monday, March 03, 2008

Retirement Accounts

It seems like we have an absurd alphabet soup of options for retirement accounts nowdays. I just don't get why there have to be so many options. I know as a 24 year old, my Roth IRA currently makes the most sense for me, but what happens when I start working somewhere that offers a 401k? Or if I suddenly start earning a lot more and decide a Traditional IRA would be better for me? Or, what if I finally become successfully self-employed and have the ability to create a SIMPLE or SEP plan? It seems like we could fix this. Here is my proposal.

Each individual has one account which, to distinguish, I will call a Lifetime Investment Account (LIA). These accounts allow both pre-tax and post-tax contributions. Pre-tax contributions are limited to some set amount (lets say $5000/year - indexed for inflation), and post-tax contributions are limited to the individual's Adjusted Gross Income. The account balance grows tax free, and withdrawals after a certain age (say 60) are also tax free. Withdrawals before this age are taxed as normal (earned) income plus a 10% penalty.

So far this is sounding like a combination Roth and Traditional IRA, with higher contribution limits. Here is where it gets efficient though. Each account has three types of access: Owner, Government, and Contributor. There can only be one Owner, and only the Owner can make both deposits and withdrawals. (The Owner is obviously the individual.)

Only the US Government has Government access, which it would use to deposit a new special kind of bond called a Social Security Bond. This is a non-transferable, non-marketable government security representing promised future SS payments, and is void upon death. Read more over at The Skeptical Optimist about these bonds.

An account can have multiple Contributors (there is no limit). Contributors can only make deposits (they cannot even see the current balance of the account). Any other legal entity can be a Contributor. This means your company can contribute to your account, your parents could, your children could, whoever. If you own your own business, it could contribute to your LIA. To keep the tax figuring simple, all contributions made by Contributors are post-tax. Pre-tax contributions can only be made by the Owner.

Remember the contribution limits? These are global limits. In a simple case, if I make $50k this year, and contribute $4k of it pre-tax to my LIA, then assume my AGI is $46k. That is the limit of contributions from all Contributors combined. Anything over this limit is refunded to the Owner and taxed as normal income. Contributions by the Government do not count towards these limits.

The Owner has total control over investing the contributions. The account custodian can offer any range of investments for the Owner to choose from, just like an IRA works today. Ideally these would include (at minimum) several index tracking mutual funds, ETFs, and money market funds, as well as access to equities and regular mutual funds.

The main thing is that this will stop the proliferation of accounts. When you switch jobs, you just give your new employer your LIA information and they sign on as a Contributor. Since they can't see your balance or investments, you don't even have to worry about removing old Contributors (although they can remove themselves). This account stays with you throughout your adult life, and the SS Bonds make it easy to estimate how much you will be drawing there. You can roll the account over to another custodian directly. Direct rollovers will involve liquidating the account assets, then directly rolling over the cash amount to the new custodian. Simple stuff.

I think this also has big tax preparation implications. Since you only have one lifetime account, there are fewer things to keep track of. Since it acts like both types of IRA at the same time, you don't have to agonize over getting better tax treatment. Since anyone can be a Contributor, it does away with all those 401k, 403b, SEP, and SIMPLE accounts.

Finally, your custodian can compete on investment features and tools, just like IRA custodians do today. I'm specifically thinking about the ability to define an asset allocation plan upon account setup, and simply leave it on autopilot throughout the working life.

Obviously the law that created LIAs would remove the ability to create any more of the existing alphabet soup plans, so within a generation these would fizzle out and our tax code could be simpler. Existing plans could also be rolled over into your LIA, subject to the usual rollover tax implications. Basically your existing 401k custodian would sign on to your LIA account as a Contributor, then contribute the value of your account. You (the Owner) could then allocate the contribution as you pleased.

So what am I missing?

Friday, February 29, 2008

Cien

Hundredth post! Yay!

Had an excellent lunch at Vermont St BBQ today. It's been a long time since I felt this satisfied in general. There is just something about today that is awesome feeling. I am definitely looking forward to a nap after work though.

I ran across one of my favorite programming blog posts again today. It had been a while since I last read it, so I gave it another go. I must say, The Kingdom of Nouns pretty much describes perfectly why Java now frustrates me. Admittedly, after working with it the last few months, I have come to tolerate it much better, but I do miss my Ruby/Erlang/Scheme fun.

In just 84 days my summer vacation starts. Woohoo!

Thursday, February 28, 2008

Thursday

It seems I only post on Thursdays recently. I wonder why.

Due to a minor issue on a query at work yesterday, I got to learn a lot about how mysql indexing works. It was fun and interesting. In the end, I think the whole thing will be a non-issue, but at least I got to learn some neat stuff along the way. For instance, the order you put fields in an index matters, because any fields after the field being used to sort can't be used in where clauses. There are just a ton of little nuances like that.

In my home time I have been working with Erlang a bit. I'm still in the uber-nub stage with it, but I am trying to make some progress. After all, I have this glorious four core machine, and I should put it to use with something. Also, I think Erlang seems like an interesting niche with a lot of opportunities to build interesting things. The Ruby space has matured so nicely since I started with it in 2005, hopefully the Erlang space can too.

The two languages seem to compliment each other so well too. Ruby is just so great for doing things quickly, and now that it has so many libraries to do things, it makes a great exploratory tool. Erlang seems great for another type of exploration, which is back end performance. One of my first experiments with it was comparing a simple factorial algorithm with a parallelized one. The difference is quite mind-blowing. I mean, all I did was cheat and make it calculate fac(N-1), fac(N-2), and fac(N-3) in child nodes all at once. This is essentially akin to increasing the branching factor of the recursion tree from one to three. But it definitely put more cores to use and finished faster on bigger numbers.

Like I said, I haven't done anything too exciting with it yet, but I have an idea for a webservice framework that I'd like to build (for my own projects, and maybe for open source consumption). The basic vision is write something to map Yaws requests RESTfully to Mnesia records or some SQL db. The cool part would be seeing how well it scaled. I think I could get some people at hacker news to hammer it with a script for a while to see how it went.

Non-programming news in my life mostly includes taxes and the doing of. How fun!

Thursday, February 21, 2008

(mis)Education

A recent confluence of articles on YC News have the topic of education in my mind a lot the last couple days. All this reading and thinking has brought something that has always bothered me back to my attention. To put it bluntly, the idea that miseducation at some level of development is acceptable.

Regardless of the position you take on any remotely controversial issue, be it political or personal, you have probably asked yourself at one time or another how the other side can be so naïve. Rest assured, they are thinking the same of you, but that is beside the point. I think the reason is that the vast majority of people don't think critically on any topic (myself included). What they do instead is adopt the beliefs of someone they respect for a different reason, be it their parents, a favorite teacher, their peers, or some charismatic guy on TV.

What I keep coming back to as I try and think about the topic of thinking critically (the meta-discussion-fu!), is that it only becomes societally acceptable after a certain age. Oh, the education mantra is to “foster critical thinking and problem solving skills” or some such newspeak, but the reality is that developing these skills is limited to safe questions. The need to maintain authority and not offend minority parties means that any non-safe question is off limits for critical thinking at a young age.

This starts early. Think about learning math as a kid. At some point, every kid asks why the heck they need to learn 'this stuff.' The teacher makes some vague promise that it will be useful later in life, hoping the kid is placated. If the child persists in asking why, one of two things occurs. The teacher either does some hand-waving about how math skills are necessary for a good job, or they tell the student to stop goofing off and get back to work. Neither is really a good answer in my opinion, because neither reply does anything to make math seem important. The idea of a job is as alien to a 12 year old as the idea that factoring polynomials is useful when calculating average case algorithmic complexity would be.

Jump to another subject. Your history classes, if they were anything like mine, were a series of gradual refinements of founding myths into the gritty reality of what actually happened. At a young age 'history' consists of stories like the Thanksgiving myth and the Pilgrims coming to America. It wasn't until sixth grade that we learned that there had been Europeans in the Western Hemisphere for over 100 years by the time anyone landed at Plymouth Rock. In my five year old mind, the Pilgrims made a daring voyage off the face of the earth, and landed alone and in an alien world. Later I learned that the reason our history education of the New World began with the Pilgrims is most likely because they were the first well-known group to come without the intention of war/profit/conquest. There is an idea that kids need to be handled with kid gloves, even if it's detrimental later on. I would say that at least 50% of every later class was spent unlearning something taught to us previously and learning a more realistic version. I say a more realistic version, because the new version was most likely to be contradicted the next semester.

As for English, this has been well said by Paul Graham in his essay on essays. The basic gist is that somehow writing got thrown in with literature, and so all the practice kids get at writing is about literature. (Or, if they had a decent history teacher that wasn't lazy and actually required essay exams, history.) How many teenagers do you know that give a flying crap about literature? How many teenagers do you know that care about music, movies, or relationships? If you actually remember being a teenager, my guess is you answered about one percent to the first question, and about 99% to the second question. So why aren't kids writing about music, movies, and relationships?

The answer is twofold. One is that these topics are considered insubstantial and too 'pop culture' for serious writing. But that is missing the point. The whole point of learning to write is to be a good writer (regardless of the subject). To learn anything you have to practice, a lot. Wouldn't someone be much more likely to practice if they wrote about something that interests them? I never practiced basketball, and I consequently sucked at playing it. I did, however, spend a lot of hours in high school programming, and I'd like to think I became fairly good at it.

The other half of the answer is that the situation is habitual. Writing instruction has involved writing about literature for as long as anyone can remember, and if was good enough for our parents, it's good enough for us.

To me, the root of all these problems, and probably a few that I am missing, is that kids are taught, rather than encouraged to learn. At some point, fairly quickly (I remember having the realization in fifth grade), the whole school game becomes a meta-game. The objective ceases to be about curiosity and learning, and starts being about how to get the best scores. To get the best scores you have to learn the material, sure, but that only means learning the material you know will be on a test.

The greatest evidence for this mindset is in a college course. (Time to assault the Ivory Towers.) If you walk in to any undergrad course on the day before a major exam, you can tell within five minutes how interesting the class is to the students. If the class is really exciting and stimulating, the day before the test will be spent in a discussion on some topic related to the material, like any other day. If the class is (far more likely) boring and simply something to check off on your planning form, the students will spend the day pleading to know what every single question on the test will be. They will ask what to study, how many points each section will be worth, whether the scores will be curved, whether there will be extra credit, and so on. I feel sorry for the professor because, even if he doesn't consciously realize it, he is experiencing a conniving interrogation for insider knowledge that even the most seasoned Presidential Press Secretary would have trouble dancing around.[1]

The students probably don't realize what they are doing either, because they have done it for so long. They are subconsciously calculating many things at once. Foremost of these is: “What do I need to study to maximize my score?” but they are also considering how much effort to expend on studying, what kind of grade to expect on it given past experience, and a myriad of other meta-considerations. No where in all this thought is the subject of the course. Students are extremely good at the game of being a student, and generally much less good at whatever their major happens to be.

There are always those students and courses that defy this. I think my functional programming class was the most horribly administered course with the most boring lecture in my entire undergrad career, but it's still my favorite class, because despite all of that, the topic was interesting. I went above and beyond on every project in that class. It was one of the few classes that I didn't bother keeping a running spreadsheet of my grade. I knew I was kicking ass, because I thought about it all the time, even in other classes. My girlfriend feels the same way about organic chemistry.

This meta-education mentality all flows out the critical thinking duality. Specifically, the ability to think critically and question assumptions is turned off in students around the time they begin playing the meta-game of education.

It's moderately necessary, to maintain order in the holding pens we call schools, that the students don't realize they are being held. What you do is keep them busy. So classes are structured like lectures, where a bunch of facts or processes are given to be remembered, with the implicit assertion that these facts and processes will be on a test in the future. This system is great for teaching X facts in Y time, with minimal deviation, and getting score Z on some standardized test.[2] Some 'educators' take the theory even further, assuming that, statistically, a student will remember roughly half of what they are 'taught,' so they just add in more facts in the hope that more stick. I had a professor admit to this once.

Extracurricular activities help too. Almost every kid defines himself by what group he belongs to, and these activities provide an approved means to be part of a group, without the risks (violence and exclusivity) inherent in naturally forming groups (gangs and cliques). Far from criticizing these activities, I'd argue they are equally, if not more, important as the classes themselves. Social development is just as important as intellectual development. But these activities also provide a distraction, which is convenient. The distraction is from the fact that school itself is boring and seems pointless.

How would you fix this? I'm not an expert on the theory of education, but maybe that helps. To me, you do the obvious thing. Make school not boring and not pointless.

To be more explicit, I think the problem is that we are scared to challenge kids. A list of facts on a board are not challenging to students. You have to give them something that forces them to try and beat the problem. It has to be hard and interesting. Kids will rise to the challenge, because they will feel like they have accomplished something at the end. Something besides a good grade. Suddenly the subject is interesting again, rather than the meta-game.

Going back to the question about the utility of math, the teacher could respond with some demonstration of how it is useful to the kid today. Make an obstacle course for the class, with the one rule that they must pass through each obstacle at least once, but can do so in any order they choose, as long as the end up back where they started. The person with the fastest time wins. Bam, you have just got them thinking about the Traveling Salesman Problem[3], a famous problem in combinatorial complexity and graph theory, without even realizing it. Instead of teaching the kids the optimum solution to the problem (which would be pretty hard with the TSP anyway ;), ask them for ideas on the best way to solve it, write down the ideas on the board, and let the kids discuss it.

If you start this out of the blue, you'll have a lot of kids just ask straight out what the right answer is. They are used to being told the right way to do something, and have become quite dependent on it. Thankfully the TSP has no 'correct' answer so far as we know, so you get off easy here. But even if you knew the answer, you wouldn't tell them. The point is to get them to realize that they can find the correct answer on their own. It's a confidence issue.

For a writing assignment, try getting the kids to teach themselves something. The whole reason I write long somewhat meandering things like this is to try and organize my thoughts on something. Putting it out there for others to read just keeps me honest, and provides a risk factor, in that maybe someone will poke big holes in my thoughts. I am generally interested in nerdy things, so I write about nerdy things, not English literature.

Once kids get out in the real world, being able to think critically about a subject and modify their own assumptions are crucial skills in being an informed adult. So many people make political decisions based on gut feelings or a persuasive argument, but never sit down to examine the reality behind the issue. How many people do you know that think the national debt is the mark of doomsday, yet don't actually understand how a fiat currency system works? I was in that camp myself until I took the time recently to really study it. My amateur (slightly more informed) conclusion: macroeconomics is almost entirely unintuitive under the fiat system, and a lot of things deemed bad or good by the general public are in fact the opposite.[4] But that is a topic for another day.

It all boils down to our education system teaching facts to students, according to some standard, rather than teaching students to enjoy learning. To abuse a parable, it's like giving a man a fish every day instead of helping him become a fisherman. How is it logical to expect someone to catch fish just because they have eaten a lot of it? How is it logical to expect kids to want to learn, when the only reason we give them is that it will be 'useful someday.' How do we expect adults to think critically and question their own assumptions if those abilities are disabled during childhood?



[1] I may have just found a good way to pick out interesting electives. back

[2] But do they realize that the facts will only be remembered for time T? back

[3] http://en.wikipedia.org/wiki/Traveling_salesman_problem back

[4] Revisiting the Liberal Agenda. Note that this title uses the word 'liberal' in the classical sense, which is different than how it is used today. Liberal is this case is about both economic and social freedoms. Neither party today is very liberal in this sense. back

Thursday, February 14, 2008

Cryptorchild

Went and saw Manson on Monday night. It was a blast. Harry posted his review, which I generally agree with, so I'll save you the babbling.

This week at work has been great. Ken gave us a deadline, and that has put me into overdrive. I love deadlines. Maybe it's the effect that school had on me, but I work best with a deadline. Especially a close one. Much has been accomplished. It mostly forced me to just finish up the tables I have instead of looking for ways to refactor. I like the refactoring better, especially since I still have a half dozen things I'd like to tackle, but it's easy to put off the tables themselves without a deadline for them.

I haven't been doing much in the spare time other than play dota, read, or sleep. I need to go back and visit my grandpa and parents this weekend. It has been like three or four weeks, and with grandpa in the hospital lately, that seems like quite a while. I have just been sick and reluctant to visit in case I infect him. I hear he has been moved to a rehab facility that is quite nice, so hopefully things are improving for him now. (He just had some very major open heart surgery at 75.)

Tomorrow is February 15th! Yay!

I'm still on track to hit financial goals for this month and next. I'm still debating on whether I want to work Spring Break week or take it off. I guess I should check with my brother and see if he still wants to road trip. It would be nice to have the extra week's pay, which would buy me another 24" monitor and the video card I want, but a week off is always nice too. The thing is, I only have about 14 weeks left here anyway, so not like I really need a break.

Tuesday, February 05, 2008

Reflection

Work has been interesting the last couple days, as I have spending about half my time learning about Java's reflection capabilities. I have nearly succeeded in completely generalizing the action code for our Struts app here at work, which to me is a victory. For one, it removes the need to ever write/generate it again on new tables. More importantly, it allows us to fix something in one place in the future, instead of once for each table. I say nearly succeeded because I have one minor issue to address, and really a couple things I'd like to find a cleaner way to do.

Word on the street is that Java reflection is slow, etc. But who cares? If this site was going to be used by millions, it might be an issue, but it's not, and we aren't doing any computation with it, just presenting and storing information. I find the task more meaningful because it solves the more general problem.

I think there are really two styles of coding. One of them solves the immediate problem at hand via the direct approach. I use this all the time when writing some script to parse/scrape text or some other task. You build something specific that solves the problem and get it done. The second style doesn't really come about until you find yourself repeating something using the first style.

The first time I wrote a script in ruby to scrape a website, I just used the built in HTTP library, loaded the page, searched it with a regex and spit out my results. Simple, quick, and it worked. However, about the third time I found myself scraping a page, I realized that I was duplicating a lot of code and really wanted a cleaner more general way. Now if I had been a trailblazer, I would have sat down and written a library to parse html with css selector or xpath support and then used it in my scripts. Thankfully, the people who made Hpricot did this for me.

Using the same code in multiple places just seems like a bad thing. This isn't really an earth shattering idea... it's called abstraction and has been the name of the programming game since the beginning 60 years ago. My point is that I find the enjoyable part of what I do is abstracting. Once you have done the straightforward solution, it is no longer challenging. I have done enough websites to be bored with the straightforward task of putting up forms, capturing input, and saving it. The fun for me writing the abstract system to do it all for me. That was why I wrote that generator to begin with. At the time I was cheating by using my knowledge of Ruby to metaprogram in Java. Now I have learned about how Java does it's own metaprogramming, so I'm trying to make my generator (mostly) obsolete too. At some level I can't entirely do it with Java reflection (building the table objects with reflection would just be too slow as far as I can tell), but I have faith that I can still get rid of a few more things. The xsl file will remain, and the DAO and entity objects, and the hibernate mappings, but I think I still have some low hanging fruit to attack.

Completely unrelated to all this, I have several exciting ideas I'd like to work on, but I'm trying to keep my focus on the project at work. I have problems working on two things at once (or on the same day anyway), and I'd like to leave a good impression here. At least I can tinker on the weekends.

Friday, February 01, 2008

Display Technology

Wow... all I can say is that these two videos must be the coolest things I have seen in a long time. The first one is on Head Tracking for VR Displays and the second Automatic Projector Calibration. The implications for such things are crazy.

The projector calibration technology especially excites me. The fact that it works with unmodified projectors (the magic is in the screen and software) is just brilliant for one. More usefully, this would allow for high quality mobile displays... that are lightweight. Imagine having a 30x24 inch screen that is no thicker than a piece of cardboard. A projector would be mounted in the ceiling of each corner of the room. You could then carry the screen anywhere in the room, at any angle, and have a highly visible work surface. Collaborating with others would be a matter of carrying your screen over to them. Add the touch screen technology in another of his videos and you could do away with the mouse all together... and put a keyboard on the screen and you could type without an actual physical keyboard. If something happened to your screen, no problem, it's cheap cardboard with some optical fibers. All the money is in the projector, which is safely mounted elsewhere. Spill water on it, who cares.

I think the VR tech could be built on to finally make useful 3D television. The only real issue left is making it work for multiple viewpoints at once. But even with only one viewpoint, having fully useful 3D without those silly red/blue glasses would be awesome.

This guy is innovating, and man, is he good.

Wednesday, January 30, 2008

Arc

(I tried to post this a few days ago, but blogger was being crabby.)

So Paul Graham released Arc yesterday... or at least a first draft. From reading the tutorial it sounds like a fun little language so far. It definitely addresses a lot of my annoyances with CL (although I'm so rough with CL I'm barely qualified to make a genuine critique). It just seems a lot more Scheme-ish... and I love Scheme, so of course I will like it.

I haven't gotten to sit down and actually hack away at it, but from what little I have played with, I must say that I absolutely adore the [... _ ...] and composition syntax. It just makes lines so much easier to read once you get used to them. To give a trivial example, (keep [odd _] '(1 2 3 4 5)) is so much easier to grok than (keep (fn (x) (odd x)) '(1 2 3 4 5)) or the CL variant which would be something like (filter (lambda (x) (oddp x)) '(1 2 3 4 5)). (All those examples should return a list of only the odd numbers.)

I got very sick last Thursday with a stomach flu and spent most of the day purging via all available means. Friday I was still feverish and weak, but mostly recovered by the next morning. Missing work will be a punch in the wallet, but oh well, not much I could do. I spent most of the time sleeping when I could, so not much got done on anything.

You know, I really enjoy writing code in Lisp-y languages. I'm not entirely sure why. I think it's the succinctness of it. The initial release comes with a blog implementation of only 107 lines. Yes, an entire blog written in 107 lines of code. That is short.

Today was mostly spent tracking down these two very annoying Java bugs. It would be nice if the stack trace was at all useful in tracking stuff down. Sadly, I have to resort to sticking in println statements pretty much every time to figure out where the errors are. Tonight I think it will be time to play with Arc.

Wednesday, January 23, 2008

Sleepy

So last night I got home and napped from 5:45-7:30ish, then was up until roughly 1:30-1:45. At 5:30 this morning, my alarm went off, and I was in the Rec Center working out by 6:25. I feel quite victorious actually waking up early to go be healthy. The only downside is that the showers in the Rec Center are beyond cold.

Actually, the other downside is that I'm not quite adjusted to this waking up early thing either. The sleepy feeling is already hitting me.

Tuesday, January 22, 2008

Dawn

Last night I went to bed at a slightly early, but mostly normal, 11pm. I had incredibly vivid dreams about being in Spain again, only this time I had to go to high school there. They were very strange. The weirdest thing came at 5:15am, when I woke up and just couldn't fall back asleep.

I got up and had a full breakfast and trolled some news sites. Then I got ready and came to work. I actually got here before the building was unlocked, so I drove around on campus a bit to kill time. At 6:55am I was at my desk, already going.

I am not a morning person, so it was very strange to watch the sun come up.

In completely unrelated news, I read one of the best articles about computer science degrees I have ever seen. I remember being a CS undergrad, wishing that there was more 'real world' and 'applicable' courses. You know, more things like our software engineering class. But now, looking back with good ole 20/20, I can see that the coolest things I learned were Scheme (EECS 662), Operating Systems (EECS 678), and my Kinnersley triplet (EECS 510, 560, and 660). None of these things has direct real world resume value per se, but all of them make me a far better programmer and are far more interesting long-term.

Tuesday, January 15, 2008

A Break

So I took last week off and Kathy and I headed down to Austin for a little vacation. It was nice and relaxing. The weather was great, sunny every day and in the 70s. I finished both Xenocide and Children of the Mind while down in this little cabin on Lake Travis. We ate scrumptious barbeque, saw a great movie, and generally toured all things Austin.

Coming back to the cold was sad, but it had to be done. Unfortunately my Grandpa had a surprise heart attack and general near-death weekend. We went to the hospital in Olathe on Sunday morning expecting to have to pull the plug and watch him go... but after we did that, he actually started getting better. Now he is alert and they are talking about a quadruple bypass surgery and six months of rehabilitation. I hope everything turns out in the end. He has had two heart attacks before this one (in 1979 and 1987), but this really caught us all by surprise.

I have been pretty worthless otherwise. I pretty much didn't touch the internet while in Austin, except to find stuff to do there. Since being back, I've mostly just played dota or watched movies. I've done some general chores/bills/rebates and spent two hours Saturday on the phone with AT&T getting our download speed fixed, but nothing in the area of Lorebroker or the project with Tyler. At least I have been getting things done at work.

Hopefully I'll get back on the ball soon. Only 129 days until my self-imposed summer vacation. It'd be nice to have momentum going into that.

Friday, January 04, 2008

AT&T Dry Loop Finally

So someone was kind enough to reply to my last post about dry loop DSL to inform me that AT&T started offering their Elite service (6.0 mbps down/768kbps up) as a dry loop package on 12/13/07. So I called the number today (1-800-264-0002 for the midwest region) and put in an order to switch my service over. Since dry loop means no taxes or fees on the bill (absolutely none, due to the lack of a land line), that means we'll be saving about $25/mo. Yay!

Wednesday, January 02, 2008

Feliz Año Nuevo

So the new year is here, like every year (don't think too hard about that). Woohoo... I guess.

I never make New Year's resolutions, and I don't intend to start that now. I have been very productive so far. Granted, a lot of that productive energy has been devoted to making decks, sorting stuff, paying bills, and just general ilk... but a good chunk of it has also been spent on making my silly code generator at work even better. It pretty much will set up an entire table (in basic form) with a single command. That probably shaves a couple hours of work off each table. Not bad.

Today also happens to be Jys' birthday... que lo cumplas feliz! I look forward to sushi tonight.