Personal salvation

It’s Lent in the majority of the Christian world. The season between Christmas and Easter is the mirror of the long academic slog between the beginning of the semester and Spring Break: the focus is not on joy but repentance. I read an article that shared pain brings people together and makes more effective teams: maybe my students will take heart in that.

But I’m writing in this blog that no one reads because I’m troubled by Lenten reflections. I found She Reads Truth, an organization that combines daily Bible reading with beautiful design. With each reading, a writer reflects on her life today and tries to apply and illuminate the text through the lens of Lent. I enjoy reading these: I like the little reflection on bigger things in the morning. But as I read Lamentations, I can only think of eastern Ukraine. Syria. Palestine, some days. Iraq.

11 All her people groan
    as they search for bread;
they barter their treasures for food
    to keep themselves alive.
“Look, Lord, and consider,
    for I am despised.”

People really are trading their treasures for food in these places and others. The scene of bombed-out desolation depicted is not some past memory for many of our contemporaries.

Listen, all you peoples;
    look on my suffering.
My young men and young women
    have gone into exile.

Due to my recent travels I think of the drug war in Michoacan. Severed heads along the road. Violence against teachers. I asked what young people do for work down there. “Go north.”

19 “I called to my allies
    but they betrayed me.
My priests and my elders
    perished in the city
while they searched for food
    to keep themselves alive.

And after all that — the vision of destruction, the news stories flashing past my eyes, the radio documentaries about starving grannies echoing in my ear — the call to repentance is to be a better person.

A better person?

We spend a lot of time on self-improvement. I love self-improvement! It’s fun, productive, challenging, interesting. But does it distract us from the greater task of improving our communities and our world?

Setting up postgres on my mac

Trying to set up PostgresQL on my Mac. Why? I want to use a key-value pair as an entry in my database, for convenience. It’ll save me from using three or four weirdly interlocked tables. SQLite3 can’t do it.

Here’s the story:

  • I am using RubyMine. Using the pg gem, I started a new clean project and pressed some buttons on the RubyMine setup screen to configure the project with Postgres as the database.
  • Not working. Not surprising, but it was worth checking!
  • Entering psql on command line gives the following error:

psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/var/pgsql_socket/.s.PGSQL.5432”?

  • I know I have Postgres installed. Socket issue? Do I even know these words?
  • Search through internets.
  • Apparently “reading directions” is still an important life skill. I installed Postgres using brew because the version packed with Apple is out of date already. When you type “brew install postgresql” a cascade of text appears. Often I have found that this material is unimportant to my life. Not this time! It includes crucial instructions, like how to start your new version of postgres. Typing “postgres -D /usr/local/var/postgres” at the terminal got a mysterious process started: now the server is running locally.
  • Then I went back to RubyMine and tried to set up my stuff. Couldn’t create the databases with “rake db:create”; while I was running postgres locally I still wasn’t creating connections on the right sockets with my Rails app. Aha: here’s where adding “host: localhost” to both development and test environments in config/database.yml came in handy. Once I had specified the host for both, the databases got created. RubyMine made happy faces and my terminal window informed me that “STATEMENT: CREATE DATABASE” action was happening.
  • Now I’m in business: created a migration to enable extension hstore, created a model using hstore, and proceeding toward a more flexible data model.

Ruby on Rails adventures

I’m learning a bit about Ruby on Rails. It’s fun. But this afternoon I looked around for a simple way to put a slider into a form. I found some jQuery sliders. I did lots of stuff: learned how to convert Javascript to Coffeescript the lazy automated way, learned something about putting labels on this jQuery slider, this, that, other. And I couldn’t get my page to save the output of the slider. And while looking up how to do that, I discovered range_field. The slider’s already built in to Ruby on Rails, and in a better way than this silly jQuery slider, and it worked right away.

How do we learn these things at the beginning? I looked up sliders in forms and there are apparently a lot of people building Javascript sliders for Ruby on Rails apps when half the time it’s there already!