tag:blogger.com,1999:blog-57024010289059857732024-03-08T08:31:25.597-08:00systemDotRun<a href="http://doridori.github.io">This blog has moved!</a>Unknownnoreply@blogger.comBlogger12125tag:blogger.com,1999:blog-5702401028905985773.post-3741256536809422302015-03-30T05:33:00.002-07:002015-03-30T05:33:45.309-07:00This blog is deprecatedI have migrated this blog to github, please check it out at <a href="http://doridori.github.io">doridori.github.io</a> and feel free to update your RSS :)Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5702401028905985773.post-66776374837143957742015-03-03T08:14:00.001-08:002015-03-27T06:58:30.820-07:00Android Testing: A Rough GuideThis post has moved <a href="http://doridori.github.io/android_testing_a_rough_guide/">here</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5702401028905985773.post-80626363393191309562015-02-27T06:38:00.001-08:002015-03-27T06:59:13.276-07:00Android Security: The Forgetful KeystoreThis post has moved <a href="http://doridori.github.io/android-security-the%20forgetful-keystore/">here</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5702401028905985773.post-3659192651052619512014-11-21T02:07:00.002-08:002015-03-27T06:59:47.845-07:00Android Testing with Dagger, Retrofit & MockWebServerThis post has moved <a href="http://doridori.github.io/Retrofit,%20MockWebServer%20&%20Dagger/">here</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5702401028905985773.post-46040530587205326522014-10-07T09:16:00.003-07:002015-03-27T07:00:28.505-07:00Android App Architecture: Lifecycle Events and AsynchronicityThis post has moved <a href="http://doridori.github.io/Android%20App%20Architecture-%20Lifecycle%20Events%20and%20Asynchronicity/">here</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5702401028905985773.post-69571183381574104112014-10-01T05:46:00.002-07:002015-03-27T07:01:12.297-07:00Using Robospice with OkHttp on AndroidThis post has moved <a href="http://doridori.github.io/ROBOSPICE%20&%20OKHTTP%20setup/">here</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5702401028905985773.post-90410744651428361642014-09-30T08:03:00.001-07:002015-03-27T07:02:10.855-07:00Whats the Point in font sizing?This post has moved <a href="http://doridori.github.io/Whats%20the%20Point%20(in%20fonts%20sizing)/">here</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5702401028905985773.post-17189405441476845612013-06-24T04:16:00.000-07:002015-03-27T07:03:09.990-07:00Cross platform mobile game framework comparisonThis post has moved <a href="http://doridori.github.io/cross-platform-mobile-game/">here</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5702401028905985773.post-77458890711406699942013-02-07T06:58:00.000-08:002013-06-10T05:42:33.640-07:00Handling Android application network connectivity<p>Here is a small snippit of how I handle Connectivity within some the applications I work on. A lot of apps dont seem to handle loss of connection correctly IMHO by either not showing a relevant error message or informing the user that there is an issue. Depending on the type of application, especially one that is meant to have a persistant network connection it can be useful to show some form of visual feedback when this is not the case. </p>
<p>The below is based upon <a href="http://developer.android.com/training/monitoring-device-state/connectivity-monitoring.html">Determining and Monitoring the Connectivity Status</a></p>
<p>The <code>ConnectivityReceiver</code> helper class I use can be found <a href="https://github.com/doridori/AndroidUtilDump/blob/master/android/AndroidUtilDump/src/couk/doridori/android/lib/io/ConnectivityReceiver.java">on github</a>.</p>
<p>The javadoc pretty much says it all but points to note are</p>
<ul>
<li>Remember to hook up to your <code>Activity</code>s lifecycle methods</li>
<li>Note that this is and always has been based upon a <strong>Sticky</strong> broadcast but this is not noted in the <a href="http://developer.android.com/reference/android/net/ConnectivityManager.html#CONNECTIVITY_ACTION">Android documentation</a>. Something to be aware of that is mentioned in the <code>ConnectivityReceiver</code> class doc.</li>
</ul>
<p>I have used this in the past by incorperating into a base class and using to trigger a <a href="https://github.com/keyboardsurfer/Crouton"><code>Crouton</code></a></p>
<p>This is the way I default to handling connectivity issues but I would be interested to hear of other approaches - let me know if you do it another way!! </p>
<p><strong>EDIT</strong>: (10/06/13) I have just seen that the guys at Novoda have created a small library to do this too. See <a href="https://github.com/novoda/merlin?utm_source=Android+Weekly&utm_campaign=2d2c5bbf26-Android_Weekly_63&utm_medium=email&utm_term=0_4eb677ad19-2d2c5bbf26-310455189">Merlin on Github</a>.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5702401028905985773.post-80557987117309002432013-02-06T01:59:00.004-08:002013-02-06T02:03:57.455-08:00My Android Dev RSS listI just found you can share an entire RSS folder through Google Reader. In case anyone quickly wants to have a roughly curated Android dev folder <a href="http://www.google.co.uk/reader/bundle/user%2F14068224008495639494%2Fbundle%2FAndroid%20dev">here is the link</a>. If you have any good ones that are not on here I would love to hear about them below. Thanks!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5702401028905985773.post-56209852566551959802013-02-04T04:55:00.002-08:002013-02-04T04:59:38.536-08:00John Whitney's 'Catalog'<br />
I had not heard of John Whitney until a couple of years ago when I was looking around the net for some inspirational old school animations. I didnt think anyone would have been creating these in the 1960's so was shocked when I came along this. Its very abstract but I find ideas popping into my head while I watch. Its apparently created using a self-constucted analogue computer which makes use of an WWII anti-aircraft gun site. Enjoy!<br />
<br />
'Catalog' from 1961<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/TbV7loKp69s?feature=player_embedded' frameborder='0'></iframe></div>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5702401028905985773.post-60396166600563848442013-01-29T09:40:00.005-08:002013-02-04T06:17:50.329-08:00Why 'The Divine Move'?My first blog post, exciting times! Maybe a warning is in order - this may be a bit of a ramble but I need to get the ball rolling somehow. I wanted to explain why I chose to call a blog by an Android developer something weird like 'The Divine Move'. In a nutshell, I find playing <a href="http://en.wikipedia.org/wiki/Go_(game)">Go</a> and writing code put me into the same mind set unlike any other activities (apart from maybe university level Mathematics). I wanted to just briefly explore why this may be and steal a cool Go term in the process (<a href="http://www.atari.com/">im not the only one</a>).<br />
<br />
<h2>
Go</h2>
I love Go. I came across Go first at Sussex Uni (where I studied CompSci, Music & Maths) where a student was writing a Go AI engine (<a href="http://www.dailygalaxy.com/my_weblog/2007/07/man-vs-machine-.html">not a trivial task</a>). My first personal Android project was building a Go client called <a href="https://play.google.com/store/apps/details?id=couk.doridori.goigoFull&hl=en">Goigo</a> for the IGS/Pandanet servers and I had to learn the rules properly to be able to create the reference docs that I desperately needed to understand the servers telnet protocol. Through out this process I slowly got addicted to the game and whilst watching the Go-based anime <a href="http://www.imdb.com/title/tt0426711/">Hikaru No Go</a> (go overkill here maybe) I came across the concept of <strong>The Divine Move</strong>.<br />
<blockquote>
A divine move is a truly inspired and original move; one that is non-obvious and which balances strategy and tactics to turn a losing game into a winning game. A divine move is singular — they are of such rarity that a full time go player might be lucky to play a single such move in their lifetime.</blockquote>
This is quite an attractive idea when you have been slowly losing for 2 hours to think there may still be a way of turning the game round. Ive seen it happen a few times between <em>beginners</em> where one move drastically changes the outcome of the game but its really referring to this as the pro level I feel. But what relevance does this have to software development? Well unfortunately there is no such thing as 'The Divine Refactor' or changing one line of code to make a sucky codebase fantastic. It still is loosely related for me as the mindset of playing Go and writing code are <em>very</em> similar and associatively linked via the nature of <strong>intuition</strong> due to both being tasks that make heavy use of <a href="http://en.wikipedia.org/wiki/Abstraction">abstraction</a>.<br />
<br /><h2>
Intuition</h2>
What is intuition? According to Wikipedia<br />
<blockquote>
Intuition is the ability to acquire knowledge without inference and/or the use of reason.</blockquote>
and also<br />
<blockquote>
Intuition provides us with beliefs that we cannot justify in every case.</blockquote>
Below I will just point out how this relates to Go and Development specifically.<br />
<br /><h2>
Go & Intuition</h2>
Go is a <a href="http://senseis.xmp.net/?ComplexityOfGo">very complex</a> and strategy rich game and has many different layers. The process of learning go means you can learn one playing style which works enough to get you to progress a few ranks and then play higher level players and subsequently increasing the complexity of your own playing style while internalizing your previous strategies (whilst as an added bonus also enabling the player to easily slip into a <a href="http://en.wikipedia.org/wiki/Flow_(psychology">flow</a>) state. It can then become very difficult at points to be able to logically reason why a given move feels intuitively the correct move to play, especially during the opening of a game and the clock is running. I guess one the reasons Go is so great as it calls for playing by intuition and also moments of pure reason and logic. This may be partly due to Go involving both the <a href="http://senseis.xmp.net/?BrainLateralityInGo">left and right</a> hemispheres of the brain due to the use of logic <em>and</em> heavy pattern matching (more so than chess). Intuition feels very at home in this context. <br />
<br /><h2>
Software Development</h2>
Even though the above suggestion of a process of learning and application could be used for many tasks, software development feels inherently similar to Go for me. Instead of a playing style its quite easy to see distinct steps in learning including syntax, coding style, project organisation, use of encapsulation and other OOP concepts, design patterns, architecture, project management styles etc. I used to find it an issue that sometimes I felt a potential design approach would lead me down a wrong path and I not be able to easily explain why. I have since learnt to trust these nudges in the <em>generally</em> right direction as they are a mix of rules that have long ago passed into the subconscious and ones that are still being formulated due to the associated patterns or situations only having being encountered a few times and maybe having slipped past the radar of the conscious analytical mind. Coming across the world of the notorious <a href="http://ivanhoff.com/2011/03/23/the-zen-nippon-chick-sexing-school-and-technical-analysis/">Nippon Chicken Sexers</a> concretes this for me as reaching the state of pure intuition is their goal. <br />
<blockquote>
Even the best professional sexers can’t describe how they determine gender in the toughest, most ambiguous cases. Their art is inexplicable.</blockquote>
Im not saying that my goal is to only program via intuition but I find it valuable to recognise it is a valid approach in some circumstances.<br />
<br /><h2>
Time limits</h2>
One crucial thing here is that intuition plays more of a role in time-limited situations, for example when playing Go against the clock (most games are time limited) or when working on a software project that has a tight deadline and the time you have to work on architecture and design is less than you would like (which is always!). It is definitely worth questioning your intuition when possible as it obviously can be incorrect due to the fact that some intuition is based upon subconscious knowledge gained from limited sources - but when time bound its a viable solution to 'go with the flow'. <em>Edit</em>: since my initial draft of this post I came across the related <a href="http://en.wikipedia.org/wiki/Recognition_primed_decision">Recognition Primed Decision Model</a> which explains this in better detail.<br />
<br /><h2>
Conclusion</h2>
Obviously these things are only loosely linked by what I have stated above, but linked enough so I feel they fall into the same ballpark and justifies me using a cool phrase like 'The Divine Move' for my blog! Unknownnoreply@blogger.com0