10 things you can do now to improve the security and performance of your Windows PC

July 19th, 2007

Lets face it, secure and Windows are two words almost never used together, and for good reason. Security on Windows has traditionally been extremely horrible, and has singlehandedly brought about the rise of the antivirus industry and its billions of dollars of revenue. Another problem with Windows is that it gets slow over time. If your computer is slow, most of the time because of one of the following reasons:

  1. You have spyware, viruses, or both
  2. You have too many startup programs
  3. You have too many ‘temp’ files
  4. Your temporary internet files folder has too many files (internet explorer)
  5. You have toolbars or other browser helper objects installed
  6. You have antivirus installed (this has a big impact on performance)
  7. You’re using Windows Vista

However, it is possible to live (relatively) securely using a Windows PC with decent performance. Here are some useful tips (most that you already should know, and some that may surprise you).

Security Tips

  • Do your Windows Updates. This should be a given. If you don’t, you are asking for trouble. Sure they’re annoying at times, and can even cause problems, but you better do them. Personally, I do the optional updates too, just in case.
  • Disable Windows file sharing and the Remote Registry service. If you don’t use it, then disable it. Most users don’t share things on the network, so this isn’t a problem. File and Printer sharing can be dangerous to have on a public network, as shown by the next item.
  • Have a strong Administrator password. Many viruses/exploits rely on the fact that you have file and printer sharing enabled and that the Administrator password is blank. See, Windows shares out all of your hard drives to the world with names like C$ or ADMIN$, and by default makes them available to anyone who has the Administrator password. Check for yourself: Click Start -> Run -> type ‘fsmgmt.msc’ and click on ‘Shared Folders’. I bet you didn’t know those were being shared. If you’re really paranoid, rename the Administrator account.
  • BACK YOUR STUFF UP. Seriously, everyone says to do this, but nobody does it regularly. The best defense you can have against malware and viruses is the ability to restore your information anytime you need to without losing too much data. Theres really no excuse with how cheap CD-R and DVD-R media/burners are now.

Performance Tips

  • Don’t use antivirus. Get rid of it. Conventional wisdom says that you should use antivirus on your windows PC to make sure that you don’t get any nasty viruses. I disagree. Not only does antivirus routinely fail to protect your machine from viruses (especially new ones), but most vendors products slow down your computer a TON, and cause even more problems. I have not had antivirus on my PC for over 5 years, and I have never had problems with viruses or spyware. The key to keeping viruses off your computer is surprisingly simple: don’t visit questionable websites, don’t download questionable software or attachments, and do your Windows Updates. And if you happen to make a mistake, you’ve got those backups, right?
  • Remove Viruses and Spyware. Cmon, you don’t have these on your computer, right? NEVER pay money for an anti-spyware product, there are way too many free resources out there to take care of the problem for you (there are also a LOT of bad free anti-spyware products as well, so beware!). My small howto  details some programs that you can use to do the job manually without too much trouble.
  • Delete those temporary files. Having too many temporary internet files can slow your computer down a lot, especially on startup and shutdown. For some reason, Windows can sometimes accumulate thousands of files in the temp directory. I’ve seen up to 10,000 files before in someone’s temp directory. Wait you say, I thought that ‘temporary’ means ‘temporary’? No, not in Windows. Most of the trash is stuff left behind by lazy installers or careless third party programs. I recommend you use a program like Pocket Killbox (http://killbox.net/) to delete the files, its much quicker than doing it manually. Also, don’t forget about those temporary internet files. If you’re not using Firefox (you are, aren’t you?), then internet explorer can get extremely slow because of its inefficient caching methods. Pocket Killbox can help you here too.
  • Stop programs from running on startup. There are a lot of tools (including MSCONFIG, which comes with Windows, despite being rather annoying to use). There are a lot of free tools you can use to examine the programs that are starting up when your computer is, and more! HijackThis and AutoRuns are excellent programs to use for this purpose. Refer to my antivirus and spyware howto about good ways of doing this.
  • Delete your system restore points (All except the most recent one), or just disable it completely. In my experience, System Restore rarely ever fixes problems (though, I’ve heard rumors to the contrary). It just wastes 10% of your hard drive.
  • Defrag regularly. This isn’t as important as it used to be, but its still a good way to keep your system running smoothly. I schedule mine to run every night around 4am when I’m not using my computer.

I hope this helps you out, let me know what you do to improve the performance and security of your system!

TiddlyWiki

July 19th, 2007

A friend just gave me a link to a piece of software called TiddlyWiki. Besides the neat name, it is actually a ridiculously useful piece of software. Its a Wiki inside of an HTML file. Seriously. So you can bring a wiki around with you anywhere that you can edit at any time on any (modern) browser without requiring server software.

Anyways, its way cool, and I’ve already thought of a million different uses for it… though really, you have to use it to understand why its so freaking sweet. Go there. Now.
http://www.tiddlywiki.com/ 

Obsessive Web Statistics: Open Source Web 2.0 Website Statistics System

July 18th, 2007

For the last month or so, I’ve been working on a new PHP/MySQL/jQuery web application that I’ve decided to call “Obsessive Web Statistics” (OWS). A project has been created on Sourceforge for it, and I’m happy to finally announce the first file release for OWS! There are a number of features about OWS that give it an advantage over existing website statistics software.

Instead of generating static HTML reports like most website statistics programs, OWS takes your Apache logfiles and puts them into a MySQL database. A dynamic jQuery driven interface with a PHP backend allows you to manipulate the data and display it in useful ways. The interface is mostly intuitive and simple to use while providing powerful options to manipulate the data. For more information, you can visit the Sourceforge page or subscribe to the obsessive-compulsive mailing list (how crazy of a name is that? LoL. FYI: Its only about development and help for OWS) . Archived version of the list is available at Sourceforge as well.

Links:

Sourceforge website: http://obsessive.sourceforge.net 

Demo Site: http://ows.mattas.net/ 

Many thanks to my friend Tony Mattas (http://www.mattas.net) for providing hosting for the OWS demo site!

A lesson well learned: Don’t seek() on STDIN

July 18th, 2007

The neat thing about fread() and friends in most languages is that you can open up STDIN and pretend its a file. However, the following code doesn’t work.. hehe.

<?php
	$file = $argv[1];

	if ($file != '-' && !file_exists($file))
		die("File $file does not exist, foo!\n");
	if ($file == '-')
		$file = 'php://stdin';

	$f = fopen($file,'r');

	// crazy code in here

	// ok, go backwards
	fseek($f, $some_position);

	// Heh, it doesn't always work!?

?>

Yeah, I know it seems to be quite obvious from this small snippet, but for the record the lines were specified by quite a few lines of code and I didn’t quite realize that I was doing that… lol.

jQuery snippet:

July 12th, 2007

Here is a neat jQuery snippet that you can use to create extra elements in a form, underneath (mostly) the previous element. Took longer than it should have to create this since I didn’t quite understand the behavior of “before” and “after”… ie, a parent node has to exist for them to work.

<input name="field[]" type="text" /> <a href="#" onclick="$(this). before('<br/>'). before($(this). prev(). prev(). clone()); return false;" href="" >+</a>

This snippet works especially well inside of a table. 🙂 Unfortunately, I don’t have a demo of the code since I don’t have jQuery enabled on this blog.. yet. 🙂

Visual jQuery: Awesome jQuery Reference

July 12th, 2007

This is seriously the coolest form of documentation that I’ve seen. Implemented using jQuery by jQuery developer Yehuda Katz, Visual jQuery implements the API documentation for jQuery using an expanding tree of categorized nodes. Its quite innovative, IMHO. If you develop using jQuery, definitely a plus to have around. And, there is a downloadable copy of it available too. 🙂

http://www.visualjquery.com/

Why Antivirus is unnecessary in a controlled environment that uses DriveShield

July 10th, 2007

This is a short essay-style piece I wrote on my own time a few weeks ago to defend my position of not putting antivirus in our computer labs. I presented this to a group of lab managers here, and I lost the battle with them for political reasons and because they focused on macro viruses too much, which I didn’t look into at first because of they barely exist anymore!! Notwithstanding, I think the technical merits of my argument can stand fairly well anyways, and is a good read anyways. Keep in mind that this is talking about tightly managed machines with something like DriveShield or Deep Freeze on the computer. For perspective, the antivirus vendor we use is Symantec antivirus (which I despise). This paper does not reflect the position or opinions of anyone except myself.

Read the rest of this entry »

Blaming Mr. Rogers

July 8th, 2007

Heh… a recent study shows this generation is more narcissistic and selfish than previous generations. Probably true, no doubt. A professor at Louisiana State University blames childhood influences such as Mr. Rogers to telling us that we don’t need to work for what we get. Hmm… evil Mr. Rogers :p

Of course, the best statement in the second article has to be this: “By 2006, they said, two-thirds of the students had above-average scores, 30 percent more than in 1982.” Wait, so isn’t average the mean, which means you are always going to have at most half above it? Heh.. of course, they’re probably talking about the cumulative average over decades of research, but still…

http://rawstory.com/news/2007/FOX_Did_Mr._Rogers_ruin_entire_0706.html
http://seattlepi.nwsource.com/national/305247_students27.html

jQuery rocks

July 7th, 2007

Have you used jQuery yet? I know its been around for awhile, but I’ve only recently been using it. Of course, there are other similar javascript frameworks out there. jQuery makes javascript development ‘fun’, according to the website, and I would definitely agree. It makes so many mundane things way easy and quick to do. If you aren’t using it for your web applications, I’d definitely recommend it. I’m using it in my LOLCats generator demo page, and in my website stats analysis program (which will be formally announced and released in the near future), and it definitely allows you to do some really crazy things quickly.

http://www.jquery.com/

LOLCat Creator Generator

July 6th, 2007

For those of you who have used my LOLCat Generator script, you would be happy to know that I’ve improved it slightly — now using it on images that have white backgrounds works decently. Things the LOLCat Creator can do:

  • Put a caption in any of the corners, with wordwrap
  • Generate from any one of the few random cat pictures I have on the site
  • Generate from any URL of an image that you give it

A lot of people have been using it, and there are some pretty amusing pictures that have been generated. I’ll have to post the best ones. 🙂

LOLCat Generator Page