2. Idiot's approach
to patching
In this talk...
The IDIOT...
Unfortunately is ME :)
CEO of 1H Ltd.
mm@1h.com
CTO of GetClouder.com
mm@getclouder.com
3. Idiot's approach
to patching
➢ Download the source and create a git repo
in it
➢ Use git grep as much as possible
➢ Commit all changes that you do...
➢ even if they break the software
➢ Develop different approach or functionality
in different branch
➢ Build often
4. Idiot's approach
to patching
➢ There are two options
➢ you either need to change existing
functionality
➢ or add a new one
5. Idiot's approach
to patching
➢ With existing functionality
➢ try to find the code that implement it
➢ you can do that by searching for the
cmdline/config file options and the
flags/ints that are used to mark them
➢ you will see that in the examples
6. Idiot's approach
to patching
➢ With new functionality
➢ Try to find the smallest other
functionality that is present in the current
software and copy/paste it with different
name.
➢ Now that you have that... simply start
modeling your functionality within the new
code that you copied.
7. Idiot's approach
to patching
➢ You SHOULD NOT try to learn
and understand the whole code base, before
you start to hack on it.
➢ You must try to find only the files that are
relevant to what you want to change or add.
➢ While hacking, you shouldn't be concerned
if you broke the software in different parts
with your changes.
➢ If it works for you, that is
enough!