Android Image Loading *without* a Library - Common Interview Question

  Рет қаралды 4,433

Rahul Pandey

Rahul Pandey

Күн бұрын

Most Android apps will use an image loading library like Glide or Picasso to fetch remote images and display them in an ImageView. A common interview question is to provide the same functionality without relying on these libraries. This tests being able to work with networking primitives (URL connection + input stream), and dealing with multiple threads (UI thread + background threads).
➤ Code we wrote: github.com/rpa...
➤ Good explainer about handlers and threads: • Looper, MessageQueue &...
➤ This problem and solution are inspired from Codepath: codepath.github...
Hi! I’m Rahul, a software engineer with a passion for teaching. I went to Stanford, was a founding engineer at a startup, and have worked at various companies across Silicon Valley. I’m currently an Android Developer at Facebook and teach an Android class at Stanford. Would love to connect with you! This channel is about tech (especially Silicon Valley), combining tactical how-to guides with interviews.
📹 KZbin: www.youtube.co...
📝 LinkedIn: / rpandey1234
🐦 Twitter: / rpandey1234
📸 Instagram: / rpandey1234
📂 Github: github.com/rpa...

Пікірлер
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
Pretty interesting, I never really thought about (or saw videos of) android specific interview questions. I figured LeetCode was the standard 🤔
@RahulPandeyrkp
@RahulPandeyrkp 3 жыл бұрын
Android dev interviewing depends very much on the company, but in my experience it's usually a combination of leetcode + domain-specific (e.g. questions like this or asking to build something).
@BharadwajGiridhar
@BharadwajGiridhar 3 жыл бұрын
@@RahulPandeyrkp Very true. Nice video.
@ganeshrajpadhayay3714
@ganeshrajpadhayay3714 3 жыл бұрын
Glad to find your channel, amazing stuff, keep them coming :)
@RahulPandeyrkp
@RahulPandeyrkp 3 жыл бұрын
thanks Ganesh!
@zeusalmighty6740
@zeusalmighty6740 3 жыл бұрын
Very nicely put video. Keep them coming!
@RahulPandeyrkp
@RahulPandeyrkp 3 жыл бұрын
Thank you 💕
@aabhishek4911
@aabhishek4911 3 жыл бұрын
Nice video , you could have added the bitmap scaling part to avoid OOM incase of huge images
@RahulPandeyrkp
@RahulPandeyrkp 3 жыл бұрын
thanks Abhishek! Yes, definitely a lot more to add here. For the bitmap scaling part in particular there's some sample code in the MyMemory video here: kzbin.info/www/bejne/pICqpHp-rJqcq6M
@mehulbisht9708
@mehulbisht9708 3 жыл бұрын
Great explanation! What if the interviewer also asks how to implement Garbage Collection that the Image Loading libraries provide for recyclerview list items? Or would it be out of the scope of an interview? :)
@RahulPandeyrkp
@RahulPandeyrkp 3 жыл бұрын
Thanks! For a standard 45 minute interview, I doubt that anyone would expect an implementation of it. However, you could prepare a few talking points about things like GC or caching.
@khaihoang7420
@khaihoang7420 3 жыл бұрын
@@RahulPandeyrkp Do they allow outside resources during the interview? I find that the syntax is hard to remember.
@RahulPandeyrkp
@RahulPandeyrkp 3 жыл бұрын
if it's a real coding interview, they should allow outside resources + googling (just like real life interviewing). If it's more of a conceptual/whiteboard test, it may not be allowed
@khaihoang7420
@khaihoang7420 3 жыл бұрын
@@RahulPandeyrkp and i am a codepath alumni. Guess what? U were a very amazing instructor. The way you taught the material was second to none. Hope u will make a series on android latest stacks and practices soon
@clo4k661
@clo4k661 3 жыл бұрын
Could you please make a course of kotlin beginner to advance? It will really help. Also I see people demotivating you. Don't get demotivate you are doing great.
@RahulPandeyrkp
@RahulPandeyrkp 3 жыл бұрын
Thanks a lot. I have a few more Kotlin videos planned, I hope they help!!
@pratiktarade6738
@pratiktarade6738 3 жыл бұрын
Great Video... Please make full video on bitmap
@RahulPandeyrkp
@RahulPandeyrkp 3 жыл бұрын
anything in particular about Bitmap that you'd like to know about?
@vengateshm2122
@vengateshm2122 3 жыл бұрын
Shouldn't we close URL connection?
@RahulPandeyrkp
@RahulPandeyrkp 3 жыл бұрын
There is a disconnect on the HttpURLConnection, but not on URLConnection. We close the input stream, don't think there's much else we can do. More details: stackoverflow.com/questions/272910/in-java-when-does-a-url-connection-close
@mahmoudayman8660
@mahmoudayman8660 3 жыл бұрын
really awesome
@RahulPandeyrkp
@RahulPandeyrkp 3 жыл бұрын
Thanks!
@techworld3043
@techworld3043 3 жыл бұрын
Great video ..
@RahulPandeyrkp
@RahulPandeyrkp 3 жыл бұрын
Thank you!
@shivamsethi3829
@shivamsethi3829 3 жыл бұрын
Great, thanks
@RahulPandeyrkp
@RahulPandeyrkp 3 жыл бұрын
Very welcome!
@dubey1akash
@dubey1akash 3 жыл бұрын
thankyou
How to Make Your Code Clean With Kotlin Sealed Classes
18:09
Philipp Lackner
Рет қаралды 42 М.
15 Years of Software Engineer Knowledge in 1 hour 30 mins
1:30:39
Rahul Pandey
Рет қаралды 133 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Coil - Image Loading Library with Jetpack Compose
9:00
Stevdza-San
Рет қаралды 25 М.
6 Design Patterns Every Android Developer Must Know
14:16
Philipp Lackner
Рет қаралды 84 М.
Android Dev - Lecture 1 - Why/What/How Android
53:43
Rahul Pandey
Рет қаралды 34 М.
Android ViewBinding in 8 Minutes
8:59
Philipp Lackner
Рет қаралды 78 М.
Building a Mobile App in 2025: The BEST Technologies
13:31
Dan Ilies
Рет қаралды 146 М.
10x Your Speed With Flutter
8:04
Flutter Mapp
Рет қаралды 90 М.
Don't Make THIS Mistake With Room & Databases on Android
8:17
Philipp Lackner
Рет қаралды 12 М.
10 Signs Your Software Project Is Heading For FAILURE
17:59
Continuous Delivery
Рет қаралды 46 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН