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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ruby Is Defined by Terrible Tools

115 点作者 davidcelis将近 10 年前

19 条评论

saosebastiao将近 10 年前
I tend to think that the sophistication of the tools reflect the extent that the language is broken. Valgrind doesn&#x27;t need to exist for the Java user. You don&#x27;t need class boilerplate getter&#x2F;setter generators for Scala. Nobody needs NPE static analyzers for Rust. The need for rename refactoring tools is drastically diminished by the existence of type inference, almost to the point where `:%s&#x2F;Foo&#x2F;Bar&#x2F;g` is entirely adequate.<p>The non-existence of tools that you find in other languages <i>might</i> signal an immature ecosystem, but it might also signal a diminished need for them.
评论 #9853273 未加载
评论 #9853155 未加载
评论 #9858523 未加载
评论 #9853173 未加载
评论 #9853705 未加载
kazinator将近 10 年前
&gt; <i>And yet, in the early 2000s, long before Rails drove throngs of people to learn Ruby, very smart people who knew about Lisp and Haskell and good tooling, fell in love with Ruby. People like Dave Thomas and Martin Fowler and Jim Weirich.</i><p>This is probably because very smart people don&#x27;t need tools, so they can let themselves fall for the appearance of raw textbook examples of the source code.<p>Very smart people probably have written programs in low-level languages and gotten them right with only the help of print traces, and raw stack&#x2F;register dumps.
评论 #9853127 未加载
评论 #9858804 未加载
评论 #9853361 未加载
matthewmacleod将近 10 年前
Hmm, I&#x27;m not so sure about this.<p>Ruby&#x27;s tooling is obviously not as advanced as a language like Java, for many reasons. But <i>terrible</i> isn&#x27;t the adjective I&#x27;d use. It&#x27;s pretty easy to use editor integration to provide pretty decent automatic formatting, linting and code completion. Pry-debugger is pretty great, and generally I don&#x27;t find working in Ruby to be markedly more taxing that other languages.<p>I guess YMMV, though.
评论 #9852337 未加载
评论 #9852743 未加载
评论 #9852354 未加载
评论 #9852366 未加载
davexunit将近 10 年前
I write both Ruby and Lisp frequently, and I must agree that Lisp tools are vastly superior. Ruby, despite being a dynamic language, has a sorry excuse for a REPL which really hampers my workflow. For example, Rails watches your Ruby files for changes and reloads them in development mode, but if it was easy to re-evaluate arbitrary expressions from your editor (a la SLIME or Geiser) such a feature would never be needed. Then, of course, there&#x27;s typically so much magic happening that it&#x27;s often impossible to find the place in which a symbol was defined by searching for that symbol, which makes debugging overly difficult.
评论 #9852490 未加载
endlessvoid94将近 10 年前
I wrote a Smalltalk-esque System Browser for manipulating class definitions without the need for a filesystem awhile ago (here&#x27;s a rather crappy screencast of it: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=2xC5B5t5Rq8" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=2xC5B5t5Rq8</a>)<p>It was a LOT of fun, and I wish I had the time to resume it. The feedback loop was so much faster, and I can say that there is serious cognitive overhead we all carry by manipulating the definitions of things in files rather than just the objects and classes themselves.<p>It was a fun experiment.
bascule将近 10 年前
This is one of the things I&#x27;ve always liked about JRuby. You can use the excellent tooling of the JVM ecosystem (e.g. YourKit, Coverity Dynamic Analyzer) to understand the behavior of your JRuby applications, and even attach directly to running production apps to debug them.<p>I&#x27;ve found tools like this essential for debugging multithreaded JRuby applications, and there&#x27;s simply nothing else like them available for MRI.
graffitici将近 10 年前
How would people that use both Python and Ruby compare the tooling for both languages? I only am familiar with Python, and I end up using IPython most of the time. I&#x27;m curious whether I&#x27;m missing out, or maybe Python also has &quot;terrible&quot; tooling..
评论 #9852878 未加载
评论 #9853005 未加载
评论 #9854347 未加载
评论 #9852885 未加载
评论 #9853281 未加载
jasim将近 10 年前
One of the biggest success stories in recent times where language support has made tooling awesome is JSX.<p>The success of JSX shows that developers are happy to write HTML inside code, and there are clear benefits of doing so compared to using a dedicated templating language. But the reason why this wasn&#x27;t popular till JSX showed up was that it is impossible to parse the HTML built in code through string munging. JSX makes XML-inside-Code parseable, which makes it possible for us to use IntelliJ&#x27;s excellent IDEs to work seamlessly with it.
评论 #9853482 未加载
braythwayt将近 10 年前
<p><pre><code> &gt; People in the industry are very excited about various ideas that nominally help you deal with &gt; large code bases, such as IDEs that can manipulate code as &quot;algebraic structures&quot;, and search &gt; indexes, and so on. These people tend to view code bases much the way construction workers view &gt; dirt: they want great big machines that can move the dirt this way and that. There&#x27;s &gt; conservation of dirt at work: you can&#x27;t compress dirt, not much, so their solution set consists &gt; of various ways of shoveling the dirt around. There are even programming interview questions, &gt; surely metaphorical, about how you might go about moving an entire mountain of dirt, one truck &gt; at a time. &gt; Industry programmers are excited about solutions to a big non-problem. It&#x27;s just a mountain of &gt; dirt, and you just need big tools to move it around. The tools are exciting but the dirt is not. &gt; My minority opinion is that a mountain of code is the worst thing that can befall a person, a &gt; team, a company. I believe that code weight wrecks projects and companies, that it forces &gt; rewrites after a certain size, and that smart teams will do everything in their power to keep &gt; their code base from becoming a mountain. Tools or no tools. That&#x27;s what I believe. </code></pre> —Steve Yegge, &quot;Code&#x27;s Worst Enemy&quot; <a href="http:&#x2F;&#x2F;steve-yegge.blogspot.ca&#x2F;2007&#x2F;12&#x2F;codes-worst-enemy.html" rel="nofollow">http:&#x2F;&#x2F;steve-yegge.blogspot.ca&#x2F;2007&#x2F;12&#x2F;codes-worst-enemy.htm...</a><p>I&#x27;m not quoting this to refute the idea that Ruby has terrible tooling, or to suggest that tooling doesn&#x27;t matter. But rather, to give some context for this idea:<p>When we first embraced Ruby, we were writing web apps in Java. Ruby allowed us to write those same apps with fewer lines of code, by fewer people, in less time. That was a triple-win, and there were all sorts of secondary positive effects.<p>Fewer people on a team means less necessary process. It means less money required. YCombinator wouldn&#x27;t exist today if you couldn&#x27;t have done something meaningful with $18,000 over a few months. Less time means you can be lean and iterate, rather than spending time and tons of money trying to analyze what a market wants in advance.<p>Those factors were massive wins for the startup culture. There are similar effects within companies, but I needn&#x27;t list them out here.<p>But one negative effect is that with small teams writing fewer lines of code, in a startup culture, there is much less emphasis on tooling. It&#x27;s a &quot;nice-to-have,&quot; because app complexity does not make the difference between shipping and not shipping.<p>So yeah, there&#x27;s some tooling, but it is not very good. Really, it&#x27;s not. But it was good enough.<p>But as time went on, our apps and teams grew. Most businesses are in a Red Queen&#x27;s Race against their competition. It is very hard to stay small and focused and have a single responsibility in a market. So our code grows and grows, until it reaches a kind of equilibrium with how many lines of code a company can support. Which means we expand until we&#x27;re back to having big code bases, with many engineers.<p>And guess what? One million lines of Java is easier to understand than one million lines of Ruby. Doubly so when you have better Java tooling than Ruby tooling, and when Ruby does things that demand better tooling.<p>So now we&#x27;re in this place where successful companies have big apps, but we don&#x27;t have a &quot;big app&quot; culture, so we don&#x27;t have the tooling required to support this many lines of Java, much less this many lines of Ruby.<p>---<p>p.s. Here&#x27;s a very nice person saying the same thing at WebRebels: <a href="http:&#x2F;&#x2F;vimeo.com&#x2F;76141334" rel="nofollow">http:&#x2F;&#x2F;vimeo.com&#x2F;76141334</a>
评论 #9852575 未加载
评论 #9852336 未加载
评论 #9855285 未加载
beat将近 10 年前
The author touches on something important when comparing Ruby to Unix, and why we love them more than more structured systems.<p><i>Rigorous language is the enemy of expressive language.</i><p>That&#x27;s not to say you can&#x27;t be expressive within a rigorous system - it&#x27;s just more difficult. And you can only express the things that the rigorous language is capable of expressing. So less rigorous, less formal environments, like Ruby and Unix, allow for a great deal of fast and intuitive expressiveness.
评论 #9854840 未加载
评论 #9855404 未加载
PythonicAlpha将近 10 年前
I don&#x27;t know, if the statement is true, since I did not work with Ruby really till now.<p>But I definitively would support this statement:<p>&gt; Programming languages cannot be considered separately from their ecosystems<p>I think, one of the main reasons for the success of the C system was not the language itself, but the standard C library. Standard Pascal did not have such a thing (Borland Pascal had and was more successful as any other Pascal), Modula 2 -- a superior language at its time, did not have it (the library that was standard for Modula 2, was just to clunky for wide usage) and also other languages did not have it.<p>C, when it started, had not only the library, but also a -- for that time -- superior development environment: Unix.<p>From this, I would strongly agree, that the ecosystem is decisive -- and the bar has risen since the times of C. Today, you need top compilers or interpreters, top of the notch libraries -- best to have a framework (like Rails) for a good use-case to use the language and tools around that support your programming.<p>With all those good languages around today, any new language must have an appeal and the ecosystem and if possible the community, to be successful.
评论 #9853347 未加载
yesdocs将近 10 年前
This argument rings true and has been in the back of my mind for quite a while. To take this into a different context... for example if you were building a house per se.<p>Houses were built out of wood for years (and still is), but we slowly built tools to make it easier (Hand held saws, levels, nail guns). Now a new material has hit the market... plastic (for instance) and it is a better and more pliable medium to build a home, but we lack the tools to make it easier. It is as though we have no hand tools that will cut through it, or no nail gun that will penetrate it. Yes, it (Ruby) seems to be a better material to have a structure built with, but when you are building a lot of homes or even a mansion, it seems silly to use a material that limits what you can do to manipulate it. The argument that &quot;Ruby is so cool, I don&#x27;t need tools&quot; seems quite silly and misguided. That may be OK if you are building treehouse in your back yard, but if you are building an entire housing district, you are going to lose money in the development costs.
评论 #9853290 未加载
rquantz将近 10 年前
So what&#x27;s a language that has much better tooling than ruby, but still has a web stack as good as Rails? Does one exist?
评论 #9853972 未加载
评论 #9852696 未加载
评论 #9853892 未加载
mark_l_watson将近 10 年前
So wrong. The author has probably never tried RubyMine (or IntelliJ with the Ruby + Rails + etc. plugins).<p>I was hacking with Pharo Smalltalk just yesterday, so I get what the author means by the niceties of Smalltalk, but Ruby tools from Jetbrains are very nice.
评论 #9855555 未加载
yoklov将近 10 年前
&gt; &quot;In Smalltalk, everything happens somewhere else.&quot; - Adele Goldberg<p>Am I the only one that thinks this sounds like a maintenance nightmare?<p>I don&#x27;t understand how this could ever be a good thing.
评论 #9853103 未加载
评论 #9853333 未加载
评论 #9853044 未加载
nchelluri将近 10 年前
EDIT: I realize I left out my main point: I definitely agree with several of the points in the article. I have long wished for some way to traverse ObjectSpace easily and to know what code is being actually executed at any point in time. Lack of use of or availablity of comprehensive static analysis tools in our programming today is a huge problem, IMO. &lt;&#x2F;end edit&gt;<p>I don&#x27;t have much experience with Ruby debuggers, as I rarely use them.<p>I do use RubyMine, every day. It&#x27;s got powerful inspections and is an incredibly valuable tool for me. But, I originally used IDEA many years ago, and I don&#x27;t think that RubyMine is anywhere near as powerful, because of all the dynamism inherent in Ruby.<p>I personally think that Ruby is far too flexible a language. I use metaprogramming, monkey patching, and `method_missing` exceedingly sparingly, if at all. I try to never make code any less traceable than possible. But, I use Rails, and while I don&#x27;t dive into the Rails source very often, I&#x27;m sure there&#x27;s a lot of hidden stuff in there. All sorts of methods added to classes (ActiveSupport - inflections, time zone helpers, ... - and all the core extensions that have made their ways into gems that do not even require ActiveSupport), and all of my URL helpers which use method_missing to &quot;define methods&quot; that never existed. In a word, Ruby&#x27;s dangerous (and can be made to be very hard to reason about).<p>I have been watching <a href="http:&#x2F;&#x2F;crystal-lang.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;crystal-lang.org&#x2F;</a> every once in a while. I think one of the core strengths of Ruby is how concise and elegant it is or at least can be, and how readable it is or at least can be. It&#x27;s pretty damn nice in a lot of ways. The community support is of course incredible as well (<a href="https:&#x2F;&#x2F;github.com&#x2F;bbatsov&#x2F;ruby-style-guide" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bbatsov&#x2F;ruby-style-guide</a> is great, <a href="http:&#x2F;&#x2F;slim-lang.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;slim-lang.com&#x2F;</a> has made markup a non-arduous task, etc). Maybe we can do better.<p>EDIT: Incidentally: a lot of my complaints about Ruby are things that I would say about JS as well, but I have considerably less experience there. I just know that I&#x27;ve half-learned sooo many JS patterns. While I don&#x27;t know Python, one of the things I&#x27;ve really liked hearing about it is how there&#x27;s supposed to be &quot;one right way&quot; to do stuff. I think this is good. Code serves a purpose, it&#x27;s a functional tool - IMO, it&#x27;s not like written language where you really need a bunch of similar-but-different ways to get the same meaning across.
评论 #9852911 未加载
crimsonalucard将近 10 年前
For a second I thought that subtle background on the site was actually something physically happening on my screen.
MrBra将近 10 年前
everything within our knowledge in the material world can be fixed with enough resources. maybe for Ruby you could need more resources at the beginning given how it has been designed, but once you build up a good land upon which it will be easier to make other changes, (possibly even with a Kickstarter for a new kickass ruby implementation?) then the resources required for other changes will be comparable with the same needed in other languages. In the meanwhile in Ruby we have been profiting from nice syntax and object model, which in the end, IMHO is what paired the balance and still made us use it. This article was great in the sense that highlightinged the right approach that we would need in Ruby to make it grow to a &quot;state of the art language&quot;. I really hope this will happen but for some reason I feel a great amount of opposing force to it and I am not sure it only comes from rational thought. I&#x27;d like to see someone have their say on this aspect at a deeper level.
评论 #9869216 未加载
评论 #9869213 未加载
justinzollars将近 10 年前
The hipster backlash on Ruby continues.
评论 #9852818 未加载