014: Effective Java for Android developers : Item 1

We’ve mentioned the book “Effective Java” by Joshua Bloch quite a few times on previous episodes. At this point, everyone knows they should have read this book (quadruple times). But it’s a dense read and everyone could use a reading buddy. Also, what does Effective Java look like through the eyes of an Android developer?

In this second installment of our Fragment (a.k.a mini-episode), we thought we’ll do our listeners a favor and help with that reading. We introduce the very first of these venerable “Items”: Consider providing static factory methods instead of constructors.

Stay tuned for more items from our “Effective Java for Android developers” Fragment series.

Download

Show Notes

Consider providing static factory methods instead of constructors

Advantages:

  1. You can control the name and thus give it much more meaningful names
  2. You are not required to create a “new” object each time they are invoked
  3. You can even return an object that’s a subtype of the return type (unlike constructors which only return class type)

Disadvantages:

  1. Classes without public or protected constructors cannot be subclassed
  2. Static factory methods are not readily distinguishable from other static methods

Takeaways

  1. “Consider” using static factory methods (not always)
  2. Use newInstance when creating Fragments [androiddesignpatterns.com]
  3. Use newIntent static factory method for creating intents inside the target activity.

Contact us:

013: Corey Latislaw on TDD and Testing

In this episode, we revisit the topic of Testing, looking at it from a TDD perspective. Globetrotter, Kata Queen, TDD practitioner and overall boss of Android development – Corey Latislaw joins us in this episode with thoughts, tips and tricks on pulling off TDD. She also shares some of her wicked sketchnoting tips and made a very special Sketchnote just for this episode! Have a look at the sketchnote here.

Download

Show Notes

Sketchnoting

Corey’s books

Katas

Awesome picks for the week:

DF:

KG:

Contact

Corey

Fragmented

012: Continous Integration and Collective Code Ownership

In this episode we’re trying something new. Everyone has requested more episodes of the podcast. In short, everyone wants a weekly show. So this week, we’re introducing what we call a mini-episode … or as we like to call them a “Fragment”. Fragment episodes will be shorter in length but still packed with goodness. They will range from ~7-25 minutes in length and will showcase either Kaushik, myself (Donn) or both of us.

In the first “Fragment” installment we’re going to talk about Continuous Integration (CI) and Collective Code Ownership (CCO). Donn talks about what CI is, why its important and how it benefits you and your team. He then dives right into CCO and how it can be facilitated through testing.

We hope you enjoy these new mini-episodes … aptly named … Fragments. :)

Download

Show Notes

Continuous Integration solutions:

Continuous Delivery:

Contact

Donn Felker

Kaushik Gopal

011: The Fowler Road to a Clean Architecture

In this episode – Donn and Kaushik dive into a topic that is very near and dear their hearts – application architecture. They talk about how Martin Fowler has inspired a lot of their architectural decisions and how they’re moving towards defining what a clean architecture means to them and other developers. They talk about Model View Presenter, Model View Controller and many other topics that surround these two common patterns. Take a listen and go for the ride on architecture train … all aboard!

Download

Show Notes

Chit-chat:

Follow up:

The road to a clean architecture:

Other approaches to clean architectures:

Awesome picks:

Donn:

Kaushik:

Contact

Donn Felker

Kaushik Gopal

010: Boning Up on Core Java

In this episode Donn and Kaushik talk to the very talented Michael Bailey about core Java principles and practices. Michael has quite the deep and passionate understanding of Java and we thought it would only be perfect to share this episode with a very passionate Java crowd – Android developers. We talk about IntelliJ, Testing, Inheritance, Static Code analysis, Garbage Collection, Data Structures and much more in this episode. If you’re looking to learn a thing or two about Java, then this is your episode. We hope you enjoy.

Download

Show Notes

Intellij information:

Testing talk:

Great books on improving your Java skills:

Effective code review technique (WTFs a minute) [cryhavok.org]

On inheritance:

Static code analyzers:

Garbage collection:

Data structures for Android

  • ArrayMap (Android alt. to HashMap) [developer.android.com]
  • SimpleArrayMap [developer.android.com]
  • SparseArray (Android alt. to mapping int -> Objects) [developer.android.com]

Benchmarking DS:

Awesome picks:

Michael:

Kaushik:

Donn:

Contact

Michael Bailey

Donn Felker

Kaushik Gopal