I decided to stop developing features this week.
It’s something that I felt needed to happen. I’m rapidly losing sense of any sort of good code organization, and I also quickly realized that using Django and Python had no advantages for me.
It was nice to have an ORM so that I didn’t need to write SQL to use Postgres and Heroku and take advantage of that deployment stack, but I didn’t need one because my data isn’t relational at all; my choice of database was essentially wrong.
When I realized I didn’t need the ORM, I started questioning what other parts of the framework did I need. The URL mapping? Go can do that for me. The templates? Go can do that for me. The ability to use a cool language? Go can definitely do that for me.
What did I use Heroku for, the capacity to easily scale with more requests? Go can do that (I’ve heard).
I was using old, safe tools instead of learning about the future during my spare time. That’s always a bad choice. So I switched to using Go and its library. I rewrote the public query handling in <50 lines, switched to Mongo and mgo as my driver, and suddenly I’m off the ground again.
WIthin a few days everything should be moved over.
It took a bit more out of me to keep consistently developing this week. It wasn’t Spring Break, so I had classes getting in the way of what’s actually important: programming.
The most major change is that it now scrapes data from Al Jazeera as well as The Guardian and The New York Times. I did a lot of refactoring to make it match pep-8 (though I haven’t been able to get SublimeLinter working in order to make that even easier), as well as fixing my poorly separated concerns.
I originally had all of my logic in the same directory. Now the scrapers have their own Django app, and the display has its own Django app. This should definitely help when I’m expanding, and while more work needs to be put into DRY being violated up and down in the scrapers, I think I’m going to leave that for this week’s round of fixes.
That and adding the BBC, or that and turning this all into a heatmap instead of overcrowded markers are my goals for this week.
Should I do this before or after my midterm? Hmm…
I tried to write a long rambling post about how shocked I am how easy it is to get something off of the ground because of
but really in the end it’s easy because I’m trying. Building something on my own isn’t hard because I know what I’m doing, not because I chose good tools. It’s simple because I decided to apply myself towards the first coding project I care even a modicum about since my freshman year of college.
And boy is it fun.
v 0.0.1 (definitely not even a minor release yet is what I’m trying to communicate with that number) is live here.
This is my second shot at keeping a blog. Sorry about the three posts that have gone missing. They’re lost but to the Google-cache gods.
I’ve recently accepted a position at Livestream for the summer, and I’ve been getting more and more into trying to see what I can build from scratch. My first go at building something was a basic news aggregator works alright, except for it being completely hackneyed and hacked together.
My second shot at this is going to be built using Django. I’ve been meaning to learn a web framework for a long time, and since just about everybody I know uses Rails, the choice to use Django wasn’t taken lightly. I did my homework, and it seems to really come down to a larger holy war than Rails-Django: Ruby-Python. I sit on the Python side of the fence, so I’m sticking with Django. I’m not sure how some of the features of Django are going to be necessary for my project, but we’ll see how it goes.
Spring break will be a hackathon for me.