Posts

Showing posts from January, 2019

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 :)