Forum:How would you master a programming language (e.g. R, python etc)
5
5
Entering edit mode
9.8 years ago
Mo ▴ 920

Hello,

I have been working with Matlab for many years and of course when I started Java, it was way more difficult than what I thought! of course I had a very hard time with R as well etc. however, I had always this problem to change one language to another.

There are few steps everybody says to improve your skills e.g. reading, watching youtubes and more importantly practice!

No matter which programming language you use, we all know that we should break our problem to small pieces and then try to build up the program based on that.

For instance, there is a very nice tutorial here about R

A few words for R beginners

However, most of these tutorials are very basic and mainly the same (as the author stated , they are for beginners!)

I am seeking to find more practical practice or hearing your thought

what if you want to be a programmer! what would you do to master it ?

Thanks

Python programming R • 6.0k views
ADD COMMENT
1
Entering edit mode

I am not an eligible person to answer this but this is what I do:

  1. Practice.
  2. Try to read source code of other tools written in language of your interest. Understand the snippets.
  3. Read a book and understand the core concepts. Online tutorials would not give you enough background concepts. They just show how to do it.
  4. Spend time in forums and try to answer the questions related to programming.
  5. Teach somebody. You should be really good at the concepts to actually make somebody understand.
  6. Do not depend completely on available programs, unless its v.complicated. Try to do it on your own.
ADD REPLY
0
Entering edit mode

Totally agree on 5. Find someone in your department or elsewhere who's also trying to learn the same stuff. Learn the bits they know off them, and teach them the bits that you know. Then add more people.

ADD REPLY
4
Entering edit mode
9.8 years ago
vavrusa ▴ 80

I don't think you're going to find a clear-cut textbook that takes you from a beginner to master, not everybody learns the same way. I'll try to sum up what worked for me.

  • Don't get too absorbed about the language choice at first, pick whatever is used around you (so you can ask people), the choice of a language is important like picking a right tool for a job, but it's not as important as learning problem decomposition, and practicing it to the point it comes as a habit.
  • Pick a specific and concise problem that you're trying to solve and do it, look at the language documentation and sites like stackoverflow.com to help you find solution for the partial problems. Do not waste time following tutorials and making things you're not interested in.
  • Break down the problem into understandable chunks. This sounds easier than it's done, be prepared to be constantly rethinking your design. Do not get tempted to write EVERYTHING inside one file/function, with an excuse that you're going to clean it up later. Because you're not, if you can't visualize the pieces before, you won't be able to do it afterwards.
  • Be prepared to throw away code, do stuff again and again and spend a lot of time rethinking it. There's not "trick" and no "easy way".

Since you linked Python in the question, I'm going to assume you're going to start with that, good. Now if you're willing to share what are you actually trying to do, I could answer more specifically. Good luck!

ADD COMMENT
3
Entering edit mode
9.8 years ago
marcoe ▴ 30

When I started coding some years ago I studied PHP and Actionscript I did the way I was used to study everything:

  • FIRST: reading some books to understand theory and concepts
  • THEN: trying to practice it

and it took a lot of time.

Recently I had to write new code with Java and Python and I was frustrated because I considered as lost the amount of time that I had put before into PHP and Actionscript. For this reason I decided to not to invest any more time than necessary in some other language since experience proved me that every language can become obsolete in a very short time, even if at a certain moment everybody hypes it.

So I just started to write code in Python without knowing anything of language syntax:

  • FIRST: writing some lines in Eclipse, launch code execution, watch at console error output, search Internet for a line to be copied to perform the task I was trying to perform
  • THEN: eventually reading something on the subject to go deeper.

It may seem strange but it worked so smoothly that I then did the same for Java.

So, to effectively code with a certain language I think those three element are necessary:

  • syntax
  • object oriented programming
  • design patterns / frameworks

and I think the last two of the above points are meta-language skills, I mean that they work almost the same way in every language, so once you have learned with Java then you can apply in Python too (I actually said "Java" because I think Java is crystal clear in hinting programming concepts and meta-concepts). Since OOP and using frameworks are the most important factors in coding, then you can see how knowing a language syntax is almost trivial and you can literally keep a page with online documentation open to consult continuously while you're coding.

Of course this is related to a pragmatical use of the language: I have an application to write and I want to do it in a reasonable short time. But I can say that by this approach I also have pursued a lot of understanding of all the language aspects.

ADD COMMENT
2
Entering edit mode
9.8 years ago

Disclaimer: I do not consider myself to be a master of any programming language. That said, here's my advice:

  1. As much as possible, use the language to solve recurring problems in your life even if they might already have solutions. You will be more motivated to solve problems that impact your life than arbitrary problems presented in a tutorial and you might invent some stuff that greatly simplifies your life. Also, if the problem already has a solution - you can easily check if your program works properly.
  2. As your skills develop, explore different ways of achieving the same or similar goal. When you do this, name the new program something similar to the old one so you can track your progress and feel good about how much you've learned.
  3. Draw flow charts and write pseudo-code on paper or any media other than a computer screen. This will cause your brain to make new associations to coding and the project in particular. Its also easier to think about code with a visual cue so you don't have to juggle as many bits inside your short term memory
  4. Post questions about your coding issues on StackOverflow and similar sites. Your reputation will suffer if you ask dumb, poorly-researched questions so you'll inevitably learn to do that which will help you lear. Also, the answers you get will often teach you at least a little bit more than just how to do the thing you're trying to do.
  5. Answer questions on sites like StackOverflow! Even if someone comes along and answers the question better than you have, you'll be strengthening neural connections by using your knowledge in a different way than simply applying it.
  6. Experiment with coding in altered states of mind; you might not necessarily write "better" after having a few drinks or after going for a run but you'll probably find that you things a little bit differently and that can lead you to deeper understanding of certain concepts.
  7. Read the books - or at least read whole chapters of the books. In my experience they're better at helping you develop a deep understanding of a given language than they are in helping you solve specific problems you may be facing.
ADD COMMENT
0
Entering edit mode
7.2 years ago

Don't just read the books. The best way to learn how to program is by doing it. It's easy to spend hours reading about syntax, but computer languages like human languages require you to use them in order to understand them.

Try starting with simple projects. If you're going the HTML / CSS route, play with JavaScript and get a simple div to move around on the page when you click on something. Then work your way up to more complex ones. For instance, write a simple todo list with HTML form elements. You have to learn DOM manipulation to properly handle when the user interacts with the page.

Try this simple..Python Tutorial

ADD COMMENT
0
Entering edit mode
7.2 years ago
Bioaln ▴ 360

In my opinion, language choice becomes relatively obsolete compared to knowledge of data structures and algorithms. You can write a fortran program, which will be outperformed by a perl script, simply because the perl implementation achieved better time complexity, for example.

ADD COMMENT

Login before adding your answer.

Traffic: 1783 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6