神刀安全网

How do some developers learn a new programming language in one night?

How do some developers learn a new programming language in one night?
Dave Baggett , Naughty Dog (employee #1), ITA Software (co-founder), inky.com (founder)
12.7k Views

They don’t.

Every professional programmer with any sense knows to start something new with a working example from somewhere (usually Google search, these days). Starting from a working example, most programmers can make meaningful modifications and begin to learn the conventions of a new system/language. This can certainly happen in a single day and is probably what you’ve seen or been told about.

That’s nothing like mastery, though. "Learning a language" to me implies some level of mastery, and that takes even the best developers weeks, months, or even years.

Some languages take many years to master. Though plenty of people say they’re experts in C++, I’d honestly be surprised if, upon rigorously testing 10,000 C++ experts, we found more than one who truly knew the language at the level required to write a compiler or correctly answer a question about a syntactic or semantic edge case. I’ve been coding in C since 1979 and in C++ since 1994, and I’m not even remotely close to being an expert at C++. Nor do I ever want to be. :)

So the length of time taken to really learn a language depends heavily on the language. But it’s certainly longer than a single night.

How do some developers learn a new programming language in one night?
Bob Kerns , Programmer and language developer for 45 years
12.4k Views Upvoted by Garry Taylor , Software developer on Mac, Windows, Solaris, IBM i and Sai Suman , Research intern at Adobe, Grad student in CS

Programming languages are not hard, generally. Once you’ve learned a few, the concepts map, and you just need to learn what keywords and syntax apply.

Much more difficult are complex APIs.

Still more complex are language runtimes. These are the collection of APIs that generally go with a language — take Java for instance. The list of packages of classes run for pages. I’ve been programming Java for something like 20 years, and there are parts of the runtime library I don’t know. Some are new, some are old and I’ve just never used them.

Even more complex are ecosystems — the available libraries. For well-established languages like Java or Javascript, NOBODY knows complete ecosystems. They grow and change faster than any human can keep up with.

Google and word-of-mouth come in handy here.

How do some developers learn a new programming language in one night?
Richard Conto , Programmer in multiple languages. Debugger in even more

Most imperative programming languages have the following structures:

  • Conditional statements (i.e.: if/then/else)
  • Various looping statements ( while(x) do something; end)
  • Various iterative/range statements (for i:=0 to 10 do something; end)
  • Flow control statements (goto, computed-goto/case/switch statements)
  • Arithmetic and logical expressions
  • Assignments
  • Subroutines/functions and ways to invoke them.
  • Variable/memory allocation declarations

Slightly more sophisticated are structured programming languages that introduce:

  • Scopes (i.e.: blocks of code with begin/{ and end/} and the like.)
  • Scoping rules (i.e.: variables local to a function or scope)
  • composite data types (arrays, structures, enumerated types, pointers/references, etc.)

Object oriented languages (or message passing languages)

  • class declarations
  • instance and class declarations
  • function overloading
  • inheritence
  • name spaces

And miscellaneous features:

  • Exceptions / interrupts + signals
  • threads / multi-processing
  • Macros/templates/conditional compilation
  • External modules/code

The really complicated part of modern languages are APIs/libraries/frameworks

EDIT 2016-03-12 (addendum):

I don’t learn a language in a night. There’s a lot of thought that needs to go into learning the language that just can’t be done in one night of sleep deprived agony.  I usually review it over and over in little bits and pieces at a time before I try to apply them.  And even then, I haven’t learned the language until I’ve written enough useful and practical code to develop a style that takes advantage of the features of the language.  And if there’s no advantage to learning the language, I generally don’t.

And so, for me, I understand the syntax of Python – but I don’t use it because it doesn’t have any advantage for me over the other languages I use.  I can debug a Python script and probably fix a bug – but I don’t yet claim I’ve learned it.

Written 12w ago View Upvotes Answer requested by Tanya Penhurst

How do some developers learn a new programming language in one night?
Wim ten Brink , 40+ years of self-taught programming skills.

Actually, I learn new languages on the fly and it’s not difficult once you understand the basics of development.

Most languages only have three elements: statements, conditions and loops. Often, these are bundled in methods, functions or procedures, making them "compound statements". The principle of OO is that you connect compound statements to data records and you’d generally have a structure of inheritance. Often, interfaces can be applied to classes to "shapeshift" different classes into similar ones. And the rest is mostly a different syntax.

An experienced developer can look through language and see the things I just named. It doesn’t make them immediate experts but many will be able to make educated guesses on the new syntax and thus won’t need much time to learn just a new syntax. Basically, these developers don’t rely on languages anymore. They rely on structures. No matter which language you pick, they all tend to have similar structures.

Written 12w ago View Upvotes Answer requested by Tanya Penhurst

How do some developers learn a new programming language in one night?
Amogh Huilgol , Programming Geek
181.8k Views

I believe I am eligible to answer this question since I have done this before. I once learnt a programming language overnight because I had to start working on the project the next day.

The first thing I did was trying to understand my project and the requirements. Once I understood the requirements and figured out a logic to implement,  I learnt a few basic syntax features from the Internet that would be required to implement my logic.

The next morning, I started working on my project. Though I faced some issues at first, there was sufficient help available on the Internet to debug the syntax errors. In the next 2-3 days, I continued working on the project and had gained proficiency in the programming language and could complete the rest of the project with ease. I worked on the project with a single motto in my mind. i.e

"By the end of the day, I must  know more about the language than what I knew yesterday."

Some of the important things that helped me learn:

1) Project: Since there was a project associated with the language, I could work consistently on that language which helped me gain proficiency

2) A good programming background: I was already proficient in other programming languages. So  I could quickly grasp the important concepts of this programming language.

3) Consistency: It is very important to maintain consistency in learning. Learning for two hours/day for a week is better than learning for 14 hours in one day.

View More Answers

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » How do some developers learn a new programming language in one night?

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址