Tuesday, September 25, 2007

Excel 2007 Multiplication Bug

850*77.1 gives a result of 100,000 instead of the correct 65,535!
It seems that any formula that should evaluate to 65,535 will act strangely.

More posts here :

One poster in the forum noted these behaviors: "Suppose the formula is in A1. =A1+1 returns 100,001, which appears to show the formula is in fact 100,000... =A1*2 returns 131,070, as if A1 had 65,535 (which it should have been). =A1*1 keeps it at 100,000. =A1-1 returns 65,534. =A1/1 is still 100,000. =A1/2 returns 32767.5."

You've got to wonder: if it worked fine in previous versions what the hell did they do to mess it up this time?

Saturday, September 15, 2007

MSN Messenger 7.5 doesn't work anymore

I tried logging into MSN Messenger a couple of days ago and got an error saying that I had to download the latest "Windows Live" version. My current version is 7.5 and I don't want to download the latest because I hate it as it is a memory hog.

After searching a few forums online, I found the following workaround to get MSN Messenger 7.5 logging me in again:
  • Right click the MSN Messenger icon and select Properties
  • On the Compatibility tab choose to Run this program in compatibility mode for: Windows 2000
  • Click OK
Now, when you start MSN Messenger, it reinstalls/repairs it and then allows you to log in again! Only thing is, you end up with a funny icon in your System Tray.

Wednesday, August 22, 2007

RARE Award

Quick note to blog the fact that I won the 8th cycle of the GTO Recognising and Rewarding Excellence (RARE) initiative on the 3rd of August.

RARE is a business initiative with the objective to recognise, reward and celebrate exceptional accomplishments, achieved by GTO AVPs and below.

I was awarded a cash prize and a mug!

Monday, June 18, 2007

Escaping a Character in Oracle

Consider the following table

select * from my_table

NAME
----
FAHD
FAHD_SHARIFF
SHARIFF_FAHD
FAHDSHARIFF

If you want to select only those names containing an underscore, the following query will NOT work:


select * from my_table where name like '%_%'

NAME
----
FAHD
FAHD_SHARIFF
SHARIFF_FAHD
FAHDSHARIFF

All rows are returned even though rows 1 and 4 do not contain an underscore! This is because an underscore is a special character - it is a single character wildcard.

You need to escape the underscore so that Oracle treats it as a literal:


select * from my_table where name like '%\_%' escape '\'

NAME
----
FAHD_SHARIFF
SHARIFF_FAHD

Monday, March 26, 2007

Windows XP Performance Tips

WINDOWS DISK INDEXING
This is a performance tip that I strongly recommend you implement. The Windows Disk Indexer constantly indexes all files on your machine to allow for faster searching using the Windows Search function for example. Since most people don't search their machine very often, having Disk Indexing enabled provides a performance hit for no good reason, and also increases fragmentation. Follow these steps to turn off the Windows Disk Indexer to improve hard drive performance and responsiveness:
1. Go to Windows Explorer, right-click on your hard drive name (e.g. C:) and select Properties.
2. Untick the 'Allow Indexing Service to index this disk for fast file searching'.
3. Select 'Apply changes to [Drive letter]\, subfolders and files' in the subsequent prompt.
4. Your system will now go through and remove all indexing on existing files, and not index any new or moved files in the future - this will speed up drive read/writes and general responsiveness. Ignore any 'errors' which are shown, this occurs simply because some files are in use or protected and can't have their properties changed to remove indexing - this is normal.

Make sure you also disable the 'Indexing Service' service as it is no longer necessary when disk indexing is removed from your hard drive.

DEFRAGMENTATION
I strongly suggest you get into the habit of defragmenting often, specifically after you delete or add large files or install software.

PREFETCH
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory
Management\PrefetchParameters]
EnablePrefetcher=3

I personally leave the Prefetcher registry setting above at its default of 3, and set the Task Scheduler service to Disabled. This means the prefetcher won't create application prefetch files under the Window\Prefetch directory. I also clear all out existing prefetch (.PF) files in that directory. I have found that this provides for the fastest Windows bootup time.

CONTROL PANEL > SYSTEM

> ADVANCED > PERFORMANCE SETTINGS
For fastest performance, I recommend deselecting everything except 'Use visual styles on windows and buttons' and 'Use drop shadows for icon labels on the desktop'. That will reduce usage of system resources for graphical effects, while still retaining the majority of Windows XP's trademark appearance.

> ADVANCED > PERFORMANCE SETTINGS > ADVANCED > VIRTUAL MEMORY


This is where you can set the size of your pagefile. To determine the optimal pagefile size you should ideally see how much memory your most memory intensive programs use and then set the pagefile to comfortably accommodate this.

Before setting a new pagefile size, first clear your existing pagefile. To do this select the 'No Paging File' option and click the Set button, then reboot your system. This step does two things: first it deletes the pagefile, fixing any potential pagefile corruption which can occur after a bad shutdown (remember this tip for future troubleshooting purposes); and secondly it ensures that any new pagefile you create will start off as a single unfragmented contiguous block on your hard drive for optimal performance, which will remain unfragmented in the future. Note that if you have any problems booting up into Windows due to a lack of a pagefile during this step, enter Windows in Safe Mode (See Backup & Recovery section) and continue the setup procedures for Virtual Memory from there.

Here is a simple general recommendation which is both safe to use on all systems, regardless of how much RAM you have, and provides good performance:
Set the Initial and Maximum pagefile sizes to 2560MB each - i.e. allocate 2.5GB for the pagefile. Whatever you do, don't set a zero pagefile.

> ADVANCED > STARTUP & RECOVERY SETTINGS
For a system with a single operating system, select '"Microsoft Windows XP [Home/Professional]" /fastdetect' in the list presented. If you only have one operating system, or you don't want to select a different operating system each time you boot up, untick the 'Time to display list of Operating Systems' option.

Under the 'System failure' section untick all three options for optimal performance, and the 'Write Debugging Information' option should be set to None. That way if you run into problems you'll see the error displayed (usually a Windows Blue Screen of Death (BSOD) message) and your system won't automatically reboot. At the same time you won't get lots of logfiles and dumpfiles of the event cluttering up your hard drive.

> ADVANCED > ERROR REPORTING
Click the Error Reporting button and select 'Disable Error Reporting' and tick 'But notify me when critical errors occur'. This will prevent your system continually informing Microsoft of errors occurring on your system, but at the same time will still show you important system messages and errors for notification and troubleshooting purposes.

> REMOTE
I strongly recommend that you disable the available options in this section for security and performance reasons.

> AUTOMATIC UPDATES
I recommend 'Turn off Automatic Updates' and instead use the manual method of regularly checking the Windows Update site for updates.

> SYSTEM RESTORE
Turn off System Restore, as it can take up a great deal of disk space

CONTROL PANEL > SOUNDS & AUDIO DEVICES
Disable as many sounds as possible as they take up system memory by being loaded into RAM at startup.

CONTROL PANEL > FOLDER OPTIONS
Use Windows Classic Folders
Open each folder in the same window
Double-click to open an item
Under View, I recommend you tick the following options:
  • Display file size information in folder tips
  • Display simple folder view in Explorer's folder list
  • Display the contents of system folders
  • Display the full path in the address bar
  • Display the full path in the title bar
  • Do not cache thumbnails
  • Show hidden files and folders
  • Show Control Panel in My Computer
  • Show encrypted or compressed NTFS files in color
It is recommended that the rest are unticked for best performance and functionality.

MOUSE
  • untick pointer shadow
  • auto default dialog button jump
  • pointer precision

SCREENSAVER
I recommend you set the screen saver to None to prevent burn-in (permanent image imprinting)

DISABLE STARTUP PROCESSES
Go to Run > msconfig and then choose the Startup tab.
Examine the list and disable any items you do not want started when your computer boots e.g. ypager, iTunesHelper etc.

DISABLE SERVICES
Go to Run > services.msc and then disable the following:
  • .NET Runtime Optimization Service
  • ASP.NET State Service
  • Clipbook
  • Error Reporting Service
  • Fast User Switching Compatibility
  • IMAPI CD-Burning COM Service
  • Indexing Service
  • Infrared Monitor
  • Machine Debug Manager
  • NetMeeting Remote Desktop Sharing
  • Network DDE
  • Network DDE DSM
  • Network Location Awareness (NLA)
  • Performance Logs and Alerts
  • Portable Media Serial Number Service
  • QoS RSVP
  • Remote Desktop Help Session Manager
  • Remote Registry
  • Routing and Remote Access
  • Secondary Logon
  • Security Center
  • Smart Card
  • SSDP Discovery Service
  • TCP/IP NetBIOS Helper
  • Telnet
  • Terminal Services
  • Uninterruptible Power Supply
  • Volume Shadow Copy
  • WebClient
  • Windows CardSpace
  • Windows User Mode Driver Framework
  • Wireless Zero Configuration
  • WMI Performance Adapter