You are probably trolling, but just the same, I don't like it when people get downvoted without explanation. Ergonomically speaking, count the number of characters that need to be input by holding the shift key, and that will tell you which is simpler to type.
edit: Well when I started replying, you were well into the light grey and with no reply.
Re:Ask HN: State of Django vs. Rails?
by sergiotapia on Tuesday February 19, 2013 @07:18PM
(#5248114)
Just because you do not agree does not mean I'm trolling. Don't do that here on HN.
I didn't mean it as an insult. But when you make a statement then provide an example that contradicts it, that's usually a troll move. Ergonomically speaking, the example you provided is easier to type for Django than Rails. Again, didn't mean to offend.
I don't agree with your point or its opposite, but the example you give seems like it is at odds with your observations on brevity and symbol usage.
Re:Ask HN: State of Django vs. Rails?
by FireBeyond on Tuesday February 19, 2013 @07:30PM
(#5248167)
"Fewer keystrokes"
Your example, Ruby has 26% more characters (194 vs 154).
"I found that they make heavy usage of symbols such as [, ] in code."
Your example, 3 sets of parentheses, 4 equal signs, 4 underscores, one colon in Python.
In Rails, 2 sets of braces, 4 assignment operators (=>), 10 colons, 4 underscores and a <.
I guess I'm not seeing either the brevity or heavier use of symbols in your example...
Re:Ask HN: State of Django vs. Rails?
by guoxiaotian on Tuesday February 19, 2013 @07:14PM
(#5248090)
with Ruby 1.9 you don't need the '=>' for hash values:
class Person < ActiveRecord::Base
attr_accessible :first_name, :last_name
validates :first_name, length: { maximum: 30 }
validates :last_name, length: { maximum: 30 }
end
Re:Ask HN: State of Django vs. Rails?
by LeonidasXIV on Tuesday February 19, 2013 @07:47PM
(#5248229)
This is kinda funny, because your example is full of : which is even more annoying to type than ,
If you have a shit keyboard, treat yourself to a nice one, I bought a mechanical one for 50€ and it is pretty damn good and I plan to keep it forever.
I like Ruby's terseness. Fewer keystrokes is a win for me, especially when you have a shit keyboard (pardon my french).
Django feels very CakePHP-y, if that makes any sense?
QUICK DUMB EXAMPLE:
Django:
Rails: ---Which is simpler to type, ergonomically speaking?