Document Your Development Code
-
Upload
jyaasa-technologies -
Category
Software
-
view
342 -
download
1
Transcript of Document Your Development Code
Document your Development Code
Copyright 2015. Jyaasa Technologies. http://jyaasa.com
http://jyaasa.com
Namaste !I am Kapil Raj Nakhwa. I am a Ruby enthusiast working at Jyaasa Technologies !
Copyright 2015. Jyaasa Technologies.
1.Documentations .. you hate it.
“
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.
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.
http://jyaasa.com
Well, Screw it...
oKnow Your codeoLiterate your fellow programmersoRemove accidental redundanciesoReduce overall development timeoHand over the project
Copyright 2015. Jyaasa Technologies.
“
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.
http://jyaasa.com
oGreat way to solidify Ruby fundamentalsoMany prominent Rubyists and core contributors have started out this way
Why You Should?
http://jyaasa.com
ordocoyardoTomdocoSdocoDocumentuporspec_api_docoapipie-railsoAjax-rdoc
Awesomeness in our Toolbox...
Copyright 2015. Jyaasa Technologies.
http://jyaasa.com
ogem install yardoyard docoyard serveroyard -help
Picking easiest one Yard
Copyright 2015. Jyaasa Technologies.
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.
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.
http://jyaasa.com
Compared to rdoc
Copyright 2015. Jyaasa Technologies.
http://jyaasa.com
In Yard
Copyright 2015. Jyaasa Technologies.
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.
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.
http://jyaasa.com
You like Class Diagrams?Have you ever generated one? Do you know what it is?
Copyright 2015. Jyaasa Technologies.
http://jyaasa.comCopyright 2015. Jyaasa Technologies.
http://jyaasa.comCopyright 2015. Jyaasa Technologies.
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.
http://jyaasa.com
Beside code docs. Educate yourself and your team
Copyright 2015. Jyaasa Technologies.
http://jyaasa.com
Beside code docs
Copyright 2015. Jyaasa Technologies.
http://jyaasa.com
Beside code docs
Copyright 2015. Jyaasa Technologies.
http://jyaasa.com
Beside code docs
Copyright 2015. Jyaasa Technologies.
http://jyaasa.com
Beside code docs
Copyright 2015. Jyaasa Technologies.
http://jyaasa.com
Final Words...
Don’t be an asshole. Always document your code.
Copyright 2015. Jyaasa Technologies.
Search First
Reuse
ImplementLiterate Programming PROCESS IS EASY
http://jyaasa.com
Thank You for listening!
Questions? Find me on Twitter @xecutioner303or hit me [email protected]
Copyright 2015. Jyaasa Technologies.