In This Chapter
During your career as an Android developer, you may run into various roadblocks — including code-based roadblocks. Say you're looking to communicate with a third-party API that returns JSON, or you're trying to perform collision detection in a game, but you're not sure how to go about it. When you run into these sorts of problems, one solution is to search the web for sample code. Chances are, someone out there has already written the code you're after! You can then review that code, alter it as needed, and continue with development.
Sample code is great, but it's just that — sample code. It's not production ready, and you usually can't just plug it into your application without first making some adjustments. However, sample code has a valuable side effect: It is a learning enhancer. A good way to find out how to program for Android is to analyze sample code. Sure, sample code — such as the API demos I mention in Chapter 4 — comes with the Android SDK. But a plethora of real-world application code is freely available on the web! You can find plenty of good-quality, open-source applications on the Internet, which can serve as great learning tools.
Telling you to find them yourself would be rather rude, now wouldn't it? To help speed up your learning ...