Some time ago I read this article about Why Mit Stopped Teaching SICP. Gerry Sussman said that nowadays people do not often need to build something from scratch again, there exists massive and huge library code for nearly everything. So today’s programming work is more like poking around other people’s code until it works. I’ve beening doing Android dev for some time now, and I have to say that I sadly agree with him.
Android Custom Views 101 (Part I)
Learn about Androd Custom View and ViewGroup
Creating your own custom android views can be useful and daunting at the same time. For a long time there is nobody really talks about it in a approachable way, until this lady Huyen Tue Dao. Let’s try to follow her approach and create some custom view! In this part, we will create a very simple timer view that takes up the whole screen and display the current time. So let’s get started.
While reading Effective Java Item 21: Use function objects to represent strategies, something hit my mind and now I’m writing it down. All these new lambda thing is really what is called the Strategy pattern in the OOP world, or would it be more appropriate to say that the Strategy Pattern in Design patterns is really what lambda is. The essence of all these, can be boiled down to one simple idea, pass functionalities around.
We are going to write a program, a bit program, lots of stuff happening here and there, ok, big program. Now, lots of threads of course, loads and loads of them, we have to synchronize, yes we do, I think so, yeah, synchronize very important stuff, good idea, but, why? Remember what we have been taught in school? That mutex thing? Mutual Exclusive? That 2 threads are trying to read and write some mutual value at the same time and create a big mess?
Why we stopped using dagger
And some thoughts
I decided to stop using Dagger2 in our company’s android project. Why? Don’t get me wrong, Dagger2 is still great. But though it is great, it is complex. Lots of concepts to wrap our heads around. What is a component, what is a module, what is the difference between subcomponent and dependency component, etc. In order to use it properly, we need to anwser all that questions, even you think you understand it, you still run into suprises now and then.