Finding Spanish words with Wikipedia and Wiktionary

There aren’t many language translation resources in open source, creative commons, or public domain. I was thinking about how I might start one and remembered that the English Wiktionary has many Spanish words. However, they are only linked in one direction, from the Spanish word to the English word.

How to find the Spanish word? One way is Spanish Wikipedia. For instance on the Instrumentos musicales por clasificación page, there are these words, which are on the English Wiktionary with the corresponding English words:

It seems like this could be used to bootstrap an open source translation dictionary.

Using environment variables to avoid .gitignore bloat

After setting up some Heroku addons I got used to using environment variables to specify add-on settings. I then started using them for non-addon settings, and now I’ve started using them outside of Heroku a bit too.

One area where they work well is for a Heroku-deployable open source app with OmniAuth GitHub OAuth integration. Here is an example initializer (config/initializers/omniauth.rb) from a RailsCast:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :github, 'CLIENT_KEY', 'CLIENT_SECRET'
end

I would replace CLIENT_KEY and CLIENT_SECRET with my own keys, but I can’t commit them to a public repository, or else another person could use them and I could be held responsible. Rather than leave out my client key and secret using a .gitignore and a sample config, I can use an environment variable:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :github, ENV['GITHUB_CLIENT_KEY'], ENV['GITHUB_CLIENT_SECRET']
end

With a note in the README about the environment variables used, this should be easy for developers to set this up on their own private apps.

So far I’ve been typing environment variables into the command line when running apps locally and on my VPS, but that’s about to change. I may specify them in my nginx config, which is backed up to a private git repo. I’m not sure yet. Also I’m going to dump out my Heroku environment variables and back them up too.

Repositoryomniauth

keeping up on the new

From time to time I’ve been recording voice memos. I find them to be valuable both when I record them, because I explore thoughts in a different way, and later, when I listen to them. It’s a convenient sort of diary for me. Here’s a snippet from a voice memo I recorded while I was driving from the Raleigh-Durham International Airport to the coast in a rental car, thinking about what I had just resolved to do, which was to learn things in depth, rather than just read web development news:

So, who shall I learn from? I guess, it doesn’t matter that much. What matters is that I learn, that I stick to learning, that I spend my time on real learning and that I don’t get lured into the kind of learning that isn’t that important. Now, it doesn’t help me to read Hacker News, and to poke around into every little thing that comes out…because, it’s rare that I learn about what comes out enough to use it on something, so what value am I getting out of it? Not much. And…it’s real easy to do that, because I’ve been lured into the idea that being a successful programmer is mostly about keeping up on learning everything new—not missing anything.

One poignant memory I have of not really learning something is when I read about rip on twitter. I went nuts about it, and I thought it was really cool that I had twitter and Hacker News so I could hear about it right away. Then, a couple of weeks later, I realized that I had done absolutely nothing besides read the article. I hadn’t even installed it. Meanwhile, in those same couple of weeks, I had spent maybe an hour a day reading articles I found on HN and twitter. I was really busy when I realized this, so I didn’t immediately go out and try it. Chances are, if I had any problems that could have been solved by rip, my knowledge of it would have got me nowhere. Because I hadn’t used it, I forgot almost everything in the article about it, except that rip is like virtualenv for ruby.

Now, a new one has surfaced: Node.js. I read some early articles about Node.js. I’ve downloaded it. I’ve even ran a couple of demos. But what I haven’t done is build anything with it. Now, everyone knows about Node.js, and many of the people who don’t pay attention to new developments like I did, know Node.js, while I don’t. What’s more, people who have been more proactive about learning and participating in open source projects, have people from other communities begging them to try Node.js. I’ve seen it happen. It seems that the information networks of those who genuinely participate in open source are fine without HN or twitter (though they may be enhanced by them).