Dec 22, 2008

21 Laws of Computer Programming

As any experienced computer programmer knows, there are unwritten laws that govern software development. However there are no penalties for breaking these laws; rather, there is often a reward. Following are 21 Laws of Computer Programming:

1. Any given program, once deployed, is already obsolete.
2. It is easier to change the specification to fit the program than vice versa.
3. If a program is useful, it will have to be changed.
4. If a program is useless, it will have to be documented.
5. Only ten percent of the code in any given program will ever execute.
6. Software expands to consume all available resources.
7. Any non-trivial program contains at least one error.
8. The probability of a flawless demo is inversely proportional to the number of people watching, raised to the power of the amount of money involved.
9. Not until a program has been in production for at least six months will its most harmful error be discovered.
10. Undetectable errors are infinite in variety, in contrast to detectable errors, which by definition are limited.
11. The effort required to correct an error increases exponentially with time.
12. Program complexity grows until it exceeds the capabilities of the programmer who must maintain it.
13. Any code of your own that you haven't looked at in months might as well have been written by someone else.
14. Inside every small program is a large program struggling to get out.
15. The sooner you start coding a program, the longer it will take.
16. A carelessly planned project takes three times longer to complete than expected; a carefully planned project takes only twice as long.
17. Adding programmers to a late project makes it later.
18. A program is never less than 90% complete, and never more than 95% complete.
19. If you automate a mess, you get an automated mess.
20. Build a program that even a fool can use, and only a fool will want to use it.
21. Users truly don't know what they want in a program until they use it.

5 Free Java Exams From Sun

Sun offers 5 free proficiency assessment examinations. Read below for details and how you can take them.

Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0
Exam Objectives:

* Fundamental Object-Oriented Concepts
* UML Representation of Object-Oriented Concepts
* Java Implementation of Object-Oriented Concepts
* Algorithm Design and Implementation
* Java Development Fundamentals
* Java Platforms and Integration Technologies
* Client Technologies
* Server Technologies

Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0
Exam Objectives:

* Declarations, Initialization and Scoping
* Flow Control
* API Contents
* Concurrency
* OO Concepts
* Collections / Generics
* Fundamentals

Sun Certified Business Component Developer for the Java Platform, Enterprise Edition 5
Exam Objectives:

* EJB 3.0 Overview
* General EJB 3.0 Enterprise Bean Knowledge
* EJB 3.0 Session Bean Component Contract and Life Cycle
* EJB 3.0 Message-Driven Bean Component Contract
* Java Persistence API Entities
* Java Persistence Entity Operations
* Persistence Units and Persistence Contexts
* Java Persistence Query Language
* Transactions
* Exceptions
* Security Management

Sun Certified Mobile Application Developer for the Java 2 Platform, Micro Edition, Version 1.0
Exam Objectives:

* JTWI (JSR 185) and Overview of JTWI-Compliant Wireless Applications
* CLDL 1.0 and 1.1
* Security (Both CLDC and MIDP)
* Networking
* Application Model, Delivery, Lifecycle, and Provisioning
* MIDP Persistent Storage
* Push Registry
* MIDP User Interface (UI) API

Sun Certified Developer for Java Web Services
Exam Objectives:

* XML Web Service Standards
* SOAP 1.1 Web Service Standards
* Describing and Publishing (WSDL and UDDI)
* JAX-RPC
* SOAP and XML Processing APIs (JAXP, JAXB, and SAAJ)
* JAXR
* J2EE Web Services
* Security
* Developing Web Services
* General Design and Architecture
* Endpoint Design and Architecture

These pre-assessment exams will also help you to determine which Java certification course is best suited to your current level of skill and knowledge.

You can take the exams here.

Free Java Certification Exam Retake Promotion

To commemorate Sun's awarding over half million certifications, Sun will allow you to re-take the exam one additional time, should you need it, for free if you place your order by June 20 2008. If you are not sure about your chances in the very first time, this is a golden opportunity for you. Here's how you can avail this opportunity.

First you must use Priority Code WW48CX1 when you place your order for your chosen Sun certification.

Note: The following new certifications are available

* Sun Certified Web Component Developer (SCWCD) - Updated to Java EE5
* Sun Certified Enterprise Architect (SCEA) - Updated to Java EE5
* Sun Certified Systems Administrator for Sun Cluster 3.2 Software
* Sun Certified JCAPS Integrator

After you purchased your exam voucher, you should then schedule your exam date, time and location here.

If you do not pass the exam, simply contact the Authorized Prometric Testing Center like you did before and provide your original certification exam voucher number.
Note:

1. You must allow 72 hours after taking your initial exam before scheduling the free retake exam.
2. Please also be aware that per Sun certification guidelines you must wait at least 14 days before you may retake any exam.
3. There is no need to contact Sun to schedule your retake exam.

Sun Releases Java Composite Application Platform Suite (Java Caps) 6

The Java Composite Application Platform Suite is a collection of middleware software suites using service-oriented architecture for business integration (SOA/BI). Java CAPS is a standard based open source platform for developing software infrastructures using SOA. It is one of the first open-source SOA platforms which have been created using Open ESB (The Enterprise Service Bus) community.

Java CAPS provides the tools you need for designing, deploying, and managing platform-independent vendor-neutral composite applications.

Java CAPS 6 retains most of the feature set of previous Java CAPS releases, originating in the ICAN and eGate suites from SeeBeyond, and provides further flexibility through standardization. The Java Business Integration (JBI) standard is a vendor-neutral specification that defines a "container of containers": Any JBI-compliant application is automatically interoperable with Java CAPS applications. Design-time tooling is standardized and upgraded to NetBeans IDE 6.1. Runtime functions are standardized to Sun Java System Application Server 9.1.

Java CAPS provides adapters to read and write data in the native format of specific databases or business systems, such as Oracle, Sybase, HL7, SWIFT, HIPAA, SAP, PeopleSoft, and dozens of others. In addition to adapters for data modeling and representation, Java CAPS also provides collaborations and engines for data transformation, and an implementation of the Java Messaging Service (JMS) for data queuing.

Note: A service-oriented architecture (SOA) defines a framework for creating, exposing, and invoking services that are loosely coupled and interoperable, and orchestrating them with business logic to achieve a particular objective.

The changes in this version are:
1. New GUI for design work. Uses NetBeans 6 plug-ins for familiarity, maintainability, compatibility.

2. Tailored for Sun Java Application Server 9.1

3. Support for JBI components (as NetBeans plug-ins):

* BDRU = BiDirectional ReUse (JBI Bridge)
* Sun Java Message Server
* Service Engines (SEs) for: Java EE, BPEL
* Binding Components (BCs) for: HTTP/SOAP
* CASA Editor (Composite Application Service Assemblies)
* eView / Mural

Where can you use Java CAPS?

* Data integration applications
* SOA / ESB Applications
* Composite Application Initiatives - Combine new or existing business applications to create composite applications.

Some benefits of using Java Caps 6:

* Its open source which reduces risks and ends vendor lock in
* Offers a common design and monitoring environment for integration of components within suite
* Provides a secure and scalable platform for supporting SOA

Give it a try. I am sure you will like it.

How To Install, Compile, Run Java On iPhone

How To Install, Compile, Run Java On iPhone

iPhone doesn't natively support Java / J2ME. However as a J2ME developer there are two good ways to develop iPhone applications using Java / J2ME. Read below for details and also to know how you can upload, compile and run Java applications on iPhone.


alcheMo-for-iPhone - Automated J2ME to iPhone porting solution

alcheMo for iPhone contains translator to convert J2ME application source code to equivalent C++ source code for iPhone.

No manual adjustments to the translated source code is required. Compiled using the standard Xcode toolchain and linked with alcheMo's optimized run-time library, a native iPhone application is produced.

alcheMo for iPhone is capable of converting J2ME applications utilizing an extensive subset of Java ME CLDC 1.1 and MIDP 2.0 (including touch screen support) and supports several JSR extension APIs including the JSR-256 mobile sensor API. This automatic translation process is instantaneous, repeatable and doesn't require iPhone specific experience.

Garbage collection and automatic memory management is one of the strengths of the J2ME environment. Unlike on Macintosh OS X, Objective C on iPhone does not support garbage collection. By incorporating an advanced garbage collector, alcheMo eliminates the need for manual memory management. Whole classes of common programming errors such as dangling pointers are thus prevented.

The initial version of alcheMo for iPhone is optimized for mobile games.

The bad news is that their beta program has closed on April 24th, while they are preparing for commercial release. alcheMo for iPhone has backing from Sun Microsystem.

BTW: During Java One 2008, Sun officials repeatedly mentioned that they successfully ran Java on iPhone but are thwarted only by Apple's licensing restrictions in publicly announcing it. alcheMo circumvents Apple's licensing restrictions with their language translator.
Using Java on Unlocked & Jailbraked iPhone with Installer

Note: The legality of the procedure below is dubious. IANAL.

First you need to unlock and jailbrake you iPhone. You can use the windows user interface for ZiPhone to jailbreak, unlock and activate any verion of iPhone.

Then you need to have the installer app on iPhone. Installer.app is a UIKit based package manager for the iPhone. It works by downloading packages over WiFi (wireless networking) or EDGE. It supports installing, updating and uninstalling applications from multiple sources.

winpwn can simplify the above steps for you.

Now go to Installer and install Mobile Terminal and Cydia Installer. Restart iPhone.

Run Cydia Installer and go to Java section and select iPhone/Java which will install the virtual machine, libraries etc. Then install Jikes (java compiler). Now restart iPhone again.

That's it, you are done.
How to load, compile & run Java applications on iPhone

First install Java on iPhone following instructions in the section above before reading this.

You can upload Java files to iPhone using iPhone Browser.
Run Terminal (installed above) and use java (jikes) compiler to compiler your program. For example:
jikes -cp /usr/lib/rt.jar MyFirstJavaProgramForIPhone.java

You can run the class file as usual:
java MyFirstJavaProgramForIPhone
Java on iPhone - Concluding thoughts

The second method (using jailbraked iPhone) suffers from three major problems.
1. To use your Java applications, your user will also have to jailbrake their iPhone. As such its usage will be limited to highly technical people who are not afraid of tinkering with their costly iPhone and potentially even risk damaging it permanently!

2. While it may be fine for experimenting, the legality is dubious. You may run into problem with Apple for selling or even distributing such applications.

3. The jailbraked versions of iPhone may not be compatible with future firmware updates, and Apple will try their best to disable them at every opportunity and had done so in the past.

All of the above makes method 2 unsuitable for commercial use.

Commercial J2ME developers have to wait for commercial release of alcheMo-for-iPhone. Innaworks is well known for porting standards compliant J2ME to BREW mobile platform. I expect their solution to be ready in 2-3 months time. If you do not have the time then download Apple's iPhone SDK and start coding in Objective C.
BTW: Make sure you read the iPhone SDK agreement carefully before you invest huge sums in iPhone development.

Dec 19, 2008

Removing Autorun.inf Virus & Viruses that uses Autorun.INF

How to delete autorun.inf with command prompt

attrib -s -h -r autorun.inf
del autorun.inf

Removing Autorun.inf Virus & Viruses that uses Autorun.INF


There are several viruses that uses the autorun.inf to spread itself such as the Bacalid (hides itself in ctfmon.exe) and the RavMon.EXE. These viruses set its file attributes to System+Hidden+Read-Only attributes so some anti-viruses will have a hard time detecting or finding them. These viruses save itself in the root directory of every available drives of the current infected computer and runs itself every time you Double-Click the drive. In USB Sticks and CDs that are infected by the virus runs automatically especially if drive autorun is enabled for the current drives (which is usually by default, autorun for drives are enabled).

Autorun.INF is usually used by CD Installers to autoplay their installations but Hard disks by default should not have AUTORUN.INF in the drive.

Now, it is possible that your computer is infected by those viruses if you try to display the content of the your computer through command prompt, using the dir /ah command. You will see the following window if you try this:


You will see from this window that drive C contains a hidden file autorun.inf, this is a possibility that the computer is infected. Now to erase this, restart your window to Safe Mode Command Prompt. (Do this by rebooting your computer and pressing F8 before windows go out and select from the boot menu). On drive C and other drives type the following commands: 1. attrib -h -r -s autorun.inf 2. del autorun.inf

Do this steps to other drives to disable the autorun.inf .

Disable AUTORUN from Registry

Now you can disable the AUTORUN for all drives by configuring the registry. Open the registry by typing regedit.exe to the command prompt (if your still at the command prompt) or execute it in Run. Look for the HKEY_CURRENT_USER\Software\ Microsoft\Windows\CurrentVersion\Policies\Explorer as shown below:




Double-click the NoDriveAutorun DWORD entry and type the value HEX: FF (255 in Decimal). (If the NoDriveAutorun does not exists, you can creat it by right-clicking the right side area of the regedit window, then click New->DWord Value -> type NoDriveAutorun) Close the registry and restart the computer. This procedure will disable all the autorun for all drives of your computer and at least will prevent the autorun function of infected USB drives or CDs and avoid the infection of viruses like the Bacalid and RavMon.exe.

Update:

If you want to prevent viruses that uses autorun.inf to infect your USB flash drive, try to do this:

1. Open your flash drive via Command Prompt (do this via Start->Run->cmd.exe)

2. Change your logged drive to your USB flash drive (e.g. if your drive is at drive E: then type E: on the command prompt then press enter)

3. Create a folder named: AUTORUN.INF on the root directory of your flash drive. (to do this type the command: MD\AUTORUN.INF). If an error: a subdirectory already exists… shows, try to follow the instruction above to remove existing autorun.inf before doing this instruction.

The reason why this will avoid future infection is that autorun.inf viruses usually generates a file autorun.inf. Having an AUTORUN.INF folder on the root directory of your drives will make virus programs unable to create their own autorun.inf file, virus can’t even overwrite

FIX:Drive opens in new window on double click in windows XP Full Why drive opens in new window?

FIX:Drive opens in new window on double click in windows XP Full

Why drive opens in new window?

It happens when a program or virus tries to edit the File Folder or Drive shell entries to add more context menu items and set them as default for double click action.

Lets see how we can fix this.


Fix:

First Method:

1. Open Start >> Run and type regsvr32 /i shell32.dll

2. press ok

3. You will see a message DllRegisterServer and DllInstall in shell32.dll succeeded

4. that’s it

Second Method:

1. Open Start >> Run and type regedit

2. Navigate to HKEY_CLASSES_ROOT/Directory/Shell

3. Double click the default key type none and press ok.

4. now navigate to HKEY_CLASSES_ROOT/Drive/Shell.

5. Double click the default key type none and press ok.

Third Method:

If you don’t want to play with the registry ,you can run the following command instead at

Run Prompt: ( Open Start >> Run )

“reg add hkcr\drive\shell /ve /d none /f” (without double quotes)

We hope at least one of the above method may work for you to fix the trouble, if not please let us know.

Note: If still after following the above you are not able to solve the problem then update your antivirus and run a complete scan and make your system virus free.
Please Download this file...If u Like my Work. This file is Less than 1Kb...It is just a Text file with thanks.
Link: http://www.ziddu.com/downloadlink/2529657/Thanks.txt

Nov 26, 2008