Wednesday, January 20, 2010

Backup...backup...backup

Last week I’d formatted my hardisk using Partition Magic moving 10gig space from drive C to D. in the middle of process, Partition Magic hit the error something about bad partition etc and etc. So I restart the computer as usual. When I open the My Computer windows I can’t see my D drive, its not there. So I open again Partition Magic to see what happen to my D drive. I really shock that the unrelocated space was there depict the lost of drive D during the process before. All my files were gone forever. I hit my head to the wall because I not backup all important data to external disk.

When I told this to my wife, she was crying because all pictures before and after marriage were lost. All my daughters’ pictures and movies also lost. Can you imagine if you’re lost memory of your first kids. Very sad. She was two year old now. We have a sweet memory with our daughter as she was cute and of course special to us, our first kid.

I was not happy to come to office and about to take EL. But I think I need to find a solution to recover all lost files. So I found EASEUS Data Recovery Wizard. When I read user testimonial I smile my self because chances to recover my data are high. You won’t believe this. It’s working. The software cost you usd69 only. At the same day I went to digital mall at PJ and bought external hardisk western digital 250gig for RM169.

The motive of the story is backup your important data to external hardisk. Yes you can recover your data using this brilliant EASEUS software, but it will not work if your hardisk is broken or burn with fire. It only can recover your deleted files and lost file during partition.

You may need to know how EASEUS work. Ok when you delete your file, the space of that file is not deleted on hardisk. It only hidden for operating system. Even you formatted your drive D for example. The files still can be recovered. Be careful if you send your computer for repair. Someone outside can steal your data even you’ve cleared up everything. So always save your important files to external hardisk directly.
However there is an option called low level format to clean up your hardisk by deleting your files permanently. You can googling on how to do so.

Sunday, December 13, 2009

Jasper or BIRT?

I read the article that say BIRT report is better than Jasper report. It is true in some cases especially BIRT is developing by apache and some people said it easy to use. Jasper is being in the market quite long before BIRT come to complement reporting tools. Both are open source and free to use for commercial use. Even there are free, company who sell the application that use these products should buy support fee from respective owner at least once for life to support their operation so they can continuously bring us free products. This is the nature of open source where most of us don’t realize. They can’t sell their products because they are bound to GPL license which open source software lay on it.

Latest version of Jasper iReport is created using Netbeans platform. So you will see the layout is similar to Netbeans IDE. Jasper report has some advantages in certain area:

1. Sub Report
Sub report mean report inside a report. Jasper not allows you to create two sql queries inside one report. You need to create sub report to do so. Sub report also introduce well organize report page. BIRT report doesn’t have this feature instead it allows you to create more than one query inside a single page. The page becomes huge and complex if you put all queries inside it. I think this is the main weakness of BIRT.

Subreports are an important feature for a report-generating tool. They allow the creation of more complex reports and simplify the design work.
Subreports are very useful when creating master-detail type of reports, or when the structure of a single report is not sufficient to describe the complexity of the desired output document. A subreport is in fact a normal report incorporated into another report. One can overlap subreports or create subreports containing subreports themselves, up to any nesting level. Any report template can be used as a subreport when incorporated into another report, without anything inside it having to change.

2. Scriplets
Scriptlets mean the report can call java method from your application. Scriptlets are sequences of Java code that are executed every time a report event occurs. Through scriptlets, users now have the possibility to affect the values stored by the report variables.
Since scriptlets work mainly with report variables, is important to have full control over the exact moment the scriptlet is executed. JasperReports allows the execution of custom Java code BEFORE or AFTER it initializes the report variables according to their reset type: Report, Page, Column or Group.

3. Parameter passing from jsp
Parameters are object references that are passed-in to the report filling operations. They are very useful for passing to the report engine data that it can not normally find in its data source. For example, we could pass to the report engine the name of the user that has launched the report filling operation if we want it to appear on the report, or we could dynamically change the title of our report.

4. Barcode
Barcode is current business process trend to speed up data processing or data entry. It’s very useful to have it on your report.


BIRT advantages:

1. Functions/formula – more comprehensive compare to jasper

2. Based on eclipse ide

I never explore BIRT report very well so I don’t know exactly what advantages are BIRT over the Jasper.

Both Jasper and BIRT use xml as a report language. They also support drag and drop pallete to design area, query modification and preview screen. BIRT has some additional screens for Master Page and Javascript. Javascript has some limitation because it unable to connect to database directly. Scriptlet feature in Jasper is created in java so it has more functionality. However BIRT provide ready to use drag drop Javascript BIRT functions.

BIRT provide easy to develop report as well as easy data manipulation using javascript. But it not robust compare to Jasper because it lack features like Subreport, scriplets and parameter passing from jsp page.

Monday, November 30, 2009

From Wordpress to Blogspot

Blogspot is the world famous blogging platform that administer by Google, one of the biggest IT company in the world. Every person who loves to surf internet or looking the information on the net cannot avoided from logging in into Blogspot website. Most people outside use blog to share information or express their voice, suggestion or complain. If you think Malaysians blogger is normal writers or journalist, think again. Blog or website is only information medium that can’t be controlled by government even they tried to do it years ago. Very funny there is some politicians urges to register blogger so they can diminish those bloggers who are not same opinion with them.

Blogger like to use Blogspot because it is free, totally free. Wordpress is another option that comes to fight with Blogspot. I’d used wordpress several months before jump to Blogspot. My previous address is myjavaland.wordpress.com. Here are some reasons why I don’t like to use Wordpress;

1. Its slow. You will realize it if you have experience using both wordpress and blogspot.
When you submit the button, it will wait you for minutes before the effect take changes. You will surely feed up during the peak hours. Fyi, internet connection in Malaysia can be considered slow compared to our neighbor, Singapore. No need to compare with US, UK or Japan. Maybe next Wimax connection speed can reduce this problem. Wordpress should provide both basic and advance configuration. So the bandwidth can be reduced with the default basic configuration.

2. Upload image problem. I don’t know what the problem with the image upload functionality is. Sometimes ok sometimes not. What I mean is when I upload the image, sometime button ‘ok’ is missing so I can’t complete my upload. I use Mozilla firefox and I don’t know if the browser is not compatible with some wordpress features. Furthermore, upload images also confusing and time consuming. Its really give headache to the beginner mostly. What I can say is its not user friendly. You need to know that images uploading are the most important aspect in Blog. Google realize this so they allow blogger to upload images on their Blogspot in fly.

3. Too many items. Too many configuration or setting is also not good. Normally blogger only updates their text or images. Only few of them really appreciate to use or try all the features available on wordpress. Many items mean high bandwidth which will cause slow connection problem. I totally give up when I can’t find how to change header text. It so naive if IT people like me can’t find it. It not my fault my friend, it is wordpress, but who care. You never pay for what you use. If you don’t like it, ‘get out’ and find another blogging platform.

If you looking for best platform for your blogging activities, I strongly suggest you to use Blogspot. You can learn on how to use it by reading free tutorial online or buy an ebook in English or Bahasa on your favor. If you are hobbyist who likes to get experience on different platform, you can try Wordpress or any other blog platform.

Thursday, November 5, 2009

Source Control (Versioning)

Source control for developer collaboration is very important in software development team. It maintain the single version of source code even two or more developer working together. It also allows developer to work with other developer source code. Imagine that small group of reporter writing news without any control from their editor. At the end of the day they may write the same news.

Let imagine two employees access the same file at 9am by copying it from server to their PC. emp1 update the file to the server at 10am. Now come emp2 update the same file at 11am. What happen to that file? Any work that made by emp1 will be overwrite. This situation happens to my team before I introduce them source control. They face the issue where an update by one developer to the server is always overwritten by other developer without his/her awareness.

I used CVSNT as cvs server and SmartCvs as cvs client. You can get them by free for basic edition. It allows you to work with source control even with free version. You also can use WinCvs for cvs client but for me it not user friendly. SmartCvs is quite straightforward but lacking some important features like locking. If I’m not mistaken WinCvs has the locking feature. Locking is important when you don’t want other programmer touch your code while you working on it. This will greatly benefit in term of consistency.
I notice that SmartCvs is created by using Netbeans platform with Java language. It looks nice and you’ll think it was Microsoft application.


CVSNT interface
CVSNT interface

Oracle SqlDeveloper also provide versioning feature. You may want to know why database has this functionality. Developers can connect to same database, when one developer make a change, it will appear at other developer. The answer is performance issue. when you use cvs for sqldeveloper, you can work on your local database. This can reduce database server performance. developer also can do their work even database server is down/switch off. when you complete your work on local database, you can update it to the server. any new changes on server, you can make it update to your pc.

Oracle SQL Exam



I just passed the exam 1z0-007 Introduction to Oracle9i SQL today by scoring 43 out of 52 questions. This bad for me as my target is 48. My next exam is 1z0-147 PL/SQL has passing score 77% of 66 question for 90 minutes exam. While 1z0-007 exam is 71% passing score of 52 questions for 2 hours exam. Definitely pl/sql exam is more difficult from sql exam. If I’m not prepare very well for sure I’ll fail my next pl/sql exam.

One thing that makes me funny with the exam is about 90% questions are from Testking, ActualTest, etc. Some questions have exact word!. I took only 5-10 seconds to answer that kind of question. It’s very lucky for me to do sample test before sit the exam. If I’m only depend to the reading (book by Chip Dawes) I maybe fail today. But it not means you can only use dumps to sit the exam. The main objective you take the exam is knowledge in Oracle database. You must honest to yourself. So the right thing for you is reading book and well understands the concept before doing sample exam.

Exam cost

The exam cost me for RM300. I can’t believe a hundred thousands Oracle database has inexpensive exam. Sun Java exam (SCJP) cost you for RM1k. Maybe demand is high for Java certificate. I also preparing for SCJP before I move to Oracle Cert. Most people said that SCJP has high failing rate. That is true. You need to cover all basic Java language in one exam. But I plan to take this exam after I got my OCA in pl/sql cert. In fact the main reason I take Oracle exam is to get better salary, with different organization which can improve my experience and knowledge.

I’ll discuss with you some Tesking, ActualTest I used for the exam in next posting. Some of question has incorrect answer while some question is confusing. I‘ll give you sample question and comparison to the book that I use so you can make it clear or comment on it if I’m wrong.

1z0-007 official site
http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?pa

Finally Bill Gate and Larry Ellison smile to us…




Oracle founder/CEO        Microsoft Tycoon

Probably Bill Gate is busy with new strategy to penetrate IT market after Sun collapse. For sure Larry Ellison is smiling to us with eyeball has dollar sign. That is the destiny of Java language where it future is unknown. Do you think Oracle will give you free Java language? may be no. A business who run Java application may need to pay for the license, perhaps not per user. So why need to care about it. If Java become license fee, it will affect most IT firm who use Java to sell their product. We are waiting announcement from Oracle on Java and other Sun products. I can say that Larry Ellison will not continue to support Glassfish app server as it was strong rival to Oracle OC4J app server. Same fate goes to MySQL database. very sad.

Its true that Oracle play some roles on development of Java language. Most of Oracle products use Java. But when come to commercial user, Oracle charge you for every aspect. Do you know that Larry Ellison is the richest guy in IT business after Bill Gate. I believe in next five years he will be richest than Gate. Oracle is the best database in the world. I also love to use it.

US government has no choice in this economic recession to let the Oracle own Sun. To protect the open source community, US can use lawsuit not to allow Oracle buy Sun share because Oracle has conflict on Sun products mostly open source and low price technology. Why Sun collapse? I attend the speech from Tibco company yesterday one of the speaker said that Sun don’t know how to sell their products. Its true. We might think that Sun is a welfare company. As a profit, its ok for Sun to charge few millions (e.g. support fees) to their customer for using Java enterprise edition as well as App server and MySQL dbase.

Monday, September 14, 2009

My First Icefaces

I want to show you how easy to use Icefaces framework on Netbeans. It is not easy as developing an application on Microsoft application. Based on experience , you should know that it was difficult working on JSF web. That the nature of free software. But Icefaces framework has change your mind that developing java web will be easy and straight forward.

You'll need these two items:

IDE: Netbeans 6.5.1 + Bundled tomcat

Plugin (install if not exist):
- ICEfaces design-time and run-time libraries
- ICEfaces project integration
- VisualWeb ICEfaces


1. When creating new project please select VisualWeb ICEfaces framework

2. Add one button and textbox to the page. Image below tell you a thousand words.




3. Right click on button and textbox. Select Add Binding Attribute

4. Double click on button. Put one line that display value on textbox. See below


public String button1_action() {

//return null means stay on the same page

inputText1.setValue(“aaaaa”);

return null;

}

5. Click run to see the output on browser. Done


See you can switch your working windows easily (Design, JSP, Java). Also you can drag drop object to the page and change it location. Like a visual studio.net is it?