Request: Improving code reading efficiency

193 views
Skip to first unread message

John Berryman

unread,
Jan 16, 2017, 1:52:59 PM1/16/17
to penny-un...@googlegroups.com
When programming, I feel like I'm pretty good with architecting my own code and figuring out algorithms, but I'm not nearly as good at reading through an existing code base. I tend to get too distracted trying understanding the small details and it takes me a long time to find the piece that I'm really looking for to begin with.

I would love to screen share with someone, hand you a piece of my code, and watch you think out loud as you read it and try to understand it. Maybe we can help each other get better.

John Berryman
Author of Relevant Search (Manning)

jason.orendorff

unread,
Jan 17, 2017, 11:04:23 AM1/17/17
to Penny University
On Monday, January 16, 2017 at 12:52:59 PM UTC-6, JnBrymn wrote:
I would love to screen share with someone, hand you a piece of my code, and watch you think out loud as you read it and try to understand it. Maybe we can help each other get better.

I would love to do this any time. Sounds amazing.

-j

Bill Israel

unread,
Jan 17, 2017, 11:07:15 AM1/17/17
to Penny University
I wouldn't mind participating in this if people are open to it. This is almost certainly an area where I lack a bit and just being able to have a discussion about it with other people would likely prove useful to me. So, is there room for a third in that Hangout?


- Bill

JnBrymn

unread,
Jan 17, 2017, 11:31:59 PM1/17/17
to Penny University
Orendorff has spoken for Tuesdays, but I'm unfortunately out next Tuesday (most likely). Could we settle for next Monday morning instead? I'd vote for 9:00AM.

Let's try connecting on this hangout (or call me if it doesn't work). Everybody bring some code to much through in whatever language you're comfortable with. I have a 1 file piece of code, but I'm thinking maybe we should have something larger and multi-file b/c that introduces a different kind of code reading.

beck

unread,
Jan 19, 2017, 10:26:47 AM1/19/17
to Penny University
I'd love to sit in on this too!

jason.orendorff

unread,
Jan 19, 2017, 11:14:25 AM1/19/17
to Penny University
OK, let's do this Monday at 9AM. Anyone who wants to join the party is welcome.

Here's a link to a Google Hangout. No one is in it right now--click it on Monday morning:
https://hangouts.google.com/hangouts/_/calendar/amZiZXJyeW1hbkBnbWFpbC5jb20.0a1dssn82ljevq7h2d7m7mp2r0?authuser=1

We'll pick some code to look at ahead of time so we can get started right at 9.

-j

courey.elliott

unread,
Jan 20, 2017, 9:53:31 AM1/20/17
to Penny University
I can join at 9 but I have to pop off for 15 minutes for standup at 9:15. As long as that isn't distracting, I'm in

JnBrymn

unread,
Jan 20, 2017, 11:51:31 AM1/20/17
to penny-un...@googlegroups.com
Paste this on the terminal so that you're prepped:

cd ~
mkdir code_reading
cd code_reading
git clone g...@github.com:pallets/flask.git
git clone g...@github.com:django/django.git
git clone g...@github.com:pypa/pip.git
git clone g...@github.com:bewest/argparse.git
git clone g...@github.com:andymccurdy/redis-py.git

Others?

Max Shenfield

unread,
Jan 22, 2017, 6:48:54 PM1/22/17
to Penny University
Planning on joining in the hangout as well.

rcarr

unread,
Jan 23, 2017, 8:16:28 AM1/23/17
to Penny University
I'm interested.

JnBrymn

unread,
Jan 23, 2017, 11:53:26 AM1/23/17
to Penny University
Here is a recording of our first Penny University Live where we covered code reading efficiency.

Outline:
  • Jason Orendorff took the role of guinea pig by reading through a random python library (argparse) as we watched.
  • The first goal was to quickly absorb the contents of the argparse library and to understand code organization.
  • The second goal was to identify the source of a bug in the code.
  • We had a conversation about what we learned.
  • We turned the tables and I became the next guinea pig reading through redis-py.
Learnings:
For me - I realized that code reading is effectively a tree traversal - you have to mentally understand how the code tree is "shaped", and as you're reading code, you have to constantly reevaluate the most optimal path to take in order to learn what you need from the code.

The trick is in pruning the tree.

I think there is an intuitive element in learning what code to dig into and what code to ignore or come back to later. Watching Jason, I got a better idea of how another developer approaches this problem, and we were able to ask about some of the intuition that backs his decisions. Another interesting thing was to learn about the tooling and dev environment that others work in.

This was fun! I plan to do it again soon.
~John Berryman

PS - "Penny University Live" is very informal. Want to make your own? Just setup up a public Google Hangout, invite others, and broadcast it to YouTube. Then remember to share the link and tell us about what you learned.


Reply all
Reply to author
Forward
0 new messages