Search This Blog

July 13, 2007

Good coding standard

Every programmer can write good programs quickly using different languages such as C#, VB.NET, C, C++ or Java. Everyone has their own coding style and it is hard for them to follow the good coding standard in different companies.

If you worked for many companies before, your supervisors might ask you to follow their coding standard when they did the code review. You should get in the habit of following their instructions and try to get the task done soon.

When my previous supervisor, Eric Johannsen in San Diego did the code review, he read source codes line by line carefully. His basic points are as follows:

1. Follow the test cases written by SA in Enterprise Architect (EA) and use C# and NUnit to write your own source codes.

2. Code reuse all the time. Make the test cases run quickly.

3. Remove the source codes you commented out before if they are not used any more.

4. Make the source codes clear and clean.

When Jeff Papiez, a senior test developer I report to directly at Microsoft, has the code review , he reads source codes very carefully. His basic points are as follows:

1. Every class needs a header comment block where you must describe why you need this class.

2. Function names should be pascal-cased.

3. The arguments inside the function should be camel-cased.

4. Function names should be meaningful and make sure the spelling is correct.

5. If classes contain only static methods, make the class static as well.

6. Code reuse all the time.

7. Make the source codes clear and clean.

It is smart for you to collect their coding standards and let them become yours. Your coding standard will be much better than ever.

July 12, 2007

Comments on installation of Adobe Indesign and Illustrator

When I installed Adobe Indesign CS3 and Illustrator CS3 in my Notebook some days ago, I found installing 2 products is the same, but I need to make some comments now.
When I inserted the CD in my CD ROM and the program was launched automatically. It initialized my installation environment. After that, I only followed its steps. The installation was finished! Nothing happened.

But Adobe forgot one fact: what if users don’t want to install?
After CD initializes the installation environment, you can’t find the “cancel” key to cancel the installation. Only you can do is to use task manager to stop the installation. Next time if you insert the CD again, you will be told that please insert CD in your CD-ROM, but your CD is already there.

How do you solve the problem?

If you go to control panel, click “add or remove Programs’ and uninstall Adobe Indesign / Illustrator, you will get the error. You still can’t install it later.

Only you can do is to insert the CD again, and then you can try to remove the components in the later installation screen and uninstall it. After that, you can try to reinstall it! The problem will be solved!

Do you think Adobe provides a good user experience? I don’t believe so!

July 8, 2007

How can you send a file with more than 200 MB to your friends?

If you currently have the important files that need to send to your friends, how can you do that? Maybe you will say: Just send email. What if the file size is more than 200 MB? How can you send to your friends immediately?

Many IT persons will say: Why not set up a FTP server which can let them download? I will say : it is so slow.

Now I would like to recommend you some free websites which can let you upload files quickly and let your friends download them easily. Those are totally free as follows:

http://www.sendspace.com/
http://www.mediafire.com/
http://www.files-upload.com/
http://www.gigasize.com/
http://www.pando.com/
http://www.xdrive.com/


I like to use sendspace because I don’t have to register. Only I can do is to upload the file from my PC and enter my friend’s email address. After you click " Upload File", one file will generate one URL and send to your friend's email. If you have 5 files, you need to submit it 5 times. Your friend will have 5 URLs in his email. You can give it a try!

C-マンション

Use CCleaner and Uninstall Tool in your PC every day

Last May, I came across a woman in Starbucks, Fremont, CA and I knew that she lives around there. One day, she asked me: I always see you here. Are you a computer person? I said: Yes. During the discussion, I understood that her mouse in her PC didn’t work well. I told her maybe you haven’t cleaned your temporary files and Internet cookies for a long time. She didn’t get me at that time. I told her to download CCleaner (http://www.ccleaner.com/) for free and gave it a try. It would show you what file size was after you deleted.

Ten minutes later, she came back and said: Ray, thank you. My mouse is working now. The file size I delete is more than 700 MB. What happened to my PC? I told her: when you surf the website, download some software, install them, or open Microsoft Office every day, your temporary files and Internet cookies become larger and larger every day. You should schedule the time to delete them.

I also told her if you wanted to uninstall your program, you could try to use this free software, Uninstall Tool, to give it a try. It was also free and quick. (http://www.crystalidea.com/)

July 7, 2007

Finding a bug about the program of balance transfer in Citibank

Last year Citibank offered customers 0% APR on balance transfer with no transaction fee for one year. I was very glad to apply for it last April, enjoyed one-year benefit, and needed to pay off the balance transfer this April without any financial charges.

However, in this early Feb, its website still offered me the same deal for one year. I had one thing in my mind: If I paid off last year’s balance transfer first and started a new balance transfer later, what would it happen next? Therefore, I wanted to give it a try.

I paid off last year’s balance transfer this Feb and started a new balance transfer in the late Feb. I really received the confirmation letter of one-year balance transfer from Citibank. Before April 30, nothing happened. In May, Citibank charged me financial charge. I found this was really a big bug for this program. If customers are not happy, Citibank may cause some troubles.

I called one of customer service representatives and explained it was the time gap between old balance transfer and new balance transfer. I mentioned that your program only calculated the due date. Finally they recognized it was the problem and removed the financial charges for me.

Citibank can ask me to work as a test developer for them.

July 5, 2007

Use Microsoft Virtual PC 2007 as my test machine

I am the contractor who works as the Software Design Engineer in Test (SDET) at Microsoft. I got the chance to run the test cases of SQL Server 2008 (code name: Katmai)

Jeff Papiez, a nice senior test developer at Microsoft, kindly taught me how to use Microsoft Virtual PC 2007 as the test machine. I find it is so powerful. Most importantly, it is free to everyone. As an IT person, I should say it is so convenient for IT people to run different operating systems in Virtual PC.

When I worked as a .NET developer, I needed to maintain VB6 Programs of accounting using windows server 2000 as my operating system. But my users still used Windows 98 to run these programs. When I finished modifying the source codes and put the new dll file in MTS, the programs on user’s PC were not working. Therefore, I needed to use my colleague’s PC with Windows 98 to do this process again. Finally, everything went smoothly.

If you have the similar situations as mine, don’t forget to try Microsoft Virtual PC 2007 as your test machine.

July 4, 2007

Data Error (cyclic redundancy check)

Today, I tried to install QuickBooks, but unfortunately it failed. I thought it might be the CD problem. Finally I found if I wanted to install it, only what I could do was to copy 2 folders to my local drive and clicked setup.exe. The installation setup should be working.
Unfortunately, there was one file that I couldn’t copy to my local drive. The error message is as follows:

Data error (cyclic redundancy check)

I had 2 things in my mind at that time. One was CD problem and the other one was CD-ROM problem. Therefore, I asked Christine to use her laptop to copy that file from CD to her local drive. It worked.

Therefore, I copied the file from her laptop, pasted to mine and the installation setup was working in my laptop.

Next time if you suffer from this problem, just check if there is something wrong with your CD and CD-ROM. You will get the answer!