Tag Archives: Tech

Cell Phone Torture Test

This has got to be one of the funniest things I’ve seen in a long time. Basically, it’s a Dutch show where they conduct humorous torture tests on different products. First off, the Dutch language is one of the strangest things I’’ve heard in my life, and that alone made the video worth it, but also they torture test my phone, the T68 from SonyEricsson. You can watch the stream here (WMP link, broadband), or with RealPlayer here. Forward to about 20:30 to see the water thing. For those of you without broadband, let me paint a picture:

Basically they’ve set up what looks like two showerheads, and they give the phone in question to the host of the show who stands under the two showerheads and talks. They did this for about 15 minutes with the T68 and it was still running. At one point they bring him a glass of Coke and he sticks the phone in that and it keeps going. After about 15 minutes I think they got bored, and the guy goes ahead and throws the phone into a bucket of water. Where it keeps going. The phone actually went for another three minutes completely submerged, all the time with that prerecorded voice they had on the other of the line talking. Thinking back the only way I can think of them being on hold that long is if they called Sony tech support :).

Dreamweaver again

Okay, I’m over the hot emotions from yesterday’s (or this morning’s) Dreamweaver “experience,” but in reexamining my Dreamweaver ban I don’t really see any loss of productivity. I do about 95% of my coding by hand, usually in HomeSite, but in the past I’ve found Dreamweaver to be useful for times when I’m cutting/pasting large amounts of text, or putting images in, but I have to admit that is easier to simply to just drag an image onto the page then manually typing the tag with the image diminsions, etcetera. But these are all things are available in Homesite, albiet hidden under some dialogs.

Anyway, today I begin my quest for the perfect editor. I want a small, fast, and easy-to-use marvel of programming that will make the most arduous tasks a breeze and not bother me with unecessary fluff. Thinking back there were several things I liked about editing code in DW, specifically the code hints that would come up, allowing you to enter things without actually typing them. I liked how when you used a PHP function it would tell you the proper attributes, and their order; I liked the way you could glance at things in design mode to make sure everything was kosher, and it would even pull include() files in, a templating technique I use quite a bit. So in addition to all that, here is my wishlist for this editor I will find:

  • Full Regex suport/Robust search and replace
  • PHP syntax highlighting and context tips
  • Small footprint.
  • Tons of keyboard shortcuts
  • All generated markup should be XHTML
  • Nice file browsing mechanism
  • Server mapping support
  • Thought completion (j/k)
  • Good support, quick bugfixes

If anyone has any suggestions, please let me know.

Dreamweaver MX == Evil

I’ve been working for about the past 6 hours converting a large PHP project to be XHTML compliant. It was an arduous process, but the nice syntax highlighting helped and the search and replace function saved me a ton of time. Or so I thought.

One of the routine (or so I thought) changes I made was converting all the onMouseOver and similar attributes to be lowercase. This is required for validation and for the javascript in the behaviours to be executed (in strict mode). The first time I ran everything through the validator there were hundreds of errors, and so for about 3 hours the onmouseover case errors escaped my attention. Finally I came to a point where that was all that was left. Try as I might I couldn’t find the code in question. I searched through all the include files, yet still nothing returned a case sensitive match to what I was seeing in the source. Then I did a case insensitive search through every occurrence, and double checked that everything was lowercase. The file must have been saved dozens of times and uploaded to the server just as many times. I thought the validator must be caching it or something, anything, so I waited and tried again at different intervals. I restarted Apache, I loaded and unloaded the PHP-Accelerator from the php.ini file, with subsequent restarts.

Finally at some point I fired up trusty Homesite to see if maybe I could spot it with that. Much to my surprise, the case of every onmouseover was capitalized just like everything was saying it was. It turns out even though Dreamweaver said it made the search and replace changes, and showed that it made the changes, it hadn’t made the changes at all.

This has been enough for me to give it up entirely. Whatever time I might have saved since it came out using the GUI has been irrecoverably lost.


The strangest thing just happened: I’m in the case of my desktop taking out the old modem card, because I don’t use it anymore and I have no free PCI slots. Actually, I do have one free PCI slot but whenever I plug anything in it freezes my computer, so I try to avoid it. Anyway, I was swapping out the modem card for a firewire card, but while I was pulling out the modem I heard thunder and the computer started turning on! I immediately reached for the ‘real’ power switch on the power supply but I forgot that this case doesn’ have one, so I unplugged it. The card was half out of the PCI slot when this all started so I was very worried that it would hurt something, but it seems everything is alright. This has been the strangest day.


Via Zeldman, there seems to be an initiative to eventually stucture legislation in XML. Browsing around, I espescially liked the member list of the 107th Congress; it’s beautiful XML styled through an XSL style sheet, the only major quirk I noticed was that the validation DTD was a local path. While this won’t make the content of the stuff coming out of DC any better, it will certainly make it better structured. I wish I had seen more of this kind of thing on my trip.

Birthday mess

On the front page of Mullenweg.com I’ve been using a query that grabs all the birthdays for that month and displays their information, ordered by the day of the month. Here is the query I’ve been using:
SELECT id, first, middle, last, private, dod, DATE_FORMAT(dob, '%M %e, %Y') as nicedob, DATE_FORMAT(dob, '%M, %Y') as mob, DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(dob)), '%Y')+0 AS age, DATE_FORMAT(dob, '%M %e') as day, DATE_FORMAT(NOW(), '%M %e') as today FROM people WHERE MONTH(NOW()) = MONTH(dob) ORDER BY DATE_FORMAT(dob,'%d')

This has a couple of problems: first, it has a bunch of junk in there that I’m not using anymore and/or should be done in the PHP, not the SQL. More fundementally is the problem that it reports birthdays incorrectly! My sister Charleen pointed out that the front page had the date of her birthday, July 21st, right, but it was going to be her 28th birthday and not her 27th. The problem was the code was calculating how old she is today and then reporting that. The column is even being called ‘age’ because I took the code from another part of the site where I was calculating age. Obviously some changes were needed. I started by removing the stuff I don’t use anymore, and making it a little tighter:
SELECT id, first, middle, last, dod, DATE_FORMAT(dob, '%M %e, %Y') as nicedob, YEAR(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(dob))) AS birthday FROM people WHERE MONTH(NOW()) = MONTH(dob) ORDER BY DATE_FORMAT(dob,'%d');

Now we have a much more managable chunk of SQL, but still nothing to fix the problem. After much deliberation, and thinking about ways to implement a conditional statement to check whether the day had passed yet and then add a year to the ‘birthday’ column if required, but after a while I just realized that the simplest and most accurate solution would be to just subtract the year of birth from this year. This has no issues since the year never changes in the middle of a month. Here’s the final product:
SELECT id, first, middle, last, dod, DATE_FORMAT(dob, '%M %e, %Y') as nicedob, YEAR(NOW())-YEAR(dob) AS birthday FROM people WHERE MONTH(NOW()) = MONTH(dob) ORDER BY DAYOFMONTH(dob);
Ahhh that feels good :).