Presentation is loading. Please wait.

Presentation is loading. Please wait.

Yoann Padioleau (Facebook)

Similar presentations


Presentation on theme: "Yoann Padioleau (Facebook)"— Presentation transcript:

1 Yoann Padioleau (Facebook) http://github.com/facebook/pfff
CodeMap Google Maps for Source Code Yoann Padioleau (Facebook)

2 About this talk Feel free to ask questions during the talk
Disclaimer: I do not represent Facebook

3 Problem Dealing with huge codebase is difficult for noobs or new employees. Typical questions: What are the important functions in big API? What are the entry points? What is the big picture? Spend time mostly reading/understanding code, not so much writing new code. Not too bad for linux, books Tools to assist reading and understanding code?

4 Recent technological changes
Huge monitors, 30’ Often have multiple ones Very high resolution (2600 x 1700) But we still use 80-columns based editors Or Eclipse which provides very few pixel for the actual code … Can we leverage all those pixels?

5 Codemap Approach Focus on assist reading/understanding code
Program analysis + information visualization Google maps metaphor Zoom in/out Important stuff should be bigger

6 Demo

7 Features Big picture, treemaps, “macro level” Search, navigation
Semantic-based code highlighting “micro level” Connection to editor (emacs/vim) Extensible via layers (predator mode) Smooth transition from macro ti micro Codemap is not an editor

8 Features: treemap Each rectangle is a file
Size of rectangle =~ size of file Color of rectangle = “aspect” (test, main, storage, security, etc) “Code aware” (heuristics) Auto generated file do not eat real-estate Code is more important than data, xml, jpg Tiling, use all the space

9 Features: search and navigation
Highlighted rectangle Ranked entities Navigation Up/down (not as smooth as google maps) Direct access to file (faster than speedbar or expand-directory widgets) Can see spread directories

10 Features: semantic code visualizer
grammar-based highlighting, not regexps as in emacs/vim Know records vs functions vs constants Functions/classes are in bigger size than statements Tiling, use all the space, multi columns Semantic aware (global analysis) Important functions are in bigger size (if fontsize too small to fit the all file on a 30’ => split file) fast load of structure of the file in the brain

11 Layers: alternate color schemes
Age (help find dead code) #authors (important stuff usually) Activity (what’s going on?) Code coverage Bugs/warnings of linter grep/sgrep results Top/Bottom modules

12 $ git clone git://github.com/facebook/pfff.git
Conclusion A semantic-based source code visualizer/searcher/navigator Accelerate loading the code into your brain (can see 20 files at once) Future work: Web UI, LXR 2? Smoother zoom Module/package dependencies $ git clone git://github.com/facebook/pfff.git

13 Related work SeeSoft (does not scale, no treemaps)
Code Thumbnails (2 different modes) 3d visualization (not sure it helps, eat pixels) Disk explorer (not code aware, no micro-level) No smooth transition, 2 worlds.


Download ppt "Yoann Padioleau (Facebook)"

Similar presentations


Ads by Google