046: okJesse – A deep discussion on okHttp, okio and Retrofit

Everyone loves Retrofit & okHttp. But how did they come about? Why ok? What was the need for such libraries? We went knocking on the doors of Square trying to find the answers to these question. We were lucky cause we found probably the nicest most brilliant Android/Java developer of our times – our good friend Jesse Wilson and without surprise, he crushes it!

He gives us the scoop on the origin stories of these amazing libraries and also gives us insight into okio and why it’s such a game changer today.

Direct Download

Show Notes

Okio

Retrofit github throwback

Moshi

Sponsors

Contact

044 – Effective Java for Android Developers – Item #10

In this mini-Fragment, Donn talks about Item #10 of the Effective Java series – Always Override toString. You’ll learn why it’s important for your own sanity, future developers, and overall developer happiness.

This episode is sponsored by Hired.com.

Download directly

Show Notes

Sponsor

Contact

041: YAGNI

In this mini Fragment, Donn talks about one of his favorite topics, YAGNI. YAGNI is an acronym that stands for “You Aren’t Gonna Need It”. Donn explains what it is, why its useful and shares a personal story of how he was introduced to the YAGNI concept back in 2008.

Direct Download

Show Notes

Sponsor

  • Caster.IO Use the coupon code “fragmented” to receive 15% off any monthly subscription.

Contact

036: Working Remotely

In this mini Fragment we touch on a highly requested topic – working remotely. Donn talks about how to ease into remote working, tools for working remotely, tips and tricks for staying sane and productive while remote and he wraps it up by discussing the benefits employers have when hiring a remote workforce.

Download Directly

Show Notes

  • Remote work is best suited for information workers (programmers, designers, engineers, etc)
  • Read Remote by DHH and Jason Fried
    • Great book that echoes what I feel about working remote.
    • Tip: Listen to it on Audible, it’s faster to consume.
  • How to ease into remote work at your current job
    • Convince manager to allow a 1 day trial for one – three months.
    • Remote day should be on Friday (fewer critical things happen on Friday, on average)
    • After trial, if success, aim for 2-3 days of remote work. (Again, do this at the end of the week. Wed,Thu, Fri)
    • Once successful, rally for full week of remote with an occasional in office visit (a day every week work two)

Staying sane while working remote

  • Donn’s blog post on this topic
  • Create a work day schedule (5am-2pm, 8am-5pm, 10am-7pm, etc)
    • When you’re done, you’re done. Leave work (your office/etc).
  • Schedule. Schedule. Schedule. Stick to a schedule.
    • Get up at the same time
    • Get dressed for work (no PJ’s etc)
    • Do your hair.
    • Be presentable
    • This is all mental
  • Prepare for the day
    • Get coffee/tea/water and snacks
    • Try to limit the opportunity of distractions
  • During the day
    • Take a lunch, away from your desk.
    • Go out for lunch with someone (significant other, friend, etc) at one to two times a week.
    • Work out of the house a couple times a week, this increases our creativity.
  • Outside of Work
    • You need social interaction, Cabin Fever is a real thing.
    • Exercise 3-4 times a week if possible.
    • Group classes are perfect for this.
      • CrossFit
      • Martial Arts
      • Yoga
      • Pilates
      • etc
  • Communication When Remote
    • Put 3x-4x more effort into communicating than previous. You’re not visible seen so you need to be more vocal.
      • Call
      • SMS
      • Blow up the Slack/Hipchat channel/etc
      • Objective – Clear your own path

Tools

  • For remote to work effectively, everything should be considered remote. If one employee is remote, then all meetings should occur as if the team is remote. This ensures that everyone can work effectively without missing anything.
  • Communication

Remote for Employers

  • Benefits from Remote workforce
    • Much larger talent pool than the exhausted pool (or non-existent one that local). Higher quality employees/contractors/consultants for the same overhead.
    • Remote creates much more loyal employees. You’re giving them their life back and this is reciprocated.
    • Your company becomes anti-fragile as you’re able to adapt with the industry faster. You can hire in areas others cannot.
    • On average, remote employees work harder and are more productive than their office counterparts.
    • Less overhead! No need to pay for additional office space.

Sponsor

Contact

031: Effective Java for Android Developers – Item #8

In this mini Fragment, we introduce Joshua’s eighth Item. This one is a doozy, probably one of the longest items in the group of the effective Java series, but most definitely quite important.

This episode is brought to you by Rollbar. Go to rollbar.com/fragmented to get their Bootstrap plan for free for 90 days.

Download directly

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

Show Notes

Obey the general contract when overriding equals

When to not override equals:

  • Each instance of the class is inherently unique.
  • You don’t care whether the class provides a “logical equality” test.
  • A superclass has already overridden equals, and the superclass behavior is appropriate for this class.

The equals method implement an equivalence relation which states it must be:

  • Reflexive
  • Symmetric
  • Transitive
  • Consistent
  • For any non-null reference x, x.equals(null) must return false.

A recipe for a high-quality equals method is as such:

  • Use the == operator to check for references to this object.
  • Use the instanceof operator to check if the argument has the correct type 
  • Cast to the correct type.
  • Check all field types and corresponding field types.
  • Finally, when done, ask yourself – is this method symmetric, transitive and consistent?

Caveats

  • Always override hashcode when you override equals
  • Don’t be too clever!
  • Don’t substitute another type for Object in the equals declaration.

Contact