Wednesday, May 2, 2007

Small Computer System Interface (SCSI)

I wrote a post on RAID some time back and realised that it would be better to write about my understandings of SCSI (pronounced as "skuzzy"). It is a popular interface for attaching hard-disks in computers.

Where is SCSI in desktop?

Then why dont we see it in our desktop computer? Well SCSI is a costly technology than the IDE interface and the advantages offerred by it are not very useful for a typical desktop computer at home.

Where is SCSI used then?

Well it is mainly used in high-end machines and servers like those incorporated by banks or scientific research institutes. As an example look at what IISc, Banglore is using as a file server, an IBM RS/6000 43P 260 with SSA Storage. That would be a good usage of SCSI interface.

What is SCSI?

Well SCSI was initially designed as a high-level, expandable, high-performance interface. It was not supposed to be tied up with only hard-disk, although now-adays it is thought as a hard-disk interface. But many other devices can be connected to SCSI than just hard-disk. There are various variations of SCSI protocol depending on how they developed and what features got added. The latest SCSI-3 defines a lot many different standards, each covering different aspects of SCSI.

Most of the different SCSI-3 documents fall into the following three general categories:

  • Commands: These are standards that define specific command sets for either all SCSI devices, or for particular types of SCSI devices.
  • Protocols: These standards formalize the rules by which various devices communicate and share information, allowing different devices to work together. These standards are sometimes said to describe the transport layer of the interface.
  • Interconnects: These are standards that define specific interface details, such as electrical signaling methods and transfer modes. They are sometimes called physical layer standards as well.
Full details can be found on the T10 technical committee web site.

Unique Features

l
1) Separate bus that is attached to system bus through an adapter
  • Built in controller interprets demands
  • Adapter handles the commands & does not utilize the CPU
  • Only the adapter takes up a system IRQ instead of each device (better scalability)
2) Each device can support 8 devices – thus improving scalability
3) Command queuing: Can send 256 commands on bus to SCSI device
4) The device can process commands in any order it desires
5) Frees bus for other devices and commands

Working of SCSI

  • Initiators are devices that request I/O processes
  • Targets are those devices that perform the actions requested by the initiator.
  • Each device attached to the SCSI bus may be an initiator
  • The bus is only used for transmitting data and commands
  • The transfer of data and commands occurs in eight phases
  1. Bus-Free – Checks if bus is free to use
  2. Arbitration – Bus placed in busy state; higher ID wins in contention
  3. Selection – Target states it is active too, remembers initiator for broken connections
  4. Command - 4 -7 share the data & commands
  5. Data – also termed Data In about connection and status
  6. Message – also termed Data Out information for each device
  7. Status
  8. At completion the initiator will reset the bus’ control signal to a ready state
  • During selection an intentional or error break can occur – an intentional would be for memory access which is time consuming so it frees the bus for utilization

Dis-advantages of SCSI

  • Generally more expensive, due to more complex firmware, extra testing is required, and increased performance typically costs more in the computer market.
  • Slightly more complicated to install, due to termination requirements and if one uses multiple buses.
  • Terminology and connection protocol options are overwhelming.
  • Some people point to the need to set IDs in SCSI as making it more complicated, but it's really no more complicated than choosing master/slave jumpers in IDE.

Tuesday, May 1, 2007

Google's Spam Blog Causing Trouble

Sometime back while posting on my personal finance blog I noticed the following while composing a post :

I had to enter a "Word Verification", that was indeed funny and I didn't thought about it much, and then I clicked on the '?' symbol, to find that google has marked by blog as "Spam Blog". I sent a request to unlock my blog as a non-spam blog and it took almost four days to get it unlocked and today what I find, my this blog has been marked as "Spam Blog". This is irritating.

Spam Blogs

As per google spam blogs are :

The ease of creating and updating webpages with Blogger has made it particularly prone to a form of behavior known as link spamming. Blogs engaged in this behavior are called spam blogs, and can be recognized by their irrelevant, repetitive, or nonsensical text, along with a large number of links, usually all pointing to a single site.
What the hell.... How can they claim that my blog has "irrelevant, repetitive, or nonsensical text, along with a large number of links" which is not at all true. Check for yourself.

Why should I worry?

A spam blog recognized by the google bots is done the following :
Automated spam classifying algorithms keep spam blogs out of NextBlog and out of our "Recently Published" list on the dashboard.
That means a "Spam Blog" will get less visibility than a normal blog and that is totally against the purpose of blogging. I am not sure but people who highly earn from Adsense and other such advertisement on their blog, might see a marked reduction in their earnings. Google needs to improve their "automatic spam algorithms" so that normal blogs should not be classified. A better way to fight spam blogs need to be found.

Update: I got this in the email today.... I am happy


MTB Himalaya

India's Only Mountain Cycling Adventure Race

Monday, April 30, 2007

Google Web History

I never intended to write about Google so much, but I have no choice. Here I have discovered yet another controversial thing from Google, the Google Web History. As the google help page mentions
With Web History, you can view and search across web pages you've visited in the past, including Google searches. Web History also provides interesting trends on your web activity, such as which sites you visit most frequently and what your top searches are. Finally, Web History helps deliver more personalized search results based on what you've searched for and which sites you've visited.
I didnt liked this? Do I really want to personalise my surfing to such an extent? Do I really case about what things I searched earlier? Doesn't it raise huge privacy issues? Although this web histroy has been attached with the google account, still cause me a great worry. If I see the Web Histroy of any user, isnt that give me idea about the personality of the user. It can also reveal a great deal about the preferences of a person. Web History looks like another step towards Evil Google.

Matt is trying to justify the many uses of Web History. Danny writes in detail about Web History.

Google Rougue Ads

In another news, there are cases where some links in the google sponsored ads occuring during the google search are re-directing users to malicious sites.

The way the exploit found within Google's sponsored links worked is, when someone searched on Google for "BetterBusinessBureau", for example, a list of sponsored links appeared alongside search results. If someone clicked a booby-trapped sponsored link they were the ad would redirect their browser through URLs that attempted to automatically download a virus program (MSO6-014) onto their computers before passing them along to the actual sites that were advertised.
To protect yourself you should consider downloading either XPL's Linkscanner, Scandoo's toolbar, or McAfee's SiteAdvisor, all available in free versions.

Sunday, April 29, 2007

Ultimate Guide to Productivity

Ben Yoskovitz Co-Founder of Standout Jobs has started a group writing project on Ultimate Guide to Productivity on his instigator blog.
Here are some productivity increasing guide for computer programmers (as per my experience):

Physical Stress Reliever

  • Use a comfortable chair. Dont bother much about ergonomic chair, but take one that is comfortable.
  • Use an anti-glare specs (If you wear one). Check out how anti-glare works. Also this for the type of Lens and coatings.
  • Dont stare at computer for more than 5 minutes "continuously". This is almost impossible during coding, but make sure you do this. It will increase your producivity many many times.
  • Wash your face & eyes every half to one hour. Do some eye exercises like slowly rotating your pupil by looking first down, then sideways and then top in a continous motion. Do it 5 times in each direction after every hour. Another exercise is to close your eyes and rub using the tip of your first finger gently. Dont apply pressure.
  • A best way to wash your eyes without leaving the desk is to keep a small cylindrical box which fits into your eyes. Fill it with water to the brim (use your drinking water). Then bring the box to your eyes, insert your eye and then slowly open your eyes (inside the water). Open and close five times in the water. Do this for second eye also. Then trow the water.
  • Drink loads of water. If you feel sleepy or dizzy, DON'T drink coffee/tea or any other drink. Use water. Drink loads of water like 8-10 liters per day. Throw some water on your face & hair to keep you cool.
  • Keep your back straight. This is important since usually every programmer tend to bend the back to get closer to the monitor. Rather adjust the monitor so that you can look clearly without bending your back.
  • Every two hours, strech your arms and legs. Take special care of your joints. Give them some massage or rotate them gently.
  • Dont work overnight. I know coders love working at night because of low noise level, but your productivity is almost dismal during the period from 12 night to 2:00 morning. It is better to take a sound sleep from say 9:00 PM and wake up at 2:00 AM. Start working from 2:00 and you can work straight till 7-8 AM without break. You will be highest in terms of your productivity.

Software Tips

  • Use good tools. Especially browsers and editors. Use an excellent browser like FireFox or Opera. These are good not from the point of view of security or anything (as I mentioned in one of my post), rather because you can get loads of plugins ( FireFox Plugins or Opera Widgets) to help you browse without any difficulty. You can tweak Firefox to no limits.
  • Use good editors like (VIM or EMACS). This comes as a surprise to me that lot of programmers still rely on poor editors like "notepad" or heavy software like "MS Visual studio" for coding or source browsing. This is typical of programmers with Windows background. But vim does come on windows (gvim). And it is very easy to use it as this guide shows, with all the powerful features of VIM on linux. With VIM you can use various scripts to make life very easy, you can browser the code from inside VIM (made very easy using ctags and cscope). You can do almost all tasks requires during coding from VIM (except opening PDF documents). Using grep from VIM is a powerful way to search and not through windows search directory option.
  • Use keyboard shortcuts, especially when you are working on windows. It makes life very very easy. As an example, use "Windows key + D" to go straight to desktop or "Windows + L" to lock your workstation.
  • Try to reuse code. No point in reinventing the wheel (and introducing more bugs). There is no shame in copying code (unless copyrighted). Make sure to bookmark popular site like Google Code Search.
  • Keep it simple. Dont try to optimise the code at first go. Just keep it simple and straight conforming to logic. Put proper comments, so that you can revisit the code later without hassel.
  • Keep the documents, specifications, powerpoint presentations in appropriate hirearchical manner with proper names to directories. Keep a shortcut of the top-level "docs" directory on either desktop or taskbar.
  • Dont clutter the desktop. While working on windows I remove all desktop icons (even My Computer and Recycle Bin). I keep a shortcut in the task-bar. A cluttered desktop or a file-system is not only good manageability for you but also helps the hard-disk to be less fragmented and hence quick to access.
  • I love linux because I dont have to reboot it even after many days. If you are using windows then for better productivity, reboot windows once a day. Also run anti-virus, anti-spyware also once a day. This will keep your computer clean and hence quick to access. I also dont keep any wallpaper on windows machine since it then boots quickly.
  • Another tips is to go to BIOS and disable unnecessary boot sequence, unless you use them frequently. Most computers unnecessarily access the Floppy and CD-ROM before booting from hard-disk.
  • Better to use code-versioning rather than to use "copy-paste" to access different source files. I have seen the lack of discipline in using code-versioning, even in some big companies. That is a real shame. All employees need to be educated on that. It will increase the productivity many many folds.
  • Keeping multiple versions of same code base is sin. I have seen mix up of versions so many times (due to some programmer's system having many versions of code). It happens that programmer does changes in one version and make a release from another. Figuring out what went wrong can take many days.
  • If you use outlook, know how to make a filter. Despite many years in industry I have seen people with only one folder getting all the mails. When asked for finding a specfic email from someone, they wade through 1000s of emails and still cannt find it. I use filters to redirect emails. For example, say mail from my team members goes to folder "My_Team" or from Human Resouce to "HR". I can find any email in less than a minute. Not using folders might work with "gmail" but not with outlook.
  • When you compose a mail, dont fill the "To:" field unless you have written the message completely. This will avoid accidental sending. Even when "replying" or "replying to all", I copy the To: list into CC: and then make any modification.
Thanks Ben for the comment (& corrected the "Standout Jobs" ;-))

Template Designed by Douglas Bowman - Updated to New Blogger by: Blogger Team
Modified for 3-Column Layout by Hoctro