Learning Django from Scratch and by Example

Django
Let me preface with a quick summary of what Django is and why learn it. Django is a pythonic means of constructing a web framework quickly, not to be mistaken with the Quentin Tarantino movie. When building a web application many of the moving parts are universal among all web applications from moving data between databases to creating user accounts. The other popular web framework constructor is Rails which uses the Ruby language. Since I have chosen Python as my go to language learning Django was a natural extension to my self-education. It goes without explaining that web applications are replacing standalone installed programs. Companies such as Microsoft are moving office to the web, and many many other SaaS or Software as a Service companies are turning to the web as the medium for providing a service. My personal goal is to become knowledgeable of web app development and in my free time create tools online that benefit society, hopefully from a sustainability angle.

From last week’s exercises I found that I learn best through example. So I decided to take the same approach with getting started with Django. There are many good books out there on Django but since I am interested in only Kindle e-books, having my entire library accessible digitally is vital, I chose to go with Instant Django 1.5 Application Development Starter. The advantage of this book is that it is still relevant, as of this posting the latest version of Django is 1.6, while one of the main resources out there The Django Book is admittedly outdated. Instant Django is a relatively short book that assumes basic competence with Python but no prior knowledge with web development. I have worked through 1/3 of creating my own simple question and answer app and though not everything makes sense yet this has been a gentle learn by example exercise.

Learning Python Rapidly – Where to start and how to find the Programming Community

Python_for_iOS_App_Icon
My objective this year is to become a master of python or at the very least proficient enough to pick up someone else’s code and hit the ground running. The nice part about python compared to other languages is that the forced use of indents makes reading the code of other authors smoother because the indentation makes it easier on the eyes to spot blocking of for loops, if statements, etc..

This weekend I completed all the python exercises provided by Google’s Python Class. Google’s coding lessons are highly efficient when learning the basics quickly. I started my python journey by completing the exercises in Learning Python the Hard Way and I am currently reading Mark Lutz’s Learning Python. I think all of these resources were essential to improving my understanding but I think the best order to study Python is start with Google’s Python Class, then Learning Python the Hard Way, followed by the exercises in Learning Python. I am currently attending the San Diego Python User’s Group which is a Meetup organized around the passionate study of Python.

The people I met have been very enthusiastic and supportive of my goal to become a better programmer. I go to the library at least four times a week for a three hours programming learning session and it can be a solitary journey at times. This San Diego group of Python programmers, a group at all levels of experience, has been a great resource for encouragement and vision of where I can be if I continue to pursue this creative outlet.

By the way the IDE or Integrated Development Environment that I have chosen to start with is PyCharms and the community version is free. I have heard of other good IDE’s namely Spyder, Eclipse, and a few others but I went with PyCharms because of the compatibility with multiple operating systems and ease of use. While I am learning Python I am also learning Linux, specifically Ubuntu 12.04 LTS, at the same time. I used to question why anyone would try to learn Linux when they could stick with the OS they know such as Windows or OS X. It took me about one week with the book The Linux Command Line to get on my feet walking. I will never willingly buy another Mac or Windows OS again. The first advantage I came across were two simple command line instructions in Linux called “sudo apt-get update” and “sudo apt-get upgrade”. In Windows or Mac OS X one must manually update Flash, Safari, Word, etc… one by one on a weekly if not daily basis. In Linux “apt-get update” grabs the newest updates from repositories and “apt-get upgrade” updates all your software. I am pretty pleases with Ubuntu so far and it is my preferred OS for getting work done.

Quantitative Analysis Competition: Kaggle

Solar_photovoltaic

An online competition called http://www.Kaggle.com has emerged as a way for companies to post large data sets and ask the world wide web to create algorithms to make sense of this data. I will be utilizing R, Octave, and Python to compete in the AMS 2013-2014 Solar Energy Prediction Contest. The goal of this contest is to utilize NOAA/ESLR weather data to better predict solar output from various solar panels in Oklahoma. I am currently learning Machine Learning through the Stanford Coursera Course taught by Andrew Ng. The reason I am learning Machine Learning is because often in data analysis we want to answer the question “is there hidden structure in this large data set?” and “are there patterns and correlations buried in the data?”. Machine Learning becomes especially useful when the number of variables or features is very large, so large that the time to pre-process and selectively test for correlations would take a lifetime to complete. I hope to improve my ability to quickly prototype statistical models and algorithms using Machine Learning in this solar competition.