Archive for January, 2008
Follow me , style that matters for developers
Being a software developer are you following some standards and best practices that has to be followed?? Developing a software or writing small peice of code is just not the big deal. But what matters is , whether your written code make sence or does it adhere to the requirement. Coding is just one part , but there are othere things to follow where your code looks neat and clean . I am not talking about how to write code etc…. indeed i’m talking about how to make your code look clean and neat. There are some basic rules that every developer must adhere to and the disastrous outcomes that can follow if these rules are not followed. Some of the basic rules you might already know , but are you following ??
1. Add comments to your code : Everybody knows this, but somehow forgets to follow it. How many times have you “forgotten” to add comments? It is true that the comments do not literally contribute to the functionality of a program. But time and time again you return to the code that you wrote two weeks ago and, for the life of you, you cannot remember what it does! You are lucky if this uncommented code is actually yours. In those cases something may spark your memory. Unfortunately most of the time a third party can scan your code too. Well , i recommend to specify what exaclty your code does.
Example : bad way of coding
public File getFile(String path,String fileName) {
if(path == null && fileName == null) {
throw someException;
}
if(fileName.endswith(“exe”)) {
throw someException;
}
}
In the above code it does not tell about the path or fileName , anybody who navigates this
method will come to conclusion that , this method will check for validations and etc..And he has not idea about the path or fileName
Add comments to your code
/**
This method returns a file for the specified path and filename.The fileName takes the file name that ends with exe only and path should be fully qualified name .
@path refers to path Name , fully qualified
@fileName refers to file name with exe extention file name
@return file
*/
public File getFile(String path,String fileName) {
if(path == null && fileName == null) {
throw someException;
}
if(fileName.endswith(“exe”)) {
throw someException;
}
}
2. Say no to Print lines : Its obivious that many of the developers are tend to write sysouts everywhere in methods. But ofcourse its not a bad idea for debugging purpose .And we say to ourselves that we will delete these later. But we often forget to delete these lines of code or we do not want to delete them. polluting more sysouts in your code looks odd , but instead keep a common method which print your things.
3. Braces and Indentation: Indent style (cf., Raymond, “Indent Style”), or the placement of braces (“{” and “}”) and the associated indentation of code, is another of the religious issues related to writing code. There are several indent styles common to C-style languages like Java, and I am not going to suggest that one of them is superior. But following indentation your code look neat.
4. Blocks and Statements
->Put only one statement per line.
->Always use braces with control statements (e.g., ‘if’).
->Consider marking the end of a block with a comment (e.g., } // end if), particularly with long or nested blocks.
->Put variable declarations at the beginning of a block.
->Always initialize variables.
->If you want to be a perfectionist, left-align variable names.
->Indent the case clauses in a switch block.
->Put whitespace before and after operators.
->In if, for, or while, put whitespace before the “(“.
->Use whitespace and parentheses in expressions to increase readability.
5. Unit-test. Unit-test. Unit-test.
I am not going to go into any details as to what is the best way to unit-test your code. I am just going to say that that it must be done. This is the most basic rule of programming. This is one rule that, above all, cannot be omitted. It would be great if your fellow developer could create and execute a test plan for your code, but if that is not possible, you must do it yourself. When creating a unit test plan, follow these basic rules:
->Write the unit test before writing code for class it tests.
->Capture code comments in unit tests.
->Test all the public methods that perform an “interesting” function (that is, not getters and setters, unless they do their getting and setting in some unique way)
6. Always Prepare Document Requirements. Every business requirement must be documented. This could be true in some fairy tale, but it is far from that in the real world. No matter how time-pressed your development is, no matter how tight the deadlines, you must always make sure that every business requirement is documented.
Add comment January 18, 2008
if file.size() > 10 mb
Geeks need to shoot files over to someone all the time – video clips, movies, pictures, games distros, software programs etc. Most of the email providers restict you with a max. 10-20 MB attachments so sending files by email isn’t an option. Additionally, there are so many file sharing tools out there that sending large files as an email attachment became rather outdated.

Drop.io is a terrific private file sharing and collaboration service. It is a great way to share video, photos, audio, docs etc. What would make your hearts burst with joy is the no-registration aspect. No email, no personal details or names – nothing! You are free to create as many drops (as they call it) as you want. Then, just shoot a link over to your pal and that’s it!
Additional Features
- Supports all major file formats (docs, images, videos, music, etc.).
- Create as many drops as you want (storage boxes).
- Get a custom email address for each created drop: drop_name@drop.io.
- Use drop_name@drop.io email address to add files to drops by emailing them.
- It has a 100MB / drop storage limit.
Add comment January 11, 2008
5 Packs to Transform Windows to other OS
It’s a new year, why not give your years old XP operating system a new look? If you’re bored of having to look at the same kind of icons and eyecandy everytime, you can download and install these free transformation packs, and transform XP to look like any other OS.
Vista Transformation Pack [Download]

Vista Transformation Pack does all kinds of appearance tweaks, and makes Windows XP look like Vista. From icons, transparency to new sounds, this pack does it all to make your XP look like Windows Vista.
Mac OS Transformation Pack [Download]
Transforms XP to look like Mac OS X 10.5. Some important components like Windows Explorer and other shell files are patched to mimic Mac OS X appearance. Work only with Windows XP SP2 (English version).
FlyakiteOSX [Download]

Again, make your windows look like Mac OS X. However, it’s much more comprehensive than the above one. This enhancement utility does everything from registry tweaks, visual styles, sounds, icons to imitate the appearance of Mac OS X. See other screenshots here. If you’re using iTunes then make sure to deselect ‘iTunes Multi-Pugin’ option (under ‘Software’) in the installation wizard.
Fedora Transformation Pack [Download]

This tool is intended for making XP resemble the Fedora Linux Distro. Though the utility just packs a simple visual style, it does include icons, screensavers and wallpapers, and other Fedora-like skins for programs.
Ubuntu Transformation Pack [Download]

This pack contains visual styles, icons and other patches that can give the brownish Ubuntu look to Windows XP. If you just can’t get Ubuntu working on your PC, but still love its looks, you can download this pack. [via]
2 comments January 2, 2008
[