|
« Random |
Main
| Website News »
Technology Archives
Well, The biggest thing to talk about right now is what i'm doing to PsychoticWolf.net at this point. I decided with this website i'd actually attempt to care about web standards, since I've accused Microsoft Internet Explorer, repeatedly of not being properly supporting, when it may be that i'm just bad at writing HTML that actually respects the standards in some ways. PsychoticWolf.net is being written in HTML 4.01 Strict and CSS2. This, while for those who know about the standards, know it's late to be finally adopting HTML4/CSS, is a major thing for me, as i'm actaully verifying the pages for validity.
When I began designing websites, I was much younger, and HTML 3.2 was still the active standard, as much, the editor I use, and still use, is only a HTML 3.2 editor. I like the editor because it is basically like Notepad+Wizards and helpful toolbars for HTML. I've used it to write alot of my PHP scripts as well. It's even handy for fixing up Apache Configurations, and other Unix/Linux documents as it understands the line-endings, when notepad doesn't. The editor was last updated in 1998. Since that time, HTML 4 and CSS came about. While I've taken the time to learn some CSS and write it correctly. I adopted a bad method for HTML.. I took the HTML 3.2, I knew, and began adding 4 tags to it, as I'd copy/paste and learn new. Never actually fixing the DOCTYPE or even learning the correct doctype syntax for 4. While I still do significant testing, among different browsers for viewability, it's not the correct method. Some I believe have named this practice "tag soup" as it's formed and thrown at the browser to deal with.
I now intend to upgrade all my pages to at least HTML 4.01 Transitional, and stay within spec or at least, try to, but for this site, I decided to test in Strict also, to see what the differences are. The experience has so far, been educational, to say the least. I've learned much of the changes that occured between HTML 3.2 and HTML4 in a matter of a few years, including stuff such as the dropping of the FONT tag, and some of the way CSS actually does a layout. I'm still not quite finished converting the site over, (as of this writing the photos and links pages are still not valid.) Home, About Me, Weblog, and WolfLan are valid though as they stand now. Though, I find that this is more complex than I figured it would be. I didn't realize how off I was from the Strict 4 standard in some cases.
The other reason I've decided to actually work on writing in Standard HTML, is because of the amount of time I've started spending around the Mozilla.org IRC channel and working with Mozilla Suite/Mozilla Firebird as a whole. For those who are aware of the existance of XHTML, and wonder why I'm spending time learning correct HTML4 and not XHTML 1.. Read this article, http://hixie.ch/advocacy/xhtml.
Hopefully tomorrow I'll finish the last two sections and getting them verifying, and fix a few site bugs which have popped up even though the code is valid. Due to differences in the way the browser shows the code, and be then able to finish the initial design/creation of my new homepage. I've got a lot more stuff that's personal and much less technical to do, still to come. :-)
Alright, tonight I finished upgrading Photos and Links to HTML 4.. this site is now, for what it's worth, HTML 4.01/CSS2 compliant. (Some sections are using Transitional and others Strict). I view webdesign as an art, and not at all like i'm scripting or programing, which are more technical or a science in nature. As a result, I tend not to be particularly standards-oriented, especially the strict standard. There are people who would probably criticize my stance as written in this blog entry, but, to quiet them down, I will state the following, I'm not trying to break the standard, I'm just not using the strict version of it, if time passes and the site gets broken because browsers change, I accept that, and will fix and upgrade it to specification then. I do not in any way ask for browsers to bend-over backward to support me. heh. Part of the way I'm writing this site, is to get my site out of what Mozilla calls "quirks mode" where it's not really sure what it's looking at and so it renders it in a common way. By picking some standard, and placing the full doctype at the top, I've now moved it into standards compliance mode.
A few examples of why I don't like the strict doctype is stuff like the following..
(1) I disagree with the W3C that the content and style should be seperate. I use CSS, mostly for it's powerful cross-page styling features.. but I also use older tags like CENTER and FONT. I'm learning CSS though, and will probably use the style="" attribute of tags more often.. I tend currently to only use CSS when linking to the stylesheet via class=""
(2) Sometimes it's a question of simplicity. In CSS2, it appears to center an item such as a image, you must float it as a block, (display : block) then use margin : auto... or in IE, it has to be margin-left: auto and margin-right:auto.. plus a width must be defined, (which for an image has been requirement to define and is done automatically, but for other types of objects, it is new, and not automatic)... Where the hell is something simple? like align : center? why does it have to be so complex? when the old method via HTML to do it was the atrribute ALIGN=CENTER. The closest it gets to something simple like align is a text-align property which doesn't work on objects.. (As it clearly indicates with it's name..) It just seems like an oversight to make it harder)..
My other issue with the HTML spec, as valid, is with HTML entiies and there interaction with a common method for using the query string... In a URL like.. http://www.psychoticwolf/fakepage.php?variable1=foo&variable2=bar, there's an ampersand between foo and variable2, which is used to split two parts of what's known as the query_string (anything after the ?). the issue is.. in valid html, the & is the starting character for an HTML entity, basically, it's code that prints a nice character.. like > or < and it ends with any non-alphanumeric character. so.. if strictly parsed.. I used an entity in that URL of &variable2 which isn't defined. of course, to the browser, it really doesn't affect anything. unless I called my variable name a name of a real entity, then the resulting behavior would be to replace my &variablename with the character. Makes sense, right? heh.. Only a couple of things.. I'm supposed to change the & to &a-m-p; (the hyphens are to prevent the browser from showing an & ) does this seem redundant to anybody? The stance of the HTML standard is that script authors should use something other than &, such as ; but if you say it, does it make sense with ;... that uri above would really read.. as.. "variable1 equals foo AND variable2 equals bar" makes logical sense.. unlike the latter. Does PHP allow you to change the & to &a-m-p; as it parses the script, to get around the error? nope.. you're supposed to use the entiy for a perfectly valid character. heh. go figure. I have literally hundreds or even thousands of that error on my pages.. heh.. as a result of no good way to easily convert it, for the output.. Bugs.PHP.net bugs # 25901, 15804, and 25248 relate to the topic. all of which have been marked bogus, because PHP says it "isn't a bug".. heh..
Anyways, thats all for now.. Maybe my next entry will be about something else, huh? heh..
Well. heh. the last few days have been fun. really. The server here, tazdevil, decided that Sunday night after a Thunderstorm would be a great time to have a hard disk drive failure. I don't believe the storm was the cause though. Either way the 80gb drive that the machine runs decided to corrupt two partitions. One of which was the partition that contains my webdevelopment and website work. urgh.
After 19 hours with Spinrite 6 running on the partition, (at level 2), and Windows' chkdsk utility reparing the NTFS file table, the partition was almost fully recovered. (and the part that wasn't there was a backup of, yay.). The drive wouldn't let WinXP reinstall though, because of the bad sectors, ick.
So, yay for me, heh. Luckly the drive is still in warranty, and gets to be replaced, (waiting for the replacement drive to be shipped now, Advanced RMAs, yeah!), so while it's out, now i'm down to a 20gb disk. heh. Till Maxtor gets around to sending the other one. heh.
I've made a few changes to firebot, the IRC bot that gives bugzilla bug information for Devs/QA/users in #firefox and #thunderbird tonight.
* Added kick handling, auto-rejoins channel when kicked.
* Added invite handling, bot can join a channel when invited.
* Added ping to test if hte bot is alive. just say firebot: ping
* Added per-channel op lists. in addition to the global list, so
* cleaned up a few hacks I threw into an otherwise clean codebase, restoring channel op speed to original.
* Attempt #2 to fix the ping-out and never reconnect bug.
Still to do, is to fix the milestone status reports to be cross-product and available in a /msg instead of in channel, then they can be enabled again. :-)
Well, it appears RoadRunner has decided to up the downstream speeds again, this time to 5mbit max, prevously it was 3mbit max, when I first subscribed it was 2mbit. heh. I'm quite pleased, especially considering I was doing at best 1mbit before they upgraded lately. :-)

Well, irc.mozilla.org now has services, thanks to the work of Stuart.
I'm not particularly a IRC services champion, but so far, it appears that with little effort on my part, the status quo is maintained and I don't have to change any behavior on my part. (register nick, register channel, add identify command to chatzilla on startup.)
The bots were another matter though, wolfbot got a new module enabled (ServicesLogin) which works nicely with a single command to configure. Firebot, on the other hand, needed new code so he'd /msg nickserv on startup.
Though, now that firebot/wolfbot aren't needed for channel op help anymore (firebot helped out with keeping docbot +o'ed, and wolfbot did similarly to firebot in other places), I'm wondering about the practicality of keeping 2 bots running 24/7. Firebot's primary goal is Bug status announcements (for #firefox, #thunderbird and #wolfbot.), and wolfbot's is informational, RDF announcements in #spreadfirefox, tinderbox in #firefox/#thunderbird, bugzilla in #wolfbot, etc. Neither goal requires a fully dedicated bot, so I'm thinking about merging the two bots into one. They'd be more manageable, and less channel clutter. Most likely, that'd require porting firebot to be a mozbot module, bzbot.bm, and then enabling that in wolfbot (which i'd rename firebot.). I'm sure there'll be some major reason why this won't work, but its worth a shot.
In my last blog post about the bots, I mentioned combining them into one bot. Well, as of a few days ago, this is now done. :-) So I thought I'd blog a follow-up post about it, before moving on to more interesting things. It wasn't exactly easy because of my inexperience with perl, but the new firebot seems to work decently.
If anybody wants the BotModule they can grab bzbot.bm here... Its pretty rough in places, but it works.
In addition to adding the new module, I also applied the patch from Bug 248450 to give firebot SSL support, and made him set his unmode +B so the server knows he's a bot. His /whois can't get much longer. heh.
Lastly, anybody looking for /just/ the Firefox/Tbird, etc Bug Info, and don't want to be in #firefox/#thunderbird and get confused with all the support,etc discussion. Feel free to join #firebot (formerly #wolfbot).
Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM.
You can always count on PHP to give you an unusual parse error and make you think you're hallucinating.
'cause the first language I expect my errors in is always Hebrew. Really...
(For what it is, go here... http://us2.php.net/tokens)
Apple has criticised a French law that could break the locks tying songs from the iTunes store to iPod players.
"If this happens, legal music sales will plummet just when legitimate alternatives to piracy are winning over customers."
"iPod sales will likely increase as users freely load their iPods with "interoperable" music which cannot be adequately protected. Free movies for iPods should not be far behind in what will rapidly become a state-sponsored culture of piracy."
So, just because the files are open means people are instantly going to pirate? I'm assuming this also means that the iPod currently doesn't accept anything that isn't protected by iTunes? Wrong. :-) The players, according to the Apple website, already support a variety of formats, not just ITunes protected AAC.
The files are still "legally" obtained, they're from the iTunes store. The problem is, you might not have to buy music for your iPod only from iTunes, or might be able to use another music player besides the iPod, and as a result breakdown Apple's business model and profit margins.
Personally, I enjoy how words like "interoperable" are used in their statement, in the same critical way that republicans say "liberal". That interoperability is *bad*, and is something to be rejected by any moral person.
Not that I should expect anything less from a statement designed to spread FUD over the law anyway, that legal sales will drop in favor of piracy just because they can no longer restrict what you might do with the music you _bought_, not licensed or leased, from them.
My other favorite turn of phrase is the stolen "state-sponsored culture of piracy" (Isn't it supposed to be culture of terror?) I guess that means DRM is the good guys in the "War on Piracy?"
Seriously, DRM isn't protecting anything, if you can play it, you can copy it. Unless the iPOD goes so far as to try to break compatibility with other consumer electronics, which, as far as I know, it doesn't. Its success is not based on the existance of DRM, its about answering consumer demands, and if one of those demands is interoperability between devices/services, perhaps instead of branding these people pirates, you should listen to your consumers, before somebody else does.
From the BBC News Article -
"Apple attacks plan to open iTunes" -
http://news.bbc.co.uk/2/hi/technology/4833010.stm
"Panasonic based themselves on this statement to develop an interactive TV wall. Yes, we are talking about a wall... with a touch sensitive screen that has the surface of two 110" TV's (you just need a big house or share the TV with your neighbour)."
Link: Panasonic's interactive TV wall, the demo
So, for me, this is a bit of a random post, as I usually don't blog things like this. I run an installation of Nagios locally, to monitor my network. Its by no means critical, but its nice to know if the server this site is hosted on, is having issues, for example. Its a bit of a complex installation though, as the nagios daemon doesn't run locally, its on my friend's network, (also where I host firebot, the mozbot on irc.mozilla.org. So, to do checks here, I use NRPE, on my linux box here to relay the checks as if the remote nagios host was monitoring things directly. It works very well. Problem is, my linux box isn't on a wired portion of my network, which makes things a bit flakey. So, I decided to migrate NRPE to run on tazdevil, my primary server, but its Win32. which isn't a problem for the NRPE daemon, which has a NT port. It also compiles pretty easily under Cygwin, which gets you the daemon and the check_nrpe plugin, which is useful since I have 3 NRPE hosts here, for the plugins that simply must be run on the local machine.
The plugins, on the other hand, are a different matter. While there's some plugins for windows available, some of the more useful ones, like check_mysql, which I needed, weren't. So, after a full night of pain trying to compile nagios-plugins-1.4.9 under cygwin, only to end up with plugins that didn't work anyway (socket errors, etc.). I managed to, yesterday, compile successfully nagios-plugins-1.4.5, which is an older release but it works (same as what I had installed on my linux box), some of them are very linux-dependent, and even cygwin doesn't provide enough *nix for them, such as check_icmp.
So, to save people in the future looking to do this themselves some pain. I decided to package and provide the binaries for both nagios-plugins-1.4.5 and nrpe-2.8.1. They include the relevant required cygwin dlls, so a cygwin install is not required, and were compiled using GCC 3.4.4.
Nagios-Plugins 1.4.5: Download
NRPE 2.8.1: Download
These are provided in the hope they'll be useful, but are not warranted in any way, if they work for you, great, if not, you're on your own. (There's some testing notes in the nagios-plugins package, but the nrpe package hasn't been tested, except for the check_nrpe plugin, which works fine for me, the only reason I built it.) Though, if you want to contact me, you can at spamtrap@psychoticwolf.net.
One other note, if you decide you want to try compiling the plugins yourself under cygwin, after you run ./configure edit the makefile in plugins/makefile, and edit libexec_PROGRAMS (line 46 or so) so that negate and urlize are at the end, also make sure that all the names have $(EXEEXT) after them. This will avoid the bogus cannot find header errors that seem to occur to any plugin after negate/urlize, as the plugins build system clobbers its include path building those plugins and fails to bulid anything after. (This is what I spent the first night fighting, quite frustrating as the check_mysql plugin I wanted was the first after urlize. ugh.)
One of the things that has bugged me over time is how annoying Apache's usual file-based passwd files are to manage and deal with. I don't change the configuration very much as a result. adding a new user is tedious, as I never remember the syntax to pass to the utility to create the file, etc. Being on windows, the joys of modules like mod_auth_mysql just didn't work well, (in fact, in my experience, crashed.) and was rather unreliable.
So, when Apache 2.2 was first released, I was excited that one of the new features was SQL Database support. Sweet, I thought, only to quickly find out that, it wasn't compiled by default for Windows yet. No big deal, I'm rather used to bleeding edge features being a compile-it-yourself kind of thing in open source applications.
Last Fall though, I discovered that the module was included in the windows distributions and set about trying to set things up, following the documentation which instructed me to specify a DBDriver directive to select which driver, and even specifies as an example, mysql. Of course, apr_dbd_mysql.so, as referenced on that page wasn't included, So I set out to find a copy, something I was used to doing for mod_ssl.so, only to find little info, and then to discover, that not only was the module not available by default, it wasn't yet even in the apache source tree but rather a 3rd party because of licensing issues, and further, that in the 1.2.x version of apr-util, it didn't even have dynamic module support for the db drivers, so no such apr_dbd_mysql.so existed without patches to the to eventually become 1.3.x apr-util unstable trunk.
Not to be beaten, I decided to give the module a try on my linux apache install, patch source tree here, figure out to reconfigure apr-util to be mysql enabled and rebuidl, then install, then figure out how to convince mysql to get along so authentication actually worked, after a few hours of banging it surprisingly worked, and worked well. Not ready for my other machines though.
So, that's alot of history, and here's the good news. since that time, Apache now bundles and is using what was then only a myth, APR 1.3.0. In fact, by default in the windows distribution, you'll actually now have dbdrivers to pick from, pgsql, sqlite3 and oracle. Still no MySQL. I've seen a couple of possible reasons for this, one from the apr-util readme.mysql which suggests licensing issues still apply, not sure if this applies to the httpd distributions or not though. The second, and more important issue I found in a readme.win32 in the httpd-win32 source distribution, also printed here, that the MySQL driver wouldn't compile on windows. Sure enough, after setting up a MSVC6 build enviroment with the appropriate Platform SDKs to build apache, trying to build apr_dbd_mysql-1.dll resulted in several fatal errors regarding the use of "long long" types which VC6 (which the ASF binaries are built with) doesn't support. This turns out to be a known issue, already fixed in apr-util 1.3.2 which has been released. (I fully expect that future apache versions (such as a 2.2.10 whenever that is supposed to be) will likely use this version, and whether or not the mysql driver is built we'll have to see then, but until then...) So I quickly grabbed the windows source trees and after a little bit of fighting with VC6, which i'm rather new to, (No, I don't want to build APR for x64 with VC6 on a Intel 32-bit CPU, thanks) I successfully compiled apr_dbd_mysql-1.dll. After dropping in the configuration from my tests last year, the new DLL into the bin folder and restarting, things seemed to be ok. (Without the DLL of course, you get this error "DBD: mod_dbd not compatible with APR in get_driver" which is a rather cryptic way of saying that APR doesn't have the driver you're looking for.) Pointing my browser to my test directory though, gave me a prompt for password and then promptly, an Internal Server Error (500). doh (Along with this very helpful error message in the log "[error] [client 127.0.0.1] Failed to acquire database connection to look up user 'wolf'") reminding me that the apache mysql user actually needed privledges to read from the new DB table.. Fixing that up, and boom, it works. I have only tested it on a limited basis and haven't tried it in production yet, but much like my previous efforts at compiling, I wanted to share with the great internet masses who don't have access to a copy of VC6 and just want to enable this functionality into their Apache 2.2.9 (or later, most likely, but not earlier, since it requires APR-1.3 to work) to share in my happiness...
So here you go, there's no warranty here, and if it fails I most likely cannot help you. That disclaimer aside, go ahead eager one, grab it. :-) It drops right into the standard apache distribution for windows.
apr_dbd_mysql-1.dllFor Apache 2.2.9 and higher only. compiled with Microsoft Visual C++ 6 (SP6) [Zip Compressed, 7.6KB]
Configuration Notes:
This is my configuration, scrubbed for passwords and such.. I have it at the end of the general configuration, before my virtual hosts.. Most of it was stolen from the Apache docs, which aside from being a bit vague about DBDriver are pretty good.
This is probably going to be a bit of a rant. After having spent the last few hours playing with trying to get TVersity 1.0 RC1 to properly read and transcode video I captured using a Plextor ConvertX/Intervideo WinDVD Creator 2.. its pretty straightforward video, it captures at 720x480 and compresses using Divx 6 (6.8 is installed on the machine) but annoyingly enough it doesn't use mp3 for the audio, but rather mp2. Which, I suppose is understandable. Unfortunately, its not the easiest format to work with, there's no VfW decoders for mp2 audio that are free, due to licensing restrictions, which makes tools like VirtualDub fail to be able to convert the audio to something more friendly.
Where the fighting comes in, is that the digital media player here, the D-Link DSM-320, which is pretty nice, does not support MP2 audio in an AVI. Even though the profile tversity has for the device, which specifies what needs to be transcoded to be able to play vs. what can be played natively, enabling a much wider range of videos to be played, thinks it can. The result, audio that's nothing but skipping static. and lots of it. Eek. Luckly just a simple comment in the profile.xml file for the device telling the software that an mp2 in an avi doesn't work, is enough and the transcoder now kicks in to handle the conversion to a format the player can actually handle.
The transcoding feature though, while very nice when it works, can be an absolute headache to get working properly with a variety of formats. Anybody who's saved videos from the web or captured stuff over a long enough time has no doubt collected quite a mess of different formats, even if they only appear to be a few types.. (the container types tend to be nice and misleading to make you think there's only a few.) commonly nowadays, flv, wmv, mov, and avi.. with rm (and ogg) in there somewhere.. this of course, left out all the mpeg, mp4, m4v and the mountain of extensions those use. On top of that, if somebody hands you a .mov, is it H264? MJPEG? or something else? If you're just using Quicktime, its not a big deal, since any type the file can be will play with it, but then you end up with a pile of players installed on your system fighting over file types since they all want to be the one true player, but fail in subtle ways abysmally. As you'd expect though, not everything can just go through the one true player for playback and not expect things to be a bit more compatible, TVersity's transcoder is one of those things. On Windows, which is the only platform for now, it supports, it uses DirectShow to read the videos, so any video you can play in Windows Media Player (or any DirectShow capable player) can be read, and played back to your device.
So this brings up the obvious problem, how do you get DS to be able to handle the popular formats? Well, let's start with a (hopefully) simple explaination of how video is played back...
The image above is graph of youtube flash video, as it would be opened by directshow. First thing is the container is opened by the appropriate filter, in this case the "FLV Splitter", flvsplitter.ax, which as its name implies "splits" the video into its component parts, which are then read to determine what compressor was used, (for youtube, this is currently H.263 for video with MP3 audio) and the appropriate decompressors are selected and the decompressed data would then be passed to to your soundcard ("default directsound device") and player screen ("Video Renderer"). In my case, both H.263 and MP3 for video is handled by ffdshow, but a variety of directshow filters exist.
So, if everything goes well, the flv you saved will now play back in all its glory for you. For quicktime, using mp4splitter.ax ("MP4 Splitter") will usually work since the quicktime format is mpeg4 based. Though some quicktime files seem to like having more quicktime components available, so installing Quicktime is sometimes the only solution. The MediaPlayer classic sourceforge page includes most of these filters, which are really handy. After you get and install the filters you'll need, you'll want to install FFDShow, which is a very nice set of decompressors/compressors for a variety of media types (including all the FLV types, H263, VP6 and H264.)
Now for the rant.... Why is all this so hard? Why, to make use of a fairly simple device do I need to install a crapload of filters and decompressors to transcode video that the 'media server' can't even handle... I know I have an above average variety of videos locally to deal with, some compressors like Indeo and cinepak and all the mpeg varients as well as the average quicktime, flash, real and divx videos, and I don't expect the older videos or the more obscure compressors to work, but its not too much to ask for a real error message when they fail, perhaps with some indication whats wrong, Video codecs have long confused users of all skill levels, people just want their computer to work.. not to spend hours trying to figure out which combination of codec and container in their matrix they missed installing software for. If you send Grandma a video of your cat playing with a ball of yarn, having to think about if they have quicktime (which your digital camera was so nice to preselect for you.. ) or not shouldn't be needed. Thats one of the reasons why Youtube and similar sites which, yes, use flash, which most systems have today, its easy and you know on the other end it'll play. And surprise, now that its become easy to share video without the headaches, millions of people have chosen to do so. Its really a great thing. It does come with its own problems though, alot of people have difficulty or don't know how to save or play back web video later, and content authors often probably think their video will only stay on sites like youtube. (thats speculation, but it makes sense to me anyway).
Its already been proven that the various organizations and companies that develop these compressors and decompressors and players have no intentions of making that world any easier on the rest of us. Otherwise various platforms would have standard ways (like directshow) and players would actually, provide the filters to enable their formats to play, and not try to lock-in users to use only their players...
Now, here comes more fun, though only tangently related to the other paragraphs in this lengthy and wordy post.
Now that video is the web's next big thing.. (thanks to youtube and flash player.) the slow, but steady standardization people have decided, that what we really need in the next version of html, is a
|