TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Issues faced by Ruby Beginners

28 点作者 satling超过 15 年前
Chris Strom on the most common "issues" faced by Ruby beginners.

3 条评论

benofsky超过 15 年前
I think Matz or some well known and respected "rubyist" needs to write a Ruby equivalent of Python's Pep 8 (there are some style guides out there on the internet but are mostly written in the "someone might disagree with me so here are 5 options for doing x" style) as there are a lot of stylistic things which ruby beginners always get slammed with.<p>For example, blocks or pseudo named paramaters with hashes are in no official documentation (that I've found) recommended (or discouraged) over other methods but a "rubyist" will often question a beginner over their use of x, y or z.<p>Edit: clarification, spelling and grammar.
评论 #903368 未加载
评论 #905008 未加载
omouse超过 15 年前
Enumerable should read as 'iterator' and Smalltalk provides for and while loops (though implemented differently) because they're useful.<p>The chaining isn't actually chaining. He really should know what the evaluation order is. This is why it would be nice for people to read SICP, it has a section on it: <a href="http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-10.html#%_sec_Temp_22" rel="nofollow">http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-10.html...</a><p>It would be much easier to learn Smalltalk than to deal with Ruby's weird syntax shit and it's blocks/procs crap.
评论 #903852 未加载
petesalty超过 15 年前
When I was learning Ruby an exercise I'd put myself through was to solve a problem as best I could - that might have involved using a while loop for example. Then I'd iterate over the problem, Rubyifying it as much as I could. Sometimes I'd get stuck and have to ask for help, and sometimes I'd just spend hours getting it wrong, but it really helped me understand the nuances of Ruby. I actually still do this from time to time to keep my hand in, and I usually end up learning something new.