Skip to content


SVN Update Dry Run

As a developer, when you are done with your code modification and you need to check the modification into the SVN repository, sometimes you may find that there are more recent version of the files you are modifying in the repository, especially when your project involves several developers. In this case, you may need to update your local copy to the latest version before checking those files in.

svn update .

The command above will update all files under the directory you are in. The trailing “dot” is required, and represents the current working copy you are currently in.

Sometimes, the update result can be surprising, as some of your modified local copies may have modified the same section as the most recent copies that you are trying to update with, thus it creates conflicts. You need to resolve the conflict by manually editing the conflicted files, or just simply accept any version of the files (working copy, or repository).

After sometime, I was wondering, if there is a way that I could know what would the update result be, that would be awesome! I will be able to know, which files are going to have conflict, and which files are safe to update.

After spending some time on searching, I found that this command could tell me what going to be the update result is:

svn merge --dry-run -r BASE:HEAD .

Specifying the revision BASE:HEAD will make the merge command behaves the same as the update command. It will show you what will be the result of the update command.

By using svn merge‘s --dry-run parameter, it will try the operation, without making any changes. So, no need to worry when a conflict happens. Just be prepared to resolve the conflict when you run the svn update command later.

Posted in SVN.

Tagged with , , , , .


Steve Jobs Biography

A few days ago, I bought this just-released Steve Jobs Biography, by Walter Isaacson, from Kinokuniya Singapore, where they offer 20% discounts for this book. What a great deal! Walter Isaacson is the same person who wrote Albert Einstein’s and Benjamin Franklin’s biography.

I’ve been reading other Steve Jobs’ books, one of which is “The Presentation Secrets of Steve Jobs“, which has been giving me great inspirations.

Looking forward to reading the life story about a person who transforms the world!

Posted in Apple, Books, Steve Jobs.

Tagged with , , , .


Facebook Timeline Is Still On Its Way

Still remember when Mark Zuckerberg presented on F8  about their biggest change yet, Facebook Timeline? In case you missed it, here’s the keynote presentation on F8, there’s a funny introduction by Andy Samberg pretending to be Mark Zuckerberg which you have to watch!

While rumor says that Facebook Timeline will be available for all Facebook users on 29 Sept 2011, there’s no sign of it until today, 2 Nov 2011. No one knows what could have caused the long delay.

However, Facebook Timeline is currently offered for Facebook developers. Here’s mine:

Irwan Setiawan's Facebook Timeline

Have you get your Facebook Timeline? If you want to convert your Facebook’s profile page into Facebook Timeline now, even before it is launched to most Facebook users, just simply drop a comment below.

Posted in Facebook.

Tagged with , , , , .


Faster Firefox

Ever since I updated my Firefox to the newest version (Mozilla Firefox 7.0), I am surprised that Firefox now starts faster than Google Chrome (Chrome 15). Google Chrome used to start a lot faster than Firefox, but it’s a different story now. Cool Firefox!

Posted in Google Chrome, Mozilla Firefox, Web Browsers.

Tagged with , , , , , , .


Facebook Changes: You Just Need To Get Used To It

Every time Facebook changes their interface, these phrases might be very familiar to you: “Give me the old Facebook back!”, or “Facebook, please stop changing!”. By nature, users are not used to a change, because they will need to learn again from scratch. But ironically, they will still use Facebook, no matter how!

On 22 Sept 2011, Mark announced a “major” profile redesign called Facebook Timeline, which will be the biggest Facebook interface change yet. It will completely change the way users interact with Facebook. It will be available to most users on 29 Sept 2011. Let’s see how Facebook users react to it.

Posted in Facebook, Internet.

Tagged with , , , , .


Using Memcached in PHP to Speed Up Websites

Memcached is a free, open-source, high-performance, distributed memory object caching system. Memcached uses RAM across multiple machines to cache key-value items. When used, memcached can make your website processed faster.

Memcache vs. Memcached in PHP

There are 2 PECL memcache libraries in PHP, memcache and memcached. Memcache is older, but more widely used; whereas memcached is newer, more feature rich, but less used. This wiki article explains the difference between the two libraries. Since it is more popular, memcache library is preferred.

Memcached In Action

In a very basic usage, memcached is used when trying to get a data. If the expected memcached key doesn’t exists (either never been created, or has expired), fetch the data from database, and set the memcache key for future use.

Here’s how it would look like in PHP:

// memcached configurations
$memcacheServers = array('host1', 'host2', 'host3');
$memcachePort = 11211; 

// initialize memcached
$memcache = new Memcache;
foreach($memcacheServers as $memcacheServer) {
  $memcache->addServer($memcacheServer, $memcachePort);
}

// memcached simple usage
$data = $memcache->get('mykey');
if (FALSE == $data) {
  $data = databaseQuery(); // get data from database
  $memcache->set('mykey', $data, 0, $expiryTime);
}

The program above will try to get mykey from memcached. It will fail initially, and will do database query and store the result in memcached for a specified expiry time. Subsequently, it will successfully get mykey from memcache, because it has been set before, until the memcached key expires.

Posted in Best Practices, PHP.

Tagged with , , , .


The Original Google

Google has been evolving fast for the past few years. Just look at the newest Google look and feel, which has been greatly improved and consistent across all Google products.

Google Today

Despite all the greatness that Google has now, have you ever wondered, how did the original Google website look like? Some of you might not even familiar with Internet at that time. Back in 1997, here’s how Google looks like:

The Original Google

Looks familiar? What do you think?

Posted in Google, Internet.

Tagged with , , .


Review Board: Take The Pain Out of Code Review

Code review has been an efficient way for engineers to maintain code quality. There are some ways that code review can be done. Over-the-shoulder lets reviewer look over author’s shoulder as the latter walks through the code. While pair programming (commonly implemented in extreme programming) is a method where two developers develop code together at the same workstation. Email pass-around could be the most commonly used method where developers are located all around the globe.

Review Board is one of the tool where tool-assisted code review comes in. Review Board consolidates all review request, lets you review codes, without any pain.

For the past month, I have troubled system team in my company to set up Review Board on one of our server. But all the efforts are paid off. At least, for my development team, where we normally use email to send out a review request, sees a light from it.

More people are involved in code review, and reviews are better in quality.

Since Review Board is introduced in my development team, there are more people involved in code review. I guess it’s because now it is easier for them to give reviews using Review Board, rather than sending out emails. Reviews are also better in quality.

Review in context makes code review easier

The best thing about Review Board is code reviews are done in context. To review codes, you only need to click on line numbers where you want to comment on, and type your review.

Knowledge Sharing

Review Board supports multiple projects and keep track of past reviews. Anyone can get back to older reviews and learn something from past reviews. Learning possibilities are endless.

Posted in Best Practices, Code Standard.

Tagged with , , .


Introducing Google+

You might have already heard of Google+, Google’s newest social networking site, that is after Facebook.

Right now, Google+ is under field trial, which allows only invited people to get in and try Google+. If you haven’t get one, you might need to wait until Google+ is available for public.

Google+ vs. Facebook

Google+ introduces “circle”, which is more like “friend” in Facebook. To add friends in Google+, you need to add people to your circle. Unlike Facebook, Google+ adopts asymmetric follow. It means that you can add other person to your circle without him adding you to his circle.

Learn More

You can learn more about Google+ if you haven’t get an invitation yet.

Posted in Google.

Tagged with , , , .


What Internet Explorer Good At

This is quite true. The only time I used Internet Explorer was when I have just installed Windows, for downloading Mozilla Firefox and Google Chrome. Hahaha!

Posted in Internet, Internet Explorer, Mozilla Firefox, Web Browsers.

Tagged with , , , , , , , .