Monday, July 27, 2009

Solid State Hard Drives


A solid state drive is a storage device that uses solid state memory to store data. While technically not a disk, a solid state drive will often be referred to as a solid state disk drive, or a solid state disk, in reference to the fact that, in some ways, it replaces the traditional hard disk drive. Hard disk drives have been a faithful servant to computing for many years. But with heads, platters, magnetic surfaces, spindles and an array of other complex moving parts, they are most certainly fallible. They can be slow, too: disks have to start spinning if they're not already doing so, then they have to get the head to the correct position on the disk to read or write the data. Add this to the physical problems occurring when a piece of dust or other foreign object gets into the mechanism, or when an impact jolts the drive, and we have a distinctly imperfect system. Solid state drives address many of these timing and structural problems inherent in the hard disk drive.

The principle behind solid state drives is that there should be no moving parts: no spinning platters, no moving heads. Data is split into word length pieces and stored in memory. It is then accessed almost instantaneously using unique system-wide addresses. This behaviour has been used in computer RAM for many years, but for a long time it was too expensive for manufacturers to consider using it as persistent storage in sufficient volumes to replace the hard disk drive.
Solid state disks use either
NAND flash or SDRAM (non-volatile and volatile storage respectively). NAND flash is so-called because of the NAND-gate technology it uses and is common in USB flash drives and many types of memory card. NAND flash based drives are persistent and can therefore effectively mimic a hard disk drive. Synchronous dynamic random access memory (SDRAM) is volatile and requires a separate power source if it is to operate independently from a computer.
Solid state drives may be preferred over traditional disk drives for a number of reasons. The first advantage is found, as mentioned briefly above, in the speed of operation. Because hard disk drives need to be spinning for the head to read sectors of the platter, sometimes we have to wait for "spin up" time. Once the disk is spinning, the head must
seek the correct place on the disk, and from there the disk must spin just enough so that the correct data is read. If data is spread over different parts of the disk (fragmented) then this operation is repeated until all the data has been read or written. While each individual operation only takes fractions of a second the sum of them may not. It is often the case that reads to and writes from the hard disk are the bottleneck in a system.
Because the information on solid state drives can be accessed immediately (technically at the speed of light) there is no
latency experience when data is transferred. Because there is no relationship between spatial locality and retrieval speed, there is no degradation of performance when data is fragmented.
Consequences of the increased speed of writes for fragmented data include a much decreased application start up time: SanDisk, for instance, claim to have achieved Windows Vista start up times of around 30 seconds for a laptop with its SSD SATA 5000 2.5".
Solid state drives also enjoy greater stability over their disk counterparts. Because there are no moving parts there is less that can go wrong mechanically. Dust entering the device ceases to become a problem (and in any case solid state drives can be sealed air tight unlike disk drives which require a certain air cushion to function properly), and dropping the drive is less likely to cause damage to the data. There are no heads so head crashes are a thing of the past.
This speed and stability comes at a price, of course, and in early models prices of even the most modest of solid state capacities greatly surpassed that of the largest hard disks.
Some results on web

Wednesday, March 04, 2009

Friday, February 20, 2009

Difference between Composition and Aggregation

Composition:
As we know, inheritance gives us an 'is-a' relationship
. To make the understanding of composition easier, we can say that composition gives us a 'part-of' relationship. Composition is shown on a UML diagram as a filled diamond (see Figure 1).






If we were going to model a car, it would make sense to say that an engine is part-of a car. Within composition, the lifetime of the part (Engine) is managed by the whole (Car), in other words, when Car is destroyed, Engine is destroyed along with it. So how do we express this in C#?
public class Engine{ . . . }
public class Car
{
Engine e = new Engine();
.......
}
As you can see in the example code above, Car manages the lifetime of Engine.
Aggregation:
If inheritance gives us 'is-a' and composition gives us 'part-of', we could argue that aggregation gives us a 'has-a' relationship. Within aggregation, the lifetime of the part is not managed by the whole. To make this clearer, we need an example. For the past 12+ months I have been involved with the implementation of a CRM system, so I am going to use part of this as an example.
The CRM system has a database of customers and a separate database that holds all addresses within a geographic area. Aggregation would make sense in this situation, as a Customer 'has-a' Address. It wouldn't make sense to say that an Address is 'part-of' the Customer, because it isn't. Consider it this way, if the customer ceases to exist, does the address? I would argue that it does not cease to exist. Aggregation is shown on a UML diagram as an unfilled diamond (see Figure 2).







So how do we express the concept of aggregation in C#? Well, it's a little different to composition. Consider the following code:
public class Address{ . . .}
public class Person
{
private Address address;
public Person(Address address)
{
this.address = address;
}
. . .
}
Person would then be used as follows:
Address address = new Address();

Person person = new Person(address);
or
Person person = new Person( new Address() );
As you can see, Person does not manage the lifetime of Address. If Person is destroyed, the Address still exists. This scenario does map quite nicely to the real world.

Refered from:http://www.c-sharpcorner.com/UploadFile/pcurnow/compagg07272007062838AM/compagg.aspx

Sunday, February 15, 2009


Bookmarks Microsoft Project

Multiple Projects

http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=443

Beginning Tracking

http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=577

also can do a search http://pubs.logicalexpressions.com/Pub0009/LPMFrame.asp?CMD=Archives

provide keywords as Microsoft Project

author: Mike Glen. MVP

Tuesday, February 27, 2007

Unit Testing Web apps

NUnitASP - http://nunitasp.sourceforge.net/
Pros: C# class library for downloading and parsing web pages. Very CSharpy.
Cons: Nothing has happened with this since November 2004. Have to extend it constantly for more complex controls. Thinks about things in a Control way.


SAMIE -
http://samie.sourceforge.net/
Pros: Uses Perl to drive IE around using it's OLE automation interface. Keeps logs, can fill with data from databases, and there's a
cheesy but functional WinForms app to help write the scripting language.
Cons: Uses Perl. LOL.


HttpUnit -
http://httpunit.sourceforge.net/
Pros: Feels good to the Java folks, integrates with JUnit, lower level focused.
Cons: May not be actively developed, no activity since October 2004.


IEUnit -
http://ieunit.sourceforge.net/
Pros: Almost zero installation footprint. Javascript based engine uses the language we were all born knowing. Rich debugging because you can use the Windows Script Debugger. Fairly simple in design. Actively developed. Nice WinForms script helper. Good if you already dig the DOM.
Cons: Slightly cheesy handling of model dialogs. Steals focus while running tests.


Selenium -
http://selenium.thoughtworks.com/
Pros: Good for testing cross browser compatibility. Actively worked on. Selenium tests can be expanded to use other languages.
Cons: Uses a
Fit-like HTML as it's source code. This takes a mind shift and freaks out some folks. Server-side component required.

Watir - http://wtr.rubyforge.org/
Watir (Pronounced "Water") Web Application Testing in Ruby - http://wtr.rubyforge.org/
Pros: Actively being worked on. Uses Ruby, the language du jour. Can run tests asychronously. Simple, elegant, fast. Ruby's interactive shell makes it easy to develop tests (more on this later in this post). Great support for client side things like script events, and even mouse rollovers.
Cons: Haven't found any yet, but I'm sure they are out there. Very focused on the DOM.

Wednesday, January 03, 2007

Software Configuration Management(SCM)

The Purpose/goals of SCM are generally:

  • Configuration Identification- What code are we working with?
  • Configuration Control- Controlling the release of a product and its changes.
  • Status Accounting- Recording and reporting the status of components.
  • Review- Ensuring completeness and consistency among components.
  • Build Management- Managing the process and tools used for builds.
  • Process Management- Ensuring adherence to the organization's development process.
  • Environment Management- Managing the software and hardware that host our system.
  • Teamwork- Facilitate team interactions related to the process.
  • Defect Tracking- making sure every defect has traceability back to the source

More at
http://en.wikipedia.org/wiki/Software_configuration_management
http://cs.wwc.edu/~aabyan/435/Configuration.html

Tuesday, December 19, 2006

AutoComplete OFF

Memo to web developers building sites that accept credit card numbers:
Always, always set autocomplete="off" in the input tag.

Otherwise, if people have the form completion feature turned on their credit card number will be stored in plain text somewhere on the computer (in the registry, or elsewhere).
This is especially dangerous if someone enters their credit card number from a public computer.
The only downside to using this attribute is that it is not standard (it works in IE and Mozilla browsers), and would cause XHTML validation to fail. I think this is a case where it's reasonable to break validation however.


Received thru Sendhil.

Tuesday, December 12, 2006

Heaven and Hell

A small story about Great place to work.A holy man was having a conversation with the Lord one day and said,"Lord,I would like to know what Heaven and Hell are like.The Lord led the holy man to two doors. He opened one of the doors and the holy man looked in. In the middle of the room was a large round table. Inthe middle of the table was a large pot of stew which smelled delicious and made the holy man's mouth water. The people sitting around the table werethin and sickly. They appeared to be famished. They were holding spoons with very long handles and each found it possible to reach into the pot of stewand take a spoonful,but because the handle was longer than their arms, they could not get the spoons back into their mouths. The holy man shuddered atthe sight of their misery and suffering. The Lord said, "You have seen Hell."They went to the next room and opened the door. It was exactly the same as the first one. There was the large round table with the large pot of stewwhich made the holy man's mouth water. The people were equipped with the same long-handled spoons, but here the people were well nourished andplump,laughing and talking. The holy man said, "I don't understand"." It is simple said the Lord, "it requires only one skill. You see, they havelearned to feed each other. While the greedy think only of themselves."Moral:Its people's attitude that makes our place of work, a hell or heaven to them!! 'Help and Seek Help' this makes all the difference to eachindividual's life...and makes our lives hell or otherwise. Success and happiness is all about effective team-work.....make it a great place to work

Lets work together for each other in the right way and achieve our goals.

Sunday, December 03, 2006

xsl import and include

xs:include is used to include type declarations from another schema that has the same target namespace as the including schema.

xs:import is used for including type declarations from a different namespace into the target schema.

In your case, since you are using schemas with different target namespaces you should be using xs:import .

Wednesday, August 24, 2005

Common AssemblyInfo for Components

Came across this idea of maintaing a common assemblyinfo for different components.

How to do it.
1.Well create a GloabalAssemblyInfo.vb/cs file
2.For a selected project select Add Existing Item
3.Instead of clicking on Open , select "Link file" option
4.This will create a link to GlobalAssemblyInfo.cs.If you closely observe the icon of the linked file you can observe a short cut Icon.

What's the USE of this?
Maintain Common attributes that needs to be across projects/Componets eg: Company Name ,Version Number etc.Though Version number could be bad ,you might want to have different version numbers for different components.

Issues:
Link file does not work for Web project.Any idea(s) Why :(

Thursday, October 14, 2004

Automating Versioning in Visual Studio.Net

The rules of the calculation of build numbers are fairly simple. Normally a version number will look like this: AA.BB.CCDD.EEFF, where AA is the major version and BB is the minor version. These two are untouched: you have to set them yourself. The CCDD.EEFF part is modified automatically. CC will be used to represent the number of months elapsed since the starting of the project, and DD the number of days after those months. EE and FF will be the hours and minutes the build was created in that day. Therefore for example, if the project started on Jan 10, 2003 with version 1.0 and you run this macro on Mar 15, 2003 at 14:00, this is the build number that comes out of the calculation: 1.0.0205.1400. (I was told that this is the Microsoft's way of numbering the build.)

Basically the macro, once triggered, tries to open the file AssemblyInfo.cs from a path you specify, and locates the version string (something like this in C#: [assembly:AssemblyVersion("1.0.0220.1536")]) using regular expression. It then updates the old revision and build numbers based on some rules, and writes the file back. At the very end, an optional Build.BuildSolution command is called. If you want to update the build number every time a new build process is kicked off, run this macro instead of using the normal Build->Build Solution menu item.

Wednesday, July 21, 2004

Adding icon to usercontrols [to display in toolbox]

I did find a way doing it manually, but I don't know if it's the correctway to do it ... but it works !1) Create your usercontrol / Component (e.g MyUserControl class) andmarkup the class with[ToolboxBitmap(typeof(Bitmap))] attribute2) Compile this class into a module (Yeha a module, could not get theassembly to work!!)csc /t:module MyUserControl.csThis will create a file called MyUserControl.netmodule3) Create a bitmap 16x16x16, with the fully qualified name of the classthat has the attribute. i.e. namespace.classname.bmpIn my case since the class does not live in a namespace I useMyUserControl.bmp4) Use the al.exe (Assembly Linker) tool to embed the resource.
Al MyUserControl.netmodule
/t:library /embed:MyUserControl.bmp/out:MyUserControl.dll
This step will create an assembly linking the MyUserControl.netmoduleand the embed resource file!5) Add this control to your toolbox !

Wednesday, July 07, 2004

Referring Global assembly from Add Reference dialog box

The typical way of adding references to .NET Components is to use the .NET Tab on the Add Reference…. Dialogue in your project.

VS.NET builds the complete list of available .NET Components by looking in certain directories. By default it looks in the install directory of the .NET Framework (%SystemRoot%\Microsoft.NET\Framework\vSomethingNumber). It will also look in any directory listed with in a certain registry key (see below).

When you are using a nonstandard GAC component, you might want Visual Studio .NET to list it in the Add Reference... dialog under the .NET tab, without having to browse for it.

Simply installing your assembly to the Global Assembly Cache (GAC) would not help in this scenario. The Add Reference dialog box is path based and does not enumerate the components from GAC.

Here is how to install, reference, and use a nonstandard GAC Component:
Create a directory where your nonstandard GAC components will be stored.
ex. “C:\WINDOWS\Microsoft.NET\Framework\[FolderName]
Add a registry key like the one below pointing to where the assembly resides.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework

\AssemblyFolders\[FolderName]
@="C:\\WINDOWS\\Microsoft.NET\\Framework\\[FolderName]"
Copy your Strongly Named component to this directory.
Install the component in the GAC (ex. gacutil /i MyComponent.dll)
The GAC’d component will now be available to add as a project reference in the Add Reference… .NET Tab.
NOTE: Since you are referencing a GAC’d component, the Copy Local property will be set to ‘False’. Leave it AS IS. The component will be available in the server GAC when you deploy to the shared environment and should NOT be copied as part of the project.