8 December 2012

Android development crusade part 14:Learn Chinese game

Doms learn chinese v0.4 is ready since Monday.Well.Almost.

I spent third evenings to sort out problems with my easy to write app.
I will say that i was affected by Sod's law.
"Sod's law is a name for the axiom of "bad fortune will be tailored to the individual" and "anything that can go wrong, will".
I rewrote core of the app to make app easier to extend after v1.0,but something went terrible wrong and i end up with big mess."
Source: Wikipedia

I was suffer from few erros appearing contantly

First i had bug with remove duplicated words from possibe answer,which works before.  I tried few solution ,but  all of themdoesn't work.
Not good ,is it?

This is reason why using PSEUDO CODE is helpful in writing good code and this is what i have done in this case.Instead of rewriting

  public Word selectAUniqueWord(Word[] selectedAlreadyWords) {
boolean stepA = true;

DO/WHILE LOOP
  get new random word from list of words for this game
  FOR EACH word in  selectedAlreadyWords
    check,if word was used ,if yes repeat for next word from  selectedAlreadyWords list, if no then tell repeat do while loop and perform proccess again

Looks simple? Even for 1st year of computer science is clear and easy,so sometimes, if we confuse our brain with design it is good back to roots.
Even,if i spend on this project areound 45 minutes per day

Another few problems was caused by fact that i went mental and have done massive  code refactoring and improvments without single test ,design and that cause me ... a few prblems .

I saw for example:

WARN/ActivityManager(157): Duplicate finish request for ActivityRecord
Now tricky thing .... i use only one ...finish()
so why i see this error ?

Answer is ... i used   Intent.FLAG_ACTIVITY_CLEAR_TOP,which "magically" call ... finish();I need about it and add explenation. Suprisely this solve another error message:

12-06 22:30:09.534: ERROR/JavaBinder(157): !!! FAILED BINDER TRANSACTION !!!

It is bit weird,but true is .. . it is good to understand life cycle in deep details,when you do standard application.


I would like to apologize to my wife for being rude and swearing in this weekend :(.

I need to kick off my habit of mental development and back to quick design/implementaion/test A SINGLE feature. Once per time.Every single time when i do mental development.It cause chaos and waste.

Anyway my chinese app is ready for v0.4 release,which seems to be last release this year.I have a few more things to do to be v1.0 ready.

Current stats for my "Doms learn chinese:free game"

My chinese game is on page 12 in "learn chinese" :),[+1]
My chinese game is on page 11 in "learn chinese free",[ [+1]
My chinese game is on page 2 in "learn chinese game" :)[ [+-]
My chinese game is on page 2 in "learn chinese free game" :) [+-]


I will now focus on my diagnostic tool app,which still suffer from crash on cdma devices and 2 features are done and waiting for being added.
Unfortunately i need do another release for camera (v1.9) with all minor bug fixes ,before i start do ... v2.0.