Archive for June, 2007

June 30th, 2007

Which web server is better under load, IIS 6 or Apache?

One of the many techno-geek religious arguments that comes up a lot is which web server has a faster response time under load, IIS 6 or Apache? I am happy to say somebody actually put this to a test using what is known as the Digg-effect, basically a constant hammering of the server to keep it under load. The results may surprise some of the zealots out there and the test might be buried because of an unpopular fact. Here is the setup from the site:

This is a page to test the effect of high reddit and digg hits on two different servers one running IIS6 and the other Apache. The purpose is to see how each handles high hit loads and is the most reliable.

By using one server to load this page (not being tested) then calling a page from a dedicated IIS6 server into an iframe and a second page from a dedicated Apache server into a second iframe. The entire process is using PHP scripting and mysql data to store the results. To eliminate cache hits on both test servers, the page being returned to the iframe is dynamically created each time from a php script.

After the pages are completely loaded, an ajax call is made to the primary server to record the times back into the sql database for statistics. All three servers are the same physically and in the same rack and network. Bandwidth is not a measurement issue, since only the execution of the php script is being measured.

I have taken the liberty of making a screen shot of the following site just in case it is taken down. The screen show is dated 2007-06-30.IIS 6 vs Apache Graph

I have included the results below for the same reason.

Reddit hits 27653
Digg hits 874
Seconds to call the iframes from main page this run 0.0528259277344
Total seconds to load all pages this run 4.02603888512
Average seconds to load the iframes (both) 2.60272280153
Average seconds to load IIS 2.2937795829352
Average seconds to load APACHE 2.9116660201344

This is a very interesting study, and I am going to keep following this site for updates.

Tags: , , ,

Posted in Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

June 26th, 2007

SQL Server 2008 Will Have 7 New Datatypes

I haven’t even herd of a new version of SQL Server 2008, coming out, but according to this blog the new version has some very interesting and new data types that will come in useful for geography processing.

DATE - ANSI-compliant date data type
TIME - ANSI-compliant time data type with variable precision
DATETIMEOFFSET - timezone aware/preserved datetime
DATETIME2 - like DATETIME, but with variable precision and large date range

GEOMETRY - “flat earth” spatial data type
GEOGRAPHY - “round earth” spatial data type
HIERARCHYID - represents hierarchies using path enumeration model

The first four datatypes are regular SQL datatypes but the last three datatypes are exposed as .NET system UDTs.

Tags: , ,

Posted in C#, Programming, SQL | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

June 21st, 2007

How To: Connect To Cell Phone Internet Though Windows Vista

Since my last article I have updated the OS on my cell phone to AKU 3 for Windows Mobile 5.0. This has been a huge productivity increase, since there is no longer a need to have a modem driver, and you can browse the internet and take calls on your cell phone at the same time.

Requirements:

  1. A Windows Mobile 5.0 or 6.0 device.
  2. Active Sync 4.2 or greater for Windows XP or Windows Mobile Device Center for Windows Vista.

USB Internet Sharing:

  1. Open the Internet Sharing application under Programs.
  2. In the PC Connection drop down select USB.
  3. In the Network Connection drop down select the network connection for your cell phone provider. (i.e. Verizon Wireless)
  4. Press Connect in the bottom left.
  5. Plug your device in to your computer using a USB cable.
  6. You will then see your Status at the top change to Connected.

Bluetooth Internet Sharing:

I am going to assume that you already have your Bluetooth device paired to your computer. If you don’t know how to do this please check the manual for your specific phone.

  1. Open the Internet Sharing application under Programs.
  2. In the PC Connection drop down select Bluetooth PAN.
  3. In the Network Connection drop down select the network connection for your cell phone provider. (i.e. Verizon Wireless)
  4. Press Connect in the bottom left.
  5. Plug your device in to your computer using a USB cable.
  6. Setup a PAN (Personal Area Network) on your computer, again please search the internet or look through your manual on how to do this, because it varies from cell phone to cell phone and Windows XP and Windows Vista.
  7. You will then see your Status at the top change to Connected.

This is a great new feature that the Windows Mobile Team has included in the Windows Mobile OS. Not only can you now use your phone while you are browsing the web, but you don’t have to go through the hassle of trying to find a modem driver and then setting up a dial up connection and typing #777 and on and on and … you get the idea. I hope you find this useful, and as always please leave a comment telling me if this works or doesn’t for you.

Tags: , , , , , , ,

Posted in How To | kick it on DotNetKicks.com | Bookmark | View blog reactions | 9 Comments »

June 19th, 2007

Waking Up Early - 15 Tips That Work

David Cheong, a fellow software developer, has some very good tips for how to wake up early on his blog. I personally use half of them to get my self out of bed in the morning. The most important one that I use is:

I’ve found this to be the single most important element in being an early riser. Days in which I did not crystallise the reasons for getting up were more likely to result in sleep ins. Now, I make it clear the night before what it is I want to wake up early for. Initially, I found writing things down to be helpful, but this isn’t always necessary, as long as it is clear what the reasons are.

Basically you have to enjoy what you are doing in life, and once you do that it makes waking up so much easier. Even after a long night of coding where you worked on a mind-boggling problem that kept you up till 1:00 AM. It is a very good read even if you are not a software developer.

Tags:

Posted in Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

June 14th, 2007

Apple Safari 3.0.1 Released

Steve Jobs must have been kicking ass and taking names. Because only 3 days after the initial release, of Apple’s Safari Web Browser for Windows that had 6 security bugs known as of this article, Apple has released an updated version, version of the Safari software. According to Engadet the following bugs have been fixed with this new release.

CVE-ID: CVE-2007-3186
Available for: Windows XP or Vista
Impact: Visiting a malicious website may lead to arbitrary code execution
Description: A command injection vulnerability exists in the Windows version of Safari 3 Public Beta. By enticing a user to visit a maliciously crafted web page, an attacker can trigger the issue which may lead to arbitrary code execution. This update addresses the issue by performing additional processing and validation of URLs. This does not pose a security issue on Mac OS X systems, but could lead to an unexpected termination of the Safari browser.

CVE-ID: CVE-2007-3185
Available for: Windows XP or Vista
Impact: Visiting a malicious website may lead to an unexpected application termination or arbitrary code execution
Description: An out-of-bounds memory read issue in Safari 3 Public Beta for Windows may lead to an unexpected application termination or arbitrary code execution when visiting a malicious website. This issue does not affect Mac OS X systems.

CVE-ID: CVE-2007-2391
Available for: Windows XP or Vista
Impact: Visiting a malicious website may allow cross-site scripting
Description: A race condition in Safari 3 Public Beta for Windows may allow cross site scripting. Visiting a maliciously crafted web page may allow access to JavaScript objects or the execution of arbitrary JavaScript in the context of another web page. This issue does not affect Mac OS X systems.

This is a nice turn around time indeed, but my heart goes out to the Safari developers because they probably worked night and day for the last 72 hours, with the watchful eye of Steve Jobs over them. Good job Apple, now get some rest.

So if you feel inclined and don’t think you already have too many web browsers:

Download Safari

Tags: , , ,

Posted in Programming, Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | 1 Comment »

June 12th, 2007

Apple Safari Browser Welcomed To Real World With 6 Zero Day Exploits

Apple has just released a public beta of its Safari browser for Windows yesterday. And there have been already 6 zero day exploits and many, many crashes for the browser. You can read about them here here here and here. Which makes the following image from the Apple website, borrowed from aviv.raffon.net, all the more funny.

Apple Safari Security

Also Apple has the following to say under the Security tab of their website:

Security

Now you can enjoy worry-free web browsing on any computer. Apple engineers designed Safari to be secure from day one.

For starters, Safari uses robust encryption to ensure that your private information stays that way. When you browse a secure site, Safari displays a lock icon in the upper-right corner of the browser. If you want to know more about the credentials of a secure site, click the lock icon and Safari displays detailed information about the site’s security certificate.

Safari supports SSL versions 2 and 3, as well as Transport Layer Security (TLS), the next generation of Internet security. Safari uses these technologies to provide a secure, encrypted channel that protects all your information from online eavesdroppers. And Safari lets you use standards-based authentication such as Kerberos single sign-on and X.509 personal certificates, or proprietary protocols like NTLMv2 to log in to secure sites.

Safari also supports a variety of proxy protocols — services that help firewalls control what flows in and out of the network — including Automatic Proxy configuration, FTP Proxy, Web Proxy (HTTP), Secure Web Proxy (HTTPS), Streaming Proxy (RTSP), SOCKS Proxy, and Gopher Proxy.

I don’t know about you, but it’s one thing to say that you have designed your browser to be secure from day one, but it’s another to actually prove it. Apple has fallen flat on its face with this release, and I know it is only a beta, but Fire Fox and IE have both been in beta before and haven’t nearly had this many problems.

All that I have to say is when you venture out in to the Windows world Apple, where the market share is at 90% you are not protected by your small margins anymore.

Tags: , , , , , , ,

Posted in Programming, Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | 1 Comment »

June 4th, 2007

Ubuntu fans, I don’t mean to gloat butt…

I don’t usually like to post about when one of my predictions come true, butt… Many people told me I was flat out wrong about the support differences between Ubuntu and Vista and there is really a “Microsoft Tax”. However just as I told everybody the Dell/Ubuntu joint venture all seems to be a PR stunt backed up by this Digg Link.

Tags: , ,

Posted in Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

June 2nd, 2007

DRM-Free Doesn’t Equal License Free

Last week Apple released iTunes Plus. Which is a higher quality download with no DRM for $1.29 US. However many people in the blogo-sphere have interpreted DRM-Free as being privacy in your purchase. However this is totally wrong way of looking at DRM:

Digital rights management (DRM) is an umbrella term referring to technologies used by publishers or copyright owners to control access to or usage of digital data or hardware, and to restrictions associated with a specific instance of a digital work or device. The term is often confused with copy protection and technical protection measures, which refer to technologies that control or restrict the use and access of digital content on electronic devices with such technologies installed, acting as components of a DRM design.

In fact DRM-Free is exactly what it means you are free to do with the song what you like but your purchase is still registered as being your purchase. A better way to think of Apple iTunes Plus program is the same way you think of the DMV, you are free to use your car however you want, no body is restricting you from loaning your car to your friend or where you can drive it and how far. Even though your car is your property free and clear of any rules, you still have to license the car, and register the VIN with the DMV. Also the license plate on the car is only checked if you are committing a crime. In the same respects Apple is no longer telling you how many times you can burn your song, or how many iPods it can be placed on, or who you can lend the song too, but the registration of the song still needs to be licensed with iTunes. They are only going to check the license if you are committing a crime with the song such as violating the EULA, which I am pretty sure includes posting to a P2P site.

So before everybody starts getting hot under the collar about your information showing up in the song you licensed from iTunes and EMI, just sit back and think for a second, about how much this doesn’t effect you. Essentially the song is there for you to share with all your friends just like a CD or anything else, however if you start posting the song publicly which is the same as playing a CD in a large venue you have violated the license agreement of your purchase and you should pay the price.

I personally congratulate Apple for taking this critical step for having a DRM free world.

Tags: , , ,

Posted in Rant | kick it on DotNetKicks.com | Bookmark | View blog reactions | No Comments »

June 1st, 2007

Less Rules Imposed The Better

Recently I read an article from Jeff Atwood, where he basically claimed the brevity leads to better code. Personally I think his example he gave:

if (s == String.Empty)
if (s == "")

Is just plain wrong, and this is the comment I put on his website:

I think this is a very bad example using “” and String.Empty. Because essentially “” is a magic number of sorts, I am talking totally theoretical here, I know that “” is never going to change from representing a empty string, but what happens when developers start using “\n\r” instead of Environment.NewLine, not only does it cause a problem if you move to Mono on Linux it also requires a higher knowledge level to understand what “\n\r” means and you even have to remember what order it goes in.

It is good practice to get developers thinking that magic values such as “” and “\n\r” and any number is not the right way to code. Because if you tell them it is okay to use “” then why is it not okay to use 3.14F for PI instead of using Math.Pi?

It’s all about staying consistent and having the least amount of rules as possible, that is how you keep code simple across your organization.

Also by your same logic a developer should never use VB.NET because the language is way to verbose. I personally am a C# developer, but if a person is more productive in VB.NET and it meets the requirements for the project who am I to tell them they should use C# because it is less verbose.

Tags: ,

Posted in C#, Programming | kick it on DotNetKicks.com | Bookmark | View blog reactions | 2 Comments »