ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I started taughing myself programming languages 1~2 months ago and until now I pretty much suck at it. How did you start? Can you become good or are good programmes born? If they are made how many time would you see is enough to get good or give up?
I didn't really know where to ask this, it seems the best place to ask here.
It's many different things, including knowledge and a way of thinking. For a start, read this (and learn it by heart too): How To Become A Hacker
In this document, mind you, the word 'hacker' means 'creative programmer', not 'haxor'.
Taught myself to program beginning in 1980 with BASIC on a VIC-20. Within 5 years I was writing software in C for the Air Force. Patience and discipline are the 2 qualities that are paramount to make a good programmer. Get in a hurry or try to cut corners and you will fail. I have spent days going over a code fragment to isolate a bug and it is what it is. Approach things in a linear, step by step fashion and solve one problem before moving on to the next.
In my day, every byte of RAM and storage was crucial so code had to be fast and efficient. Now days, I think folks tend to cobble stuff together and good enough is a mantra to live by...
It's similar to playing a musical instrument. Each person is born with a certain amount of talent. Education, training, and practice can enable that person to maximize his/her level of performance consistent with that inborn level of talent.
Someone born with "perfect pitch" has an advantage in music. There might be an equivalent to "perfect pitch" in programming but that characteristic has not been discovered. It could be a gift for problem analysis and algorithm design as opposed to the ability to master the syntax of many computer languages.
Most people can, with motivation, become competent programmers. A few, a very few, will become true stars.
In my day, every byte of RAM and storage was crucial so code had to be fast and efficient. Now days, I think folks tend to cobble stuff together and good enough is a mantra to live by...
This is a matter of minimizing cost. When I started programming in 1967 a mainframe computer that was not as powerful as the desktop I am currently using rented for about $150,000 a month. Programmers made about $10,000 a year tops. So it was well worth the effort for a programmer to spend a week optimizing a program to save some machine resources when the program ran.
Since then the cost of hardware has dropped radically. The cost of programming has not dropped anywhere near as much even allowing for inflation.. Programmers are possible twice as cost effective today as they were in 1967. Hardware is approximately 60,000 times more cost effective today as it was in 1967, allowing for inflation.
Now a good programmer optimizes for programmer cost which also includes the cost of software maintenance. Optimizing for hardware efficiency is still done but not so much.
You have to be interested. I mean you (have to) want to know how does it work, you must enjoy learning it, (be familiar) and working with it. I do not mean you want to complete your job, but to have the power to (be able to) solve problems. One usually says the best thing is when your job and your hobby are exactly the same thing. You will be a good programmer if your daily work will be seen as solving a very interesting problem and you are the best to give the perfect solution.
From the other hand you must really have the knowledge to really "produce" the best solution.
So everybody can be a very good programmer just he/she should do it as a hobby, not as having a rough time...
And it gets easier the more you do it. Mastering one language, for example, puts you in a position to easily learn languages that are similar in design.
And it gets easier the more you do it. Mastering one language, for example, puts you in a position to easily learn languages that are similar in design.
Yes. The first one is the hardest. Once you have the concepts down, learning another language is mostly a question of syntax.
I taught BASIC programming for a year while I was stationed in Korea. I began every new class the same way:
I would write "DWIM" in large letters on the chalkboard before class but I wouldn't mention anything about it. Invariably someone would ask what it meant before class ended. This is where I explained there was no "Do What I Meant" syntax in any programming language. The first few classes I would look out at the audience and guess how many "light bulbs" would illuminate before the course ended - some never did...
Yes. The first one is the hardest. Once you have the concepts down, learning another language is mostly a question of syntax.
No it is not really true. Actually you can write your program in several different ways, using perl you need to know the "perlish" way, using python you will need to know the pythonish way.... And that is not about the syntax only, but the efficient usage of internal structures, language elements and available libraries.
(just look for "how to write good perl/python/ruby/whatever" code or look for optimization tips)
No it is not really true. Actually you can write your program in several different ways, using perl you need to know the "perlish" way, using python you will need to know the pythonish way.... And that is not about the syntax only, but the efficient usage of internal structures, language elements and available libraries.
I disagree, switching languages, at a base level, is just familiarizing with syntax. Part of that syntax is calling out libraries/headers/whatever.
A function is a function. A class is a class.
Sure there are 'differences' between languages,.. but in the end it is all just different ways to access low-level assembly structures. If you know what you want at a base level, it shouldn't be hard to figure out the code, no matter the language, to do so.
php
Code:
<?php
print ('hello world!');
?>
c
Code:
#include <stdio.h>
int main(void) {
puts("hello world");
}
Have to disagree with you pan64, of course it takes a while to 'master' a language, but that's not what I'm talking about. My first language was Python. Took a great deal of time until I was able to write any sort of non-trivial/productive code. After I was able to do so, learning to write non-trivial code in Ruby, Perl, Scheme took only a matter of days. Like I say, just learning the syntax, because I already knew the fundamentals. You mention available libraries, once understanding how they work and what they are used for it's a matter of 'import foo' in Python vs 'load foo' or 'require foo' in Ruby. 'elif' vs 'elsif'. These differences are not hard to grok...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.