Profile cover photo
Profile photo
Kumar Bibek
Wasting Life!!!
Wasting Life!!!

Communities and Collections
View all

Post has shared content
If you're interested in seeing Test Driven Development used to build a Clean + MVP + Dagger 2 + RxJava + AlarmManager App, you may want to check this Video out.

*Warning: I do swear quite a bit. If you don't like that then I suggest don't watch.*

Most of the time I do random streams of me working on projects, they generally turn out pretty bad. This one went fairly well though.

My goal was to get my Unit Tests running and passing for PosTrainer (except for tests in SettingsPresenterTest). I managed to finish this task in two hours, solving some easy and complex problems along the way. In the end, I get the App finally working (well, mostly anyways) and Test it with my Phone

4:40 - Running Test entire test classes to find broken tests

4:55 - First Error: NullPointerException on observeOn(), or so I was told by the output log.

14:50 - Using the Debugger to step the the failing Test Class (which is throwing the NPE)

15:45 - Attack of the birds # 2 (I didn't get it on camera though this time)

22:50 - Mocking RxJava Observables to execute Unit Tests quickly

24:15 - Finally starting to piece things together...

28:30 - NPE Error: Cause was returning inconsitent data in Mock interactions, by using static test data.

Write errors like this down so you don't forget about them.

35:00 - Error: Mocking wrong ReminderService method.

35:25 - You'll want to turn your speakers down for this.

38:55 - Mockito Error: Mock had view.MakeToast() called on it twice.

45:30 - Viewer Question and absolutely failed explanation on my part (I can't always be coherent and follow my own advice).

1:08:00 - Error: improperly written Unit Tests

1:09:30 - All Tests passing in ReminderListPresenterTest!!!!

1:23:00 - Break Complicated Problems down into basics steps and simple language. This is especially useful when you are tired and can't hold all relevant details in your mind at once.

1:25:48 - How to write out a "Problem Statement" to solve a complex problem in your Code. If you can't explain the problem in a couple simple sentences, you are going to have a great deal of difficulty solving the the problem in Code!!!

1:34:50 - Taken the *Problem Statement* and applying it to our Unit Tests (This is fundamental TDD at play here)

1:56:00 - All Tests passing in AlarmReceiverPresenterTest!!!

1:59:00 - Emulator Demo/Test of PosTrainer (I don't seem to have luck with running the Emulator and OBS at the same time, so I switch to my phone shortly after)

2:06:20 - Successful Application Demo (although I need to fix a new Database error, but let's just be happy that I got the f***ing thing working).

2:09:15 - A Practical note about using WakeLocks

2:10:00 - Ryan is Happy now.
Add a comment...

Post has shared content
Add a comment...

Post has attachment
Add a comment...

Post has attachment
Add a comment...

Post has attachment

Post has attachment
Android Multipicker Library (Images, Videos, Files, Audios, Contacts).

- Makes it easy and simple to integrate “Attach that file” feature into your android apps.
- Don’t worry about various devices/OS variations.
- Don’t worry about out-of-memory errors.
- Don’t worry about creating thumbnails to show a preview.
- Picking up any file for your app, and it’s details.
- Picking up audio files.

Post has shared content
Last month we open sourced a framework to develop Android applications following the Clean Architecture principles. Today I've published a blog post talking about the implementation :)

Framework ->

Blog Post ->
Add a comment...

Post has attachment

Post has attachment

Post has attachment
Wait while more posts are being loaded