HTML C++ Python C PHP Java Other
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
AWS Adding AWS, OpenSCAD, Raspberry Pi, and Python example! Jul 14, 2018
OpenSCAD Adding AWS, OpenSCAD, Raspberry Pi, and Python example! Jul 14, 2018
android Adding c++ examples Mar 6, 2018
arduino Adding Arduino and Pi examples. Jun 5, 2018
asm Initial commit. Adding all reference code under one repo Apr 22, 2015
bash Tweaks Nov 18, 2016
c++ Adding new C++ examples Mar 25, 2018
c Updating Java packaging examples Jan 9, 2018
chrome_extension Adding some Java examples Jan 2, 2016
clojure Adding some basic Rust notes Feb 1, 2016
go Adding Go web scraping examples Mar 25, 2018
haskell Updating haskell cmd arg example Aug 14, 2015
java Adding Go web scraping examples Mar 25, 2018
javascript Updating Java packaging examples Jan 9, 2018
lisp Initial commit. Adding all reference code under one repo Apr 22, 2015
mongodb Updating Java packaging examples Jan 9, 2018
perl Adding some Java examples Jan 2, 2016
php Merge branch 'master' of ssh://zvza.net:2202/home/dtron/git/reference May 17, 2015
powershell Updating Java packaging examples Jan 9, 2018
python Adding AWS, OpenSCAD, Raspberry Pi, and Python example! Jul 14, 2018
raspberry-pi Adding AWS, OpenSCAD, Raspberry Pi, and Python example! Jul 14, 2018
ruby Updating Java packaging examples Jan 9, 2018
rust Adding some basic Rust notes Feb 1, 2016
scala Updating Scala command line arg example Aug 14, 2015
tcl Adding a couple more samples Jul 29, 2015
.gitignore Adding Go web scraping examples Mar 25, 2018
Managing LetsEncrypt certs.md Adding AWS, OpenSCAD, Raspberry Pi, and Python example! Jul 14, 2018
Philips Hue Programming.txt Adding Philips Hue light programming notes. Updated notes for static … Oct 20, 2017
README.md Rewording README Dec 1, 2016

README.md

The Cookbook Method

A cookbook in the programming context is collection of tiny programs that each demonstrate a particular programming concept. The Cookbook Method is the process of learning a programming language by building up a repository of small programs that implement specific programming concepts. Starting with a Hello World program and building the knowledge piece by piece on top of that.

If you are a beginner, you will probably want to start out with one language like Python and start building up your repetoire of snippets for reference and confidence. If you are a seasoned developer, you may want to start building a cookbook from scratch for a new language you have never used, or keep a cookbook for more advanced topics in a language you are already familiar with.

Here is an example of when my Cookbook comes in handy. Recently I was faced with a situation where I needed to make an HTTP request to an API, parse the JSON response, generate a CSV spreadsheet, and email the spreadsheet. Because I already had my own cookbook snippets for doing each of those three actions, it was really easy to put together a program that did what I needed it to.

Benefits of Building Your Own Cookbook

  • You can share it with others
  • Learn topics that are interesting to you
  • You build up your knowledge in small increments
  • You can see your progress over time
  • You have a library of reference material in your own style.
  • It is quicker than looking up documentation or looking for a Stack Overflow answer.
  • Explore new topics
  • Learn new programming languages.
  • Tips for Building a Cookbook
  • Store your cookbook in a version control system like Git.
  • Keep a to do list of topics or programming languages you want to explore and learn
  • It does not have to be just code. I have a lot of plain text .txt files with notes on things like how to create a Python pip package, creating Ruby Gems, or how to create a runnable JAR in Java. Sometimes tips on installing prerequisites if something was difficult or just notes on how to compile and run programs.
  • It can also be template programs. For example I have a base chrome browser extension that doesn't really do anything itself, but it is a fully functional extension with all the boilerplate done and ready for me to start developing.
  • Programs should be fully runnable and not just chunks of code without context that do not compile and execute
  • Keep the snippets small, simple and to one topic

Example Cookbook Topics

Everyone has different goals with programming so identify topics relevant to your interests. Here are some ideas if you do not know where to get started.

  • Hello, world
  • Getting user input from stdin
  • Taking command line arguments
  • Reading and writing files
  • Using TCP sockets
  • Making HTTP requests
  • Parsing JSON
  • Creating a CSV file
  • Making database connections
  • Playing an audio file
  • Multithreading
  • Drawing 2D graphics to screen
  • Drawing 3D graphics to screen
  • GUI programming

The DevDungeon Cookbook