Friday, November 11, 2011

Stupid ISP

For the longest time I've had this unusual email problem at home. My work email account, I can read my email but I could not send emails. If I take my laptop into the office and connect to the Internet there I can read and send emails. So the problem isn't my computer, the problem is my network at home.

I finally decided to research this and found the problem. It turns out a lot of ISPs block port 25 which is the standard port for sending emails. They do this to cut down on the amount of spam being sent from their network. I understand wanting to cut down on spam, but it would have been nice if they told me they were blocking this port.

So what do you do if you're in a similar situation? I can only think of two possible situations. First, check to see if your email provider offers a second port through which emails can be sent (my provider offered this). The only other solution I can think of is to create a VPN tunnel into a different network (e.g. office network) that doesn't block port 25.

Thursday, November 10, 2011

Hard drive sizes - why marketing should be shot

Have you ever bought a new hard drive for your computer, but after installation the drive isn't as large as the package claims? Well the short answer is because the marketing department at the hard drive company lied to you. Every manufacture does it, and there is some precedence for what they've done.

It all comes down to math. Computers operate in terms of binary, 1s and 0s. A single 1 or 0 is called a bit. They group 8 of these bits together and call it a "byte." A byte is the smallest representation of data that computers store. When talking about larger numbers typically use prefixes like Kilo, Mega, etc. A kilobyte (KB) is 1,024 bytes. 1024 might seem like an odd choice, but they use it because 2^10 equals 1,024. And since computers use binary this was the obvious choice.

So where does the precedence come in? Well 1,024 is fairly close to 1,000 and as far as the human brain is concerned, doing math with 1,000 is a lot easier than 1,024. So it became common practice to use 1,000 to represent kilobytes. The problem is, as sizes get larger, the error compounds itself. Check out the following table:

Size / Percent difference

Kilobyte / 2.4%
Megabyte / 4.9%
Gigabyte / 7.4%
Terabyte / 10.0%

As you can see the error increases with each increased size. So if you buy a brand new 4 terabyte hard drive, it can actually store only 3.6 terabytes, or 90% of the claimed value. Hopefully at some point hard drive manufactures will discontinue this lie and accurately label their products.

How to select apples

I wanted to share a tip for selecting the best apples. This tip deals with the color of the skin, basically you need to ignore the color of the skin. I've noticed apples come in three main skin colors; solid red, solid green, and red/green combo. If the apple is suppose to have solid red or solid green colored skin, then you're not going to find them in the grocery store with the wrong skin color. So this tip mainly applies to the third type of apples.

Probably two of the most common red/green colored apples are Fuji and Gala. These also happen to be my favorite varieties of apples. I think a lot of people believe that the more red the skin the sweeter the apple will be. But this is wrong. On these types of apples, think of the red color as a sun burn. Basically the apples that grew on the top of the tree in direct sunlight will be more burned (red) than apples shaded by branches and leaves. But this doesn't affect the sweetness or taste. The best way to pick a good apple is to feel the apple for firmness. Feel the apple all the way around and select the firmest apple you can. All around softness is a sign of over ripeness and soft spots are an indication of having been dropped. In fact, in the store I typically select "greener" apples because most people want the "red" apples so you have better success finding firm green apples.

Again, this tip is most useful for apple varieties such as Fuji and Gala.

Monday, November 7, 2011

My ultimate free software list

Lately I've been on this big kick about finding the best free software on the Internet, and I've been pleasantly surprised. I found a lot of great programs out there that are totally free. Below is my grand list of what I've found up 'til now, for each item I tried to put a short description. There are too many in the list for me to put longer descriptions. I've broken the list down into software category types.

Multimedia

  1. Audacity - Powerful and useful audio editor that supports all the major audio formats.
  2. Avidemux - A good video editor. Does everything VirtualDub does and then some.
  3. CamStudio - Capture your desktop as a video. Great for recording product demos, youtube how-to videos, etc.
  4. FLAC - The audio encoding tools for FLAC, the free lossless audio codec.
  5. Gimp - An extremely powerful image editor (think Photoshop). The only downside is it has a steep learning curve.
  6. Greenfish Icon Editor Pro - Editor for Windows icon files. Not as powerful as Gimp, but smaller and has some nice features.
  7. HuluDesktop - Watch all the content of Hulu on your computer but without requiring a web browser.
  8. IrfanView - Powerful and yet simple image viewer program that includes some lightweight image editing tools.
  9. Lame - Audio encoding tools for MP3 audio files.
  10. Media Player Classic Home Cinema - A very good video and audio player. Has very simple UI and controls, like a program should.
  11. OGG - The audio encoding tools for the OGG audio format.
  12. VLC - Another simple video and audio player. Not as good as MPC-HC in my opinion, but has some unique features such as the ability to play internet streams.
  13. VirtualDub - A simple video editor. Can't do complex tasks, but can do simple tasks like rotate, adjust colors, adds subtitles, etc.
  14. WaveStudio - A free audio editor similar to Audacity, although not as good.
  15. Winamp - Audio player for pretty much any audio format.


Disc Utilities

  1. CDCopy - Utility for ripping audio CDs to WAV files for encoding to MP3, OGG, and/or FLAC.
  2. DISCInfo - Simple utility that displays info about your optical drives such as types of discs read/written, speeds, and firmware versions.
  3. DVD Decrypter - Allows you to backup/copy DVDs.
  4. DVD Shrink - Create copies of DVDs, remove unwanted material to save space.
  5. ImgBurn - Great utility for burning CDs. Burns either files to the CD, or burn from an ISO image.
  6. oscdimg.exe - Command line tool from Microsoft for creating ISO images. No download link for just this program, you'll find the file inside the Windows Automated Installation Kit download (1 GB in size).
  7. WinCDEmu - Mounts ISO files as virtual drives. I prefer version 3.4 which offers a "portable" version of the program.


Compression

  1. 7Zip - Awesome encryption that can be twice as much as the venerable PKZip.
  2. PKZip - Good old PKZip, where would the world be without you!?!
  3. Rar - Another good compression tool.


Security

  1. KeePass - Centrally store and manage all your passwords in one secure file.
  2. Microsoft Security Essentials - My favorite free anti-virus program.
  3. TrueCrypt - Create encrypted containers to store files, encrypt USB thumb drives, even encrypt entire disk partitions.
  4. Spybot - Scan for all the other types of malicious software that virus scanners don't check for.


Communications

  1. DNSBenchmark - Test the speed of your DNS servers against public DNS servers to find the best DNS servers for you to use.
  2. Google Chrome - Second best browser in my opinion. Has very good adherence to web standards.
  3. Firefox - Everyone should be using Firefox, the best browser as far as I'm concerned. Don't forget to add the plugins AdBlock Plus and Flashblock.
  4. FileZilla Server - FTP server for your computer.
  5. LeechFTP - A very good FTP client.
  6. Putty - A telnet and secure shell program.
  7. Thunderbird - The best email client, from the makers of Firefox.
  8. TightVNC - TightVNC is a remote desktop program. The built-in program with Windows is better, but if you can't use that for some reason try TightVNC. Other good options include RealVNC and TigerVNC.
  9. WinSCP - FTP and secure FTP client.


File Utilities

  1. Locate32 - Find files on your machine faster than Windows ever could.
  2. NTFSDelete - Recover previously deleted files. I personally prefer the look and feel of version 0.93 of this program.
  3. WinMerge - View the differences between two files and folders graphically.


System Information and Utilities

  1. AquaKeyTest - Program to test keyboards, helps you determine how many simultaneous keystrokes your keyboard can detect.
  2. CCleaner - Clean your system so it runs faster. Has an option to run as a portable application.
  3. CPU-Z - Shows you everything about your CPU, motherboard, chipset, and RAM.
  4. Defraggler - Defrag your hard drive. I think one is better than what comes with Windows. Has an option to run as a portable application.
  5. GPU-Z - Similar to CPU-Z but focuses on your graphics card.
  6. HWMonitor - Real-time display of all the hardware sensors inside your computer such as temperature, fan speed, and voltage.
  7. PCITree - View info about all the PCI devices in your computer.
  8. RegShot - Take snapshots of your computers registry and difference them to show you exactly what changed.
  9. SharpKeys - This program is used to map keys on the keyboard to other values.


Tool Suites

  1. AnalogX - Lots of good utilities here.
  2. Freezerware - Utilities written by yours truly.
  3. NirSoft - Tons of programs and all very useful. Most are available in 64-bit as well. Most, if not all, are portable.
  4. SysInternals - Now owned by Microsoft. Easily the best suite of tools on the Internet. Every Windows power user/developer needs these tools.


Games

  1. DoomLegacy - Play the original Doom and Doom 2 using new enhanced graphics such as lighting effects. Requires the original Doom WAD files.
  2. FCEUX - Emulator for the Nintendo Entertainment System (NES).
  3. Kega Fusion - Emulator for the Sega Master System, Genesis/Mega Drive, Game Gear, 32X, and Sega CD.
  4. MAME - Emulator for arcade machines.
  5. NagaSkaki - A really good chess program.
  6. Snes9x - Emulator for the Super Nintendo (SNES).
  7. Streets of Rage Remix v5 - An AWESOME fan remake of the Streets of Rage series on the Sega Genesis/Mega Drive. Download no longer available, but if you search the web you can find it.


Applications

  1. Adobe Flash - I personally hate Flash, but you can't get by without it these days.
  2. Adobe Reader - Not the best PDF reader in my opinion, but it is from the original creators of the PDF format which carries some weight.
  3. Adobe Shockwave - Again, I hate Shockwave, but you kind of need it.
  4. Hallo Northern Sky - Free planetarium software. Great for locating planets and constellations in the sky.
  5. LibreOffice - Free office software like Microsoft Office, only without all the bloat. LibreOffice is a branch of the more commonly known OpenOffice.
  6. Microsoft Mathematics - Free math software. Think of it as a graphing calculator on your computer - it even looks like a graphing calculator.
  7. Microsoft Office Viewers - If you just want to view Microsoft Office files not create them, then you need to download these Office Viewers.
  8. SumatraPDF - Small, simple PDF viewer. Way better than Adobe Reader. Includes a plug-in for browsers like Firefox.
  9. Sunbird - Calendar and organizer from the makers of Firefox.


Editors

  1. HxD - Very powerful hex editor. Edit files and disk sectors in hexadecimal.
  2. Notepad++ - Very powerful text editor. Blows the doors off of Notepad included with Windows, and pretty much every other text editor out there.


Development

  1. Application Verifier - Force bugs in code to cause exceptions which makes them much easier to find and fix.
  2. Interactive Disassembler (IDA) - Disassemble binary files, great for reverse-engineering.
  3. Microsoft Orca - Tool for creating and editing Windows Installer files (MSI). Included in the Windows SDK download.
  4. Microsoft Visual Studio Express - Free versions of the Microsoft flagship compilers. Has some features removed.
  5. VerySleepy - Profile applications to improve speed. Not as good as the Profiler including with Visual Studio, but that version requires the highest level of Visual Studio which many developers don't have.
  6. WinDbg - Very powerful and useful debugger. Included along with the Debugging Tools for Windows in the Windows SDK.
  7. Wireshark - The best packet sniffer available, period.
  8. WMIExplorer - Browse the WMI namespace on your computer.


Databases

  1. Microsoft SQL Server Express Edition - Free version of Microsoft's SQL server with a 4GB size limit.
  2. Microsoft SQL Server Management Studio Express - GUI editor for Microsoft SQL databases. This is a great companion to the free SQL Server Express.


Virtual Machines

  1. Virtual PC 2007 - Really good VM program, my personal favorite. Has good integration with the OS, both the host and client OS.
  2. VirtualBox - A VM program from Oracle. Has some cool features like USB pass-through. I believe it's also available for Linux.
  3. VMWare Player - VM program from VMWare, the biggest player in this market segment. Has lots of bells and whistles.


Operating Systems

  1. Ubuntu - Best version of Linux for the average person. Surprisingly user-friendly and easy to setup. If you want/need an operating system and you don't want Windows, this is your best choice.
  2. Windows PE - Yes, a free version of Windows. But not too useful for most people. Best used as a bootable CD to run diagnostics, backup, etc. Included in the Windows Automated Installation Kit download.


Bootable Utilities

  1. DiskCopy - Copy, clone, backup, and restore disk partitions.
  2. Memtest86 - Test your system memory for problems.
  3. Partition Wizard Home Edition - Move, resize, create, delete, etc. disk partitions.

Friday, November 4, 2011

Creating a C++ project without the C runtime library

So you're creating a very small C/C++ program using Visual C++, but you've noticed your program links to the C runtime library (CRT) even though you don't use the CRT. If your project links to the CRT it could cause problems. For starters your file size will be larger, and maybe a small file size is critical for your application. But the more serious problem is one of dependencies. By linking to the CRT your application is now dependent on the CRT libraries which may or may not be installed on every computer your application runs. You can get around this by statically linking to the CRT multithreaded libraries, but this increases your file size even further.

The better solution is to tell the compiler not to link to the CRT in the first place. To do that make the following changes in the project settings:


  1. C/C++ | Code Generation - Disable "Basic Runtime Checks." Anything that adds /RTCx to the command line must be removed.
  2. C/C++ | Code Generation - Disable "Buffer Security Check," i.e. add /GS- option.
  3. Linker | Input - Change "Ignore All Default Libraries" to Yes.
  4. Linker | Advanced - Set the "Entry Point" to "wmain"
  5. Finally in your code, create the entry point "int __stdcall wmain(void)"


This should allow you to compile and link without the CRT. You can create some incredibly small executables this way. However be aware this is best suited for simple apps. Anything more complex, like apps that link to MFC, this technique won't work as most other libraries and DLLs require the CRT.

DNS benchmarking

If you know how the Internet works, then you know how vital DNS servers are. Basically they convert human-readable names like "www.google.com" into addresses like "74.125.47.104." Loading an average webpage results in multiple DNS queries. So a slow DNS server means slower page loads, fast DNS equals faster Internet.

I just discovered two completely free DNS benchmarking utilities. They both do the same job and both do it will, so I'll mention them both here and let you decide which to run (or do as I did and run both). Both programs require a list of DNS servers to test, and both of them get this list from the same locations. 1) A built-in list of public DNS servers, 2) your computer's configured DNS servers (most likely assigned automatically to you by your ISP via DHCP), and 3) allow you to manually input additional DNS servers.

DNS Benchmark by GRC
GRC has made a lot of great free utilities over the years, and this one is no exception. I think everything this guy does is 100% hand-written assembly which is impressive. This also means the programs are small, fast, and simple (all good qualities).

Namebench by Goolge
Namebench is a program that came out of Google's "20% project." All developers at Google can use 20% of their time to work on personal projects. This is one of those projects. Namebench runs more tests than DNSBench which can be good, but it also takes longer.

Both of these are great programs and if you know what DNS servers are and how they work, I encourage you to give them a try. If you don't know what a DNS server is then don't bother, you're more likely to mess up your Internet connection then improve your speed.

Thursday, November 3, 2011

Watch Bing bleed!

I know I just made an anti-IE post, but I wanted to follow up with an anti-Bing post. It's not that I'm trying to rag on Microsoft. A lot of what they do is great, I mean heck my day job is as a Windows programmer so I owe my existence to them. But that's not to say I have to love everything they do.

Case in point - Bing. I have never been a huge fan of Bing. I'll admit, it's probably the second best browser out there, but the question remains, why use Bing when Google exists? Apparently I'm not alone in this thinking, and Microsoft has been loosing some serious money with Bing. To quantify it, between June 2009 and September 2011 Microsoft lost $5.5 billion dollars! And to make matters worse, the rate of loss is increasing not decreasing. Just check out this graph:


Whether or not you like Bing, this trend cannot continue. So either Microsoft will have to make drastic changes and/or cuts to Bing, or Bing will cease to exist before to long. Should be interesting to see happens.