Day 31/100 (coding challenge)
Error handling in Python 🛟
An error shouldn't crash your whole program. try runs risky code, except catches the error, else runs if nothing went wrong, and finally always runs.
More in the comments 👇
#100DaysOfCoding
3
13
finally is for clean-up, like closing a file or a connection. It runs whether the code worked or crashed.
2
Catch specific errors, like ValueError or ZeroDivisionError, not everything. A bare except hides real bugs, so you never find out what went wrong.
3
Day 30/100 (coding challenge)
List comprehensions 🥖
A loop in one line: [x * 2 for x in nums if x > 2]. It builds a new list, so the original stays untouched.
Same job as map and filter, in a cleaner shape. Code below 👇
#100DaysOfCoding
2
12
Day 29/100 (coding challenge)
Python strings 🔤
Slicing: s[1:4], s[::-1]. f-strings put values straight into text.
Strings are immutable: methods like upper() return a NEW string, so you have to catch it.
Code below 👇
#100DaysOfCoding
3
32
Day 28/100 (coding challenge)
Tuples & sets
Tuple: ordered, immutable, can be a dictionary key.
Set: unique items only, no order, no index. Great for removing duplicates, and for union, intersection and difference.
Code below 👇
#100DaysOfCoding
1
8
Day 27/100 (coding challenge)
Webhooks
Instead of asking a server "any news?" every few seconds, a webhook flips it: the server tells your app the moment something happens.
More in the comments 👇
#100DaysOfCoding
3
10
How it works:
1. You register a URL on your server, e.g. api.myapp.com/webhooks/payst…
2. An event happens on the other service (a payment succeeds, a PR opens).
3. It sends an HTTP POST with the event details as JSON to your URL.
4
Polling: calling the delivery app every 30 seconds to ask "is my food ready?" That wastes requests and battery.
Webhook: leave your number and say "text me when it's ready."
8
Day 26/100 (coding challenge)
Firebase Cloud Messaging (FCM)
I used Firebase today, FCM specifically. Here’s how it works.
How do push notifications reach your phone when the app is closed? FCM is the middleman.
More in the comments 👇
3
1
16
The flow:
1. The app asks FCM for a unique registration token (the device's address).
2. The app sends that token to your backend.
3. When something happens, your backend tells FCM: send this message to this token.
1
4
Why a middleman? If every app kept its own open connection, your battery would suffer. Instead your phone keeps one shared connection to Google's servers, and your backend asks FCM to deliver the message.
1
2
Day 25/100 (coding challenge)
Database indexing 📖
An index is a separate structure that helps the database find rows fast, like the index at the back of a textbook.
Without one, the database may have to read every row.
More in the comments 👇
#100DaysOfCoding
2
2
16
With an index, the database jumps close to the row, usually in O(log n). Many databases use B-trees, which keep data in order, so they can handle ranges and sorting. A hash index can reach O(1), but only for exact matches.
1
5
Day 24/100 (coding challenge)
JWT vs Session Auth 🔑
How does a server remember who you are after you log in? Two main approaches, each with totally different trade-offs.
More in the comments 👇
#100DaysOfCoding
3
2
21






