CO559: Software Development
Open source software






Tomas Petricek

email: t.petricek@kent.ac.uk
twitter: @tomaspetricek
office: S129A

Background

MIT Hacker Culture
The Tech Model Railroad Club

Access to computers should be unlimited

All information
should be free

Free software
Free as in freedom, not as in free beer

GNU GPL (1989)

Restrictive - you must release changes using the same license

Hacker-centric - user is also a programmer

Commercial Windows vs. Free Linux (1990s-2000s)

Commercial software

  • Business approach to software
  • Source owned by corporations
  • Funded by selling software

Free software

  • Hacker culture of software
  • Code is free to modify and reuse
  • Funded by additional services

Microsoft Linux

Commercial interests not selling software but providing services

New generation of OSS open-source without the "cancer" license clause

Open-source software

It's much more than free vs. commercial license

A lot of software is not a final end-user product

Search for sustainable open-source funding

Who is in control of open-source software?

Contributing and accepting contributions

Sustainable open-source funding

Crucial safe internet infrastructure receives donations of $2000 per month to pay one developer.

Welcoming community

Please just kill yourself now. The world will be a better place.

Becoming contributor
is hard without guidance

Attracting contributors
takes a lot of energy

Code of conduct
"Be nice" is not enough

Clear set of rules to be followed, even by "key" contributors

Process for resolving and reporting issues that arise

Open-source models

Free software model

Philosophy and ideals

  • Built by hackers for hackers
  • Pay not with money, but with code
  • Open decisions (rarely the case)

Licenses and tools

  • GPL license requires publishing changes
  • LGPL allows linking in proprietary software
  • Distributed version control (git)

Dual licensing model

Philosophy and ideals

  • Free for hackers, paid otherwise
  • Pay with either money or code
  • Commercial, but open ownership

Licenses and tools

  • AGPL closes service provider loophole
  • Using database forces you to share your code
  • Commercial license if you don't want to

Consulting model

Philosophy and ideals

  • Share code and allow all uses
  • Find alternative funding source
  • Commercial services, trainings

Licenses and tools

  • MIT, BSD and Apache licenses
  • Allow unrestricted use without requirements

Corporate open-source model

Philosophy and ideals

  • Developer tools should be open
  • Even those from companies
  • Supports other profitable business
  • Project ownerships remains corporate

Licenses and tools

  • MIT, BSD and Apache licenses (again)
  • Share code on GitHub for community reasons

Community open source model

Alternative for community projects

Free as in free beer
(with donations)

Like corporate model without corporations

Is this sustainable?

Contributing to open-source

Life of an open-source project maintainer can be tough!

Contributing to open-source

What open-source projects need to live?

Maintainer - 1 hour a day, week or month
Someone to merge changes, build releases, explain issues

Core developers - irregular, but more time
To implement major new features in the software

Contributors - a couple of hours or days
Improvements, fixing bugs, better documentation

Contributing to open-source

Even small things matter

  • Minor bug fixes and typos
  • Documentation improvements
  • Good bug reports

How to do it well

  • Follow style and contributing guidelines
  • Report issues with minimal example
  • Small to large builds trust & communicate well

Good contributing

Read the guidelines
On Github typically in CONTRIBUTING.md file

Follow guidelines
Where to discuss, how to comment and explain

Good contributing

Follow coding style
Code indentation, brackets, etc.

Explain things well
Good title and detailed description

Reporting issues is also contribution!

Writing a good issue is a valuable skill

Minimal - As little code and data as possible

Complete - Provide all relevant parts of code

Verifiable - Describe and test the behaviour

Minimal, complete, verifiable example

Broken function to check palindromes

1: 
2: 
3: 
4: 
5: 
function palindrome(s) {
  for(var i = 0; i < s.length / 2 - 1; i++)
    if (s[i] != s[s.length-1-i]) return false;
  return true;
}

Mostly works, but not always!

palindrome("step on no pets") == true
palindrome("hello world") == false
palindrome("step onto pets") == true

Minimal, complete, verifiable example (1/2)

I tried calling palindrome(text) and it does not work!

Complete - what is the message used as input?
Verifiable - in what way does it not work?

I tried palindrome("step onto pets"), it does not work!

Complete - sample input is now included
Verifiable - in what way does it not work?

Minimal, complete, verifiable example (2/2)

When I call palindrome("step onto pets"),
I get true but the input string it not a palindrome!

Complete - sample input is included
Verifiable - gives expected and actual result
Minimal - input is longer than necessary

When I call palindrome("x12x"), I get true
but the string "x12x" it's not a palindrome!

Summary

Open source software

Recent history of open source software
How Microsoft adopted open source
Sustainable funding and welcoming community

Open source philosophies and funding
Free software or dual licensing model
Consulting, corporate and community model

Contributing to open source software
Following style, code and comment guidelines
Reporting minimal, complete, verifiable examples

CO559: Open source software

What you should remember from this lecture

  • Free, dual, consulting, corporate OSS model
  • Contributing, minimal complete verifiable example
  • Freedom (GPL etc.) vs free beer (MIT, BSD, Apache)


Tomas Petricek
t.petricek@kent.ac.uk | @tomaspetricek

References

Online resources