LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Programming Language for starters (https://www.linuxquestions.org/questions/programming-9/programming-language-for-starters-596791/)

SBN 11-03-2007 03:12 AM

Programming Language for starters
 
Hey guys for a aspiring computer programmer that doesnt know anything about computer programming (yet) what programming language should you recommend to start with to learn?

Nylex 11-03-2007 05:08 AM

Any? Perhaps language may not make too much of a difference (unless of course you actually know what kinds of things you want to do with programming) and it may be more about getting a good book. Java, C++, but people will likely disagree with me (and I don't have any real reason for suggesting these, other than those being the languages I've used most). Good books for beginners for both of these languages are written by Ivor Horton IMO ("Beginning Java 2", Wrox and "Beginning C++: The Complete Language", Apress).

LinuxNoob75 11-03-2007 08:49 AM

hey-
I reccommend Python.
Python-Python's a really good beginner language. It is cross-platform, works with GLADE to design GUI's and is widely used on Linux.
Most distros come with Python.
Go to a terminal, and type python
and bang, its there. Don't worry though, Python's not just a scripting language, you can create applications with .py files.

http://www.poromenos.org/tutorials/python
http://docs.python.org/tut/

Also, I recommend checking out this app:
http://blakecmartin.googlepages.com/...nternet.tar.gz

Open it, and navigate to the .py file. It will help you understand the power of python, and how a lot of things work.

veerain 11-03-2007 11:52 AM

There is even PERL Language

[removed link]

theNbomr 11-03-2007 01:06 PM

What kinds of this do you already do with computers? Do you do any kind of system admin work? Office productivity? Web browsing & e-mail only? Gaming? Student reseach? Other? Programming will probably seem fairly pointless and un-motivating unless you either get some tangible value out of it, or you are simply engaged by the creative/interactive aspect of programming (and when someone asks the kind of question that you did, it probably means you aren't). What you hope to get out of it, and to a large extent how much you are prepared to put into it, should dictate the type of language you first learn.
You really need to pick a small, probably really small, project to work on to get started. Be prepared to spend about 100 times as much time & effort to accomplish the task as it would ordinarily be worth. Use the goal as a way of keeping on track, but measure the success of the project by how much you learn along the way. Be prepared to encounter obstacles that seem to defy every solution.
When you have decided on the language best suited to your purpose, gather resources: books especially. I've self taught myself several languages, and none were ever covered adequately in a single book. You will need, at a minimum, three books. The first, a low-level tutorial style book that teaches the very basic fundamentals of programming in general as well as the fundamentals of the language you choose. You will need a more thorough, advanced, text that covers as much detail as possible. You will want a reference manual that contains sorted lists of the language elements and the associated details; a sort of dictionary or encyclopedia of the language. You will want all three of these right away. The second one, a thorough advanced text, may require more than one book to thoroughly cover everything well, especially if you choose a 'big' language such as Java.
You will want to identify online resources dedicated to the language. These should contain tutorial content, reference content, Q&A style forums, working source code, and related products such as add-on libraries. Sometimes you can encounter online mentors that are willing to hold your hand a bit, and get you past the initial hurdles. A live-in-the-flesh mentor with a could understanding of the language can be a huge help. Consider enrolling in a formal class, if you are really serious about learning your first language.
You will need to gather a set of developers tools to use. At a minimum, you will want some sort of text editor, the language compiler/interpreter/assembler/etc, and probably a small collection of related tools, such as a debugger, maybe some way of moving your code to an alternative platform. Often this collection of tools is described as a toolchain, and sometimes there are tool sets integrated into a single platform called and Integrated Development Environment. Eclipse is an example of one of these. I strongly believe that one should avoid these in the very earliest stages of learning, as those tools themselves impose a challenging learning curve, and it is often confusing to the beginner whether an obstacle is a purely language and programming issue, or whether there is a lack of understanding of the IDE tool.

So, what do you want to program?

--- rod.

Pearlseattle 11-03-2007 02:53 PM

I would say that, if you want first to have a good base ti start with, to go to C. That was the first language I learned and it really helped me learning afterwards C++, OpenGL, PHP, VBS and as well the basic memory management & performance optimization which I later used for Oracle DBs and hardware analysis & benchmarking & recommandations. I used the book "Absolute beginner's guide to C", which was very funny to read and didn't have a steep learning rate http://www.amazon.com/Absolute-Begin...4119240&sr=1-1.
It was published in 1994 but has been the best computer-language-book I ever read (and I didn't read only that one :)). You'll probably have to use another compiler (probably Microsoft Visual C++) than the ones mentioned in there, but everything else is still up-to-date.
Have fun!

SBN 11-04-2007 08:20 PM

thank guys....

Quote:

So, what do you want to program?
well im very much interested in software programming which involves integration to electronic devices.

YolLuTRaC 11-04-2007 09:35 PM

Hey!

Here are some things you need to know...

C: One of the fastest low lvl programming language. i.e. you have to define everything, deal with memory and the pissing off seg fault which don't say anything about the actual error. Other than that it's a great language and I love it...

C++: Basically the same as C but object oriented. It is a little slower and you need less to define everything and deal with memory. So a special + for C++ since it is slightly easier and much more fun on the graphical interface side.

Java: The one that everyone likes for some reason but really is a carbon copy of C++ without the memory dealing part... Did I just say that! Oups...

Python: Awesome non-quick high-lvl programming language where you don't have to specify anything and get to a nice looking graphical interface very quickly. Also you might want to have a look at ironpython since it's much quicker and pretty much the same difficulty-wise...

FORTRAN: My old friend which is nothing like any of the languages above. It is one of the first language ever maid but still is used in many libraries of C/C++/C#/Java/Python/... So I guess for the logistics of programming, knowing FORTRAN would be a good start to understand how programming works. You can learn it really quickly and it is farely well documented. After that well choose one of the programming language above for your needs.

Finally, after you are settled and become good at programming in general, you might as well google programming language and figure out one that might fit more you needs. I personally work with C/C++ and the ROOT framework as a scientist I need speed for heavy computation so have fun looking!!

YolLuTRaC

jiml8 11-05-2007 09:26 AM

Integration to electronic devices tends to be low-level coding. To do it in Linux, you have to know C. You also should know assembler. If your electronic device needs to be programmed, you need to know its language as well (typically C).

After you have integrated the device (which is to say you have written device driver(s) that permit communication between your host computer and your device), then you can build your user interface and user level processing in any language or combination of languages that is suitable.

theNbomr 11-05-2007 12:15 PM

Quote:

Originally Posted by SBN (Post 2948295)
thank guys....

well im very much interested in software programming which involves integration to electronic devices.

Your interest probably falls in or near the category of embedded systems style programming, where C would be the most commonly used language, by far. C is still a very useful language to know for almost any purpose, so it sounds like that should be your first choice. You probably should start learning the language by picking a few non-hardware oriented projects first. Avoid projects where a user interface is a major component, instead focusing on things like file IO, maybe a little networking, and lots of string handling, where the use of pointers is important. If you have some particular hardware interface in mind, consider writing some utility that manages data sent to or read from the device, if applicable. I would suggest learning a little assembler programming as well. The C language has been described as a high-level assembler language, and I think many concepts which are fundamental to C can be best grasped with an understanding of the underlying assembler concepts. Set up a DOS box, and hack away at low-level stuff with NASM.
Good luck in your venture.
--- rod.

SBN 11-06-2007 12:02 AM

thanks guys.... i think i will start first with C, although its my understanding that its a very old language but somehow its still very popular and effective.

SBN 11-06-2007 12:36 AM

Also what do i need so that i can program with C in windows and linux?

YolLuTRaC 11-06-2007 12:44 AM

Well for C you will need gcc I guess.. Do not get the latest version though. Also for assembly coding you might want to have a look at mips assembly and not intel's since it's much nicer and all the basics are there. Seriously start with C though as assembly is nasty and really low lvl programming approching the 011100101011100101000101 kindda thing. Enjoy!

YolLuTRaC

SBN 11-06-2007 01:34 AM

is Turbo C same as C programming?

theNbomr 11-06-2007 09:14 AM

Yes, Turbo C is an older flavor of C. Completely adequate for learning the language, although it has a lot of DOS-specific & PC-specific library functions, that are not at all portable. Most complete Linux distros will have gcc and enough related tools to start learning. With all due respect to YolLuTRaC, learning any assembler for which you do not have a target system is a bit pointless, and most people do not have access to a MIPS based system. Yes, assembler language is very low-level, but if you are interested in programming at the hardware level, it is relevant, as well as instructive. I would advise against learning C in a Windows-specific development environment, as very much of what you will be learning is the Windows API, which will tend to confuse you about what is a language issue, and what is a Windows API/GUI issue.
--- rod.

makyo 11-06-2007 11:45 AM

Hi.
Quote:

Originally Posted by theNbomr (Post 2949985)
... With all due respect to YolLuTRaC, learning any assembler for which you do not have a target system is a bit pointless, and most people do not have access to a MIPS based system. Yes, assembler language is very low-level, but if you are interested in programming at the hardware level, it is relevant, as well as instructive ... --- rod.

And yet there is the germ of project there, blending more than one approach. Begin to learn C, then little-by-little, write a simple MIPS simulator, starting with the simple instructions, allow easy IO, etc. Once that is running, then write a simple MIPS assembler. I think you will learn a lot, getting at least as much out as you put in, but it will be a strenuous task. Sun SPARC boxes are also easily available on eBay, so you could purchase one for less than $200. I have run Debian Etch on a Sun Ultra II dual CPU, which then would support your experimentation with C and assembler.

I cut my teeth on Seymour Cray-designed machines ( http://en.wikipedia.org/wiki/Seymour_Cray ), very clean, elegant instruction sets, http://en.wikipedia.org/wiki/RISC -- unlike the Rococo sets of CISC boxes, http://en.wikipedia.org/wiki/Complex...n_Set_Computer

For commercial work like this on custom-designed computers, some of my colleagues write assemblers, debuggers, and other tools in perl ... cheers, makyo

jiml8 11-06-2007 05:19 PM

I agree about avoiding Windows-specific C. Learn ANSI C, then you can work on OS-specific extensions with the understanding that these ARE OS-specific.

sundialsvcs 11-06-2007 07:01 PM

There are, as you know, dozens of computer programming languages, and over the many-years I have mastered several dozen of them. Starting with my very first 8-line program which took me three months to write and had a bug in it. :)

The hardest thing to master about programming is ... programming itself. And you don't see that right away, because at first you are pummeled by punctuation. To a [stupid ol'] computer, it matters a great deal where all those commas and semicolons and squiggle-marks go, and at first you're going to be flummoxed by that, no matter what language you start with.

But eventually you learn to forgive that "stupid ol'" computer, which after all is nothing more than a machine, and you build-up to the point where you can write a program in your current "language de jour" with reasonable proficiency. It is at this point that it's a really good idea to start learning a new language.

You need to do this for a good while. I don't think it could be expected to take you less than a year. And you need to be patient with yourself because you are learning a new skill and you are, also, dealing with "a dumb machine." You need to write a lot of programs: it really does not matter much what those programs are. "Practice, man, practice!"

I would suggest that you start out with a programming language that is fairly high-level. Plenty of folks have cut their teeth on Microsoft Visual Basic. And, plenty of people make their living at it today. Forget the talk of "The Evil Empire." You're learning a craft, and you'll need to learn more than one system. Find whatever system seems to present you with the least number of obstacles at first.

However... do plan to learn more than one system! You need to be familiar with ... eventually(!):
  • Microsoft Windows
  • Linux
  • Macintosh OS/X (a.k.a. BSD Unix + Mach)
But "Rome wasn't built in a day."

Welcome! Welcome to a profession that has been thoroughly engaging to me for twenty-five years and counting. Certainly we should consider ourselves fortunate when the way that we earn our daily bread is still fascinating and rewarding.

checkmate3001 11-07-2007 12:06 AM

Sissys! :)

What's wrong with a little Assembly Language?

God... I hated that stuff. Somehow got that as my very first college course. That was the longest semester of my life.


All times are GMT -5. The time now is 11:12 AM.