Your SlideShare is downloading. ×
Talking effectively about code
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Talking effectively about code

120
views

Published on

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
120
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Talking effectively about code Peeling the onion with minimum tears ! ! Poornima Venkatakrishnan
  • 2. ! ! ! • Buddy coding • Peer reviews • Technical presentations
  • 3. Organize your thoughts… • Context: What is the problem you are trying to solve • Design: What do you understand about the existing system • Impact: What moving parts do you think the change you are making will affect
  • 4. Deep Dive! Explain : • What you are trying to accomplish • Moving parts that are impacted • your changes/ proposal (top down approach) (+/-) • Parts that you don’t understand as you understand it.
  • 5. Example: Content shows up in development mode but does not in production mode. • Context: Want to be able to translate some service data in the controllers before rendering a view. • Design: App, Service wrapper, Makara • Impact: Need to add the content into data that is fed into res.render(view, data), so it will impact just the rendering of that view. • Problem: Sometimes the content was missing when page rendered…. and the problem was incorrect handling of async.
  • 6. iff you are curious … //in the controller server.get('/bar', function(req, res) { async.waterfall([ function reqDataFromService(next) { //....... ! ! }); ! ! req.data = serviceData; next(); ! ! }, function translateServiceData(next) { mapContent('propFile', req); next(); } ], function() { //..... res.render('barView', req.data); }); function mapContent(file, req) { //....... ! //in the controller server.get('/bar', function(req, res) { async.waterfall([ function reqDataFromService(next) { //....... content.loadContentBundle(file, locale, function(err, bundle) { if (!err) { var bundleRoot = bundle.get('foo'); req.data.bar = bundleRoot[req.data.bar]; } ! }); ! ! req.data = serviceData; next(); }, function translateServiceData(next) { mapContent('propFile', req, function() { next(); }); } ], function() { //..... res.render('barView', req.data); }); function mapContent(file, req, cb) { //....... ! ! content.loadContentBundle(file, locale, function(err, bundle) { if (!err) { var bundleRoot = bundle.get('foo'); req.data.bar = bundleRoot[req.data.bar]; } cb(); }); } }); }
  • 7. Keep it simple
  • 8. Rules of thumb • If you are asking: Say more • If you are answering: Ask more • If you are presenting: Simplify
  • 9. Lost in translation ? ! ! ! ! • Best unifying language is the programming language • Share your code to demonstrate what you are trying to do…. easy!!