µObjects: Where our code meets the user

There's a couple types of places where the code we write interacts with the code someone else wrote. This could be another team, a 3rd party library, or the operating system. When we interact with these components, we're tying our code to their code in some fashion. The more these…

My Thoughts: Double Constructor for Dependency Injection

I know I'll have disagreement on this; and I'm happy about that. One of the mechanisms I use for... what I can only call "Dependency Injection" or "Inversion of Control"... is to have multiple constructors. In the ideal I just have a single constructor. This constructor takes all the arguments.…

HackerNews Android - Formatter

A comment on my Early Thoughts: Object Oriented Encapsulation [https://blog.quantityandconversion.com/2017/04/09/object-oriented-encapsulation/] post brought up an excellent view about how to decouple a class from it's display mechanism. I'm on board with this idea. It helps keep the objects to their single responsibility. My first…

Android HackerNews - Interactive Item

We're at the point we need to do something with the Story we're displaying. Or the job. Either one. My thoughts on this is to have two actions. A tap and a swipe. The swipe is going to require a change in the list itself (I think). A tap is…

Android HackerNews App : Refactor to Clean Architecture

A philosophy I like and have made a(n unknowingly) passive effort to implement before is called "Clean Architecture". It's the idea of an application having dependencies that flow "outward". Go read The Clean Architecture [https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html] by Uncle Bob; for the…

HackerNews Android - Let's not crash

As discovered in our last session - Opening a lot of connections breaks things. The creation of the OkHttpClient is done in HackerNewsNetwork#getClient... ugg... A get. Ruthless refactoring! As I was saying; the creation is done in HackernewsNetwork#httpClient. private OkHttpClient httpClient() { return interceptorObj == null ? new OkHttpClient() : new OkHttpClient(…

HackerNews Android - Get a Job

The Top Stories apparently can include job postings. I have the StoryAdapter only accepting responses that have the type of "story". We need to build up a path for Jobs because it's in the payload. Well... mostly because it crashes the app when I scroll. Network We can assume that…

My Thoughts: Android App Development

I'm blogging because I'm not seeing resources that covers the things I've been asked; or that I've worked out myself (like an upcoming post about maintaining Object Encapsulation). I also blog so I can google my brain later for myself or to provide my thoughts to others in a shareable…