Live data from Hacker News

RubyWarrior - Bloc

bloc.io

61–70 of 70 posts

Re: RubyWarrior - Bloc

#61
post #57

I am really disappointed that Ryan Bates is not being STRONGLY credited anywhere on this page... this is just a graphical wrapper on his original creation. https://github.com/ryanb/ruby-warrior

It's in the footer...

ah so it is... was below the fold and I didn't see it :-/

Re: RubyWarrior - Bloc

#62
As someone who has never done any development in Ruby. I loved the idea and wanted to use. However what makes it not accessible is that you give no instruction initially on the structure of Ruby syntax. This means that I would need to follow another book or tutorial. Please consider drip feeding the player a syntax cheat sheet that will help with each level .

Re: RubyWarrior - Bloc

#63

Earlier quoted context omitted.

I don't feel `.is_a?(Class)` is ever idiomatic ruby. You should always be coding to an interface, not an implementation. This prevents things like mocks and duck typing, making testing more difficult and adding complexity when you want to add AnotherEnemy that doesn't share the same inheritance tree. I try to avoid using `.is_a?(Class)` in all of my ruby code when possible. `.respond_to?` is much more responsible way…

> I try to avoid using `.is_a?(Class)` in all of my ruby code when possible. `.respond_to?` is much more responsible way of probing whether an object has the interface you are looking for. #is_a?(class) is a much more specific check of semantics than #respond_to?(method_name). is_a? is the more cautious approach (least likely to produce false positives at the expense of being most likely to produce false negatives) w…

Are you coming from java? That's my background (at least one of them), and felt that way too. Interface === API contract == safe.

But that really isn't the only way to do things. Read up on http://en.wikipedia.org/wiki/Duck_typing

Re: RubyWarrior - Bloc

#66

Earlier quoted context omitted.

> I try to avoid using `.is_a?(Class)` in all of my ruby code when possible. `.respond_to?` is much more responsible way of probing whether an object has the interface you are looking for. #is_a?(class) is a much more specific check of semantics than #respond_to?(method_name). is_a? is the more cautious approach (least likely to produce false positives at the expense of being most likely to produce false negatives) w…

Are you coming from java? That's my background (at least one of them), and felt that way too. Interface === API contract == safe. But that really isn't the only way to do things. Read up on http://en.wikipedia.org/wiki/Duck_typing

Exactly, you got it. is_a? and respond_to? are code smells.

Re: RubyWarrior - Bloc

#67

Earlier quoted context omitted.

> I try to avoid using `.is_a?(Class)` in all of my ruby code when possible. `.respond_to?` is much more responsible way of probing whether an object has the interface you are looking for. #is_a?(class) is a much more specific check of semantics than #respond_to?(method_name). is_a? is the more cautious approach (least likely to produce false positives at the expense of being most likely to produce false negatives) w…

Are you coming from java? That's my background (at least one of them), and felt that way too. Interface === API contract == safe. But that really isn't the only way to do things. Read up on http://en.wikipedia.org/wiki/Duck_typing

> Are you coming from java?

Well, java was one of the languages I used before Ruby, but I've done more Ruby than Java.

> Read up on http://en.wikipedia.org/wiki/Duck_typing

I am well aware of duck typing, and rarely use either #is_a? or #respond_to?

That doesn't change that, if you have a reason to use that type of inquiry to check interfaces, #is_a? is the more safe of the two (more likely to reject an object that provides the semantics of concern and less likely to accept one that does not) and #respond_to? is the less safe (more likely to accept an object that does not provide the semantics of concern and less likely to reject one that does.)

Re: RubyWarrior - Bloc

#68
post #14

Earlier quoted context omitted.

Hey! You made ImpactJS? That's very cool, but it's really hard to commit $99 to buy an engine when I can't even try it! It looks super-rad and I'd love to give it a shot, but it's a bit high of a bar for a casual game dev.

If you buy it and don't like it for whatever reason, I can give you a full refund within the first month. That's easier for me to handle than a separate trial license.

That's the same way RubyMotion handles trials; it's great to see other developers adopting the same policy/model.

(At least from an end-user standpont. Obviously, you should do your own testing for conversion rate/etc.)

Re: RubyWarrior - Bloc

#70

It would be cool if the game commited your code to a github repo every level. This way you could see your own progress, and see what solutions other came up with without bugging them.

Maybe a gist would be appropriate?
Post reply on HN