/COMP406

Primary LanguageTeX

Open Source Development

Agenda

July 13: Status updates

Status update for all. Please populate your README with these:

  • What are you working on?

  • What’s your implementation language?

  • What have you done so far? Did you meet your expectations for this week yet?

  • What do you hope to accomplish by next week? How? (Who’s doing what, if this is a team?)

  • What do you need to move forward?

June 19: Midterm

June 10: Actual plan today

What is free software?

What is open source software?

What’s the difference?

What does copyleft mean?

What does permissive mean?

What is a license? What’s the difference among them?

Copyleft: GPL (strong), LGPL (weak), Mozilla Public licence (weak) Permissive: BSD, MIT, XFree86, Apache

People

Richard Stallman Linus Torvalds Bruce Perens Eric Raymond Michael Tiemann Mark Shuttleworth

When did open source software start?

Originally, all software was "open source". Proprietary software had to be invented. The term "open source" as used today came to being in 1998.

What were some major accomplishments in free / open source software?

Who is Richard Stallman? What did he do?

He got a $1 million dollar MacArthur Foundation Genius grant.

He helped write:

  • GNU General Public License

  • He’s got microkernels in his beard. A HURD if you will.

  • Disgusting person.

  • GCC, GDB, emacs

  • Nothing to do with MIT license, Ubuntu or Debian

  • GNU project (and all the ancillary software)

Who is Eric Raymond? What did he do?

  • He wrote the Cathedral and The Bazaar

  • He is Microsoft’s worst nightmare

  • He said to Jim Allchin (who later said: Linux is a cancer), "I am your worst nightmare."

Who is Bruce Perens? What did he do?

  • He wrote the Debian Free Software Guidelines

  • That in turn, became the Open Source Definition.

How is Michael Tiemann doing? What did he do?

He helped write:

  • g++

  • He founded Cygnus, which Red Hat acquired, and he became wealthy.

Who is Linus Torvalds? What did he do, besides Linux?

Who is Mark Shuttleworth? What did he do?

  • Is a billionaire. He ran CA called Thawte (which Verisign bought $$$).

  • He’s been to space.

  • Founded Ubuntu and Canonical

What is project hosting? How has that changed?

Github, Sourceforge, Bitbucket, Gitlab, etc.

People used to use Sourceforge. But don’t. Seriously.

Why do folks write open source software?

  • Because you have to (based on need)

  • Because it’s there

  • Good way to learn

  • Good way get a job

  • Street cred

  • Etc.

Who produces open source software?

  • Foundations (Apache, Eclipse, Mozilla, GNU, Software Freedom Conservancy, etc.)

  • Companies

  • Individuals

Who pays for it?

  • It depends

  • GPL software and proprietary version to pay for it.

  • Donations

  • Sponsorships

  • Governments

  • Etc.

Who profits from it?

  • See Red Hat

Who is in control of your computer?

  • It should be you, but it isn’t because reasons

What do we give up when we cede control to others? What do we gain?

  • Renting movies?

  • But there’s alternatives

Is it okay for others to decide what you can do with your computer? If so, when?

  • No, because liberty!

  • Yes, because who cares?

June 8: Midterm?

Make it open source. Manually type out a license. Essay? Hell no! Take home? Maybe, we’ll see. How to contribute? Licensing.

June 3: Rebasing

How to use rebasing to look smarter than you actually are.

git rebase -i <base>

June 1: Project stuff

Your project

  1. Pick project, preferably actively developed in a language of your choosing.

  2. Get it to build (if it doesn’t, that could be a contribution itself)

  3. Meet upstream developers and their hangouts. Hereafter referred to as they.

  4. Look at their issue tracker. Great place to look for ideas.

  5. Figure out what your contribution will be.

  6. Do said thing.

This class

I need your help to make it worthwhile.

I could use some rolling topics to discuss in class.

File an issue in this repo (Rolling topics)

May 27: Practice Branching

cd illacceptanything
git gui &
gitk --all &
git branch
git checkout -b branch-name-goes-here
touch a-turd
git add a-turd
git commit -m "Added crap."
git checkout master
touch another-turd
git add another-turd
git commit -m "Another turd"
git merge pooper-scooper

git checkout -b madmax
# edit Poem.txt
git commit -am "did stuff."
git checkout master

git checkout -b ode-2-whiskey
# edit Poem.txt
git commit -am "did stuff."
git checkout master
git checkout -b development

git branch
git branch -D pooper-scooper
# Let's get a merge conflict

git merge madmax
git merge ode-2-whiskey
# Woo hoo! Merge conflict!
git mergetool
# Or, do one of these:
git checkout --ours poem.txt
git checkout --theirs poem.txt

git commit -am "Fixed merge conflict."

Don’t commit stuff with conflict markers! Here’s what they look like:

<<<<<<< HEAD
Mad max is the man.
Mad max roams the countryside.
Mad max has an ax.
=======
The devil wears black.
And he goes by Jack.
And he's really good at helping me forget.
>>>>>>> ode-2-whiskey

May 22: Getting it to build

Have you picked a project yet?

Either way, lets try to get something to build.

May 20: Setting up remotes

Note
Don’t do this in your repo, for the love of $deity

Do this

cd illacceptanything
git remote add upstream https://github.com/lawrancej/illacceptanything.git
git pull upstream master
chmod +x remotes.sh
./remotes.sh    # Setup remotes
git remote -v   # Should see a long list
git fetch --all # Fetch from everybody
gitk --all &    # See history

Merge in the work of whoever is sitting next to you.

git merge <remote-name>/master
git push origin

May 18: Try out open source yourself

Note
Don’t do this in your repo, for the love of $deity
  1. Go here: I’ll accept anything that’s not illegal-ish

  2. Click the "Fork" button.

  3. Clone your fork. git clone URL-GOES-HERE-BUT-DONT-TYPE-LITERALLY

  4. cd illacceptanything

  5. Add stuff to the folder.

  6. git add .

  7. git commit -m "Message here"

  8. git push origin master

  9. Go to your repository, then submit a pull request.

  10. See if it worked here

May 15. Lab 2. Project selection and contribution

With so many open source projects to choose, selecting one can be daunting.

Choose an open source project with:

Users

The more users, the better. Although contributing to an obscure project may expand the user base, contributing to a project that people use is a great feeling.

Utility

Does the project serve some user need? Games are fine, we need entertainment, but some projects are intended for neither users or developers (i.e., toy code).

Familiarity

Can you understand the source code? If you don’t know the language, pass on the project.

Developers

The more developers, the better. Most open source projects are the work of one person. You’ll get more out of this class if you contribute to projects with multiple developers.

Activity

Have developer(s) contributed to this project recently? Be wary of inactive projects, unless you want to become the maintainer.

Consider the nature of the contribution you make. These are excellent contributions:

New features

Creating a new feature to enable users to do something new helps users.

Bug fixing

Fixing some annoying problem helps users.

Documentation writing

Documenting how to build, use or contribute to the code helps users.

Code cleanup

Eradicating technical debt helps the developers, even though it may not affect users.

Testing

Writing a test suite helps the developers.

Consider your motivations.

Intrinsic interest

Would you do this in your spare time anyway? Great!

Resume / portfolio building

Does this contribution advance your career? Great!

Many small isolated commits (that are mergeable) is better than one gigantic commit.

May 13. Open source slides

Go to your repo (e.g., on Github, Bitbucket, Gitlab).

Create an issue in your repository. The issue title should reflect a project you are considering, the issue description should explain the contribution you want to make.

May 11. VMs and Definitions

Note
Watch Git for ages 4 and up and read Producing Open Source Software by next class.

Install these:

Run this to get into a local Linux (Ubuntu) VM:

vagrant init hashicorp/precise32
vagrant up
vagrant ssh
vagrant halt # Shutdown machine (opposite of up)
vagrant destroy # Remove VM (opposite of init)

What is free software?

  • run it for any purpose (freedom 0).

  • study how the program works, and change it (freedom 1).

  • redistribute copies (freedom 2).

  • distribute copies of your modified versions (freedom 3).

Misconceptions about free software:

  • You can’t sell it. (Yes, you can!)

  • Don’t need to pay for it. (Sometimes you do)

Free software is NOT necessarily public domain (free of copyrights). Most free software is protected under copyright.

What is open source software?

  • Free Redistribution

  • Source Code

  • Derived Works

  • Integrity of The Author’s Source Code

  • No Discrimination Against Persons or Groups

  • No Discrimination Against Fields of Endeavor

  • Distribution of License

  • License Must Not Be Specific to a Product

  • License Must Not Restrict Other Software

  • License Must Be Technology-Neutral

What’s the difference?

They’re almost the same. Free software respects user’s freedom, whereas open source respects developer’s freedom. When users and developers are the same, free and open source mean the same thing.

To understand the difference, open source digital rights management (DRM) could be a thing, but free software DRM is a contradiction.

To summarize (courtesy FSF via Advogato):

Needs more JPEG

What does copyleft mean?

Three categories of intellectual property:

  • Patents protects inventions.

  • Trademarks protects brands.

  • Copyright protects other creative works (anything you write)

Copyleft flips copyright: you may share as long as you share alike (under the same terms).

What does permissive mean?

You can do whatever the f*&@ you want to.

What is a license? What’s the difference among them?

A license restricts what you can do with work under copyright, it defines the ground rules.

May 8. Lab 1: Prequiz

Note
Watch Revolution OS by next week.

Pull from me:

cd ~/COMP406
# The easy way
git pull upstream master
# The leet way
git fetch upstream
git merge upstream/master
# See a CONFLICT? Unlikely at this point
git mergetool

Open up prequiz.adoc in your favorite text editor (it is in your local git repository).

Warning
Do not use Notepad or Word. Use a real text editor. Suggestions: Notepad++ (Windows), Atom, or Sublime.

Then, save your changes and submit your work to your repository.

cd ~/COMP406
# The easy way
git gui &
# The leet way
git add .
git commit -m "Finished prequiz"
git push -u --all origin
Important
As a professor, I tailor open source software for education; consider an open source project to improve in this class, and your circumstances. Think: "I need open source project X to do Y so that I can Z." For example, you may find an open source project difficult to use in some way. Identify the issues in the issue tracker, advocate for fixing them with upstream (e.g., on IRC), submit changes, and send a merge (pull) request.

May 6. Git and hosting setup

Step 1. Install Git and frontends

Windows

Install Git Extensions

Note
Install MsysGit, Install KDiff, and choose OpenSSH (not PuTTY); otherwise, stick to the default settings.

Install MsysGit and KDiff Choose OpenSSH

Mac OS X

Install GitX-dev, then Install XCode developer tools which ships with git (recommended) or install git from here.

Linux

Install git using your package manager. QGit, a git frontend may also be available for your distribution.

Note
Don’t forget to use sudo with your package manager.
curl https://raw.githubusercontent.com/lawrancej/COMP406/master/main.sh | bash

Rest of class

Readings

Tip
Carefully read the first sentence of every paragraph before deciding whether to skip or read the rest of the paragraph, since writers often state the point upfront and then support it in subsequent sentences. In short, you can read quickly with high comprehension by skipping the supporting material, if you understand the writer’s point and how they write. Of course, if you don’t understand the point, then read everything carefully, but beware of poorly written supporting material that distracts you. Obviously, skipping later sentences doesn’t always work: not all documents fit the "topic sentence followed by supporting points" structure of essays. For example, narratives often instead have dialogue among characters, but those are even easier to read quickly than large walls of text. Sometimes, bad writers put in pointless filler that doesn’t go anywhere, or even worse, bury the point in the middle of the paragraph. Good writers understand their audience and know that to get people to read their work, they must make their work easy to skim. Now pause for a second: did you see what I just did here? If you were thinking, this paragraph is itself a giant wall of text, I could have ignored the rest, and then realized that this is all a bit meta, then you not only understand the definition of the word meta, but you also ignored my advice about how to speed read, proving that you are kind of person who does the reading completely. Obviously, reading the whole paragraph gives you some nuance that can be rewarding, but then again, I think we can agree that the first sentence captured the rest of this paragraph pretty well, which is why you should have just skipped this paragraph full of inane, distracting filler.

Definitions and licenses

What is free software? What is open source software? What’s the difference? What’s copyleft? What’s permissive? What’s the difference among the licenses?

Historical background

When did open source software start? What were the major accomplishments? Who were the key players? What has changed over the decades? Why do folks write open source software?

Freedom, Politics, Ethics

Who is in control of your computer? What do we give up when we cede control to others? What do we gain? Is it okay for others to decide what you can do with your computer? If so, when?

Money

Who produces open source software? Who pays for it? Who profits from it? How can open source developers earn a living?

Git

Git. Huh. What is it good for?

Studying code

What can we learn from reading source code? What can source code teach us about software development?

Writing open source software

How does one go about running and/or contributing to an open source project?

Beyond software

Who owns culture? How do the principles of free and open source software apply beyond software?

Further reading

Need more books to read?