document your development code
TRANSCRIPT
![Page 1: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/1.jpg)
Document your Development Code
Copyright 2015. Jyaasa Technologies. http://jyaasa.com
![Page 2: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/2.jpg)
http://jyaasa.com
Namaste !I am Kapil Raj Nakhwa. I am a Ruby enthusiast working at Jyaasa Technologies !
Copyright 2015. Jyaasa Technologies.
![Page 3: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/3.jpg)
1.Documentations .. you hate it.
![Page 4: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/4.jpg)
“
http://jyaasa.com
If it is not documented, It does not exist. As long as the information is stored in someone’s head, it is vulnerable to loss.
Copyright 2015. Jyaasa Technologies.
![Page 5: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/5.jpg)
http://jyaasa.com
Traditional Software Development Says...
oDocumentation helps Software DevelopmentoDocumentation helps maintain Software QualityoDocumentation makes it easy to Transfer Projects
Copyright 2015. Jyaasa Technologies.
![Page 6: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/6.jpg)
http://jyaasa.com
Well, Screw it...
oKnow Your codeoLiterate your fellow programmersoRemove accidental redundanciesoReduce overall development timeoHand over the project
Copyright 2015. Jyaasa Technologies.
![Page 7: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/7.jpg)
“
http://jyaasa.com
You either know how to program and code, and commenting is part of that, or you don’t. Either your team knows some or doesn’t
Copyright 2015. Jyaasa Technologies.
![Page 8: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/8.jpg)
http://jyaasa.com
oGreat way to solidify Ruby fundamentalsoMany prominent Rubyists and core contributors have started out this way
Why You Should?
![Page 9: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/9.jpg)
http://jyaasa.com
ordocoyardoTomdocoSdocoDocumentuporspec_api_docoapipie-railsoAjax-rdoc
Awesomeness in our Toolbox...
Copyright 2015. Jyaasa Technologies.
![Page 10: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/10.jpg)
http://jyaasa.com
ogem install yardoyard docoyard serveroyard -help
Picking easiest one Yard
Copyright 2015. Jyaasa Technologies.
![Page 11: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/11.jpg)
http://jyaasa.com
oyard server –reloadohttp://www.rubydoc.info/
oTemplates : https://github.com/lsegal/yard/wiki/Templates
oExtend: http://yardoc.org/guides/extending-yard/writing-
handlers.htmloAwesome Tools:oyard-blame https://github.com/lsegal/yard-blame
oyard-stick https://github.com/dkubb/yardstick
Why Yard?
Copyright 2015. Jyaasa Technologies.
![Page 12: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/12.jpg)
http://jyaasa.com
Why Yard Meta Data Formatting
Available Tags:http://www.rubydoc.info/gems/yard/file/docs/Tags.md#List_of_
Available_Tags
Copyright 2015. Jyaasa Technologies.
![Page 13: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/13.jpg)
http://jyaasa.com
Compared to rdoc
Copyright 2015. Jyaasa Technologies.
![Page 14: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/14.jpg)
http://jyaasa.com
In Yard
Copyright 2015. Jyaasa Technologies.
![Page 15: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/15.jpg)
http://jyaasa.com
class MyWebServer
# Handles a GET request
# @param request [Request] the request object
# @return [String] the resulting webpage
def get(request) "hello" end
# Handles a POST request
# @note This method may modify our application state!
# @param (see #get)
# @return (see #get)
def post(request) self.state += 1; "hello" end
end
A documented class
Copyright 2015. Jyaasa Technologies.
![Page 16: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/16.jpg)
http://jyaasa.com
--query 'has_tag?(:api) && tag(:api).text == "public"'
yard gems
yard server --gems
yard graph --protected --full --dependencies
Use Cases
Copyright 2015. Jyaasa Technologies.
![Page 17: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/17.jpg)
http://jyaasa.com
You like Class Diagrams?Have you ever generated one? Do you know what it is?
Copyright 2015. Jyaasa Technologies.
![Page 18: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/18.jpg)
http://jyaasa.comCopyright 2015. Jyaasa Technologies.
![Page 19: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/19.jpg)
http://jyaasa.comCopyright 2015. Jyaasa Technologies.
![Page 20: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/20.jpg)
http://jyaasa.com
brew install graphviz
gem install yard
yard -n
yard graph --dependencies | dot -Tpdf -o app_diagram.pdf
I Used magick to generate those! Here’s the Spell:
Copyright 2015. Jyaasa Technologies.
![Page 21: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/21.jpg)
http://jyaasa.com
Beside code docs. Educate yourself and your team
Copyright 2015. Jyaasa Technologies.
![Page 22: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/22.jpg)
http://jyaasa.com
Beside code docs
Copyright 2015. Jyaasa Technologies.
![Page 23: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/23.jpg)
http://jyaasa.com
Beside code docs
Copyright 2015. Jyaasa Technologies.
![Page 24: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/24.jpg)
http://jyaasa.com
Beside code docs
Copyright 2015. Jyaasa Technologies.
![Page 25: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/25.jpg)
http://jyaasa.com
Beside code docs
Copyright 2015. Jyaasa Technologies.
![Page 26: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/26.jpg)
http://jyaasa.com
Final Words...
Don’t be an asshole. Always document your code.
Copyright 2015. Jyaasa Technologies.
![Page 27: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/27.jpg)
Search First
Reuse
ImplementLiterate Programming PROCESS IS EASY
![Page 28: Document Your Development Code](https://reader034.vdocuments.net/reader034/viewer/2022042706/58a614751a28ab57488b5169/html5/thumbnails/28.jpg)
http://jyaasa.com
Thank You for listening!
Questions? Find me on Twitter @xecutioner303or hit me [email protected]
Copyright 2015. Jyaasa Technologies.