Your SlideShare is downloading. ×
Code Reuse Made EasyUncovering the Hidden Gems of Corporate and                      Open Source Software                 ...
Presenters     Randy DeFauw                                          Dave Gruber  Technical Marketing Manager,            ...
Perforce Software • Fast, scalable version control • Available on over 50 platforms • Version management for any team, any...
Black Duck• Open Source Enablement  – Compliance  – Governance  – Security Vulnerabilities  – Export Compliance• Enterpris...
The value of code reuse•   Leverage existing IP•   Reduce errors due to new code•   Build on expertise•   Share bug fixes
Expanding code reuse                       6
Barriers to code reuseCultural                            Technical                                 Planning              ...
Discovery•   What code is available?•   Where is it used?•   Who else is using it?•   Is the code still active?•   Is ther...
Finding codeEnterprise Code Search Tool             Browsers and IDEs                                 Index code across   ...
Scales to billions of lines of code              Easy user and project administration     –   Powers code.ohloh.net       ...
How much open source do YOU use?                                                    80%                 29%               ...
Open Source• What open source is already approved for reuse within my organization?• Are the licenses compatible with my p...
Know what FOSS is in your code                                                   Approved                                 ...
Reuse the Agile Way                                                  Remember – open • Don’t build it perfectly the first ...
Technical barriers                                                           Imported    Active                           ...
The Right View of the Data              Copyright 2012 Perforce Software, Inc.   16
Reuse Mechanics• Views specify which components you want and where to get them• Policies define how they’re used   – Consu...
Component Data ModelPool of components in depots                      Working data set                               Confi...
Capture the view information                       <configuration>                                   Depot path           ...
Generate a proper working set              Copyright 2012 Perforce Software, Inc.   20
Set policies on use<configuration>  <component>    <depotPath>//depot/comp/abc/...</depotPath>    <access>active</access> ...
Visibility: Component Origin
Visibility: Component Destination A simple manifest report…             p4 grep –e “dblayer” ….xmlOr something morestructu...
Traceability               Leverage bug fixes from others
Traceability               Or maybe fix a bug yourself
Traceability               Update to new version of component
Beyond the firewall• Cross-organization reuse is a staple of commercial efforts based on open  source frameworks   – Linux...
Git as the Data Exchange
Putting it all together•   Invoke Black Duck Suite in ALM processes as    appropriate•   Merge 2013     −   Conference tal...
Thank Youhttp://www.perforce.com      http://www.blackducksoftware.cominfo@perforce.com            info@blackducksoftware....
Upcoming SlideShare
Loading in...5
×

Code Reuse Made Easy: Uncovering the Hidden Gems of Corporate and Open Source Software

312

Published on

Watch the webinar on-demand here: http://info.perforce.com/US_2013Q1_Webinar_BlackDuck_register.html

With 100’s of millions of lines of code running in most large companies and billions of lines of code available in the world of open source, a significant opportunity exists to reuse code written by others in your next application. Sounds easy, but finding the right code and evaluating it for reuse can be a daunting task – one that often causes people to start from scratch.

Join Dave Gruber and Randy DeFauw as they demonstrate how Black Duck and Perforce Version Management can help you discover, track and reuse software components from both your internal code bases and the world of open source.

Learn concrete steps for:

Managing open source and internal components
Consuming or forking these components in your projects
And coming to grips with open source libraries hosted in public Git repositories

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

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

No notes for slide

Transcript of "Code Reuse Made Easy: Uncovering the Hidden Gems of Corporate and Open Source Software"

  1. 1. Code Reuse Made EasyUncovering the Hidden Gems of Corporate and Open Source Software Black Duck Perforce Software Copyright 2013 Perforce Software, Inc. 1
  2. 2. Presenters Randy DeFauw Dave Gruber Technical Marketing Manager, Director of Developer Programs, Perforce Black Duck Copyright 2012 Perforce Software, Inc. 2
  3. 3. Perforce Software • Fast, scalable version control • Available on over 50 platforms • Version management for any team, any data, and any location • Used by over 5,000 customers in software, gaming, multimedia, firmware, finance, and other industries Copyright 2012 Perforce Software, Inc. 3
  4. 4. Black Duck• Open Source Enablement – Compliance – Governance – Security Vulnerabilities – Export Compliance• Enterprise Code Search Copyright 2012 Perforce Software, Inc. 4
  5. 5. The value of code reuse• Leverage existing IP• Reduce errors due to new code• Build on expertise• Share bug fixes
  6. 6. Expanding code reuse 6
  7. 7. Barriers to code reuseCultural Technical Planning Don’t plan to reuse more than twice Afraid of paperwork (licensing) Difficult to fit into existing process – not worth the money Just don’t know what’s out there Copy-and-paste is easier Perceived schedule risk New teams or acquisitions Inconsistent architecture
  8. 8. Discovery• What code is available?• Where is it used?• Who else is using it?• Is the code still active?• Is there an open source option available?• Is there an open source option already approved for reuse?
  9. 9. Finding codeEnterprise Code Search Tool Browsers and IDEs Index code across the enterprise SCMs
  10. 10. Scales to billions of lines of code Easy user and project administration – Powers code.ohloh.net – GUI-based administration and indexing – Enterprise user administration (LDAP/AD)Syntax-aware search – Recognizes syntax of 35 programming Extensive reporting and metrics languages – Quantify impact of code reuse in code base (ROI)SCM Adapters Plugins OSs  Perforce  Starteam  AccuRev  Subversion  Bazaar  Team Foundation Server  ClearCase  Visual SourceSafe  CVS  Zip Archives  Git  File Systems  Mercurial 10
  11. 11. How much open source do YOU use? 80% 29% Average Best in Class Average represents the portion of FOSS in the overall codebases of 500 large enterprises surveyed by Gartner (2011) 11
  12. 12. Open Source• What open source is already approved for reuse within my organization?• Are the licenses compatible with my project? – Supply chain? – Distribution outside the firewall? – Usage scenarios?• What are the license obligations?
  13. 13. Know what FOSS is in your code Approved for reuse? Black Duck Code Scan Black Duck KnowledgeBase FOSS Identification FOSS Catalog License Conflicts
  14. 14. Reuse the Agile Way Remember – open • Don’t build it perfectly the first time source libraries • Iterate each time you want to reuse it have done this work • Share the improvements for youOriginal author Next use Third use• Purpose built • Increment • Increment• 10% reuse factor • 50% reuse factor • 70% reuse factor
  15. 15. Technical barriers Imported Active module module Imported module Read-only External module library Copyright 2012 Perforce Software, Inc. 15
  16. 16. The Right View of the Data Copyright 2012 Perforce Software, Inc. 16
  17. 17. Reuse Mechanics• Views specify which components you want and where to get them• Policies define how they’re used – Consume as binary – Consume as source – Fork for modifications
  18. 18. Component Data ModelPool of components in depots Working data set Configuration: Component Workspace • Per-project • Change at any time drivers Component • Each component’s fileio location, use, and optional view libs-db Component libs-gui
  19. 19. Capture the view information <configuration> Depot path <component> location <depotPath>//depot/comp/abc/...</depotPath> <access>active</access> <clientLocation>abc/...</clientLocation> </component> <component> <depotPath>//depot/comp/def/...</depotPath> Location in <access>write</access> workspace <clientLocation>def/...</clientLocation> </component> <component> <depotPath>//depot/comp/ghi/...</depotPath> <view>comp.ghi.l</view> <access>read</access> <clientLocation>ghi/...</clientLocation> </component> Copyright 2012 Perforce Software, Inc. 19
  20. 20. Generate a proper working set Copyright 2012 Perforce Software, Inc. 20
  21. 21. Set policies on use<configuration> <component> <depotPath>//depot/comp/abc/...</depotPath> <access>active</access> <clientLocation>abc/...</clientLocation> Access: active, </component> writable, read, <component> binary <depotPath>//depot/comp/def/...</depotPath> <access>write</access> <clientLocation>def/...</clientLocation> </component> <component> <depotPath>//depot/comp/ghi/...</depotPath> <view>comp.ghi.l</view> <access>read</access> <clientLocation>ghi/...</clientLocation> </component>
  22. 22. Visibility: Component Origin
  23. 23. Visibility: Component Destination A simple manifest report… p4 grep –e “dblayer” ….xmlOr something morestructured
  24. 24. Traceability Leverage bug fixes from others
  25. 25. Traceability Or maybe fix a bug yourself
  26. 26. Traceability Update to new version of component
  27. 27. Beyond the firewall• Cross-organization reuse is a staple of commercial efforts based on open source frameworks – Linux – Android – Reusing anything from GitHub and similar libraries• Sharing is often still done via code drops between the internal (secure) repository and the shared repository• Perforce Git Fusion provides a better way
  28. 28. Git as the Data Exchange
  29. 29. Putting it all together• Invoke Black Duck Suite in ALM processes as appropriate• Merge 2013 − Conference talk on component development models
  30. 30. Thank Youhttp://www.perforce.com http://www.blackducksoftware.cominfo@perforce.com info@blackducksoftware.comQ&A and Demo available See Code Sight in Actionperforce.com/product/demos code.ohloh.net @rdefauw @davegruber5

×