Your SlideShare is downloading. ×
Python, DOT and Visualising Legacy Code The Lazy Way
Python, DOT and Visualising Legacy Code The Lazy Way
Python, DOT and Visualising Legacy Code The Lazy Way
Python, DOT and Visualising Legacy Code The Lazy Way
Python, DOT and Visualising Legacy Code The Lazy Way
Python, DOT and Visualising Legacy Code The Lazy Way
Python, DOT and Visualising Legacy Code The Lazy Way
Python, DOT and Visualising Legacy Code The Lazy Way
Python, DOT and Visualising Legacy Code The Lazy Way
Python, DOT and Visualising Legacy Code The Lazy Way
Python, DOT and Visualising Legacy Code The Lazy Way
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Python, DOT and Visualising Legacy Code The Lazy Way

1,369

Published on

Visualising a legacy PHP codebase using Python, DOT and GraphViz. A lightning talk for the London Python Code Dojo 2011-06-02.

Visualising a legacy PHP codebase using Python, DOT and GraphViz. A lightning talk for the London Python Code Dojo 2011-06-02.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,369
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
8
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Python, DOT and Visualising Legacy Code The Lazy Way (C) John Chandler 2011
  • 2. Legacy PHP Code! Noooooooooooooo!!!!
  • 3. Deep Breaths. Visualise the Code.
  • 4. Laziness Part 1: Use Python to Analyse Dependencies
  • 5. Write a PHP Parser in Python? Or use a regular expression... (include|require)(?:_once)?[ (]["']([^"']+)["']
  • 6. Laziness Part 2: Use Graphviz to Draw The Diagram
  • 7. Graphviz supports DOT. DOT is a graphing mini-language
  • 8. digraph foo { node1 [label=“Node 1”]; node2 [label=”Node 2”]; node1 -> node2; }
  • 9. $ dot -Tpng -O foo.dot
  • 10. WTF. Looks like some refactoring to do
  • 11. Source is available under GPL v3 from: http://www.bitbucket.org/metaljoe/qadpid

×