This is the P2PU Archive. If you want the current site, go to www.p2pu.org!

Reading Code

My recent threads

Recently updated threads

Tools for Reading Code

Go back to: General discussion

A place to post tools you are using-- or wish existed-- for reading code.

From the chat today it sounds like people are using: 

  • grep to find keywords and chase down function names and definitions
  • eclipse which generates links between a function call and where it is defined 
  • firebug and/or chrome developer tools for viewing generated page source, or setting breakpoints in javascript code. 
  • people also talked about doing some static code analysis

tools people mentioned they wish existed (if you find one, post it here!):

  • source code visualization
  • a "gdb" for stepping through scripting languages

please add your existing tools and wish lists to this forum topic!

Jessy Cowan-Sharp's picture
Jessy Cowan-Sharp
Mon, 2010-09-20 02:57

forking code on github and commenting it inline was suggested in IRC today by eric, with an example from him for wordpress: http://github.com/eric-brechemier/wordpress.

this could be done as a shared repo between all class participants, or each with their own.

Eric Bréchemier's picture
Eric Bréchemier
Tue, 2010-09-21 21:20

I thought about various options for shared repositories on GitHub. The simplest option would be to have you or a designated admin:
- create a GitHub account for the class
- fork all studied repositories using this account
- add all fellow students as collaborators on GitHub
Pros: simple, usual git setup
Cons: everyone needs to create a GitHub account and generate her/his own SSH key

On the opposite, we could create a single, shared GitHub account, with a shared SSH key, and add it as collaborator to all forked repositories.
Pros: a single GitHub account is needed
Cons: most complex setup for people who already have a GitHub account or a SSH key

References:
http://help.github.com/multiple-keys/
http://help.github.com/managing-clients/

Jessy Cowan-Sharp's picture
Jessy Cowan-Sharp
Sun, 2010-09-26 23:11

hi all! we had a great class today and i'll be sending out notes later.. near the end, we decided to set up a github "organization" [0] with people in the class as members. using this space, we can fork the code for the frameworks we're studying, and everyone can add their own comments inline, see each others' additions, etc. pretty neat.

to get started in the right direction, eric [1] offered to lead a short tutorial on using git! this tutorial will be tomorrow, ****monday september 27th at 1900h UTC****. If you can make it, please join in! And if you can't, the transcript will be posted online afterwards. As usual, find us on IRC in #p2pu-webcraft/reading-code .

Let me know if there are any questions, and thanks Eric!
Jessy

[0] http://github.com/blog/674-introducing-organizations
[1] http://p2pu.org/webcraft/users/ericbrechemier

Jessy Cowan-Sharp's picture
Jessy Cowan-Sharp
Mon, 2010-09-27 02:35

Ok-- I've set up a new github organization called P2PU Courses, and created a team called Reading Code. Then, I forked the frameworks for this week: Django and the python driver for MongoDB. See here: http://github.com/P2PUCourses.

If you want to make use of this resource to edit and comment on the code directly, I think it'll be pretty awesome. If you don't have a github account yet, then I encourage you to make one-- as a Maker, Hacker, and member of the Open Web you will surely make use of it!

Thanks-- Please send me your github user ID! And more to come on specific bugs to look at tomorrow ;)

Jessy

Jessy Cowan-Sharp's picture
Jessy Cowan-Sharp
Mon, 2010-09-27 03:03

Apologies-- one more email-- I changed the name of the organization from P2PU Courses to p2pu-- so the new url is http://github.com/p2pu! Sorry for any confusion!

Don't forget to send me your github username so i can add you to our team :)

Pablo Olmos de Aguilera C.'s picture
Pablo Olmos de Ag...
Mon, 2010-09-27 21:12

Is some kind of organization that can run in any course? Because the name implies that...

Eric Bréchemier's picture
Eric Bréchemier
Tue, 2010-09-28 22:05

Here is the list of GitHub accounts of people of attended the intro chat on Monday (extracted from the log):
http://github.com/eric-brechemier
http://github.com/madarve
http://github.com/ravexx
http://github.com/sometwothings
http://github.com/PaBLoX-CL
http://github.com/natanatan

Jessy Cowan-Sharp's picture
Jessy Cowan-Sharp
Tue, 2010-09-28 01:05

pablo, yes we can set up a team for any course-- we'd just need to work with the course organizer to set it up probably. i'll try to send out an informational email to the lists about that.

Pablo Olmos de Aguilera C.'s picture
Pablo Olmos de Ag...
Tue, 2010-09-28 04:41

Coolest idea ever!

Jessy Cowan-Sharp's picture
Jessy Cowan-Sharp
Wed, 2010-10-13 14:54

hey guys,

there's a new site that's not focused explicitly on reading code, but apparently intends to include a section with reviews on elegant and beautiful code. it's a site called code quarterly: http://www.codequarterly.com/. check it out sometime!

madarve's picture
madarve
Sun, 2010-10-17 21:35

JS libs deconstructed, a very cool tool for reading interactively the source of some popular js libraries:
http://www.keyframesandcode.com/resources/javascript/deconstructed/

madarve's picture
madarve
Thu, 2010-10-28 16:52

Hi.

I found this gem on HN. from the comments it seems this sort of documentation...
http://documentcloud.github.com/backbone/docs/todos.html

comes from this tool:

http://jashkenas.github.com/docco/

Enjoy :)