Monday, March 21, 2011

Vegetarians vs Omnivores

We interrupt our irregularly scheduled agenda to present a brief comparison: vegetarians vs omnivores.

Vegetarians mainly eat plant material to the exclusion of animal flesh. While some splinter groups (vegans) abstain from not only meat but also animal products like milk, eggs, even honey, others (fruititarians) strive to eat products which do not harm the plant of origin, such as fruit dropped from various fruit trees. Typically the choice to go vegetarian is inspired by sympathy for animals slaughtered for their meat, such as the plight of calves raised for the production of veal, or other animals that may endure great suffering in filthy conditions. Others may go vegetarian in order to abide by their religion. 


Omnivores eat either plant or animal material depending largely upon preference and availability. Squirrels, for example, are considered omnivores, primarily eating tree nuts, but may resort to eating meat if their primary food source is lacking. Human beings are included among omnivores, as our digestive systems enable us to digest many forms of plant and animal for nutrition. Humans also began the domestication of livestock for purposes of deriving various food products (milk, cheese, eggs) and for consumption of their flesh.



The products derived from animals, particularly pigs, cows, and chickens, and indeed the livestock itself has for many become a staple. What is a cup of coffee without fresh cream? What's a slice of toast without a fresh pat of savory butter? What's a BLT without bacon? Society has become enamored with these and many other animal products, and as a result, whole industries have developed to provide consumers their fix, whether it's a slice of crispy bacon, a blob of whale blubber for perfume, or eggs for breakfast. We purposefully harvest lower animals for our use.

Where this need finds a lot of controversy is particularly in various techniques for raising and eventually slaughtering livestock. Veal, for example, requires that a calf be essentially immobilized in a pen throughout its short life, so as to deter muscle growth which would compromise the tenderness of the resulting meat. Chickens which produce eggs for consumption may be maintained in small, cramped cages, and have their beaks trimmed to decrease the incidence of cannibalism. Pigs stunned and then dipped in scalding-hot water prior to slaughter in order to retain skin elasticity may still be alive and quite aware of their pain if the stunning procedure is botched.

Ideally, an animal being slaughtered will be whisked quickly and painlessly from life, and feel no pain. Unfortunately, this often isn't the case, as many with PETA will attest based upon various hidden camera footage they feature, taken from among the worst slaughterhouses. In vitro meat (that is, meat which is essentially grown in a laboratory and has never been part of a living animal) will hopefully eliminate this issue altogether in coming decades, but in the meantime, many in the vegetarian world unequivocally decry the slaughter of animals for meat as cruel.

There is among many vegetarians, particularly vegans, a hypocrisy regarding the consumption of meat. Meat is evil, say many practitioners of vegetarianism, as is the systematic domestication and slaughter of animals for their flesh. 

What, though, is flesh? It's a form of life.

Each human being every day of their lives brings countless living creatures to death with every moment, sleeping or waking. As we live and breathe, our immune systems constantly scour our bodies for foreign organisms and, using macrophages as their enforcers, encompass these invaders and use powerful enzymes to rip these living organisms apart, molecule by molecule. With every step, our shoes may crush into oblivion countless ants, spiders, lizards, beetles, and other small insects and arthropods and reptiles and other lesser life forms, without so much as a polite warning. In the morning ritual of many who shower, shave, and brush their teeth, millions and millions of bacteria are annihilated by the scourge of antiseptic mouthwash. As we drive our cars along lonely country roads, many an unfortunate opossum, skunk, armadillo, deer, or even the rare bird may become roadkill, their life force left to ebb and ooze forth onto hot, tarry asphalt.

Native Americans hunting buffalo on the prairies of old would not simply eat the meat and discard the carcass of their quarry, indeed, they would use it for various purposes in order to survive. They wouldn’t discard half a buffalo like a few uneaten McNuggets in a Happy Meal, they actually honored their prey, and didn’t merely harvest it as a resource.



To the vegetarians I present the idea that the problem with eating meat isn't the meat, it's the people. 

People react to the suffering of animals because they anthropomorphize them. Aside from the unfortunate prevalence of various animals with human voices in movies like Bambi, Watership Down, Babe and others, people can look into the eyes of an animal and see aspects of themselves. Pet a cow or pig and it’ll nuzzle up to your hand, eager for more. Feed a chicken and it will enthusiastically peck at its food and look to you eagerly for more. 

We normally don’t want to see animals suffer. Human emotion is unique to who we, as sentient, mostly intelligent animals, are, and people generally do not want to inflict suffering on animals let alone other humans if we can help it, because we are creatures with powerfully vivid imagination. If you prick us, we do indeed bleed, and we feel the cold steel of a needle shoved into our buttocks. Unless we’re deeply twisted, we don’t take any joy in inflicting such pain upon others of our kind.

Vegetarians the world over wage their own campaigns of slaughter against the plant kingdom. Collard greens are prepared by first ripping the plants from the sandy earth, then grasping and rending asunder the leafy greens, and finally boiling the living plants in water for hours until the bulwarks of their fibrous structures succumb and go limp. Carrots are similarly plucked from their homes in the moist earth, given a gentle bath and perhaps a scrubbing in clean water, only to have their very skin peeled from their bodies and their bodies chopped or sliced into bite-sized portions. Stir-fried vegetables like broccoli, cauliflower, sugar snap peas meet their doom in woks across the nation, full of hot, sizzling oils that infiltrate their structure and render previously firm cell walls into flaccid remnants of their former selves. Sprouts of alfalfa, lentil, and others find themselves drowned in copious amounts of ranch dressing, then macerated by eager human molars within bowls of salad. 

Importantly, vegetables don’t scream. They don’t have a brain, sophisticated nervous systems, thoughts or feelings, at least as far as we’re aware. They live, reproduce, and die, but they’re not human. We can’t relate to a carrot or head of lettuce or broccoli in the same way we can to a cow or pig or squirrel. A vegetable doesn’t have eyes, lips, a mouth which even at rest our brains could confabulate as representing a constant, oafish grin. It doesn’t have any redeeming features that would make us think twice about ripping it from the earth and making it our meal. As ludicrous as it sounds to relate the peeling of a carrot to a person having their epidermis thinly sliced away, it simply doesn't evoke the same visceral discomfort in the context of a vegetable.

FOOOOOOOOOD...?

Many of us, myself among them, don’t dwell on the suffering of the package of bacon or porterhouse steak that lay invitingly on the plate before me at dinner. Indeed, many of us insulate ourselves from this reality by referring to it as a product, purchased with money from the local supermarket.
Cute enough to eat...?
 
Would I wish the animal I’m about to enjoy having suffered on their journey from pasture to table? Absolutely not. Will I willingly patronize purveyors of meat that don’t respect the notion that animal cruelty is reprehensible? No, I will not, as best I can based on how government enforces rules to prevent it. 

However, let’s not try to suggest that vegetarians and omnivores are so dissimilar, they aren’t. Each group snuffs out the life force of countless living plants and/or animals with similar efficacy, it’s just that plants are simpler life forms that don’t have the hardware to raise their leaves in protest, nor the ability to appeal to human empathy nearly as effectively as, say, a talking pig.

Bon appétit!



Sunday, March 20, 2011

Idiocracy Cometh

Frito, my man! Whatcha watching anyw...


ಠ_ಠ


Thursday, March 17, 2011

Dell Latitude E6410: SpeedStep, or SpeedSTOMP?

Recently on the Dell Latitude E6410 I use at the office, on several occasions Windows 7 would slow down and become completely unusable, necessitating a hard reboot.

Event Viewer revealed the following events in succession for each core of my laptop's quad core Intel i5 CPU:



The speed of processor 0 in group 0 is being limited by system firmware. The processor has been in this reduced performance state for 5 seconds since the last report.

Windows slowed down to the extent that I couldn't even open Task Manager, which normally comes up readily even if the system is otherwise sluggish. Interestingly, in this state it would enter Sleep Mode eventually upon closing the lid, but was otherwise unusable.

Several steps can avoid these slowdowns:
  • In your system BIOS, disable Intel SpeedStep.
  • In Windows 7, ensure your system uses the High Performance setting for Power Plan.
  • Ensure adequate cooling with a utility like SpeedFan to monitor temperatures.

However, based on at least one thread in the Dell support forum and another on a hardware forum, this could turn out to be an indication of a hardware problem.


Intel SpeedStep is triggered to activate, among other things, by heat. If the system is heating up and can't dissipate heat effectively, SpeedStep by default will engage and step down the CPU so that it generates less heat. Whether that heat is generated by the CPU itself as a result of a dead heatsink fan or the heatsink somehow being detached from the CPU surface, or the GPU overheating for whatever reason, or heat simply can't dissipate due to factors like lack of ventilation thanks to dust or covered vents, it will try to compensate by throttling down the CPU speed.

While this seems perfectly reasonable in theory, in practice it seems to not work as intended, at least in the case of my E6410. I've read reports in the very helpful Dell Latitude E6410 Owner's Thread that some have had similar issues which necessitated a mainboard replacement, while others were able to get up and running by just clearing dust out from the vents of their laptop. 

My particular situation, however, doesn't seem that common, which makes me wonder whether my GPU might be on its way out. Yesterday with the laptop on battery and without a lot of ambient noise, I noticed that when I would ALT-TAB from say a mostly white background to a vividly colorful one, a distinct whine would be emitted from my system, and the display wavered just slightly as if some interference were rippling across the video hardware (update on this, according to some info in this thread, this whine is characteristic of systems with Intel Core 2 Duo and newer CPUs).

For now, I've disabled SpeedStep and installed SpeedFan to keep an eye on temperatures, and cleaned out dust. Hopefully this will do the trick, but if not, given this and the sound problems which continue to plague my E6410, a warranty comes in handy. I added a link to my bookmark toolbar to the aforementioned E6410 owner's thread, it seems Firefox sympathizes with my plight based on how it shortened the bookmark title. Ow indeed, Dell!




Friday, March 4, 2011

Chattr - A New Way to Talk on the Web

Chattrr is a novel new way to chat. 

It's a bookmarklet which utilizes an intelligent chat room allocation algorithm to connect you with other Chattrr users who happen to be browsing the same website.

Picture yourself at an art gallery. Perhaps you're puzzling over why someone would pay $140 million for a Jackson Pollock. Someone else strolls in, and they, too, find a common thread to chat you up about. Others come, looking at the same thing, which might remind one of a high school art project they didn't take seriously, another of a haphazard work of "art" slapped together by a chimpanzee one afternoon. Then a fine arts major strolls in and decrees everyone else to be philistines for disparaging such a fine work of "art".

So it is with Chattr, which enables a whole new level of conversation, in real time, among people with eyes trained on the same content.

By applying the real-time chat of IRC atop otherwise relatively static nature of website commentary, I think Chattrr has carved itself a unique niche in the realm of social networking. Whereas you might post a comment on a blog and wait days, even weeks for a response, finding someone to chat with via Chattrr means instant discussion with whomever else is looking to share their thoughts about the experience, particularly for discussion based forums and sites like Reddit, where at any given moment thousands of people may be commenting on the news of the moment.

While the tool has only recently debuted, it is fully open source, has been tested successfully with Firefox, Chromium, Chrome and Safari, and in my mind is the start of something wonderful.





Thursday, February 24, 2011

Windows 7 Service Pack 1 Boot Failure

Windows 7 SP1 has been released, but upon installing it, I found my system no longer boots into Windows. I get the BLACK screen of death, with the cursor flashing helplessly in the upper-left corner and no hard drive activity.

The dreaded BLACK screen of death, complete with animated cursor!


There were no obvious issues during the installation of the service pack, so I'm going to try using the BOOTREC utility in the Windows Recovery Environment in case some aspect of the service pack install, or some weird twist of fate, decided to damage the master boot record rendering my system unusable, for now.

Please feel free to share your own Windows 7 SP1 experience, whether good, bad, or ugly!


-= UPDATE =-

As I inserted my Windows 7 disc and rebooted, ready to attempt a repair through the recovery environment, I remembered something.


Before updating to Windows 7 SP1, I made a change on my system to enable AHCI (Advanced Host Controller Interface), which enables two of the best features of SATA, hot swapping and native command queueing. I'd just recently replaced the last of my old IDE hard drives and went full SATA.

To see whether this made a difference, I entered my system BIOS and changed the setting for "Configure SATA as" from IDE to AHCI, and then rebooted.




No more black screen
, my system successfully booted into Windows! 


Here are the steps I'd used originally to enable AHCI:
  1. Exit all Windows-based programs.
  2. Click Start, type regedit in the Start Search box, and then press ENTER.
  3. If you receive the User Account Control dialog box, click Continue.
  4. Locate and then click the following registry subkey:

        HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Msahci

  5. In the right pane, right-click Start in the Name column, and then click Modify.
  6. In the Value data box, type 0, and then click OK.
  7. On the File menu, click Exit to close Registry Editor.

However
I stumbled upon a Microsoft support article (922976) which is slightly different in that it specifies an additional registry key that may be modified in order to enable AHCI.

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\IastorV


In my system's registry, the subkey value for Msahci I had changed to 0, but IastorV was still set to its default value, 3. I changed the latter so that both subkey values are set to 0, then rebooted, entered the BIOS, and this time changed the SATA setting from IDE back to the desired AHCI, saved changes, and rebooted once more.

Now, my system appears to be back to normal.
From this troubleshooting misadventure, it seems like the question of whether Windows 7 service pack 1 may want just ONE of those two registry subkey values set to 0 is no longer a question but a fact as far as AHCI goes.

 






Tuesday, February 22, 2011

ASCII Art

Here's a quick guide on how to create ASCII art in posts on sites like Reddit, forums, email and elsewhere.

ASCII art has been around for decades now. This site provides a very nice summation of the history of ASCII art, including its beginnings in hieroglyphics, monasteries, and finally on computer screens. You can find ASCII art online today in the form of emoticons, and also at various sites (like this one) that have compiled all kinds of ASCII art creations for your enjoyment.

Creating most ASCII art relies mainly on using a fixed-width font, such as Courier New. Doing so ensures that your work will look the same when rendered by the browser or email client or whatever medium as it does in whatever tool you're using to create it, because each character has a set width, a set number of pixels that it occupies.

Many text editing widgets on websites and email clients give you the option of picking what font to use. For purposes of ASCII art, pick a fixed-width font. Then, begin crafting your design. You can also simply copy-and-paste someone else's ASCII art, like this cupcake, for example, but if you do so, it's best to keep any attribution the artist might've tagged their creation with (thanks Krogg, whoever you are):

          )
         (.)

         .|.
         l7J
         | |
     _.--| |--._
  .-';  ;`-'& ; `&.
 & &  ;  &   ; ;   \
 \      ;    &   &_/
  F"""---...---"""J
  | | | | | | | | |
  J | | | | | | | F
   `---.|.|.|.---'
               Krogg



Many forums have a WYSIWYG text-editor that lets you pick from a variety of fonts. In those cases, you can typically create your art in any text editor (I use Notepad++) then copy-and-paste it into the forum's editor, and then highlight the text and then change the font to apply fixed-width formatting.

Email clients, too, usually have WYSIWYG editors. Microsoft Outlook, for example, can be configured to use Word to create emails, allowing for great flexibility in formatting. For email messages, you can simply configure your email client to use a fixed-width font like Courier New, or alternatively change the email format it uses to plain text, rather than HTML or Rich Text; by default many email clients will render incoming such email messages in a fixed-width font, saving you some guesswork about whether the ASCII art will appear as intended.

Specific to Reddit, their text editor doesn't let you choose what font to use, beyond the font selections you choose for your web browser, but they do enable you to use a fixed width font by preceding each line of text with four blank spaces. Users in the programming field will sometimes post programming code, and while this feature is particularly suited to that purpose, it can also help you break up an otherwise serious discussion with some frivolous ASCII art creation.

To reproduce the above cupcake ASCII art on Reddit, then, you'd simply copy-and-paste the above into a new post or comment on Reddit, then copy a set of four blank spaces and paste them in front of each line of the cupcake. Then when Reddit displays the text, it will apply formatting rules and display the cupcake in fixed width font for everyone's enjoyment. Here's an example.

Unfortunately, some sites like Facebook won't allow you to choose your own font, their text formatting is very limited. However, you could simply host either a plain ASCII text file or an HTML document on a free web host like Awardspace. Then, simply refer your friends to the URL for that page to show them your creation.


Wednesday, February 16, 2011

ImageShack, I Am Disappoint

ImageShack is one of many free online image hosting services.

Up until recently it's been one of my favorites because it allows you to easily copy a simple direct link to an image you've hosted. This allows you to link someone directly to a given image without any clutter, just the image by itself.

As of a week or two ago, however, they've disabled their Direct Link textbox and insist that you register with their site for this privilege. Sure, you can still freely obtain the Link code, which will show the image plus some minimal markup of ImageShack itself, and you can still copy various forum, thumbnail, widget and other markup for the image you wish to host, but really, most often I just want the image alone, that's all, nothing else. 

I freely admit it, I am a cheapskate.



There are several workarounds for this annoyance. 

First of all, you could simply visit another image hosting provider like imgur and use their service instead. Of course, you could sign up and create a user account with ImageShack; obviously ImageShack is in favor of this option. Another option is to visit BugMeNot and borrow somebody else's credentials. If, however, you yearn for ImageShack prior to their shenanigans, you can still obtain the Direct Link through this relatively convoluted series of steps:
1. Upload an image to ImageShack as usual.

2. Right-click on the Upload Successful page and view source.

3. Copy the direct URL to your image, and paste it wherever you like.

Why ImageShack chose to do this, I don't know. I've used their Direct Link for years, why they would choose to implement this, particularly when so many other image hosting sites like imgur continue to offer a plain URL to your hosted image, is a mystery to me. 

I'm certainly not enough of a die-hard fan of ImageShack that I would go to the trouble of digging into the HTML to grab that direct link each time, so I guess the easiest option is to just use another provider from here on out. Perhaps this will lead to a similar backlash to the infamous Gizmodo design change, which caused a significant reduction in visits to their site?

Yet another example of how a seemingly small change to the user experience can prompt users to seek an alternative.






LogMeIn Laptop Screen Stays Blank After Remote Session

LogMeIn is an excellent online service which offers a free method of remotely controlling a PC via web browser. 

Recently I encountered a minor glitch, however, and whether LogMeIn or Windows 7 or nVidia are the culprit, I'm not sure.

I had remoted in to my Dell Latitude E6410 laptop using the latest free version of LogMeIn. It is equipped with Windows 7 64-bit and NVIDIA NVS 3100M display adapter, each with the latest updates and drivers available. 

All seemed fine via remote, but when I returned to the office I found that although my secondary monitor activated normally, my laptop display remained seemingly asleep and unresponsive. I tried using the key combination of the Windows key and P then clicked Extend to try to have Windows reinitialize the displays and wake everything up, but no joy.



I then tried just changing one of my Display settings, the Resolution, to a different value in order to have Windows enable the Apply button, and then clicked it. 



After doing this, my laptop screen was no longer blank.

Monday, February 14, 2011

Blogger Blog Post Title Optimization

I've blogged with Blogger for a few years now, and overall it's worked pretty smoothly, but the blog post title can be a bit awkward to work with.

You'll notice that if your post title is particularly long, the resulting URL will get truncated once the post is published to a maximum length of roughly 39 characters. Spaces will be replaced with dashes, stop words like "to", "and", "of" will be filtered, and punctuation will be omitted.

Principles of SEO demand that blog posts are crafted such that search engines will return links to them as relevant hits for a given search. In addition, it is helpful to make it so that the blog post title is similar to the actual URL of the post.

In a Blogger blog, you can optimize your blog post titles by first deciding on a title which is both meaningful and concise. The title should reflect the content of the post, to make it easier for search engines (particularly Google) to categorize what you're blogging about, and decide how high up in the search results to place it. 

For example, if the title of your post is "How To Make Lots Of Money By Blogging On Random Topics" (which is 54 characters without quotes), try to distill the essence of your post into a title which meets or is under the 39 character limit, perhaps "Make Money Blogging Random Topics" (33 characters) or "HowTo Make Money Blogging Randomly" (34 characters). 

Ideally, you want the post title to meet that character limit for Blogger post titles, but sometimes it's difficult, particularly with stop words and spaces eating of valuable post title real estate. 

To mitigate this, you can try the following steps:
  1. Create a blog post with as brief a title as possible.
  2. Publish the post with the brief title.
  3. Immediately after publishing, Edit your post and modify the title to your original, more verbose version.

After doing this, you'll discover that Blogger keeps the concise title's wording in the URL, but in the post itself it will have your verbose title. 

Again, it's probably best that the title be the same in both the URL and the actual post title, but if you just can't do your post justice by pruning it below 39 characters, you can at least ensure that the post URL meets that requirement and yet retains value from an SEO standpoint.





Wednesday, February 9, 2011

Blogger Template Change Kills Google Analytics Script


For some reason, several categories of Google Analytics tracking my Blogger blog stats have flatlined within the last month or so.

I just realized why, I'd made some template changes, including choosing a different template from among Blogger's selections, and this clobbered the analytics script! 

Strangely, even though the tracking code was nonexistent, the Tracking Status indicator in Analytics still says that it's "Receiving Data" even though statistics like New Visits, Avg. Time on Site, and Bounce Rate have been flat.

Anyway, you can visit this Google Analytics help page to find out how to enter the necessary tracking code (the preferred one to use is asynchronous).


Friday, February 4, 2011

Block Reddit Gold on User Pages

Recently, Reddit added a new link beneath users' overview section of their page:
treat yourself to reddit gold

Also if you happen to be checking out another user's profile, you'll see:
buy (another user) a month of reddit gold

I enjoy Reddit a great deal, and I don't block their sponsored ad banners even though I otherwise have AdBlock Plus enabled, but I found this linkage a bit annoying.
ಠ_ಠ

To remove it from your own Reddit user page, you can copy and paste the following Element rule to your AdBlock Plus filter list:
reddit.com##A[href="/gold"]

To prevent the link from appearing on other users' pages, add another rule with the following slightly different syntax:

reddit.com##A[href*="/gold?goldtype=gift"]


Here's a screenshot showing how the rules appear:





Thursday, February 3, 2011

Random Numbers in SQL

I needed a SQL query to insert a range of values randomly into each record of a table variable.

The SELECT statement would use the random number in conjunction with a CASE statement to pick from two different values to insert into a field, in effect tagging records randomly with one value or the other. 

My first attempt involved trying to grab the one's digit of the second of today's date via the getdate() function, and based on whether this value is even or odd, pick one or another of the values to assign to a field for the record I insert.
INSERT INTO @MyTableVariable (MyField)
SELECT

    CASE
        WHEN RIGHT(DATEPART(s, getdate()), 1) IN (0, 2, 4, 6, 8) THEN 32
        WHEN RIGHT(DATEPART(s, getdate()), 1) IN (1, 3, 5, 7, 9) THEN 39
    END AS MyField

FROM dbo.MyTable t

The result wasn't quite what I expected. Instead of one of each inserted value appearing randomly in the resulting table variable for MyField, the same value appeared each and every time.

As it turns out, I didn't realize that in the CASE statement, the seconds portion of the current time, the "seed" if you will, only got set once at the beginning of the SELECT. There is nothing in the statement to prompt the function to update the current time with every iteration, every record examined from MyTable, it only performs a one-off examination of the seconds and goes with that for the rest of the operation.


My solution involved using instead the one's digit of the integer primary key of the source table, like so.
INSERT INTO @MyTableVariable (MyField)
SELECT

    CASE                  
        WHEN RIGHT(t.ID, 1) IN (0, 2, 4, 6, 8) THEN 32        -- Even
        WHEN RIGHT(t.ID, 1) IN (1, 3, 5, 7, 9) THEN 39        -- Odd            
    END AS MyField

FROM dbo.MyTable t

In this case, the subset of data that I'm querying from MyTable is just that, a subset, which means that the primary key (ID) won't be in any particular order; there are plenty of opportunities for the one's digit to be odd or even. This provides a reasonably random sampling of records in the resulting table variable.





Thursday, January 27, 2011

Improve Firefox Performance with Processor Affinity

Firefox seems to frequently stutter or lag while doing seemingly trivial tasks like scrolling or even typing following the most recent Firefox 3 update.
 
Enter the concept of processor affinity, which enables you to direct applications to utilize one or more specific CPU cores in your multicore system. I discovered a blog post where the author describes creating a shortcut in Windows Vista or Windows 7 which will execute a given application with a specific processor affinity configuration.


PROCEDURE

  1. Copy and paste to create a copy of your current shortcut to Firefox on the Desktop.
  1. Pick a single CPU core, in decimal, to dedicate to Firefox, according to the chart below. I chose CPU 3 on my quad-core system.
0001 = 1 (CPU 0)
0010 = 2 (CPU 1)
0100 = 4 (CPU 2)
1000 = 8 (CPU 3)

  1. In the Target box, copy and paste one of the following lines (the first for 32-bit Windows, the second for 64-bit), and change x to match the value you chose in the above step (change the paths as necessary if your Firefox lives in a different location).
C:\Windows\System32\cmd.exe /c start "C:\Program Files\Mozilla Firefox\" /affinity x firefox.exe

C:\Windows\System32\cmd.exe /c start "C:\Program Files (x86)\Mozilla Firefox\" /affinity x firefox.exe


  1. Click OK to accept the changes, then close and reopen Firefox using the modified shortcut.

Windows XP also allows for changing the processor affinity setting for a given process via the Processes tab in Task Manager, but this setting is applied only for that instance of the application, so you can't use the above method to have a shortcut which automatically sets the affinity every time. If you try it, you'll get this error message:

Invalid switch - "/affinity"

Fortunately, a freeware utility called RunFirst exists which will perform in a similar manner, except it will by default assign only the first CPU core in the system to have affinity with the application you're running it with. To use it, create a batch file to execute firefox.exe like this:
      RunFirst.EXE "C:\Program Files\Mozilla Firefox\firefox.exe"


Now, Firefox has its very own CPU core to use on my Windows 7 system, which is advantageous in that the other applications running on my system need only contend with one core being potentially monopolized by some CPU-expensive operations which Firefox initiates.

I tend to browse with many (read: dozens) of tabs open simultaneously, as well as a plethora of add-ons installed such as AdBlock Plus, DownThemAll, FireBug, GreaseMonkey, FoxyTunes, Stylish, FiddlerSwitch, and more. Mine is hardly a “vanilla” setup, and given that these various add-ons let alone Firefox itself are developed by a variety of developers with a variety of coding styles, even bugs, it’s entirely likely that I’m a victim of chaos, that an unfortunate confluence of events are conspiring to kick my browsing experience in the teeth. 

At least this way, I'm letting Firefox do it's thing on just a single core, rather than having it bleed over onto the others and potentially making my other running processes unhappy.

So far, Firefox seems to be significantly more responsive than before!



Tuesday, January 11, 2011

Just Another Day...

This is January 11, 2011, or 1/11/2011 in middle endian format.

Some in numerological circles claim that this day is one of opportunity, but not without hardship. Others interested in conspiracy theories feel intuitively that something "big" will happen this day.

Really, though, isn't it just another day??

The Gregorian calendar is today used by much of the civilized world to track and organize days. Remarkable as it is that the international community could agree upon using this convention to track the passage of time, it's nevertheless a tool, like the clock, even the chip in computers used to store the date and time.

That's not to say this day is meaningless. People will be born, die, get married, have a birthday, have sex for the first time, celebrate an anniversary, enjoy their first day of vacation, and countless other activities which will etch this date as meaningful to them or their loved ones for the rest of their lives. 

In the meantime, though, the world keeps turning, and we're just along for the ride. The earth continues to journey as part of the Milky Way galaxy from its point of origin in the distant past to wherever it's destined to go at a speed of around several hundred kilometers per second.

The day surely is meaningful, as we are living it here and now, experiencing it. It has value if for no other reason than that we're here to participate in and enjoy it. Nevertheless, it's just a convention. I seriously doubt the universe cares how we keep track of the time we occupy in life, since it's been here and will likely still be here far longer than we ever will.



Saturday, January 8, 2011

Windows 7 to XP FIle Sharing Problems

Recently, I had serious issues with trying to enable file sharing between my newly-installed Windows 7 laptop and my Windows XP SP3 desktop.

Windows 7's Network and Sharing Center

I have a home wireless network, where my Windows 7 laptop, on wireless, normally shares files perfectly well with my Windows XP desktop. Inexplicably, one day the capability to share files via wireless ended; I couldn't even ping my XP desktop from my 7 laptop let alone browse its file shares, whether by computer name or IP address. And yet, over a wired connection, file sharing performed flawlessly!


Here's a list of what I tried:
  • Updated drivers for network hardware.
  • Disabled Windows Firewall on both machines.
  • Verified internet connectivity from the laptop.
  • Ensured both PCs share the same workgroup name.
  • Verified connectivity over wireless, from the laptop to the router.
  • Completely reinstalled the TCP/IP stack on the Windows XP computer.
  • Deleted and recreated routes using the ROUTE command on both computers.
  • Reinstalled the Link Layer Topology Discovery (LLTD) responder on the XP box. 
  • Followed Microsoft's docs on enabling File and Printer Sharing under Windows 7.
  • Verified that shared folders on both PCs had proper permissions.
  • Removed remnants of Norton Internet Security with the Norton Removal Tool from the XP box, which I'd long since uninstalled but remnants of which still remained.
  • Followed Microsoft's steps for sharing files among different Windows versions, including rerunning the network setup wizards for each respective operating system.

In spite of all these steps, I still couldn't even ping the XP box from the 7 laptop, and I couldn't see the XP box from the 7 laptop in the network, although I could see, but not access, the 7 laptop from the XP box.

The solution turned out to be unexpected.

A few years ago, I replaced the factory firmware of my venerable Buffalo WHR-HP-G54 wireless router with DD-WRT, a free, open-source, Linux-based firmware which can be applied as a drop-in replacement for the manufacturer firmware, and can expand the features of your router to boot.

The firmware, as with most anything in IT, is evolving, and it'd been some months since I'd last updated the version of DD-WRT; it was v24 SP1 from around August, 2010, whereas the newest version is v24 pre-SP2. Some other DD-WRT users had reported issues sharing files on their own networks. DD-WRT itself has an option under Wireless => Advanced Settings called AP Isolation, which allows you to prevent wirelessly networked devices from interacting with one another, and presumably with wired clients, via the router (in my case, this option has always been disabled).

At this point, my options were exhausted, so I took the plunge and updated the DD-WRT firmware. Even though the latest version is technically still in beta, it seemed worth a shot; I've never had trouble since first installing DD-WRT, and the fact that it allows you to preserve your existing settings without wiping the router's NVRAM made it even more appealing.

The result? It worked! Suddenly, rather than being met with the dreaded System Error 53 when attempting to map a network drive letter from the laptop to the desktop or trying to browse to a shared folder via Windows Explorer, I got a prompt asking me to authenticate to the XP box using my credentials, and finally regained access!

If you haven't updated your router's firmware in a while, it might be worth a shot, particularly if you use DD-WRT as I do and have perhaps encountered what might be a bug in your current version of the firmware. 

If you still have the factory firmware, I'd strongly suggest you consider replacing it with DD-WRT or another like Tomato, which can not only offer your router and network more stability and performance, but also unlock features that the manufacturer might not even offer in their own relatively anemic firmware. 





Monday, January 3, 2011

IE8 Process Priority in Windows 7

I wanted to bump up the process priority of Internet Explorer 8 under Windows 7.

There are at least a couple of ways to do this. If the app is already running, you can open Task Manager, right-click the app on the Applications tab and click Go To Process, then right-click the process name on the Processes tab and Set Priority to one of the levels above the default, Normal.


I chose a relatively quick-and-dirty method to create a batch file to boost the process priority of IE8, in conjunction with the START command, which can be tested via the Command Prompt.

Generally, the syntax is as follows:

     START /Priority ProgramName

Where /Priority is one of several values (Low, BelowNormal, Normal, AboveNormal, High, RealTime), and ProgramName is the name of a particular executable (EXE) whose priority you wish to boost.

I began with a simple batch file as a proof-of-concept to instantiate a High-priority instance of Notepad.

CLS

start /HIGH notepad



 



Success! Now I wanted to do something similar with Internet Explorer 8, and have it run with High process priority. The result wasn't quite what I wanted.


CLS

start /HIGH iexplore.exe





I'm running the 64-bit version of Windows 7, and have both the 32- and 64-bit versions of Internet Explorer 8 installed. Ideally I would've liked the 64-bit version to run, but it looks like by default the 32-bit one comes up via a command prompt if I omit the path (as I have lazily done here). That's no big deal, nor is the fact that there are two processes named iexplore.exe (see this article on Loosely-Coupled IE [LCIE] by Microsoft's Andy Zeigler regarding why IE8 creates two processes for itself instead of one). The problem is that neither iexplore.exe process has the desired High priority. I got around this by saving the batch file in the 64-bit version of IE's program directory, which by default lives here: 

     C:\Program Files\Internet Explorer

Now when I execute the batch file, START properly starts up one of the iexplore.exe processes at High priority.





But wait, why did it start only one process at High, and the other at Normal?? I'm not sure. I do notice, though, that unfortunately the process which appears to represent the default tab of IE8 that opens is the one set to Normal priority, which isn't exactly what I wanted. I can tell that this seems to be the case when I keep an eye on that process' CPU usage as I try browsing, as shown below.





Furthermore, as I opened additional tabs, which in turned spawned additional iexplore.exe processes in Task Manager, each of these too had only Normal process priority. Only the first process (note that the process with PID 87996 is High, while the second with PID 89476 is Normal).

The end result of this is that despite having set the priority of iexplore.exe to High via the START command in a shortcut, it seems to set this priority only for the "base" instance of iexplore.exe, not the instance which actually seems to be dedicated to browsing; not much help if your goal is to have browsing take precedence among the other activities of your applications. 

It looks like I may need to find some Windows settings specific to Internet Explorer or process priority elsewhere, whether by hacking the registry or some other means.


UPDATE 
1/4/2011

I stumbled upon a post on AskVG which links to a utility, Prio, which extends Task Manager to include among other things a Save Priority option, as shown below:




However, according to some of the comments in the article, some users of Windows 7 64-bit have reported problems getting their changes to process priorites to "stick" between reboots. 

I've installed the utility in a manner suggested by one of the commenters, woodburyadpost, who suggested the following installation steps:
  1. Install. DO NOT REBOOT. 
  2. Uninstall. DO NOT REBOOT. 
  3. Reinstall (and, presumably, reboot).

Curiously, the very first time I installed the utility, I received no prompt asking me to reboot, whereas after following the above steps, the installer did suggest a reboot. Perhaps this indicates the installer is missing something the first time through whereby a component isn't getting copied or installed on the system properly?

At any rate, we'll see if this works, and if so, it'll be a handy utility to have!