public class Oli : ICool

Wednesday, August 19, 2009

HOWTO: Shop for a laptop

Note: The following is taken verbatim from an e-mail I sent a relative who was interested in purchasing a laptop. It's reposted here so I can share it with the world and subsequently link to it the next time I'm asked about it. That and some feedback from the public at large couldn't hurt!

The best way I found to shop for laptops is to find as many flyers as possible and cut them apart so you have playing-card sized pieces with the picture of the laptop, its price and its specs. The Future Shop and Best Buy flyers are great for this and sometimes the Dell, The Source and Staples flyers are useful too.

You then start to whittle it down by eliminating obviously too-expensive laptops and too-low end laptops. (i.e. those in the $3000 range and those with less than 2 GB of RAM) You just toss the pieces in the garbage. For the next iteration, you start looking more carefully at the specifications, pictures, etc. and tossing out those that don't fit your wants and needs. Repeat until you have about two or three left.

What you do next is you go to the stores, find where the two or three you have left are, and play with them for 5-10 minutes to see if there's a clear winner. If you can't tell the difference between the them, well, the least expensive wins. I recommend you sleep on it at this point.

Laptops usually come with a one-year warranty and you can purchase a few more years after that for up to 3 or 4, depending on the store. That can easily add $300 to the cost of the laptop, so you may want to decide on that before you even step into the store, otherwise you'll be asked to decide at check-out and making a decision about something that's almost 1/3 the cost of the product is not something you want to do quickly.

I would not recommend purchasing a laptop (over a desktop) unless the computer needs to be mobile and moved around a lot. You'll pay more for the privilege of having small pieces that fit inside a portable package and thus the same money could be spent on something more powerful with a bigger screen, etc.

Labels: ,

Wednesday, April 22, 2009

On uninstalling Google Chrome

I finally gave up with Google Chrome on my laptop. Here's what popped up when I completed the uninstallation process, with my answers:

Google Chrome has been uninstalled.

Thanks for trying out Google Chrome. Please help us improve Google Chrome by telling us why you uninstalled it. Your feedback is much appreciated.

Which of the following best describes you?
I am uninstalling Google Chrome for now, but I may try it again in the future
I am permanently uninstalling Google Chrome
I am only uninstalling briefly. I am going to reinstall straight away (e.g. changing computer, upgrading operating system)

Why are you uninstalling Google Chrome? Please check all that apply
It doesn't load some web pages properly (please list any examples below)
It's missing some features that I use (please provide detail in the box below)
I'm concerned about privacy (please provide detail in the box below)
It seems to slow down my computer
It crashes too often
Other (please provide more details in the text box below)

Please provide any additional detail on your reason for uninstalling:

There are too many Firefox add-ons that I have come to rely on and using Chrome just leaves me "naked" in comparison. I blogged about this potential problem when Chrome initially came out: http://oliiscool.blogspot.com/2008/09/world-in-verdana.html

I first installed Chrome when I heard Gmail and Google Reader had exceptionally good performance in Chrome. This was true, but as soon as I clicked a 3rd-party link from within either, I felt I was abandoned and frequently would end up copy/pasting the URL into Firefox and continue from there.

I definitely appreciate the engineering skills and value of having a process-per-tab kind of browser, but that functionality alone is not sufficient for a heavy add-on user such as myself. In fact, I have checked the "slow down" checkbox since that model seems to in fact be a liability when viewing YouTube videos: I definitely notice much higher CPU usage from Chrome when visiting a site containing an embedded video than visiting the same page with Firefox.

Perhaps not all is lost: the process-per-tab model could still be applied to Firefox and a "Chromium Tab" Firefox add-on that worked similarly to the "IE Tab" add-on (in that it would enable the Webkit/Chromium engine on a per-tab basis) would be fantastic in my books.



So maybe I'll eventually re-install it. There's definitely value in the "application mode" as well, which hides the address bar and makes a "tab" its own window using the site/application's "favico" as the application window's icon, but that breaks quickly - as I described above - when you need to go outside that site/application. That "application mode" would also be a neat add-on/extension for Firefox. :)

Labels: , , , , , , ,

Friday, April 03, 2009

Do you still not use a router?

I was helping out an extended family member over the phone the other night when I realized he would connect one of his two computers directly to the cable modem, in turn, depending on which computer he was going to use to get internet access.

This struck me as being very odd. Ten years ago, I was using hubs and later migrated to switches and then router/switch combinations to network computers. I just can't imagine what life would be like to have more than one computer in a house and not some sort of network between them.

More scary was that he called me on April 1st, the day the Conficker author(s) decided to freak everyone out. Since Conficker's primary infection mechanism was to exploit a vulnerability in a Windows service and he had just reinstalled Windows on that computer, I was worried he could get infected and warned him about the dangers of doing so.

In this case, a router would have not only removed the "unplug this computer, plug that computer" inconvenience but also have acted as a firewall between his computer(s) and the internet, therefore making it difficult to get infected by worms like Conficker just because your computer is connected to a [hostile] network.

Thankfully, I have an extra router lying around that I'll give him the next time I see him, but seriously, if you don't have a router, go spend $50 on a networking device that doubles as a firewall. Most internet software is NAT-aware these days, so you're no longer trading off convenience for security.

Labels: , ,

Monday, February 02, 2009

Ego-driven software development

(or "How M.C. Escher Would Have Packaged His Software")

This was too "good" to not blog about. I heard about IronPython Studio, a Visual Studio-based IDE for writing Python code for/with .NET tools. In order to install this interesting gem, you first need to install its pre-requisites, which is one of flavors of the "Visual Studio 2008 Shell": Isolated Mode or Integrated Mode. Sounds easy, right? Wrong!

The actual downloads seem innocent enough (I got both, just to be safe -- as an aside it was hard to tell which one would suit me best): they arrive as executables. Here's how many levels of "packaging" there are:
  1. Running either of vs_AppEnvRedist.exe or vs_ideredist.exe will create a temporary directory where the EXE's files are extracted and an "installer" is launched

  2. You accept the EULA and click next a few times and what do you end up with? "The redistributable package has been installed". That's right, you ran an installer that installed another installer. Total disk space needed for this (at apogee): 400 MB for the original download, 400 MB for the temporary files and 400 MB for the "redistributable package" = 1200 MB

  3. As you finish the first "installer", the temporary files are cleaned up, so we're back to consuming 800 MB. You run the second installer and the first thing it does is check its signature, which consumes 400 MB of RAM. It then proceeds to extract files to another temporary directory (400 MB again, although this time it's in a bunch of smaller files - 286 MB of which is various versions of the .NET framework), thus bringing our used disk space back up to 1200 MB. Those of you following at home will notice that I haven't actually installed anything useful yet. Accept another EULA, select the only feature (wut?), pick the destination folder and go (again)! At apogee: 400 MB + 400 MB + 400 MB + whatever installed size it was (I didn't check)

  4. Oh, it looks like we're actually done! What was I installing, again?

I'm reminded of Adobe Acrobat Reader installers from, oh, I don't know, ten years ago, before one-file installers were even invented. IronPython itself is available in a single MSI file, while IronPython Studio's download options are both available as an MSI file in a ZIP file.

There is no technical reason for this. There simply is no excuse for these fractal installers except that someone (or an entire team of someones) at Microsoft decided they needed to be involved in the supply chain that brings us internauts this bare Eclipse-wannabe that does not even include a text editor. I mean, seriously, the only thing that could have been worse would have been to wrap the whole thing in a "downloader" (like Visual Studio Express) or in an ISO 9660 file (like Visual Studio 2008 Service Pack 1).

I have a special offer for the person in charge of the Visual Studio team: I will personally come over and deliver atomic wedgies to everyone responsible for these shenanigans! Just give me a call; you know how to find me.

There is some good news after all this: IronPython Studio not only just works, but so does its debugger. Kudos to that team.

Labels: , , , , , , , , ,

Saturday, October 25, 2008

Apple sucks at XML

OK, I've officially had it with Apple. Steve Jobs may have style down cold, but his programmers were smoking something fierce when they designed the XML format for their so-called Property list. Don't let that Wikipedia page fool you on the apparent simplicity of the format. Take a look at one of Apple's own samples. Still not convinced? How about a real-world use-case: the emoticon definition file for an Adium theme, a portion of which is reproduced below:
<plist version="1.0">
<dict>
<key>AdiumSetVersion</key>
<integer>1</integer>
<key>Emoticons</key>
<dict>
<key>amazing.png</key>
<dict>
<key>Equivalents</key>
<array>
<string>=-o</string>
<string>=-O</string>
<string>:-o</string>
<string>:-O</string>
</array>
<key>Name</key>
<string>Surprised</string>
</dict>
<key>anger.png</key>
<dict>
<key>Equivalents</key>
<array>
<string>&gt;:o</string>
<string>:-@</string>
<string>:@</string>
<string>X(</string>
</array>
<key>Name</key>
<string>Angry</string>
</dict>
<key>bad_egg.png</key>
<dict>
<key>Equivalents</key>
<array>
<string>&gt;-[</string>
<string>&gt;-(</string>
</array>
<key>Name</key>
<string>Nervous</string>
</dict>
(...snip...)
</dict>
</dict>
</plist>
Do you see what the problem is? For those of you playing at home, here's a hint: how would you write an XPath expression to obtain the "equivalents" of a given image file?

Yes, it's not impossible to grab a value for a given key, but did they have to make it so hard when XML can express the same idea in a much easier format? Or, rather, did they have to be so lazy when writing the code that serializes these property lists to/from XML?

In any case, if you ever have the need to process an XML file created by an Apple program, the following stylesheet will (likely) help restore your sanity. Simply pre-process the XML with my stylesheet and then your XML code or stylesheet will be much easier to write (and read!):
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="xml" encoding="utf-8" indent="yes" />

<xsl:template match="* | @* | node()">
<xsl:copy>
<!-- if the previous sibling is a 'key' element -->
<xsl:if test="name(preceding-sibling::*[position()=1]) = 'key'">
<xsl:attribute name="key">
<xsl:value-of select="preceding-sibling::key[position()=1]/text()" />
</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="* | @* | node()" />
</xsl:copy>
</xsl:template>

<xsl:template match="key" />

</xsl:stylesheet>
For an example, let's take another look at the sample XML I showed earlier and compare that with the XML sexiness that is generated by applying my stylesheet against it (some spacing was added to the "after" version to better illustrate how they compare to each other):
BeforeAfter
<plist version="1.0">
<dict>
<key>AdiumSetVersion</key>
<integer>1</integer>
<key>Emoticons</key>
<dict>
<key>amazing.png</key>
<dict>
<key>Equivalents</key>
<array>
<string>=-o</string>
<string>=-O</string>
<string>:-o</string>
<string>:-O</string>
</array>
<key>Name</key>
<string>Surprised</string>
</dict>
<key>anger.png</key>
<dict>
<key>Equivalents</key>
<array>
<string>&gt;:o</string>
<string>:-@</string>
<string>:@</string>
<string>X(</string>
</array>
<key>Name</key>
<string>Angry</string>
</dict>
<key>bad_egg.png</key>
<dict>
<key>Equivalents</key>
<array>
<string>&gt;-[</string>
<string>&gt;-(</string>
</array>
<key>Name</key>
<string>Nervous</string>
</dict>
(...snip...)
</dict>
</dict>
</plist>
<plist version="1.0">
<dict>

<integer key="AdiumSetVersion">1</integer>

<dict key="Emoticons">

<dict key="amazing.png">

<array key="Equivalents">
<string>=-o</string>
<string>=-O</string>
<string>:-o</string>
<string>:-O</string>
</array>

<string key="Name">Surprised</string>
</dict>

<dict key="anger.png">

<array key="Equivalents">
<string>&gt;:o</string>
<string>:-@</string>
<string>:@</string>
<string>X(</string>
</array>

<string key="Name">Angry</string>
</dict>

<dict key="bad_egg">

<array key="Equivalents">
<string>&gt;-[</string>
<string>&gt;-(</string>
</array>

<string key="Name">Nervous</string>
</dict>
(...snip...)
</dict>
</dict>
</plist>

...isn't that a sight for sore eyes? You're welcome.

Labels: , , ,

Wednesday, September 03, 2008

The world in Verdana

OK, by now everybody and their cat has heard about Google Chrome. The general buzz on Slashdot and blogs seems to be "it's not Firefox" and, more specifically, a general lament of the chicken and egg problem surrounding the release of a new platform when there isn't any software (in this case "plug-ins" or "add-ons") to run on it. Well, OK, there are some Chrome plug-ins available, but Chrome extensions are currently NOT supported. On the other hand, the source code is out there and given that it has the "Google brand", it won't be hard to find motivated geeks hacking some neat software to [eventually] bring Chrome on par with Firefox, with said geeks' hidden agenda of being noticed by Google and be offered a nice googlejob where they get to sit on their googlechair, etc.

It's technically not such a bad chicken-and-egg situation, with the massive and thorough testing Google [claims to] have performed. Plus, the browser is more than a fine replacement for users of Internet Explorer or plain, out-of-the-box Firefox, thus making all us geeks appear crazy when non-techies ask us why we're not using Google Chrome, when we use everything else Google throws at us.

Anyway, I didn't set out to write yet another review, but to post solutions to problems I encountered:

Installing Chrome as a non-administrator


I hit issue 119 ( Install Fails on W2K8 with low-rights user ) when I tried to install on my computer as a non-administrator and got the following:



Thankfully, the work-around by stephen.oakman in comment 6 worked and I found the elusive chrome_installer.exe in a folder matching the pattern C:\Documents and Settings\[user]\Local Settings\Application Data\Google\Update\Download\[guid]\chrome_installer.exe and was able to install it successfully.


Setting the minimum font size


I also had the same accessibility lament about minimum font sizes and font family overrides. For example, here is the Getting Started page in Firefox 2, with Verdana @ 14pt bliss:



...and this is what Chrome gave me with the same page:



OK, yes, the Firefox version looks weird with the title text not lining up with the logo, etc. but all the content is perfectly legible, which is more important to me. Well, more legible than the fonts picked by the web developer.

Thankfully, I have solved the first half the problem with a few quick searches in the source code and now my C:\Documents and Settings\[user]\Local Settings\Application Data\Google\Chrome\User Data\Default\Preferences file contains this little gem:


"webkit": {
"webprefs": {
"cursive_font_family": "Verdana",
"default_fixed_font_size": 14,
"default_font_size": 14,
"fantasy_font_family": "Verdana",
"fixed_font_family": "Courier New",
"minimum_font_size": 14,
"minimum_logical_font_size": 14,
"sansserif_font_family": "Verdana",
"serif_font_family": "Verdana"
}
}



...which gives me a slight improvement in readability in Chrome:



You can find out what the names of the [other] supported hidden preferences are by peeking into chrome/common/pref_names.cc and cross-referencing with WebContents::GetWebkitPrefs() in chrome/browser/web_contents.cc. In particular, you'll find (as of this writing) that the other half of my problem is already identified in a comment:



// User CSS is currently disabled because it crashes chrome. See
// webkit/glue/webpreferences.h for more details.



...with the more details being:



// TODO(tc): User style sheets will not work in chrome because it tries to
// load the style sheet using a request without a frame.
bool user_style_sheet_enabled;
GURL user_style_sheet_location;



D'oh. Maybe this will inspire someone else to fix that part of the code or otherwise provide the elusive "let me choose my own damn fonts" setting that I rely on for keeping my sight and posture in good shape.

Labels: , , , , , , , , , , , , , ,

Friday, August 08, 2008

Effort vs. Results

I remember having a conversation with my father when I was a kid about his company's employees. I was shocked to discover they were being paid by the hour. I remember following up with a question along the lines of "Wouldn't that encourage them to take lots of time to do their work?" He assured me that, although it was a possibility, it didn't happen very often. (and presumably he explained that people who did that could lose their job, so it was to their long-term advantage to not slack off)

Fast forward a few years later, when I'm in high-school and a student asks the teacher - after she explained a homework assignment - if any marks would be given for effort. I couldn't help but laugh out loud, thinking he was pulling the teacher's leg. He didn't join me in laughing or smiling (and probably shot me a dirty look). Uh oh. He was serious!?!?

Maybe I found that proposition silly because I figured there was no way for it to be reliably measured: it would have to be self-reported. How hard would it be to say "I spent 100 hours on this" when handing it in? And if I had completed the assignment in 10 hours and produced equivalent results to his, would that mean he would get more marks than I got because he spent more time?? Worse yet, even if it wasn't self-reported, how would it be measured??? And what about the difference between "brain time" and "body time"?

Nowadays, I understand why people are [usually] compensated by how much their skills are in demand and that it is possible to be 10 times better than someone else at what you do. Maybe I also did as a kid? That might explain my reaction in both instances. Could it also explain my drive for correctness? My passion for getting things done and done right?? Now here's a doozy for you: would this knowledge at a younger age have helped other students??? Or maybe I'm just being arrogant and that I should just shut up for being the nerd that didn't have any trouble with his assignments????

Discuss.

P.S.: Please go easy on me as I have been working on this blog post since November and it's only now that I have been able to finish it.

Labels: , ,