Skip to main content


Showing posts from March, 2016

Pocket reading list : Week 4.1 of March

Lunar Reconnaissance Orbiter Camera : More awesome images were sent back to Earth by the Lunar Reconnaissance Orbiter which was orbiting, duh, the Moon! This image is especially awesome because instead of looking straight down at the surface of the Moon, the orbiting satellite was pivoted to the side to capture altitude information better!

Terriers Were Once The Greatest Dogs In The World : I love everything that FiveThirtyEight publishes. Well, most everything. And this one is on dog breeds that've won competitions over the last century!

Why I think Tesla is building throwaway cars : I've read a lot of article by a lot of people praising how awesome Tesla's cars are and how they are the future because they aren't diesel or petrol powered! While that is true, another important thing that should be considered when making or buying a car is how easy it is to use and maintain the car, how cheap it is to refurbish the car is it is totaled and how long the car is expected to …

A new place for the location visualisations on GitHub pages

Instead of embedding the plotly maps into blogger posts, which BTW don't follow the blog layout, i thought it'd be better if I have a stand-alone place where only the maps are displayed! With a bit of text of course. And I've always wanted to use GitHub pages for something.

So, I created a GitHub repository and page called uniLocs where I'll keep the maps from now on.

NOTE : The two previous blogposts can be found here and here.

Creating an rudimentary interactive application in python with Pyface and Qt

So, I wanted to learn the Qt windowing framework and I wanted to be able to write code in Python, which I am comfortable with, instead of using C++. Pyface is one such projects that let you create and communicate with GUI elements made with Qt from Python. Coincidentally, it's one of the open source projects that my employer created and maintains.

Here you can see an example code that creates a window with a text area, created using the QTextEdit class. Given that I would like to know what's written in the text area, I can use the toPlainText() method of a QTextEdit object. Further, I would like to have some buttons which do something I want them to when the user clicks on them. Buttons are QPushButton() objects and object.clicked.connect.() method call links the button to a function/method/action of our liking. The layout of the text area and the buttons are set using a QVBoxLayout object.

Three references which helped me are mentioned at the top of the file. A first version…

Pocket reading list : Week 3.2 of March

Why Pluto is a frigid prison for nitrogen ice : I don't know if you guys know this but a while back, a tiny satellite sent by humans a long time back reached Pluto and sent back some amazing pics (again, the images lead to some very interesting science but let's take one things at a moment). It takes a while to interpret the images and produce meaningful science from them, after which peer review needs to happen. A bunch of papers were finally submitted by the team a couple of days back. This is a commentary on one such. "Science Papers Reveal New Aspects of Pluto and its Moons" is another.

Inside the wild—and wildly successful—early years of Mission Control : I have been amazed by space and spaceflight for a while now and this is an account of the lives of a few people who were behind the scenes, handling the operations of some of America's most successful space missions.

Flint’s children and the burden of betrayal : This article freaked me out. If you don't k…

Pocket reading list : Week 3.1 of March.

10 Years Over the Red Planet : Space images never cease to amaze me. And the Mars Reconnaissance Orbiter has been sending back amazing images for about 10 years apparently. I mean, they're not just pretty images, there's some awesome science underneath as well but hey, let's start somewhere. This is article by the Bad Astronomer concise overview of what all the MRO has seen over the last 10 years.

VLA Shows Earliest Stages of Planet Formation : One more astronomy news until the next time. One of the theories of solar system formation is that the proto-planetary disk (a dusty disk of material) that surrounds a young star will start forming clumps which will eventually condense enough to form planets. And the Very Large Array (a lot of telescopes which work together to form one very big telescope) observed something like what I described earlier. Read on if you want to know more about where we come from.

Stack Overflow Developer Survey 2016 Results : If you have written code, …

Visualizing the locations of astronomical research institutes/departments : Ver 2.0

In my previous blogpost, I talked about why I wanted to make an interactive map showing the locations of universities/labs where astronomical research is pursued. After my first attempt at plotting about a hundred locations on  a map, here are about 200 locations, spread more widely than locations just in the USA.

I still haven't done all that I wanted to. And I remembered that I also wanted to add information on the application deadlines for PhD admissions at the places.

Again, if you have any comments or suggestions, regarding what I already made or how I can improve it, I would love to hear them.

Also, the data is available on plotly here and on google docs here

Visualizing the locations of Astronomical research institutes/departments

Till November 2015, I was searching for PhD and research assistant positions in astronomy departments and labs around the world. There's no one place which lists out ALL of the places and the few lists I did found were outdated and were a list. A map is the best way to represent such a data set, in my opinion, so that is what I set out to do.

I've been searching for and bookmarking universities/departments/labs/centers where people do astronomy for over 3 years now so I have a pretty long list to go through. I first had plans to automate the process of retrieving (Lat, Long) information given a URL but I couldn't figure out how to. I remember finding a website which, given a URL, would tell me the location as to where it is hosted, but I have since lost track of it.

And instead of putting it off in want of a programmatic way of making this map, I thought I'll put in the time and do the whole thing manually i.e make a list of websites, check every website for a contact…

This week's Pocket reading list : Week 2.3 of Mar

How a $2.7 billion air-defense system became a 'zombie' program : In the context of the USA, government agencies spread out their work contacts across various states to provide for jobs. Said jobs sometimes have to be put on the axe because they have been revised or are not obsolete. Representatives from said states force the agency to pay for the project through it's nose, making the construction of said obsolete object complete. This story just fills in the specific details.

Exxon Confirmed Global Warming Consensus in 1982 with In-House Climate Models : Firstly, it was interesting to know that Exxon, the petrochemical giant, had a team of scientists who were trying to understand climate change. Secondly, it's interesting to know that the team published results talking about climate change and how drastic it will be if we don't cut back soon on our emissions, therefore publishing results that seemingly go against the company funding them. Lastly, it was sad to know…

More git awesomeness

As I mentioned in my previous post, working at Enthought involves a lot of forking, commiting, pushing and merging. Git is used for code version control and while I was comfortable working with git earlier, I had to learn a lot of new tricks.

One of the first things I had to learn was branching and PRs, as I had mentioned in the previous post. A note of caution here. Say you're working on adding features to a stable code. In order to add the features and check them, you create a branch called 'features' using

git checkout -b features
Now say, in the middle of this process, you've been asked to fix couple of bugs in the supposedly stable code. To code and submit the fixes, you need to work in a different branch, say 'fix', created using

git checkout -b fix
Here's the catch. You need to create the branch from master/stable and not the features branch you were previous on. So you will have to run the second command after running

git checkout master
This will …

Mid-week update of Week 2 as an intern at Enthought, India

I've been formally assigned to work on the new Data Import Tool add-on to Canopy. I used to think that it is similar to the data-toolbox in Matlab or R but having tried out the Canopy add-on, I can say that it is very different. Well, I don't know if I can get into the details as to how it's different from the others so I'll postpone that for another time. Otherwise, it's been a steep learning curve and it's a bit hard to climb at times. I guess i'll just have to keep climbing up even if i roll back down a bit.

Enough meta stuff. Let me now tell you about two interesting things I learnt about git.

I wish someone had told me about "$ git stash". Say I have a working code. Say I am making corrections/improvements to the working code. Now say that my prof calls me up and asks me to run some data through the working code, without the changes. Now, because I don't want to throw away the changes I'm making, I can *stash* them away using git. Gi…

Pocket reading list : Week 2.2 of March

Minorities exploited by Warren Buffett’s mobile-home empire : Predatory lending is something I've heard a lot about but never really understood. This article shines some light on what I understand about the topic. Poor and illiterate people are deceived and are taken advantage of by this mobile housing industry, making them pay extra to buy the house by adding bogus fees and making them sign agreements they don't fully understand.

The Missing 11th of the Month : There is popular XKCD comic that shows how frequently a date was referred to in English language books published after the year 2000. Weirdly, in the comic, the 11th of the month shows up less frequently than any other day of the month. This article talks about what the reason behind this weird outcome is and how it's a result of the process used to estimate the frequency of various dates found in literature.

Publishers Gave Away 122,951,031 Books During World War II : During the second world war, publishes in the US…

Pocket reading list : Week 2 of March

When U.S. air force discovered the flaw of averages : Humans come in a wide variety of sizes, shapes, colours and so on. So, for the sake of simplicity, designers and manufactures would like to know what the average human looks like, in order to tailor their design around those dimensions. It so happens that no human will tick all the boxes an average human is defined by. This fact is recounted in two instances, one in which the air force needed to modify it's cockpit dimensions to fit its pilots and the other in which the female body was being compared and commented upon against a hypothetical *average* woman.
The Wildly Misunderstood Aeronautics Event Captured in This Photograph : Most of us have seen this picture at some point or the other, especially if we are in and around the engineering discipline and people's perception of what caused this phenomenon is, apparently, wrong. This is an account of what really is happening in the picture.

The Golden Age of Weird Papers : Whi…

A week as an intern at Enthought, India.

A week has gone by since I started my internship at Enthought, India and what a week it has been.

As I mentioned earlier, I have been going through the documentation of a few open source projects that Enthought works on and uses for their code base; traits, traitsui, chacoenvisage and jigna for example. I am not going to describe what they are because there are other people (i.e their authors) who have done it better. The documentation for traits, traitsui, chaco and envisage are very good places to start if one is interested in using the packages and understanding their capabilities.

While going through the examples and demos of these libraries, I found a couple of bugs with simple fixes, one in the chaco library demo which needed me to explicitly declare namespace in the init files and the second in envisage that needed me to explicitly specify file path to properly load image without throwing an error. Like I said, trivial fixes that didn't need me to iteratively dig through…

Pocket reading list : Week 1.2 of Mar

The Strangest, Most Spectacular Bridge Collapse (And How We Got It Wrong) : Most of us in college have heard of this story at some point or another, that winds were moving a bridge up and down at the resonant frequency of the structure and it oscillated so drastically that it broke apart. The bridge was nicknamed 'The Galloping Gertie' because it had moved about in strong winds before. Anyway, most of us were told that the reason the bridge fell apart was because of resonance, which, as this article points out, isnt the right answer.

Stumbling to Inflation : The theory of inflation was proposed to solve some of the drawbacks of the Hot Big Bang model of the universe. You know, The Big Bang theory. Alan Guth proposed a theory of Inflation and this is the story of how the idea came about to him.

The Big Fish - The story of : is a very real magazine/website, made by two people at to tell the management how the internet works and how they shouldn't…

Pocket reading list : Week 1 of Mar

Why Copenhagen Has Almost Perfect Water : Water bodies in urban places are pretty disgusting. They aren't usually maintained by City Works, garbage is dumped in them willynilly and the city sewage flows into it untreated. Apparently Copenhagen did something about it, that worked. Clean water bodies are something that cities should seriously consider, not just for their appearance but because the ground water reserves are directly affected by them.

Inside the Sony Hack : I don't know if you've heard but the hack on the Sony corporation was one of the biggest last year. Hacks on corporations apparently happen regularly, it's just that they aren't publicly reported, unless the hackers decide the release the information to the public, which is what happened in this case. Personal information on thousands of Sony workers was released to the public. Not worrying about that for the moment, the hack disrupted the internal networks of Sony and it made day-to-day work next to…

3 days as an intern at Enthought, India

It's my fourth day as an intern at Enthought, India and I've been slacking off a bit in terms of not writing a daily report of sorts. I've learnt a lot over the last 3 days but I feel like I can do better. Here's a brief overview of what all I've learnt this week.

I haven't been assigned a project yet so I'm going through the documentation of a couple of enthought libraries (that are public) that form the basis of most of their products - traits, traitsui, envisage, jigna, pyface to name a few. Well, I browsed through them, didn't read them thoroughly. On my second day, while toying around with the examples in envisage, I discovered that two of the examples were broken, which my mentor tried fixing, while I sat beside him trying to understand what exactly he's doing and how he was trying to fix the bugs. At the end of the whole exercise, we were able to fix one of the example but we are yet to submit a PR fixing it. I discovered another bug yesterd…