RSS

Monthly Archives: March 2011

Internet Coookies

Most of the press articles and many simple books define cookies as-

“Cookies are programs that Web sites put on your hard disk. They sit on your computer gathering information about you and everything you do on the Internet, and whenever the Web site wants to it can download all of the information the cookie has collected.”
The problem is, none of that information is correct. Cookies are not programs, and they cannot run like programs do. Therefore, they cannot gather any information on their own. Nor can they collect any personal information about you from your machine.
Here is a valid definition of a cookie: A cookie is a piece of text that a Web server can store on a user’s hard disk. Cookies allow a Web site to store information on a user’s machine and later retrieve it. The pieces of information are stored as name-value pairs.
Most Internet cookies are incredibly simple, but they are one of those things that have taken on a life of their own. Cookies started receiving tremendous media attention back in 2000 because of Internet privacy concerns, and the debate still rages.
On the other hand, cookies provide capabilities that make the Web much easier to navigate. The designers of almost every major site use them because they provide a better user experience and make it much easier to gather accurate information about the site’s visitors.
In this article, we will take a look at the basic technology behind cookies, as well as some of the features they enable.
If you use Microsoft’s Internet Explorer to browse the Web, you can see all of the cookies that are stored on your machine. The most common place for them to reside is in a directory called c:windowscookies. When I look in that directory on my machine, I find 165 files. Each file is a text file that contains name-value pairs, and there is one file for each Web site that has placed cookies on my machine.
You can see in the directory that each of these files is a simple, normal text file. You can see which Web site placed the file on your machine by looking at the file name (the information is also stored inside the file). You can open each file by clicking on it.
The vast majority of sites store just one piece of information — a user ID — on your machine. But a site can store many name-value pairs if it wants to.
A name-value pair is simply a named piece of data. It is not a program, and it cannot “do” anything. A Web site can retrieve only the information that it has placed on your machine. It cannot retrieve information from other cookie files, nor any other information from your machine.

How does cookie data move?

As you saw in the previous section, cookie data is simply name-value pairs stored on your hard disk by a Web site. That is all cookie data is. The Web site stores the data, and later it receives it back. A Web site can only receive the data it has stored on your machine. It cannot look at any other cookie, nor anything else on your machine.
The data moves in the following manner:

  • If you type the URL of a Web site into your browser, your browser sends a request to the Web site for the page (see How Web Servers Work for a discussion). For example, if you type the URL http://www.amazon.com into your browser, your browser will contact Amazon’s server and request its home page.
  • When the browser does this, it will look on your machine for a cookie file that Amazon has set. If it finds an Amazon cookie file, your browser will send all of the name-value pairs in the file to Amazon’s server along with the URL. If it finds no cookie file, it will send no cookie data.
  • Amazon’s Web server receives the cookie data and the request for a page. If name-value pairs are received, Amazon can use them.
  • If no name-value pairs are received, Amazon knows that you have not visited before. The server creates a new ID for you in Amazon’s database and then sends name-value pairs to your machine in the header for the Web page it sends. Your machine stores the name-value pairs on your hard disk.
  • The Web server can change name-value pairs or add new pairs whenever you visit the site and request a page.

There are other pieces of information that the server can send with the name-value pair. One of these is an expiration date. Another is a path (so that the site can associate different cookie values with different parts of the site).
You have control over this process. You can set an option in your browser so that the browser informs you every time a site sends name-value pairs to you. You can then accept or deny the values.

How do Web sites use cookies?

Cookies evolved because they solve a big problem for the people who implement Web sites. In the broadest sense, a cookie allows a site to store state information on your machine. This information lets a Web site remember what state your browser is in. An ID is one simple piece of state information — if an ID exists on your machine, the site knows that you have visited before. The state is, “Your browser has visited the site at least one time,” and the site knows your ID from that visit.
Web sites use cookies in many different ways. Here are some of the most common examples:

  • Sites can accurately determine how many people actually visit the site. It turns out that because of proxy servers, caching, concentrators and so on, the only way for a site to accurately count visitors is to set a cookie with a unique ID for each visitor. Using cookies, sites can determine:
    • How many visitors arrive
    • How many are new versus repeat visitors
    • How often a visitor has visited
  • The way the site does this is by using a database. The first time a visitor arrives, the site creates a new ID in the database and sends the ID as a cookie. The next time the user comes back, the site can increment a counter associated with that ID in the database and know how many times that visitor returns.
  • Sites can store user preferences so that the site can look different for each visitor (often referred to as customization). For example, if you visit msn.com, it offers you the ability to “change content/layout/color.” It also allows you to enter your zip code and get customized weather information. When you enter your zip code, the following name-value pair gets added to MSN’s cookie file:
  • WEAT  CC=NC%5FRaleigh%2DDurham&REGION=  www.msn.com/
  • Since I live in Raleigh, N.C., this makes sense.
  • Most sites seem to store preferences like this in the site’s database and store nothing but an ID as a cookie, but storing the actual values in name-value pairs is another way to do it (we’ll discuss later why this approach has lost favor).
  • E-commerce sites can implement things like shopping carts and “quick checkout” options. The cookie contains an ID and lets the site keep track of you as you add different things to your cart. Each item you add to your shopping cart is stored in the site’s database along with your ID value. When you check out, the site knows what is in your cart by retrieving all of your selections from the database. It would be impossible to implement a convenient shopping mechanism without cookies or something like them.

­ In all of these examples, note that what the database is able to store is things you have selected from the site, pages you have viewed from the site, information you have given to the site in online forms, etc. All of the information is stored in the site’s database, and in most cases, a cookie containing your unique ID is all that is stored on your computer.

Problems with Cookies

Cookies are not a perfect state mechanism, but they certainly make a lot of things possible that would be impossible otherwise. Here are several of the things that make cookies imperfect.

  • People often share machines – Any machine that is used in a public area, and many machines used in an office environment or at home, are shared by multiple people. Let’s say that you use a public machine (in a library, for example) to purchase something from an online store. The store will leave a cookie on the machine, and someone could later try to purchase something from the store using your account. Stores usually post large warnings about this problem, and that is why. Even so, mistakes can happen. For example, I had once used my wife’s machine to purchase something from Amazon. Later, she visited Amazon and clicked the “one-click” button, not realizing that it really does allow the purchase of a book in exactly one click.
  • On something like a Windows NT machine or a UNIX machine that uses accounts properly, this is not a problem. The accounts separate all of the users’ cookies. Accounts are much more relaxed in other operating systems, and it is a problem.
  • If you try the example above on a public machine, and if other people using the machine have visited HowStuffWorks, then the history URL may show a very long list of files.
  • Cookies get erased – If you have a problem with your browser and call tech support, probably the first thing that tech support will ask you to do is to erase all of the temporary Internet files on your machine. When you do that, you lose all of your cookie files. Now when you visit a site again, that site will think you are a new user and assign you a new cookie. This tends to skew the site’s record of new versus return visitors, and it also can make it hard for you to recover previously stored preferences. This is why sites ask you to register in some cases — if you register with a user name and a password, you can log in, even if you lose your cookie file, and restore your preferences. If preference values are stored directly on the machine (as in the MSN weather example above), then recovery is impossible. That is why many sites now store all user information in a central database and store only an ID value on the user’s machine.
  • If you erase your cookie file for HowStuffWorks and then revisit the history URL in the previous section, you will find that HowStuffWorks has no history for you. The site has to create a new ID and cookie file for you, and that new ID has no data stored against it in the database. (Also note that the HowStuffWorks Registration System allows you to reset your history list whenever you like.)
  • Multiple machines – People often use more than one machine during the day. For example, I have a machine in the office, a machine at home and a laptop for the road. Unless the site is specifically engineered to solve the problem, I will have three unique cookie files on all three machines. Any site that I visit from all three machines will track me as three separate users. It can be annoying to set preferences three times. Again, a site that allows registration and stores preferences centrally may make it easy for me to have the same account on three machines, but the site developers must plan for this when designing the site.
  • If you visit the history URL demonstrated in the previous section from one machine and then try it again from another, you will find that your history lists are different. This is because the server created two IDs for you, one on each machine.

There are probably not any easy solutions to these problems, except asking users to register and storing everything in a central database.

Cookies on the Internet: Privacy Issues

If you have read the article to this point, you may be wondering why there has been such an uproar in the media about cookies and Internet privacy. You have seen in this article that cookies are benign text files, and you have also seen that they provide lots of useful capabilities on the Web.
There are two things that have caused the strong reaction around cookies:

  • The first is something that has plagued consumers for decades. Let’s say that you purchase something from a traditional mail order catalog. The catalog company has your name, address and phone number from your order, and it also knows what items you have purchased. It can sell your information to others who might want to sell similar products to you. That is the fuel that makes telemarketing and junk mail possible.
  • On a Web site, the site can track not only your purchases, but also the pages that you read, the ads that you click on, etc. If you then purchase something and enter your name and address, the site potentially knows much more about you than a traditional mail order company does. This makes targeting much more precise, and that makes a lot of people uncomfortable.
  • Different sites have different policies. HowStuffWorks has a strict privacy policy and does not sell or share any personal information about our readers with any third party except in cases where you specifically tell us to do so (for example, in an opt-in e-mail program). We do aggregate information together and distribute it. For example, if a reporter asks me how many visitors HowStuffWorks has or which page on the site is the most popular, we create those aggregate statistics from data in the database.
  • The second is unique to the Internet. There are certain infrastructure providers that can actually create cookies that are visible on multiple sites. DoubleClick is the most famous example of this. Many companies use DoubleClick to serve banner ads on their sites. DoubleClick can place small (1×1 pixels) GIF files on the site that allow DoubleClick to load cookies on your machine. DoubleClick can then track your movements across multiple sites. It can potentially see the search strings that you type into search engines (due more to the way some search engines implement their systems, not because anything sinister is intended). Because it can gather so much information about you from multiple sites, DoubleClick can form very rich profiles. These are still anonymous, but they are rich.
  • DoubleClick then went one step further. By acquiring a company, DoubleClick threatened to link these rich anonymous profiles back to name and address information — it threatened to personalize them, and then sell the data. That began to look very much like spying to most people, and that is what caused the uproar.
  • DoubleClick and companies like it are in a unique position to do this sort of thing, because they serve ads on so many sites. Cross-site profiling is not a capability available to individual sites, because cookies are site specific.
Advertisements
 
 

Top 10 Computer Viruses

No. 01 – Storm Virus

Storm gets its name from the trap that is its method of infection.Starting in early 2007, users began receiving emails with the subject line, “230 dead as storm batters Europe,” and a link to the story.Don’t click! No! You’ve instead been led to an infected site, and you’re now downloading the virus, like it or not.The Storm headlines changed to suit the news, but the virus stayed just as dangerous, infecting as many as a million computers and recruiting them into its botnet. What’s more, Storm has gotten sneakier over time, sending out emails that appear to be from tech support saying to click on a link for a security upgrade (quite the contrary) or sending links to online fishing or  even an ecard.To this day, it remains a major security risk and continues to spread in new ways, including via links inserted into blog postings and bulletin boards. Watch out.

No. 02 – Sasser Virus

The Sasser worm was a destructive beast when it hit in 2004, counting big targets such as the British Coast Guard (which lost its mapping capabilities), Agence France-Presse (which lost its satellite communications) and Delta Airlines (which had to cancel flights when their computer system went down).Universities, hospitals and large corporations all reported infections that caused computers to repeatedly crash. So, who was responsible for this large-scale act of cyberterror? A rogue cell? An unfriendly government? How about a 17-year-old German kid? Bingo.Thanks to his young age, Sven Jaschan served no jail time. He was, however, sentenced to 21 months probation and some community service.

No. 03 – Nimda Virus

Nimda (that’s “admin” spelled backward) hit the virus scene in 2001 and quickly (very quickly) rose to the top.In just 22 minutes, Nimda went from a nothing to being the most widespread computer virus on Earth. How?It spread via email, via Web sites, via server vulnerabilities. It pretty much had all the bases covered. It even used some old backdoors opened up by past viruses to get into servers and muck up Internet traffic.As for the fear factor, Nimda had great timing, hitting just a week or so after the Sept. 11 attacks and prompting fear that it was the first in a new wave of Al Qaeda cyberterror attacks.Those fears turned out to be unfounded and, while a few networks may have crashed, our Internet infrastructure is still standing today.

No. 04 – Melissa Virus

Melissa was a new virus for a new age: the email age. Forget floppies, this one was among the first to spread via the dreaded email attachment. It also pioneered the art of breaking into your address book and sending itself to all your contacts. The virus would arrive via an innocent-looking email that told you to open a document … and why would you open a document from a stranger? You wouldn’t. Remember the whole address book thing? So, when you got an email from, say, your boss, telling you “Here is that document you asked for,” there’s a pretty good chance you might open it. Whoops.

No. 05 – Code Red I and II Computer Viruses

The Code Red viruses were very, very sneaky worms.They didn’t require you to do anything to become infected (you didn’t need to open an attachment or download a file); all it took was an active Internet connection for the virus to take advantage of a flaw in the Windows operating system. And what did the viruses do?Well, for one, they turned your computer into a slave, letting someone offsite operate it remotely. That means they could steal what was on your computer or even use your computer to do some bad things…like, say, overloading the White House computers by telling all the infected computers to contact its address.Luckily, the government was able to shift to another address to escape the attack, but other servers weren’t so lucky. In the end, over 200,000 servers were hit by the Code Red virus in 2001.

No. 06 – Morris Computer Virus

The Morris worm started as an experiment, insists Robert Tappan Morris, who in 1988 was a Cornell graduate student.He distributed the worm in an attempt to gauge how big the then-infant Internet was, but things kind of got out of control from there. The worm spread to some 6,000 university and government computers, slowing them down (and occasionally causing them to crash) as it copied itself (often numerous times on one machine) and spread.Morris was convicted and fined, but served no time for his little research project. Today, he’s a professor at MIT. Let’s hope his students have learned from their professor’s mistakes.

No. 07 – ILOVEYOU Virus

The ILOVEYOU virus went for the heart, hoping you’d take a chance and open an attachment labeled as a love letter.Really? People fell for this? Yes.As many as 10 percent of all Internet-connected computers were infected at the virus’s peak in 2000.The virus spread through the email attachments, but it also replicated itself on a computer’s hard drive, directing the computer to download a password-stealing application from the Internet. Worldwide damage estimates were in the billions of dollars. All for love, right? Yeah, not so much.

No. 08 – Brain Computer Virusr

Brain may not have been the most sophisticated virus, but in 1986 it was the first to really target PCs, via Microsoft’s then-dominant DOS operating system.The virus ate up a huge chunk of memory and caused computers to display a message warning that they had been infected.It even told them whom they should call to get disinfected: a couple of brothers in Pakistan. Those brothers, the original developers, claim they weren’t trying to cause so much trouble; they created the virus as a means of copy protection for their medical software…but then someone else came along and copied that bit of code and the brothers got more than they had bargained for, with pleas for disinfection coming from around the world.The moral of the story? Be careful what you program.

No. 09 – Conficker

What made Conficker so huge, when it hit in late 2008, was the mystery surrounding it. Ooooh, Conficker.It had a scary-sounding name and, even scarier, it wasn’t really doing anything…yet.Conficker was assembling an army of computers, called a botnet, but no one was sure where the battle would be.The virus was telling the infected computers, now potentially zombies, to contact specific sites on certain days…was it to obtain further instructions? Their orders? Who knows?Most companies and governments installed security patches to protect their computer systems, but some infected machines remain out there, still part of the army.In theory, they’re still ready to serve if Conficker calls.

No. 10 – Elk Cloner

Remember Apple II computers? They were common in school classrooms in the 1980s…which is fitting, because this early virus, perhaps the first to target personal computers, was designed for Apple IIs and written by a high-school kid.Richard Skrenta was a ninth-grader in 1982 when he wrote the virus, which caused infected computers to display a poem every 50th time they booted up.That’s it, just a poem (ah, we were so innocent back then). Because Elk Cloner was a boot sector virus, it infected any floppy disk that was placed in the computer…which in turn infected other computers.By now, that kind of stuff is a given, but in 1982, it was groundbreaking.

 
1 Comment

Posted by on March 29, 2011 in Computer Enggineering, Tech

 

Depression Part 4

Bipolar Disorder

What is bipolar disorder?

Bipolar disorder is an illness that causes extreme mood changes from manic episodes of very high energy to the extreme lows of depression. It is also called manic-depressive disorder.

This illness can cause behavior so extreme that you cannot function at work, in family or social situations, or in relationships with others. Some people with bipolar disorder become suicidal.

Having this disorder can make you feel helpless and hopeless. But you are not alone. Talking with others who suffer from it may help you learn that there is hope for a better life. And treatment can help you get back in control.

Family members often feel helpless when a loved one is depressed or manic. If your loved one has bipolar disorder, you may want to get counseling for yourself. Therapy can also help a child who has a bipolar parent.

What causes bipolar disorder?

The cause of bipolar disorder is not completely understood. We know that it runs in families. It may also be affected by your living environment or family situation. One possible cause is an imbalance of chemicals in the brain.

What are the symptoms?

The symptoms depend on your mood swings. In a manic episode, you may feel very happy, energetic, or on edge. You may feel like you need very little sleep. You may feel overly self-confident. Some people spend a lot of money or get involved in dangerous activities when they are manic.

After a manic episode, you may return to normal, or your mood may swing in the opposite direction to feelings of sadness, depression, and hopelessness. When you are depressed, you may have trouble thinking and making decisions. You may have memory problems. You may lose interest in things you have enjoyed in the past. You may also have thoughts about killing yourself.

The mood swings of bipolar disorder can be mild or extreme. They may come on slowly over several days or weeks or suddenly over a few minutes or hours. The mood swings may last for a few hours or for several months.

How is bipolar disorder diagnosed?

Bipolar disorder is hard to diagnose. There are no lab tests for it. Instead, your doctor or therapist will ask detailed questions about what kind of symptoms you have and how long they last. To be diagnosed with bipolar I disorder, you must have had a manic episode lasting at least a week (less if you had to be hospitalized). During this time, you must have had three or more symptoms of mania, such as needing less sleep, being more talkative, behaving wildly or irresponsibly in activities that could have serious outcomes, or feeling as if your thoughts are racing. In bipolar II disorder, the manic episode may be less severe and shorter.

Your urine and blood may be tested to rule out other problems that could be causing your symptoms.

How is it treated?

The sooner bipolar disorder is identified and treated, the better your chances of getting it under control. One of the most important parts of dealing with a manic episode is recognizing the early warning signs so that you can start treatment early with medicine that is especially for manic phases.

Many medicines are used to treat bipolar disorder. You may need to try several before you find the right combination that works for you.

  • Most people with bipolar disorder need to take a medicine called a mood stabilizer every day.
  • Medicines called antipsychotics can help get a manic phase under control.
  • Antidepressants are used carefully for episodes of depression, because they cause some people to move into a manic phase.

People often have to try several different medicines before finding what works for them. Regular checkups are important so that your doctor can tell if your treatment is working.

Counseling for you and your family is also an important treatment. It can help you cope with some of the work and relationship issues that your illness may cause.

Charting your mood is one way you can start to see your patterns and symptoms. Keep a notebook of your feelings and what brought them on. If you learn what triggers your mood swings, you may be able to avoid them sometimes.

People often stop taking their medicines during a manic phase because they feel good. But this is a mistake. You must take your medicines regularly, even if you are feeling better.

Who is affected by bipolar disorder?

Over 3 million Americans—about 1% of the population, or 1 out of 100 people—have bipolar disorder, with similar rates in other countries.1 Bipolar disorder occurs equally among males and females. It often begins between the ages of 15 and 24.

 

Other Mood Disorders

Some mental health conditions are related to, or occur with, clinical depression. Here are a few of the most common.

Dysthymia
You may have this common mood disorder if you experience a less severe degree of the symptoms of major depression for more than two years.

Obsessive-compulsive disorder (OCD)
If you have intrusive thoughts or exhibit compulsive behavior, such as excessive hand-washing, read about OCD here.

Post-traumatic stress disorder (PTSD)
If you experience panic, depression, or anxiety after a traumatic event, you may have PTSD. Seek professional help as soon as possible.

Premenstrual dysphoric disorder (PMDD)
If you’re a woman who has severe mood swings before your period, you might have PMDD. It can be treated.

Seasonal affective disorder (SAD)
If you feel tired, depressed, or anxious during the winter, you may be experiencing SAD.

 
1 Comment

Posted by on March 15, 2011 in Depression, Health

 

Depression Part 3

Postpartum Depression

What is postpartum depression?

Postpartum depression is a serious illness that can occur in the first few months after childbirth. It also can happen after miscarriage and stillbirth.

Postpartum depression can make you feel very sad, hopeless, and worthless. You may have trouble caring for and bonding with your baby.

Postpartum depression is not the “baby blues,” which many women have in the first couple of weeks after childbirth. With the blues, you may have trouble sleeping and feel moody, teary, and overwhelmed. You may have these feelings along with being happy about your baby. But the “baby blues” usually go away within a couple of weeks. The symptoms of postpartum depression can last for months.

In rare cases, a woman may have a severe form of depression called postpartum psychosis. She may act strangely, see or hear things that aren’t there, and be a danger to herself and her baby. This is an emergency, because it can quickly get worse and put her or others in danger.

It’s very important to get treatment for depression. The sooner you get treated, the sooner you’ll feel better and enjoy your baby.

What causes postpartum depression?

Postpartum depression seems to be brought on by the changes in hormone levels that occur after pregnancy. Any woman can get postpartum depression in the months after childbirth, miscarriage, or stillbirth.

You have a greater chance of getting postpartum depression if:

  • You’ve had depression or postpartum depression before.
  • You have poor support from your partner, friends, or family.
  • You have a sick or colicky baby.
  • You have a lot of other stress in your life.

You are more likely to get postpartum psychosis if you or someone in your family has bipolar disorder (also known as manic-depression).

What are the symptoms?

A woman who has postpartum depression may:

  • Feel very sad, hopeless, and empty. Some women also may feel anxious.
  • Lose pleasure in everyday things.
  • Not feel hungry and may lose weight. (But some women feel more hungry and gain weight).
  • Have trouble sleeping.
  • Not be able to concentrate.

These symptoms can occur in the first day or two after the birth. Or they can follow the symptoms of the baby blues after a couple of weeks.

If you think you might have postpartum depression, fill out this postpartum depression checklist Click here to view a form. (What is a PDF document?) . Take it with you when you see your doctor.

A woman who has postpartum psychosis may feel cut off from her baby. She may see and hear things that aren’t there. Any woman who has postpartum depression can have fleeting thoughts of suicide or of harming her baby. But a woman with postpartum psychosis may feel like she has to act on these thoughts.

How is postpartum depression diagnosed?

Your doctor will do a physical exam and ask about your symptoms.

Be sure to tell your doctor about any feelings of baby blues at your first checkup after the baby is born. Your doctor will want to follow up with you to see how you are feeling.

How is it treated?

Postpartum depression is treated with counseling and antidepressant medicines. Women with milder depression may be able to get better with counseling alone. But many women need counseling and medicine. Some antidepressants are thought to be safe for women who breast-feed.

To help yourself get better, make sure you eat well, get some exercise every day, and get as much sleep as possible. Seek support from family and friends if you can.

Try not to feel bad about yourself for having this illness. It doesn’t mean you’re a bad mother. Many women have postpartum depression. It may take time, but you can get better with treatment.

 
Leave a comment

Posted by on March 15, 2011 in Depression, Health

 
 
%d bloggers like this: