hosts file batch switcher

This is a simple batch (.bat) file to switch between a default (“empty”) hosts file and one that contains your definitions to block ad-sites. The purpose of this is to allow you to “turn off” the hosts file, in order to view content such as advertisements that you otherwise want blocked. This can be necessary as certain sites such as salon.com give you a ‘free’ daypass to view content if you first view advertisements.

You’ll have to close whichever web browser you use, run the batch file, then reopen the application, as browsers ‘cache’ the hosts file upon loading.

First of all, if you don’t use a hosts file, check out the wiki on what they are, and then download one. At the bottom of the wiki are a number of hosts files you can use. Please note that I’m not recommending a hosts file for security, and you may decide as you wish what performance hit it gives. I haven’t ever noticed a performance problem as a result.

First, make sure you have a backup of the original hosts file. It’s just a text document with the definition: 127.0.0.1 localhost
All this does is define the loopback so that if you try to visit http://localhost, it’s directed to http://127.0.0.1, which is your local computer.

So you’ve got the default/original hosts file, and your spiffy ad-blocking hosts file.
Name one both hosts.1 and hosts.2, and the other just hosts; it doesn’t matter which is which, but you’ll want to be able to see the filesizes so you can easily differentiate between them. During normal operations you’ll want the larger file/ad-blocking file named to ‘hosts.’ I recommend you backup both of these, just to be sure everything works right before you risk having to go back and recreate them.

Now all you need is to create a blank text file, and add the following:

copy hosts hosts.1
copy hosts.2 hosts
copy hosts.1 hosts.2

Rename the file to (whatever).bat and place it in the \WINDOWS\system32\drivers\etc directory. It can be run via a shortcut, by double clicking, or the command line. Hell, if you needed to have a scheduled process run with the alternate hosts file, you could even schedule this to run before and after the process via the “at” command, or the windows task scheduler.
You can determine which hosts file is loaded based on the filesize of the hosts file. If it’s 1K, it’s the default/”empty,” larger, it’s your ad-blocking hosts file.

I don’t know much about batch files, so there may be a way to improve this to allow you to recognize which one is loaded without the use of filesizes. Please feel free to add a comment if you know a superior method than this.

Double Dipping

(or: Why the ISPs are salivating)

There are a couple of pertinent stories out right now: AOL seeks to impose e-mail tax, and these ominous news reports of major ISPs gearing up to charge web properties for the bandwidth used to reach their users.

And then there are the other stories: AT&T to buy Bellsouth, AT&T complicit in NSA Domestic Spying.

AOL wants a cut of the revenues that e-mail players are getting off of AOL’s users. Similarly, other major ISPs want to dip into the profits from websites like Yahoo! and Google that generate a lot of revenue through their users.

The problem is, they have absolutely no right to be doing this. The websites and e-mail firms are already paying for their bandwidth; the users are paying for theirs. If and when these moves occur, it will mean only one thing: an increased cost to the customer.

But, you don’t hear the ISPs ramping up to raise the prices on their customers. That would be too easy: the users would revolt, and the ISPs would back down. Instead, they are employing themselves as middlemen. They are claiming that they are the ones footing the bill, when really they are merely greedy.

Still, the backlash is already coming: AOL and the ISPs are in for a losing battle in this case. The users want their internet as is, not subject to the whims of corporations. And you can expect this to have waves beyond just thwarting this round of greasy schemes. As more media consolidation takes place, and more carrier consolidation takes place, there will be a further push by the masses to reinforce regulations against these companies. These same companies received $200 billion in tax breaks to deliver fiber optic cabling.

They obviously have a single bottom line that does not include their customers’ interests. Therefore it is in our interest to see them fall under new regulations; it is the price they must pay for failing to respect their customers.

What is Vista worth to you?

There will be six versions of Microsoft Vista, each coming in 32 and 64 bit editions, except for Starter. That makes an actual total of eleven versions. But wait, there will be “N” versions of several of these; due to antitrust litigation in the EU, Microsoft will have to release separate versions. It is due to ship in the 2nd half of the year; currently cost estimates have not been given.

The cost, however, can be estimated. Current costs of XP are about $90 and $190 to upgrade (home and pro, respectively); around $200 and $250 for the full versions.

The starter edition of Vista will probably run between $50-$150 range. Lower end for upgrading, higher for full version. The Basic Home will likely run $100-120 to upgrade, and $200 for the full version; Premium Home will be more like $170 upgrade, $250 full. The Basic Business edition will probably cost $220 upgrade, $320 full. The Enterprise edition, $270/$390. And the Ultimate edition will look something like $330/$460.

Those are just guesses based on the current XP pricing and the number of editions. Some of the prices may be staggered closer to one another with the intention of getting the consumer to pay just a little more money for a “better” version.

I haven’t seen Vista first-hand yet, but let’s talk about its features.

The biggest feature it seems to tout is the new Frankensteinian GUI. The name is “aero” I believe, and it is a new “theme” for the user. It takes advantage of 3D widgets, transparency, and many other look and feel enhancements. It will require a high-end PC to run efficiently. This is a major point: most PCs today will not run the high-end GUI of Vista. They can’t handle it. They will, however, be able to run the operating system on a less-fancy GUI.

Okay, stop right here. The biggest selling point of the damn Operating System is the eye candy? Is it a game, or an OS?! Do I want a bloated User Interface to coddle me into believing that it’s helping me do something? No. Although I like GUIs and I like graphics and eye candy, I don’t feel the need. I run XP Pro with the classic widgets. I like some minimal skinning as seen in my last post on userChrome.css, but I don’t want the main attraction to be the damn window itself. The content is what takes center stage.

I hate to do it, but I felt forced to go dig in the Tao Te Ching:

Thirty spokes converge on a single hub,
but it is the space where there is nothing
that the usefulness of the cart lies.
Clay is molded to make a pot,
but it is the space where there is nothing
that the usefulness of the pot lies.
Cut out doors and windows to make a room,
but it is the space where there is nothing
that the usefulness of the room lies.
Therefore,
Benefit may be derived from something,
but it is in nothing that we find usefulness.

Point being, the GUI is there to hold the content. Sure, a pot, a room, a cart, all must meet some minimal level of structure to provide the space, and hence utility; that does not mean that a fancy-pants cart, pot, or room necessarily serves the purpose better than a less attractive one. I don’t need my room, pot, or cart to make me feel sexy in order for them to be useful.

Anyway, that’s most of what I have to say for now on the subject. I may continue this post at a later date as more details come to light. That is more likely as details regarding the DRM parts of Vista, as well as other revelations such as final price details, etc. come out.

userChrome.css

I’ve been playing around with the customization in FireFox lately. Basically, userChrome.css is a Cascading Style Sheet that defines the look of the browser itself thanks to a flavor of XML known as XUL.

Anyway, here is a comparison of my basic(left) to the changed version(right):

Preview

Compiz

Compiz is a desktop manager based on XGL. It is a Linux project that allows the user to manage the workspace in new ways. It takes advantage of the XGL project code, using OpenGL to fuel some very innovative GUI enhancements.

You can find a short demo (11 minutes) and some screenshots here.
If you run Linux, you can also download it via a CVS.

Currently my main operating system is Microsoft, but it is looking more and more like Windows Vista will be a trojan horse for DRM. More-likely-than-not, I will be switching exclusively to Linux in the future. That is in no small part due to truly amazing, free projects such as Compiz.

The future of computers is Open Source. A bold claim, but a true claim. Proprietary operating systems and software do not extend usability and customizability to the users and their organizations.

Open Source does exactly that. You can imagine an Art Department customizing Linux & a setup such as Compiz to allow for the following scenario:

The department head could simultaneously view the works in progress of the artists, and give feedback, as well as allowing the individual artists to see what one another was doing. If one artist was better at working on part of what another was doing, the control of the workspace could be “switched,” allowing the second artist to instantly jump in and work on the piece.

This is all possible using current technology. It wouldn’t be very easy with a closed-source system, but it wouldn’t be that hard with linux.

Anyway, I encourage you to watch the video for yourself.