Ahsen Saeed | Just another Programming Nerd
519 FOLLOWERS
Hi, I'm Ahsen Saeed the founder of ahsensaeed.com. I live in Lahore, Pakistan. A senior Android Developer with 6+ years of experience. I mostly taught myself to learn to code. I've won three national prizes in Android app development. Subscribe now and get the latest articles.
Ahsen Saeed | Just another Programming Nerd
3y ago
If you go onto a platform like YouTube, you can easily see that there is a huge audience
in the cryptocurrency space. A ton of people and experts believe that it will be the next
big thing and that it will continue to rise in price. But, for every person that does believe
in the future of Bitcoin, there is a person that thinks that it is not a good idea and they do
not trust it.
There are numerous reasons why people do not believe in the future of Bitcoin as an
investment or currency, and I will dissect each opinion and get to the bottom of it. There
are other reasons why Bitcoin is hated, but ..read more
Ahsen Saeed | Just another Programming Nerd
4y ago
Let’s get this straight: most people familiar with Linux and maybe used the top command-line utility to see what process is taking the most CPU or memory. There’s a similar command-line utility called htop that is much interactive than the top.
It’s one of my favorite Linux tools that I use regularly to monitor system resources. Most people argue on why someone uses htop when we have built-in top. I mean it’s like you have the weapon to kill the zombies with Bazooka but instead, you’re killing them with the knife.
htop has better human-readable defaults. Sure, others can do the same t ..read more
Ahsen Saeed | Just another Programming Nerd
4y ago
Today, almost every android application has some kind of date or time picker implemented. We often use them to set reminders, mark special dates in the calendar, set up an alarm, etc… Nowadays almost every app developer tries to follow the Material guidelines and luckily with the recent release of Google Material Design library we can use the MaterialDatePicker component. It a new component that has very compelling features including the following list.
Before showing you the features you need to add the updated Material Design library in the app-level build.gradle file.
implementati ..read more
Ahsen Saeed | Just another Programming Nerd
4y ago
Recently, I had to work with firebase in one of my Android apps. Being an Android developer with the kotlin programming language, I love to use kotlin-coroutines for all the asynchronous task handling that is easy to readable and maintainable. So, I want to use the same approach for all firebase SDK calls and luckily found out that there are a couple of extension functions wrote by the kotlin team for Google Play Service Task API.
Before showing you those extension functions let take a quick recap with the following example.
In an instance, I want to fetch a user from a collection of f ..read more
Ahsen Saeed | Just another Programming Nerd
4y ago
If you reach here after searching on google then there’s a might chance that you read this “Functional programming has a deep learning curve, not easy for beginner” But if you’ve been programming in Kotlin for a while, chances are good that you already use a lot functional programming concepts in your software.
Don’t let all the new words scare you away. It’s a lot easier than it sounds.
Functional programming has become a really hot topic in the programmer’s world. Many programming languages support programming in both functional and imperative styles; So does the Kotlin programming la ..read more
Ahsen Saeed | Just another Programming Nerd
4y ago
Today I decided to write about a couple of things, in my opinion, good and bad practices of coding in Kotlin programming language that you meet often.
Table of Contents:
The use extension function to release resources
Iterating Over Collection, Sequences, and Mappings
A couple of ways to combine multiple iterators
Safe and Unsafe cast operator
The use extension function to release resources
Sometimes it’s required to write code to manage resources properly. It’s often the case when working with files, database connections, sockets or other entities with unmanaged resources. For examp ..read more
Ahsen Saeed | Just another Programming Nerd
4y ago
Firebase is a Google-backed platform that is becoming very popular amongst mobile devs. It offers a lot of great products; Authentication with social platforms, Realtime-Database, crash-reporting, analytics, push-notifications, cloud storage and many many more.
So, as the title of this article tells we’re going to build an authentication flow for Firebase using social platforms with Twitter, GitHub, Gmail, and Facebook.
In this tutorial example, I will cover the following points:
Firebase Installation
Firebase Android App Setup
Facebook Authentication Firebase Setup
Facebook sign ..read more
Ahsen Saeed | Just another Programming Nerd
4y ago
Intro screens or walkthrough is the most commonly used UI for displaying the info of what the app does at the start. So, for the purpose of this, we can simply use the Android ViewPager2. It mostly used with the dots indicator and provides the ability to show different info images or with different fragments.
Scenario: Previously I was working on an android app where I need to add intro screens without adding any fragments and fix (static) content on a screen with only image changes inside the screen.
I remember searching online for a couple of days to develop something as simple ..read more
Ahsen Saeed | Just another Programming Nerd
4y ago
If you’ve managed to reach here, you probably care about performance and want to make sure you’re getting everything you need for your Android project. If that’s the case this article is for you.
This post was inspired by this video of Zac Sweers that goes through a couple of Dagger2 Tricks or you say guidelines. The Dagger2 Tricks we’re going to discuss in this article are not meant to be weird Gotchas or anything. It’s just clever ways to enable patterns in your code.
This will be a quick tutorial so don’t you dare to leave your computer for a coffee or for a Pepsi can.
Let’s get st ..read more
Ahsen Saeed | Just another Programming Nerd
4y ago
This article is the third part of the series, Lost in Android Support Material Design Library. If you didn’t read the previous one you can start from here.
So, today we will be covering the features of Android Material Chip Component. A Chip is a compact element that shows a label, an optional icon, and an optional close icon. Moreover, chips are flexible enough for entering information, handling the action of a user, and filtering the content.
Table of content:
Setup
Basic Usage Of Android Chip With XML
Testing Out Multiple Chip Attributes
Setting Chip Properties Programmatically
L ..read more