SlideShare una empresa de Scribd logo
1 de 32
Descargar para leer sin conexión
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
About	
  me	
  
Private	
  Informa>on	
  
	
  Name:	
  Le	
  Ngoc	
  Viet	
  
	
  Phone:	
  0168.948.9579	
  
	
  Email:	
  vietln6223@setacinq.com.vn,	
  vietln811@gmail.com 	
  	
  
	
  Skype:	
  lengocviet	
  
	
  Facebook:	
  hIp://facebook.com/viet.lengoc	
  
	
  
Work	
  History	
  
	
  2010/08~2012/04:	
  AnLab	
  Company/	
  Android	
  Senior	
  Developer	
  
	
  2012/05~Now:	
  SETA	
  InternaUonal	
  Vietnam/	
  Android	
  Tech-­‐Leader	
  &	
  
IOS	
  Senior	
  Developer
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
SETA Group Company	
  Informa>on	
  
Global	
  IdenUty:	
   SETA	
  InternaUonal (HQ)	
Headquarters:	
   Newport	
  Beach,	
  CA	
  
Founded:	
   2008	
  
2	
ü  Hanoi,	
  Vietnam(230)	
  	
  
ü  Dublin,	
  Ireland(20)	
  
ü  Los	
  Angeles,	
  USA(15)	
  
ü  Tokyo,Japan(30)	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *w/Terras	
  
ü  Los	
  Angeles(HQ)	
  
ü  Dublin(Branch)	
  
ü  Sydney(Partner)	
  
ü  Singapore(Partner)	
  
ü  Tokyo(Branch)	
  
Fulfillment	
  Centers:	
   Sales	
  LocaUons:	
SETA	
  Interna>onal	
  Vietnam	
  
Headquarters:	
   Hanoi,	
  Vietnam	
  
Founded:	
   2009	
  
Employees:	
   230	
  +	
  
Website:	
   www.seta-­‐internaUonal.com	
  
Address:	
   4th	
  floor,	
  3D	
  Building,	
  Duy	
  Tan	
  Str,	
  Cau	
  
Giay,	
  HN	
  
Tel/	
  Phone:	
   (84)	
  37-­‐950-­‐983	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Android coding convention
and Quality assurance plugin	
  
2013.	
  12	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Topics	
§  Android	
  Coding	
  ConvenUon	
  
§  Quality	
  Assurance	
  Code	
  Plugins	
  (Eclipse)	
  
§  Q&A	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Why	
  Need	
  Coding	
  ConvenUon?	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Why	
  Need	
  Coding	
  ConvenUon?	
  
Code	
  convenUons	
  are	
  important	
  to	
  programmers	
  
for	
  a	
  number	
  of	
  reasons:	
  
–  40%-­‐80%	
  of	
  the	
  lifeUme	
  cost	
  of	
  a	
  piece	
  of	
  soiware	
  
goes	
  to	
  maintenance.	
  
–  Hardly	
  any	
  soiware	
  is	
  maintained	
  for	
  its	
  whole	
  life	
  by	
  
the	
  original	
  author.	
  
–  Code	
  convenUons	
  improve	
  the	
  readability	
  of	
  the	
  
soiware,	
  allowing	
  engineers	
  to	
  understand	
  new	
  code	
  
more	
  quickly	
  and	
  thoroughly.	
  
–  If	
  you	
  ship	
  your	
  source	
  code	
  as	
  a	
  product,	
  you	
  need	
  to	
  
make	
  sure	
  it	
  is	
  as	
  well	
  packaged	
  and	
  clean	
  as	
  any	
  
other	
  product	
  you	
  create.	
  
	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Coding	
  ConvenUon	
  
Coding	
  ConvenUon	
  ?	
  
– Coding	
  convenUons	
  are	
  a	
  set	
  of	
  guidelines	
  for	
  a	
  
specific	
  programming	
  language	
  that	
  recommend	
  
programming	
  style,	
  pracUces	
  and	
  methods	
  for	
  
each	
  aspect	
  of	
  a	
  piece	
  program	
  wriIen	
  in	
  this	
  
language.	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Android	
  Coding	
  ConvenUon	
  
•  Standard	
  Java	
  coding	
  convenUons	
  
•  Android	
  coding	
  convenUons	
  
	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Android	
  Coding	
  ConvenUons	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Name	
  ConvenUons	
  
Use	
  “m”	
  for	
  non-­‐public,	
  non	
  sta>c	
  fields	
  
–	
  “m”	
  for	
  “member	
  variable”	
  or	
  “data	
  member”	
  
•	
  Yes	
  
–	
  private	
  String	
  mFirstName;	
  
–	
  private	
  boolean	
  mIsMarried;	
  
•	
  No	
  
–	
  private	
  String	
  firstName;	
  
–	
  private	
  boolean	
  isMarried;	
  
•	
  Use	
  “s”	
  for	
  sta>c	
  (non-­‐final)	
  fields	
  
•	
  Yes	
  
–	
  private	
  staUc	
  double	
  sBiggestRadius;	
  
•	
  No	
  
–	
  private	
  staUc	
  double	
  biggestRadius;	
  
For	
  example:	
  
	
  public	
  class	
  MyClass	
  {	
  
	
  	
  	
  	
  public	
  staUc	
  final	
  int	
  SOME_CONSTANT	
  =	
  42;	
  
	
  	
  	
  	
  public	
  int	
  publicField;	
  
	
  	
  	
  	
  private	
  staUc	
  MyClass	
  sSingleton;	
  
	
  	
  	
  	
  int	
  mPackagePrivate;	
  
	
  	
  	
  	
  private	
  int	
  mPrivate;	
  
	
  	
  	
  	
  protected	
  int	
  mProtected;	
  
}	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Impact	
  of	
  Naming	
  ConvenUon	
  
on	
  Constructors	
  
Standard	
  Style	
  
public	
  class	
  Person	
  {	
  
	
  	
  	
  	
  private	
  String	
  firstName,	
  lastName;	
  
	
  	
  	
  	
  public	
  Person(String	
  firstName,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  String	
  lastName)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  this.firstName	
  =	
  firstName;	
  
	
  	
  	
  	
  	
  	
  	
  	
  this.lastName	
  =	
  lastName;	
  
	
  	
  	
  	
  }	
  
	
  	
  	
  	
  …	
  
}	
  
Android	
  Style	
  
public	
  class	
  Person	
  {	
  
	
  	
  	
  	
  private	
  String	
  mFirstName,	
  mLastName;	
  
	
  	
  	
  	
  public	
  Person(String	
  firstName,	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  String	
  lastName)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  mFirstName	
  =	
  firstName;	
  
	
  	
  	
  	
  	
  	
  	
  	
  mLastName	
  =	
  lastName;	
  
	
  	
  	
  	
  }	
  
	
  	
  	
  	
  …	
  
}	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Never	
  Ignore	
  ExcepUons	
  
void	
  setServerPort(String	
  value)	
  {	
  
	
  	
  	
  	
  try	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  serverPort	
  =	
  Integer.parseInt(value);	
  
	
  	
  	
  	
  }	
  catch	
  (NumberFormatExcepUon	
  e)	
  {	
  }	
  
}	
  
	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Don't	
  Catch	
  Generic	
  ExcepUon	
  
try	
  {	
  
	
  	
  	
  someComplicatedIOFuncUon();	
  	
  	
  	
  	
  	
  	
  	
  //	
  may	
  throw	
  IOExcepUon	
  
	
  	
  	
  	
  someComplicatedParsingFuncUon();	
  	
  	
  //	
  may	
  throw	
  ParsingExcepUon	
  
	
  	
  	
  	
  someComplicatedSecurityFuncUon();	
  	
  //	
  may	
  throw	
  SecurityExcepUon	
  
	
  	
  	
  	
  //	
  phew,	
  made	
  it	
  all	
  the	
  way	
  
}	
  catch	
  (ExcepUon	
  e)	
  {	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  //	
  I'll	
  just	
  catch	
  all	
  excepUons	
  
	
  	
  	
  	
  handleError();	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  //	
  with	
  one	
  generic	
  handler!	
  
}	
  
	
  
	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Use	
  Spaces	
  for	
  IndentaUon	
  
We	
  use	
  8	
  space	
  indents	
  for	
  line	
  wraps,	
  including	
  funcUon	
  calls	
  
and	
  assignments.	
  For	
  example,	
  	
  
this	
  is	
  correct:	
  
Instrument	
  i	
  =	
  
	
  	
  	
  	
  	
  	
  	
  	
  someLongExpression(that,	
  wouldNotFit,	
  on,	
  one,	
  line);	
  
	
  
and	
  this	
  is	
  not	
  correct:	
  
Instrument	
  i	
  =	
  
	
  	
  	
  	
  someLongExpression(that,	
  wouldNotFit,	
  on,	
  one,	
  line);	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Coding	
  ConvenUons	
  
•  Write	
  Short	
  Methods	
  
–	
  No	
  official	
  limit,	
  but	
  try	
  to	
  keep	
  methods	
  short	
  and	
  focused.	
  Think	
  oien	
  about	
  
how	
  to	
  refractor	
  your	
  code	
  to	
  break	
  it	
  into	
  smaller	
  and	
  more	
  reusable	
  pieces.	
  
–	
  Max	
  line	
  of	
  method	
  is	
  40	
  lines.	
  
	
  	
  
•  Keep	
  lines	
  short	
  
–	
  They	
  have	
  a	
  strict	
  rule	
  of	
  100	
  characters	
  except	
  for	
  imports	
  or	
  comments	
  that	
  
contain	
  URLs	
  or	
  commands	
  that	
  cannot	
  be	
  broken	
  up.	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Treat	
  Acronyms	
  as	
  Words	
  
Treat	
  acronyms	
  and	
  abbreviaUons	
  as	
  words	
  in	
  naming	
  variables,	
  
methods,	
  and	
  classes.	
  The	
  names	
  are	
  much	
  more	
  readable:	
  
	
  
	
  	
  	
  	
  	
  	
  Good	
   	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Bad	
  
XmlHIpRequest	
   	
   	
  XMLHTTPRequest	
  
getCustomerId	
   	
   	
  getCustomerID	
  
class	
  Html	
   	
   	
   	
  class	
  HTML	
  
String	
  url	
   	
   	
   	
  String	
  URL	
  
long	
  id	
   	
   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  long	
  ID	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Order	
  Import	
  Statements	
  
First	
  
–	
  Android	
  packages	
  
•	
  import	
  android.foo.Bar;	
  
•	
  Second	
  
–	
  Third	
  party	
  packages	
  
•	
  import	
  com.coreservlets.uUls.RandomUUls;	
  
•	
  Third	
  
–	
  Standard	
  java	
  or	
  javax	
  packages	
  
•	
  import	
  java.uUl.*;	
  
•	
  Within	
  each	
  group	
  
–	
  AlphabeUcal	
  (uppercase	
  Z	
  before	
  lowercase	
  a)	
  
•	
  Separa>ng	
  groups	
  
–	
  Blank	
  line	
  between	
  each	
  major	
  grouping	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Quality	
  Assurance	
  Code	
  
•  Why	
  need	
  quality	
  assurance	
  code.	
  
•  Aims	
  of	
  quality	
  assurance	
  code.	
  
•  Tool	
  support.	
  
	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Why	
  need	
  quality	
  assurance	
  
code?	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Aims	
  of	
  quality	
  assurance	
  code	
  
-­‐  Developing	
  the	
  code	
  quality	
  
-­‐  Decreasing	
  bugs	
  in	
  the	
  development	
  phase	
  
and	
  cost	
  to	
  repair	
  defect	
  aier	
  release.	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
QA	
  code	
  plugin	
  (eclipse)	
  
•  Checkstyle	
  
•  PMD	
  
•  Findbugs	
  
	
  
	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Checkstyle	
  
	
  
Checkstyle	
  is	
  a	
  development	
  tool	
  to	
  help	
  
programmers	
  write	
  Java	
  code	
  that	
  adheres	
  to	
  a	
  
coding	
  standard.	
  It	
  automates	
  the	
  process	
  of	
  
checking	
  Java	
  code	
  to	
  spare	
  humans	
  of	
  this	
  
boring	
  (but	
  important)	
  task.	
  This	
  makes	
  it	
  ideal	
  
for	
  projects	
  that	
  want	
  to	
  enforce	
  a	
  coding	
  
standard.	
  	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Demo	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
PMD	
  
	
  PMD	
  is	
  a	
  source	
  code	
  analyzer.	
  It	
  finds	
  common	
  programming	
  flaws	
  like	
  unused	
  
variables,	
  empty	
  catch	
  blocks,	
  unnecessary	
  object	
  creaUon,	
  and	
  so	
  forth.	
  It	
  
supports	
  Java,	
  JavaScript,	
  XML,	
  XSL.	
  	
  
AddiUonally	
  it	
  includes	
  CPD,	
  the	
  copy-­‐paste-­‐detector.	
  CPD	
  finds	
  duplicated	
  code	
  in	
  
Java,	
  C,	
  C++,	
  C#,	
  PHP,	
  Ruby,	
  Fortran,	
  JavaScript.	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
What	
  is	
  PMD?	
  
PMD	
  scans	
  Java	
  source	
  code	
  and	
  looks	
  for	
  poten>al	
  problems	
  like:	
  
–  Possible	
  bugs	
  -­‐	
  empty	
  try/catch/finally/switch	
  statements	
  
–  Dead	
  code	
  -­‐	
  unused	
  local	
  variables,	
  parameters	
  and	
  private	
  methods	
  
–  SubopUmal	
  code	
  -­‐	
  wasteful	
  String/StringBuffer	
  usage	
  
–  Overcomplicated	
  expressions	
  -­‐	
  unnecessary	
  if	
  statements,	
  for	
  loops	
  that	
  
could	
  be	
  while	
  loops	
  
–  Duplicate	
  code	
  -­‐	
  copied/pasted	
  code	
  means	
  copied/pasted	
  bugs	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Demo	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
FindBugs	
  
–  Findbugs	
  is	
  an	
  Open	
  Source	
  project	
  for	
  staUc	
  analysis	
  of	
  the	
  Java	
  bytecode	
  
to	
  idenUfy	
  potenUal	
  soiware	
  bugs.	
  The	
  Findbugs	
  analysis	
  can	
  be	
  
integrated	
  into	
  the	
  Eclipse	
  IDE	
  via	
  an	
  addiUonal	
  soiware	
  component.	
  
–  Findbugs	
  provides	
  early	
  feedback	
  about	
  potenUal	
  errors	
  in	
  the	
  code.	
  This	
  
helps	
  the	
  developer	
  to	
  access	
  these	
  problems	
  early	
  in	
  the	
  development	
  
phase.	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Findbugs	
Correctness	
  bug	
  -­‐	
  Probable	
  bug	
  -­‐	
  an	
  apparent	
  coding	
  mistake	
  resulUng	
  in	
  
code	
  that	
  was	
  probably	
  not	
  what	
  the	
  developer	
  intended.	
  We	
  strive	
  for	
  a	
  
low	
  false	
  posiUve	
  rate.	
  	
  
Bad	
  PracUce	
  -­‐	
  ViolaUons	
  of	
  recommended	
  and	
  essenUal	
  coding	
  pracUce.	
  
Examples	
  include	
  hash	
  code	
  and	
  equals	
  problems,	
  cloneable	
  idiom,	
  
dropped	
  excepUons,	
  serializable	
  problems,	
  and	
  misuse	
  of	
  finalize.	
  We	
  
strive	
  to	
  make	
  this	
  analysis	
  accurate,	
  although	
  some	
  groups	
  may	
  not	
  care	
  
about	
  some	
  of	
  the	
  bad	
  pracUces.	
  	
  
Dodgy	
  -­‐	
  Code	
  that	
  is	
  confusing,	
  anomalous,	
  or	
  wriIen	
  in	
  a	
  way	
  that	
  leads	
  
itself	
  to	
  errors.	
  Examples	
  include	
  dead	
  local	
  stores,	
  switch	
  fall	
  through,	
  
unconfirmed	
  casts,	
  and	
  redundant	
  null	
  check	
  of	
  value	
  known	
  to	
  be	
  null.	
  
More	
  false	
  posiUves	
  accepted.	
  In	
  previous	
  versions	
  of	
  FindBugs,	
  this	
  
category	
  was	
  known	
  as	
  Style.	
  	
  
	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Demo	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Report	
  
Checkstyle
PMD
Findbugs
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
References	
  
•  hIp://source.android.com/source/code-­‐
style.html	
  
•  hIp://www.oracle.com/technetwork/java/
codeconv-­‐138413.html	
  
•  hIp://findbugs.sourceforge.net	
  
•  hIp://pmd.sourceforge.net/	
  
•  hIp://eclipse-­‐cs.sourceforge.net/	
  
We	
  Know	
  Business,	
  We	
  Know	
  Technology,	
  We	
  Are	
  Global	
  
Thank	
  you	
  

Más contenido relacionado

Similar a Aandroid coding convention and quality assurance plugin

Testingonandroid v2-091203161835-phpapp02
Testingonandroid v2-091203161835-phpapp02Testingonandroid v2-091203161835-phpapp02
Testingonandroid v2-091203161835-phpapp02
Gustavo Fuentes Zurita
 
Testingonandroid v2-091203161835-phpapp02
Testingonandroid v2-091203161835-phpapp02Testingonandroid v2-091203161835-phpapp02
Testingonandroid v2-091203161835-phpapp02
Gustavo Fuentes Zurita
 
TEE - kernel support is now upstream. What this means for open source security
TEE - kernel support is now upstream. What this means for open source securityTEE - kernel support is now upstream. What this means for open source security
TEE - kernel support is now upstream. What this means for open source security
Linaro
 
TeelTech - Advancing Mobile Device Forensics (online version)
TeelTech - Advancing Mobile Device Forensics (online version)TeelTech - Advancing Mobile Device Forensics (online version)
TeelTech - Advancing Mobile Device Forensics (online version)
Mike Felch
 
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
ANUSUYA S
 

Similar a Aandroid coding convention and quality assurance plugin (20)

Intro To AOP
Intro To AOPIntro To AOP
Intro To AOP
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
 
Mufix Network Programming Lecture
Mufix Network Programming LectureMufix Network Programming Lecture
Mufix Network Programming Lecture
 
Testing on Android
Testing on AndroidTesting on Android
Testing on Android
 
Testingonandroid v2-091203161835-phpapp02
Testingonandroid v2-091203161835-phpapp02Testingonandroid v2-091203161835-phpapp02
Testingonandroid v2-091203161835-phpapp02
 
Testingonandroid v2-091203161835-phpapp02
Testingonandroid v2-091203161835-phpapp02Testingonandroid v2-091203161835-phpapp02
Testingonandroid v2-091203161835-phpapp02
 
ANDROID FDP PPT
ANDROID FDP PPTANDROID FDP PPT
ANDROID FDP PPT
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 
Secure pl-sql-coding
Secure pl-sql-codingSecure pl-sql-coding
Secure pl-sql-coding
 
TEE - kernel support is now upstream. What this means for open source security
TEE - kernel support is now upstream. What this means for open source securityTEE - kernel support is now upstream. What this means for open source security
TEE - kernel support is now upstream. What this means for open source security
 
aura_profile-corp
aura_profile-corpaura_profile-corp
aura_profile-corp
 
Introduction to iPhone Development
Introduction to iPhone DevelopmentIntroduction to iPhone Development
Introduction to iPhone Development
 
Introduction to iPhone Development
Introduction to iPhone DevelopmentIntroduction to iPhone Development
Introduction to iPhone Development
 
So You Just Inherited a $Legacy Application… NomadPHP July 2016
So You Just Inherited a $Legacy Application… NomadPHP July 2016So You Just Inherited a $Legacy Application… NomadPHP July 2016
So You Just Inherited a $Legacy Application… NomadPHP July 2016
 
Does Java Have a Future After Version 8? (Belfast JUG April 2014)
Does Java Have a Future After Version 8? (Belfast JUG April 2014)Does Java Have a Future After Version 8? (Belfast JUG April 2014)
Does Java Have a Future After Version 8? (Belfast JUG April 2014)
 
FluentSelenium Presentation Code Camp09
FluentSelenium Presentation Code Camp09FluentSelenium Presentation Code Camp09
FluentSelenium Presentation Code Camp09
 
TeelTech - Advancing Mobile Device Forensics (online version)
TeelTech - Advancing Mobile Device Forensics (online version)TeelTech - Advancing Mobile Device Forensics (online version)
TeelTech - Advancing Mobile Device Forensics (online version)
 
Core java
Core javaCore java
Core java
 
So You Just Inherited a $Legacy Application...
So You Just Inherited a $Legacy Application...So You Just Inherited a $Legacy Application...
So You Just Inherited a $Legacy Application...
 
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
 

Más de Duy Tan Geek

Amazon Elastic Load Balancing
Amazon Elastic Load BalancingAmazon Elastic Load Balancing
Amazon Elastic Load Balancing
Duy Tan Geek
 
Cloud - FOSS & Challenge
Cloud - FOSS & ChallengeCloud - FOSS & Challenge
Cloud - FOSS & Challenge
Duy Tan Geek
 
AWS, is it interesting?
AWS, is it interesting?AWS, is it interesting?
AWS, is it interesting?
Duy Tan Geek
 
Cloud DC Transforming
Cloud DC TransformingCloud DC Transforming
Cloud DC Transforming
Duy Tan Geek
 
Becoming a better programmer - unit testing
Becoming a better programmer - unit testingBecoming a better programmer - unit testing
Becoming a better programmer - unit testing
Duy Tan Geek
 
Practical TDD in Septeni Technology
Practical TDD in Septeni TechnologyPractical TDD in Septeni Technology
Practical TDD in Septeni Technology
Duy Tan Geek
 
Build Quality In with TDD
Build Quality In with TDDBuild Quality In with TDD
Build Quality In with TDD
Duy Tan Geek
 
Sharing bridge SE working experience of myself
Sharing bridge SE working experience of myselfSharing bridge SE working experience of myself
Sharing bridge SE working experience of myself
Duy Tan Geek
 
Game development with Cocos2d-x Engine
Game development with Cocos2d-x EngineGame development with Cocos2d-x Engine
Game development with Cocos2d-x Engine
Duy Tan Geek
 
HTML5 mobile games
HTML5 mobile gamesHTML5 mobile games
HTML5 mobile games
Duy Tan Geek
 
Game engine introduction and approach
Game engine introduction and approachGame engine introduction and approach
Game engine introduction and approach
Duy Tan Geek
 
10 things you need to know about doing business with Japanese
10 things you need to know about doing business with Japanese10 things you need to know about doing business with Japanese
10 things you need to know about doing business with Japanese
Duy Tan Geek
 
Enjoy Japanese work style
Enjoy Japanese work styleEnjoy Japanese work style
Enjoy Japanese work style
Duy Tan Geek
 
A cup of coffee worth 10 dollars is what we are going to sell!
A cup of coffee worth 10 dollars is what we are going to sell!A cup of coffee worth 10 dollars is what we are going to sell!
A cup of coffee worth 10 dollars is what we are going to sell!
Duy Tan Geek
 
Introduction to pmp
Introduction to pmpIntroduction to pmp
Introduction to pmp
Duy Tan Geek
 
Beyond project management
Beyond project managementBeyond project management
Beyond project management
Duy Tan Geek
 
The way to set automation testing
The way to set automation testingThe way to set automation testing
The way to set automation testing
Duy Tan Geek
 
Quality Management Introduction
Quality Management IntroductionQuality Management Introduction
Quality Management Introduction
Duy Tan Geek
 
Techniques in black box testing
Techniques in black box testingTechniques in black box testing
Techniques in black box testing
Duy Tan Geek
 

Más de Duy Tan Geek (20)

Amazon Elastic Load Balancing
Amazon Elastic Load BalancingAmazon Elastic Load Balancing
Amazon Elastic Load Balancing
 
Cloud - FOSS & Challenge
Cloud - FOSS & ChallengeCloud - FOSS & Challenge
Cloud - FOSS & Challenge
 
AWS, is it interesting?
AWS, is it interesting?AWS, is it interesting?
AWS, is it interesting?
 
Cloud DC Transforming
Cloud DC TransformingCloud DC Transforming
Cloud DC Transforming
 
Becoming a better programmer - unit testing
Becoming a better programmer - unit testingBecoming a better programmer - unit testing
Becoming a better programmer - unit testing
 
Practical TDD in Septeni Technology
Practical TDD in Septeni TechnologyPractical TDD in Septeni Technology
Practical TDD in Septeni Technology
 
Build Quality In with TDD
Build Quality In with TDDBuild Quality In with TDD
Build Quality In with TDD
 
Sharing bridge SE working experience of myself
Sharing bridge SE working experience of myselfSharing bridge SE working experience of myself
Sharing bridge SE working experience of myself
 
Game development with Cocos2d-x Engine
Game development with Cocos2d-x EngineGame development with Cocos2d-x Engine
Game development with Cocos2d-x Engine
 
HTML5 mobile games
HTML5 mobile gamesHTML5 mobile games
HTML5 mobile games
 
Game engine introduction and approach
Game engine introduction and approachGame engine introduction and approach
Game engine introduction and approach
 
10 things you need to know about doing business with Japanese
10 things you need to know about doing business with Japanese10 things you need to know about doing business with Japanese
10 things you need to know about doing business with Japanese
 
Enjoy Japanese work style
Enjoy Japanese work styleEnjoy Japanese work style
Enjoy Japanese work style
 
A cup of coffee worth 10 dollars is what we are going to sell!
A cup of coffee worth 10 dollars is what we are going to sell!A cup of coffee worth 10 dollars is what we are going to sell!
A cup of coffee worth 10 dollars is what we are going to sell!
 
Leader ship value
Leader ship valueLeader ship value
Leader ship value
 
Introduction to pmp
Introduction to pmpIntroduction to pmp
Introduction to pmp
 
Beyond project management
Beyond project managementBeyond project management
Beyond project management
 
The way to set automation testing
The way to set automation testingThe way to set automation testing
The way to set automation testing
 
Quality Management Introduction
Quality Management IntroductionQuality Management Introduction
Quality Management Introduction
 
Techniques in black box testing
Techniques in black box testingTechniques in black box testing
Techniques in black box testing
 

Último

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Último (20)

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 

Aandroid coding convention and quality assurance plugin

  • 1. We  Know  Business,  We  Know  Technology,  We  Are  Global   About  me   Private  Informa>on    Name:  Le  Ngoc  Viet    Phone:  0168.948.9579    Email:  vietln6223@setacinq.com.vn,  vietln811@gmail.com      Skype:  lengocviet    Facebook:  hIp://facebook.com/viet.lengoc     Work  History    2010/08~2012/04:  AnLab  Company/  Android  Senior  Developer    2012/05~Now:  SETA  InternaUonal  Vietnam/  Android  Tech-­‐Leader  &   IOS  Senior  Developer
  • 2. We  Know  Business,  We  Know  Technology,  We  Are  Global   SETA Group Company  Informa>on   Global  IdenUty:   SETA  InternaUonal (HQ) Headquarters:   Newport  Beach,  CA   Founded:   2008   2 ü  Hanoi,  Vietnam(230)     ü  Dublin,  Ireland(20)   ü  Los  Angeles,  USA(15)   ü  Tokyo,Japan(30)                                                        *w/Terras   ü  Los  Angeles(HQ)   ü  Dublin(Branch)   ü  Sydney(Partner)   ü  Singapore(Partner)   ü  Tokyo(Branch)   Fulfillment  Centers:   Sales  LocaUons: SETA  Interna>onal  Vietnam   Headquarters:   Hanoi,  Vietnam   Founded:   2009   Employees:   230  +   Website:   www.seta-­‐internaUonal.com   Address:   4th  floor,  3D  Building,  Duy  Tan  Str,  Cau   Giay,  HN   Tel/  Phone:   (84)  37-­‐950-­‐983  
  • 3. We  Know  Business,  We  Know  Technology,  We  Are  Global   Android coding convention and Quality assurance plugin   2013.  12  
  • 4. We  Know  Business,  We  Know  Technology,  We  Are  Global   Topics §  Android  Coding  ConvenUon   §  Quality  Assurance  Code  Plugins  (Eclipse)   §  Q&A  
  • 5. We  Know  Business,  We  Know  Technology,  We  Are  Global   Why  Need  Coding  ConvenUon?  
  • 6. We  Know  Business,  We  Know  Technology,  We  Are  Global   Why  Need  Coding  ConvenUon?   Code  convenUons  are  important  to  programmers   for  a  number  of  reasons:   –  40%-­‐80%  of  the  lifeUme  cost  of  a  piece  of  soiware   goes  to  maintenance.   –  Hardly  any  soiware  is  maintained  for  its  whole  life  by   the  original  author.   –  Code  convenUons  improve  the  readability  of  the   soiware,  allowing  engineers  to  understand  new  code   more  quickly  and  thoroughly.   –  If  you  ship  your  source  code  as  a  product,  you  need  to   make  sure  it  is  as  well  packaged  and  clean  as  any   other  product  you  create.    
  • 7. We  Know  Business,  We  Know  Technology,  We  Are  Global   Coding  ConvenUon   Coding  ConvenUon  ?   – Coding  convenUons  are  a  set  of  guidelines  for  a   specific  programming  language  that  recommend   programming  style,  pracUces  and  methods  for   each  aspect  of  a  piece  program  wriIen  in  this   language.  
  • 8. We  Know  Business,  We  Know  Technology,  We  Are  Global   Android  Coding  ConvenUon   •  Standard  Java  coding  convenUons   •  Android  coding  convenUons    
  • 9. We  Know  Business,  We  Know  Technology,  We  Are  Global   Android  Coding  ConvenUons  
  • 10. We  Know  Business,  We  Know  Technology,  We  Are  Global   Name  ConvenUons   Use  “m”  for  non-­‐public,  non  sta>c  fields   –  “m”  for  “member  variable”  or  “data  member”   •  Yes   –  private  String  mFirstName;   –  private  boolean  mIsMarried;   •  No   –  private  String  firstName;   –  private  boolean  isMarried;   •  Use  “s”  for  sta>c  (non-­‐final)  fields   •  Yes   –  private  staUc  double  sBiggestRadius;   •  No   –  private  staUc  double  biggestRadius;   For  example:    public  class  MyClass  {          public  staUc  final  int  SOME_CONSTANT  =  42;          public  int  publicField;          private  staUc  MyClass  sSingleton;          int  mPackagePrivate;          private  int  mPrivate;          protected  int  mProtected;   }  
  • 11. We  Know  Business,  We  Know  Technology,  We  Are  Global   Impact  of  Naming  ConvenUon   on  Constructors   Standard  Style   public  class  Person  {          private  String  firstName,  lastName;          public  Person(String  firstName,                                                            String  lastName)  {                  this.firstName  =  firstName;                  this.lastName  =  lastName;          }          …   }   Android  Style   public  class  Person  {          private  String  mFirstName,  mLastName;          public  Person(String  firstName,                                                            String  lastName)  {                  mFirstName  =  firstName;                  mLastName  =  lastName;          }          …   }  
  • 12. We  Know  Business,  We  Know  Technology,  We  Are  Global   Never  Ignore  ExcepUons   void  setServerPort(String  value)  {          try  {                  serverPort  =  Integer.parseInt(value);          }  catch  (NumberFormatExcepUon  e)  {  }   }    
  • 13. We  Know  Business,  We  Know  Technology,  We  Are  Global   Don't  Catch  Generic  ExcepUon   try  {        someComplicatedIOFuncUon();                //  may  throw  IOExcepUon          someComplicatedParsingFuncUon();      //  may  throw  ParsingExcepUon          someComplicatedSecurityFuncUon();    //  may  throw  SecurityExcepUon          //  phew,  made  it  all  the  way   }  catch  (ExcepUon  e)  {                                  //  I'll  just  catch  all  excepUons          handleError();                                            //  with  one  generic  handler!   }      
  • 14. We  Know  Business,  We  Know  Technology,  We  Are  Global   Use  Spaces  for  IndentaUon   We  use  8  space  indents  for  line  wraps,  including  funcUon  calls   and  assignments.  For  example,     this  is  correct:   Instrument  i  =                  someLongExpression(that,  wouldNotFit,  on,  one,  line);     and  this  is  not  correct:   Instrument  i  =          someLongExpression(that,  wouldNotFit,  on,  one,  line);  
  • 15. We  Know  Business,  We  Know  Technology,  We  Are  Global   Coding  ConvenUons   •  Write  Short  Methods   –  No  official  limit,  but  try  to  keep  methods  short  and  focused.  Think  oien  about   how  to  refractor  your  code  to  break  it  into  smaller  and  more  reusable  pieces.   –  Max  line  of  method  is  40  lines.       •  Keep  lines  short   –  They  have  a  strict  rule  of  100  characters  except  for  imports  or  comments  that   contain  URLs  or  commands  that  cannot  be  broken  up.  
  • 16. We  Know  Business,  We  Know  Technology,  We  Are  Global   Treat  Acronyms  as  Words   Treat  acronyms  and  abbreviaUons  as  words  in  naming  variables,   methods,  and  classes.  The  names  are  much  more  readable:                Good                                Bad   XmlHIpRequest      XMLHTTPRequest   getCustomerId      getCustomerID   class  Html        class  HTML   String  url        String  URL   long  id                                long  ID  
  • 17. We  Know  Business,  We  Know  Technology,  We  Are  Global   Order  Import  Statements   First   –  Android  packages   •  import  android.foo.Bar;   •  Second   –  Third  party  packages   •  import  com.coreservlets.uUls.RandomUUls;   •  Third   –  Standard  java  or  javax  packages   •  import  java.uUl.*;   •  Within  each  group   –  AlphabeUcal  (uppercase  Z  before  lowercase  a)   •  Separa>ng  groups   –  Blank  line  between  each  major  grouping  
  • 18. We  Know  Business,  We  Know  Technology,  We  Are  Global   Quality  Assurance  Code   •  Why  need  quality  assurance  code.   •  Aims  of  quality  assurance  code.   •  Tool  support.    
  • 19. We  Know  Business,  We  Know  Technology,  We  Are  Global   Why  need  quality  assurance   code?  
  • 20. We  Know  Business,  We  Know  Technology,  We  Are  Global   Aims  of  quality  assurance  code   -­‐  Developing  the  code  quality   -­‐  Decreasing  bugs  in  the  development  phase   and  cost  to  repair  defect  aier  release.  
  • 21. We  Know  Business,  We  Know  Technology,  We  Are  Global   QA  code  plugin  (eclipse)   •  Checkstyle   •  PMD   •  Findbugs      
  • 22. We  Know  Business,  We  Know  Technology,  We  Are  Global   Checkstyle     Checkstyle  is  a  development  tool  to  help   programmers  write  Java  code  that  adheres  to  a   coding  standard.  It  automates  the  process  of   checking  Java  code  to  spare  humans  of  this   boring  (but  important)  task.  This  makes  it  ideal   for  projects  that  want  to  enforce  a  coding   standard.    
  • 23. We  Know  Business,  We  Know  Technology,  We  Are  Global   Demo  
  • 24. We  Know  Business,  We  Know  Technology,  We  Are  Global   PMD    PMD  is  a  source  code  analyzer.  It  finds  common  programming  flaws  like  unused   variables,  empty  catch  blocks,  unnecessary  object  creaUon,  and  so  forth.  It   supports  Java,  JavaScript,  XML,  XSL.     AddiUonally  it  includes  CPD,  the  copy-­‐paste-­‐detector.  CPD  finds  duplicated  code  in   Java,  C,  C++,  C#,  PHP,  Ruby,  Fortran,  JavaScript.  
  • 25. We  Know  Business,  We  Know  Technology,  We  Are  Global   What  is  PMD?   PMD  scans  Java  source  code  and  looks  for  poten>al  problems  like:   –  Possible  bugs  -­‐  empty  try/catch/finally/switch  statements   –  Dead  code  -­‐  unused  local  variables,  parameters  and  private  methods   –  SubopUmal  code  -­‐  wasteful  String/StringBuffer  usage   –  Overcomplicated  expressions  -­‐  unnecessary  if  statements,  for  loops  that   could  be  while  loops   –  Duplicate  code  -­‐  copied/pasted  code  means  copied/pasted  bugs  
  • 26. We  Know  Business,  We  Know  Technology,  We  Are  Global   Demo  
  • 27. We  Know  Business,  We  Know  Technology,  We  Are  Global   FindBugs   –  Findbugs  is  an  Open  Source  project  for  staUc  analysis  of  the  Java  bytecode   to  idenUfy  potenUal  soiware  bugs.  The  Findbugs  analysis  can  be   integrated  into  the  Eclipse  IDE  via  an  addiUonal  soiware  component.   –  Findbugs  provides  early  feedback  about  potenUal  errors  in  the  code.  This   helps  the  developer  to  access  these  problems  early  in  the  development   phase.  
  • 28. We  Know  Business,  We  Know  Technology,  We  Are  Global   Findbugs Correctness  bug  -­‐  Probable  bug  -­‐  an  apparent  coding  mistake  resulUng  in   code  that  was  probably  not  what  the  developer  intended.  We  strive  for  a   low  false  posiUve  rate.     Bad  PracUce  -­‐  ViolaUons  of  recommended  and  essenUal  coding  pracUce.   Examples  include  hash  code  and  equals  problems,  cloneable  idiom,   dropped  excepUons,  serializable  problems,  and  misuse  of  finalize.  We   strive  to  make  this  analysis  accurate,  although  some  groups  may  not  care   about  some  of  the  bad  pracUces.     Dodgy  -­‐  Code  that  is  confusing,  anomalous,  or  wriIen  in  a  way  that  leads   itself  to  errors.  Examples  include  dead  local  stores,  switch  fall  through,   unconfirmed  casts,  and  redundant  null  check  of  value  known  to  be  null.   More  false  posiUves  accepted.  In  previous  versions  of  FindBugs,  this   category  was  known  as  Style.      
  • 29. We  Know  Business,  We  Know  Technology,  We  Are  Global   Demo  
  • 30. We  Know  Business,  We  Know  Technology,  We  Are  Global   Report   Checkstyle PMD Findbugs
  • 31. We  Know  Business,  We  Know  Technology,  We  Are  Global   References   •  hIp://source.android.com/source/code-­‐ style.html   •  hIp://www.oracle.com/technetwork/java/ codeconv-­‐138413.html   •  hIp://findbugs.sourceforge.net   •  hIp://pmd.sourceforge.net/   •  hIp://eclipse-­‐cs.sourceforge.net/  
  • 32. We  Know  Business,  We  Know  Technology,  We  Are  Global   Thank  you