Python challenge: Introduction
In winter 2016/2017, I decided to improve my coding skills in Python. This post provides an introduction to the challenge that I put on myself.
Why Python?
My background in Python is rather limited to be honest, except for very little maintenance of an existing Django application a while ago. Hence, there is a lot of room for learning and improvement. The second reason is simply that it cannot hurt to learn various programming languages as different languages provide different perspectives and approaches for solving problems. Another reason is that there is a lot ongoing in the Python open source community. So why should I not benefit from that?!
Why the challenge?
A challenge can have different facets. Some people strive to read one book per month, others want to complete a marathon per year. Regardless of the context, a challenge has one major purpose: To have a goal to aim for.
The goal
In my case the goal is to learn more Python by covering various topics. I am working on these topics with the help of both general and concrete examples. Simultaneously I document the lessons learned along the way - writing down stuff simply works well for me when it comes to learning.
Constraints
For the examples that I write during the challenge I have been using the vi editor. While it is of course cumbersome to write code in vi, it helps me to learn the syntax.
Initial topics
I have been (or will be) working with the following topics:
- startup
- data types
- control flow
- OOP
- data structures
- testing
- file IO
- databases
- HTTP, REST and stuff
- GUI
Of course, there are more topics, but that seems like a reasonable start.
Concrete samples
Besides, I am working with the book “57 Exercises for Programmers” by Brian Hogan, that provides fifty seven small code exercises.
Apart from the more general code samples, I plan to implement a couple of concrete but rather small applications:
markdown generator: For my blog I use markdown that has to follow certain templates etc. A markdown generate will simplify the writing.
In a first version, this will be only a command-line tool.
some game, e.g. hangman: I am not much into games, but implementing a simple game could be fun
address book/todo app: yet another address book or todo app
graph algorithm: graph algorithms are fun!
test generator: Since I am writing most of the code in vi a simple test generator will make my life easier
The code written during this python challenge is available in the following repositories at github:
https://github.com/mbaeumer/python-challenge
https://github.com/mbaeumer/fiftyseven