TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Convince My Friend To Learn Ruby, Not Java, As A 1st Language

5 pointsby jasondrowleyover 13 years ago
A bit about my friend: He's absurdly good at chess, has a BA in English from the University of Chicago, and really, really wants to learn to code.<p>I'm a PHP and JQuery guy myself (in the process of learning "real" JavaScript), so other than making some blunt generalizations about Java programmers vis-a-vis Ruby programmers, I'm not of much help.<p>Some things he'll want to know: Which is easier to learn? What're the employment prospects for skilled developers using Ruby vs. Java? If he decides that Ruby isn't for him, how easy would it be for him to learn Java's syntax with some Ruby under his belt, and vice versa? If not Ruby or Java, than what other languages should he pursue learning? (I recommend JS, but he knows I'm biased.)<p>Anyways, after a few weeks of talking with him about learning to program, my friend seems pretty dedicated. He's willing to put in a lot of time into this. Any resources you can post for a newbie programmer would also be much appreciated.<p>Thanks, HN!

7 comments

gexlaover 13 years ago
I suppose everyone has their different motivations, but for me, programming was always about building stuff. I was more passionate about creating things than the tools that I used in that process. Personally, I would have a hard time pushing myself if the motivation was for nothing more than learning a skill for improving my job prospects.<p>You are not the same person as your friend. Your interests are different. Your friend should let his gut lead him. There are many different areas of specialty in which a coder could go and the tools for each are different. For example, you wouldn't use the same tools to hack on the Linux kernel as you would if you were doing web development.<p>Don't try to convince your friend of anything. Just let him pave his own way.
anonymoushnover 13 years ago
I would recommend Racket as a first language. It's tiny, can do a bunch of things, and has a reasonable intro to programming book here: <a href="http://www.htdp.org/2003-09-26/" rel="nofollow">http://www.htdp.org/2003-09-26/</a>.<p>If he passes on that, Lua would be a good option. It has all of the goodies we'd expect with JS or Python (other than being the only language you can run in someone else's browser), but lacks a great deal of bloat, unintuitive scoping rules, and gotchas associated with weak typing/falsiness/that's-a-unicode-when-i-wanted-a-str.<p>Above all else, though, he should probably pick something other than Java.<p>My rationale here is that Racket or Lua will make it easy for him to learn programming because the language will be so simple as to require almost no time to learn. Then, ideally, he can use his established knowledge of programming with whatever other language he likes. Learning some larger language like Python or Ruby first would be more difficult, but is not a bad idea. Learning Java first will be even more difficult and may cause long-term damage depending on the amount of OOP koolaid he ingests.
评论 #3411311 未加载
RodgerTheGreatover 13 years ago
What does he want to make? This should be the primary deciding factor every time "what language should I learn" comes up. Java is particularly suitable for writing simple GUI applications and mobile apps. (Android or J2ME) Ruby seems to be more useful than Java if you're interested in writing web applications. Both are fine if he just wants to write command-line apps, but Java's speed will pay off if those command-line apps are doing serious number crunching.<p>Have him give Processing (<a href="http://processing.org/" rel="nofollow">http://processing.org/</a>) a spin- Processing is 99% Java, but you can start writing loops, conditionals and functions without learning what a class is. It's very easy to work your way up from Processing to full-on Java.
评论 #3411071 未加载
adrusiover 13 years ago
ruby is a decent language, but it's not a good first language. a first language should really be simple, not have too many constructs and avoid special cases entirely. ruby is definitely not minimal, and it does have some special cases that change it's behavior. That's not to say that java's a particularly great first language; it avoids syntactical inconsistencies entirely, but has no fewer special cases than ruby in how it works.<p>I'm not a big java hater, but it's community and tools kind of suck. java projects seem to all be made in monolithic IDEs and built with monolithic build tools that are customized with an XML file. the java community isn't as open as other communities; in ruby and JavaScript and python and especially Haskell, there is a great community who is very willing to help and provide free tools for anyone to use. java just isn't like this.<p>I think Haskell is a great first language pedogogically, people who start with it don't have the same difficulties as those who convert, and it really helps to teach a lot of advanced ideas more easily.<p>however, getting a job with Haskell isn't as practical. if he wants to make a startup then Haskell is great. otherwise he should consider learning clojure or python.
qas1981over 13 years ago
I wouldn't suggest anyone learn Ruby as a 1st language. I say this from a readability standpoint. I'd recommend python as a 1st language. My second recommendation is .NET / C#. You get the most bang for you buck. (WinForms / Silverlight / ASP.NET)<p>I know everyone is over hyped on open source xy or z but in reality these require a good knowledge of a lot of various pieces of technology.
bitopsover 13 years ago
Tell him to learn both but Ruby first. When you start programming, you're learning as much about the environment (OS, files, network) as you are the language. Ruby will help keep that simple.<p>Then, Java will give exposure to a "harder" language with an enormous ecosystem, plus the JVM itself.<p>Knowing both Ruby and Java should make him eminently employable.
评论 #3411022 未加载
PythonDeveloperover 13 years ago
Suggest Python... it has the benefits of both.. You can get Ruby-like efficiency in web development, and you can build robust desktop apps using WxWidgets and other similar gui libraries. An added bonus over Ruby, it's readable ;-)<p>Of course, I'm biased...
评论 #3411096 未加载