Skip to main content

Posts about blag (old posts, page 1)

Effortful things

That dense book you want to read but has been lying on your desk while you procrastinate on twitter. You know you'll have to tune everything else out, and read slowly, word by word, trying to understand and make sense.

That vague blog post idea swirling in your head while you look at cat pictures, one after another. Distilling your thoughts and putting them down for general consumption is a lot of thinking and effort away.

That ${cool_programming_thing} that a talk got you excited about so long ago. But, watching talks and intending to start using it is all you do about it. You know its going to take a fair amount of reading, thinking and time, before you can really use it well.

Like all those squats and lifts you dread, these things are building your muscle. The thing about building muscle – it needs effort and feels like so much hard work.

You can't build muscles effortlessly. Go do those effortful things! Only if you care about those muscles, anyway.

Better styling bookmarklet

Some sites that I like a lot for their content, have zero styling on them. I find it pretty hard to read when the lines are long and I have to read all the way on my screen.

I had a simple bookmarklet until now that just changed the width of the page.

document.getElementsByTagName('body')[0].setAttribute('style', 'width: 600px')

Kamal shared with me a recommendation for 7 simple styling rules that will make pages easier to read. I liked them, and modified my bookmarklet to use these rules now.

better-websites.gif

Drag and drop the link below onto your bookmarks bar if you want to use it.

Better website

The code in a readable format is below.

// Create new stylesheet

(function() {
    // Create the <style> tag
    var style = document.createElement("style");

    // Add the <style> element to the page
    document.head.appendChild(style);

    // Add rules from bettermotherfuckingwebsite.com
    var sheet = style.sheet;
    sheet.insertRule("body{ margin:40px auto; max-width:650px; line-height:1.6; font-size:18px; color:#444; padding:0 10px; }");
    sheet.insertRule("h1,h2,h3{ line-height:1.2 }");

})();

Update [2016-06-07]: baali pointed me to Firefox's Reader View which works well too.

Reading-time based scheduling

I had posted a link to an poem written on Medium on a Slack channel that I use with friends. A friend said that she liked the fact that the Slack article preview had the reading time from Medium in it. She could decide whether or not she wanted to read the poem or any other article at that moment.

This gave me the idea for a reading time extension for my browser, or my feed reader or my bookmarks – my reading list. The first version should be able to compute or extract the reading time for an article or a tab in my browser, and index them. I want to be able to specify the amount of time I will be able to spend reading, and be presented with something from my reading list. I think this would help with scheduling the reading of longer articles, and also to actually help me get through my reading list.

Reading time estimates that use heuristics based on word-count may not really work, and may do more harm than good. But, it may still be worth a try to see if it helps my reading habits in any way. A quick search pointed me to this extension, that can give the reading time for any page but doesn't really do what I want.

Stepping AFK

In the past few weeks, I noticed three instances where I was forced to take a break exactly when I was ready to jump in and write some code to fix a bug or add a small feature. I had to step out of the house and take a walk to meet someone, etc.

I ended up getting ideas during the walks, which significantly changed and simplified how I would've implemented things, if not for those breaks. Even if I did end up zeroing down to those solutions, I am pretty sure it would've taken a couple of not-so-good attempts and much longer than it did.

Context switches are usually considered to be expensive for programmers, but taking a break at the exact time when I had all the required context loaded into my head seemed to help. It was also probably helpful that I was taking a walk, and there wasn't really any other inputs or outputs competing for the space in my head.

This got me thinking about doing this more deliberately – I'd love to hear about any experiences or any experiments any of you have done with this. Also, I'm reminded of Rich Hickey's Hammock Driven Development talk and I wonder if this is a smaller/different version of it, and makes me want to try out the things he suggests more deliberately. If any of you has thoughts and suggestions, I'd love to hear from you!

PyCon India 2016 - Propose a talk

CFP for PyCon 2016 is open and you should propose a talk!

There has been a lot of discussion on trying to improve the talk quality at the events. As my bit of contribution to this, below is a re-hash of some good advice from the internet on why you should give a talk, and how to submit a good proposal.

Why?

  • You needn't be an expert on a topic. If you have enough experience about something to help make the next person's experience with it better, you are good.
  • Its a great way to find people who are interested in the same things as you are and to get to talk to them. If you are an introvert, you should definitely be speaking!
  • Proposing and giving a talk is about thinking about something hard enough to refine your thoughts, and being able to explain it to others. Its a useful skill to hone.

How?

  • Talks are entertainment. Pick a topic that you are excited about and fascinated by. Let it be a general topic that will have a significant number of people interested in it.
  • What you want the attendees to be telling their friends about your talk, after they go back. Make it the objective of your talk.
  • Submit a complete, clear and compelling proposal. Show the reviewers that you are willing to put in the effort to prepare for and to give a great talk. Here are a bunch of proposals to see and learn from.
  • Submit an outline along with your talk. Show the talk can be delivered in the given time and will be interesting. Include an indication of how much time you intend to spend on each part of your talk.
  • Choose a good title. The title is what catches the attention of your audience when they are trying to pick a talk. Avoid buzz words.
  • Get feedback. Like any writing, feedback can be helpful at all stages – brainstorm while choosing topics to getting critique on the full abstract.
  • Convince the reviewers that you can give a well-rehearsed and entertaining – link to previous talks you've given, include links to any testimonials you've received from your audience, etc. If you don't have a previously recorded talk, give a small talk to your friends or colleagues and have it recorded.

References

  • PyCon US has some good advice on how to submit a proposal and most of it is generic enough for you to use for PyCon India, or any other conference.
  • These posts (1 2 and more) by Jesse Davis are so so good!
  • I also liked "The Talk on Talks" by Zach Holman.

Save the Map -- Please respond

The Ministry of Home Affairs put out a draft and an RFC for a Geo-spatial bill

To regulate the acquisition, dissemination, publication and distribution of geospatial information of India which is likely to affect the security, sovereignty and integrity of India.

Even if you put aside questions about how a vetting process, for "dealing with" any geospatial information, would help with the said goals, the bill defines geospatial information so broadly that even taking a geo-tagged picture at the Taj mahal or sharing the location of your house for a meal delivery would have you breaking the law.

A group of volunteers made Save the map which has more information on this, along with a draft response that you can send to the Ministry. Please respond before June 2nd, 2016.

Thinking about Data Ethics

Earlier this month, a researcher made a dataset containing the profiles of about 70,000 users public. He didn't really see a problem in doing this because he felt he was only presenting already publicly available data in a more usable form. was only presenting it in a more usable form.

Yesterday, I came across this quote in the very first chapter of Allen Downey's book Think Stats which I liked a lot, and reminded me of this incident.

26969166130_58e4865f47_b.jpg

I hadn't looked at the OKCupid data release and the discussion around it much, but I went back and read this article by a social media researcher who thinks a lot about these things.

She puts forth a lot of interesting ideas to think about ethics. Some things that stood out to me are:

  • Ask yourself how the person whose data you are using feels about the data.
  • Taking a 'what if' impact approach to thinking about data and ethics.

Also, you needn't really call yourself a researcher to be actually doing experiments with (or analyzing) "big-data" and discovering and putting out facts that have an impact – however big or small. You should really go read the article, whether or not you are a researcher using data.

Incidentally, there is a meet-up on Data Ethics this weekend in Bangalore. I'm excited to learn and think more about this, and talk to others who care.

Level-up Tools

Thanks to a friend I got an upgrade to our still-being-setup kitchen. I now have a non-stick pan along with a few more new additions. I would previously use a bowl that people usually use to boil milk etc. for making whatever I did. The non-stick pan feels so great! It has made it a lot simpler to make some of the things I used to, because its non-stick. And it has vastly expanded the possibilities of things I can make, by virtue of being flat and wide based. The pan is such a great addition to my kitchen paraphernalia, and it adds a new dimension to the kind of things I can make. I'm not here to write a user review for it, though.

What are such tools in other things that you do, that drastically changed the way you did something, or added a new dimension to the kinds of things you could do, tools that make you feel like you have a new super-power? Learning to write Python (after starting off with C) seemed to give me so much power allowing me to focus on the problem, rather than fussing over the low level details. Sasha mentions in this post how using a Spaced Repetition System like Anki drastically improved her efficiency because she could focus on thinking about higher level things rather than trying to recall or search for what method or function to use to do something.

What are some such level-up tools for you? Is there a systematic approach to discovering tools?

blog-admin and Nikola

Another post about blogging.

blog-admin now supports Nikola, thanks to yours truly. blog-admin is an Emacs package by CodeFalling that lets you view and manage your (static site generated) blog from within inside Emacs.

Nikola's command line utility is pretty nifty and does a bunch of useful things. I had a few utility functions to do common tasks like create new post and deploy blog. This worked well, but moment I came across this blog-admin's tabular view, I was sold!

org2blog (a blogging tool I used previously) had a tracking file that kept track of all the posts I made, and I used it quite a bit for navigation – thanks to org-mode's search functionality. The tabular view of blog-admin is even better! I really like the fact that the author has tried to keep the package generic enough to support any blog, and adding support for Nikola has been quite easy.

The filtering functionality is crude, but good enough for a start. One thing I want to add is a preview functionality for drafts. Showing some (writing) statistics would also be nice – No. posts in the last month, total published posts, etc. No promises, but you may see some of these things, soon. :)

Book Review: 5 Love Languages

  • Author Gary Chapman
  • ISBN 080241270X
  • Read 2016-01-13
  • Rating 5/5

I first heard of this book in a discussion on relationships amongst friends from RC. The discussion was quite interesting and the book received more than a couple of strong recommendations. So, I decided to pick it up.

Very simply, the book is codified common sense explaining what Love is. Gary Chapman, the author, started with the question "What makes you feel loved" and found that the answers could be grouped into the following 5 categories:

  1. Words of affirmation
  2. Quality time
  3. Receiving gifts
  4. Acts of service
  5. Physical touch,

which he calls the languages of love. He also proposes that people have a primary language of love, and a failure to speak to a person in their primary language would make them feel unloved.

The book is filled with anecdotes to explain what each of these languages means and how to speak them, along with practical advice and exercises to learn to speak each of these languages. Though the book has been written with couples in mind, the fundamental ideas in this book can be applied to any relationships. I feel like it has been helping me connect a few dots, ever since I've started reading it.

It has been totally worth my time to read this book. A highly recommended read!

Below are some of my notes. Feel free to suggest improvements (for readability and otherwise) on the notes.

23781720643_a8e91c0cf8_o.jpg