Skip to content

Instantly share code, notes, and snippets.

@theY4Kman
Created January 4, 2012 08:54
Show Gist options
  • Save theY4Kman/1559175 to your computer and use it in GitHub Desktop.
Save theY4Kman/1559175 to your computer and use it in GitHub Desktop.
How to use gists to spread a good idea

github is an excellent idea. It is the solution to the problem of slow development cycles. It solves that by giving you the tools you need to make sharing your code easier. If you share your code with someone, they don't have to write lots of code themselves; they can simply borrow the best ideas in your code. If they have a good idea, they can easily add it in, and share it with more people. It's a positive feedback loop that produces better code, every time it circles.

This doesn't have to apply only to code. Code is just a way to express an idea to a computer. We can use the tools github has given us to make sharing great ideas easier.

github's gists are an incredibly useful idea. They let you easily share anything you type. Then when you want to update what you've written, you simply edit it and submit the new version. github stores the old versions, so you can easily see how the text has changed over time, and thus how the idea has changed over time. More importantly, it means people can decide for themselves which version is best for them.

When someone finds a version that sounds best to them, they'll keep reading it, because it will be interesting to them. The more they keep reading, the more likely it is they'll figure out a better way to express the idea. When they do that, they "fork" the idea. Just like a fork in the road causing the road to split into two roads from one, the idea used to be just your own, but now it's split into two paths: yours, and theirs. Every time you submit a new version, it gets tacked on to your version path. Every time they submit a new version, it gets tacked on to their version path.

The problem with that, as you might notice, is the two paths will never converge. They'll start to grow into two separate ideas. This is what the "git" in github does so lovely, at least for code. Code is fairly simple: it begins with an instruction. An instruction makes the computer do something. With enough instructions, you're able to express an idea that you want the computer to think about.

When computers just began, they were only the electrical signals. Eventually, someone came up with the bright idea of calling the electrical signal 1, and the lack of the electrical signal 0. It was easy to explain electrical signals by using 0s and 1s. Then we started figuring out how to encode more information using only 1s and 0s. Using base 2, also known as binary, we were able to represent any number using only 0s and 1s.

We're taught in school and in life to use base 10. All that means is you can only use the digits 0,1,2,3,4,5,6,7,8, and 9. A number is agnostic of its representation. We need the representation to communicate the number to someone else. A number is represented, in any base, as a series of digits. The number 123 in base 10 simply means 11010 + 210 + 3. The number 101 in base 2 means 122 + 02 + 1. The number 101 in base 2 means exactly the same thing as the number 5 in base 10.

We build on top of these numbers, learning how to represent even more information with what we have access to at the moment. We kept developing till we represented colours on a monitor and letters typed on your keyboard. We learned to create easy-to-read ways to represent instructions for the computer to run. These are what we call programming languages.

Over decades of inventing new programming languages and keeping the good ideas, we learned how to effectively create new programs. With all this new code, though, there needed to be a way to organize it. That's where "git" in github comes into play. "git" is a version control system, which is the same concept as gists. In fact, it's "git" that serves as the backend to gists.

"git" has the wonderful ability to merge two separate pieces of code together. It doesn't always work, but it works a lot of the time. And as we recognize more patterns in our code, it will get better.

We were able to invent a good merging algorithm in git simply by trial and error of thousands of contributors. People who had a good idea, wrote the code for it, and shared it. People who liked that code organized it, until it became git's ability to merge.

Eventually, we will learn how to do the same thing for ideas. And looking at how much git has revolutionized the efficiency at which we program, when we figure out how to merge ideas, we will become even more efficient at living our lives. But we have to try and we have to err. We do that by continuing to use gists until we recognize a pattern in it that we can understand. Then we change it and make it better.

So fork often! Fork everything you see. Fork it the way you want. The more people that fork it, the better the idea becomes, the more people fork it, the better the idea becomes, until everyone understands the entire idea all together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment