Category: Android

Home / Category: Android

Lessons 1-3

For 2019, one of my goals was to complete the Google/Udacity Kotlin for Android Development course. I wrote more about why over here https://raygervais.ca/starting-2019-with-a-retrospective/!

Since starting on the first, I’ve completed the first three lessons of ten in the course (sadly, it appears that they are still working on content for lessons five to ten, and have not published the work for them), so I thought I’d give my initial feedback and also thoughts on the course’s primary focus: developing Android applications using Kotlin.  Digging into the unfinished courses does provide the video files, so it’s possible to learn some of Lesson’s 5-10 on my own without the quizzes or sample code.

Anyways, for those who want to follow along: https://github.com/raygervais/kotlin-for-android-course, and now for some thoughts!

Lesson 1

Dice Roll (Intro)

Dice Roll

This was a basic introduction to Android application development using Kotlin, so if you had taken any previous course prior then nothing should be a surprise in this lesson. Still, one key item that this lesson taught was some of the major workflow enhancements which are enabled by Kotlin compared to the older Java paradigms. Still, I got a cool dice-rolling application out of it while also learning more Kotlin powered strategies including no longer needed to call findViewById(). Thank God.

Lesson 2

This lesson was split into two, as you can see I am quite fond of the first section, and not so much of the second.

Data Binding

About Me

Having understood the basics of Android development from a Seneca course (done in Java), the first lesson was a good refresher. This one on the other hand, this lesson on data binding using modern Kotlin modules felt like the natural extension of what I also employed in iOS using Swift Object Models and UIViews. This lesson brought the concept of Android Development tooling and workflows one step closer to being on par with iOS development, and removing of one nagging item which I fought with endlessly while working on a Java application.

The example is simple enough, and still loaded with enough descriptions of how and why data binding in Android is implemented in such a way that you can pick up the material and easily apply it to your current project. It transitions older development methodologies to more modern design practices which I really appreciate, since you can now bind ViewModel  and VIPER architectures much cleaner than having the object instance and detail view (for example) unaware of their contexts with each other.

Constraint Layout

This tutorial for constraint layout was more of a chore to go through. Though informative and useful for those learning the layout, the actual lesson pacing and end-product left a lot to be desired. I found the last bits of real code (instead of focusing on XML layouts for the other ninety percent) to be the most useful, since it displayed functional programming logic with UI Element Ids. Still, for those working on pixel-perfect designs and specific UI chaining of elements, this would be a good resource to consult.

Lesson 3

Fragments & Navigation Architecture

Fragments are hard. I think between all the various high and low level topics that I learnt at Seneca relating to Android, Fragments and View life-cycles were components which completely escaped me so much that I ended up writing my final project using only intents -we were instructed to utilize fragments as much as possible. Yet, with the newly released Navigation Controller and Navigation Graph (ala Google I/O 2018), fragment development seems much less daunting and again, comparable to the experience on iOS with Storyboards. Having no prior experience developing with Fragments, I can assume that this is closer if not better than what some claim third-party libraries have provided in attempts to better handle the Android View components.

Having gone through all twenty-nine steps in this lesson, I can say that there is a lot of valuable tutorials here; enough to cover a chapter or few even. It goes through the multiple new API’s released this past year and how to utilize both the native ones alongside developer friendly libraries such as KTX (Kotlin Extensions) which make the already less-verbose language (compared to Java) even more to the point. I love the NavigationDirections API built into NavigationControllerUI, and how easily Fragments are now developed and handled.

Upon completing the third lesson, you are presented with a modern application which (in my opinion) you can be proud of having created. It’s very basic, but for someone who never understood Fragments or View components this is like leaping over the wall which you previously didn’t know was only so tall. I also learned that the world of mobile application development is so much more vast than I anticipated API wise, so a good snippet manager is critical if you don’t want to review all the previous code bases you wrote! Currently exploring the open source snippet manager (which works with your GitHub Gists) Lepton: https://github.com/hackjutsu/Lepton.

Perhaps something on that in the future?

Course Link: https://www.udacity.com/course/developing-android-apps-with-kotlin–ud9012

Lessons

This past year has been full of lessons, just as every year before; an expected constant which I think is important to reflect upon just around the end to identify growth, ambitions and also sway between where life is taking you, and which steps you want to take. Instead of mentioning the negative lessons, inner turmoil and emotional demons, I wanted to touch upon some career and personal growth discoveries that I learned this past year – some even being common sense! Without further ado, here is three lessons from 2018 and three goals for 2019:

Protect Your Hearing at Concerts (Ear Plugs)

In December, I went to a back-to-back dual-set (try saying that three times fast) show put on by my emo years hero’s: Silverstein (touring with Hawthorne Heights, As Cities Burn, Capstan). It was absolutely fantastic, and also long (4+ hours it felt like of loud music, blasted straight at your eager-to-headbang self)! For the first time in all my concert going events, I decided to wear hearing protection (which I always carried, but forevermore decided to ignore) since I knew I’d be close to the stage and also exposed to incredibly loud and sharp sounds for hours on end. Fast forward to end the end of the night, and I noticed the following thoughts or side affects:

  • My ears weren’t ringing nearly as much, or as loudly as one would expect.
  • The removal of the high ‘shrills’ due to the hearing protection actually made the live sound more enjoyable.
  • I was able to talk perfectly normal the next hour, and the next day.
  • I hopefully will not go deaf from this concert at least.

I’m definitely continuing this for the majority of my upcoming concerts this year.

Step Away from Technology Periodically

Simply put, learn to step away from all of the screens; the digital distractions and notifications, the networks, the allure. I’ve been a huge Matt D’Avella fan, and his video Breaking Your Phone Addiction’ really struck a chord with me as I immediately became aware of the digital ‘twitch’ that he described in the video and discussed similar findings with another like friend who was researching similar (thanks for the chat Andrew!). There was one more item that I noticed when I set all technology aside for the vast majority of December (sans work of course), it gave me room to clear my head and also evaluate interests, focus, and other non-digital topics.

For the past four years, I’ve enveloped myself in all things digital and binary-centric (aside from writing notes here and there and attempting to journal off and on), so this was really taking myself out of my expected comfort zone. Once you realize this, allow yourself to breathe and take in the world around  you; it’ll allow your never-stopping head to finally slow down and relax. I’ve learned from peers that some do this easier than others, sometimes naturally.

Take Yourself out of Your Comfort Zone

My career titles  since starting Seneca College have been rather humorous. As I’ll explain below in further detail, I got into software development because I was interested in Android, iOS and Desktop Application development. Yet, my first two coops (the later of which stemmed over a year) both revolved around web developer job titles (Web Developer, Front-end Developer, Full Stack Developer), and my current full time title revolves around the DevOps and Cloud Engineering concepts. It’s nowhere near what I originally went for.

Yet, I am content as hell to have experienced and learned those positions, since they took me out of my comfort zone and emersed me in such a different scope each time that I could add a different stack specialization from each title. In English, it forced me to become a better developer; a more well-versed and depth-aware programmer who could make awesome (I hope) websites for his own work, orchestrate and manage the CI/CD pipelines for his applications and also manage their cloud infrastructure – all in the span of three years. If you take yourself out of what’s familiar, you may benefit similar to as I have, and perhaps learn tricks that will boost the capabilities of your true passions.

Goals

Below, I’ve listed some goals that I’m aiming to complete (there are more, but I think it’s better to start small and see where we can go from there) for this year. Some of these goals revolve around daily involvement, so there has to be some realism and flexibility during the more hectic days where travel, meetings, and events consume precious hours of the day. Still, the worst that can happen is I turn away now or midway, so why not focus on being consistent where possible, and picking up as soon as possible from a falter (such wisdom [sarcasm])?

Read 20 books

In the average week, I probably watch a few hours max of Netflix (perhaps more than I like to admit since I have now given in to enough peer pressure that I am catching up on the classic ‘Friends’), and binge  both foreground and background focus with YouTube. I like to consume as much as I can through the platform, both in documentaries, tutorials, technological journalism, music, etc.Yet, I found myself also enjoying and truly growing as an individual not by the countless videos , but by the books I was invested in. Reading during my travels is by far one of the most common commuting habits I have, and in the past year I’ve managed to read fifteen rather lengthy books (all can be found on my GoodReads). My goal for 2019, read twenty books -and then keep going from there!

Complete Google’s Android + Kotlin Online Course

I got into programming with the intent of learning how to develop Android and iOS applications. Having completed the introductory courses offered by Seneca for both courses, I longed for more. Along the way of working towards my career, I took a few directional steps that some would consider wasted efforts or missteps -I don’t agree, but I certainly didn’t jump to mobile application job offerings at all; aiming instead for modern web development, DevOps and Open Source-y goodness. This past Google I/O, a new course created in tandem by Udacity and Google was released which targeted intermediate Android application development with Kotlin. I figured, it’s the perfect course to pursue my original motivations, and hopefully also position myself closer to where I think (at least as of writing this article) my specialization should be. The great reward from taking a course like this is that for one, I get to develop and enrich myself in the technology stack closer to my original intents as a hobby and personal growth task, and also implement ideas, portfolio items, and hopefully useful items available to many based around what I’d learn from the course. They would be hopefully architected and developed in a way to be somewhat future proof (one can hope)!

Journal Daily

I wrote about the benefits of having an analog notekeeping workflow perhaps a year or more ago; and since then I’ve had an on-off relationship with the same workflow due to a world that moved faster than I could keep up with on paper. Realistically, it’s no excuse; I got sidetracked or dropped the idea of paper notes and journalling and organizing for “it’s somewhere in my head, don’t worry!” promises. Since December, I decided to revisit and truly dedicate time to the subject; following a reduced variant of the Bullet Journal system created by Ryder Carroll. I found that after journalling consistently for two weeks, I found myself more at peace mentally with my thoughts of the day. Instead of having tasks and useless notes swimming around an already burnt-out head, I could instead put them somewhere a little more permanent to rest and congregate.

Now, I can reference them in one location, and declutter one more segment of my mental capacity with each new entry. It’s not all smooth sailing mind you, there is time and effort put into this system which may appear as a waste to anyone else not using the same exact system, but I find there is a beauty in it too: because each pen stroke is permanent unless otherwise trashed or overwritten, you truly do have to ponder and make think before the first word is put down. Notes truly mean something to you (since the purpose is also to avoid being verbose) and serve as a way to organize so much with just a paper book. At the same time, as I find more ‘modules’ (as I’ve come to call them), I write down the needs and how I think it would work best so that with the next bullet journal, I can place it properly into the system instead of being found on a random page as a rough draft. Needless to say, I’m enjoying the investment so far.

For those interested in also the course:   

https://www.udacity.com/course/developing-android-apps-with-kotlin–ud9012

For Those interested in the Bullet Journal system:

https://bulletjournal.com/

For those interested in my previous writings on Analog Journaling:

For those interested in Breaking Your Phone Addiction (Highly recommend):

https://www.youtube.com/watch?v=cV5GWt26qDo

When I was in Highschool, I remember spending every moment I could on XDA, Reddit, and various other Android tweak-centric mediums; emulating such tweaks and ‘optimizations’ on my device during breaks.

Throughout most of College, I had done the same, to the degree where I often would end-up with a completely new ROM and setup at the end of each month with minimal effort made on my homework or social tendencies. It was a mix of utter freedom similar to driving on an empty highway, and self-inflicted chaos which can only described as ‘russian roullete with a single player, you’. Still, it was fantastic until my addiction to tweaking led to two phones being hardbricked, and the last straw being my device not being able to display the correct time, fetch new emails or use bluetooth headphones without causing a spike.

With that, impulse led to transition to an iPhone 6S Plus straight from Apple. This would in consequence, reduce what I am able to change on the phone tenfold unless I jailbroke it – which, I promised myself that I wouldn’t do. My daily driver was the average iOS user’s daily driver, Facebook and Twitter included.

Jumping forward two years, and I decided I wanted to see what Android 8.0 Oreo on a Pixel 2 XL was like, and after establishing the display wouldn’t be the leading factor to my regret of said purchase, I learned an interesting fact about myself: I didn’t find any wish to tweak every square inch of the device after configuring it.

Instead, I found myself going for the minimalistic setup that I had always used on an OS (where possible, inspired by this article:https://betterhumans.coach.me/beautility-my-ultimate-iphone-setup-1b3dd0c588a0), which heavily implied a blank canvas without widgets or text, instead just your Dock icons and wallpaper. To me, this made much more sense than a screen full of icons ala iOS, or differently styled widgets ala Android. My OCD appreciates the aesthetic.

Perhaps this is from my two years exposed to iOS exclusively, building up the perpetual ‘it just works’ mantra throughout it’s usage. Or, it could be the maturing of both Operating Systems compared to previous experience, lending to a much more reserved temptations to ‘fix’ or replace items which annoy me. Realistically, if I had to mention the most common tweaks I used to focus on, it was the following:

Unified System Theme

Google’s introduction of Material Design as an utter mess on Android. Popular applications updated months behind, some only being updated as of recent. This created quite the dissociation between the applications, resulting in a horrible experience and driving me to discover the CyanogenMod / LineageOS theme engine. This engine allowed for system-wide themeing, which was utter bliss once a theme was found through the Play Store or XDA forums.

On Android O, or even iOS 11, I would have loved a dark theme built-in by default. But alas, no such luck aside from small ‘hacks’ or ‘tricks’ to invert the entire display. Not the best effort, but some nonetheless. While playing with the Pixel, I still yearn for a dark theme to utilize the P-OLED technology, but it’s not the same priority as I had in the past.

Optimizing CPU / GPU Performance

I am a product of the generation whose entire life has seen the performance increases in the yearly iPhone releases, and envied just how smooth iOS was for the everyday user. This envy derived from Android’s lack of optimizations (which started with Project Butter), or inherit lack of cohesion with the hardware. Indeed, the flaw of open hardware became clear, but that didn’t mean that a silly high schooler couldn’t root his Nexus 5, install new kernels every week and attempt to boost performance right?

That is what I had attempted, often sacrificing battery life or stability to get that ‘buttery smooth’ effect on a stock AOSP ROM. This tweak to CPU / GPU governors led to my first hardbrick when I stupidly set the CPU max frequency to 1%.

Mimicking Other System Features

I have an unhealthy obsession with those whom oppose the norm; BB10’s / WebOS gesture based navigation (now found in the iPhone X funnily enough), A unified Messaging application (ala BB10 Hub), or even Ubuntu Phone’s side-dock multitasking system. All of the aforementioned above were ideas or attempts which failed horribly, or proved that perhaps if I wanted said functionality, I’d had to implement it myself. Though I never did back then, I feel that perhaps an implementation in my free time may help more than just myself.

Being Annoyed by Application imperfections

So this one is completely and utterly blown out of proportion I admit, but it is also one which means dearly to me and, is found throughout the other examples listed above (in theme). I found in my experience from using Android Oreo for a week, I had already tried out multiple SMS applications because I noticed that the text field on Google’s Android Messages lacked the same padding and height as the font should have for that application.

 

This, plus having noticed that also making me notice the lazy approach Google had taken on the right side with the condensed SMS ‘send’ button which to me, is more of an eyesore than anything else. Not to make this sound like the end of the world, but realizing that by having all the choice in the world when it comes to applications and devices, I will forever be trapped in a spiral of ‘try’, ‘enjoy’ and finally ‘annoyed’ with a multitude of applications.

Conclusion

This entire article may sound like a rant, or even a disapproval of how Android operates as a system, but that was not the purpose of this post. Sometimes, I write simply to put jumbled thoughts to a page – attempting to make sense of them through the process. While spending a week with Android Oreo on a Pixel 2 Xl, writing this article in the process, I came to similar conclusions or revelations about why even with an amazing device I still had discontent.

Android is an amazing system, likewise so is iOS. They both have so many unique perspectives and implementations that often the end-user all they could ever want. In recent years, feature parity has blurred the differences between the two operating systems – creating a fantastic experience regardless of the chosen device.

In the end, I suppose Android will remain my hobby operating system, simply because it gives me far too much choice for my OCD mind to fathom. I love the choice, but in the end I found myself tweaking and longing for hours both as of recent or in the past. Luckily, choice is still an option and I have time to continue deducing what is the best for myself. I know many who are happy as can be with choice, and others who treat Android as a defaults-only configuration. It’s truly amazing when you think about just how many different types of users there are out there!

As for the Pixel, perhaps it’s my lack of discipline which is causing disconnect; an idea which only time will tell.