tag:blogger.com,1999:blog-8678405.post5525501875600224808..comments2023-09-02T15:54:52.482+01:00Comments on Ricky's technical blog: Which language shall we learn?Ricky Clarksonhttp://www.blogger.com/profile/13845104548520132930noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-8678405.post-13540520149886520952009-11-17T22:15:00.751+00:002009-11-17T22:15:00.751+00:00in Ruby You can write:
p("Enter name: "...in Ruby You can write:<br /><br />p("Enter name: ")<br />p("Hi, " + gets.chomp)marek_knoreply@blogger.comtag:blogger.com,1999:blog-8678405.post-88007208858271210932009-10-03T08:27:54.118+01:002009-10-03T08:27:54.118+01:00The Python and Scala examples are my favourites - ...The Python and Scala examples are my favourites - they're easier to understand for a beginner.Helen Hunthttp://valashiya.blogspot.comnoreply@blogger.comtag:blogger.com,1999:blog-8678405.post-14840901161715144762009-09-28T12:13:18.542+01:002009-09-28T12:13:18.542+01:00Hi Ricky,
I've reached the conclusion that...Hi Ricky,<br /><br /> <br /><br />I've reached the conclusion that the ‘easiest’ language to my eyes and brain might be number “9”.<br /><br /> <br /><br />Do you think that with my chosen option I might be able to understand a tiny winy bit how to program?<br /><br /> <br /><br />Te amo,<br /><br /> <br /><br />JoseJose De Lucahttps://www.blogger.com/profile/05445514017664044630noreply@blogger.comtag:blogger.com,1999:blog-8678405.post-69608541909153191862009-09-28T09:27:46.084+01:002009-09-28T09:27:46.084+01:00Thanks Jim, fixed.Thanks Jim, fixed.Ricky Clarksonhttps://www.blogger.com/profile/13845104548520132930noreply@blogger.comtag:blogger.com,1999:blog-8678405.post-25284312141962194742009-09-28T09:13:46.011+01:002009-09-28T09:13:46.011+01:00Should be
var name = Console.ReadLine();
instead...Should be <br /> var <b>name</b> = Console.ReadLine();<br />instead of<br /> var line = Console.ReadLine();<br />in 6, I think.Anonymoushttps://www.blogger.com/profile/10979503340489436428noreply@blogger.comtag:blogger.com,1999:blog-8678405.post-71501731314003899372009-09-27T15:46:23.805+01:002009-09-27T15:46:23.805+01:00I always use "strict" myself, but, stric...I always use "strict" myself, but, strictly speaking :-), it is not necessary and the examples don't seem to place any emphasis on good coding standards.<br /><br />However, I can understand your feelings given that background! :-)Danielhttps://www.blogger.com/profile/07505997833685327219noreply@blogger.comtag:blogger.com,1999:blog-8678405.post-43609442275248769232009-09-27T04:41:37.454+01:002009-09-27T04:41:37.454+01:00Thanks, Jorge, I changed the Scala version.
Danie...Thanks, Jorge, I changed the Scala version.<br /><br />Daniel, I used to teach Perl programming for about 6 weeks per year, but with someone else providing tutorial notes; he never used strict or warnings, and students struggled. After a couple of weeks I used to write them in huge letters on the whiteboard and I'll never skip them again.<br /><br />I added 'my' and chomp, but I won't be removing use strict;!Ricky Clarksonhttps://www.blogger.com/profile/13845104548520132930noreply@blogger.comtag:blogger.com,1999:blog-8678405.post-4018004794316836532009-09-27T02:58:35.457+01:002009-09-27T02:58:35.457+01:00I meant "$line" instead of "$name&q...I meant "$line" instead of "$name". Also, you'll need to chomp it.Danielhttps://www.blogger.com/profile/07505997833685327219noreply@blogger.comtag:blogger.com,1999:blog-8678405.post-89593634701165904022009-09-27T02:55:18.045+01:002009-09-27T02:55:18.045+01:00The perl example needed not "use strict"...The perl example needed not "use strict". And, because you used it, it won't run, as you did not qualify "$name" with "our" or "my".<br /><br />Also, it would be better with "readline" instead of "<>" -- since that's what's used in the other examples.Danielhttps://www.blogger.com/profile/07505997833685327219noreply@blogger.comtag:blogger.com,1999:blog-8678405.post-90482203083751820242009-09-27T00:43:54.821+01:002009-09-27T00:43:54.821+01:0077Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8678405.post-39850631463371132752009-09-27T00:06:06.313+01:002009-09-27T00:06:06.313+01:00Scala has a more idiomatic (and cross-platform) so...Scala has a more idiomatic (and cross-platform) solution:<br /><br />val name = Console.readLine("Please enter your name.")<br />Console.println("Nice to meet you, "+name+".")Jorge Ortizhttps://www.blogger.com/profile/14454965475839432618noreply@blogger.com