Subscribe to my full feed.

Thursday, June 26, 2008

The results are in, Firefox 3 is in the lead

The Inquirer posted the results of a memory benchmark test where they tested 5 windows web browsers under average browsing conditions for 3 hours. The results were the following:

  1. Firefox 3 - 111.8MB
  2. Opera 9.5 - 190.6MB
  3. Flock 1.2 - 191.9MB
  4. Internet Explorer 8 - 194.4MB
  5. Safari 3.1 - 636.9MB

The MB values represent the memory-set usage after roughly 3 hours of web browsing. Firefox 3 climbed on pace with the rest of the browsers until it plateaued at around 111. Safari just kept going, Internet Explorer also seemed to be on a path up. Opera and Flock plateaued as well. The Inquirer concluded that they felt Safari and Internet Explorer would have continued to use up all of the available memory if they were left open.

Last note, the machine used had 3GB of ram and was running Windows Vista SP1.

Wednesday, June 25, 2008

HowTo: Create a Text File with SQL Server 2005

I recently had the need to create a text file from within SQL Server. I have never heard of anyone doing this before, but since I started developing with SQL Server, it keeps amazing me on its capabilities. So when I decided this is what needs to happened, I put in the research to figure out how to do it.

It is actually much easier than anticipated. The first thing we had to do was to enable the xp_cmdshell stored procedure by executing the following (courtesy of Microsoft):

-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1
GO
-- To update the currently configured value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1
GO
-- To update the currently configured value for this feature.
RECONFIGURE
GO

Once we had enabled xp_cmdshell, we could utilize the built in stored procedure that allows you to perform external processing. Basically you are performing a Windows command to create / append a text file. The syntax to do this is:
xp_cmdshell { 'command_string' } [ , no_output ]

I created a stored procedure to use when writing to a text file:
create procedure dbo.writeToFile
@msg VARCHAR(7800) = null, @file VARCHAR(200) = null, @overwrite BIT = 0
AS
BEGIN
DECLARE @execStr VARCHAR(8000)

SET @execStr = RTRIM('echo ' + COALESCE(LTRIM(@msg),'-') + CASE WHEN (@overwrite = 1) THEN ' > ' ELSE ' >> ' END + RTRIM(@file))

EXEC master..xp_cmdshell @execStr
END
go

HowTo: Stop ColdFusion Cookies From Vanishing

I encountered this problem recently in my exploration of ColdFusion where I set cookies within the session start function of the application.cfc to track information about how a user found our site, what browser they are using and their general locale.  Using debugger, I could tell that the cookies set properly when I first entered the site.  Once I navigated away from the first page the cfcookies were dropped or missing.

It was driving me nuts.  I did about 20 minutes worth of research before I found a solution.  Basically if I had not set client cookies to no, ColdFusion would try to automatically handle cookies being set on the users machine and apparently it just causes problems.  So I set this by entering the following line of code into my application.cfc.

< cfset setclientcookies="no" >


After I set that, closed and opened the browser and the cookies worked properly.  Hopefully this helps others who have experienced the same thing as me.

Chris

Tuesday, June 17, 2008

Mozilla Firefox Turns 3

Today at 10am PDT, the extremely popular web browser, Mozilla Firefox, turns 3 today. This has been a long awaited event for fans of the sleek browser, which has been growing quickly in adoption as an alternative to Microsoft's Internet Explorer. The new version touts new features making it more secure, easier to use and quicker. Lets hope they are successful.

The team at Mozilla is trying to make Firefox be the number one software for the most number of downloads within 24 hours of launch in the Guinness Book of World Records. The target is 5 million downloads. You can help them out by visiting http://www.spreadfirefox.com/en-US/worldrecord/ and making a pledge to download the new web browser.

Chris