Profile

Cover photo
Jake Wharton
Works at Square, Inc.
Lives in San Francisco, CA
21,260 followers|5,492,445 views
AboutPostsPhotosVideos+1's

Stream

Jake Wharton

Shared publicly  - 
 
Use a Nexus or Artifactory instance at your company for hosting/proxying dependencies? I wrote a script which synchronizes all of the artifacts from your local Android SDK to a remote repo of your choice.
sdk-artifact-sync - A script which synchronizes all of the artifacts in your local Android SDK to a remote Maven artifact host.
37
7
Jake Wharton's profile photoRichard Vowles's profile photoAfzal Najam's profile photoahmad jikamshi's profile photo
8 comments
 
Dear Sir,
I have been trying to use your DiskLruCache Library but unable. I have searched online forums but no working guide was found. I need your help sir.
Add a comment...

Jake Wharton

Shared publicly  - 
30
3
Dandre Allison's profile photo
 
I'm at my friend's with that game and the Warriors on
Add a comment...

Jake Wharton

Shared publicly  - 
 
The video from my "Simple HTTP with Retrofit 2" talk at Droidcon NYC is now available.

The slides are available separately here: https://speakerdeck.com/jakewharton/simple-http-with-retrofit-2-droidcon-nyc-2015

Some of the APIs around implementing Converters and CallAdapters (the very end of the talk) has already changed on master and a beta2 should be released in a week or two which fixes some bugs found by early users.

#AndroidDev
228
80
Roman Ismagilov's profile photoCehasli de Castro's profile photoRaju SE's profile photoWouter de Vos's profile photo
6 comments
 
Thanks for this talk. I'm very excited for Retrofit 2. I have a single endpoint and I have grouped api calls into different interfaces. Is it recommended to create a singleton Retrofit object that can be used to create each separate api service or can we build the Retrofit objects as needed?
Add a comment...

Jake Wharton

Shared publicly  - 
 
Recently, +Pierre-Yves Ricau and I gave tech talks at our "Streamlining Android Apps" event in Square's San Francisco office. These talks were recorded and are now available on Square Engineering's YouTube channel. Enjoy!

Eliminating Code Overhead (Jake Wharton)
https://www.youtube.com/watch?v=b6zKBZcg5fk

The CPU, RAM, and disk are finite resources that are often taken for granted as unbounded. Not only is this obviously untrue, but the use of these resources directly affects the most important resource on a mobile device: the battery. This talk will focus on techniques that both libraries and applications can implement to ensure their effect is in general without overhead.

LeakCanary (Pierre-Yves Ricau)
https://www.youtube.com/watch?v=D_hjK-tEHoQ

In just a few few weeks, we reduced by 94% the OutOfMemoryError crashes in the Square Register Android app. We built squ.re/leakcanary to automatically detect memory leaks and make it very easy to fix them. This talk will cover the principles as well as the underlying implementation details. We'll dig into a few interesting examples and lessons learned.

#AndroidDev
214
85
Jelly Chen's profile photoSachin Rajput's profile photoDaniel Tarlow's profile photoSait Sami Kocataş's profile photo
15 comments
 
great presentation, thanks for that.
will the part you mentioned at the end will be another presentation? I am sure it would help to many developer.
Add a comment...

Jake Wharton

Shared publicly  - 
 
I have posted slides from my talk "Eliminating Code Overhead" which I gave yesterday at Square.

By themselves, these slides are sparse on any explanation or reasoning for what's on them. The event was recorded and a video of me blabbering over them will be made available later.

The CPU, RAM, and disk are finite resources that are often taken for granted as unbounded. Not only is this obviously untrue, but the use of these resources directly affects the most important resource on a mobile device: the battery. This talk will focus on techniques that both libraries and applications can implement to ensure their effect is in general without overhead.

#AndroidDev
The CPU, RAM, and disk are finite resources that are often taken for granted as unbounded. Not only is this obviously untrue, but the use of these resources directly affects the most important resource on a mobile device: the battery. This talk will focus on techniques that both libraries and applications can implement to ensure their effect is in general without overhead. Video: Coming soon!
240
133
Marty Glaubitz's profile photoLe Hoang Tu's profile photoChristopher Jenkins's profile photoLindelwe Ncube's profile photo
26 comments
 
Still have no idea when the video will arrive?
Add a comment...

Jake Wharton

Shared publicly  - 
 
I did a thing: part 2! Thanks to +Donn Felker and +Kaushik Gopal for having me.

Please comment on the original.
 
Episode #7 - the final part of our two-part segment with +Jake Wharton  is out! +Donn Felker  and I chat with him on Testing, RxJava, NotRxAndroid, SQLBrite and more: http://fragmentedpodcast.com/episodes/7 #androiddev
8 comments on original post
128
27

Jake Wharton

Shared publicly  - 
 
flush(), emit(), and emitCompleteSegments(): a comparison and guide to forcing bytes downwards in Okio.
A comparison and guide to using Okio's three different methods to ensure bytes are written to the underlying sink: `emitCompleteSegments()`, `emit()`, and `flush()`.
18
4
Add a comment...

Jake Wharton

Shared publicly  - 
 
Java Interoperability Policy for Major Version Updates

Major version updates to libraries solve the API warts of old and bring shiny new APIs to address previous shortcomings—often in a breaking fashion. Updating an Android or Java app is usually a day or two affair before you reap the benefits. Problems arise, however, when other libraries you depend on have transitive dependencies on older versions of the updated library.

+Jesse Wilson offers candid insights from user perspective as well: https://publicobject.com/2015/12/12/com-squareup-okhttp3/

Ultimately, we fight for the user!
New major versions of libraries usually bring with it breaking changes in the form of big improvements. This is great for new users, but a hassle for existing clients. This is a new policy to make things suitable for both parties.
49
12
Raju SE's profile photoDevki Patel's profile photoandi ferdi's profile photo
3 comments
 
hello.. i am newbe in java.. can you talk to me about JDK ?? JVM ? and JRE ?? sorry my english is poor...
Add a comment...

Jake Wharton

Shared publicly  - 
 
 
Surprise! Extra #AndroidDialogs this week. +Huyen Tue Dao talks with +Jake Wharton on RxJava, RxAndroid, writing libraries & optimization.

As always, subscription and sharing appreciated :)
View original post
158
41
Linkang Ma's profile photoDonnie Sky's profile photofree sue's profile photoFrank Yabe's profile photo
6 comments
 
So, is RXAndroid the preferred way to develop Android apps over using a design pattern like MVP or MVVM?
Add a comment...

Jake Wharton

Shared publicly  - 
 
I have uploaded my slides from "Simple HTTP with Retrofit 2" from Droidcon NYC. The video will follow in a few weeks.

To coincide with the talk, I have also released Retrofit 2.0.0-beta1! While it's not done, it's very usable.

#AndroidDev
Retrofit has been simplifying HTTP calls for years and this new version is no different. In addition to fixing some long-standing annoyances, there are a handful of new features which make it more powerful than ever. This talk will focus on how the new APIs in Retrofit aid in making HTTP calls as simple as possible for your app. The integration with OkHttp and Okio APIs will be covered to ensure a full understanding of the HTTP stack. Common u...
256
103
Jake Wharton's profile photoJeremy Kane's profile photoDmitry Suzdalev's profile photoVikash Singh's profile photo
12 comments
 
will u please explain meaning of TYPE-SAFE HTTP CLIENT FOR ANDROID AND JAVA?

Add a comment...

Jake Wharton

Shared publicly  - 
 
In this video, +Colt McAnlis​​ gives a refreshingly candid take on the enum "problem". Almost everything about this video is fantastic. Almost. Watch it before reading more, because it does a great job of outlining the pros and cons of enum usage: https://youtu.be/Hzs6OBcvNQE

Ok. So what's wrong here?

In the middle of the video an absolutely ridiculous and sensational number is dropped whose sole purpose is to create a shock-statistic which leads to an incorrect perception of an enum's effect: 2556 bytes.

What app, in the entire history of apps written for Android, has ever had a dex size of 2556 bytes? Zero. Not one. Ever.

The video goes on to show that adding an enum bloats this fictitious app to a whopping 4188 bytes. Why that's basically 2x. I added a single enum and my app doubled in size!

Open Android Studio, go to File > New Project, select a minSdk of 16, select a 'Blank Activity' template, and click Finish. On a clean compile, how large is the dex file of this completely empty app? Two million, five-hundred and sixteen thousand, five-hundred and eighty-two bytes. That's 2,512,582 bytes. 1000x times larger than the "base" example used in the video.

Of course, this size stems from the default dependency of the extremely-useful AppCompat which in turn depends on the also useful fat cow support-v4. If you remove these two dependencies, what does our dex size become? The answer may surprise you: who cares? It's an empty app.

Even if this library-free app perfectly matches up to 2556 bytes as mentioned in the video then adding an enum is completely justified as it would be the only thing in the app.

Whatever random SHA of Square Cash I have sitting on my machine currently clocks in at 6.4MB of dex. How much of that is from enums? Maybe it's 0.01MB. Or maybe it's 0.001MB.

Like I said, this video presents the pros and cons of using enums accurately and does show the relative size difference which is what is important. It is a good video. But, the overall dex size comparison is needless and serves only to mislead you to believe the impact is greater than it really is which just destroys all that credibility it built.

As a library developer, I recognize these small optimizations that should be done as we want to have as little impact on the consuming app's size, memory, and performance as possible. But it's important to realize that throwing away an Iterator allocation vs. an indexed loop, using a HashMap vs. a binary-searched collection like SparseArray, and putting an enum in your public API vs. integer values where appropriate is perfectly fine. Knowing the difference to make informed decisions is what's important and the video nearly nails that except for this one stupid stat.
226
56
Saad Farooq's profile photoGaurav Sharma's profile photo
56 comments
 
Hi +Jake Wharton i have lots of string constant in my project shall i keep all of them as static in single class or they should be bound to singleton object and divided into multiple small classes.

Add a comment...

Jake Wharton

Shared publicly  - 
 
The video from my talk "A Few 'Ok' Libraries" from +droidcon Montreal is now available for viewing. This covers the behavior of Okio and how the OkHttp, Moshi, and Retrofit libraries interact with it to move and parse data efficiently.

#AndroidDev
154
66
Mike Wallace (MikeWallaceDev)'s profile photoNeal Sanche's profile photoNevin Chen's profile photoLars Vogel's profile photo
4 comments
 
Very interesting, thanks for expanding my point of view onto the details of InputStream.
Add a comment...
Story
Tagline
Craft brewer of Java and Android bytecode at Square.
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
San Francisco, CA
Previously
Pittsburgh, PA
Work
Employment
  • Square, Inc.
    Android Engineer, 2012 - present
  • Champion International Moving, Ltd.
    Java Developer, 2009 - 2012
Jake Wharton's +1's are the things they like, agree with, or want to recommend.
Quick Lumos!
market.android.com

A lock screen widget which gives you light as fast as possible!Touch it to turn on the camera flash. Touch it again to switch it off.Magical

Monument Valley
market.android.com

En Monument Valley, debes manipular arquitecturas imposibles y guiar a una princesa silenciosa por un mundo de belleza incomparable.Monument

Multipath TCP - ACM Queue
queue.acm.org

Multipath TCP. Decoupled from IP, TCP is at last able to support multihomed hosts. Christoph Paasch and Olivier Bonaventure, UCL. The Intern

Don't Tap The White Tile
market.android.com

So many new features here, check it out!!! We will keep improving our game, more features are coming soon. Any advice and suggestions will b

Square Cash
market.android.com

Send money to anyone with an email address. It's fast, safe, and free!No account needed. Just securely link your debit card to start sending

Square OctoCash
chrome.google.com

Sponsor a beer to your oss devs.

Ball Maze Lite
market.android.com

Ball Maze is a fun and addicting puzzle game. You have to get the ball on a target field by rolling it through one of the 200 challenging le

Giganticon - Big Icons
market.android.com

Do you crave bigger icons on your home screen? Are your icons too small to see or touch? Giganticon allows you to have big huge gigantic gia

Beautiful Widgets
market.android.com

Beautiful set of widgets including clock+weather, with some toggles Beautiful set of Widgets containing clock widget, clock and weather widg

Google+
market.android.com

Real-life sharing rethought for the web, wherever you are. Google+ for mobile makes sharing the right things with the right people a lot sim

FriendCaster for Facebook
market.android.com

FriendCaster for Facebook - the best Facebook experience on Android devices! FriendCaster for Facebook gives you the best Facebook experienc

Google Voice
market.android.com

Make cheap international calls with your Google number. Send free text messages. Place calls and send text messages showing your Google numb

Do It (Tomorrow)
chrome.google.com

The todo App for procrastinators ;)

Foursquare
market.android.com

foursquare helps you and your friends make the most of where you are. Heading out? foursquare helps you and your friends make the most of wh

Google I/O 2012
market.android.com

The official Google I/O 2012 conference app. The official Google I/O 2012 conference companion app. Supports devices running Android 2.2+, a

Chrome Beta
market.android.com

Welcome to Chrome Beta for Android!- Preview the latest features: Try out the newest features. (Sometimes these may be a little rough around

Chrome Beta - Apps on Android Market
market.android.com

The speed and simplicity of Chrome, now on your Android phone and tablet. Browse fast on your Android smartphone or tablet, and bring your p

Glitch Skills
market.android.com

Learn your Glitch skills on the go! Keep learning until the cows come home. Hey, have you ever thought to yourself: 'Self, wouldn't it be ni

Self Serve for Koodo beta*
market.android.com

View your Koodo Mobile bill and usage securely anytime,anywhere. View your online bill, quota usage and other account information securely i

SeriesGuide
plus.google.com

Android app to manage (re)watching your TV shows