Posts

Showing posts from 2018

GitHub papercut : Collapsing files in large PRs

To provide you with some context : - in the software world, a Papercut is considered a problem which is a minor inconvenience. Note that all projects/products we use in our daily life have such paper cuts, which we learn to live with. You have all probably heard of the phrase "Death by a thousand papercuts". - GitHub papercuts is a project to remove such minor inconveniences, all of which could add up to reduce the usability of the platform. See blogpost - https://blog.github.com/2018-08-28-announcing-paper-cuts/ One of the papercuts that I regularly experience happens when I need to review large PRs, whether they are my own changes or someone else's. GitHub by default shows snippets of code from all of the files, snippets which contain code that has been changed in the PR. This is fine when the changes are small, as most PRs usually are. This becomes a problem when a large number of files changed in the PR. Note that GitHub provides a menu item to collapse a...

Software Engineering is invisible.

Image
I was looking at a small dam the other day and I was marveling at the engineering. It was raining a lot and a couple of gates were lifted to release the water. Water was gushing through the open gates, sending out ripples on one side and foaming on the other. If not for the traffic, it sounded like a beach, water breaking on the sand. Feynman once said that understanding the science underlying nature only makes it more beautiful. It goes the same for man-made structures, in my opinion. My thoughts drifted to thinking about the civil and mechanical engineers who were part of the construction effort of this dam. Even though it's not the biggest, it's a significantly large structure in the area, something definitely to be proud of. Passersby might, every so often, appreciate the structure, it's resilience and it's grandiose. Civil and mechanical engineers have that advantage. If they choose to, their work is front and center in people's eyes. Civil engineers can ...

Looking back at PySangaman 2018

The first edition of the regional Python conference PySangaman got over yesterday. First of all, I applaud the team on their decision to hold the conference on Friday and Saturday. During the audience feedback session after the conference late Saturday, a few people mentioned that they'd prefer a Saturday/Sunday conference. This prompted one of the organizers, Shreyas, to respond with their reason for the current schedule, which is an obvious answer in hindsight. He mentioned that heading back to work immediately after two busy days of conferences leaves no room to ponder upon what was learnt. It also leaves little time for folks out of town to travel and relax before getting back to their usual routine. Moving on, there were a few amazing talks and there were a lot of amazing people. I don't think I've networked as much as I did at PySangaman. The keynote speaker's talks made me ask a lot of questions, mostly in person. A couple of talks introduced me to some very a...

Tips on dealing with Depression and Job (From a commenter on HN)

I keep checking Hacker News a every couple of hours and maybe a week or two back (actually a month and a half), I came across a discussion on Depression and Job. One of the comments was very helpful and I've had it open on my browser ever since. I went through the list mentioned in the comment again today and I wanted to share the same with you. The discussion as a whole can be found here - https://news.ycombinator.com/item?id=17521757 . The specific comment that I am referring to can be found here - https://news.ycombinator.com/item?id=17523642 . Leave work after 8 hours without making excuses Go to bed at the same time every night Get at least 7 hours of sleep. Try for 8. Stop drinking alcohol and using drugs Eat better. Cook your own meals. Do meal prep to make it easier. Start exercising. Start 3x per week, 15 min of HIIT per day. Drink a large glass of water when you wake up. Drink water throughout the day. Don't drink more than one cup of coffee per day D...

Found on the internet - Recursion in Python

I came across this really concise and approachable introduction to Recursion in Python and thinking recursively in programming. While it didn't teach me anything new, it was a good way to talk about the topic. And extra points for the visuals!

Talk at the July ChennaiPy meetup

On the 28th, I gave a talk at the ChennaiPy meetup group on Dunder methods in Python. You can find the Jupyter Notebook that I used to present the content in Github . To give you an overview of the talk, I introduced a number of dunder methods in Python, methods which provide functionality to make your custom objects mimic native Python objects. If you didn't know, dunder is short for double underscore. A common dunder method that we all come across in Python classes is the `__init__` method, which is used to initialize an object during instantiation. Dunder methods are also called magic methods. The dunder methods of interest are `__repr__` and `__str__` : Provide the official and unofficial string representations of the Objects `__eq__`, `__lt__` and comparisons : Provide the functionality to compare custom Objects in Python. `__hash__` : Are used for operations on members of hashed containers like set, frozenset and dict. `__iter__` and `__next__` : Provide the func...

Today I

Updated my website, after almost an year. I hadn't updated it after I moved to Chennai. And instead of manually maintaining a list of books I read, I simply point to my goodreads profile now. I still need to update the list of talks I've given but one thing at a time.

Comment on keyboard shortcuts in GMail

If you didn't already know, keyboard shortcuts can be used in GMail e.g. to compose a new mail, to archive a read mail. Those two actions (compose/archive) are the shortcuts I most use and I love it. But BUT! every so often I end up pressing a key, by mistake, that archives a mail which I didn't intend to or worse, deleting one. You might say that I can disable the action by clicking on `... undo` but if I perform multiple actions, I can't undo them all. And bringing things back from the Trash is easier for me because my Trash is almost always empty but bringing things back from the Archived section is harder because it's not ordered by most recently archived. I wish I could selectively enable/disable keyboard shortcuts. I dunno if GMail already can do this. I dunno if there's a way to add this functionality to GMail. I dunno if a different email provider has this functionality. Do you know?