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.
I am starting to think I am at a crossroads in my career. I love coding, and more specifically I love solving problems with technology. I love the team I a m on and the role I play on that team. When I think about where I want to be in 5, 10 or even 20 years down the road I can't see myself in engineering. The ladder in engineering still goes higher than the rung I am currently on, but it climbs up to the rooftop of a building I don't want to be on. The engineering ladder leads to senior engineers, lead engineers, and engineering managers. It's still all engineering, and I want to keep learning m ore about the process, more about marketing, more about sales, and more about finance. More importantly, I hate the fact that I have very little strategic in put on our product or what I am building. The problem is in order to change ladders I will have to give up coding. Maybe I am ready to do that maybe I am not , but the opportunity to jump to another ladder is opening up now.
At my company several Product Management jobs are opening up at various points this year and it is making me consider making a switch. Product Management gives me the opportunity to work with engineering, but also with sales, marketing , and finance. The Product Management ladder is different then the engineering ladder in that it forks off in many directions instead of going straight up. This means that I could go a number of different directions as I climb, and in 20 years I can really be anywhere in the organization (except for m aybe HR, fine by me). The best part of a jump to product management is that I still get to solve problems with technology, and that could ease the pain of quitting coding cold turkey. Have any of you faced similar crossroads? I would love to hear some thoughts in the comments.
The problem is that sulia pays the content creators for clicks, and that tempts the creators to post everything on sulia and simply post a link to sulia on twitter. I hate twitlonger links in my feed as well. I would prefer a 140 character teaser with a link to a blog in the tweet, because I mostly use a mobile device fo r twitter consumption. The worst behavior is when the journalist posts a short statement (less than 140 characters) and a link to their blog on su lia, and then tweets a teaser with a link to sulia. THIS IS A HORRIBLE THING TO DO TO YOUR READERS. Unfortunately, many of my favorite journalist (Denverpost.com I am talking to you) do the double link sulia post several times a day. I want to reply to all sulia tweets begging for them to stop, but I respect these writers and don't want to be rude. How can they use sulia more effectively?
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.
All that changed last January when my first child was born. The though of anything happening to my son, not matter the odds, scares the living shit out of me. It is irrational, illogical, paralyzing and uncontrollable. I also now worry more about myself because the thought of leaving my son without a father scares me as well. This last week the fear and emotion have hit an all time high because of the horrible story that is unfolding in my backyard. There is a triangle of key locations in the case that I spend most of my days within. In fact, last Friday just an hour or so after the kidnapping, I was at the dog park with my two golden retrievers, less than a mile from where she disappeared from.
Two nights ago when a body was discovered, near our house, I couldn't sleep. My wife and I started discussing how we would try and protect our son from this type of danger. The though of something like this happening to our son is paralyzing, no matter how statistically unlikely! This is the part of becoming a parent that nobody warns you about. Everyone tells you about the joy (which is true) and how it changes your life (very true), but nobody said one word about the all-consuming fear. My normal defense, logic, has no chance against this new brand of anxiety.
I hope and pray that the monster in my backyard is captured and brought to justice!
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.
Recently my wife and I made the decision to have her stay at home with our 8 month old son, Chase. My wife had a good career going, but she worked for a bad company that was getting worse. Initially after Chase was born she decided to go back to work and we put Chase in day care. As time went by and her company got worse and worse, the decision to stay home became easier and easier. Eventually, after a bad day, she decided she would rather be at home then put up with it.
This was a big decision, it changes our lifestyle considerably. We will have stick to a tight budget which will be new for us both (no more daily Starbucks trips for me!). My wife also wonders if she will be able to jump right back into her career when she is ready to go back, and she worries that the house may become her prison (especially in the winter). However, we have no doubt this was the right choice
This is a big change, but I wanted to write more about the companies we both work(ed) for. I work for an amazing company in the software industry, we are ran like typical Silicon Valley startups, we have amazing leadership, and fantastic perks like unlimited vacation. My company values intelligent, hard-working people and puts the employees first, that's why they always rank in best workplace surveys. My wife's old company, on the other, hand is the complete opposite. They are a manufacturing company who's leadership seems to operate under the "you should be happy to have a job in this economy" mantra. The office employees and line employees are segregated like the mostly immigrant line workers are second-class citizens. Most people there don't care about the company, they only care about their paycheck because the company only cares about the bottom line.
I believe when companies put their employees first, those employees will buy in and work their ass off for their employer. I do everyday because I love going to work. These companies give better customer service because their employees have pride in their brand. Just look at the correlation of these two articles "americas happiest workplaces" and "customer service hall of fame", is it a coincidence that Hilton and Google are at the top of both? I don't believe so.
I also dont believe that this is a tech industry thing, even though I considered it. There were many non-tech companies in the lists I linked to above, there are also several here in this 2012 Denver Post survey. If you are good at your job, work hard, and are a good teammate you deserve to work for a place that values their employees, despite the position and despite the economy! Why don't more employers get it? What do you think?
For years I have been hearing about the death of PHP, and I have ignored it. I bought a Rails cookbook a few years ago, but never even opened it. Now, as I write more code in other languages, I see how PHP enables my bad habits. My code get's uglier and uglier as a script ages. I have used MVC frameworks with PHP like Code Ignitor and Zend and they do force better habits, but I really hate singletons. I also just want to learn something new. So I can't ignore it anymore, people and startups are moving away from PHP and are using newer, sexier frameworks.