Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Code Documentation
Search
Raka Westu Mogandhi
April 01, 2015
Programming
0
310
Code Documentation
Code documentation for team collaborating.
Raka Westu Mogandhi
April 01, 2015
Tweet
Share
More Decks by Raka Westu Mogandhi
See All by Raka Westu Mogandhi
Cross Platform Development using Xamarin Forms
rakawm
0
3.1k
Android Material Design
rakawm
0
920
MVP Pattern for Android
rakawm
2
910
Other Decks in Programming
See All in Programming
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
4
960
Goのmultiple errorsについて (2024年4月版)
syumai
3
810
Netty Chicago Java User Group 2024-04-17
sullis
0
170
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
1
170
エンターテイメント業界で利用されるAWS
demuyan
0
210
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
330
"config" ってなんだ? / What is "config"?
okashoi
0
240
Snowflakeで眠ったデータを起こそう!
estie
0
120
障害対応を起点としたもっといい開発と運用のサイクル作りのためにできること / Hatena Enginner Seminar #29
polamjag
0
160
try! Swift Tokyo 2024 参加報告 / try! Swift Tokyo 2024 Report
hironytic
0
200
try! Swift Tokyo 初参加報告LT
hinakko2
0
220
GitHub Copilotのススメ
marcy731
1
200
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
289
19k
Building Applications with DynamoDB
mza
88
5.6k
Building a Scalable Design System with Sketch
lauravandoore
456
32k
Facilitating Awesome Meetings
lara
42
5.6k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
Scaling GitHub
holman
457
140k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
A Tale of Four Properties
chriscoyier
151
22k
For a Future-Friendly Web
brad_frost
172
9k
Optimising Largest Contentful Paint
csswizardry
8
2.4k
Building an army of robots
kneath
300
41k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
6
1.5k
Transcript
CODE DOCUMENTATION Raka Westu Mogandhi BrownBag Onebit April 1st 2014
What is code documentation? Written text besides the code that
explain how the code works.
Why? • Code is hard to read and maintained. •
Peoples need to know how to use that code. • Less time to learn and continuing the project.
What is the purpose? To make developers read their codes
much easier
Good Documentation should: • Be easy to understand. • Provide
valid and working examples. • Provide reference in all classes, method and variables.
How to write code documentation? • Write the explanation of
how your code works. • Write the example if necessary.
Examples. • Java (using javadoc) more at http://www.oracle.com/technetwork/articles/java/index-137868.html – Class
/** * Represents wobe product. * @author rakawm * @version 0.0.6 */ public class Product { – Method /** * Return formatted string of DateTime object in UTC timezone. * Format: dd-MM-yyyy HH:mm or dd-MM-yyyy HH:mm:ss. * @param dateTime DateTime object. * @return formatted string of time. */ public static String toServerUTC(DateTime dateTime) {
Examples (Continued) • PHP /** * Summary. * * Description.
* * @since x.x.x * @access (for functions: only use if private) * * @see Function/method/class relied on * @link URL * @global type $varname Description. * @global type $varname Description. * * @param type $var Description. * @param type $var Optional. Description. * @return type Description. */
Examples (Continued) • PHP /** * Summary. * * Description.
* * @since x.x.x * @access (for functions: only use if private) * * @see Function/method/class relied on * @link URL * @global type $varname Description. * @global type $varname Description. * * @param type $var Description. * @param type $var Optional. Description. * @return type Description. */
Recap • Documentation is important for all team members, especially
engineer. • Need to be documented: – All function, classes and variables.