SlideShare a Scribd company logo
© Martin Alfke - 2014
Module (Re)writing the
Smart Way
Martin Alfke	

<martin.alfke@buero20.org>	

!
Puppet Camp London 2014
© Martin Alfke - 2014
About Me
• Freelancer - Berlin/Germany	

• Automation and Cfg Mgmt	

• PCP 2013	

• Module Contributor	

• PuppetLabs Partner
Martin Alfke - at home
© Martin Alfke - 2014
What is this talk about?
The story of finding a module,
learning that it is not useful for
you, rethink and rewrite new
shared, public module from
scratch use it in your private
roles and profiles and maintain it
for other users.
Martin Alfke - SFO -Vesuvio Cafe
© Martin Alfke - 2014
What else?
Why contributing is better than
building a golden porcelain tower in
the dark of your closet.	

or	

The Puppet community way of
getting a task done.
Martin Alfke - Berlin - Hotel du Rome
© Martin Alfke - 2014
The Task
Yes, we will have that task
finished by yesterday !
http://www.mid-day.com/articles/day-29-in-bigg-boss-6-its-vrijesh-vs-major-sidhu/187949
© Martin Alfke - 2014
How to start?
We build a Puppet module !!	

!
But … how should we start?
http://designtaxi.com/article/101902/How-To-Start/
© Martin Alfke - 2014
The Lone Warrior Way
Martin Alfke - Lassen County, California
© Martin Alfke - 2014
Coding Puppet …
class webserver13 {	
package { 'apache2': ensure => present, }	
file { '/etc/apache2/sites-enabled/000-default':	
ensure => absent,	
}	
file { '/etc/apache2/sites-available/10_webserver13':	
ensure => file,	
source => 'puppet:///modules/webserver13/10_webserver13',	
}	
file { '/etc/apache2/mods-enabled/alias.conf':	
ensure => link,	
target => '/etc/apache2/mods-available/alias.conf',	
}	
file { '/etc/apache2/mods_enabled/alias.load':	
ensure => link,	
target => '/etc/apache2/mods-available/alias.load',	
}	
...	
}
© Martin Alfke - 2014
Documentation / Bugfixes
Who is doing reviews?	

 	

 	

 	

 ☞	

 	

 YOU	

Who does documentation?	

 	

 	

 ☞	

 	

 YOU	

Who will support you?	

	

 	

 	

 ☞	

 	

 YOU
http://lonewarriorswa.com/
© Martin Alfke - 2014
Features? Changes?
poor lonesome cowboy	

I’m a poor lonesome cowboy	

I'm a long long way from home	

And this poor lonesome cowboy	

Has got a long long way to roam	

Over mountains over prairies	

From dawn till day is done	

My horse and me keep riding	

Into the setting sun	

http://smellslikescreenspirit.com/2009/12/warner-bros-2010-preview/Poor lonesome cowboy - Pat Woods
© Martin Alfke - 2014
The Smart Way
Is there something available?	

DevOps means to understand and
reuse foreign code.	

Use Puppet as a framework.
http://www.thindifference.com/2011/02/11/what-is-the-best-way-to-brand-the-middle/
© Martin Alfke - 2014
You are not alone
There are:	

- companies using the same technology	

- developers using the same framework	

- sites which collect informations	

- people talking about their solution
http://clivehicksjenkins.wordpress.com/
© Martin Alfke - 2014
Sources
puppetlabs.com
github.com
http://en.wikipedia.org/wiki/File:Microsoft-Staff-1978.jpg
© Martin Alfke - 2014
Found the solution?
Give feedback	

Cooperate / Fix bugs / Improve
http://www.positoons.de/leistungen/character-design-info/eierlegende-wollmilchsau/
© Martin Alfke - 2014
Reusing Modules
class webserver13 {	
class { ‘::apache’:	
default_vhost => false,	
default_mods => false,	
}	
include ::apache::mod::alias	
...	
}
© Martin Alfke - 2014
Reality?
We were checking for a module for
cloud management	

We found one	

We talked to upstream: 	

“Oh, …, yes, …, this module, …, ahem,
…, do yourself a favour, …, rewrite it”	

or	

What if you found nothing?
http://technorati.com/entertainment/celebrity/article/the-12-steps-of-reality-tv/
© Martin Alfke - 2014
Start Writing Public Code
Start a shareable, parameterised
generic module	

Always keep in mind separation of code
and data	

Let others decide which data source
they want to use.	

Do never put private data in your repo	

Start using public repo immediately	

Take care on proper license (AGPL,
GPL,…)
http://www.security-faqs.com/why-your-company-
should-issue-open-source-security-packages.html
© Martin Alfke - 2014
Combine Public/Private
Use your public module like any other
(e.g. puppetlabs apache)	

Add data only to your private
(wrapper) module	

Search for “Puppet Roles and Profiles”
to understand this separation
http://www.internetmarketinginc.com/blog/share-or-not-share-
thats-the-question-going-public-with-private-information/
© Martin Alfke - 2014
Responsibility
Be a responsive upstream	

Always remember that other people
might want to solve similar problems
(not identical)	

Make your code run on different
platforms	

Build a community around your module	

Review Pull Requests in time
http://ryaneller.com/guest-post/guest-post-friday-the-power-of-responsibility/
© Martin Alfke - 2014
Improvement
Take your time to implement or
merge improvements	

Write test	

Write good documentation and
usage examples	

Write more tests	

Use your code
© Martin Alfke - 2014
Summary - 1
Work smart, not hard	

Write good documentation, examples and
tests	

Write blog posts (mention your module
and company)	

Be a responsive and responsible upstream	

Review other users contribution	

Allow access if contributors code quality
fits your requirements
Martin Alfke - SFO
© Martin Alfke - 2014
Summary - 2
Never refactor	

Restart prevents old bugs in new
module	

There will always come more
requirements	

Parameters, parameters, parameters	

Let other users decide for their
preferred data source	

Use a proper open source license
Martin Alfke - SFO
© Martin Alfke - 2014
Summary - 3
K.I.S.S	

(Keep it simple and stupid)	

“perfection is achieved, not when there
is nothing more to add, but when there
is nothing left to take away.”	

(Antoine de Saint-Exupéry)
Martin Alfke - SFO
© Martin Alfke - 2014
Module Rewriting the
Smart Way
Martin Alfke	

<martin.alfke@buero20.org>

More Related Content

PDF
Modules of the twenties
Puppet
 
PDF
Puppet Camp Paris 2016 Data in Modules
Martin Alfke
 
PDF
OpenRheinRuhr 2018 - Ops hates containers! Why?
Martin Alfke
 
PDF
Puppet camp2021 testing modules and controlrepo
Puppet
 
PPTX
Puppetizing Your Organization
Robert Nelson
 
PDF
Puppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet
 
PDF
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Puppet
 
PPTX
Troubleshooting Puppet
Thomas Howard Uphill
 
Modules of the twenties
Puppet
 
Puppet Camp Paris 2016 Data in Modules
Martin Alfke
 
OpenRheinRuhr 2018 - Ops hates containers! Why?
Martin Alfke
 
Puppet camp2021 testing modules and controlrepo
Puppet
 
Puppetizing Your Organization
Robert Nelson
 
Puppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet
 
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Puppet
 
Troubleshooting Puppet
Thomas Howard Uphill
 

What's hot (20)

PDF
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Puppet
 
PPTX
Auto Deploy Deep Dive – vBrownBag Style
Robert Nelson
 
PDF
Virtual Bolt Workshop, 5 May 2020
Puppet
 
PDF
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
Puppet
 
PDF
Ways to generate PDF from Python Web applications, Gaël Le Mignot
Pôle Systematic Paris-Region
 
PPTX
Virtual Bolt Workshop - 6 May
Puppet
 
PDF
Learning Puppet Chapter 1
Vishal Biyani
 
PDF
Modern Perl for the Unfrozen Paleolithic Perl Programmer
John Anderson
 
PDF
PuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, Puppet
Puppet
 
PDF
Python in the land of serverless
David Przybilla
 
PDF
Introduction to Griffon
James Williams
 
PDF
Tools and Virtualization to Manage our Operations at Puppet Labs - PuppetConf...
Puppet
 
PDF
Puppet at Pinterest
Puppet
 
PDF
Puppet at GitHub / ChatOps
Puppet
 
PDF
Pro Puppet
dsadas
 
PDF
Bootstrapping Puppet and Application Deployment - PuppetConf 2013
Puppet
 
PDF
Lessons I Learned While Scaling to 5000 Puppet Agents
Puppet
 
PDF
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Puppet
 
PDF
11 tools for your PHP devops stack
Kris Buytaert
 
PPTX
Automated Deployment With Phing
Daniel Cousineau
 
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Puppet
 
Auto Deploy Deep Dive – vBrownBag Style
Robert Nelson
 
Virtual Bolt Workshop, 5 May 2020
Puppet
 
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
Puppet
 
Ways to generate PDF from Python Web applications, Gaël Le Mignot
Pôle Systematic Paris-Region
 
Virtual Bolt Workshop - 6 May
Puppet
 
Learning Puppet Chapter 1
Vishal Biyani
 
Modern Perl for the Unfrozen Paleolithic Perl Programmer
John Anderson
 
PuppetConf 2016: The Future of Testing Puppet Code – Gareth Rushgrove, Puppet
Puppet
 
Python in the land of serverless
David Przybilla
 
Introduction to Griffon
James Williams
 
Tools and Virtualization to Manage our Operations at Puppet Labs - PuppetConf...
Puppet
 
Puppet at Pinterest
Puppet
 
Puppet at GitHub / ChatOps
Puppet
 
Pro Puppet
dsadas
 
Bootstrapping Puppet and Application Deployment - PuppetConf 2013
Puppet
 
Lessons I Learned While Scaling to 5000 Puppet Agents
Puppet
 
Testing for Ops: Going Beyond the Manifest - PuppetConf 2013
Puppet
 
11 tools for your PHP devops stack
Kris Buytaert
 
Automated Deployment With Phing
Daniel Cousineau
 
Ad

Viewers also liked (6)

PDF
Gluster fs buero20_presentation
Martin Alfke
 
PDF
GUUG Hamburg OpenNebula
Martin Alfke
 
PDF
Can you upgrade to Puppet 4.x?
Martin Alfke
 
PDF
One
Martin Alfke
 
PDF
Upgrading Puppet CommitterConf Essen 2014
Martin Alfke
 
PDF
PuppetConf 2016 Moving from Exec to Types and Provides
Martin Alfke
 
Gluster fs buero20_presentation
Martin Alfke
 
GUUG Hamburg OpenNebula
Martin Alfke
 
Can you upgrade to Puppet 4.x?
Martin Alfke
 
Upgrading Puppet CommitterConf Essen 2014
Martin Alfke
 
PuppetConf 2016 Moving from Exec to Types and Provides
Martin Alfke
 
Ad

Similar to Puppet camp london-modulerewritingsmartway (20)

PDF
Puppet Camp Berlin 2014: Module Rewriting the Smart Way
Puppet
 
PDF
Drupal Continuous Integration (European Drupal Days 2015)
Eugenio Minardi
 
PDF
Bridging the gap between business and technology - Behaviour Driven Developme...
Eugenio Minardi
 
PPTX
FAKE (F# Make) & Automation
Sergey Tihon
 
PPTX
From Flash to HTML5 in a flash: your ultimate guide to converting legacy e-le...
Litmos Heroes
 
PDF
Technologies, Places, Business Models for Open Design @ Pixelversity, Helsink...
Massimo Menichinelli
 
ODP
The Art of Writing Efficient Software
Ralf Holly
 
PPTX
xAPI for Training Managers
Andrew Downes
 
PDF
Go_ Building Web Applications ( PDFDrive.com ).pdf
RicardoSousa631355
 
PPTX
CloudFoundry-summit-2015-a-look-back
Krishna-Kumar
 
PDF
Resume
Fred Bovy
 
PDF
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
Bill Scott
 
PDF
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
garrett honeycutt
 
PDF
Another Copernican Revolution: maintenance first, projects second (European D...
Eugenio Minardi
 
PDF
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle
garrett honeycutt
 
PPTX
Cf objective2014 software-craftsmanship
ColdFusionConference
 
PPTX
Cf objective2014 software-craftsmanship
Kev McCabe
 
PDF
NRWConf - Workshop Mobile Apps
Peter Hecker
 
PDF
Omnibus to the future!
Jan Ivar Beddari
 
PDF
Webinar - Manage user, groups, packages in windows using puppet
OlinData
 
Puppet Camp Berlin 2014: Module Rewriting the Smart Way
Puppet
 
Drupal Continuous Integration (European Drupal Days 2015)
Eugenio Minardi
 
Bridging the gap between business and technology - Behaviour Driven Developme...
Eugenio Minardi
 
FAKE (F# Make) & Automation
Sergey Tihon
 
From Flash to HTML5 in a flash: your ultimate guide to converting legacy e-le...
Litmos Heroes
 
Technologies, Places, Business Models for Open Design @ Pixelversity, Helsink...
Massimo Menichinelli
 
The Art of Writing Efficient Software
Ralf Holly
 
xAPI for Training Managers
Andrew Downes
 
Go_ Building Web Applications ( PDFDrive.com ).pdf
RicardoSousa631355
 
CloudFoundry-summit-2015-a-look-back
Krishna-Kumar
 
Resume
Fred Bovy
 
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
Bill Scott
 
2014-08-19 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Chicago
garrett honeycutt
 
Another Copernican Revolution: maintenance first, projects second (European D...
Eugenio Minardi
 
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle
garrett honeycutt
 
Cf objective2014 software-craftsmanship
ColdFusionConference
 
Cf objective2014 software-craftsmanship
Kev McCabe
 
NRWConf - Workshop Mobile Apps
Peter Hecker
 
Omnibus to the future!
Jan Ivar Beddari
 
Webinar - Manage user, groups, packages in windows using puppet
OlinData
 

More from Martin Alfke (10)

PDF
CfgMgmtCamp 2023 - Puppet is YAML.pdf
Martin Alfke
 
PDF
HashiTalksDACH-Terraform-Managing training instances in the Cloud
Martin Alfke
 
PDF
PuppetCamp2021-Testing Modules and ControlRepo.pdf
Martin Alfke
 
PDF
Puppet Camp Germany 2020 - Puppet Control Repo and GIT
Martin Alfke
 
PDF
DevOps - How to get technical buy in
Martin Alfke
 
PDF
ADDO 2019 DevOps in a containerized world
Martin Alfke
 
PDF
Power of Puppet 4
Martin Alfke
 
PDF
Puppet future parser
Martin Alfke
 
PDF
developing sysadmin, sysadmining developersGuug devops puppet
Martin Alfke
 
PDF
Puppet buero20 presentation
Martin Alfke
 
CfgMgmtCamp 2023 - Puppet is YAML.pdf
Martin Alfke
 
HashiTalksDACH-Terraform-Managing training instances in the Cloud
Martin Alfke
 
PuppetCamp2021-Testing Modules and ControlRepo.pdf
Martin Alfke
 
Puppet Camp Germany 2020 - Puppet Control Repo and GIT
Martin Alfke
 
DevOps - How to get technical buy in
Martin Alfke
 
ADDO 2019 DevOps in a containerized world
Martin Alfke
 
Power of Puppet 4
Martin Alfke
 
Puppet future parser
Martin Alfke
 
developing sysadmin, sysadmining developersGuug devops puppet
Martin Alfke
 
Puppet buero20 presentation
Martin Alfke
 

Recently uploaded (20)

PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 

Puppet camp london-modulerewritingsmartway

  • 1. © Martin Alfke - 2014 Module (Re)writing the Smart Way Martin Alfke <[email protected]> ! Puppet Camp London 2014
  • 2. © Martin Alfke - 2014 About Me • Freelancer - Berlin/Germany • Automation and Cfg Mgmt • PCP 2013 • Module Contributor • PuppetLabs Partner Martin Alfke - at home
  • 3. © Martin Alfke - 2014 What is this talk about? The story of finding a module, learning that it is not useful for you, rethink and rewrite new shared, public module from scratch use it in your private roles and profiles and maintain it for other users. Martin Alfke - SFO -Vesuvio Cafe
  • 4. © Martin Alfke - 2014 What else? Why contributing is better than building a golden porcelain tower in the dark of your closet. or The Puppet community way of getting a task done. Martin Alfke - Berlin - Hotel du Rome
  • 5. © Martin Alfke - 2014 The Task Yes, we will have that task finished by yesterday ! http://www.mid-day.com/articles/day-29-in-bigg-boss-6-its-vrijesh-vs-major-sidhu/187949
  • 6. © Martin Alfke - 2014 How to start? We build a Puppet module !! ! But … how should we start? http://designtaxi.com/article/101902/How-To-Start/
  • 7. © Martin Alfke - 2014 The Lone Warrior Way Martin Alfke - Lassen County, California
  • 8. © Martin Alfke - 2014 Coding Puppet … class webserver13 { package { 'apache2': ensure => present, } file { '/etc/apache2/sites-enabled/000-default': ensure => absent, } file { '/etc/apache2/sites-available/10_webserver13': ensure => file, source => 'puppet:///modules/webserver13/10_webserver13', } file { '/etc/apache2/mods-enabled/alias.conf': ensure => link, target => '/etc/apache2/mods-available/alias.conf', } file { '/etc/apache2/mods_enabled/alias.load': ensure => link, target => '/etc/apache2/mods-available/alias.load', } ... }
  • 9. © Martin Alfke - 2014 Documentation / Bugfixes Who is doing reviews? ☞ YOU Who does documentation? ☞ YOU Who will support you? ☞ YOU http://lonewarriorswa.com/
  • 10. © Martin Alfke - 2014 Features? Changes? poor lonesome cowboy I’m a poor lonesome cowboy I'm a long long way from home And this poor lonesome cowboy Has got a long long way to roam Over mountains over prairies From dawn till day is done My horse and me keep riding Into the setting sun http://smellslikescreenspirit.com/2009/12/warner-bros-2010-preview/Poor lonesome cowboy - Pat Woods
  • 11. © Martin Alfke - 2014 The Smart Way Is there something available? DevOps means to understand and reuse foreign code. Use Puppet as a framework. http://www.thindifference.com/2011/02/11/what-is-the-best-way-to-brand-the-middle/
  • 12. © Martin Alfke - 2014 You are not alone There are: - companies using the same technology - developers using the same framework - sites which collect informations - people talking about their solution http://clivehicksjenkins.wordpress.com/
  • 13. © Martin Alfke - 2014 Sources puppetlabs.com github.com http://en.wikipedia.org/wiki/File:Microsoft-Staff-1978.jpg
  • 14. © Martin Alfke - 2014 Found the solution? Give feedback Cooperate / Fix bugs / Improve http://www.positoons.de/leistungen/character-design-info/eierlegende-wollmilchsau/
  • 15. © Martin Alfke - 2014 Reusing Modules class webserver13 { class { ‘::apache’: default_vhost => false, default_mods => false, } include ::apache::mod::alias ... }
  • 16. © Martin Alfke - 2014 Reality? We were checking for a module for cloud management We found one We talked to upstream: “Oh, …, yes, …, this module, …, ahem, …, do yourself a favour, …, rewrite it” or What if you found nothing? http://technorati.com/entertainment/celebrity/article/the-12-steps-of-reality-tv/
  • 17. © Martin Alfke - 2014 Start Writing Public Code Start a shareable, parameterised generic module Always keep in mind separation of code and data Let others decide which data source they want to use. Do never put private data in your repo Start using public repo immediately Take care on proper license (AGPL, GPL,…) http://www.security-faqs.com/why-your-company- should-issue-open-source-security-packages.html
  • 18. © Martin Alfke - 2014 Combine Public/Private Use your public module like any other (e.g. puppetlabs apache) Add data only to your private (wrapper) module Search for “Puppet Roles and Profiles” to understand this separation http://www.internetmarketinginc.com/blog/share-or-not-share- thats-the-question-going-public-with-private-information/
  • 19. © Martin Alfke - 2014 Responsibility Be a responsive upstream Always remember that other people might want to solve similar problems (not identical) Make your code run on different platforms Build a community around your module Review Pull Requests in time http://ryaneller.com/guest-post/guest-post-friday-the-power-of-responsibility/
  • 20. © Martin Alfke - 2014 Improvement Take your time to implement or merge improvements Write test Write good documentation and usage examples Write more tests Use your code
  • 21. © Martin Alfke - 2014 Summary - 1 Work smart, not hard Write good documentation, examples and tests Write blog posts (mention your module and company) Be a responsive and responsible upstream Review other users contribution Allow access if contributors code quality fits your requirements Martin Alfke - SFO
  • 22. © Martin Alfke - 2014 Summary - 2 Never refactor Restart prevents old bugs in new module There will always come more requirements Parameters, parameters, parameters Let other users decide for their preferred data source Use a proper open source license Martin Alfke - SFO
  • 23. © Martin Alfke - 2014 Summary - 3 K.I.S.S (Keep it simple and stupid) “perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” (Antoine de Saint-Exupéry) Martin Alfke - SFO
  • 24. © Martin Alfke - 2014 Module Rewriting the Smart Way Martin Alfke <[email protected]>