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

Reading Code

Meeting Transcript October 03, 2010

Gebhard Matt's picture
Sun, 2010-10-03 23:20

(20:25) <PaBLoX>ahm
(20:26) <PaBLoX>it's 3pm on edt right?
(20:26) <PaBLoX>O_o
(20:27) - natanatan_ ha entrado
(20:32) <RaVexx_afk>right
(20:32) <RaVexx_afk>but jessikate is not here
(20:33) <eric-brechemier>Should we start the discussion?
(20:45) - eric-brechemier se ha desconectado (Quit: Page closed)
(20:45) - eric-brechemier ha entrado
(20:50) - jakedahn ha entrado
(20:55) - natanatan ha entrado
(20:58) - natanatan_ se ha desconectado (Ping timeout: 276 seconds)
(21:12) <PaBLoX>I feel overwhelmed by the source code D:
(21:13) <PaBLoX>I just don't know where/how to start
(21:13) <PaBLoX>Anyone has some tips about it?
(21:13) <eric-brechemier>You mean about Django?
(21:14) <PaBLoX>yes, but not limited to
(21:14) <PaBLoX>i mean any  software
(21:14) <eric-brechemier>I discovered a new tip this week
(21:14) <eric-brechemier>which may or may not help you :)
(21:15) <eric-brechemier>I started studying Django by reading and applying the introduction tutorial
(21:16) <eric-brechemier>At some point I got an error, because some things had been configured yet
(21:16) <eric-brechemier>and I received a lot of information on the code from the error displayed
(21:17) <eric-brechemier>I got a detailed stack trace, with function names, lines of code, and even the current value of

parameters at each level
(21:17) <jakedahn>breaking things is always the best way to get the ball rolling
(21:17) <eric-brechemier>This gave me a great hint on the interesting things going on
(21:17) <eric-brechemier>and where to start looking
(21:18) <PaBLoX>btw
(21:18) <PaBLoX>I found your diagrams pretty cool
(21:18) <PaBLoX>:P
(21:18) <eric-brechemier>thx :)
(21:18) <PaBLoX>The biggest problem is that I don'¿t know where to start
(21:18) <PaBLoX>most software has a lot of files
(21:18) <RaVexx_afk>pablo, i have the same problem
(21:19) <eric-brechemier>me too
(21:19) <eric-brechemier>:)
(21:19) <jakedahn>find a software tutorial, break something, and dig in
(21:19) <PaBLoX>Django for instance has 5 or 6 folders each one with i don't know 10 or more files
(21:19) <eric-brechemier>but I found that studying Django proved much easier than Ruby on Rails
(21:19) <PaBLoX>haha
(21:19) <PaBLoX>I haven't tried that
(21:19) <eric-brechemier>Night and Day
(21:19) <PaBLoX>I'll do it
(21:19) <jakedahn>eric-brechemier: really?!
(21:19) <jakedahn>why's that
(21:20) <eric-brechemier>In rails, I found it hard to get to the code actually doing something
(21:20) <eric-brechemier>And the introduction doc was not so helpful
(21:21) <eric-brechemier>In Django, I found the README and intro tutorial very helpful
(21:21) <eric-brechemier>and in each python file, I could always follow the imports to find where things were defined
(21:22) <eric-brechemier>although I had no prior experience of development in Python (and I have done some development in

ruby for a couple of months), I found the code in Django much easier to grasp
(21:22) <jakedahn>yeah its kind of odd how different languages have different standards for documentation
(21:22) <eric-brechemier>things just fell in place
(21:22) <RaVexx_afk>django code its more commented to
(21:23) <eric-brechemier>Another thing which helped I think: the intro to Django starts with developing an actual application
(21:23) <jakedahn>I find ruby stuff easier to just read (most developers write it to read as english), but I find most python

stuff to have really solid and useful docs
(21:23) <eric-brechemier>it is really down-to-earth, practical, and it includes pointers to get more details
(21:24) <eric-brechemier>And I think I got lost in all the autoloads in rails
(21:24) <jakedahn>have you ever played with sinatra?
(21:24) <jakedahn>it might be a better project to look at for learning
(21:24) <jakedahn>or reading
(21:24) <eric-brechemier>Nope, but the discussion last week got me interested
(21:24) <eric-brechemier>Although I should start with Rake if I understood well?
(21:25) <jakedahn>might be easy but rake is boring :)
(21:26) <eric-brechemier>I meant Rack not Rake sorry
(21:26) <jakedahn>ahh thats more like it
(21:26) <eric-brechemier>:)
(21:27) <jakedahn>with rack you probably have to be very familiar with how http works
(21:28) <jakedahn>but i've never looked at it
(21:28) <eric-brechemier>Also, another thing about Django, I think having a django-powered python shell to manipulate objects

dynamically helps enormously
(21:29) <eric-brechemier>It is probably possible to do the same in rails using irb (interactive ruby shell) but there was no

hint to go into that direction in the intro stuff in rails
(21:30) <eric-brechemier>My overall feeling with these frameworks is that, by generating code for us, they create an

additional layer of complexity
(21:31) <eric-brechemier>On the contrary, an interactive shell gives an immediate feeling how what is going on
(21:31) <eric-brechemier>like using a debugger vs a compiler
(21:33) <eric-brechemier>Somewhat unrelated: has any of view tried running code analysis tools on the source code of studied

projects?
(21:33) <eric-brechemier>any of you :)
(21:34) <RaVexx_afk>nop
(21:34) <jakedahn>eric-brechemier: if you do ./script/console in rails 2.3 or rails console in rails 3+ it gives you

interactive shell
(21:35) <eric-brechemier>@jakedahn good to know
(21:35) <eric-brechemier>I'm wondering whether some tools might help us get a rough idea of the overall organization of the

code
(21:36) <eric-brechemier>Although complex code might just result in complex diagrams
(21:38) <eric-brechemier>What about Mongo-DB? This someone have a look at it?
(21:40) <jakedahn>what about it?
(21:40) <eric-brechemier>What is it? What is your feeling about it?
(21:41) <jakedahn>its a data store
(21:41) <jakedahn>and I think its nifty-ish
(21:42) <eric-brechemier>really? how?
(21:45) <eric-brechemier>What is so special about it?
(21:46) <jakedahn>are you familiar with the nosql boom?
(21:46) <eric-brechemier>yes
(21:47) <eric-brechemier>flexible stores vs SQL database constraints
(21:47) <jakedahn>so it is a nosql db so it gets speed/flexibility, but it still offers a similar query system which makes

life easy for people who came from the sql world
(21:48) <eric-brechemier>nice
(21:48) <jakedahn>whereas something like couchdb uses map reduce
(21:48) <jakedahn>mongo uses a query
(21:48) <eric-brechemier>It reminds of something I read recently
(21:49) <eric-brechemier>annoucement about a stack on top of Hadoop
(21:49) <eric-brechemier>with a quey language at the top, if I remind well
(21:49) <jakedahn>nifty
(21:49) <jakedahn>I've never touched hadoop
(21:50) <jakedahn>in fact I've barely touched nosql/alternative data stores
(21:51) <jakedahn>between 4-5 classes at school, and doing nasa stuff I don't get to play much any more :(
(21:52) <eric-brechemier>Well we fancied migrating a PostgreSQL database to couchDB for a while, but never got to it

eventually
(21:52) <jakedahn>do you do consulting?
(21:53) <eric-brechemier>I'm working for a startup currently
(21:53) <eric-brechemier>(I used to do consulting as a Freelancer)
(21:53) <jakedahn>awesome, what's the company?
(21:53) <eric-brechemier>Legal-Box, in Paris
(21:54) <jakedahn>how is the startup community in paris?
(21:54) <eric-brechemier>By the way, we have published the JavaScript framework we use as opensource, if anyone wants to have

a look :) http://github.com/legalbox/lb_js_scalableApp
(21:55) <eric-brechemier>There are various opportunities... but not much backing financially
(21:56) <eric-brechemier>so lots of companies start with interns labor...
(21:56) <jakedahn>the only french startup I've come in contact with is scalr
(21:56) <eric-brechemier>which might not be the best way to get to a working product quickly
(21:56) <jakedahn>ceo lives in silicon valley, and most of team is in paris
(21:56) <jakedahn>https://scalr.net/about_us.html
(21:57) <eric-brechemier>Interesting, I'll have a look :)
(21:59) <jakedahn>what is your language of choice?
(22:00) <eric-brechemier>I speak English by choice, and French by culture :)
(22:00) <jakedahn>programming language
(22:00) <eric-brechemier>:)
(22:00) <eric-brechemier>These days, JavaScript I would say
(22:00) <jakedahn>lol i speak ruby by choice and english by culture
(22:01) <eric-brechemier>I have done lots of Java development as well - mobile, PC, server
(22:01) <eric-brechemier>and I am an all-time XSLT fan...
(22:01) <jakedahn>have you had a chance to play with nodejs stuff yet?
(22:01) <eric-brechemier>I'd love too!
(22:01) <eric-brechemier>but not yet
(22:02) <eric-brechemier>Is it the topic for next week? That would be cool...
(22:02) <jakedahn>it realllllly nice to be able to use js as a general purpose programming language
(22:03) <eric-brechemier>and I just started to learn LISP
(22:03) <jakedahn>((((())))))
(22:03) <jakedahn>lol
(22:03) <eric-brechemier>I'd love to "run" a web page including JavaScript server-side
(22:04) <eric-brechemier>and get a static page for web crawlers
(22:04) <eric-brechemier>is that possible with nodejs?
(22:04) <eric-brechemier>(is there support for browser's DOM etc... ?)
(22:05) <jakedahn>take a look at examples on homepage http://nodejs.org/
(22:05) <jakedahn>its super easy to get an http server up and running
(22:06) <jakedahn>from there you can tell it to serve static files
(22:07) <jakedahn>also look at http://github.com/visionmedia/express
(22:07) <jakedahn>sinatra flavored nodejs
(22:09) <jakedahn>and re: lisp - I just started learning erlang
(22:09) - eric-brechemier_ ha entrado
(22:09) <jakedahn>figured I'd better start playing with some functional language
(22:09) <eric-brechemier_>nodejs api crashed my browser lol
(22:09) - eric-brechemier se ha desconectado (Ping timeout: 265 seconds)
(22:09) <jakedahn>lol how?
(22:10) <eric-brechemier_>probably a memory overload (I had tens of tabs open...)
(22:11) <eric-brechemier_>Nice chat :) I'd love to stay but I have to go...
(22:11) <eric-brechemier_>What are the plans for this week?
(22:13) <jakedahn>I have to get running too, must return to hacking on http://nebula.nasa.gov
(22:13) <eric-brechemier_>Seems cool :)
(22:15) <eric-brechemier_>I'll try and get in touch with Jessy, can someone post the log of the discussion?
(22:15) <RaVexx_afk>i can

Attachment: 
Attachment: