SWE | I make you go 'wait, I didn't know that' | Tech • Sports • Filmmaking • Opinions |
If I offend you, likely didn't mean to. If I double down, I likely did.
@kundanvyas1@Rayraybom76 You are way off. Rent 40k? Unless you live in the outskirts of Bengaluru, getting a 3BHK (assuming the guy has family members other than his wife) at 40k is unlikely. Add maintenance of ~5k per month. >10k would easily go into cook and maid expenses. Too many things to point out.
@EduardoVarelaTV Nole's Career Grand Slam (winning 4 consequtive slams) was very impressive and frankly quite underrated.
Fed had multiple chances to do it but he had Rafa. Rafa could've done it in 2011 AO but his nemesis (his body) stopped him. Djokovic had a chance in 2012 but fell to Rafa.
@shelovesore As far as MK Gandhi is concerned, that was from an earlier part of his life. He did change his stance later as far as I know.
Having said that, he was a controversial figure if you read about some of the stuff he did even after becoming a 'Mahatma'.
@ndtv I just read the article. I don't understand why parents don't get their daughters back home when she repeatedly complains that something is not right...until it's too late. This story keeps repeating over and over again. Log jate bhaad mein, in-laws jaate bhaad mein. Le aate usko
Not many people know this, but in #Python, you can control how args are passed.
Any parameters BEFORE "/" = expect positional args only
Anything AFTER "*" = keyword only
Eg:
def f(a, b, /, c, *, d): pass
Valid:
f(1,2,3,d=4)
f(1,2,c=3,d=4)
Invalid:
f(a=1,b=2,c=3,d=4)
#Python *args and **kwargs
Used as function parameters:
*args = pack EXTRA positional args into a tuple
**kwargs = collect EXTRA named args into a dict
When unpacking:
*: unpacks iterables
Eg: print(*[1, 2, 3])-> 1 2 3
**: unpacks dicts
Eg: f(**{"age": 5})
Same as: f(age=5)
Python has for/while loop with else
Remember this:
'else' runs if the loop finishes normally, even if it runs 0 times.
'else' does NOT run only if a break happens.
In short, No break = else runs
break = no else runs
#python
@Sandy_3334@sidhant British can't even say sorry for Jallianwala Bagh massacre. I doubt they'll return anything to us, let alone Kohinoor...unless we have some leverage over them.
@jawnbits@RandyHeyyyy@neoavatara 34 states in US still permit minors as young as 15 to 17 to marry with parental or judicial consent while all states across India strictly prohibit girl marriage below 18. Now that you know something new that offends you, please don't start mass-shooting kids.
I'd start with understanding the access patterns, i.e., what kind of queries we'll run on the table or collection.
Then account for this being a write-heavy system. 10M per day means 115 writes/sec approx. on average. I'd recommend a throughput of 5 to 10x that to handle spikes and retries, so 1k or so writes/sec.
Index only key attributes we frequently query on, like transaction_id or created_at etc. Indexes improve reads but slow down writes, so keep them minimal.
Partition or shard early. With billions of rows over time, performance will degrade otherwise. Tbh, I'd work with an experienced db engineer for this.
I'd plan for idempotency. Retries will happen, and a unique transaction_id may not be enough. Use an idempotency key to prevent duplicate processing.
Also consider retention policies, archival strategy, and read replicas for scaling reads. But like I said, I would work with an experienced db engineer when designing such a db table. Good to have a specialist helping you.
In 1975, late Amita Malik, the most celebrated film critic from India, dubbed the "first lady of Indian media", anchored a panel discussion with Elia Kazan, Akira Kurosawa, Satyajit Ray and Michelangelo Antonioni, some of the greatest filmmakers of their time, which was telecasted in Doordarshan, the only tv channel then in India. This would have been a treasure anywhere in the world.
Unfortunately, this goldmine tape was either lost or erased from the channel's archive (sheer negligence and apathy?)
Talking about the legendary event in one of her interviews, she said, "The BBC had originally asked for it, but being patriotic, I gave preference to DD and paid for it."
#satyajitray #filmmaking #BBC #Doordarshan
Adding an index feels like an obvious improvement. Your read queries get much faster and you couldn't be happier about it…at first...until your writes slow down and storage starts growing.
Indexes speed up only the queries that actually use them, while every insert, delete, or update to indexed columns adds extra work.
Therefore, before adding one, ask yourself:
Do I actually query this column often?
Does this match my real access patterns?
#BackendEngineering #Databases