• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ruby on rails_Ruby,Rails和冒名顶替综合症,作者Glenn Goodrich

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

ruby on rails

In this episode of the Versioning Show, Tim and David are joined by Glenn Goodrich, aka Ruprict, a developer by day and SitePoint’s Ruby Channel editor by night. They discuss the benefits of Ruby, building websites with Rails, the confusion between languages and frameworks, writing articles, dealing with impostor syndrome, whether or not Turbolinks are cool, and the story behind that intriguing nickname.

在Versioning Show的这一集中,Tim和David与Glenn Goodrich(又名Ruprict)(白天为开发人员,而SitePoint的Ruby Channel编辑器为夜间)一起加入了会议。 他们讨论了Ruby的好处,使用Rails构建网站,语言和框架之间的混乱,撰写文章,处理冒名顶替综合症,Turbolinks是否很酷以及这个有趣的绰号背后的故事。

显示笔记 (Show Notes)

对话重点 (Conversation Highlights)

I like how Ruby implemented the objected-oriented aspects of its language. It’s not a perfect language, but none of them are. But for a lot of jobs, it’s the right tool. You can get a lot done very quickly.

我喜欢Ruby如何实现其语言的面向对象方面。 这不是一种完美的语言,但都不是完美的语言。 但是对于很多工作来说,这是正确的工具。 您可以很快完成很多工作。



Using something like Go, you can get the job done and you’re using the right tool for the job. I would strongly suggest learning other languages. Although I can’t really recommend PHP. Sorry. :p

使用Go之类的工具,您可以完成工作,并且正在使用正确的工具来完成工作。 我强烈建议学习其他语言。 虽然我不能真正推荐PHP。 抱歉。 :p



You can be productive in Rails, and get a site up, and now know Ruby very well. There are Rubyists that get really mad when you say things like that, but it’s true. It is how I came to Ruby. I started doing websites in Rails. For the longest time, I had no idea if it was Rails or Ruby.

您可以在Rails中提高工作效率,并建立一个站点,现在对Ruby非常了解。 当您这样说时,有些Ruby主义者会非常生气,但这是事实。 这就是我来到Ruby的方式。 我开始在Rails中创建网站。 在最长的时间内,我不知道它是Rails还是Ruby。



Even today, people will say, Are you using Rails to write your programming? I’m like, Rails isn’t the language, but they all think it’s the language. In fact, in the book, I actually do a couple of paragraphs and I’m like, Say this out loud. Ruby is a language. Rails is the framework.

甚至在今天,人们还会说, 您是否正在使用Rails来编写程序? 我想, Rails不是语言,但他们都认为这是语言。 实际上,在书中,我实际上做了几个段落,我想大声说出来。 Ruby是一种语言。 Rails是框架。



I’ve learned over my long, long programming career that I don’t know everything and certainly don’t know anything about languages I don’t use. For example, I’ve used Python just a little bit, and I do not like the whitespace. I don’t like it, and I will joke around about it, but I understand why people like Python. It’s fast. The syntax is similar to Ruby. It’s easy to read. It has a lot of the same advantages of Ruby. I don’t like it. Other people like it.

在漫长的编程生涯中,我了解到我并不了解一切,当然也对我不使用的语言一无所知。 例如,我只使用了Python一点,而且我不喜欢空白。 我不喜欢它,我会开玩笑,但是我理解为什么人们喜欢Python。 它很快。 语法类似于Ruby。 很容易阅读。 它具有与Ruby相同的许多优点。 我不喜欢 其他人喜欢它。



If they can be productive in that and get their job done, then I don’t care if you’re using QuickBASIC … which I did use a long time ago. I’m not a zealot. I’m not a you-have-to-do-what-I-do person. There are too many smart people doing things that either I wouldn’t do or don’t know anything about to shut them out without my having experienced it. I guess it’s like I haven’t walked in their shoes, so I’m not going to rip them down or rip down what they’re doing.

如果他们可以在其中有所作为并完成他们的工作,那么我不在乎您是否正在使用QuickBASIC……我早就使用过。 我不是狂热者。 我不是一个要做我要做的人。 没有我的经验,有太多聪明的人在做我不会做或不知道将他们拒之门外的事情。 我想这就像我还没有走过他们的鞋子一样,所以我不会撕裂他们或正在撕毁他们的工作。



It is funny to think that, because I commented on a post, I ended up getting this part-time gig that I’ve been doing for five years now. It’s really changed my career. A silly comment really ended up changing my career and turning it much more quickly towards Ruby as a profession than it probably would’ve been otherwise.

有趣的是,因为我在一篇帖子中发表了评论,所以最终得到了我已经从事五年的兼职演出。 这真的改变了我的职业生涯。 愚蠢的评论确实最终改变了我的职业生涯,并且使它比以前可能更快地转向了Ruby这一职业。



He goes, We’re going to release all your things as a book. I said, Don’t do that. He goes, Why? I go, Because” … Do you know what impostor syndrome is? … I said,Don’t do that. Don’t release those things as a book. I’m just going to get mocked.He goes,Write a preface for it.My entire preface for that book is what I would have done differently. I’m guessing anyone that got that book was like,I can’t wait to read … Oh! God …"

他说, 我们将把您所有的东西以书的形式发布。 我说, 不要那样做。 他走了, 为什么? 我走了, 因为”……您知道什么是冒名顶替综合症吗? …我说,不要那样做。 不要把那些东西当成书来发行。 我只会被嘲笑。 他走了,为此写一个序言。 这本书的整个序言是我本来会做的不同的事情。 我猜得到那本书的人就像,我迫不及待地想读……哦! 上帝……”



I think [the Ruby community is] probably just about the best programming community out there. Go has a great community. The Node community has grown up quite a bit. When it started, it was not good. It was very, very contentious and angry. I actually remember posting in the Google group for Node when it was just a few people and saying, You guys need to work this out, because you’re all angry to each other and angry at everybody else. They did. Node community is just fine now.

我认为[Ruby社区]可能只是那里最好的编程社区。 Go有一个很棒的社区。 Node社区已经成长了很多。 当它开始时,它并不好。 那是非常非常有争议的和愤怒的。 其实我记得张贴在谷歌组节点中时,这只是几个人,说, 你们要工作了这一点,因为你所有的愤怒,彼此生气的其他人。 他们做到了。 Node社区现在很好。

成绩单 (Transcript)

Tim:
蒂姆:

Hey, what’s up, everybody? This is Tim Evko …

嘿,大家好吗? 这是Tim Evko…

David:
大卫:

… and this is M. David Green …

…这是大卫·格林(M. David Green)…

Tim:
蒂姆:

… and you’re listening to episode number 19 of the Versioning Podcast.

…,您正在收听Versioning Podcast的第19集。

David:
大卫:

This is a place where we get together to discuss the industry of the web from development to design, with some of the people making it happen today and planning where it’s headed in the next version.

在这里,我们可以聚在一起讨论从开发到设计的网络行业,其中一些人将其付诸实践,并计划下一个版本的发展方向。

Tim:
蒂姆:

Today, we are talking with Glenn Goodrich. We have a number of excellent things we’re going to talk about, including — I think we’ve been told there is something about a book. So we’re probably going to talk a little bit about that. We’re going to talk about the web as usual. So let’s go ahead and get this version started.

今天,我们正在与格伦·古德里奇交谈。 我们将要讨论许多很棒的事情,包括-我想我们已经被告知有一本书。 因此,我们可能要谈一点。 我们将像往常一样谈论网络。 因此,让我们开始安装该版本。



Glenn, thank you so much for joining us today. How are you doing?

格伦,非常感谢您今天加入我们。 你好吗?

Glenn:
格伦:

Great. Thanks for having me.

大。 感谢您的款待。

David:
大卫:

I’m really excited to meet you. It’s great to have somebody talking about Ruby. Ruby has been a long-standing member of the web community, and it still has a great deal of validity now, in 2016, and going forward. I’m looking forward to hearing more about that from you.

很高兴见到你。 有人在谈论Ruby真是太好了。 Ruby一直是Web社区的长期成员,现在,2016年以及以后,它仍然具有很大的有效性。 我期待收到您的更多信息。

Glenn:
格伦:

Yeah. In fact, I just wrote a blog post on why in 2016 Rails and Ruby are still very, very relevant and very, very much worth learning.

是的 实际上,我刚刚写了一篇博客文章,介绍了为什么在2016年Rails和Ruby仍然非常,非常相关且非常非常值得学习。

David:
大卫:

I’m glad your mind is going in a philosophical direction, because we usually start the show with a philosophical question for our guests. Your philosophical question for today is: in your current career, what version are you, and why?

我很高兴您的想法朝着哲学的方向发展,因为我们通常会在节目开始时向客人提出一个哲学问题。 您今天的哲学问题是:您目前的职业是什么版本,为什么?

Glenn:
格伦:

Oh, God. I hope I’m not the last version of me. I’ve been doing this a long time, so I’m probably well past version 1. Maybe, let’s say version 9.8. The reason I say that is because maybe version 10 is where I’m going to be like perfect. Maybe 9.8. Maybe 9.5, or least, before I switch to another versioning numbering scheme — meaning I learned something new. I hope that answers it.

天啊。 我希望我不是我的最后一个版本。 我已经做了很长时间了,所以我可能已经过了版本1。也许,比如说9.8。 我之所以这么说是因为,也许版本10会让我变得完美。 也许是9.8。 在切换到另一个版本编号方案之前,可能至少是9.5,这意味着我学到了新东西。 我希望能回答。

Tim:
蒂姆:

There’s always 9.851.

总有9.851。

Glenn:
格伦:

That’s right. RC1.

那就对了。 RC1。

Tim:
蒂姆:

Because we’re going there.

因为我们要去那里。

David:
大卫:

That’s excellent. I’m glad that you’re not thinking toward the last version already.

太好了 我很高兴您没有考虑使用最新版本。

Glenn:
格伦:

Not yet.

还没。

David:
大卫:

Cool. I’m really curious. You’re working in Ruby. How long have you been working with Ruby? How did that get started for you?

凉。 我真的很好奇 您正在使用Ruby。 您使用Ruby已有多长时间了? 那是如何开始的?

Glenn:
格伦:

I’ve been programming since I was about 12, which I’d say is a while ago.

我从12岁起就开始编程,那是前一段时间。

David:
大卫:

At least five years.

至少五年。

Glenn:
格伦:

At least five years. Back when I had to save everything to a cassette tape. My progression of programming was Basic, to C, to .NET. I was in .NET for quite a while. I really liked ASP.NET for a long time. I think a lot of developers’ evolution is to go from — especially .NET developers, obviously — is to go from there to find something else, because .NET gets (for many people, not everybody) very frustrating. I found Ruby. I actually found Rails, and was blown away. This was probably 2006/7. Rails, I think, came out 2006, maybe 2004. It was version 2, I think, at that time.

至少五年。 回到我必须将所有内容保存到盒式磁带的时候。 我的编程进度是从Basic到C,再到.NET。 我在.NET中已经有一段时间了。 我很喜欢ASP.NET很长时间了。 我认为很多开发人员的发展都是从那里开始的,尤其是.NET开发人员,显然是要从那里开始寻找其他东西,因为.NET(对于很多人,而不是每个人)感到非常沮丧。 我找到了露比 我实际上找到了Rails,并被吓了一跳。 大概是2006/7年。 我认为,Rails于2006年或2004年问世。当时是第二版。

It’s the MVC, and how fast you could get things done — it just blew me out of the water. There used to be a thing in Rails where everybody did the write your own blog and you do it in 15 minutes, and it’s just — back in the day, that was huge. I fell in love with Rails, which led me to Ruby, which is a very elegant language. I fell in love with that, and I had to work a long time to get people to hire me for Ruby, because I was a .NET person. I wanted to switch my career. That took a while. I basically had to go to a startup that would have taken anyone to do it, and learn on the job and burn through all my savings, like you do in a startup. But I did it, and I turned my career towards Ruby, and I haven’t really looked back.

这是MVC,是您完成工作的速度—简直让我不知所措。 在Rails中曾经有一种情况,每个人都做一个自己的博客,而您在15分钟之内就写完了,那只是-追溯到今天,那是巨大的。 我爱上了Rails,这使我想到了Ruby,这是一种非常优雅的语言。 我爱上了它,而且我不得不花很长时间才能让人们雇用我为Ruby,因为我是一个.NET人员。 我想改变我的职业。 那花了一段时间。 基本上,我必须去一家会雇用任何人去做的初创公司,像在初创企业中所做的那样,学习工作并消耗掉我所有的积蓄。 但是我做到了,我的职业转向了Ruby,但我并没有真正回头。

David:
大卫:

What was it about Ruby that really appealed to you? What features of the language drew you in?

Ruby真正吸引您的是什么? 语言的哪些功能吸引您?

Glenn:
格伦:

Ruby was created by a guy named “Matz”. His doctrine behind it was “make programmers happy”, and it does that very well. It’s very easy to read; it doesn’t have any weird whitespace issues like Python. The object oriented nature of it is very appealing to me … or it was at the time. It still is. I’ve moved on to learn some other languages. I’m still doing Ruby every day, don’t get me wrong. I like how Ruby implemented the objected-oriented aspects of its language. It’s not a perfect language, but none of them are. But for a lot of jobs, it’s the right tool. You can get a lot done very quickly. That’s what I like best about it.

Ruby是由一个名为“ Matz ”的人创建的。 他背后的学说是“使程序员感到高兴”,而且做得很好。 它很容易阅读; 它没有像Python这样的怪异空白问题。 它的面向对象性质对我非常有吸引力……或者那时是。 仍然是。 我继续学习其他语言。 我仍然每天都在做Ruby,请不要误解我的意思。 我喜欢Ruby如何实现其语言的面向对象方面。 这不是一种完美的语言,但都不是完美的语言。 但是对于很多工作来说,这是正确的工具。 您可以很快完成很多工作。 那就是我最喜欢的东西。

Tim [4:10]:
蒂姆[4:10] :

I want to talk real quick about the progression from .NET to Ruby. I notice in today’s landscape, a lot of developers (I’m raising my hand here) really only focus on one language. My language of choice — the thing I do almost everything in — is JavaScript. I know a little bit of PHP. If I really had to, I could get something done in maybe a couple of other languages. But in your own words, why is it something that developers should do — like branch out to and become fluent in another programming language? How easy was it for you to make that switch from .NET to Ruby?

我想快速地谈论从.NET到Ruby的发展。 我注意到在当今的形势下,许多开发人员(我在这里举手)实际上只专注于一种语言。 我选择的语言-我几乎所做的所有事情-是JavaScript。 我知道一点PHP。 如果确实需要,我可以用其他几种语言完成一些工作。 但是用您自己的话说,开发人员为什么应该做某件事-例如分支到另一种编程语言并变得流利? 从.NET切换到Ruby对您来说有多容易?

Glenn:
格伦:

I’m pretty familiar with JavaScript. I’ve done it for much of my career. I hesitate to use the phrase “full stack”, because I don’t like that phrase. (I don’t like the phrase “Ninja” either, but whatever.) The web has JavaScript, but then you have a backend. At least for the longest time, there wasn’t a JavaScript backend. I can remember the days before Node, and Express, and those tools.

我对JavaScript非常熟悉。 我在职业生涯的大部分时间里都做到了。 我犹豫使用短语“ full stack”,因为我不喜欢该短语。 (我也不喜欢短语“ Ninja”,但是无论如何。)Web具有JavaScript,但是您有一个后端。 至少在最长的时间内,没有JavaScript后端。 我还记得Node,Express和那些工具出现的日子。

You had to learn more than one. There’s a necessity. That’s one thing. There’s also the concept of the right tool for the job. Ruby, as I said, is not perfect. It doesn’t have a very good concurrency approach, or gain. Hopefully they’re going to fix that in Ruby 3. Fingers crossed.

您必须学习多个。 有必要。 那是一回事。 还有适合工作的正确工具的概念。 正如我所说,Ruby并不完美。 它没有很好的并发方法或收益。 希望他们能在Ruby 3中解决该问题。

There are languages out there like Go. I’m a big fan of Go, and it has a wonderful concurrency. It makes it easy, because if you’ve ever heard about concurrency, the first rule of concurrency is don’t do it, because it quite often leads you down the road to hell. With Go, it’s easy. It takes care of a lot of the issues that smarter programmers could get away with, and programmers like me need a language to handle it.

有像Go这样的语言。 我是Go的忠实粉丝,它具有出色的并发性。 这样做很容易,因为如果您曾经听说过并发,那么并发的第一个规则就是不要这样做,因为并发经常会使您走到地狱。 使用Go,这很容易。 它解决了许多更聪明的程序员可以解决的问题,像我这样的程序员需要一种语言来处理它。

When you have to write things that are super fast — like system-type programs, like an ATI Gateway where it’s maybe thousands, or hundreds of thousands requests coming in, and they’ve got to route them really quick. You’re not going to use Ruby for that. Probably not going to use JavaScript for that. Using something like Go, you can get the job done and you’re using the right tool for the job. I would strongly suggest learning other languages. Although I can’t really recommend PHP. Sorry.

当您必须编写超快速的东西时,例如系统类型的程序,例如ATI网关,可能有成千上万个请求进入,它们必须快速地路由它们。 您不会为此使用Ruby。 可能不会为此使用JavaScript。 使用Go之类的工具,您可以完成工作,并且正在使用正确的工具来完成工作。 我强烈建议学习其他语言。 虽然我不能真正推荐PHP。 抱歉。

David:
大卫:

Hey. I take that a little bit personally. I’ve been a PHP programmer over the years.

嘿。 我个人认为。 这些年来,我一直是一名PHP程序员。

Glenn:
格伦:

I’ve actually never done it.

我实际上从来没有做过。

David:
大卫:

Although not lately. In fact, lately, I’ve been edging away from Ruby and toward Go myself. In fact, I used to go to some of those meetups back in the mid-2000s, when people were just starting to do those blogs in Rails. I’ve noticed a lot of the same people I saw at those meetups then are now showing up at the meetups for Go. It’s interesting that you bring that up. I’m curious how you see that transition.

虽然不是最近。 实际上,最近,我一直在从Ruby转向Go Go。 实际上,我曾经在2000年代中期参加过一些聚会,当时人们才刚刚开始在Rails中创建这些博客。 我注意到很多我在这些聚会上见过的人,后来又出现在Go的聚会上。 提出来很有趣。 我很好奇您如何看待这种转变。

Glenn:
格伦:

It is funny. There’s another programmer that I work with in my company, and he is a big Rubyist. We’ve worked at the old startup together. We came to this company where I am now together. He and I both went to Gopher Con. I think Rubyists by nature, maybe, are a little more pragmatic and curious when it comes to things like, We do love Ruby, but we know it’s not the best tool for all the jobs. Because, in many cases, such as mine, you’ve tried to use Ruby for everything and been burned alive when it couldn’t handle whatever you were doing.

这很有趣。 我公司中还有另一位程序员与他一起工作,他是一个大的Rubyist。 我们一起在旧的创业公司工作。 我们来到了我现在在一起的那家公司。 他和我都去了Gopher Con 。 我认为从本质上讲,Rubyists在涉及诸如“ 我们确实喜欢Ruby”之类的事情时会更加务实和好奇,但我们知道它并不是所有工作的最佳工具。 因为在很多情况下,例如我的,您都尝试使用Ruby进行所有操作,并且在无法处理您所做的任何事情时都将其烧死。

So you reach for things like, “What’s something faster that I can handle — again, in Go’s case — a concurrent type application with …” You look for that. I guess it’s just a Rubyist’s nature to do that. Maybe I’m wrong. Maybe it’s a programmer’s nature.

因此,您将获得诸如“我可以处理的更快的东西-在Go的情况下-具有...的并发类型应用程序”这样的东西。 我想这只是Rubyist的本性。 也许我错了。 也许这是程序员的天性。

Go has a lot of momentum right now. It’s 7 years old. It just had its birthday, and it has a cute little mascot. So I don’t know. I can’t answer that with any real intelligence. Maybe it is the whole Rubyists looking for the right tool for the right job.

Go势头强劲。 已经七岁了。 它刚过生日,还有一个可爱的小吉祥物。 所以我不知道 我无法用任何真正的智慧来回答这个问题。 也许是整个Rubyists在寻找合适的工具来完成正确的工作。

David:
大卫:

You still do argue that there’s a case to be made for learning Ruby in 2016.

您仍然认为在2016年有必要学习Ruby。

Glenn [7:40]:
格伦[7:40] :

For example, in a project we recently completed, it was — I call it the Buzzword Project, because it had microservices and an API gateway, and it had Redux, and it had React, and it had all these stuff that people were like — it was literally like somebody had said “These are all the buzzwords of 2015(because we started then). We shoved them all in this project, all at the same time. Most of them were pretty new, at least, to us.

例如,在我们最近完成的一个项目中,它是-我称之为Buzzword项目,因为它具有微服务和API网关,它具有Redux,它具有React,并且它具有人们喜欢的所有这些东西-字面上就像有人说的:“这些都是2015年的流行语(因为我们从那时开始)。 我们在同一时间将所有对象都推到了这个项目中。 至少对于我们来说,大多数人还是很新的。

We wrote all of the services for that. All the services for that project were written in Rails. It was because we could go 100 miles an hour and finish these services, and they were solid. They all had great testing coverage. We knew the language well. It was great. I think Rails has a good — especially now at Rails 5 — has a really good API story. It’s a useful tool. It’s a useful language. A lot of people think Rails might have jumped the shark. I don’t agree with that at all. For things like the front end for that particular project, we used Note and Express, and we wrote the isomorphic. (Again, all the buzzwords on this one project.) So, that was the right tool for that, and it was great.

我们为此编写了所有服务。 该项目的所有服务都是用Rails编写的。 这是因为我们可以每小时100英里的速度完成这些服务,而且它们是可靠的。 他们都有很好的测试范围。 我们对这门语言很了解。 太好了。 我认为Rails的优势-尤其是在Rails 5上-具有非常好的API故事。 这是一个有用的工具。 这是一种有用的语言。 许多人认为Rails可能已经跳出了鲨鱼。 我完全不同意。 对于诸如该特定项目的前端之类的东西,我们使用了Note和Express,并编写了同构。 (同样,在这个项目上所有的流行语都是如此。)因此,那是实现这一目标的正确工具,而且很棒。

Ruby, in the article I’ve mentioned, when you learn Rails, Rails has conventions. They have this thing called “convention over configuration”, which means there are things you need to handle in a website, but when you’re first learning things, you may not know all of them, or you may not know how to handle all of them. Rails has conventions, like, if you don’t know which database you want to use, just use SQLite, because until you pick another one, Rails will just take care of that for you.

Ruby,在我提到的文章中,当您学习Rails时,Rails具有约定。 他们有一个叫做“约定之上的配置”的东西,这意味着网站上需要处理一些事情,但是当您初次学习东西时,您可能并不了解所有这些,或者您可能不知道如何处理所有这些。其中。 Rails有约定,例如,如果您不知道要使用哪个数据库,则只需使用SQLite,因为在选择另一个数据库之前,Rails会为您处理这些。

There’s conventions around cookies, and sessions, and all this stuff that comes baked into Rails. As you learn what the conventions are, you learn what it is to build a website. What’s a session? Go figure out why Rails handles it that way — what it is and how it does it. Then you can replace it if you don’t like the way it does it, because Ruby is a fantastic community full of contributors, and gems, and all this stuff to do that. Once you master Rails, you’ve really mastered web development, if you’ve done it the right way.

关于cookie和会话有约定,所有这些东西都包含在Rails中。 当您了解约定是什么时,您就会了解构建网站的含义。 什么会议? 弄清楚为什么Rails会这样处理-它是什么以及它是如何执行的。 然后,如果您不喜欢它的方式,则可以替换它,因为Ruby是一个由贡献者,gem和所有这些东西组成的奇妙社区。 掌握了Rails之后,如果您以正确的方式进行操作,就可以真正掌握Web开发。

Tim:
蒂姆:

So, you wrote a book.

所以,你写了一本书。

Glenn:
格伦:

I did.

是的

Tim:
蒂姆:

What is this book about? Is it about web development?

这本书是关于什么的? 与网站开发有关吗?

Glenn:
格伦:

It’s about Rails. The name of the book is Rails: Novice to Ninja. It’s published by SitePoint. It is an update of a book that was written for Rails 2, which is … we’re on Rails 5, so it’s three versions ago. It was in bad need of an update, because Rails has changed very, very much between versions.

关于Rails。 这本书的名称是Rails:Ninja的新手 。 它由SitePoint发布。 这是为Rails 2写一本书的更新,它是…我们在Rails 5上,所以是三个版本。 迫切需要进行更新,因为不同版本之间的Rails发生了很大的变化。

The first edition was written by a guy named Patrick Lenz, and he did a really, really good job. In fact, I used a fair amount of his content in this update. It is updated to Rails 5. It is very much aimed at the person that is new to Rails, and or new to web development in general. It doesn’t cover some of the more advanced pieces of Rails. Not very much at least. It gives you springboards off to it. It’s 513 pages, I think, so it’s a hefty book, and it took months and months and months of work, but it was worth it. It was a good effort, good fun.

第一版是由一个叫Patrick Lenz的人写的,他做得非常非常好。 实际上,我在此更新中使用了大量他的内容。 它已更新到Rails5。它非常针对Rails的新手,或Web开发的新手。 它没有涵盖Rails的一些更高级的部分。 至少不是很多。 它为您提供了跳板。 我认为,这是一本513页的书,这是一本笨重的书,花了几个月又几个月又几个月的时间,但还是值得的。 这是一个很好的努力,很好玩。

David:
大卫:

You would say that Rails is still a good introduction to programming foe people who are new?

您可能会说Rails仍然是对新手编程的好入门?

Glenn:
格伦:

Yeah. The good thing about Rails — and I’m not sure that this is true of any other web frameworks. The ones I know about it certainly isn’t, like Express. You can be productive in Rails, and get a site up, and now know Ruby very well. There are Rubyists that get really mad when you say things like that, but it’s true. It is how I came to Ruby. I started doing websites in Rails. For the longest time, I had no idea if it was Rails or Ruby.

是的 关于Rails的好处-我不确定这是否适用于其他任何Web框架。 我知道的人肯定不是,例如Express。 您可以在Rails中提高工作效率,并建立一个站点,现在对Ruby非常了解。 当您这样说时,有些Ruby主义者会非常生气,但这是事实。 这就是我来到Ruby的方式。 我开始在Rails中创建网站。 在最长的时间内,我不知道它是Rails还是Ruby。

David:
大卫:

I know what you mean. That was me in 2005 too.

我知道你的意思。 2005年也是我。

Glenn:
格伦:

Yeah, that’s Rails. Even today, people will say, Are you using Rails to write your programming? I’m like, Rails isn’t the language, but they all think it’s the language. In fact, in the book, I actually do a couple of paragraphs and I’m like, Say this out loud. Ruby is a language. Rails is the framework. The point of that is, really, that you can come to web development through Rails not have to learn a whole language. I don’t think you could really do that with Express. I don’t know that you could do it with anything in Python. You certainly couldn’t in Go. [Laughs]

是的,那是Rails。 甚至在今天,人们还会说, 您是否正在使用Rails来编写程序? 我想, Rails不是语言,但他们都认为这是语言。 实际上,在书中,我实际上做了几个段落,我想大声说出来。 Ruby是一种语言。 Rails是框架。 关键是,实际上,您可以通过Rails进行Web开发,而不必学习整个语言。 我认为您无法使用Express真正做到这一点。 我不知道您可以使用Python做任何事情。 您当然不能进入Go。 [笑]

David:
大卫:

I feel as if the Rails paradigm has inspired a lot of the newer frameworks — the champion to convention over configuration. I feel like that’s been picked up to a certain extent, although perhaps not as deeply as Rails has implemented it.

我觉得好像Rails范式启发了许多新的框架-倡导在配置上达成惯例。 我觉得它在某种程度上已经被接受,尽管可能不像Rails实施的那么深入。

Glenn [12:00]:
格伦[12:00] :

I think Django is very similar, from what I know about it. It’s the Rails on Python, or at least that’s what I’ve heard.

我认为, Django与我非常相似。 这是Python上的Rails,或者至少是我所听到的。

You know, DHH, and the guy who created Rails …

DHH和创建Rails的人……

David:
大卫:

David Heinemeier Hansson

…… 大卫·海尼迈尔·汉森 ……

Glenn:
格伦:

Yeah. A polarizing individual at times. Certainly brilliant. He did The Rails Doctrine. He rewrote it sometime last year I think, and it’s really quite good. It’s 7 or 8 tenets, and not really any of them are like, Make a website. It’s more like, Throw up a big tent so that we have a big community. We want to stay on the edge of web development over stability. Whether or not you agree with all these tenets, it’s immaterial.

是的 有时是两极分化的人。 当然很棒。 他做了《 Rails学说》 。 我认为他在去年的某个时间重写了它,确实非常好。 这是7或8个原则,并不是每个人都像建立一个网站。 更像是, 扔一个大帐篷,使我们有一个大社区。 我们希望在稳定性方面保持Web开发的优势。 无论您是否同意所有这些原则,这都不重要。

The point is, we have a framework to make websites, and it has 8 tenets about community and making sure it stays on the edge of technology. All this thought goes into just these things. It’s pretty amazing. I don’t know any other framework that has that much thought put into things that aren’t directly related to writing code.

关键是,我们有一个制作网站的框架,它有8个关于社区的原则,并确保其始终处于技术的前沿。 所有这些思想都涉及到这些事情。 太神奇了 我不知道还有其他框架在与编写代码没有直接关系的事情上投入了太多的精力。

David:
大卫:

I know. I’ve still been guilty of making the joke that Rails is the perfect framework if you want to write Basecamp.

我知道。 如果您想编写Basecamp,我仍然开玩笑说Rails是完美的框架,对此我一直感到内。

Glenn:
格伦:

Yes. That’s true. It did come out of Basecamp. There are definitely things in Rails that people don’t agree with, and that I don’t agree with, I don’t use. Again. You can pull them out. It’s convention over configuration. If you don’t like Turbolinks — it’s one of those things that people don’t like. And I will tell you that, until I wrote this book, I didn’t like them either, but I had this part of the book. I wanted to make sure people understood, and so I wrote about Turbolinks. I was like, Those are kind of cool, actually. You can yank them out. It’s not hard. You can replace almost anything Rails does by convention very easily. People that got hung up on the “Rails way” probably don’t use Rails every day — or at least not for anything significant.

是。 确实如此。 它确实来自大本营。 在Rails中肯定有一些人不同意,我不同意,我不使用。 再次。 您可以将它们拔出。 这是对配置的约定。 如果您不喜欢Turbolinks ,这就是人们不喜欢的事情之一。 我会告诉你,在我写这本书之前,我也不喜欢它们,但是我有本书的这一部分。 我想确保人们理解,所以我写了有关Turbolink的文章。 我当时想, 那真的很酷。 您可以将它们拉出。 不难 按照惯例,您几乎可以替换Rails所做的任何事情。 迷于“ Rails方式”的人们可能每天都不使用Rails —或至少不是为了重要的事情。

Tim:
蒂姆:

I feel like we see a lot of contention in the modern programming landscape, wherein someone publishes a post on Medium and they say, Don’t ever use such and such in this language. How do you approach things you don’t like in languages? How do you deal with those types of posts around the internet wherein you see people saying, Don’t do X or Y when you’re programming.

我感觉我们在现代编程领域中看到了很多争论,有人在Medium上发表了一篇文章,他们说, 永远不要使用这种语言。 您如何用语言处理不喜欢的事情? 您如何处理互联网上的那些类型的帖子,其中您会看到人们说, 在编程时请勿执行X或Y。

Glenn:
格伦:

If you ask me this question 5 or 10 years ago, you probably would have gotten a much more fanatical answer. I’ve learned over my long, long programming career that I don’t know everything and certainly don’t know anything about languages I don’t use. For example, I’ve used Python just a little bit, and I do not like the whitespace. I don’t like it, and I will joke around about it, but I understand why people like Python. It’s fast. The syntax is similar to Ruby. It’s easy to read. It has a lot of the same advantages of Ruby. I don’t like it. Other people like it.

如果您在5或10年前问我这个问题,您可能会得到一个更加狂热的答案。 在漫长的编程生涯中,我了解到我并不了解一切,当然也对我不使用的语言一无所知。 例如,我只使用了Python一点,而且我不喜欢空白。 我不喜欢它,我会开玩笑,但是我理解为什么人们喜欢Python。 它很快。 语法类似于Ruby。 很容易阅读。 它具有与Ruby相同的许多优点。 我不喜欢 其他人喜欢它。

If they can be productive in that and get their job done, then I don’t care if you’re using QuickBASIC … which I did use a long time ago. I’m not a zealot. I’m not a you-have-to-do-what-I-do person. There are too many smart people doing things that either I wouldn’t do or don’t know anything about to shut them out without my having experienced it. I guess it’s like I haven’t walked in their shoes, so I’m not going to rip them down or rip down what they’re doing.

如果他们可以在其中有所作为并完成他们的工作,那么我不在乎您是否正在使用QuickBASIC……我早就使用过。 我不是狂热者。 我不是一个要做我要做的人。 没有我的经验,有太多聪明的人在做我不会做或不知道将他们拒之门外的事情。 我想这就像我还没有走过他们的鞋子一样,所以我不会撕裂他们或正在撕毁他们的工作。

David:
大卫:

You’ve also been working with SitePoint, I think, for now, five years, doing the Ruby Channel there. I’m curious how you came to that.

我想您也已经与SitePoint合作了五年,在那里使用Ruby Channel。 我很好奇你是怎么想到的。

Glenn [15:24]:
格伦[15:24] :

There used to be a guy that worked at SitePoint named Aaron Osteraas. He’s either in Australia or New Zealand, because they used to be spread out among both. I think they’re all in Australia now.

曾经有一个在SitePoint工作过的人叫Aaron Osteraas 。 他要么在澳大利亚,要么在新西兰,因为它们曾经在两个国家中分布。 我认为他们现在都在澳大利亚。

I added a comment to a post on SitePoint — like a Ruby post. Everybody that puts a comment on this post can be entered for a drawing to attend RubyConf New Zealand at that time. I lived in Charlotte, North Carolina, at that time, and I won. I said, "That’s great! I can’t go. There’s no way I can afford to go from Charlotte, North Carolina, to wherever it was in New Zealand. I ended up giving the ticket to somebody else that lived in New Zealand.

我在SitePoint上的帖子(例如Ruby帖子)中添加了评论。 可以输入对这个帖子发表评论的所有人,以供当时参加RubyConf New Zealand的绘图参加。 那时我住在北卡罗来纳州的夏洛特,我赢了。 我说:“太好了!我不能走。我无法负担得起从北卡罗来纳州夏洛特市到新西兰的任何地方的费用。我最终把机票卖给了住在新西兰的其他人。

But, I had a dialogue with Aaron. He’s like, Have you written a blog post before for Ruby, or anything else? I said, No. He said, Why don’t you write a couple? I wrote about a 15-post series on building a Rails app, called Loccasions. I didn’t mean for it to be 15 posts. It ended up being 15 posts. It’s super long. SitePoint actually made a book out of it. It’s not a very good book. They’ve put them all together and they released it as a book.

但是,我和亚伦进行了对话。 他就像, 您之前是否为Ruby写过博客文章,还是其他文章? 我说, 不。他说, 你为什么不写几对? 我写了一篇有关构建Rails应用程序(称为Loccasions)15个帖子系列 。 我的意思不是说要发表15个帖子。 最终只有15个职位。 超级长 SitePoint实际上是用它做成了一本书 。 这不是一本好书。 他们将它们放在一起,并作为书发行。

In the middle of that somewhere he goes, I need an editor for this Ruby stuff. Do you know anybody? I seriously think he was fishing for me to go, I’ll do it, because that’s exactly what I did. I went, I’ll do it. The rest is history.

在他所到之处的中间, 我需要一个用于Ruby的编辑器。 你认识吗 我认真地认为他是在钓鱼让我走, 我会去做,因为那正是我所做的。 我去了, 我去做。 剩下的就是历史了。

It is funny to think that, because I commented on a post, I ended up getting this part-time gig that I’ve been doing for five years now. It’s really changed my career. A silly comment really ended up changing my career and turning it much more quickly towards Ruby as a profession than it probably would’ve been otherwise.

有趣的是,因为我在一篇帖子中发表了评论,所以最终得到了我已经从事五年的兼职演出。 这真的改变了我的职业生涯。 愚蠢的评论确实最终改变了我的职业生涯,并且使它比以前可能更快地转向了Ruby这一职业。

Tim:
蒂姆:

Your first post turned into a book. You really took the easy way out there.

您的第一篇文章变成了一本书。 您真的走了一条简单的路。

[Chuckling]

[咯咯笑]

Glenn:
格伦:

Yeah. It’s funny, because I had to write a preface for the book. He goes, We’re going to release all your things as a book. I said, Don’t do that. He goes, Why? I go, "Because” … Do you know what impostor syndrome is?

是的 这很有趣,因为我必须为这本书写一个序言。 他说, 我们将把您所有的东西以书的形式发布。 我说, 不要那样做。 他走了, 为什么? 我说:“因为”……你知道什么是冒名顶替综合症吗?

Tim:
蒂姆:

O yes!

哦是啊!

Glenn:
格伦:

The total fear that somebody is going to … I have been doing this for 27 years, and I still have it all the time.

完全担心有人会……我已经做了27年了,而且我一直都这样。

Kent Beck is probably the greatest guy to follow on Twitter, by the way, because he is a god among us all. He constantly tweets out things like impostor syndrome and how it rips him up. I was like, If he’s got it, then I’m okay if I have it.

顺便说一句, 肯特·贝克可能是推特上最伟大的人,因为他是我们所有人中的神。 他经常在推特上发布诸如冒名顶替综合症之类的东西,以及它如何使他崩溃。 我当时想, 如果他有,那我就可以了。

Anyways, I said, Don’t do that. Don’t release those things as a book. I’m just going to get mocked. He goes, Write a preface for it. My entire preface for that book is what I would have done differently. I’m guessing anyone that got that book was like, I can’t wait to read … Oh! God. This guy doesn’t even want to get …

无论如何,我说, 不要那样做。 不要把那些东西当成书来发行。 我只会被嘲笑。 他走了, 为此写一个序言。 这本书的整个序言是我本来会做的不同的事情。 我猜得到那本书的人就像, 我迫不及待地想读……哦! 神。 这个家伙甚至都不想要……

[Laughter]

[笑声]

David:
大卫:

I’m taking notes. I may have to start the next piece of writing that I do with a huge disclaimer too. It must be very satisfying.

我在做笔记。 我可能还必须以巨大的免责声明开始下一篇文章。 它一定非常令人满意。

Glenn:
格伦:

It’s bad, but it is impostor syndrome. It’s like, Don’t tell me I suck, because I’ve already said it. I guess that’s what that preface … I did not do that in the preface of the latest book, because … I don’t know. Growing up, I guess.

不好,但这是冒名顶替综合症。 就像, 别告诉我我很烂,因为我已经说过了。 我想这就是那个序言……我没有在最新书的序言中那样做,因为……我不知道。 我长大了。

David:
大卫:

The Ruby community is actually very — it’s always been very open to people. One of the things I remember right from the start is people at all levels were participating in the open-source aspects of Ruby development. It always felt like it was a very open and welcoming community.

Ruby社区实际上非常好-一直向人们开放。 我从一开始就记得的一件事是,各个级别的人都参与了Ruby开发的开源方面。 总是觉得这是一个非常开放和热情的社区。

Glenn:
格伦:

It definitely is. I think it’s probably just about the best programming community out there. Go has a great community. The Node community has grown up quite a bit. When it started, it was not good. It was very, very contentious and angry. I actually remember posting in the Google group for Node when it was just a few people and saying, You guys need to work this out, because you’re all angry to each other and angry at everybody else. They did. Node community is just fine now.

肯定是。 我认为这可能只是那里最好的编程社区。 Go有一个很棒的社区。 Node社区已经成长了很多。 当它开始时,它并不好。 那是非常非常有争议的和愤怒的。 其实我记得张贴在谷歌组节点中时,这只是几个人,说, 你们要工作了这一点,因为你所有的愤怒,彼此生气的其他人。 他们做到了。 Node社区现在很好。

Ruby has always been very open, and everyone I’ve ever asked for help in Ruby has been amazing. I’ve met more people just online. In fact, today, I had lunch with a guy named Richard Schneems, who is a big Rubyist. He works for Heroku. We didn’t know each other other than we met on Twitter. I saw him at a couple of meetups one time, and then I come to Austin, and Let’s do lunch, and it was great. Just like old friends. We talked about Ruby. We talked about other things. It is a fantastic community to learn anything in and to be in.

Ruby一直都很开放,我在Ruby中寻求帮助的每个人都很棒。 我在网上结识了更多的人。 事实上,今天,我和一个名叫Richard Schneems的人共进午餐,他是一个大的Rubyist。 他为Heroku工作。 除了在Twitter上相遇,我们彼此之间并不认识。 我曾经在几次聚会上见过他,然后我去了奥斯汀, 让我们一起吃午餐 ,那很棒。 就像老朋友一样。 我们讨论了Ruby。 我们谈论了其他事情。 这是一个很棒的社区,您可以学习任何东西并可以进入。

Tim:
蒂姆:

So, speaking about open-source stuff, do you have any fun, open-source-type projects you work on?

那么,说到开源的东西,您有从事任何有趣的开源类型的项目吗?

Glenn [19:38]:
格伦[19:38] :

I am the buffet open-source contributor. I go through and find a bug that I fix and I move on. I did that jQuery UI, and it must be 10 years ago that I contributed to jQuery UI. I just got an email. Some guy was like, Thanks for all you great contributors to jQuery UI. I was, "O my God.” I did this little bug fix 10 years ago …

我是自助餐开源贡献者。 我仔细研究并找到了一个错误,然后继续进行。 我做了那个jQuery UI,而且必须在10年前为jQuery UI做出了贡献。 我刚收到一封电子邮件。 有人喜欢, 谢谢大家对jQuery UI的杰出贡献。 我当时是:“天哪!” 我10年前做了这个小错误修复...

I’ve contributed to that, to Angular. I’ve never contributed to Rails, because I’ve been super intimidated by it, which I shouldn’t be. I’m actually writing a post right now on why Rails is a great thing to contribute to. I think it’s a half a letter to myself to do it.

我为Angular做出了贡献。 我从未为Rails做出过贡献,因为我对此感到非常恐惧,这是我不应该的。 我现在实际上正在写一篇文章, 解释为什么Rails是一个伟大的贡献 。 我认为这是给自己的半封信。

I have released some very unknown, not used open-source libraries — one for a graph database called Orion DB, which probably nobody has ever heard of, that we used in a couple of jobs ago. I wrote a Ruby gem for it. Other than that, it’s machine gun contributions across the board. The short answer is no. If you go look at GitHub, it looks like I do a ton of open source, but it’s all machine gunny, varied little things for libraries out there.

我已经发布了一些非常鲜为人知的,尚未使用过的开源库-一个名


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
JRuby 1.7.0 发布,默认使用 Ruby 1.9 模式发布时间:2022-07-14
下一篇:
使用Eclipse+RDT插件进行Ruby开发发布时间:2022-07-14
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap