Live data from Hacker News

Hello Ruby – Almost there

blog.helloruby.com

41–50 of 128 posts

Re: Hello Ruby – Almost there

#41
post #39

Earlier quoted context omitted.

Your example is understandable, but not the norm. Most ruby in the wild is much more esoteric (and that's what you get when googling). >Because that's not the case for Python or PHP on linux too? I bet it is,and it has nothing to do with the language itself. I don't know about PHP, but the Python situation is very workable. It's basically just 2 or 3, and you can write code that is portable between them, or better ye…

For PHP you only need a run-of-the-mill sub-$1/month webspace provider and FTP. And that also gives you a way to share your projects with friends. For JavaScript you only need a browser.

I think PHP is harmful and should never be a first language.

JavaScript is getting good enough to be a good first choice, though, and it is very easy to get up and running with.

Re: Hello Ruby – Almost there

#42
post #22

I'm not sure whether Ruby is a good intro to programming. It doesn't have first-level functions, instead it has blocks (which can take parameters to serve the same use as functions but aren't). What would syntactically be a reference to a method in other languages instead invokes the method with no arguments. It doesn't have namespaced imports, instead its imports effectively behave like includes (i.e. the "dump truc…

> I'm not sure whether Ruby is a good intro to programming.

> It doesn't have first-level functions, instead it has blocks

Hold it right there. If first-level functions, blocks and module systems are the first thing that springs to your mind when talking about teaching people with _zero, none, absolutely no_ previous experience with coding, you are speaking at a completely different level.

That reads far more like an attempt to discredit a language you don't like then actually caring about the subject matter at hand (teaching coding to kids).

Re: Hello Ruby – Almost there

#43
I don't believe the book is ready to ship yet, but I'm looking forward to when it is! I had the pleasure of working with Linda (author of this book) a few years back and she is really a wonderful person and I'm very happy for the initial success of Hello Ruby.

Re: Hello Ruby – Almost there

#44
post #35

What makes you think the book is ready? We've been told (KS backers) that the book isn't shipping until October 2015. There is absolutely nothing that you've linked to to indicate that it's ready. Incidentally the book costs less at retail, then even the lowest tier of it's Kickstarter campaign.

It's always really disappointing for me when people see Kickstarting as a way of purchasing the end product. With economies of scale you should really expect prices to come down for retail. What you're getting for the money with a kickstarter campaign is the chance to help someone realise their product, which hopefully you believe in, without the creative inhibitions that come with strings-attached funding.

You must be disappointed a lot then?

I did believe in her product. What I didn't believe in was an utter lack of regard to KS backers, poor communication, misdirections, a publishing contract with Macmillan, a late delivery (while being less than truthful with KS about it).

The author bears some responsibility for changing my mind from believing in her product (what you call helping, "someone realise their product") to simply just wanting the end result of what I paid for at a higher cost than retail.

Re: Hello Ruby – Almost there

#45

Earlier quoted context omitted.

What i don't like about Ruby is that undefined variables can be accessed without error (just like javascript); Python is better in this regard; However pythons indentation think is not so great for teaching intro to programming. i have my own small project - the pooh language; it probably has other features which might annoy some people (downside is that it does not have all these libraries that the grown up language…

> What i don't like about Ruby is that undefined variables can be accessed without error (just like javascript) What do you mean by this? Can you give an example?

Accessing undefined/unitialized global or instance variables (like: @i) is not an error and nil will be returned. With -w a warning will be emitted. The weird class variables must be initialized. Local variables (lexically scoped) must be defined and are default-initialized to nil. (Global and class variables are usually not used.)

Re: Hello Ruby – Almost there

#46
post #22

I'm not sure whether Ruby is a good intro to programming. It doesn't have first-level functions, instead it has blocks (which can take parameters to serve the same use as functions but aren't). What would syntactically be a reference to a method in other languages instead invokes the method with no arguments. It doesn't have namespaced imports, instead its imports effectively behave like includes (i.e. the "dump truc…

This is a book for teaching young kids. Trying to start them off with a language like Java or C# would be a terrible idea; not because they are bad languages, but because they have such a high learning curve.

With something like Ruby we can start the child right off with

puts 'Hello World'

Immediately they have a positive feedback cycle. At this stage they don't need to know that a top level object has been implicitly created for them and this statement is part of that object. We'll get to that stuff later. Start off basic with some simple lines of working code. Move up to conditionals, loops, add in methods later in a sort of procedural fashion. Eventually higher level concepts will be introduced.

Also to this point of yours, "It doesn't have first-level functions, instead it has blocks (which can take parameters to serve the same use as functions but aren't)."

That is one of those things that comes from someone that hasn't spent enough time with the language. While the treatment is slightly different, the outcome is the same. Ruby supports closures and passing methods to methods.

Before you retort with, "But blocks/procs aren't 'really' methods", you might also want to step back and realize that Ruby also allows any method to be passed as well using &Object.method(:method_name); that basically says "Oh hey; pass this method just like a block".

Re: Hello Ruby – Almost there

#47
post #22

I'm not sure whether Ruby is a good intro to programming. It doesn't have first-level functions, instead it has blocks (which can take parameters to serve the same use as functions but aren't). What would syntactically be a reference to a method in other languages instead invokes the method with no arguments. It doesn't have namespaced imports, instead its imports effectively behave like includes (i.e. the "dump truc…

I don't think it's just that Ruby isn't a good intro to programming. I don't think Object Oriented languages are a good intro to programming. OOP is just way too abstract. In the teaching I've done (some adults and kids) they tend to get the basics of FP where everything is just a list much better than the weirdness of objects.

Re: Hello Ruby – Almost there

#48
post #22

I'm not sure whether Ruby is a good intro to programming. It doesn't have first-level functions, instead it has blocks (which can take parameters to serve the same use as functions but aren't). What would syntactically be a reference to a method in other languages instead invokes the method with no arguments. It doesn't have namespaced imports, instead its imports effectively behave like includes (i.e. the "dump truc…

JS will probably mess up my kid's mind as much as ruby.

My choices for intro programming language would probably be Haskell and Coffeescript - both has a simple but coherent set of concepts and a straightforward syntax designed around those concepts.

Re: Hello Ruby – Almost there

#49
post #22

I'm not sure whether Ruby is a good intro to programming. It doesn't have first-level functions, instead it has blocks (which can take parameters to serve the same use as functions but aren't). What would syntactically be a reference to a method in other languages instead invokes the method with no arguments. It doesn't have namespaced imports, instead its imports effectively behave like includes (i.e. the "dump truc…

I'm probably in the minority here, but I think that starting with the low level - bits, data representation/interpretation, and logic (which leads to CPU operation) - is the best path to go when starting to learn programming, because it really dispels a lot of the "magic" and mystery behind computers that can confuse beginning programmers when their code doesn't work as they expect.

The idea that computers are conceptually very simple and logical in operation, and that any surprising behaviour is really the result of interacting layers of complexity rather than an intrinsic property of the machine, is something that should be firmly kept in mind whenever programming, or even just using, a computer.

Re: Hello Ruby – Almost there

#50
post #22

I'm not sure whether Ruby is a good intro to programming. It doesn't have first-level functions, instead it has blocks (which can take parameters to serve the same use as functions but aren't). What would syntactically be a reference to a method in other languages instead invokes the method with no arguments. It doesn't have namespaced imports, instead its imports effectively behave like includes (i.e. the "dump truc…

I'm not sure programming is a good intro to programming.

It isn't the actual coding, or syntax of languages that trip people up, at least not when first learning. At any age, it is the logic that needs to come first. How code flows, branches, how to work with variables, and build up to more complex structures.

It is the same as learning math - you learn how to count to 10, then 100, then start manipulating them via basic addition. Or to read, we first learn the alphabet. For teaching kids to code, first they need to understand the very basics.

There are many products coming along that are working on ways to teach these basic concepts to children, using literal blocks in some cases, to give kids a base skill set before ever actually getting into what could be called "code".

Post reply on HN