Monthly ArchiveJune 2005
Artwork 28 Jun 2005 10:12 pm
World (of abstraction)
This looks significantly better on screen, after scanning it in, I think. It’s like one of those images which has too much detail: you have to blur your vision or back away for the bigger picture to form, and I’d had my face up close to the paper for far too long.

Here the bigger picture is of course abstract, but the same effect is present. Also, being able to crop the edges (I’m not going to do that to the original) helped center the design and make it more pleasing to the eye. Realize that a great deal isn’t captured in the scan, such as that I mistakenly used a different shade of black ink for part of the design… That nonetheless worked out well in the end, though.

The above is a close-up of the top right corner.
Randomness 28 Jun 2005 10:20 am
Parity check!
As long as we’re on the topic of solutions, here’s the answer to the Prisoners & Hats brain teaser of a few days ago. Or, I’ll start with a hint, rather, and if you want to stop after reading the hint and not read the solution until you’ve had some time to think about it, then you can. Or if you want to stop now and read the brain teaser again, do that.
Anyway, here’s the hint. I’ll tell you first that all of the prisoners in line will give the correct answer and live, except for the one at the back of the line (who is asked the question first). Obviously he can’t know the color of his own hat and so has a 50% chance of getting it right.
Given that the rest of the prisoners live, each MUST state the color of his own hat and nothing else. So you know what each prisoner says, the only thing you don’t know is what the first-asked one says to start off the chain.
Here’s the answer:
The last in line (asked first) prisoner counts the number of, say, white hats on all the 99 prisoners in front of him. It’s either even or odd, and he says black or white, respectively. He has a 50% chance of dying because he has no info about his own hat. The next in line counts the number of white hats on the 98 prisoners in front of him to determine his own color. For example, if it’s even and the guy behind him said white, he knows he must have a white hat.
Now each prisoner, when asked, has counted the number of known white hats in front of him visually and behind him auditorially. He gets an even (->black) or odd (->white) total from those 98 others. The first-asked person could see 99 others. So for each prisoner N, if he gets a different answer from that of the first guy, he says “white”, and if he gets the same answer he says “black”.
Technology 26 Jun 2005 12:48 pm
RDC random popup solution
Solution to the “Remote Desktop keeps popping to the foreground every five minutes when I leave it running and just minimize it” problem:
Before minimizing the Remote Desktop session, restore the window (double click on the trapezoid-shaped title) so it’s not in full-screen mode anymore. Then the session will politely stay minimized and not periodically pop up to ask for attention. I’ve left sessions minimized like this for days, and they still stay active.
I still think Remote Desktop is the best thing since sliced bread (and whatever else it was that I said is better-than or close-to sliced bread in greatness) and it’s nice that Microsoft has integrated it into Windows XP Pro. There’s still VNC, but that’s very slow by comparison, doesn’t support the notion of the multiple simultaneous user sessions (through the “fast user switching” capability that XP Pro has), and doesn’t have “easy to use” encryption built in. One can tunnel VNC over SSH, but that’s an extra connection step to make.
Randomness 26 Jun 2005 10:59 am
Today’s word of the day
Today’s word of the day is troglodyte. Why? Because it popped into my head for some reason. Interesting how the word is ambiguous as to its connotation, positive or negative.
Randomness 25 Jun 2005 12:26 pm
Colors
That “prisoners” brain teaser of my prior post actually works for any arbitrary number of colors. For example, the hats could be chosen at random from red, green and blue, or ROYGBV. (I refuse to put Indigo in there because it’s almost the same thing as Blue. It’s basically just dark blue, and they have it there just to make the mnemonic more pronounceable. I learned the spectrum as “red, orange, yellow, green, blue, purple” and I don’t need some silly mnemonic with silly colors like “indigo” and “violet”. It’s just purple, everyone!)
(There should be something that tells you when you’re typing and you forget to close a parenthetical remark. That should be a simple enough feature for a spellchecker, you know, but I don’t think they check that.
Randomness 24 Jun 2005 01:12 pm
Another brain teaser!
Forget the story or why this situation occurred, you can make that up yourself. Or not.
Anyway, the situation is that there are 100 prisoners in a line, and each one has on either a black hat or a white hat. Each prisoner doesn’t know the color of his own hat, but he can see the colors of the hats of everyone in front of him.
The prison wardens have arranged this situation, and they now plan to start at the back of the line and move up towards the front, asking each prisoner in turn what color his (that prisoner’s own) hat is. If he’s wrong, that prisoner will be shot on the spot.
The prisoners knew about this situation beforehand, so they devised a plan to minimize the number which could be killed. What’s the plan?
And… to head off another potential solution which I thought of (and liked, and I still think it’s the most elegant one, sorry!): the prisoners, when asked, can only say “black” or “white”. One can’t inflect his voice upwards or cough or breathe in a certain way or anything like that to communicate to the person in front of him what color his hat is.
Thanks again, Vicky, for sharing this one, too!
And John, I already thought of the answer (figured it out myself, thank you very much), so don’t worry about spoiling it for me, at least. But if you thought of it, please don’t post it on the board for a few days. You can email me directly if you want. :)
Randomness 22 Jun 2005 10:39 pm
Brain teasers
Note to self: don’t share a brain teaser with others until you’ve fully figured it out yourself! (Unless you’re stuck, that is.) Otherwise they’re going to try and solve it and might just give you the answer.
Technology 20 Jun 2005 09:36 pm
Monday night silliness
Man! I mean… HRMMMMMMM!! Not speak like Yoda you must, hmmmmm? Criticize Yoda intelligence of, hmmmm? THINK CORRECT GRAMMAR CAPABLE SPEAK NOT I AM OF, HMMMMMM? Pant pant… calm down I must… anger Dark Side path to is. Calm I am now. Cough hack There is… another… Sky… Walk… LIGHT SABER UP YOU WITH CUT I WILL! GRRRRRHHHMMMMMMM!!! COUGH COUGH
Frank Oz: drink…need…I…a…
Lucas: Here, have some of this brandy.
I’m getting ready for an all-nighter. Have to finish up a PHP project I’ve been working on for some time.
Vicky says: “You have two ropes. Each takes exactly 60 minutes to burn. They are made of different material so even though they take the same amount of time to burn, they burn at separate rates. In addition, each rope burns inconsistently. How do you measure out exactly 45 minutes?”
Now that’s a HARD brain teaser and I’m still thinking about it. I came up with one answer that works but it involves an infinite number of something (to get arbitrarily close to 45 minutes), so there has to be a more elegant solution to get “exactly” 45 minutes. Something to think about when you’re bored… Thanks Vicky!
Oh well, it’s technically “Tuesday morning” now. I could adjust the date of this post, but that would be horribly dishonest and I’m not that sneaky.
Music 19 Jun 2005 08:59 pm
Bat Man
Remember Megaman 2 for Gameboy? It had completely different music from the original game for NES. One of the limitations was that they only had two or three sound channels to work with. Anyway, the Gameboy music used the “noise” function a lot, and FL Studio has a “3X Osc” instrument that allows us to add a noise channel which resulted in something reminiscent of that old Gameboy game. So I started putting in some notes and ended up with this (mp3) little bit. Shows how easy it is to write music in that style? There could actually be a “Bat Man” level, but still the subject’s a bit misleading. Anyway, more when I have more time to kill. …Which I didn’t, really. Just taking a break, you know? I would have loved to compose music for those old NES and Gameboy games, by the way.
Graphics 18 Jun 2005 03:50 pm
Logo, revisited
It started with this:

Which eventually became this:

But in the meantime, I had tried out some ideas like this:

And this:

And this:

I never put those ones up, but I did use this one for a while:

Randomness 17 Jun 2005 04:56 am
One Must Die
There’s an icon on my desktop with the label “OMFBGDemoBuild2172.exe”. WTF is this and how did it get there? I can’t delete it because the file is in use, but my computer was restarted last night, it says, automatically to install some patches. Okay. After some ReGoogleSearch, it’s part of “One Must Fall BattleGrounds”. I used to play OMF (an early but to this day still awesome robot fighting game by Epic, but it wasn’t me who downloaded anything having to do with the game recently. Hmm… who was using my computer?? Did I download this in my sleep?
Technology 16 Jun 2005 08:55 pm
Mac(pain-in-the)tosh
I had to work with a Macintosh network today. If I had been mostly ambivalent towards Macs before (which I wasn’t; I had thought the system response time for just about everything was sluggish and the interface (one button mouse?) inefficient), now I can state unequivocably that I HATE Macs. Especially OS 9. They say Macs are easy to use? Of all the most unintuitive, poorly designed interfaces I’ve seen, the Mac interface is at the top of the list.
Now, I’m not stupid. I’ve figured out how to program your VCR, without the manual. I’ve set your car’s dashboard clock. But I couldn’t figure out how to eject the empty CD drive tray because there was no eject button on the tray and I literally spent 10 minutes trying to figure out how to do this through the Finder (and then gave up because I couldn’t figure it out). There were files that I could select and hit Copy on, but then I couldn’t Paste them into a different folder because Paste was always grayed out. When I copied a selection of files, the system sometimes ran out of memory. I couldn’t get a USB printer installed with OS 9. Another OS 9 machine would see the network, but I couldn’t get it on the Internet and there were no TCP/IP settings or troubleshooting tools available. (I suppose if it were Win9x and I didn’t know about “winipcfg”, or NT and “ipconfig”, I might have the same complaint in this one instance. But somehow for me Windows (since 9x) manages to be mostly intuitive, though we often complain, and I remember it being so even when I wasn’t too familiar with anything and set up TCP/IP for the first time through the control panel.) Oh well. I don’t see this as a matter of taste at all, anymore.
Technology 15 Jun 2005 08:19 am
MS Access
I’m getting better at MS Access design. The nice thing about Access is that you have your toolkit right there in front of you and once you get to know that well, working with Access is mainly a matter of form design/structure. Database schema design itself is not that hard, but with a very complex underlying table structure, determining the best way to efficiently present the information on a set of forms so that it’s editable, straightforward to use and looks nice is often a challenge. The tools we have available are things like Tab Controls which let a lot of data fit into a smaller space, Subforms which enable the display of data from multiple tables on one form, and combo and list boxes for navigation and lookups. Often all of these need to be dynamic: tabs hide or show themselves based on criteria in the table containing them, the list of items in the combo box needs to be updated based on other fields, and so on.
Another limitation I run up against in Access is that the program becomes unstable as forms become complex. If I embed a subform into a form where the subform itself already has a subform, then there seems to be a significant chance that the program will crash when switching from Form View to Design View. However, sometimes the use of nested subforms is necessary to achieve a certain interface. With three levels of nesting, at least with a particular design I tested, a crash was inevitable so I had to try something else. Fortunately Access seems stable enough when just running, and not switching to Design View to edit forms, so I can deal with the crashes.
By “stable enough” above I don’t mean that Access is a good platform for storing the actual data, however. It’s easy for a database file to become corrupted and irreparable, especially when run off of a network drive and in a multiuser environment. Frequent backups are important. So Access is a very poor database, but it’s a great tool to use for creating complicated graphical interfaces to data, quickly. For the actual database (data storage and database schema), use a solid database server such as MySQL or SQL Server. I’ve been using the former for quite some time, and despite having to work around a few quirks (which I’ll write about next time), it’s a good combination of programs.
Randomness 14 Jun 2005 08:57 pm
Time’s a wastin’
Guess I have about 4 minutes to post something today otherwise I’ll have skipped a day? I better hit that submit button fast.
Technology 13 Jun 2005 05:20 pm
Complaining
I guess today’s theme is “complaints about technology”. :)
Technology 13 Jun 2005 04:34 pm
I hate CSS
Or at least, current implementations of it. I spent at least 4 hours today trying to get something to look similar in Internet Explorer and Firefox. In most regards, IE works right much more of the time and renders more elements as would be expected. IE has a few strange quirks, but better supports actual styles that people might want to use.
For example: I have pages with this structure:
<div class="param"><br> <span class="name">Paramater Name</span><br> <span class="value">Parameter Value</span><br></div>Now, I have a bunch of these in a row. I want all the parameter VALUEs to line up vertically. I want a gray horizontal line below each pair of values.
- How I want it to look, which is easy in Internet Explorer:

- This seemingly simple layout is very hard to also achieve in Firefox.
I tried this potential solution:
1. Making the “name” style definition contain “float: left”. Adding an extra “<div class=”clear”></div>” after the “value” DIV tag in my page structure. But… I don’t want to change the page HTML structure; that’s the whole point of CSS. Also, I want a bullet to the left of the NAME class and this was accomplished by defining NAME to be a list-item. By setting the NAME to float-left, the bullet is no longer positioned properly in IE (it oddly moves to the right of the text).
So I’m goin’ back to tables for now, unless someone stumbles on this article and writes with a solution. Regardless of what they say about content/presentation separation, CSS makes layouts which were easy with tables extremely difficult if impossible to achieve, especially when cross-browser compatibility is necessary. CSS doesn’t separate content and presentation well when extra tags (such as the “clear: both” empty container) and great care need to be taken when preparing the content so that specific presentations will work.
A lot of the compatibility issues, in turn, can be blamed on the fact that the CSS spec leaves many trivial-appearing details unspecified. Then it’s not surprising when different implementations do things differently, and we poor designers/programmers deal with the annoyances that result.
So I don’t hate CSS, just the fact that it’s promoted as an end-all solution to Web design when that turns out to be far from the truth, at least based on the amount of time I’ve spent grappling with stupid compatibility bugs.
XML and XSLT, perhaps? Time to learn how to use these.
Technology 13 Jun 2005 07:30 am
Remote Desktop
Why does a Remote Desktop Connection under Windows, when I leave the connection connected and minimized, periodically (every 5 minutes, it seems) and spontaneously maximize and switch to the connection window? I use RDC’s a great deal and this becomes incredibly annoying because I’d like to leave certain RDC sessions minimized and active without having them continually pop up over time, but there doesn’t seem to be an option to disable this “feature” anywhere. The same thing also happens on other computers, so it’s not a setting specific to my machine, but I can’t find any information about this anywhere.
Randomness 13 Jun 2005 05:47 am
I only got a little lost
San Diego is a nice place, and Zenia is a muppet.
Technology 10 Jun 2005 07:47 am
NetBIOS over TCP/IP over SSH
This article will probably appeal to 0 people in my present readership, but whatever. You’re warned.
My goal was to be able to map a drive letter to a shared drive on a computer over the Internet using Windows file sharing, but access everything securely and reliably (and not use a VPN). For those of us familiar with how tricky it is to get file sharing working smoothly even on a LAN, sometimes, we might not have held out such high hopes, and in fact it took several hours of trial and error (before I stumbled across this page) to get it up and running. I recommend OpenSSH for Windows, which is just great, and the ubiquitous PuTTY SSH/Telnet client. I had to set the client to send keepalives periodically otherwise the connection was dropped after 15 minutes or so.
The premise is that you forward your local computer’s NetBIOS TCP ports to the remote computer, but since you can’t change the ports it uses you have to close your own computer’s NetBIOS ports. An important gotcha is that you need to forward to the actual IP or name of the remote computer on its LAN (say, 192.168.0.20), not “localhost” (which works if you’re forwarding most other things, like the MySQL port, for example).
In the final outcome it works great. We’ve come a long way since we tried to use something like this at the PIC Lab, eh? :)