Hacker Monthly #16 by Netizens Media
Author:Netizens Media [Media, Netizens]
Language: eng
Format: epub, mobi, pdf
Published: 2011-09-01T11:49:57+00:00
Ways to Get Started in Erlang and Programming
By JOE ARMSTRONG
I’m old school: you don’t need any fancy tools. Just a text editor and an erlang shell.
1. Open your text editor:
2. Type in the following program.
-module(hello).
-compile(export_all).
start() -> "hello world".
3. Store it in a file called hello.erl
4. Start an erlang shell. It will say “>”
5. Type in two commands:
> c(hello).
> hello:start().
The first command compiles the program. The second evaluates the command hello:start()
That’s all it takes — typing three lines of code into a file with a text editor, then typing two lines into the shell.
That’s all it takes. Ninety-five percent of all the fun can be achieved with a simple text editor and the erlang shell. That’s how most of the erlang system was implemented.
The erlang shell can be installed in zillions of ways: compile the sources or apt-get install it (or whatever).
Forget about git/IDEs/rebar etc.
Use this approach for all languages.
IDEs and build tools are the single biggest obstacle I know of to getting started.
Me, I use
• a shell
• makefiles
• emacs
for all known programming languages under the sun.
Ninety-eight percent of all the fun can be had with the compiler alone — all the rest is hype.
Forget about the tools
Tools like rebar, etc., are under for automating something, but if you don’t know what it is that you are automating, and if the tool doesn’t work, you will just end up incredibly confused.
Then buy a decent book and type in the programs by hand.
One at a time, thinking as you go.
After 30 years you will get the hang of this and be a good programmer.
Tools are no substitute for typing in small programs and understanding exactly how they work. This is true for all programming language. Programming is an art form, there is no easy way.
Like playing the violin — is there an easier way to learn violin other than by practicing for thousands of hours? I think not.
Start with one-liners in the shell. Start the shell:
type
> A = 1
then
> A = 2
Ask what happens and why.
There is no quick way to learn programming — no tool will help.
Your brain is a zillion times better than the best IDE. Programs form in your brain, not in an IDE.
But then, I’m old school.
Have fun — if it’s not fun it is pointless. Don’t fight the tools; all you need is a text editor and the erlang shell to start with. §
Joe Armstrong invented Erlang in 1986. He has a PhD in Computer Science. And still spends most of free time trying to write beautiful programs.
Download
Hacker Monthly #16 by Netizens Media.mobi
Hacker Monthly #16 by Netizens Media.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Brazilian Economy since the Great Financial Crisis of 20072008 by Philip Arestis Carolina Troncoso Baltar & Daniela Magalhães Prates(362184)
International Integration of the Brazilian Economy by Elias C. Grivoyannis(111599)
The Art of Coaching by Elena Aguilar(53651)
Flexible Working by Dale Gemma;(23361)
How to Stop Living Paycheck to Paycheck by Avery Breyer(19835)
Thinking, Fast and Slow by Kahneman Daniel(12529)
The Acquirer's Multiple: How the Billionaire Contrarians of Deep Value Beat the Market by Tobias Carlisle(12429)
The Radium Girls by Kate Moore(12180)
The Art of Thinking Clearly by Rolf Dobelli(10719)
Hit Refresh by Satya Nadella(9259)
The Compound Effect by Darren Hardy(9151)
Tools of Titans by Timothy Ferriss(8593)
Atomic Habits: Tiny Changes, Remarkable Results by James Clear(8519)
Turbulence by E. J. Noyes(8209)
A Court of Wings and Ruin by Sarah J. Maas(8110)
Change Your Questions, Change Your Life by Marilee Adams(7931)
Nudge - Improving Decisions about Health, Wealth, and Happiness by Thaler Sunstein(7853)
How to Be a Bawse: A Guide to Conquering Life by Lilly Singh(7613)
Win Bigly by Scott Adams(7346)