nikhilvharamble / bus-stop-alarm

Automatically exported from code.google.com/p/bus-stop-alarm
MIT License
0 stars 0 forks source link

Second code review for MapPage.java #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I erased database part in MapPage because it was previously used for testing 
purposes. I added comments and made code look more clear. Could you please 
take a look at it again?

Original issue reported on code.google.com by orkha...@gmail.com on 22 Feb 2010 at 11:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
CODE REVIEW - Bus Stop Alarm
Date: Feb 22, 2010
File: MapPage.java
Revision: 79
Author: Orkhan Muradov
Reviewer: Derek Cheng

Summary:

This is a second review of MapPage.java. Changes made were mostly ones 
suggested in 
the first code review. The methods used for previous testings were removed and 
code 
was generally cleaned. 

Comments:

In lines 63-65, you have the following:

Double Latitude = loc.getLatitude()*1E6;
Double Longitude = loc.getLongitude()*1E6;
GeoPoint point = new GeoPoint(Latitude.intValue(), Longitude.intValue());

Would it be equivalent to write it as:

double latitude = loc.getLatitude()*1E6;
double longitude = loc.getLongitude()*1E6;
GeoPoint point = new GeoPoint((int)latitude, (int)longitude);

This would avoid using the wrapper class for double, and casting is more 
direct. Also 
variable names are lowercased.

Other than that, everything seems fine.

Original comment by chen...@gmail.com on 23 Feb 2010 at 4:59

GoogleCodeExporter commented 9 years ago

Original comment by chen...@gmail.com on 23 Feb 2010 at 7:27

GoogleCodeExporter commented 9 years ago

Original comment by chen...@gmail.com on 23 Feb 2010 at 7:28