Category Archives: Uncategorized

Why so difficult?

Writing fiction is hard.

For every essay, for every poem, for every journal entry I ever sat down to write, I at least had some semblance of a plan. Sitting down to write fiction requires no such plan — and that is why it is so hard.

There are plenty of outlines, plenty of vague ideas, plenty of zany plotlines I could write out first that might inform my attempts at writing fiction. But ultimately, I still need to sit there and will it from nothing. This is not the simple task it seems.

The roadblock I keep running into is not getting an idea started, or even starting to write. Writing is actually pretty easy to get started on once I convince myself to just do it. The thing I’m having so much trouble with is writing something down that I really care about.

When I choose some memory to write about, I’m immediately invested in trying to convey the way I felt during that memory. I feel it. I want to get it on paper. When I try to make something up, it all feels hollow and weird. If I can’t make myself care about it, how could I possibly expect you, the reader, to care about it? Even worse is that it starts to bore me. Me! The guy writing it!

There must be a way to get past this. For now I will keep trying to write. I will keep experimenting with taking my own experiences and shifting them a bit to make them fiction. I suppose I should try to outline plot a bit, too — maybe that would give me some grounding.

Python starting point

Since I posted the previous post about Django, I was reminded that I wanted to link to a post about setting up a Python project in a sane way. I’ve used this approach for all my little toy projects, and it really works well (particularly using virtualenv).

Mostly, I always have to remember a way to Google for Jeff’s blog, so with any luck posting it here will help me remember.

The cliffnotes are:

  • install virtualenv/set up virtualenv
  • setup Django in the virtualenv
  • start a new Django project
  • set up a new Git repo for the project
  • change the settings to have three sets of installed apps instead of one
  • use fabric for deployment (I haven’t gotten this far yet)

Django and Angular Tutorial

A little while ago, I was trying to build an app using Django on the server side, and some interactive Javascript on the client side. On the surface, it seemed simple, but you end up with this strange disconnect between what you are writing in Python and what you are using in Javascript.

To make matters more complicated, the Javascript is “static” in the Python, and the Python is “static” in the Javascript. What I mean is, you have to build your Javascript independently of the server code, and then go back and deconstruct it to fit in the Django templates.

Needless to say,  I got pretty confused. And my ambition fizzled.

Which is why I was super psyched to see this article about getting Django and Angular.js to communicate with each other. It also helps to see someone list out the concepts as they describe them — I didn’t realize that writing the data out into the HTML document as JSON was called “serializing” for example — but I now know what to Google for.

I want to set up a much simpler version of this, which just takes some data from MySQL, serializes it in Django, loads a Django template and then builds the page with Angular. One dataset, one D3 graphic, stitched together with Angular. Seems like it should be possible with this tutorial!