This book should be an interesting source of information for peoplewho have used Git or GitHub and want to level-up their skillsrelated to these technologies. People without any experience usingGitHub or Git should start with an introductory book on thesetechnologies.
You should have a good familiarity with at least one imperative modernprogramming language. You dont need to be an expert programmer toread this book, but having some programming experience and familiaritywith at least one language is essential.
You should understand the basics of the HTTP protocol. The GitHub teamuses a very standard RESTful approach for its API. You shouldunderstand the difference between a GET request and POST request and whatHTTP status codes mean at the very least.
Familiariy with web APIs is helpful, although this book simultaneouslyaspires to provide a guide showing how a well thought out,well designed, and well tested web API creates a foundation for buildingfun and powerful tools. If you have not used web APIs extensively, buthave experience using other types of APIs, this is good company.
What You Will Learn
Much of the book focuses on the technical capabilities exposed byGitHub and the powerful GitHub API. Perhaps you feel constrained byusing Git only from within a certain toolset; for example, if you arean Android developer accidentally using Git to manage your appsource code and want to unlock Git in other places in your life as adeveloper, this book provides a wider vista to learn about the powerof Git and GitHub. If you have fallen into using Git for your ownprojects and are now interested in using Git within a largercommunity, this book can teach you all about the social coding stylepioneered and dogfooded by the GitHub team. This book provides astepping stone for software developers who have used other distributedversion control systems and are looking for a bridge to using theirskills with Git and within a web service like GitHub.
Like any seasoned developer, automation of your tools is important toyou, and this book provides examples of mundane tasks that we thenconvert them into automated and repeatable processes, and we show howto do this using a variety of languages talking to the GitHub API.
If you are unfamiliar with the command line this book will give youa firm understanding of how to use it, and we bet you will find greatpower there. To make this book accessible to everyone, regardless oftheir editor or operating system, many of the programming samples workwithin the command line. If you have hated the command line since yourfather forced you to use it when you were five, this is the perfectbook to rekindle a loving relationship with the bash shell.
If you absorb not only the technical facets of using GitHub but alsopay attention to the cultural and ideological changes offered behindthe tools, youll very likely see a new way of working in the modernage. We focus on these meta viewpoints as we discuss the toolsthemselves to help you see these extra opportunities.
Almost every chapter has an associated repository hosted on GitHubwhere you can review the code discussed. Fork away and take thesesamples into your own projects and tools!
Finally, we help you write testable API backed code. Even the most experienceddevelopers often find that writing tests for their code is achallenge, despite the massive body of literature connecting qualitycode with tests. Testing can be especially challenging when you aretesting something backed by an API; it requires a different level ofthinking than is found in strict unit testing. To help you get pastthis roadblock, whenever possible, this book shows you how to writecode which interacts with the GitHub API and is testable.
First Class Languages You Need to Know
There are two languages which are so fundamentally linked to GitHubthat you do need to install and use them in order to get the most outof this book.
- Ruby: a simple, readable programming language used heavily by the founders of GitHub.
- JavaScript: the only ubiquitous browser side programming language, its importance has grown to new heights with the introduction of NodeJS, rivaling even the popularity of Ruby on Rails as a server side toolkit for web applications, especially for independent developers.
Your time will not be wasted if you install and play with these twotools. Between them you will have a solid toolset to beginexploration of the GitHub API. Several chapters in this book use Rubyor JavaScript, so putting in some time to learn at least a little bit willmake the journey through this book richer for you.
Undoubtedly, many of you picking up this book already have familiaritywith Ruby or JavaScript/NodeJS. So, the basics and installation of them are inappendices in the back of the book. The appendices dont cover syntaxof these languages; we expect you have experience with other languagesas a prerequisite and can read code from any imperative languageregardless of the syntax. Later chapters which do discuss a facet ofthe API go into language details at times, and the code is readableregardless of your familiarity with that particular language. Theseexplanatory appendices discuss the history of these tools within theGitHub story as well as important usage notes like special files andinstallation options.
Who This Book is Not For
If you are looking for a discussion of the GitHub API that focuses ona single language, you will be disappointed to find that we look atthe API through many different languages. We do this to describe theAPI from not only the way the GitHub team designed it to work, but theaspirational way that client library authors made it work withindiverse programming languages and communities. We think there is a lotto learn from this approach, but if you are interested in only aspecific language and how it works with the GitHub API, this is notthe book for you.
Conventions Used in This Book
The following typographical conventions are used in this book:
Italic Indicates new terms, URLs, email addresses, filenames, and file extensions. Constant width
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords. Constant width bold
Shows commands or other text that should be typed literally by the user. Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.