Blog | Admin | Archives

Life as a computer program

If my life were a computer program (note the correct use of the subjunctive form), I think it would be fair to say there was a sporadic bug in the sleep routine. Last night, I became immensely tired about ten o’clock and fell sound asleep. For some reason, about an hour and a half later, I woke up and wasn’t able to get back to sleep, at all. I rested most of the time, but sleep did not come. Needless to say, I was a bit of a wreck at work today and I called it quits early, even though I was only really tired for the first few hours.

If this were Java, or PHP 5, I would have my sleep routine throw an Exception at times like these. The exception might get caught by something useful; say, a call to a workout routine (might as well if I’m not sleeping, right?), but instead it seems to go into some sort of endless while loop where nothing gets accomplished.

Ok, I think I’ve been programming a little too much recently…

Correct Me If I’m Wrong…

When I ran in to a CSS/Table conundrum at work, I decided to see what Bernie thought. The links have been achored, and the text prettied, but otherwise the conversation is real.

One of the recurring themes I run into while visiting sites about CSS is how sinful it is to use tables for layout. I tried to take this to heart, but for the life of me I can’t figure out a better way than tables to align items that, to look good and make sense, must be lined up properly both vertically and horizontally.

Here is the page with a table
And my utterly failed attempt to replicate with css

Am I missing something fundamental, or are tables really the better choice in this case?

And while I’m on the line with a CSS guru, what makes it so that the elements with the position: absolute propety set conform to their parent element instead of the browser page as a whole? Is it when I set the position on the parent element that this works? If so, thats kinda dumb, imho…

Having fun with CSS I see ;) One of the things you’ll quickly learn (and seem to be learning already) is that while CSS design can prove to be very rewarding (e.g. bandwidth) it can also prove to be very, very stressful. If you’re trying to make your design look good in more than one browser it gets even more stressful :) Often times you’ll run into situations where you know you could do something in a matter of seconds using a table, or some other non-standard HTML
approach.

I try my darnedest to stay away from tables whenever possible, but as you’ve pointed out, sometimes they are the only option. As far as the sites recommending you avoid tables at all costs go, take that advice with a grain of salt. Tables are still a perfectly valid construct in XHTML 1.0 and 1.1. A lot of the presentational information has just been moved into CSS whereas in HTML 3 you could define most of your table properties in the table tag itself.

I don’t know if you’ve seen it or not, but I wrote something on my site about “tableless tables,” and it seems like an approach you might be able to use for what you are doing. Take a look at this before you decide to go the table route. What I wrote was more a proof of concept than anything else, so it would be cool to see it put to real use.

While I’m not afraid to use tables when they’re absolutely called for, I do try to avoid absolute positioning like the plague. I’ve seen too many problems with page flow when using that type of positioning in my CSS. However, if you’re dead set on it (there are certainly situations where it’s a necessity) give this a look. I believe they answer your question in the first paragraph. There seems to be a good deal of information there, so hopefully that will help.

Good luck, and try not to pull any hair out ;)

I was very impressed with your tableless tables, and I pursued making them work in my situation as well, but I ran into problems. (Correct me if I’m wrong, again…) The biggest deficiency of tableless tables is that in oder for alignment to be maintained vertically, the cells
have to have preset widths that are the same (in your case, 23% did the trick). In other words, there is an inability of cells that are supposed to be stacked veritically to resize together fit the largest content in the column. If you don’t force the “columns” to be certain size, they choose to be whatever is inside of them, and any semblance of tablehood is lost. It seems to me that in this case, CSS does not degrade very well, and tables are indeed the better answer for me at
this time, especially since they are so well supported by so many browsers.

On another note, I had some glimpses of CSS3 today, and all I have to say is that whenever it starts to get seriously supported, designing pages should be quite a bit of fun, especially with the pseudo-selectors like nth-child(2n+1) and all that :-)

It sounds like tables are the way to go for what you’re trying to achieve. If it was me, I’d spend some more time trying to figure out a way to do it in CSS, but that’s just because I like torturing myself ;) I can think of a few options, but like you said, we might as well wait until CSS3 when things become so much easier (like this).

Like a Mask

There are plenty of movies where the characters, and sometimes even you as a watcher, don’t know who is who. Like in Mission Impossible with Ethan and his masks. It makes for interesting film, but I’ve never had to deal with the situation in real-life – until recently. The issue involves AOL Instant Messanger and a particular person who doesn’t seem to realize her friends are sneaky mischiefmakers. Several times over the past few weeks, I have come to the startlng revalation that I’m not talking to who I think I’m talking to, and its atually somewhat disturbing, to say the least. Its not like I’ve said anything I’m embarassed about, but, well, do people get off doing this or what?

Windows XP Woes

Occasionally, I will get on a stint to fix something on my computer that’s been bothering me. Today I decided that I just had to fix the fact that it takes me a long, long time to navigate though folders wit lots of images because Windows Explorer decides it needs to thumbnail all the images. Well, what seems like it should be an easy feature to turn off is anything but. After changing all sorts of normal and hidden options, messing with the registry, renaming system DLLs, and searching for hours on google, my system still goes to work to create all the thumbnails – even when it isn’t going to display them because I’m in detail or list view mode. It will contnue to drive me nuts when I’m opening a file in a folder with many large images (read: digicam download), taking minutes sometimes to get my system bak under control. Bah!

My brother was kind enough to run some tests on Mac OS X checking out the same functionality. OS X also creates thumbnails on local files, but it seems to do this truly in the background (XP’s takes over the system) and it doesn’t seem to try to do this over network connections (thank goodness). MS should start taking some ques from their Appletosh friends.

Starting to like CSS

For me, CSS was like climbing a wall. When I came to the wall, I looked for a way around it, under it, or a door through it. I had been out of the loop for so long that the wall became stange and uninviting (the last time I really studied the state of HTML I was in 8th grade!) However, due to a new project at work, I decided that learning CSS was in order to create a compliant web site. And after climbing the wall of learning rudimentary CSS, I’ve decided I like the view from the top.

Here is the result of my first day of dabling in CSS. Let me know what you think. Its pretty cool to be able to create tabs just by having some CSS change the way certain links are created.

On a related note, the project that I am working on at work now is going to be open sourced, as soon as I get around to it. So I will be paid to develop some open source software. Not such a bad deal.

I didn’t sleep much yesterday, and I don’t plan on repeating that mistake again tonight. So I bid thee farewell, my friends.

Cascade Resonance Scenario

In Half-Life, along with its mods, quite possibly still the best computer game ever created, the first major event of the game is a “Cascade Resonance Scenario,” which causes lots of stuff to blow up and aliens to start teleporting to earth. However, the details of a CRS were a mystery to me until I started playing Bontago.

When I set a high number of gifts, and make most of then anvils (which tilt the playing field), there is a good chance that before the game is won, the tilt of the board causes blocks to slide into more anvil gifts, causing the board to tilt more, and that this will create a postive feedback loop that ends up looking like this.

Even more interesting is that when I first saw this behavior, I immediately called it a Cascade Resonance Scenario in my mind. Indeed, Half-Life is that ingrained in my pshyche.

Bontago

Surfing Digipen‘s site, because I happened to link to in in a previous post, I ran across Bontago, the winner of a rather prestigious-sounding award for computer games. So I downloaded it and started playing, and found that its quite fun, once you get the hang of it.

The idea is that you try to capture flags by expanding your territory by building blocks up. The higher your blocks are, the more territory they capture, but the easier it is for other players to topple them using earthquakes, rockets, and tilting the board.

Take a look at the screenshot, then go download it yourself!