Display your World of Warcraft character, or any other data your Ruby site!

Wowr provides a Ruby interface to the data in the World of Warcraft Armory, allowing developers to query World of Warcraft items, characters, guilds using simple Ruby!

Have you ever thought "I levelled up!" when you learnt something new? With LifeXP you can show your friends when you gain experience in your favourite skills.

どんどん vs だんだん, ますます

I was presented with this example sentence in a JLPT1 book.

「聞いたそばから、__覚えていくとは、彼の記憶力は抜群だ。」

a) どんどん b) だんだん c) ゆっくり

I was kind of stumped as I knew that ゆっくり meant slow, but didn't know the difference between どんどん and だんだん. Thankfully スイカさん explained it to me like this:

  • どんどん is faster than だんだん.
  • どんどん is about the thing itself increasing (therefore faster).
  • だんだん has an emphasis on time passing (therefore slower).

More...

Japanese Nuances

Comparisons

I often come across words in Anki that seem very similar, and I have a hard time remembering which kanji is associated with two seemingly identical descriptions. To clear up the different nuances I asked some Japanese friends (thanks Genさん and other 2ch-ers).

拒絶 vs 辞退

拒絶 is stronger, more severe. “No way in hell.” kind of feeling.

辞退 is relatively soft. The answer is no, but there’s a reason behind it.

逃げる vs 逃れる

逃げる 人から逃げる  You run away from a person.

逃れる 災いから逃れる You flee from a disaster.

I’m still not 100% sure about this difference.

More...

attr_protected and Foreign Keys

Say you have a site that allows users to create favourites, and a favourite is composed of a url and a user_id. How is it best to stop users trying to add favourites to other people's accounts? I know this seems like an unlikely scenario but I think it's a point that highlights other security issues.

One approach I thought about was using attrprotected :userid, which I think would do the job, but am I missing something about the way Rails works?

As always, I'd appreciate any thoughts.

More...

Learn from Existing Code: Typo

2007/09/06 03:29

6 comments

I find it really useful to learn from example code and look through existing applications to see how they tick. I came across Typo a while ago, but didn't really think much of it as I planned to write my own blog for practice. It occurred to me the other day that as Ruby is an interpreted language, I could look at the source code of free apps like Typo.

More...

Caching in Rails

Caching in Rails is kind of like C++, if you know what you're doing it's possible to make a small elegant solution, but if you get it wrong then god help you when you try to work out what's going on.

There are plenty of tutorials online and sections in books that go into the basics of caching and some of the finer points, but here are some particular problems I encountered.

More...