Se ha denunciado esta presentación.
Se está descargando tu SlideShare. ×

Talking effectively about code

Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Próximo SlideShare
Wireframes.07.11.12
Wireframes.07.11.12
Cargando en…3
×

Eche un vistazo a continuación

1 de 9 Anuncio

Más Contenido Relacionado

A los espectadores también les gustó (18)

Anuncio

Similares a Talking effectively about code (20)

Más reciente (20)

Anuncio

Talking effectively about code

  1. 1. Talking effectively about code Peeling the onion with minimum tears ! ! Poornima Venkatakrishnan
  2. 2. ! ! ! • Buddy coding • Peer reviews • Technical presentations
  3. 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. 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. 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. 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. 7. Keep it simple
  8. 8. Rules of thumb • If you are asking: Say more • If you are answering: Ask more • If you are presenting: Simplify
  9. 9. Lost in translation ? ! ! ! ! • Best unifying language is the programming language • Share your code to demonstrate what you are trying to do…. easy!!

×