Programming help

I’m currently working on a software project using Visual Studio C++ and MFC. I haven’t developed on windows for about four years, so I’m a bit rusty. I have a problem right now that perhaps my vast blog-reading, uh, readership might be able to help with.

I want to create a dialog box that has two panes. On the left is a regular Tree View, but the righthand side is a dynamic area that can be filled with whatever dialog object I want. How do I do this?

Right now I’m thinking of making the righthand side a tab control, and then just adding and deleting tabs as required. Often there would be only one tab. This seems, however, like a bit of a hack, and Bad UI. Any ideas for a real solution?

Share

Marathon

Char and I went to the Boston Marathon on Monday. I should have
kept an eye out for Will Ferrel, who finished in under four hours, but I forgot he was going to be there.

[800×600][1600×1200]
Heartbreak Hill, where we always watch.

[800×600][1600×1200]
The trucks in front of the lead women.

[600×800][1200×1600]
Said leaders

[800×600][1600×1200]
HO HA!

I’d post more, but frankly the pictures aren’t that good. The light was harsh, and lots of runners look like lots of runners. I don’t have anything real dynamic.

Share

Salem

For three bucks apiece, Char and I went to Salem. It was, perhaps
predictably, a tourist trap with crappy boutiques and overpriced restaurants. In this case, the boutiques catered to that large goth/wiccan/new-age segment of the population.

[800×600][1600×1200]
Me being patriotic in front of a recreated ship

[800×600][1600×1200]
Very old graveyard

[800×600][1600×1200]
This clothing store was the only store worth seeing in Salem.
Share

Upgrades

Some people seem to think I want to buy every new gizmo that comes out. That’s only somewhat true. I do love following development of pdas, phones, laptops, and such, but I only seriously consider purchasing something when it has satisfied certain conditions. For instance, I’m not going to actually get a new phone until it has:

  • high-rez, 16k color display
  • builtin camera, decent quality (flash, maybe zoom)
  • photos are sendable from my phone to this weblog
  • plays a good hour+ of mp3s/oggs through external jack
  • hopefully portable games will be easy
  • real internet access, not stupid WAP and not just web
  • basic PDA functionality
  • java
  • NOT MICROSOFT
  • GSM 1900, unlocked
  • under 250$

I expect this will take a year or more, seeing as the 400$ phones aren’t even up to this standard yet.

As for a laptop, I’d want at least six hours on a battery, and a graphics chip capable of Doom III, and under 1500$. Again, not going to be for a while.

Share

Trains

Some thoughts on trains

Share

I just lost this entire update thanks to galeon crashing. My system has been much more unstable lately, it sucks.

on with the post:

A man leapt onto bullet-train tracks at JR Shin-Osaka Station, directly into the path of an oncoming train, but he miraculously escaped with minor injuries after the train passed over a gap he was in, police said.

–snip–

The train, which was bound for Okayama Station, resumed travel about 40 minutes later after an inspection, causing delays to five bullet trains for a maximum of 34 minutes and affecting about 2,700 passengers.

A man leaps under a train, and causes delays of only 34 minutes?

I live in a country where the fastest trains are late by hours on sunny days, so the Japanese train system is almost magical to me. I’ve often wondered if it would be possible to bring any train system up to Japanese standards if you poured enough money into the project. I think that it’s impossible.

The Japanese, to put on my generalization hat, value the collective good over individual whining. They’ve got guys on the train system that, as far as I can tell, wave lights back and forth at every train. They have computerized station announcements, and a guy that comes on the PA and says the exact same thing again. The Japanese system is regimented, strict, exact. Everybody has their little job, and they don’t stray in the slightest way. When the workers cross train tracks, they gesture in each direction to ensure they don’t get run down.

No American company could justify these jobs, and even given vast amounts of money they still would never do it. Here, I know who’s driving my subway by the voice and the way they announce the tracks. Some drivers are slow, others are fast. The workers could give a shit about someone telling them to point down the tracks. Americans know that everyone is doing just enough of their job to get by. If they don’t think it’s necessary, they won’t do it. Distrust of authority goes hand in hand with swiping office supplies.

Truthfully, pointing down the tracks is probably not necessary, and there’s a lot of other superfluous little things. But someone, somewhere has decided this is the way, and by gum they do it. Even the passengers do their part and behave nicely. Every part works together, and the result is perfect trains.

Here, the small deviations eventually add up. Even if the T had all the money in the world, some kid would hold the door open for a friend. A driver would go a bit too slow (I had a guy who missed the station and had to back up). As a result, trains bunch up, they need to hold them, things slow down.

There’s something to be said for an individuality-based culture like ours, even if it means we can’t get perfect subways. At least we’re not all mindless “sarariman” stepping out of our beautiful trains and hanging ourselves.

It would be interesting to compare how much the Japanese spend on rail versus Americans on highways, and see which is more expensive by population, or per mile, or gross. I think they spend a lot more on all accounts. Given the societal impossibilities it’s all academic anyway, but I can still dream of getting on clean subway car.

Grab bag

Char loves candy, so whenever we see candy-themed grafitti she jumps with joy. One might think grafitti wouldn’t cover the candy issue, but in fact we see it a lot. One even commands us to “eat candy.” Don’t mind if I do!

[800×600][1600×1200]
mmm candy

Sigmund seems to come out only when people aren’t around. So the best time to catch him is in the mornings, when he is usually lounging on the couch. That’s where I found him today. gotcha!

[800×600][1600×1200]
Lounging on the couch

Share