Category Archives: Software

Software Related Posts

Basic Authenitcation in HTTP request

To receive authorization, the client sends the userid and password,
separated by a single colon (":") character, within a base64 [7]
encoded string in the credentials.

   basic-credentials = base64-user-pass
   base64-user-pass  = 
   user-pass   = userid ":" password
   userid      = *
   password    = *TEXT

Userids might be case sensitive.

If the user agent wishes to send the userid "Aladdin" and password
"open sesame", it would use the following header field:

   Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

A client SHOULD assume that all paths at or deeper than the depth of
the last symbolic element in the path field of the Request-URI also
are within the protection space specified by the Basic realm value of
the current challenge. A client MAY preemptively send the
corresponding Authorization header with requests for resources in
that space without receipt of another challenge from the server.
Similarly, when a client sends a request to a proxy, it may reuse a
userid and password in the Proxy-Authorization header field without
receiving another challenge from the proxy server.

Link: http://www.ietf.org/rfc/rfc2617.txt

Ajax :Revelation

I have been hearing about AJAX for past few months from lot of people. So finally today I went on web to read about AJAX. HA Ha Ha Ha Ha Ha… I have been using AJAX for past 2 years in my projects and I had seen the first usage of AJAX around 2002 ending when I had visited Cordys(www.cordys.com) in Netherlands. They have web based integration framework which completely works on Asynchronous javascript and XML technology(inshort AJAX)…. I loved the concept so much that, I used the technology in my next project EPM UI(around march 2004)… It is a xml based web interface generation tool kit. I am currently using it in my current project in SAMSys for past 3 months… But if you would have asked me yesterday what was AJAX and if I knew about it I would have said “NO”…. Isn’t it funny….:):) Enjoy… It is great technology everyone should read about it.

Some good links…
http://en.wikipedia.org/wiki/AJAX
http://developer.mozilla.org/en/docs/AJAX:Getting_Started
http://java.sun.com/developer/technicalArticles/J2EE/AJAX/index.html?cid=59754

Comparison of Java and Python….

I found a great article on performance comparison of java and python. Here are the details.. Java is fast… Here is the link to the page and also the content…. You can access the original mailing list article at

http://groups.google.com/group/comp.lang.python/browse_thread
/thread/f7e8b7a2b4b533fe/ebf2a2f70e730eae%23ebf2a2f70e730eae?sa=X&oi=groupsr&start=0&num=3

I was worried the email list from the group maybe purged some day and this is really good stuff so I copied it here I hope this is not a issue….:(
—————–Email Details——————
Java vs Python Benchmarks: Java is faster
Messages 1 – 25 of 27 in topic – view as tree Newer ร‚ยป
Bryan Jan 31 2002, 10:08 am show options

Newsgroups: comp.lang.python
From: Bryan – Find messages by this author
Date: Thu, 31 Jan 2002 09:06:52 -0500
Local: Thurs, Jan 31 2002 10:06 am
Subject: Java vs Python Benchmarks: Java is faster
Reply to Author Forward Print Individual Message Show original Report Abuse

For what it is worth to people, I have taken the liberty of benchmarking
the new Java SDK ( 1.4.0 ) against Python 2.1 and 2.2. The tests originate
from:

http://www.twistedmatrix.com/users/glyph/rant/python-vs-java.html

Point form Summary:

– Java has improved its Standard Output
– Java has improved its Hash table implementation
– Java has improved its IO routines
– Java has improved its Object Allocation

– Python has improved its Native methods
– Python has improved its interpreter speed
– Python allocates objects 57 times slower than java

– Both Python and Java have increased their interpreter initialization
times, but Python has done so by a much smaller margin.

Interesting differences between Python 2.1 and 2.2:

– I/O is slower in 2.2
– List and Hash are slightly improved in 2.2
– Object allocation shows slight improvement
– Interpreter intialization time has doubled in 2.2

The Results (fixed-font, space-formatted):

JDK 1.4.0 vs Python on an 800Mhz Pentium 3, 512 MB RAM,
Unloaded linux 2.4.8 i686 system, no X-Windows, few daemons.
Internet: 400 KB/s Down, 15 KB/s up. Results are an average of 10 tests.

Java2 Python 2.1 Summary
—– ———- ——-
ConsoleTest 12.34 8.3 Python is 1.4 times faster
HashTest 0.98 2.14 Java is 2.18 times faster
IOTest 2.63 10.25 Java is 3.8 times faster
ListTest 0.65 2.95 Java is 4.5 times faster
NativeTest 1.40 2.29 Java is 1.6 times faster
NoTest 0.34 0.02 Python is 17 times faster
ObjectTest 1.10 62.79 Java is 57 times faster
SpeedTest 0.34 0.64 Java is 1.8 times faster
URLTest 14.53 13.69 Python and Java are equivalent*

Java2 Python 2.2 Summary
—– ———- ——-
ConsoleTest 12.34 8.72 Python is 1.4 times faster
HashTest 0.98 2.1 Java is 2.14 times faster
IOTest 2.63 11.63 Java is 4.4 times faster
ListTest 0.65 2.71 Java is 4.16 times faster
NativeTest 1.40 2.26 Java is 1.6 times faster
NoTest 0.34 0.04 Python is 8.5 times faster
ObjectTest 1.10 61.71 Java is 56.1 times faster
SpeedTest 0.34 0.63 Java is 1.8 times faster
URLTest 14.53 14.71 Python and Java are equivalent*

* The slight discrepancies are most likely due to network fluctuations.

As a side note, I am very much a python proponent. Speed is not everything,
otherwise we would still be coding in straight machine language ๐Ÿ™‚ If this
serves to debunk one pythoneer’s baseless comments on the slow speed of
Java ( as it did to me ) then it has served its purpose.

Happy coding,

Bryan Mongeau
http://www.eevolved.com/bryan

“Imagination is more important than knowledge.”– Einstein

Coding Standards…

I have not got time to continue on my design patterns series will add more later.. Today we started discussing about some coding standards in the organization. So here are some good links on coding standards.

C/C++
http://www.doc.ic.ac.uk/lab/cplus/c++.rules/
http://www.joelonsoftware.com/articles/Wrong.html

Java
http://java.sun.com/docs/codeconv/html/CodeConventions.doc6.html

C#
http://www.peterprovost.org/archive/2003/07/27/634.aspx
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=336
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/seccodeguide.asp