atom feed7 messages in org.apache.incubator.cloudstack-devRE: Coding Convention Reminder
FromSent OnAttachments
Alex HuangJul 2, 2013 3:11 pm 
Vijayendra BhamidipatiJul 2, 2013 5:28 pm 
Rajesh BattalaJul 2, 2013 8:05 pm 
Alex HuangJul 2, 2013 8:31 pm 
Wido den HollanderJul 2, 2013 11:36 pm 
Alex HuangJul 3, 2013 9:24 am 
Brian FederleJul 3, 2013 9:34 am 
Subject:RE: Coding Convention Reminder
From:Vijayendra Bhamidipati (
Date:Jul 2, 2013 5:28:24 pm

+1 to checking in the epf file to source, will be good to have it as a reference
for those using other IDEs as well.

Regards, Vijay

-----Original Message----- From: Min Chen [] Sent: Tuesday, July 02, 2013 5:21 PM To: Subject: Re: Coding Convention Reminder

+1. It is better to check in your eclipse.eps into git repo, so anybody who checked out the CloudStack can access the preference file.


On 7/2/13 5:17 PM, "Prachi Damle" <> wrote:

+ 1 Please upload the code template for reference.

-----Original Message----- From: Edison Su [] Sent: Tuesday, July 02, 2013 5:08 PM To: Subject: RE: Coding Convention Reminder

We'd better export the code template from Eclipse, then everybody can import the template into their IDE, then possible, everybody will have the same configuration.

-----Original Message----- From: Alex Huang [] Sent: Tuesday, July 02, 2013 3:11 PM To: Subject: Coding Convention Reminder

I like to remind everyone to review our coding conventions. Our coding conventions have been going all over the place recently. Please take a look. i ons

I also like to propose that we extend the 120 column limit to 180 columns.

I recently was reading the following code. If it followed even our current coding conventions, this would have been 11 lines but it ends up to be 23 lines, more than doubled. The whole file was like this. Just thinking about all the extra scrolling I have to do makes my cts act up. We are in the 21st century and using wide screen lcd monitors. Let's not format our code to fit 80 column amber text screens please!

What's worse is I've found that some people are actively breaking existing source code to 80 columns, causing a bunch of unnecessary merge activities. On Eclipse, you can actually set all types of formatting rules. I can send out my epf (eclipse preferences file) if you don't want to deal with the trouble. DiskOfferingVO diskOffering = _diskOfferingDao .findById(vol.getDiskOfferingId()); if (diskOffering.getUseLocalStorage()) { if (s_logger.isDebugEnabled()) { s_logger.debug("Local volume " + vol + " will be recreated on storage pool " + assignedPool + " assigned by deploymentPlanner"); } VolumeTask task = new VolumeTask(VolumeTaskType.RECREATE, vol, null); tasks.add(task); } else { if (s_logger.isDebugEnabled()) { s_logger.debug("Shared volume " + vol + " will be migrated on storage pool " + assignedPool + " assigned by deploymentPlanner"); } VolumeTask task = new VolumeTask(VolumeTaskType.MIGRATE, vol, assignedPool); tasks.add(task); }

Please be mindful of my cts. Thanks for caring about my health! :)