New member of the family!

| 5 Comments

Elissa and I are proud to announce that we have a new member of our little family. We picked up a 6 month-old black lab (mix) from the Tri-county humane society in St Cloud. The shelter had him named "Cash", but that's a pretty lame name if you ask me. So we named him -- while phonetically the same, it's significantly better: Cache. :-)

I don't have pictures of him on the computer yet, but I'm sure you'll be seeing plenty of him in the future. He's really playful, but at six months he's trainable. In fact, he came to us pretty well-trained already! He knows how to sit and stay, and he's great off the leash (never really strays far away and comes back to you when you call him). He pulls a bit on the leash, so we're working on that. He also doesn't dig the kennel, but he'll get over that with some work.

Both of us are super excited to have a dog, and he's been a blast to have around so far (though we've only had him since about 5pm today!). w00t!

Templates and local variables

| 2 Comments

Can anyone spot what's wrong with this code?


void foo( void )
{
  struct Test {
    int a;
  };

std::vector< Test * > tests;
tests.push_back( new Test );
}

Here's a hint: it compiles fine in Visual Studio, but not in XCode. The real answer lies in section 14.3.1.2 of the C++ language specification. Namely,

A local type, a type with no linkage, an unnamed type or a type compounded from any of these types shall not be used as a template-argument for a template type-parameter.

I was entirely unaware of this little factoid until I recently committed some code at work which bounced back to me as being unable to compile on the Mac. After reading this section though, I see now that gcc is conforming to the standards more strictly by default than Visual Studio is (though both IDEs have options for strict/relaxed conformance).

My question is: why? It strikes me as being rather odd that templates behave this way, since (AFAIK) there is no other language construct in C++ which disallows locals in this manner. Any ideas as to the reasoning behind this?

Moved and stuff!

| 4 Comments

Sorry for the long absence, but we moved!

After Elissa graduated and walked, we moved back to our house in Minnesota. So for the past few weeks, I've been without internet connectivity. It's been a blessing and a curse. It's nice to get away from the computers for a while, but it still sucks when you have to stand out in your front yard to check your email off a stranger's wireless connection. ;-)

The move has gone mostly well. We took off from Riverside on a Monday morning, and made it to the house by Wed evening. We'd went about 700 miles a day (ten hours of driving), and did 2044 miles in three days, with both of the cats in the car with us. Needless to say, I don't want to sit in a car for a while. ;-) But the trip was uneventful with no major disasters. It was great to see a lot of the country during the move.

But no move is complete without some horror story -- this move's horror story has been dealing with the moving company (Mega Van Lines). Our stuff still hasn't left CA, even though we were told over the phone it would be delivered on the 22nd (this past Monday). Rawr!

Since most of our stuff is still in transit, we're not truly able to "live" in the house right now, which sucks. But it's not stopped us from getting started on the joys of home ownership. We've been doing a lot of gardening, and shopping for things like furniture. Our bedroom set arrived yesterday, the mattress next week, but it will be 6-8 week before our couch arrives. So while we wait to be able to do stuff inside the house, we've been focusing on the outside by doing a ton of weeding, planting and planning for gardens.

All in all, it's great to be back! We've even been treated to a few thunderstorms since arriving, which have been awesome!

Really Microsoft? Absolute paths?

| 5 Comments

While helping Elissa with her thesis presentation, I got really annoyed at PowerPoint for its incredibly stupid habit of saving external data as absolute paths. Yes, I know absolute paths are unavoidable on Windows. However, that doesn't mean you get a free pass on user experience!

The problem boiled down to having external sound files in the document. You'd import the sounds, test them out, and be happy. Then you'd move to another machine and oops, sounds may or may not work. Three very intelligent people in the ento department were utterly baffled by this behavior. Things would work, then randomly stop working. I knew immediately that the issue was the fact that the ppt and sound files were being stored on a flash drive, and that different computers were assigning different drive letters to the drive upon insertion. So if it happened to get the same drive letter, everything was fine. But if the drive letters differed, then the sound files wouldn't work.

What's ridiculous about this entire situation is that the sound files were relative to the PowerPoint presentation! This is a very common use case, especially for people who put presentations onto a flash drive. So why not store two pieces of information in the file format? An absolute path is very quick and easy to work with, but relative paths aren't difficult to generate or parse. Save them both so you have a fallback in case drive letters change.

This isn't just a problem for Microsoft. Anyone developing an application for Windows should keep this in mind. There's no excuse for your application failing to perform properly just because the user happens to plug their flash drive into another computer. Bugs like that are a great example of why many people think computers are "magic." Consistent results are the key to making a good user experience, and PowerPoint utterly dropped the ball. Don't make the same mistake in your own applications!

Congrats Lis!

| 4 Comments

Lis passed her defense with flying colors! :-)

Her little brother, Lawrence, and I went up a bit early to hang out with her on Tuesday. Mostly to make sure the presentation was all in order (PowerPoint + sounds = terribad problems) and to calm her down. She was halfway between panicked and excited, for obviously understandable reasons. But she knew she'd do alright! At 2pm the presentation started, and it lasted about 40 minutes. For being nervous, you sure couldn't tell it from where I was sitting! Everything went swimmingly well. Then the audience got to ask questions. And it was a fairly large audience for a defense -- a packed house! There were about 25-30 people there, which was really nice to see. The questions weren't unexpected. It was the usual sort of stuff that Lis would get when presenting things like her poster. So she fielded the five or six questions without a problem. Once the audience was done asking questions, then everyone had to leave except Lis and her committee so that they could ask her questions. Obviously that went well -- they signed off on everything!

It's kind of strange how two years worth of constant stress, sweat and labor all boiled down to about two hours of talking. But Elissa made it through, and she'll be graduating on June 13th with her Masters in Entomology from one of the top-ranking schools in the world!

Congrats! I'm so proud!!

Exciting times!

| 2 Comments

I've been pretty terrible at blogging lately, but that's because Elissa and I have been super busy. She defends her Master's thesis today at 2pm! The last two years worth of struggling all pretty much end today. She's been sitting on the thesis itself for a few days now (she never leaves anything for the last minute!), and today's all about presenting her research to colleagues and her committee. Once she's done with her presentation, everyone gets to ask questions. Once the general public is done asking questions, we all have to leave so Elissa can do one-on-one with her committee members. They're basically going to ask more questions. After answering their questions, they sign off on her thesis and she'll be done!

I cannot describe how proud I am of Lis. This stage of her life has not been a cakewalk by any means. It's a very intensive program, and she's had to work extremely hard to get where she's at. But she's gotten there, and done it with grace and style -- true fashion for my wife!

Way to go sweet-pea!!!!

PDF: the biggest scam ever

| 11 Comments

Like most remote employees, I have to deal with forms via PDF files fairly regularly. This isn't usually a problem, except for two minor details: 1) I hate wasting paper with printing crap out and then scanning it back in, 2) I don't have a printer or a scanner at home anymore. But this is the computer age, surely there's a concept out there that can assist me! Oh yeah! Just edit the PDF file. It's a simple concept really. Use the typewriter tool to enter in whatever text I need to enter in, and then import a picture of my signature (from way back when I had a tablet PC and stored off a signature image) for any places that needed a valid signature. Sounds reasonable, right?

Wrong.

Not because the technology isn't there, but because it isn't readily available in a reasonable format. PDF is the "free" way to deal with portable documents. But thanks to Adobe, that's become "only when reading." Everyone, even F/OSS programs, have jumped on the "pay for this basic editing functionality" bandwagon and it pisses me off. PDFs are ubiquitous, just like text files have been. Imagine just how frustrating your life would be if Notepad (BBEdit, whatever your poison) decided to only let you view text files. If you wanted to edit them, it'd save with an illegible and pointless watermark over it. It's ridiculous.

I spent almost an hour today looking for a free PDF editor that would do those two simple things (fill out text fields, import a picture) and couldn't find ONE that could do even that little. FoxIt, which used to be my favorite free PDF viewer and editor has decided to start whoring itself out with ridiculous toolbars, and multiple versions of the product with various plugins, etc. Worthless because importing images means you get watermarks. CutePDF, which used to be the gold standard before FoxIt, won't even install for me because they're too lazy to make a UAC compliant *installer* for the application. They actually have the balls to tell you to turn off UAC just to install their shitty software. Wow. I also tried some off-brand PDF editors, including Bullzip (which is just a print driver, and that doesn't solve my problem), PDFill (which watermarks even simple editing like typing in fields) and a few others.

Quite honestly, with all the incredibly terrible software that's out there in the PDF market, I was tempted to just give Adobe some money for a version of Acrobat that allows me to edit PDFs. Then I realized I'd just be supporting the stupid concept that I hate anyways. Don't call it a portable document format, because that's not what it is. Document implies reading and writing. Call it a portable viewing format, because that's all it is.

There's probably some obscure piece of software out there that does exactly what I need it to do (and if you know of it, please let me know -- my requirements aren't hard: edit text fields, import an image, save to PDF with no watermark). However, after an hour and a pissed-off blog entry, I'm not interested in searching much more.

Once I move back to MN, I'll be buying a printer/scanner/fax machine.

Frickin hot!

| 9 Comments

Sorry about the lack of updates this past week! I got back from France last Thur (the 30th) pretty late at night, and have spent most of the week trying to get used to life again. It's been super hot out here in SoCal, and that drives me bonkers. But I'm also readjusting to the timezone difference, and been working pretty hard on stuff for 4D.

But that doesn't mean there's not exciting news! We've finalized our moving date, and have gotten a moving company. We're leaving California on June 15th, and both of us are incredibly excited about it.

I was originally figuring that we'd get a U Haul to tow behind the truck. But they cost 700$ for us to rent for the week (for a one-way trip), and the cost of a moving company is only a few hundred more than that. Totally worth the extra cash not to have to monkey around with hauling stuff.

We've already got a ton of plans for things we're looking forward to once we get back. In fact, we've started a list on my white board. :-D Leinie's, puppies, fishing, hiking, gardening, lemonade sipping on the deck, and sports are all up there. I'm also thinking of picking up some husky hockey season tickets, if possible -- I miss good hockey (the Ducks just don't do it for me).

SQL, how strange art thou

| 11 Comments

One of the things I've been working on lately is an architecture for lexers, and I'm basing my work off an existing SQL lexer I have access to. The lexer is well-factored, so refactoring it into a more generic tool is pretty simple. However, while doing this, I ran into a behavior that I thought was strange. I'm sure you've seen the same thing in your own coding: you take some working code, refactor it, test it out and notice some strange behavior and wonder "did I break something?" In my case, I was noticing that my lexer was reporting the following as two distinct tokens (instead of some sort of error). The text I was entering was:

2foo

I found it strange because what my lexer was telling me is that I was getting a NUMBER followed by an IDENTIFIER. So I did a bit more poking, and it was even more interesting than that.
2.1.1

That was returning NUMBER NUMBER!

So I was checking over my code to see if I had somehow introduced a new behavior, but realized that I hadn't. This behavior had been there since long before I got my fingers into the code. Surely I had just found a rather obscure lexer bug, right?

Wrong.

In SQL, tokens do not need to be separated by whitespace if they can be unambiguously distinguished while lexing. In the two cases I provided above, the lexer can easily figure out the answer in an unambiguous manner. But this has some rather funny ramifications.

select(*)from'sometable'where.1=.1

Hard to read, but perfectly legal SQL statement right there. My understanding of why you would actually want to do something like this is as a front-end optimizaton to your queries. Basically, if you're going to send a plain text query over the wire, you may want to run it through some sort of minimizer first to reduce the size of the query. The only other explanation I can come up with is that it also makes for an interesting blog posting! ;-)

Made it!

| 7 Comments

I made it in to France safe and sound. My flight from Ontario to Dallas was pretty uneventful, though they managed to land a bit late. So that meant I got to run from one side of DFW to the other, and was basically one of the last people on the plane to France. Thankfully, I had a stroke of good luck on that plane -- no one sat next time (it was one of the only open seats on the plane, too). The flight in to France was just as long as I remembered it. The movies were horrible (Madagascar 2 and Nim's Island), but Lis sent me off with a few good books to read. I landed in Paris right on time, but very sleepy.

I went from the airport to the hotel to drop my stuff off, and then in to the office. Boy, it was a long day! By about 4pm, I was certain I was going to die if I didn't get some sleep, so I went back to the hotel, ate a bit of dinner and was asleep by about 5:30pm. Of course, the other joy of the massive time difference is that I was awake at 4am today. :-P I forced myself to stay in bed until 5, but then got up and played a bit of WoW to pass the time. At 7, I decided it was time for work, and so here I am!

Alone.

I forgot that no one gets in to the office until later. So I'm here with the maid service. :-P

June 2009

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        

Categories