TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Erlang creator on how to get started and learning to program

230 点作者 stevefink将近 14 年前

21 条评论

asymptotic将近 14 年前
There are several important threads that Joe Armstrong brings up that people are completely missing.<p>1) Typing in code directly into a shell necessarily implies you ignore all the tools and IDEs that many beginners clamour for. In fact, in my experience, coding into Notepad is a far superior learning experience than using an IDE. Nothing stands between you and your gaping ignorance, and you're forced to grapple with all the hideous details without pretty colours or intelligent auto-completion.<p>2) Typing in code offers you the chance to _deliberately type it in incorrectly and see what happens_. This is my favourite method of learning. Take a known good example, and say "Hmm, if I just do...that...to that line, what happens?". And then stare at the error output, immerse yourself in it. Just as with people, there is no better way of learning about a language, a tool, or an idea than when it is put under stress or unusual circumstances.<p>3) Tools necessarily abstract away some process, whereas when you're learning a new concept or idea the last thing you want is to shy away from the details of a process. This point reminds me of learning about long division in Year 7 at secondary school, and being forced to draw all these long arrows making clear which digits were going where. My maths teacher explained the rationale as "You have to go through all the motions, regardless of how silly or tedious they may seem now. Eventually you'll just naturally drop them to one side and not need them any more."
leftnode将近 14 年前
One key point he mentions is actually typing in the examples while you're reading and understanding what they mean. This is essential when learning a new language. You simply won't memorize the syntax without doing it (at least us mere mortals won't, there's always super-programmers who can just get it by glancing at it once).
评论 #2752738 未加载
评论 #2753055 未加载
ukdm将近 14 年前
"After 30 years you will get the hang of this and be a good programmer."<p>I wonder if a genuine beginner reading that line would be put off instantly or encouraged to find out if it really would take that long?
评论 #2752568 未加载
评论 #2752980 未加载
评论 #2752876 未加载
ovidiu将近 14 年前
I remember the time I wanted to learn "C++" and bought a Visual C++ book. There were so many references to MFC and sdk-specific things that it made the learning process truly frustrating.<p>This is why I always pick learn-by-example guides when studying a new programming language and this is why I try to understand the core first.<p>Erlang is also a great programming language to start programming with because it's so simple and based on existing mathematical knowledge that many beginners already have (functions).
评论 #2753050 未加载
评论 #2752703 未加载
malkia将近 14 年前
Reminds of this - Peter Norvig's - "Teach Yourself Programming in Ten Years" <a href="http://norvig.com/21-days.html" rel="nofollow">http://norvig.com/21-days.html</a> -<p>Nowadays I setup cygwin, have cl.exe in my PATH (too bad the 64-bit bit version is separated). Have the WindowsDDK installed (liked it better than Windows SDK, as it allows me to compile for old systems)<p>Same for Linux (arm, x86, x64 machines) and OSX. The terminal is always there.<p>Along with FAR (Windows), Midnight Commander (OSX, linux), emacs (aquamacs on OSX) and build tools - make mainly, or shell script, batch files.<p>Now why? Well because I can manage it better this way. XCode4 brings the things very nice, yet the created project is quite big to control outside. MSVC same thing, but worse when comes to do multiple settings or dependencies.<p>Still... for a big company, studio - MSVC is the easiest for most people (I wish otherwise).
评论 #2753968 未加载
econgeeker将近 14 年前
Joe Armstrong (one of the erlang creators) wrote a book for Pragmatic Programmers. This is the book I used to learn erlang. It was quite an interesting ride, and I think it is an excellent book for learning the language.<p>I think erlang is a really fantastic language, and the only language that I personally trust for concurrency. It is battle tested, and once you spend a couple weeks learning the syntax, quite a delight to develop in.
jbp将近 14 年前
That's the approach Zed's LPTHW (<a href="http://learnpythonthehardway.org/" rel="nofollow">http://learnpythonthehardway.org/</a>) takes.
评论 #2752937 未加载
nivertech将近 14 年前
It's important to be as "close to the metal" as possible, <i>when you learning</i>. But once you understand the basics - find and use tools. For example, if you Erlang/OTP programmer in the open-source environment - you need to know rebar PERIOD.
评论 #2752730 未加载
signa11将近 14 年前
Another thing that I have found useful, is to play with the same toy programs in different languages. For example once I am a bit familiar with basic constructs of the language I try out a simple newton-raphson, taylor series calculation, sieve of eratosthenes, a tftp server (protocol <i>is</i> trivial) etc.<p>To me, at least, this gives a real feel for the language in something more involved than either fibonacci, or hello- world.<p>Oh yes, emphatically agree to emacs and the shell thing. No distractions, while learning the core of a language...
TY将近 14 年前
&#60;trolling&#62; Code examples in that message have bugs. This doesn't work:<p><pre><code> &#62;A=1 &#62;A=2 </code></pre> It should be:<p><pre><code> &#62;A=1. &#62;A=2. </code></pre> I wonder if the author has much programming experience, particularly in Erlang. &#60;/trolling&#62;<p>On a serious note, I totally agree with Joe - the best way to learn programming is by doing it (unless your initials spell EWD) - one step at a time.
the_cat_kittles将近 14 年前
A little extreme, but I like the sentiment. Hard to argue that syntax highlighting is a learning impediment thought.
评论 #2754243 未加载
malingo将近 14 年前
I'd say in addition to shell, editor, compiler, one should also have a version-control system handy. After manually working through a handful of simple examples, a more complex undertaking will be very nonlinear; what better way to reinforce the learning than to keep track of the enhancements, improvements and fixes, and reasons for each change?<p>This falls into the same category as copying examples by hand: being very deliberate, thinking through and providing rationale for each change you make.
mikhailfranco将近 14 年前
The 'Zen of Joe' follow-up<p><a href="http://erlang.org/pipermail/erlang-questions/2011-July/059996.html" rel="nofollow">http://erlang.org/pipermail/erlang-questions/2011-July/05999...</a><p><pre><code> "Zen development - no tools - just your brain - all we are doing in making pleasing patterns of zeros and ones that follow the way of programming. If we follow the way the programs will please us." </code></pre> Mik
kidmenot将近 14 年前
I agree with most of what Joe has said.<p>But I love IDEs with features that help me with refactoring. That doesn't seem to be a dangerous shortcut to me.<p>Granted, by the time you know what refactoring even means AND you know that you should do it, you most probably already know a thing or two about programming, but hey.
alexmr将近 14 年前
I agree with this. As a newbie, it's easy to get caught up in finding the perfect tools and waste a lot of cycles with that. I do use textmate because the syntax highlighting makes it easier for me to read, but anything more complex than that seems pointless (at least at my stage).
kennywinker将近 14 年前
Yeah, that's a terrible tutorial.<p>a) so much magic going on. He argues against magic (IDE's, build tools), and yet there are about 5 magic commands in 5 lines of code. (module(), compile(), export_all, -&#62;, c()). As a reasonably experienced programmer who's never seen erlang code, I ought to be able to infer most of what those operators/function are doing but I can't.<p>b) Why would a super smart programmer be the right person to tell me the best way to start learning to program? I would like to hear from a highly successful TEACHER of programming.<p>c) I started with IDE's (HyperCard, RealBasic, and Xcode). Yes he is right that there is a lot of magic going on you don't understand, but you can slowly chip away at that all the while making useful things.<p>All that said, I really liked his comment about "After 30 years you will get the hang of this and be a good programmer." That's a great attitude. You'll be a novice for most of your life. Possibly all of it. That's a big part of why I like programming... there is always more to learn.
评论 #2752820 未加载
评论 #2753168 未加载
评论 #2752811 未加载
评论 #2752861 未加载
perspective将近 14 年前
I'm constantly telling off my friend (an established programmer, just not with C#) for using Resharper with VS2010. He responds with "But it helps! It's easier to use!", then asks me "What's the difference between a reference and a 'using' statement?".
schiptsov将近 14 年前
Yeah, most of amateurs think that they must have Eclipse^Wa typewriter to write a poetry. ^_^
ams6110将近 14 年前
I learned C# and ASP.NET this way. Emacs, csc.exe, and Microsoft .NET for Programmers by Fergal Grimes (Manning). Great book if you like learning languages this way.
humanfromearth将近 14 年前
Forget about git? U crazy?
nomeatno将近 14 年前
There is no meat here. Just use an editor and in 30 years you should be able to program, don't use tools. That's all.<p>Hey boys, poor content for HN, the only valid point is who is the author of the post.