«« Next » « Previous
«« Next » « Previous

Link Details

DZone can't read your mind. Tell us what you like! Login and vote now.
Link 65261 thumbnail

By kschrader
via kurt.karmalab.org
Published: Feb 07 2008 / 17:28

People writing Rails apps without tests are idiots. Either that, or they don't have any sort of complexity in their apps and they're writing them in a far too simplistic and elementary way. Tests are your only protection in Ruby against changes in one part of your code base haveing having adverse effects on another part.
  • 8
  • 7
  • 1709
  • 527

Comments

Add your comment
User 102928 avatar

dglasser replied ago:

-4 votes [show comment] Vote down Vote up Reply
User 186462 avatar

Jeremy Weiskotten replied ago:

5 votes Vote down Vote up Reply

You write unit tests to verify the behavior of your Ruby code, just like you would (...or should) in Java or any other language. Unit testing is important no matter what language, framework, or domain you're working in.

However, many of the language features that make Ruby elegant happen to also be useful in your tests. This means you can spend less time writing and maintaining tests -- or that you have more time available to write and maintain tests if you need it.

User 205958 avatar

planetmcd replied ago:

0 votes Vote down Vote up Reply

dglasser was in quite a predicament, the article only conditionally cast Ruby/Rails in a negative light. Down vote because of Ruby? Upvote because of reference to possible Rails failure? What's a troll to do?

User 102928 avatar

dglasser replied ago:

-5 votes [show comment] Vote down Vote up Reply
User 205958 avatar

planetmcd replied ago:

2 votes Vote down Vote up Reply

People can take a look at the following links and decide if your comments are considered or Anti Ruby FUD.
http://www.dzone.com/links/say_it_aint_so_ruby_on_rails_not_threadsafe_no_pr.html
http://www.dzone.com/links/thanks_to_zed_ruby_related_posts_on_jroller_are_a.html
They can vote me down if they disagree at casting you as an anti ruby/rails troll. They would be hard pressed to find your up votes or positive comments on technical, non opinion Ruby specific pieces. Perhaps I missed them though, send a link.

If you feel type safety and a compiled language are the superior solution instead of Unit tests, why don't you stipulate that.

If Unit Testing is so foolish, why don't state that?

Instead you felt compelled to take a shot at Ruby, implying that software will blow up at runtime because it is dynamically typed. Are you really contending that type safety is the solution for the problem Unit testing solves? Then why not say that?

This post is not tagged Java and it does not belittle it. If you don't want to be labeled a troll, stop making troll like comments.

User 102928 avatar

dglasser replied ago:

-4 votes [show comment] Vote down Vote up Reply
User 205958 avatar

planetmcd replied ago:

0 votes Vote down Vote up Reply

We get you don't like Ruby and don't think its going anywhere. I disagree, but that is a debatable point and appropriate for other opinion posts. But specific to this post, which part of this post attacked Java? None. What part of this post hyped Ruby or Rails and knocked another approach? None.

This post had nothing to do with market share, relative language merit, lines of code, Ruby Community, bashing Java or anything else you just listed. You left an unsolicited trollish comment about Ruby on a post relating to Test Driven Development and Rails. That's the very definition of a troll.

User 102928 avatar

dglasser replied ago:

0 votes Vote down Vote up Reply

For the bazillionth time, I NEVER SAID I DIDN'T LIKE RUBY. It's Ruby *people*, I don't like, specifically those like you who see Ruby as a cause rather than a tool, and who feel it's their sacred duty to defend it from heretics like me who don't climb on the bandwagon. And are you really that dull-witted that you think I implied somewhere that this post attacked Java? Read carefully now: I vote down pro-Ruby posts that take swipes at Java, not pure pro-Ruby posts, and I vote up posts that expose some of the reality behind the cultish hype surrounding Ruby, like this one. And believe me, planetmcd, my intent is not to bug the hell out of you when I do this, but obviously my votes and occasional comments have that effect on you. But you really shouldn't worry so much. The object of your religious devotion will not be harmed by my occasional expression of my opinions.

User 102928 avatar

dglasser replied ago:

-1 votes Vote down Vote up Reply

And BTW, planetmcd, it seems you really want me to shut up, and if that's the case, your best approach would be to ignore me, because when you tell me that my opinions are "appropriate for other opinion posts" (i.e. I shouldn't express them here) then I feel compelled to express them. So once more:

Ruby is a niche language.

Ruby may be a nice language, but there is only a very tiny level of demand for Ruby developers, in spite of what the breathless hype might suggest. If someone intends to learn to program for the purpose of working as a software developer, Ruby would be a poor choice to start with. The exact same thing could be said about a lot of other languages as well.

Ruby and Ruby on Rails have spawned a cult of annoying pests who feel that is their religious duty to monitor online forums for heretical statements about Ruby or Ruby on Rails, and take the heretics to task for their blasphemy. If you want to examine peoples' dzone voting patterns the way you've examined mine, notice how almost any post that's even slightly critical of Ruby gets a number of down votes close to the number of up votes.

People who are especially brazen in their lack of respect and devotion and worship for Ruby will get singled out for special attacks, as Obie Fernandez did with me and Daniel Spiewak.

User 205958 avatar

planetmcd replied ago:

1 votes Vote down Vote up Reply

I hadn't realized you are on a crusade. My bad.

That's a lot of smoke and mirrors to deflect attention from the point that you posted a clearly anti Ruby trollish comment on a pretty non controversial Rails best practice post. For that matter, its a great Java best practice as well. You'll likely dissemble further and say you're attacking Ruby people not Ruby, but that a distinction without difference and you did refer to Ruby "blowing up at runtime". You seem to be aware that when you post inflammatory comments about Ruby it draws response, and you posted an inflammatory comment on a Ruby post. That's pretty trollish. Oh, except when you do it because you have a mission.

If you want to lambaste Ruby/Rails or anything else, that's your prerogative and I disagree with your analysis of Ruby's viability and while there are numerous posts related to that topic, this is not one. You just seem to want it to be. That is what makes you a troll here.

But every raving reply that you're working to keep the Ruby zealots in check underscores my point. How are you different than the asshats that go around attacking Java for no good reason except that maybe some of them used to use Java professionally?

User 102928 avatar

dglasser replied ago:

0 votes Vote down Vote up Reply

Ruby is a niche language.

Ruby may be a nice language, but there is only a very tiny level of demand for Ruby developers, in spite of what the breathless hype might suggest. If someone intends to learn to program for the purpose of working as a software developer, Ruby would be a poor choice to start with. The exact same thing could be said about a lot of other languages as well.

Ruby and Ruby on Rails have spawned a cult of annoying pests who feel that is their religious duty to monitor online forums for heretical statements about Ruby or Ruby on Rails, and take the heretics to task for their blasphemy. If you want to examine peoples' dzone voting patterns the way you've examined mine, notice how almost any post that's even slightly critical of Ruby gets a number of down votes close to the number of up votes.

People who are especially brazen in their lack of respect and devotion and worship for Ruby will get singled out for special attacks, as Obie Fernandez did with me and Daniel Spiewak.

User 205958 avatar

planetmcd replied ago:

0 votes Vote down Vote up Reply

What's the viability of the childish troll niche, you're in on the ground floor?

User 102928 avatar

dglasser replied ago:

-1 votes Vote down Vote up Reply

Thanks for giving me the opportunity to spread the word: (Pay attention, search engines!)

Ruby is a niche language.

There is only a very tiny level of demand for Ruby developers, in spite of what the breathless hype might suggest. If someone intends to learn to program for the purpose of working as a software developer, Ruby would be a poor choice to start with.

Ruby and Ruby on Rails have spawned a cult of annoying pests who feel that is their religious duty to monitor online forums for heretical statements about Ruby or Ruby on Rails, and take the heretics to task for their blasphemy. If you want to examine peoples' dzone voting patterns the way you've examined mine, notice how almost any post that's even slightly critical of Ruby gets a number of down votes close to the number of up votes.

People who are especially brazen in their lack of respect and devotion and worship for Ruby will get singled out for special attacks, as Obie Fernandez did with me and Daniel Spiewak.

User 205958 avatar

planetmcd replied ago:

0 votes Vote down Vote up Reply

Yes search engines, take note, dglasser is a petulant, childish troll who embodies the principles of "lack of respect" and "foolish devotion and worship" he or she purports to detest.

User 102928 avatar

dglasser replied ago:

0 votes Vote down Vote up Reply

Another example of what happens when someone disses Ruby. The Ruby cultists will come after you and attack you personally.

And notice, planetmcd, that my first post was inarguably on-topic and rather benign. And then look at your response.

User 205958 avatar

planetmcd replied ago:

2 votes Vote down Vote up Reply

Since the topic was about using unit tests as a best practice for Rails development and you stated that ruby [projects] would blow up at runtime without unit tests, presumably because it's dynamically typed (presumably, I hate to try to inject reason into a conversation with a troll). I suppose in you're mind because you used the words Unit Test as did the post, it's on topic, but you're comment is patently false, displays ignorance about the use of unit tests, and was intentionally incendiary. Perhaps that's what passes for humor among the trolls, you'd know more about that.

Characterizing you as a troll here is not a personal attack, its an accurate description of your churlish behavior. This is not an anti Java piece or controversial piece, yet you chose to make a trollish comment and then when your poor behavior is pointed out you look to blame everyone else and behaved even worse. You rant on about cultists, repeating the same off topic trollish posts and threaten retribution to people who don't fit your world view.

Having programmed in Java and Ruby professionally, I'm quite comfortable with discussions of Ruby and Rails weaknesses and strengths vis a vis other technologies, and there are both. On those type of posts, I've debated these points with you and others and people are free to look at both our positions and draw their own conclusions. Healthy rational debate is educational, even if it's partisan in nature.

I am also quite comfortable pointing out when people are acting trollish, as you are here. This not about cults or aliens or what ever else raises you're dander, it's about you behaving like a troll here, just like the Ruby/Rails clowns who go to Java posts/boards and bash Java. You're cut from the same cloth.

User 102928 avatar

dglasser replied ago:

0 votes Vote down Vote up Reply

An on-topic comment is met with name calling. It's a really creepy cult that's grown up around Ruby on Rails. You guys just can't let any comment that disses Ruby go unchallenged, can you?

Let's see how long we can keep this back-and-forth going, planetmcd, OK?

User 102928 avatar

dglasser replied ago:

-1 votes Vote down Vote up Reply

And BTW, planemcd, your reliance on lies is unbecoming. I never said that a ruby project would blow up at runtime without unit test, just that you need the tests to *insure* that it won't. That's an important distinction. Presumably, most Ruby code is correctly written, at least as far as symbols go, but you just never know without those unit tests.

It boggles my mind how much that simple statement upsets you.

User 205958 avatar

planetmcd replied ago:

1 votes Vote down Vote up Reply

It seems you're easily boggled.

"...rarely mention how many extra lines of unit testing code it will take simply to insure that it [Ruby] won't blow up at runtime."

The implication is pretty clear that ruby project would blow up without unit tests to insure type safety. That's just stupid. Unit testing is to test functionality and is good practice in Static or Dynamically typed languages. Somehow Java managed to survive for years without type safety in container classes (e.g. ArrayList and HashMap), though given your on topic position, it should not have without unit tests. It should have blown up at runtime.

If you had some real technical point or challenge you would have made it. Instead you made a snide comment and then acted with childish umbrage when challenged. Your foolishness and churlishness should be called on the carpet, just as it should be with your brethren Ruby/Rails trolls. I suspect they tick you off so much because you share a similar M.O. You don't like the acerbic portion of the Ruby/Rails community and their behavior on Java forums and find them cultlike. So you have decided to act like them and make inflammatory comments on a Ruby post. That'll show 'em.

Oh, and if any one disagrees with your methods, they must be a part of the cult. You could never behave poorly, you have a crusade. It's clearly someone else's fault. They just don get it. Oops, sorry that one is already used for disagreeing with Rails orthodoxy.

You're cult will need its own slogan. You're not with me, you're against me. No , that was used by George Lucas.

Since trolls like you enjoy irritating people, how about "Itch the niche"? Or if you're not interested in cult status and are the lone gunman/manifesto type, "There's no Rails sasser like dglasser." It's not Ali, but it's a start.

User 205958 avatar

planetmcd replied ago:

1 votes Vote down Vote up Reply

OOh, got another one. With regard to Rails adoption: Prevention over Proliferation.

User 205958 avatar

planetmcd replied ago:

1 votes Vote down Vote up Reply

How about DRY US DWY: Don't Repeat Yourself, Unless Someone Disagrees with You.

User 102928 avatar

dglasser replied ago:

-1 votes Vote down Vote up Reply

Well, this I don't think can be repeated enough:

Ruby is a niche language.

There is only a very tiny level of demand for Ruby developers, in spite of what the breathless hype might suggest. If someone intends to learn to program for the purpose of working as a software developer, Ruby would be a poor choice to start with.

Ruby and Ruby on Rails have spawned a cult of annoying pests who feel that is their religious duty to monitor online forums for heretical statements about Ruby or Ruby on Rails, and take the heretics to task for their blasphemy. If you want to examine peoples' dzone voting patterns the way you've examined mine, notice how almost any post that's even slightly critical of Ruby gets a number of down votes close to the number of up votes.

People who are especially brazen in their lack of respect and devotion and worship for Ruby will get singled out for special attacks, as Obie Fernandez did with me and Daniel Spiewak.

User 205958 avatar

planetmcd replied ago:

1 votes Vote down Vote up Reply

That's way too long for a cult motto. You'll need to move that to the about page. I have faith that a droll individual like yourself can do better. You didn't like Prevention over Proliferation? Trolls are a fussy bunch.

In case your new anti rails hype cult web page editor is a fuss budget, niche is not adjective, it's a noun or a verb. The subtleness of your point has crept through, but I think you mean Ruby is a language that operates in a small niche (for greater weight I would use inconsequential, it sounds smarter). Pointing out your poor etiquette, helping you with cult motto's, correcting the grammar on your trollish posts, who knew feeding a troll was so much work. I should'a got a cat.

User 102928 avatar

dglasser replied ago:

0 votes Vote down Vote up Reply

Did I mention that Ruby is a niche language?

There is only a very tiny level of demand for Ruby developers, in spite of what the breathless hype might suggest. If someone intends to learn to program for the purpose of working as a software developer, Ruby would be a poor choice to start with.

Ruby and Ruby on Rails have spawned a cult of annoying pests who feel that is their religious duty to monitor online forums for heretical statements about Ruby or Ruby on Rails, and take the heretics to task for their blasphemy.

User 205958 avatar

planetmcd replied ago:

1 votes Vote down Vote up Reply

How about playing to the anti Rails trek market:
We are Rails.org, Persistence is futile!

User 273739 avatar

pmarreck replied ago:

1 votes Vote down Vote up Reply

Did I mention that you're a niche asshole with a chip on your shoulder? Because I gather this, after reading this entire thread.

People use Ruby, and/or Rails, and/or Java, and/or your super duper type-checking language, because they enjoy it. Or at least, that should be the reason. A bunch of people love Ruby, or Rails, and when you love your tool, you usually do great work. And from what I have seen, the Ruby and/or Rails community has done some amazing work. Pardon my language, but who the fuck cares if it's a "niche language" or not, you moron. Every language was once a "niche language". By your logic, we should all be still programming in Fortran.

So please go back to Fortran, oh wait, I'm sorry, Java... and fuck off... unless you want to be civil. ok?

Ruby might never be big. It might never even get medium-size. Surprise! _We_don't_care_. Why don't you go after the Lisp or the Smalltalk folks? Those are some REAL cultists. ;) Seriously...

McDermott, I'm sorry this yahoo has irritated you seemingly out of spite, and without much reasoning. Fortunately, I feel very protective of this community of geeks, and I'm a little outspoken, and I step up if people start pushing and shoving. Crazy and cultish of me, I know. Dglasser, be advised that your personal information is all over the Internet via your alias, and anyone who might want to reach out and touch someone would have hardly any trouble doing so... so I'd think twice about replying any further with this attitude and tone of yours. Thank you, and have a nice, test-free, type-checked day.

User 102928 avatar

dglasser replied ago:

0 votes Vote down Vote up Reply

OK Peter, you win, I give up. Profanity, gratuitous personal attacks, and a veiled threat regarding my "personal information" (which I obviously don't try to conceal) is a little bit too creepy for me... It was fun sparring with Michael, but man, you take it to a whole new level. But as a final word, to answer your question about Lisp or Smalltalk folks, I don't "go after them" because they don't go after me whenever I express a less-than-reverent opinion about those languages. But say something negative about Ruby or Rails, and guys like you and Michael come crawling out of the woodwork with guns blazing.

User 205958 avatar

planetmcd replied ago:

1 votes Vote down Vote up Reply

I think Peter was just pissed and venting and there is no danger here. On another note, should we just keep going back and forth until the shrinking columns are 1 word wide?

In the interest of comity and perhaps actual dialog, what do you propose as your preferable general purpose web application solution, Java or otherwise? Having spent years with home grown servlet systems (pre Struts), Struts, and then a bit of Spring MVC before I switched to Rails 2-3 years back, Rails was fantastic breath of fresh air and there was nothing comparable on the Java market, I didn't know about Django, and I dislike working in PHP, which didn't have a comparable offering at the time anyway. Groovy looks interesting to me, but I do not like it's syntax as much as Ruby's.

User 205958 avatar

planetmcd replied ago:

0 votes Vote down Vote up Reply

The article seems to be a bit of hyperbole (at least I hope it is). smackjer hit the nail on the head. Tests are vital pieces for all programming and verify functionality. However, the notion that a project will fail without them has been proven false in ton's of languages for quite some time. Ruby is no different.

Dynamically typed languages have advantages/costs, one cost is that a compiler doesn't check that a string is a string etc. Tests tend to catch this type of error because if you pass an object of the wrong type, a test will fail assuming its a good test. Good tests are good practice in general but have the added benefit of partially mollifying concerns about type safety.

This notion is in no way endemic to Ruby and/or Rails and the same critique can be applied to Python, Javascript, or any other dynamically typed language.

User 273404 avatar

pauliephonic replied ago:

3 votes Vote down Vote up Reply

I don't need tests cos I'm smart and can grok my whole complex app at once. Easy!,

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.