Apr 29, 2016

Go Language For Java Developer Part-6 : Operators


Operators in Java and Go Lang.  Every programming languages support operators. Operators are work like a function with different syntax compared to normal function. For example arithmetic operator +.

List of Operators in Java & Go Lang

The Following table has a list of operators available in the language.

Sr
Operator
Description
Go
Java
1
+
addition
Yes
Yes
2
-
subtraction
Yes
Yes
3
*
multiplication
Yes
Yes
4
/
quotient
Yes
Yes
5
%
remainder
Yes
Yes
6
&
bitwise and
Yes
Yes
7
|
bitwise or
Yes
Yes
8
^
bitwise xor
Yes
Yes
9
~
bitwise compliment

Yes
10
&^
bit clear (and not)
Yes

11
<<
left shift
Yes
Yes
12
>>
right shift
Yes
Yes
13
>>>
zero fill right shift

Yes
14
++
Increment

Yes
15
Decrement

Yes
16
=
equal
Yes
Yes
17
==
equal to

Yes
18
!=
not equal
Yes
Yes
19
<
less than
Yes
Yes
20
<=
less than or equal
Yes
Yes
21
>
greater than
Yes
Yes
22
>=
greater than or equal
Yes
Yes
23
&&
logical and
Yes
Yes
24
||
logical or
Yes
Yes
25
!
logical not
Yes
Yes
26
&
address of / create pointer
Yes

27
*
dereference pointer
Yes

28
<-
send / receive operator (see 'Channels' below)
Yes

29
+=
assignment Operators

Yes
30
-=
assignment Operators

Yes
31
*=
assignment Operators

Yes
32
/=
assignment Operators

Yes
33
%=
assignment Operators

Yes
34
<<=
assignment Operators

Yes
35
>>=
assignment Operators

Yes
36
&=
assignment Operators

Yes
37
^=
assignment Operators

Yes
38
|=
assignment Operators

Yes
39
?:
conditional operator

Yes

Go language doesn't have assignment operator (+=) but Go lang has & operator which works as bitwise operator and address of the pointer. Go lang has bit clear &^ operator while Java has bit shift operators.

Reference:
1. Go Lang :https://golang.org/ref/spec#Operators
2. Java Language: https://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.12

continue reading Go Language For Java Developer Part-6 : Operators

Sep 29, 2015

Android App Review: Vyomo Beauty Salon Booking



Search & Discover Legendary Salons & Spas Around You in Less Than 2 Minutes. Book the top beauty & wellness professionals around you- hair stylists, tattoo artists, barbers, massage therapists and everything else related to Beauty & wellness.

Design Review

This can be replaced with toast or no internet connection screen. Dialog / Alert box may annoy users.

Alert box for validation is not good UI practice as, it requires extra click for user to close alert box.

This alert box is proper because it confirms some action from the user. If profile pic is important then its better to explain why profile pic is needed?

Another dialog..... :-(
And again dialog... too much dialog in setup or starting up the application will irritate users. Sign Up steps must be simple and easy.

Header Application logo and title "search/ book" are not vertical centre (point 1,2 and 3 in image). "By Service" menu is also not vertical centre (point 6 in image). Un-selected tab "By Salon" don't have tab border. It should be able to give the feel of tab. There should be border on top or colour difference.  "More" option should be indicated separately. It should not be a part of menu (point 4 in image). "Book" button has very small font size. Font size should be appropriate to button size (point 5 in image).

Upto this screen most of the things are in rectangle border, but here search edit text is rounded corner which looks odd. Position of search bar makes entire screen ugly. There should be top spacing between search bar (point 1 in image). Again "Back" is the part of menu option (point 2 in image).

In this screen Un-selected tab has dark background colour which creates design inconsistency. In home screen, "By Salon" tab has transparent background. No description required for point 1 in image.

Left menu padding should be same for all menu items (point 2 in image). Sliding or Hamburger menu should not have back button (point 1 in image). It will confuse the user.

Left padding of cart icon and face care is different. Left and Right sliding menu looks very odd and difficult for user. Right slide menu can be converted into Activity / Screen and provide option in hamburger menu.

Application logo, location and tabs occupies almost half of the screen, which makes very annoying to scroll salon list (point 1 and 2 in image). Salon row design have few problem like name of salon is not highlight because of background image. Background image should be blur. Salon name should have bold font and different colour like dark pink. Components like star rating, address, title and distance are not at proper place and order.

This flow is very confusing for user. Salon detail screen design is very complicated. Back arrow below info logo is confusing (point 1 in image). Up arrow on right side is not highlighted (point 2 in image). Alignment of title "Tatto0 &..." below details are not left alignment (point 3 in image).

Performance Review

Above images has lots of dark red area, which is a sign of very poor performance. When application render a portion of screen multiple times, it displays dark red colour and light red in screen. This is GPU Overdraw benchmark. Read this link for more information about GPU Overdraw https://developer.android.com/tools/performance/debug-gpu-overdraw/index.html

Profile GPU Rendering gives you a quick visual representation of how much time it takes to render the frames of a UI window relative to the 16-ms-per-frame benchmark. Above image has issue in few frame rendering. Read this link for more information https://developer.android.com/tools/performance/profile-gpu-rendering/index.html

Memory Profile

Application takes 17 MB on splash screen. There could be various reasons for memory allocation. 

Security

In this application there are many security flows ranging from minor to major.

Library, Framework & Services

Following libraries, frameworks and services are integrated in the application.
  1. Bolts-Android - https://github.com/BoltsFramework/Bolts-Android
  2. PagerSlidingTabStrip - https://github.com/astuetz/PagerSlidingTabStrip
  3. Crashlytics - https://www.crashlytics.com/
  4. Facebook SDK - https://developers.facebook.com/docs/android/
  5. Flurry - https://developer.yahoo.com/flurry/
  6. Asynchronous Http Client - http://loopj.com/android-async-http/
  7. Mobile App Tracking - http://developers.mobileapptracking.com/android-sdk/
  8. Paypal SDK - https://developer.paypal.com/docs/integration/mobile/mobile-sdk-overview/
  9. OKhttp - http://square.github.io/okhttp/
  10. Picasso - http://square.github.io/picasso/
  11. Card.io - https://github.com/card-io/card.io-Android-SDK
  12. Twitter's Fabric - https://get.fabric.io/#SDKs
  13. Squareup Okio - http://square.github.io/okio/
  14. Calligraphy - https://github.com/chrisjenx/Calligraphy
In above list, I found strange things. I don't understand why they are using multiple libraries for network operations i.e. Async Http client and Retrofit+okhttp.

Android Manifest Statics

  1. Package Name: com.vyomocp
  2. Version Code: 22
  3. Version Name: 5.1.1-1819727
  4. Support Screen: Any
  5. GCM: Yes
  6. Uses Permission: 18
  7. Uses Feature: 4
  8. Activity: 27
  9. Receiver: 3
  10. Service: 2
  11. Meta Data: 5

Summary

Overall I would say it's an average application from technical perspective. Wow factor is missing in Design. Performance is ok, Security need improvement.
 
Disclaimer
Information provided in this article is purely for knowledge sharing purpose. No intension to favour or harm reputation of the application. Insight information of application is provided for knowledge sharing and learning purpose. Owner of the blog don't have any responsibility of how, when and what purpose reader use this information.

 




    





 

continue reading Android App Review: Vyomo Beauty Salon Booking

Sep 23, 2015

Android App Review: First Run C25K Fitness Trainer

Design Review

First Run application design don't have 'Wow' factor but it's also not ugly. You will find inconsistency in many screens. At first, the application will impress you with splash screen and login / signup screen. Sign In / Signup screen's design looks perfect with social login options as well as manual signup and sign in options. You can also use this application without Sign In / Sign Up.
Here is my observation for the design
This screen is part of application. Yes, Entire screen without design. When user select Music folder this screen appear.

Sign Up or Sign In screen. Looks perfect. Application logo and background image are placed perfectly. Nice design to provide Social and manual login options.
Sign Up Dialog. When I looked at this screen first time, I had a question in my mind, Why EditText are rounded corner and Button with square corner? Both looks very odd. When dialog appear cursor blink to Email EditText but keyboard is not visible. Generally, when cursor blinks keyboard should be visible. The height of EditText is larger than button's height. It gives feeling like button is squeezed.

When you click on Sign Up without typing anything, Application display message "Invalid Email ID" in toast. Message text and the way it is displayed, is not professional. There isn't any visual indication for wrong data (email or password). Application displays only Toast messages.


Sign In screen. When you click on Sign Up button, Application will open dialog on same screen but when you click on Sign In button, Application will open new screen / activity without background image. Which gives feeling inconsistency.
When user selects program, above screen appear. "Prepare your run..." message is not vertically centre. Entire screen is blank except this message. It looks ugly.
You can easily recognise that the content display, inside WebView. 1) Back arrow is non standard. 2) Running form label and the arrow image is not properly align. This screens can be improved a lot. There can be three steps wizard with nice designs. Caption text below video can justify.
Inconsistency, Few screen has action bar back button and few screen don't have. Actionbar Title and Sub title is in italic. Point 2 in image, thickness and cap between lines are different. Point 3 player control is too small.

Performance Review



 This is GPU Overdraw benchmark, It's good that only centre section is red. Read this link for more information about GPU Overdraw https://developer.android.com/tools/performance/debug-gpu-overdraw/index.html
Profile GPU Rendering gives you a quick visual representation of how much time it takes to render the frames of a UI window relative to the 16-ms-per-frame benchmark. Above image has issue in few frame rendering. Read this link for more information https://developer.android.com/tools/performance/profile-gpu-rendering/index.html

Memory Profile

This application is memory hungry, Above screen shot illustrate memory allocation of the application on start. 58 MB Heap Size and 42 MB allocation is huge. Application may have issue with lower end devices. 33 MB is allocated as 1-byte array. It might happen that application persist high resolution images in memory.

Security

Security is always major flow in Android application. In this application there are many security flows ranging from minor to serious.

Library, Framework & Services

Following libraries, frameworks and services are integrated in the application.
  1. AChart Engine - http://www.achartengine.org/
  2. Amazon AWS - http://aws.amazon.com/mobile/sdk/
  3. AppVirality - https://www.appvirality.com/
  4. Facebook SDK - https://developers.facebook.com/docs/android/
  5. Flurry - https://developer.yahoo.com/flurry/
  6. Mint Splunk - https://mint.splunk.com/
  7. Twitter4j - http://twitter4j.org/en/index.html
  8. Bolts-Android - https://github.com/BoltsFramework/Bolts-Android
  9. Google Analytics - https://developers.google.com/analytics/devguides/collection/android/v4/

Android Manifest Statics

  1. Package Name: com.firstrun.prototyze
  2. Version Code: 21
  3. Version Name: 5.0.1-1624448
  4. Support Screen: Any
  5. GCM: Yes
  6. User Permission: 17
  7. Activity: 23
  8. Receiver: 6
  9. Service: 3
  10. Meta Data: 5


Summary

Overall I would say it's an average application from technical perspective. Wow factor is missing in Design. Performance is good, Security need drastic improvement.

Disclaimer

The information provided in this article is purely for knowledge sharing purpose. No intension to favour or harm reputation of the application. Insight information of application is provided for knowledge sharing and learning purpose. Owner of the blog don't have any responsibility of how, when and what purpose reader use this information.

 





continue reading Android App Review: First Run C25K Fitness Trainer

Go Language For Java Developer Part-5

Variables

Variable: A variable is a storage location for holding a value. The set of permissible values is determined by the variable's type.

Java Variable

Java language has primitive type and objects, both have different syntax to declare a variable
Primitive type variable
int a
String b
float c
Object type variable
Animal a = new Animal()
Student s = new Student()
Java is object oriented language so that we can have access modifier for variable declaration
private int a
public String b
protected float c
private Animal a 
In Java we can declare variable at many places like Local variable, Parameters, Class level, Instance variable.
Variable Naming
  1. Variable names are case-sensitive
  2. An unlimited-length sequence of Unicode letters and digits
  3. Beginning with a letter, the dollar sign "$", or the underscore character "_".
  4. No special characters allowd as identifier of variable
  5. We can't use reserved keywords

Go Variable

Variables in Go are created by first using the 'var' keyword, then specifying the variable name, the type and finally assigning a value to the variable.
package main
import "fmt"
func main() {
    var x int  // Line 1
    x = 10 // Line 2
    var y string = "Hello Go!" // Line 3
    fmt.Println(x)
    fmt.Println(y)
}
In Line 1, var indicate it's variable, x is name of variable and int is type of variable. In Line 2, we are assigning value in x variable. In Line 3, we have declare string variable and assign in single line
Since creating a new variable with a starting value is so common Go also supports a shorter statement:
y := "Hello Go!"
With above shorter syntax Go compiler will automatically identify that y is variable of type string and value is "Hello Go!".
Declare multiple variable at same time
var (
    name string
    age int
    location string
)
Go is not object oriented language so we don't have access modifier like we have in Java. In Go language, We have two place to declare variables 1. Inside Function 2. Out Side Function.
Function / Local Variable
package main
import "fmt"
func main(){
    var x int = 10  
    fmt.Println(x)
}
Global Variable: Any function can access y variable, x is local variable only accessible inside main function
package main
import "fmt"
var y int =10
func main(){
    var x int = 10
    fmt.Println(x)
    fmt.Println(y)
}
func hello(){
    fmt.Println(y)
}
Variable Name
  1. Name must be start with letter
  2. Name may contain letter, number and underscore (_)
  3. Name is character sensetive Num and num consider as two different variable

continue reading Go Language For Java Developer Part-5