Hashemian Blog

Web Tools, Financial Markets, Technology

Sunday, June 24, 2007

Circumcision - Religious Child Mutilation 

If you are a male born into a Jewish or Moslem family, chances are you are circumcised. Circumcision is a euphemism for penile mutilation. I was horrified by the images I saw in this LiveLeak video taken from a Turkish ceremony where scores of young boys are gleefully taken by their parents to a butcher shop to be mutilated. It's hard to fathom what motivates a parent to even consider such a savage act against his or her own child.

Of course, no sane parent would rip out a child's arm, or sever a child's ear, but somehow this barbaric practice is tolerated and even celebrated in the name of god. A reasonable person might ask, why does god care about a man's foreskin? Aren't there more important things for god to consider than obsessing over men's penises?

Some parents would tell you that god doesn't care, they disfigure their boys as a show of respect and reverence. Others would condone it by claiming health and sanitary benefits! Of course you'd be hard pressed to find anyone who'd admit the truth; that they are fanatics and want to selfishly score a few points with god, or they are just ignorant, following a tradition that, unbeknownst to them, predates theism itself.

I have no problem with an adult deciding to mutilate himself in the name of god or whatever else. But subjecting innocent boys (and sometimes girls) to this cruel and excruciating practice is nothing short of diabolical, or at least demented.

,,

Labels: ,

<Circumcision - Religious Child Mutilation>

2 comments |

Wednesday, June 13, 2007

Apple Safari on Windows 

Safari on WindowsI'm a man of habits. That trait also extends to my browser of choice and, like many, I use Internet Explorer (IE) to surf the Web. Years ago, when the Internet was still new to the general public, it took me some time to actually start using a browser alongside my favorite text-based programs to browse the Web, read Usenet, or check email. That was the NCSA Mosaic times. Then I took my time to switch to Netscape. And I was yet again behind the curve when Microsoft joined the fray and introduced IE. For now I'm still an IE user, and true to form, I have refused to upgrade to version 7. Not that all the bad publicity has helped anyways.

I did try Opera once and saw no need for it after fiddling with it for a few days. I do use Firefox occasionally now. Not because I like it any better than IE for general browsing, but mostly to test Web pages. Firefox does have a leg up on IE in one area, the add-ons. Unlike IE, Firefox has done a superb job in designing and integrating the add-ons. They are much more straightforward to program and there's a bevy of available add-ons on the Web to choose from. Greasemonkey is one of my favorites, for example.

One browser I wished I could have was Apple's safari. That is the browser of choice for most Apple junkies, but until now it was out of the Windows' realm - Until now. Apple finally released a version (public beta 3) and, true to their claims, it is faster than either IE or Firefox. The speed was even evident during the installation process. It has a relatively small installation file and the setup process was fast.

Safari for Windows is a no-frills browser. It's lightweight and doesn't have a lot of bells and whistles. It does have an Apple-ish look, but after browsing to several sites I could confirm that their claim of being speedy is for real. I didn't clock its rendering speed, but it did feel faster than its other two popular counterparts. The configuration is a bit clunky and bears some resemblance to Firefox (must be the Mozilla heritage) and the fonts are a bit rough, but it performs magnificently. I was impressed.

Having Safari available on Windows is also a boon to site designers who need to check their pages for browser compatibility. One of the pages I tested was the JavaScript Countdown page on this site. There were some complaints of Safari incompatibility from some of the users. I was prepared to see a broken counter, but to my surprise the page loaded just fine, counter and all. That left me wondering whether there were differences between the Windows and Apple versions. Since I don't have access to an Apple, I am going to tentatively declare that the countdown utility is Safari compatible.

Safari won't unseat IE for me as the browser of choice for general browsing, but if you are in the market for a lightweight and speedy browser, this could be the one. But even if not, it's a valuable tool for Web designers toiling on Windows to achieve maximum browser compatibility for their pages.

If you want to download the browser, here's the link: Safari for Windows.

,,,,,,

Labels: ,

<Apple Safari on Windows>

0 comments |

Thursday, June 07, 2007

HTTP Authorization and .NET WebRequest, WebClient Classes 

One of the more useful, yet simple, classes of .NET is System.Net.WebClient. It basically simulates a simple browser to interact with web pages within your code. You can use it to GET pages or POST data to pages over http or https (SSL). The page response can be saved into a byte array, a string or a file. WebClient can even be used to pass authentication values to pages that require it, you know, those pages that pop up a user and password window before letting you in. For that, you’d supply the values to the Credentials property of WebClient and fire away.

Recently I was trying to access a protected page using WebClient. The code was pretty straightforward:
WebClient wc=new WebClient();
wc.Credentials=new NetworkCredentials("user","pass");
string a=ws.DownloadString("http://www.example.com");
Pretty simple, eh? I've done this a million times, but in this case (the actual site shall remain nameless) it was throwing an exception. After some investigation, I noticed that the page was returning a 404 code (page not found) prompting the exception error. I also discovered that the call wasn't sending the appropriate Authorization header to the page. The site's documentation was clear about accessing the page using basic authorization header, but there was no getting past the exception. What was going on here?

After some fruitless troubleshooting, I decided to forego the Credentials property and manually craft the Authorization header. To do that I wrote the following code:
WebClient wc=new WebClient();
wc.Headers.Add("Authorization","Basic "+
  Convert.ToBase64String(
  Encoding.ASCII.GetBytes("user:pass")));
string a=ws.DownloadString("http://www.example.com");
This time, to my delight, the page obliged and the string variable "a" received the page's content. Not being satisfied with merely solving the problem using a different route, I decided to dig in and find out why the original (more proper) code was failing. First I discovered that the page was designed to return a 404 code rather than the customary 401 (Not Authorized) when the credentials were missing.

I'm not sure what the RFC's position on this is, but according to MSDN documentation, when a protected URL receives no authorization header from a client, it should return a 401 code, signaling to the client that authentication is required. The client should then provide the authorization header with each access, satisfying the URL's demand. The WebClient class with its Credentials property is designed to do just that, but not in a straightforward manner.

Under the hood, WebClient constructs a HtttpWebRequest object and sends a plain request to the specified page. Upon receiving a 401 code, it crafts the authorization header using the Credentials property and hits the page again. That's two round trips for every request. Worse yet, it does that for every subsequent request. I fail to see why WebClient insists on not sending the authorization header in the first place. After all, if the coder specifies the Credentials property, he must already know that the page requires authorization and WebClient should just obey and send in the header without the fuss.

In this case, the site's response aggravated matters by sending back a 404 (rather than a 401) after the first request, sending the whole process into a tailspin and causing an exception to be raised.

If you use the WebClient class in your .NET code to access protected URLs, watch out for this little stumper. It wasted quite a bit of my time. Maybe my loss will be your gain.

,,,,,,,,

Labels: ,

<HTTP Authorization and .NET WebRequest, WebClient Classes>

1 comments |

Sunday, June 03, 2007

Healthcare and Blood Test 

With the political party debates getting under way leading to the US presidential election, the subject of national healthcare has once again garnered some attention. In the last go-around, with the male Clinton in the office, national health insurance became a hot topic but was eventually shelved. It is a known fact that the US is the only industrialized country in the world with no national health coverage and many of its citizens have little or no health benefits. Worse yet, there are no meaningful regulations to even protect the working class. That leaves the entire nation's health at the mercy of the market conditions.

Judging by my latest experience I understand why healthcare is such a controversial topic in this country. Recently my company switched our health insurance provider to Oxford. During the introductory meeting, the Oxford representatives repeatedly emphasized that Qwest Diagnostics was no longer a covered provider and we were to use LabCorp for all medical tests to receive any coverage. It was explained that LabCorp was selected because of their superior service to patients. But it was obvious that there had been a fierce showdown between Oxford and Qwest over money and in a retaliatory move Oxford had dropped Qwest as a covered lab. The animosity between the two was blatantly palpable.

To me this was a non-issue. I have no allegiance to Qwest and In my latest visit for a regular blood work I saw little difference between LabCorp and Qwest. What struck me was the bill I received from LabCorp a few weeks later. The actual cost of the blood test was $271.00, but it was adjusted down to $26.88. That means that by being part of the Oxford network, my final bill was discounted by a whopping 90%.

I understand negotiated rates and volume discounts, but how is it that a company charges its clients so much while it can still make a profit at a 90% discount? How could they get away with charging such an outrageous rate, when they obviously do just fine at 10% of that? If I weren't insured, I would be liable for the full $271.

I might be able to accept such disparity if this was for a luxury item, but health coverage should never be considered luxury, should it? And yet, receiving this telling bill, I can understand why uninsured people skip medical care, or buckle under their mounting medical bills. Is it fair that the wealthiest country in the world has left a large portion of its population without proper medical care and the rest at risk of losing what coverage they might have?

,,,,,,

Labels:

<Healthcare and Blood Test>

1 comments |

This page is powered by Blogger. Isn't yours?

Links
  • Hashemian Blog Feeds
  • Add to Google
  • Read Hashemian.com/blog/ with Bloglines
  • Subscribe to Hashemian.com/blog/ with My Yahoo!
  • Technorati Profile
  • TMCnet.com
  • ARCHIVES
  • 09/01/2003 - 10/01/2003
  • 03/01/2004 - 04/01/2004
  • 04/01/2004 - 05/01/2004
  • 05/01/2004 - 06/01/2004
  • 06/01/2004 - 07/01/2004
  • 07/01/2004 - 08/01/2004
  • 08/01/2004 - 09/01/2004
  • 09/01/2004 - 10/01/2004
  • 10/01/2004 - 11/01/2004
  • 11/01/2004 - 12/01/2004
  • 12/01/2004 - 01/01/2005
  • 01/01/2005 - 02/01/2005
  • 02/01/2005 - 03/01/2005
  • 03/01/2005 - 04/01/2005
  • 04/01/2005 - 05/01/2005
  • 05/01/2005 - 06/01/2005
  • 06/01/2005 - 07/01/2005
  • 07/01/2005 - 08/01/2005
  • 08/01/2005 - 09/01/2005
  • 09/01/2005 - 10/01/2005
  • 10/01/2005 - 11/01/2005
  • 11/01/2005 - 12/01/2005
  • 12/01/2005 - 01/01/2006
  • 01/01/2006 - 02/01/2006
  • 02/01/2006 - 03/01/2006
  • 03/01/2006 - 04/01/2006
  • 04/01/2006 - 05/01/2006
  • 05/01/2006 - 06/01/2006
  • 06/01/2006 - 07/01/2006
  • 07/01/2006 - 08/01/2006
  • 08/01/2006 - 09/01/2006
  • 09/01/2006 - 10/01/2006
  • 10/01/2006 - 11/01/2006
  • 11/01/2006 - 12/01/2006
  • 12/01/2006 - 01/01/2007
  • 01/01/2007 - 02/01/2007
  • 02/01/2007 - 03/01/2007
  • 03/01/2007 - 04/01/2007
  • 04/01/2007 - 05/01/2007
  • 05/01/2007 - 06/01/2007
  • 06/01/2007 - 07/01/2007
  • 07/01/2007 - 08/01/2007
  • 08/01/2007 - 09/01/2007
  • 09/01/2007 - 10/01/2007
  • 10/01/2007 - 11/01/2007
  • 11/01/2007 - 12/01/2007
  • 12/01/2007 - 01/01/2008
  • 01/01/2008 - 02/01/2008
  • 02/01/2008 - 03/01/2008
  • 03/01/2008 - 04/01/2008
  • 04/01/2008 - 05/01/2008
  • 05/01/2008 - 06/01/2008

  • Read Financial Markets  |   Home  |   Blog  |   Web Tools  |   News  |   Articles  |   FAQ  |   About  |   Contact

    © 2001-2009 Robert Vahid Hashemian
    Support the effort
    Liked this page?
    Please consider creating a link to it
    from your Web site.

    hashemian.com
    هاشمیان.com

     Home

     Blog

     Web Tools Add Free Web Tools custom Google Toolbar button (Requires Toolbar >V4)
    Usage

     News

     Articles

     FAQ

     About

     Contact

     Financial Markets Book
    Read Complete Book

    Search Amazon:  
    Amazon Logo


    Get Kindle, $259

    aStore - Hashemian.com on Amazon

    Visits: Powered by hashemian.com

     

     

     

     

     

    Search Hashemian.com



    eBay