Teaching people Android

Once upon a time there was TEDex Eroilor in Cluj Napoca and I have met there Simplon Romania’s CEO, Roxana Rugina. We’ve been talking since about creating a bootcamp on Android Development. We actually had a date in mind that is coming really fast towards me. Since I will be the trainer, I have to create lesson plans, think about homework and lots of other technical stuff. But I have stumbled upon a problem here.

I know a lot about Android and I can’t think of anything that would get me in trouble there (except the fact that Android sucks usually). I can teach other programmers how the Android ecosystem works. I can help others learn new skills in Java, work with Android Studio and Google APIs… but this time is different. This training will have two particularities:

  1. I’ll teach less technical people
  2. It has to be structured

The two come hand in hand. It’s not that those who will participate will be absolutely non-technical persons but they will be rather new to Android and programming in general. It’s a bootcamp for the ones that need a second chance in their career. They need to learn a lot in a short time so that they could get a job in IT. It’s a thing here in Romania: having a job in IT has proven to be beneficial.

So because they have to learn a lot and they are new, the training has to be really well structured. It’s not like you could skip steps and hope people will adapt. They can’t adapt because they are real beginners. So now I’m trying to go into as much detail as I can with my lessons but it’s so hard. I cannot get things right. I always find something that should have been taught earlier. It’s like I would need to teach everything in lesson 1.

I really got stuck at week 10 out of 12. I’ve planned everything by then and can’t find anything new for those 3 weeks. Should I maybe let them for practice and project refinement?

Teaching people Android


For the last couple of weeks I’ve been experimenting the Android Material Support Library. I’m trying to get an App up-to-date with the look and feel of the new Google Material concept. I have to say, it was not easy. But that’s not something new for an Android developer… it never is.

Documentation is poor

Like really poor. All the examples around the internet are basically the same. They all use the components in the most standard way, as described in the post that was announcing the Support Library. There is no creativity at all, no experimenting, nothing new. I’ve even read the Spanish posts. All crap. It’s like all the Android developers were junior developers that came out of boot camps. There is no deep understanding of the framework at all. If you don’t want your App to be standard, you are off for a rough ride.

android-app-supportThings do not work

You’d expect something made by the big IT giant Google to just work. You do some plain standard coding, you test on a device, it works, you test on the second: it doesn’t! FML, it’s COPY/PASTE! You always find some device from some obscure company (like Samsung) that has some custom interface that overrides framework stuff and it breaks everything. The client never understands that. You HAVE to make it work. And that throws you in a new area of custom made everything. I’m not that good. I can’t write all Android from scratch, again.

No backwards compatibility

The name “support” should imply some sort of backwards compatibility. But, in fact, it just offers a new set of tools that also work on older versions of Android. But those tools never work with the old tools you already have in the code. You have to change everything to make anything work. ListView is becoming a RecyclerView with new listeners, adapters and stuff; the AppBar is now a Toolbar, that it doesn’t ha ve a fixed position and you need to adjust the content so it won’t slip behind it; the  NavigationDrawer is now a DrawerLayout with a NavigationView and so on. You can’t just use one. That won’t make anything pretty. And it won’t work sometimes. You have to change it all.

When it works, it’ slow

Fancy fancy material-ish new stuff works. But it runs so slow that you sometimes have to do a rollback just because you cannot deliver sparkling apps that don’t work. The Support Library sometimes can make nice things for old Android versions. But those versions run on crappy devices that are too slow for anything. And this leaves you too options: ugly apps on new devices or slow apps on old devices. You choose, bad ratings will come anyway.

Yeah, so these are the conclusions I’ve drawn up until now, just by switching controls and updating the code behind. Now I have to use these new tools to create something beautiful. I tried to share a view between Activities… that did not work well. Wish me Good Luck!


What is Color Discovery?

I think I’ve kind of bothered some of the persons I know with the Apps I’m playing. Always sharing links, asking for feedback. But every developer needs to experiment stuff somewhere. It is because in the day to day work, software developers are rarely free to do whatever they want. There are compatibility constraints, client requests, devices limitations, etc. This is why sandboxes like Color Discovery appear.

Color discovery is an App that started out of my curiosity regarding Material Design (Support library) and Android 5 stuff. In the projects I usually work, we usually use Android 4 components but in Color Discovery I’m free to use my imagination and try everything new. Basically, the idea of the App was to randomly get colors and save the ones that you find appealing. Starting from that, I wanted to use the smart watch as well and mColor Discovery by Diana Vake it look as fresh as possible.

I’ve knocked myself out with RecyclerView, the FAP button, sorry, FAB, the new Toolbar, CoordinatorLayout, etc. The new framework seems so cumbersome compared to the old one. I got so used to the other stuff, that this new things seem impossible to implement (and buggy). But I cannot deny, it gives developers freedom to make the App very very user friendly and astonishing beautiful. It connects with the user, it reacts to him in a special way. The only thing missing now is Force Touch. But Android device makers are pretty good at copying Apple features so I expect 3d interactions will come soon.

Now, I’m trying to go with Color Discovery a step forward and make a product of it. Well, not in the traditional way of revenue generating product but in the way that users actually use it for what it has to offer and not just because they are my friends or relatives. I want it to become a tool to create Themes, organize colors, discover new matches, etc.

The problem is that new features require new permissions and I want to keep them as low as possible. Can you help me out here? What feature could I add to this App without requesting new permissions?

PS: If you like the Icon, click on it and it will redirect you to the Facebook Page of the designer.

What is Color Discovery?

The evil of static

I hate static variables in Java. It’s not that I don’t understand the good uses of such a feature in a language. But statics are way overused and most of the times they are a real pain. There are many things wrong with statics, yet, developers still use them intensively, even when they are not needed.

What the

Statics in Java are variables that are available across all instances of a class. You can picture them as a public member of that particular Class object. They don’t necessarily break object orientation but they do seem look much like global variables, since Class objects are instantiated when a class is first used and they never die. So is your static variable: holds a reference to the object to the end of the JVM. And if you make it public, it’s out in the wild global space.

And here comes the first problem of having statics: they prevent proper Garbage collection. Since the static variable holds a reference to an object forever, GC can never reclaim memory. So if you want to fix this, you must null the reference as soon as you are done with whatever it holds but…

You can never be really sure what’s the static referencing to. Since everyone can assign and modify the content of a static variable, can you really tell me who’s the last one who did it? It might be your previous instruction but it can also be a ghost thread that you’ve forgotten about. It’s really hard to debug statics for this reason and also…

Statics prevent proper unit testing. Unit testing is based on setting up a known state and then running your code. But if you code uses statics, it’s really hard to set up the environment. Because having this kind of dependency of the “global state”, forces you to write way more code to prepare a test. And given the previous paragraph, you may never succeed since you have no idea how to create a real test case. If you do, you might randomly have failing tests because of race conditions or so.

They are the very bad smell of an infinite source of nasty bugs. You can actually start debugging every problem from there. Whenever you think you know the flow that leads to the wrong behaviour, double check for the statics.

And the purest form of static evil are static functions. They are worse then members. They can be called from wherever you like, they set-up and change static members, but they have absolutely nothing to do with the class. They are there just to manipulate more statics in a static hell. And the worse thing about them is that they prevent refactoring. They tie up everything in their static evilness so they can trap anyone who tries some decent refactoring of the class.

I’m not saying I can’t find any good in this language feature but it brings so much evil with it that I would strongly advice any beginner to stay away from them. Whenever you write the word static that it’s not in a public static final, please request a code review! You might be screwing other people’s lives in the future

PS: Don’t get me started on Singletones.


The evil of static

What’s wrong with today’s mobile Apps?

Well, many things. Since the world started to work on mobile apps, they got better and better, in some ways. But there are still lots of stuff to be improved in the chain between the app developer and the end user. I won’t tell you everything that is wrong, because that would mean sabotage and treachery. I would share with you this one thing that it bothers me the most about the whole mobile ecosystem.

It eats up your time.

http://healthyeatingforfamilies.com/wp-content/uploads/2014/09/TimeToEat-app-icon-final-for-wordpress1-1024x575.jpgBe amazed about this statement: mobile apps were supposed to make your life easier! Apps should have been a way to save precious time by having so much functionality at arms length.

Whenever the wrist clock was invented, its purpose was to keep you up to date with time, not wasting it. And then, at some point, there were watches with calculator function. The geeky things engineers used to have. Nobody wanted the users to calculate stuff obsessively all day. It was a good to have, just-in-case, functionality.

App trends seem similar to media content now. Apps are built to eat up your time. We have a gazillion notifications enabled to distract us. Pushed notifications to get the user back in the app. Some apps also notify the user randomly that he did not use the app, just to tease him.

We have lots of functionality and content in apps. I have 4 apps that do some kind of messaging. About 5 others that bring news in a way and are social in another. Apps that have planning function and some other stuff. Everything is a mess.https://eatingmanifesto.files.wordpress.com/2014/01/iphone_2267973a.jpg

Developers are now following their interest to gain more users, that generate more traffic and can be monetized. I know that’s the whole point in developing apps, duh! But what about the user? Does the poor guy deserver to get chained in apps? What did he ever do wrong so that you keep him hostage in your stupid app? Let him go! Make his life better and let him come back to you whenever he needs you, because your app does make a difference.

If it doesn’t, you, as a developer, are on the wrong path. Go make something else. Something useful.


What’s wrong with today’s mobile Apps?