µ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…

HackerNews Android - Formatter

A comment on my Early Thoughts: 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 thoughts on how to do this is using…

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 by Uncle Bob; for the full picture. A simple way to…

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…

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…