This is the first of a many parts series about starting up a web design company. Please scroll to the bottom of the article to read the other parts of this series.

Beamstyle Logo - Web Design Hong Kong
Beamstyle Logo - Web Design Hong Kong

Beamstyle was founded one day when I met a friend during a lunch. We both have the vision to be an entrepreneur, but we are unsure what we should do. We are pretty sure that it would be something software related, as my friend (and my business partner) is a master of computer science and I just have an deep interest and a degree in software engineering.

Continue reading

Have you ever had this experience in the office? Your boss assigned a task to your manager, then your manager assigned the task to you. However, what you’ve heard from your manager is actually different from what your boss wants. Your boss saw your code and he/she doesn’t like it. He/She told your manager to ask you to make the changes again, and the loop goes on. Time are wasted when you are waiting for your boss to review your changes.

Our solution for the case at the end? I ended up using an Agile development methodology to solve this problem. I had a pair programming session with my boss in the conference room. On a big screen. Wow!

The end results are great. My boss got what he wanted. His knowledge are transferred to me. Now I understand the coding standard he is looking for. All the time wasted for submitting a patch and waiting for my boss for review are gone. Best of all, he helped me caught a lot of bugs which I might’ve done if I didn’t do pair programming. Bugs are sometimes hard to avoid when one is programming alone. Our brains sometimes just cannot handle thinking so many different things at once.

Today, I was working a newsletter program in Java using the Hibernate library.  I decided to use the ScrollableResults object because I do not have to load all of the database entity at once.  Instead, I can use a database cursor to retrieve the entity one by one.

At the beginning, I wrote this code.

ScrollableResults userCursor = query.scroll();
while ( {
    User user = (User)userCursor.get(0);
    // do action

Our database has around 200,000 users and the program seems to be working fine. Later on, we put this code in a multi-threaded environment with 5 threads, and the program runs slower and slower.  A few minutes later, I saw this message in the console:

Continue reading