Sign for a course maybe? Look for video tutorials on YouTube? Head-first into a book? Which one do you think is the best way?
I want to know your methodology, I'd be great if you pointed out your level of experience so we can maybe see if learning habits change with it.
Oldest comments (18)
For me, the most effective approach to learning a new language has always been diving in and creating something. I typically write a program that solves a problem I know relatively well.
My GOTO programs are generally one of Conway's Game of Life, a Brainfuck interpreter or an EAN13 barcode encoder.
I generally read the docmentation of the language and keep a tab open on the API docs, also. If the language is a large paradigm shift from where I've been spending a lot of time I will probably start with much smaller programs and work my way up.
The general advice from me is to always write code. Don't simply do contrived tutorials that are only designed to demonstrate the major selling points of the language in question.
start
read Doc
do Some Demo
read Doc ...
do ...
Lied myself already learned
end
:)
Hahaha I hate to say this but this is pretty much me.
Same, I prefer to Lear docs and API... Build something and then add to the
known languagesI am an experienced developer, the process of learning a new language take less and less time, as more languages and paradigms you know, because you make associations, see the Polyglots.
I actually wrote how exactly am I learning Go, now. As you can see I "attacked" it on all fronts (watch tons of videos, read the manual, do a course, chat, write code every day).
I wrote about this before - dev.to/k4ml/first-step-in-learning...
for {
write_code()
if !be_understanding {
read_doc()
google()
continue
}
}
I have to admit, I've not learned new languages recently - beyond some basic fiddling to alter an existing program. I look them over and get an idea of what I might want to learn them for eventually, and then sigh about not having the time.
But when I used to learn new ones more often, I'd first block out some time. I generally went for 24 hours - a bit arbitrary, but it worked.
Then I'd write a rough webserver. I'd make it handle HTML, images, and a CGI program - which probably dates this technique - and support HTTP/1.1 (which was a bit bleeding edge back then). In those days, there weren't, typically, library functions for HTTP, so this was written from first principles.
This got me a good feel for a few things:
1) Network handling. Often asycnhronous event-driven stuff, but sometimes I'd have to use forking or threading. Usually I'd pick whatever worked best in the language, sometimes I'd deliberately try a few approaches.
2) Text and binary data handling. Some languages I learned couldn't handle binary data very well - the Tcl webserver I wrote suffered from this badly, for example. Others handled text and binary data equivalently (C++, Python2).
3) Parsing. HTTP headers, being RFC 822, are a disaster to parse - which is why mail servers were written to avoid this. HTTP servers, however, can't avoid it. Folding is particularly fun.
4) IPC. That's Inter Process Communication. This is probably less useful now than it was, but handling external programs got me a good feel for how well the language and its environment exposed the platform functionality.
Whatever I needed to find out, I'd go hunting for on the Internet - but it meant I wasn't looking for "How to write Tcl", but "How do I XYZ in Tcl", which meant my research for more focused and goal-driven.
Looking back, while it provided pretty good coverage, it missed several aspects which are really quite interesting to me now, like data storage, for example. I don't know what project I'd pick now that would be any better, either - an XMPP server would be fun, but that's really quite a huge thing.
Seriously. I don't have time to wade through loads of documentation and tutorials. Most languages are an off-shoot of:
Note, they may not be off-shoots by timing, but in terms of language structure and style.
Most tutorials are "here's how to program, we'll use X language to teach you." Did that too many times. Don't need to do it again.
So condense it down, give me a ref with some examples, and make sure someone's got a book on it from O'Reily. Rarely will I see a "C does it this way, X lang does it that way" document.
(* I threw that in because a team of bored folk made Tetris in CGoL. Talk about really low level programming!)
Majority of the learning process is through getting a training in my work. I mean you learn a lot in school but in the corporate world it could be different.
I'm fortunate enough to be employed in a company where you can learn from a lot of people around you. And they sponsor a classroom training for the newbies.
Right now I'm trying to learn C and to do that on my own, I am following a set of exercises online. I realized doing exercises is the fastest way to learn and appreciate a programming language. After all, experience is the best teacher.