March 2008 - Posts

Windows Fake URL test [hosts file]
Sunday, March 09, 2008 5:33 AM

you can make your application respond with a different behavior based on requested URL, This can be as simple as showing a different logo or as sophisticated as filtering data by that requested domain

this is not such a big implementation problem, but it seems hard to test that is if you don't know how to fake that URL request on your localhost

well

there's a file in this path on a windows environment

%windir%\system32\drivers\etc\hosts

this file contains the definition of the keyword "localhost"

   1: # Copyright (c) 1993-1999 Microsoft Corp.
   2: #
   3: # This is a sample HOSTS file used by Microsoft TCP/IP  for Windows.
   4: #
   5: # This file contains the mappings of IP addresses to  host names. Each
   6: # entry should be kept on an individual line. The IP  address should
   7: # be placed in the first column followed by the  corresponding host name.
   8: # The IP address and the host name should be separated  by at least one
   9: # space.
  10: #
  11: # Additionally, comments (such as these) may be  inserted on individual
  12: # lines or following the machine name denoted by a '#'  symbol.
  13: #
  14: # For example:
  15: #
  16: #      102.54.94.97     rhino.acme.com          #  source server
  17: #       38.25.63.10     x.acme.com              # x  client host
  18:  
  19: 127.0.0.1       localhost

 

this is the original contents of the file note in line 19 there's a record that states that 127.0.0.1 (which is the loopback address,, always pointing to your machine) has the alias localhost

 

so all you need to do to test a URL is add a record that states that the same IP is also your domain,

and also for subdomains you can still do the same, i'd recommend adding the subdomains before the domain itself

like this

 

   1: 127.0.0.1    mail.domain.com
   2: 127.0.0.1    user.domain.com
   3: 127.0.0.1    www.domain.com
   4: 127.0.0.1    domain.com

 

now when you browse to http://domain.com or http://user.domain.com it'll issue a request to your local Web server and using code you can redirect or display conditional content on the default website

ah.. don't forget to restart your browser after editing and also you need to be an administrator to edit this file

by amir.magdy | 2 comment(s)
Filed under:
2008 Launch Event in Egypt [heroes happen here]
Thursday, March 06, 2008 3:31 AM

on the 24th of march in Egypt

hero_event

 

register here

Internet Explorer Beta1 available for Download Now
Thursday, March 06, 2008 3:28 AM

ie8betalogo

 

here is the link  download it if u need to do testing on ur web applications, be ready.

by amir.magdy | with no comments
Filed under:
Measurement of Code Quality
Saturday, March 01, 2008 2:11 AM
there's a lot of ways to measure size of code, and Complexity of code, but up till this post there's nothing to measure the qualit of the code

it was always subjective to meaure the quality of code but after this.






sorry i had to post it, immediately after stumbling on it just now :D
by amir.magdy | 3 comment(s)
Filed under: