In 2014, my career went a new direction. I wasn't sure that I wanted to give up programming and become a manager. In fact, a few years back I was more interested in Product Management than People Management. However, 6 months in I feel engaged and love this new role.
For awhile I have wanted to start doing more with my Raspberry Pi than just XBMC. So I decided to build a wireless temperature sensor to monitor the temperature in my kids' rooms.
Part 1 Continued - Saving to mongodb
I decided to build an online course aggregator and introduced the project in this post, and last week I started part 1 explaining the backend and creating the first provider class for coursera. This post I will dive into the storage engines, initially I created two storage engines; mongodb and postgres using sql alchemy.
Part 1 - Creating a python based backend
I decided to build an online course aggregator and introduced the project in this post. This post is part 1 of the series and I will break down how I build the backend aggregation framework. The whole point of this project is to build a full stack application as both a learning exercise and an in-depth blogging topic.
MOOCs are Massive Open Online Courses, and I have had the time to take a few of them. These courses have probably been the best college courses I have taken of any kind, in terms of how much I learned and have been able to apply to my day to day work. This makes sense as I have been able to pick courses that interest me or apply specifically to my job versus my normal course work where the college decides what I need. The other reason they have been great is because they are provided by some of the best universities or professors in that topic.
My VPS service from myhosting.com is up for renewal, and honestly it isn't worth the money anymore. I only use it for my blog, and it has been a year since I have posted anything. I also used to host other websites and my private github repos, but now I have a paid github account and no longer host those websites. I can also spin up an Amazon server if I need to play with around with the cloud. Github will host static html sites for free and allows for custom domains. The problem is a blog is dynamic, but that is where Jekyll comes in.
A few months back I posted that I wanted to away from PHP for web development and started learning some of the major MVC web development frameworks. The first one I tried was Pyramid, and I wrote about creating a blog engine with Pyramid and MongoDB. This was an awesome experience and I loved using it, so next I wanted to try using Django.
You can find many good comparisons on the web. So these are my thoughts after build a blog engine in both systems. Getting started with Django was quicker and easier than with Pyramid because it had everything built in and had much better documentation and tutorials. I loved the kitchen sink manage.py utility vs several Pyramid commands like pserve and pcreate. Also the settings.py was easier and had a better structure than Pyramid's ini files.
In my previous post about creating a blog with Pyramid, I mentioned that I really didn't like Chameleon or Mako (To be fair I never really tried Mako; I just read through the documentation trying to understand how to perform inheritance) templates. A commenter(thanks Matt) suggested I give Jinja2 a try. Some of my gripes (or my lack of understanding) about the those template engines were:
- I couldn't find an easy way to break my templates into various pieces like header, footer, sidebar etc. Then have a layout template that pulls them in, and lastly inserts my individual view on top of that portion of the template.
- The syntax should be easy and I believe template portions of your markup should stand out from the static markup.
- I don't have any concern over speed or jython compatibility and this seems to be a major focus for chameleon.
Chameleon uses a macro language called METAL and it adds a bunch of extra markup to your document and making it less clear over which parts were part of the template and which were static. This became apparent when I was retrofitting my templates to Jinja2 and ripping out the chameleon parts, I kept finding remains of the chameleon templates after I had made the switch.
In my previous post I explained that I wanted to explore new non-php web development frameworks like Rails and Django. So I decided to build a blog engine with each of them and see which framework felt the best. I also decided that if I am going to embark on a relatively time consuming learning project, that I wanted to expand my scope and experiment with Twitter Bootstrap and MongoDB as well.
I have used Python several times in the past, and have never touched Ruby outside of a Hello World rails tutorial. I also have some peers that hate rails (even though they like Ruby), so I decided to start on the Python side of the fence. After some research and discussion with peers I decided to start with Pyramid rather than Django.
Pyramid seems to provide more flexibility when break ingaway from the convention, and considering I wanted to use Mongo instead of SQL this felt like a great place to start. After completing this exercise I found that I really enjoyed working with Pyramid(and Mongo), so much so that I pushed my code to my VPS and went public with my blog. This also delayed my Django and Rails trails as I had to prepare to deploy a production version of my Pyramid site. I will start the Rails version soon, but for now here are the steps I took to create the Pyramid version.