Posts tagged Nerd
Vista SP1 First Impression
Mar 18th
Vista SP1 was over 435 megabytes for me, making it larger than any Microsoft Service Pack ever, larger than any Mac point release, larger than many OSes themselves. Installation took well over an hour in three stages, which is suspicious, as again, I’ve installed OSes in less time. But it went smoothly and did it all on its own, which was nice.

Click the link for a larger picture
Booting up, there’s nothing immediately different. I tried copying a 28MB file over the network to check on time. It copied the first half in light-speed, but then stopped. I called the guy whose machine I copied from: “Hey, did you just shut down?” His response, “Negative, I lost connection all of a sudden.” Uh-oh, I thought.
But alas, after he rebooted, I copied the latest ISO of gOS, which weighs in at 535MB, and it told me 60 seconds, and by jiminy, it took about 60 seconds.
Thus far – after 30 minutes use – I’ve only noticed one new feature, it appears Vista SP1 has some new “modes” of desktop wallpaper display, and can finally “stretch” wallpaper. Thanks God, because my larger secondary monitor always had stripes with Vista RTM.

Click the link for a larger picture
So, first impression? So far, so good. My biggest pet peeve – the abysmal network transfer speed – appears to have been quelled (potentially, we’ll need more data for a final conclusion). I’ve long since gotten used to the graphics and learned to enjoy the subtle fade-in/fade-out of apps. I still am warning people to stay clear of Vista for some time, and still have no plans to roll it out at work in the enterprise, but I certainly think that Vista is coming along. I think there’s a better shot that when Windows 7/IE8 come of age, people will be willing to rethink things on a larger scale.
Integers on the Intertubes
Dec 12th
Some time ago, I wrote an application for my company. Like most weblets I’ve written, this used PHP and either MySQL or MSSQL for the backend. This particular application logged all phone calls. As part of the record, it would record the caller’s account number, which is a 5 or 6 digit integer.
So, I got a phone call from the director of our customer contact department this week. He was concerned about the reports. He made a decision last week that when a call came in that was a lead – in other words, a non-customer, that his people would fill the phone number from the caller ID into the account number field. But when he ran his export reports, he found that hisn techs had entered this phone number for ALL of the calls: 429-496-7295. That’s weird, he said. So he called me and asked why that was. I checked all the calls and most were from one woman, so my first instinct was “Check if her browser has autocomplete turned on”. But he swore that he tried it too and gotten the same result.
I checked the database and sure enough, it was right there: 429-496-7295, in all of the fields. So I went back to the code. In short, I took the input from the form, and declared it like this:
$accountnum = (int) $_POST['accountnum'];
Pretty straightforward: explicitly declare the type. So, I started my debugging by attempting to manually enter the data into the database. Sure enough: the account key field showed this: 4294967295.
So, I went back to the PHP and started by dumping out the raw SQL query:
INSERT INTO calls ('','x','x','x','4294967295','x','x');
What? So the database automatically converts it to this weird phone number and PHP does too? Suddenly it occured to me. One of the benefits of 64-bit computing is the ability to address more memory. There are limits to what can be done in 32-bit computing, and one is that integers have a limit! In this case, a database field called “integer” is limited to numbers between -2,147,483,648 and +2,147,483,647. It just so happens that the number is the same length as a US phone number – 10 digits. Changing the db field to “BIGINT” allowed me to manually run the SQL query and it worked. But the app still didn’t.
PHP’s int() and (int) $var syntaxes both conform to the integer limit. So I devised a work around:
$ac = $_POST['accountnum']; if(!is_numeric($ac) { $ac = (int) $ac; }
It’s not gorgeous, but it will more than suffice for an internal app. We web programmers don’t usually have to deal with big integers, so it’s totally possible that web developers would never have had occasion to handle a situation like this. Here’s looking forward to native 64-bit for our next server, though.
Live Blogging the Birth: Chapter 1
Oct 15th
We’re at the hospital. We were just admitted – now it’s just a waiting game.
EW.com is a Terrible Website
May 17th
If you want an example of how NOT to write a website, go no further than the disasterous ew.com. Entertainment Weekly is a magazine to which I subscribe. It contains generally good interviews and articles about TV, movies, books, and all sorts of other cultural phenomena. For a long time, one of the more compelling aspects of the subscription was the website, which includes the oft updated “Pop Watch Blog” and the daily “TV Watch” section.
First, let’s examine the URLs. From time to time, I want to email someone a link to an interesting piece. It would be nice to say “ew.com/tvwatch.” But alas, that doesn’t work.
This cryptic URL scheme is often used by big companies, but sucks for search engine standing: http://www.ew.com/ew/tv/tv_watch/0,,,00.html is a valid URL. So let’s review:
http://www.ew.com -> base URL
/ew/ -> a servlet, perhaps?
/tv/ -> a subdirectory, or an argument?
/tv_watch/ -> same as above…
0,,,00.html -> why God, why?
Aside from this, the webmasters decided to use two different commenting systems in the site, one for the Pop Watch Blog and one for TV watch and other articles. At least one is based on Typead, and it sucks with a capital SUCKS. It filtered out words like “Peter,” which makes for a silly looking post when you’re commenting on the main character on Heroes, Peter Petrelli. It also thinks all sorts of comments are spam, and tells you so, even when your post is completely legit. To post, you often have to play a game where you go back and tweak and re-submit, over and over, ad nauseum. This leads to about 50% successful posts, 50% gave up trying.
Then their TV Watch boards — they’re so bad I don’t even know where to begin. Posting is a complete hit or miss. You’d submit a post, it would go through a magical redirection and then your post would be gone. The back button wouldn’t work. And if you tricked it back, the textarea would be emptied. You could post over and over and it would give no explanation of what happened or why the post was declined. Every single item would be 3 legit posts followed by “this board sucks.” It got so bad it was unusable.
And finally, EW heard us. I thought.
They took their boards offline for 4 days. FOUR DAYS. Their board consists of only two fields: name and post. This is four fields in a database: id, time, name, text. If you want, “isVisible.” The boards are unthreaded. There is no HTML at all permitted. This should’ve taken a competent programmer about 1 day, perhaps hours at best. But for EW.com, after 4 days, what they released is still a giant stinker. Check out today’s American Idol review. If the comments come up at all (embedded in an iframe, for some reason, that may or may not load for you), nearly every comment is littered with “****” in the middle of words or in between them. Nothing is actually censored, mind you, it’s just a silly, stupid bug that should have been noticed early on. And long lines don’t wrap, they just keep going and create a horizontal screen scroller.
EW.com is a terrible website. It’s poorly designed. It’s poorly architechted. The page titles suck and make it hard to share links. The boards are terrible and unreliable. Outgoing links are all encapsulated in Javascript – so middle click is broken. If EW had any sense, they’d fire the entire web development staff and hire new people who can fix the complete mess that is their online presence.
I will be moving over to E! for my daily celebrity/entertainment/trash news. And I am very seriously considering cancelling my EW subscription.
Look At Me, I Am Cool Because I Am Valid
Mar 9th
I was playing around the other day on one of the many news sites I visit and there was an article about can’t-miss web site “footers.” So, I checked out these masterful designs and what did I find? Nearly all of them had “Valid XHTML” and “Valid CSS” links on them. Most, like my humble little blog, had fancy little 80×15 buttons too. And then it hit me – WHY!?
I am sick and tired of these buttons. Honestly, I don’t give a crap if your stupid homegrown blog is valid code, so long as it renders properly in my browser. I’m not using an accessibility application, and I wouldn’t stop visiting a site if it weren’t properly semanitcally marked up. I bet you very few external apps will choke if you enter a URL with an & instead of a properly escaped &. XML needs to be validated. HTML and XHTML don’t. HTML has survived because of so many browsers having such a capable quirks mode. Frankly, as of right now, I find the entire validation link concept obnoxious.
Slapping some tag on your page does nothing for your reader – if they truly have a screen reader or some such device, it will either work or not, no checking for a silly button. If the browser is a text-only browser such as Elinks, it will either render or not, but ironically, it will not display your stupid “Valid” buttons.
Furthermore, for almost every blog, validity is a product of dynamically build pages and feeds born from a database backend, and unless you are doing lots of checking, validity can be comprimised by invalid input, regardless of the quality of code.
OSNews v3 was written to render in virtually every browser, and to do so, it uses Eugenia’s mix of HTML 2 and HTML 3, a subset often called C-HTML. The code is just plain ugly, but it works. And it sure as hell isn’t valid.
Maybe it’s blasphemous for a web programmer to say such things, but the fact remains, bragging about or advertising your validity is pointless, and I think most of your readers have trained themselves to ignore it. Also, if your code works and renders properly, what difference does it make?
I’m sure people out there disagree and will tell me why I’m wrong. But in the meantime, I will be removing the buttons from my site the next time I edit my blog code. Pffft.
OSNews 4, Yet Again
Jan 25th
I have carried on more than I probably should about OSNews 4 recently, but it’s because I’ve been doing so much work on it. The site is mostly functional – nearly all the heaviest lifting is done, large parts are implemented and working.
As of today, we have AJAX moderation, super improved comment reply mechanism that allows you to quote an author, and a new, experimental system called “starring,” not stolen from Google but awfully like it. You can “star” stories much like a story bookmark, you can bookmark comments to later refer to, and you can “recommend” stories, which are stories you think other OSNews readers should check out.
I also added a nice touch feature – user avatars. I think avatars help users to recognize each other, and they add some “spice” to an otherwise simple look. I’m pretty excited about it, but obviously will not be building the upload form until my image resize scripts are ready. I generated my own avatar, now I need to find a nice way to resize in a secure fashion. It’s all very cool. To do what sites like Flickr do, I think I’d need Flash, so it’s pretty simple: you upload and I resize to avatar dimensions.
So moderation is all AJAX based now, which is really super cool, and works just like you’d expect – you can vote up or down, the score updates, the comment collapses when voting down… it’s exactly what I wanted when I envisioned it. Soon it will throw useful error messages instead of v3 error “codes.”
I hope to have the comment and submission forms working soon. If all goes well, we’ll do a public beta in February or March and rollout this spring. Promises to be very exciting.
OSNews v4 Logic
Jan 3rd
I was playing with an outlines of OSNews version 4 today. I have started sketching out some ideas that I intend to implement geared at making the site more consistent, easier to use, less complex, and less heavy from a code standpoint.
One of the major areas to improve is commenting. I am going to change the way threading works almost entirely.
First off, comments below your threshold will not disappear anymore. They will simply be collapsed and greyed out. Yes, this is a bit digg-ish, but we had to implement a lot of complex code in order to compensate for parent comments that were below threshold. So unless a comment is administratively hidden, they will show and be un-collapsable via Javascript (I don’t know if it will be AJAX or just Javascript div swapping). I think this is a better solution than we have today.
Secondly, moderation will definitely be AJAX-based.
Thirdly, I haven’t “cleared” this with David, but I think flat comments will be hard coded to view all in one page. It’s so much easier on the database to use a single, easy light query than to force several page loads and hit the db over and over.
Next, the comment template will be unified. Currently, there is a flat template, a threaded template, an admin flat template, an admin threaded template, and a reply template. I’m going to fix this nonsense.
In the process, I will clean up commenting. Comments use a ridiculous chain of includes just to produce a comment. This is the effect of hacked feature upon hacked feature of v3, and v4 will fix this.
Other changes: the user page will be streamlined to display user information as well as provide a base for recommendations, etc. Currently, it’s trying to be too many things.
Lastly, I intend to clean up the URLs. While preserving all valid links, I want the URLs to be prettier and not have file extensions. Jobs.OSNews is a good example of what I’d like to see via the URL.
Anyway, if you have thoughts about features, etc you’d like to see, feel free to leave a comment.

Another project that has had several lives already is the iPhone optimized