Tools

51
Dev Tools Author: Volodymyr Shymanskyy December 2014

Transcript of Tools

Page 1: Tools

Dev ToolsAuthor: Volodymyr ShymanskyyDecember 2014

Page 2: Tools

● Version control● Profilers, Debuggers

○ Advanced debugging features● Prototypes, Simulators, Emulators● Tracers, Dumps, Logs, Plots, Graphs,

Stats, Diagnostics● Productivity tools● ...

Page 3: Tools

Even moreEnvironmentsBuild SystemsInstrumentationCompilersGUI editorsUT frameworksStatic analysersCode/Doc generatorsIDEs

Page 4: Tools

Code generators

● GUI○ wxFormBuilder

● Class Structure○ Rational Rose

● Parsers, etc.○ lex & yacc

Page 5: Tools

Documentation generators

DoxyGen● C/C++, C#, Objective-C● Java, Python, PHP, VHDL

JavaDocPyDoc

Page 6: Tools

DoxyGen example

/** * <A short one line description> * * <Longer description> * <May span multiple lines or paragraphs as needed> * * @param Description of method's or function's input parameter * @param ... * @return Description of the return value */

Page 7: Tools

DoxyGen

structureclassesgraphsinterlinkscomments

Page 9: Tools

Version control

Git, SVN (Subversion), MercurialOld: CVS, Perforce

Comparison

Simple:git clone <url>

git pull/push

git add/commit

Understanding Git Conceptually

Page 10: Tools

Tortoise SVN / Git, Gitg

Page 11: Tools

Diff toolsWinMergeMeld, KDiff3Beyond Compare

Page 12: Tools

Bug Tracking

Jira, Bugzilla

Page 13: Tools

Build System

Makefile, CMakeAnt -> Ivy

Pythonmay be used ;)

Page 14: Tools

Buildserver

Page 15: Tools

Static analysersNeeds only source code!

Page 16: Tools

Static analysers

Java: FindBugs, CheckstyleC++: Eclipse, Clang, Coverity, KlocWork

Obj-C: ClangOther: JSLint, Pylint, Perl::Critic, ...

Page 17: Tools

Dynamic AnalysisNeeds scenarios!

Good to run with UT suite.Debuggers, Profilers, Tracers...

Page 18: Tools

UT Frameworks

● Provide infra for UT○ Integrate to IDEs / CI○ Reporting○ Convenient APIs

JUnit, CxxTest, ...

Page 19: Tools

DebuggersConditional breakpoints

Data breakpointsWatch expressions

Reverse, Rec-ReplayRemote debugging

Offline debuggingDebugging in emulator!

Data Display Debugger

Page 20: Tools

Profilers

● speed, resource usage, cachePerl perl -d:NYTProf myscript.pl

Python python -m cProfile myscript.py

+pycallgraph

Java NetBeans, GC Viewer, here (rus)

You can do measurements directly in code!

Page 21: Tools

Profilers

Page 22: Tools

Valgrind

memcheckcachegrindcallgrindmassifhelgrind

tutorial (rus)

Page 23: Tools

Valkyrie

Page 24: Tools

Kcachegrind

Page 26: Tools

Emulators

VirtualBoxQEMU

Page 27: Tools

Protocol Sniffers / Analysers

WiresharkFiddlerHardware

USB

Page 28: Tools

Fiddler

Page 29: Tools

Browserdev tools

Page 30: Tools

Productivity tools

Linux!● KDE, krusader, yakuake, redshift● VLC, Inkscape, Gimp● Use console!!! Vim, Emacs

Windows:● RocketDock, Actual Title Buttons, F.lux, WorkRave● Browser, File Manager, 7z, SysInternals suite● Punto Switcher, Keyboard, ConEmu, Putty● Notepad++, STDU Viewer, Paint.Net, WinSCP, UltraVNC

Page 31: Tools
Page 33: Tools

Eclipse

● Java● C/C++ CDT● Python PyDev● Perl EPIC● Node.js● … lots of plugins!

Page 34: Tools

Prototyping

● Python, JS, Node.js● Arduino● Online:

○ Coding Ground○ JSFiddle

Page 35: Tools

Online toolsValidatorsDrawing

Diagrams: GliffyMockups: Balsamiq

Google Docs, Google Drive, DropboxFreeMind, github, trello, WeTransfer, doodle

Page 36: Tools
Page 37: Tools

Logs, Dumps, Event Traces

● “Debug by prints”○ Embedded / multithreaded

● Log to file, to ram (may be shared)○ Filter by module/severity

● Dump part of the state○ Stats

● Event Traces○ Binary, lightweight

Page 38: Tools

Statistics

● Event counts○ In domain, or internal○ Amount of function calls

● Time of processing● Latency● CPU/RAM usage

Page 39: Tools

Diagnostics

● Now check them all!● During normal operation● Special diagnostics mode

○ For intrusive things

Page 40: Tools

Crash & Bug reporting

Environment infoStack tracesDumps, Stats, Logs...

Page 41: Tools

Visualize!

Page 42: Tools

geomview,meshlab

Page 43: Tools

Plots

Mathematica, gnuplotAudible, smell? :)

Page 44: Tools

Graphs

How it might be interesting?..

Page 45: Tools

GraphViz

Page 46: Tools

Instrumentation

Hooks Scripts

+

Page 47: Tools

Simulators

● CNC● ...● User-mode LinuxPart of the system is replaced with a simulated one.

Page 48: Tools

CLI - Command Line

● Interactive● One-shot

Increases usability &Allows automation!

Page 49: Tools

Scripting Engine

● JS, Python, Lua, C# for .Net● Examples

○ Atom, Sublime text editors○ Some games use Lua○ VirtualBox uses Python

● Even better automation! ^_^

Page 50: Tools

Pick your own!Pick your own!

Page 51: Tools

Volodymyr ShymanskyyEmbedded TrainerEmbedded Software DeveloperGL Hackerspace Co-Founder

[email protected]: vshymanskyiLinkedIn, Facebook

If you’re using these materials for presentation, please add my name and LinkedIn to the “Thanks” slide. Also submit your ideas and corrections.