Saturday, December 21, 2013

The simplest way to speed up your laptop

I have been going through several interesting projects lately. There were a couple of important ones which required processing large and somewhat twisted SQL databases. The other, "weekend" projects, made me dust off Eclipse and fix some cool Android code to make it work on KitKat. But this article is not about large files or databases. It's about those small but pesky JPEG files we often overlook and underestimate, but which seriously affect performance of our aging laptops.

So here is the story.

About a couple of months ago I went to our local toy Tigerdirect and bought the latest 1TB Seagate hybrid drive for my laptop. I expected it to be better than its predecessor, the Seagate Momentus XT which I used for a couple of years, but which started to show its signs of wear.

I was very happy with the new drive. For about a day or two. Then I noticed that the laptop boots up slower than before the upgrade. But the worst hit was to see web sites load noticeably slower. You know, those that unroll their galleries of high quality photos when you scroll down your mouse wheel. One of my favourite ones is the Autoblog, but it looks like all of them are now going that way in web design.

Well, you may say that the new drive is only 5400rpm while the former one is 7200, but that's not the show stopper for me.

I started thinking and decided to look at how the antivirus software works on my machine. Of course, I have MDF and LDF files excluded from active scan, for obvious reasons. What else? So I gave it a thought and decided to turn off scanning of JPEG, JPG and PNG files. Why? Because they are pictures. I don't care if they have any code in them. I don't rename them to exe and launch just to test. That would be quite foolish.

Well, now my web browser runs faster and smoother. No more stuttering on large web sites like Autoblog and others. And I can live with this new larger but slower drive until Seagate makes the faster version.

Friday, December 6, 2013

How to switch PgUp/PgDn keys with Home/End without breaking keyboard

After adding a bluetooth adapter to my Toshiba laptop, I am fully enjoying the world of bluetooth accessories. In fact, I am getting spoiled by not using the USB ports for a keyboard or mouse. Wireless peripherals and especially bluetooth ones are so much cooler than pulling wires..

Finding a decent bluetooth keyboard was a bit of a hassle for me though. I have relatively big hands, and I am used to those curvy Microsoft keyboards such as Microsoft 2000. But the 2000 model is wired, which defies the whole purpose. It's also quite big. I like my desk tidy. And I don't use the calculator side of the keyboard at all.

The only one bluetooth keyboard I really liked is Microsoft 5000. Positioned as a keyboard for mobile devices, it's lightweight but solidly made, stylish, having large keys with great feedback. It does not come with the calculator keys (you can get the 6000 model for that), but otherwise it covers my needs for 100%.

For some reason, Microsoft does not make model 5000 keyboard anymore, and it's getting increasingly hard to get one new. I recently purchased another one on eBay, it came new in a box, sealed and unopened. Now I have one at home and one at work. They are exactly the same. I do carry my laptop back and forth, and when I turn it on, it would seamlessly connect to them, without any additional clicks or switches.

But... this article is not only about this awesome keyboard. It's about how to fix some of its keys.

Perhaps one of the reasons why Microsoft stopped making the model 5000 is because it was unpopular. It was unpopular probably because it had a few of its keys defined incorrectly. The PgUp and PgDn functions were sharing the same keys with Home and End. While PgUp and PgDn were made default keys, to use Home or End you have to push and hold the Fn (function) key each time to use Home or End.

I work with a lot of text on a daily basis (I am a programmer), but I don't use PgUp or PgDn as often as I use Home and End. In fact, I almost never use page up or page down. I use my mouse wheel to scroll between lines and pages of code.

But.. where there is a will there is a way. This problem didn't stand long against one's programmer's skills. I googled up a few things and came up with two registry files. They can help you too make your PgUp and PgDn keys work as Home and End, or undo those changes, respectively. The best thing is that the PgUp/PgDn don't go away, they can now be used with Fn key. In other words, the PgUp trades places with Home, and PgDn with End. In computer language this method is called changing scancode mappings. Btw, it worked for me on both Windows XP and Windows 7.

If you had the same problem I had, and if you want to switch your keys on your keyboard the same way, simply copy (verbatim!) the portions of text below into Notepad, separately, and save them as two separate .REG files. Take twice a day... I mean, run the first one to swap the keys, and the second one to reset the keys back to default layout.

Use this to switch PgUp/PgDn with Home/End:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,05,00,00,00,47,e0,49,e0,49,e0,47,e0,\
4f,e0,51,e0,51,e0,4f,e0,00,00,00,00

This will reset keys back to default:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00

Disclaimer: the purpose of this article is to give a solution, not to force you to change anything in your computer be it hardware or software. Always wear gloves.. er.. I mean, always pay attention and utmost care when dealing with Windows registry. Back it up, etc. Improper actions or a misspelled command may result in unstable work or even unresponsive computer. I can only show you the way, you are the one to walk it, which means I don't guarantee this method to work on your particular computer, neither may I be held responsible for any problems caused by user actions.

Credits: Remapping Windows Keys by Preston Hunt