surapan-th / dudo Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/dudo
Automatically exported from code.google.com/p/dudo
I am a fan of Dudo, and recently I am writing a static code analysis tool to
conduct performance analysis for Android apps. I found Internal Getters/Setters
in Dudo's code.
As suggested by Android Developers,"In native languages like C++ it's common
practice to use getters (i = getCount()) instead of accessing the field
directly (i = mCount). This is an excellent habit for C++ and is often
practiced in other object oriented languages like C# and Java, because the
compiler can usually inline the access, and if you need to restrict or debug
field access you can add the code at any time.
However, this is a bad idea on Android. Virtual method calls are expensive,
much more so than instance field lookups. It's reasonable to follow common
object-oriented programming practices and have getters and setters in the
public interface, but within a class you should always access fields directly."
We found the violations in these class:
Class name: com.caverock.androidsvg.SVGAndroidRenderer
--Handler name:
com.caverock.androidsvg.SVGAndroidRenderer.updateStyle(Lcom/caverock/androidsvg/
SVGAndroidRenderer$RendererState;Lcom/caverock/androidsvg/SVG$Style;)V
--Called inner Getter or Setter:
com.caverock.androidsvg.SVGAndroidRenderer.getCurrentFontSize()F
Class name: net.margaritov.preference.colorpicker.ColorPickerDialog
--Handler name:
net.margaritov.preference.colorpicker.ColorPickerDialog.updateHexLengthFilter()V
--Called inner Getter or Setter:
net.margaritov.preference.colorpicker.ColorPickerDialog.getAlphaSliderVisible()Z
--Handler name:
net.margaritov.preference.colorpicker.ColorPickerDialog.updateHexValue(I)V
--Called inner Getter or Setter:
net.margaritov.preference.colorpicker.ColorPickerDialog.getAlphaSliderVisible()Z
--Handler name:
net.margaritov.preference.colorpicker.ColorPickerDialog.setAlphaSliderVisible(Z)
V
--Called inner Getter or Setter:
net.margaritov.preference.colorpicker.ColorPickerDialog.getColor()I
--Handler name:
net.margaritov.preference.colorpicker.ColorPickerDialog.setHexValueEnabled(Z)V
--Called inner Getter or Setter:
net.margaritov.preference.colorpicker.ColorPickerDialog.getColor()I
Class name: com.caverock.androidsvg.SVG
--Handler name: com.caverock.androidsvg.SVG.getViewList()Ljava/util/Set;
--Called inner Getter or Setter:
com.caverock.androidsvg.SVG.getElementsByTagName(Ljava/lang/Class;)Ljava/util/Li
st;
Although I admit that it is a minor issue, but I sincerely hope that it can
help you to improve Dudo.
You may find more useful information in this references:
http://developer.android.com/training/custom-views/custom-drawing.html
Original issue reported on code.google.com by [email protected]
on 2 Apr 2014 at 6:38
we love this game and having it on our smart phones makes it very portable.
but 2 things are missing
1) being able to choose number of starting dice (we play with 6)
2) button for winning back a dice.(Win a dice on getting perfect guess of how
many)
Original issue reported on code.google.com by [email protected]
on 6 Jul 2013 at 9:26
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.