I found Python's rule of space and tab is the most confusing thing that will happen to a kid. They open a command prompt, then instead starting writing the real code, they have to , blahblah , ... to do something that they hope to run. It's a waste of time.
Hello Ruby – Almost there
31–40 of 128 posts
Re: Hello Ruby – Almost there
#32I'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…
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 languages have ...)
http://mosermichael.github.io/cstuff/all/pooh-lan/2012/12/11...
Re: Hello Ruby – Almost there
#33I'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…
Re: Hello Ruby – Almost there
#34I'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…
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…
I say that as someone who has repeatedly had to help JS beginners with what I like to call accidental indentation (basically the result of copy-paste and accidental programming -- throwing code at the compiler until it works). Consistent indentation can go a long way for making code parseable by humans.
Re: Hello Ruby – Almost there
#35Incidentally the book costs less at retail, then even the lowest tier of it's Kickstarter campaign.
Re: Hello Ruby – Almost there
#36What 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.
Re: Hello Ruby – Almost there
#37I'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…
Well ruby can be written in a very boring way if it's what you don't like : # nobody can say he doesn't understand that code , whatever language he is used to reducer = lambda {|res,val,array| return res+val} def reduce(array,reducer,initial) res=initial for i in 0...array.length res = reducer.call(res,array[i],array) end return res end reduce([1,2,4],reducer,0) # => 7 But there is no perfect language which is a good…
I think using PHP as an example in defnese is misguided -- I don't think anyone here would argue that PHP is a good introduction to programming although it's certainly something that introduced a lot of "us" to programming ("us" being web developers who started with programming in the late 1990s or the turn of the millennium).
> 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.
It has everything to do with the language. There's no point learning any language if you won't be able to try it out. So availability is a major factor.
PHP is supported by nearly every a-buck-a-month webspace host out there, which is why it is so accessible to anyone who can figure out how to use FTP. JavaScript is supported by the browser itself -- something nearly everyone is likely to have already installed on their computer.
Python, Ruby and so on have to actually be installed locally. And even if your package manager for some reason doesn't have Python 3 available you can nearly always get a fairly recent version of Python 2 and PIP. But even so, Python is only marginally easier to set up than Ruby.
> Your opinion but some points aren't fair at all.
Sure. I didn't say there is a language that meets all of my requirements. But that's precisely the point: there is no perfect language, but IMO there are generally better choices than Ruby. Which choice is best for any given situation of course depends on how you weigh the different factors (e.g. Ruby is likely the best choice for parents who already are Ruby programmers).
Re: Hello Ruby – Almost there
#38I'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…
My personal experience has been that it makes a great first language, It's very natural to write, and easy to type. You start with super-short examples that are easily understood, using a bare-bones editor. Explaining blocks and iterators is a challenge of course.
There's quite a lot of approachable and creative content about learning Ruby out there, which makes it helpful for beginners looking to self-study. Books like "Hello Ruby" are great for kids starting from zero, who need more motivation and fun compared to the "For Dummies" or "From Scratch" approaches.
That being said, I agree with your feelings about the language as intended for beginners. However, I tried to teach my 9-year-old daughter Java (using an online course for making Minecraft Mods). And although she was able to get through it, Java is still perplexing. The IDE, strictness and verbosity were overwhelming. Similarly, I tried to teach my nephew Javascript (we made a game together) in a browser. Trying to explain `.this` and dealing with input handling was pretty hard to get through. He didn't take it much further.
Re: learning to code... I believe it's not so much about what language you choose to teach. It's about the quality of the course materials, and how quickly the concepts can be understood. Ruby has a lot going for it there.
Re: Hello Ruby – Almost there
#39Earlier quoted context omitted.
Well ruby can be written in a very boring way if it's what you don't like : # nobody can say he doesn't understand that code , whatever language he is used to reducer = lambda {|res,val,array| return res+val} def reduce(array,reducer,initial) res=initial for i in 0...array.length res = reducer.call(res,array[i],array) end return res end reduce([1,2,4],reducer,0) # => 7 But there is no perfect language which is a good…
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 JavaScript you only need a browser.
Re: Hello Ruby – Almost there
#40I'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…
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 do you mean by this? Can you give an example?