Posts

A GitHub paper cut got fixed!

Image
A while back, I wrote about a GitHub papercut - the annoying fact that the `Changes` tab in a GitHub PR will by default list/show all the changes in all of the files in the PR. There are times when a large number of files are changes. There can be times when a large number of files are modified automatically, which don't need to be reviewed manually. Up until recently, the only way to see the changes in files you cared about was to manually hide changes in the files one after another. See my earlier blogpost for more info - https://rahulporuri.blogspot.com/2018/11/github-papercut-collapsing-files-in.html . Up until recently. Because I recently saw this when reviewing changes in a PR -

[Youtube] Mike Pence rap

Image
I just saw this and I had to share it. I HAD TO!!!

__future__ is mysterious

Let me jump the gun and go straight to what I find mysterious - Running ` from __future__ import * ` raises a SyntaxError . Specifically, you will get the error - >>> from __future__ import *   File "<stdin>", line 1 SyntaxError: future feature * is not defined Now, that's weird and mysterious. For those of you who are not steeped in Python land, __future__ is part of Python's standard library. It is a library that can make the version of Python you use currently behave like a __future__ version of Python. For example, adding the line ` from __future__ import print_function ` on Python 2.7 will change print into a function (Python 3) instead of being a statement (Python 2). Now, so far, there's not much that's mysterious about the __future__ module. Sure, it's an interesting way to make one version of a programming language behave like another version. One of the __future__ module imports is barry_as_FLUFL , which is an e...

[Local meetup talk] Porting Python application from Python 2 to 3

For those of you interested, here are the full set of slides I used for the talk - Talk slides . TL;DR : - Why should you port your applications from 2 to 3? - What does it mean to port your code base? - How can you port your packages/apps? Why? Python 2 end of life (EoL) is 2020. After it's EoL, there will be no more feature additions, changes or bug fix releases on the 2 or 2.7.x version of Python. You might not care about changes to the underlying Python language as long as your code keeps working. FYI any new security vulnerability will not be fixed on 2.7.x. Maybe you don't care about that either. FYI the packages you use will probably stop supporting Python 2.7.x. Some already have. Use numpy or pandas in your code base? They already stopped supporting Python 2 and all new feature releases will be Python 3 only. See here and here for more info. What? There are roughly four types of changes between Python 2 and 3 - Syntax changes. One of the most popu...

Bye Bye to Facebook and Twitter

I think it's about time I said goodbye to Facebook and Twitter. There was a time in my life when I got a lot out of the two social networks. I came across a lot of meaningful content. I had a lot of interesting discussions, which were mainly offshoots of discussions I was already having in person. I can't remember the last time I had a meaningful discussion on either of the platforms. I don't remember the last time I came across something on either of the platforms which I wouldn't have come across anywhere else on the internet. I think it's about time I moved on from the platforms. I've mostly been inactive on the platforms the last couple of years, posting occasionally with links to articles, videos and other interesting stuff I found on the internet. While I was becoming less and less active on my social media platforms, I wanted to make an effort to make my blog more active. My social media posts were usually stuff I had written on my blog. It's...

2019 resolution : Books edition

I've been using goodreads.com to track what I want to read and what I read for the last two years. At some point, there was a reading challenge on goodreads, which I participated in in 2017 and 2018. As you can see here , I more than exceeded my goal in 2017. I almost reached my 2018 goal, which you can find here . But, if you look closely, you'll notice that there are times of the year when I read voraciously and there are times of the year when I don't touch a book. Or times when it takes me a month or more to read a book that usually takes me no more than a week, at best. That's what I want my 2019 reading challenge to be. Not the number of books I read but read regularly. Read every month. Every week. Every day. Further, I spend a lot of time reading articles online, both short articles related to tech news which don't take more than a couple of minutes per article and long form reports that take anywhere between 30 minutes and an hour. I've wanted...

[Comic book] Bad Machinery

I read a charming little comic book today called Bad Machinery : The case of the team spirit . Christian Holton, a colleague of mine at Enthought, gifted it to me for Christmas. Well, actually, his son apparently picked it. I guess our dinner conversation about comic books made it abundantly clear to him how much I love comic books. The comic itself is a webcomic that got published into books. The full webcomic can be found online . The first volume, The case of the team spirit, was funny, captivating and charming. I loved the humor. Thanks Christian and family, this was a lovely little Christmas gift. And hopefully the start of a new tradition :)

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...