Fully-Faltoo blog by Pratyush

Bio Twitter Screener

14th Feb. 2023

Ran 5k in under 33 minutes

I feel proud of my new record as I never thought I could run 5 kilometers. I haven't felt healthier ever before.

The credit goes to my Garmin Coach.
Details of my 5k run on Strava

I started running in November 2022. I needed a watch to track my runs. My requirements were:
  1. The watch should have an inbuilt GPS as I don't carry a smartphone.
  2. It should have a good battery life.
  3. It is good to have music on device itself.
Parth, my cousin, suggested Garmin Forerunner 245 Music. It had all three. I was surprised at …

4th Feb. 2023

MailBrew is free now

MailBrew is one of my favourite services. It allows us to create custom email digests. We can use it to track blogs, Tweets of favorite people and other sources. It is like creating a custom newspaper for yourself.

I have 3 daily digests on MailBrew.

1. Daily Morning Digest - 8am
This one contains:
- Tweets of people who Tweet rarely and I don't want to miss them.
- RSS feed for DD News. To track national developments. [Want a better unbiased alternative]
- RSS feed for KnockSense. It keeps me updated about Lucknow.
- Top links on …

2nd Jan. 2023

Resolutions for 2023

These are few of the things I want to do this year.

Run thrice a week - do 150 runs

I did a Chattisgarh Jungle Trek in 2022. It was one of the most magical experience. Being alone in the jungle for 4 days. No horns - no noise; only the chirping of birds, blowing of breeze and crackling of leaves. Walking on the river, swimming in it, stargazing, sitting by the lotus lake and having conversations with friends. All magical!

The requirement to qualify for the trek was to run 5kms in 35 minutes. I hadn't run 1km in …

17th Dec. 2022

"Search everywhere" on Screener

We recently added a "search everywhere" feature on Screener. It allows us to do a full-text search on all the concall transcripts, announcements and key-insights of all the listed companies.

This was  our second attempt on it.

There are various ways to implement full-text search:
- Using full-text index in relational database such as MySQL / PostgreSQL
- Using services such as ElasticSearch, Algolia, TypeSense or Meilisearch
- Using text search databases such as Lucene or Tantivy

We tried full-text using MySQL in our first attempt. This time we shifted to Tantivy. These have been our learnings.

Why MySQL full-text …


30th Sept. 2022

Database corruption issue [MySQL]

Yesterday, Screener.in stopped working in the evening. I logged in via remote shell, ran `top` and saw mysql using all the memory.

Next I did `tail -f /var/log/mysql/error.log` and saw this frightful error:
10:20:39 UTC - mysqld got signal 11 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0xffed4075d9f0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = ffff804c1748 thread_stack 0x100000
Nothing else after that.

It was …

13th Aug. 2022

"INSERT...ON DUPLICATE KEY UPDATE" in Django 4.1

Django 4.1 release notes - update in Queryset.bulk_create()

I upgraded Screener to Django 4.1 last week. I was surprised to see the support for conflicting updates in bulk_create method. This uses "insert...on duplicate key update" under the hood. [Django Docs].

INSERT...DUPLICATE UPDATE (MySQL docs) is one of my favourite SQL hacks. It allows us to create and update rows in bulk.

We pass the set of rows. The already existing rows are updated while the new ones are created. The "already existing" rows are detected on unique constraints. The good thing is that it is all done …

31st July 2022

Reviewing each line of code with Git

Monkey doing a code-review - Dall-E
"Every line of code, every comment, every line-break should have a purpose."
We usually use Github's review feature for code reviews. It is hard, however, to jump between files when the changes are large. An ideal way would be to manually mark each and every line as checked during the review.

I use a combination of git reset and git add -p to do just that. Sharing the recipe below 🤫.

Algorithm
- Switch to the branch we want to review.
- Merge main into it.
- Create a new review-branch from that branch. …

« first previous
Page 3 of 63.
next last »