Author Topic: Best programming language  (Read 716 times)

Offline P38Lightning

  • Full Member
  • ***
  • Posts: 87
Best programming language
« on: January 02, 2013, 06:16:03 AM »
Hey guys, I am going to learn programing this year, where do I start?  Which language and tools do y'all recommend?  Thanks.

Offline AnotherUser

  • Full Member
  • ***
  • Posts: 92
Re: Best programming language
« Reply #1 on: January 02, 2013, 06:31:23 AM »
Hey guys, I am going to learn programing this year, where do I start?  Which language and tools do y'all recommend?  Thanks.


That all depends on what you are trying to achieve. For example,
  • If you want to program an 8-bit embedded micro, then I would strongly suggest learning it from the assembly side first.
  • If you are interested in Linux kernel or driver development, then I would suggest starting from ANSI C.
  • If you are interested in learning scripting for a computer, then I would highly recommend starting with Perl or Python.
  • If you are interested in web design, then I would suggest starting with JavaScript or PHP depending on which type of technology you are considering.
  • If you are interested in making graphical programs for a PC, then I would suggest starting with Java or Qt (which is really a C++ flavor)
  • If you are interested in esoteric languages just to pick up some programming fundamentals, then you could start with Lisp, Forth, Ada, or many other choices going all the way to BF (http://en.wikipedia.org/wiki/Brainfuck)
As you can see, there are many different paths. Perhaps you can clarify your interests and we can help give you a better answer  ;)

  
« Last Edit: January 02, 2013, 09:05:35 AM by AnotherUser »

Offline rm

  • Hero Member
  • *****
  • Posts: 1224
Re: Best programming language
« Reply #2 on: January 02, 2013, 08:43:45 AM »
-- Worse than not knowing is not wanting to know! --

       http://temporaryland.wordpress.com/

Offline Crow

  • Hero Member
  • *****
  • Posts: 8758
  • OBJECTS IN MIRROR... ARE LOSING
Re: Best programming language
« Reply #3 on: January 02, 2013, 11:42:09 AM »
AnotherUser suggesting assembler or some of the other things for a beginner is a little cruel, is not April yet  ;)

 ;D   ;D
I shall pass this way but once;
any good therefore that I can do,
or any kindness that I can show
let me not defer nor neglect it,
for I shall not pass this way again.

Linux User #330412

Offline AnotherUser

  • Full Member
  • ***
  • Posts: 92
Re: Best programming language
« Reply #4 on: January 02, 2013, 11:56:04 AM »
AnotherUser suggesting assembler or some of the other things for a beginner is a little cruel, is not April yet  ;)

 ;D   ;D

I wouldn't call it cruel. It all depends on what you are trying to achieve. If your goal is to create a home-brewed widget that uses a little PIC microprocessor, then I would definitely not recommend starting out with higher level languages like C++ (things like Java and PHP are not even an option at that level). Heck, I would even discourage using C for a simple PIC processor because it is frankly too complicated for many simple applications and requires quite a time investment to get a build toolchain up and running. So yes, assembly as a choice for beginners is a definite possibility.

P.S. From an academic perspective, I think many Computer Science curricula have swung way too far to the high level programming languages. While it may indeed be faster to get some results in some environments, many of the fundamentals of programming (i.e. what is a stack and what is a heap and why do you care?) are either introduced much too late to positively affect the coding styles of students, or are entirely left out. In my opinion, this is why the quality of both consumer level software and even open source software in recent 5-10 years has drastically reduced.  :'(
« Last Edit: January 02, 2013, 01:14:59 PM by AnotherUser »

Offline P38Lightning

  • Full Member
  • ***
  • Posts: 87
Re: Best programming language
« Reply #5 on: January 02, 2013, 03:57:12 PM »
Well, I am tempted to say all of the above.  What I am interested in is programming drivers, writing graphical programs, writing code for firmware, hacking (in the good way).  Basically I want to be an all around programmer, and I want to program with the quality of days gone by. 

Offline The Chief

  • Hero Member
  • *****
  • Posts: 2237
Re: Best programming language
« Reply #6 on: January 02, 2013, 06:29:50 PM »
Well, I am tempted to say all of the above.  What I am interested in is programming drivers, writing graphical programs, writing code for firmware, hacking (in the good way).  Basically I want to be an all around programmer, and I want to program with the quality of days gone by. 

Modern C compilers are just about as good as hand written assembly language.  Most of them have an option to emit the assembly source, and I've never been able to find any real difference in the way I would have coded it in assembler and what the C compiler produces.  And, the C is a heck of a lot faster and easier to write and maintain.

But still, if you want to be a good all around programmer, and dabble with firmware, I would recommend you learn at least one assembly language (they are peculiar to each processor family).   Once you learn one, any others will be a pretty easy pickup.  Learning at least one assembly language gives you a good understanding of the underlying architecture, and will make you a better programmer, even if you are actually using high level languages.

Retired Senior Chief, Retired Software Engineer, Active GrandPa

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Best programming language
« Reply #7 on: January 03, 2013, 02:01:13 AM »
What The Chief said. :)     

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15288
  • ┌∩┐(◕_◕)┌∩┐
Re: Best programming language
« Reply #8 on: January 03, 2013, 02:45:21 AM »
Quote
and easier to write and maintain.

+1 for having a good maintenance regime

PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10628
  • MLUs Forever!
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline P38Lightning

  • Full Member
  • ***
  • Posts: 87
Re: Best programming language
« Reply #10 on: January 03, 2013, 06:12:37 AM »
Thanks guys, y'all have given me lots to consider, I did a little with Python last night, seems pretty straight forward.

Offline AnotherUser

  • Full Member
  • ***
  • Posts: 92
Re: Best programming language
« Reply #11 on: January 03, 2013, 06:51:42 AM »
Modern C compilers are just about as good as hand written assembly language.
While I agree with you in practice, I disagree on academic principles. C code abstracts away the hardware limitations of a processor (i.e. the fact that there may only be 16 registers in the micro or the fact that an 8-bit micro cannot access a 32-bit float as an atomic operation). Knowing and understanding these limitations can produce faster, safer, and more efficient code as well as forcing good programming practices. Writing the code in C as opposed to assembly makes the programmer not think about those details and the compiler/linker with their optimizations may produce suboptimal code. I am speaking from 15+ years of hands on experience of writing firmware in C and assembly here.

But please don't get me wrong. I am not advocating for writing everything in assembly. C is just as capable of doing everything if you remember to use it correctly (i.e. use the volatile and register type modifiers). What I am simply pointing out is that if you start learning how to write firmware from the C side, doing everything correctly in C is not intuitive.

Most of them have an option to emit the assembly source, and I've never been able to find any real difference in the way I would have coded it in assembler and what the C compiler produces.
Even modern compilers and linkers can and do produce logic errors when compiling a higher level language. In fact, about a month ago at my work, I spent 2 days chasing just such a problem in the IAR for MSP430 compiler.

And, the C is a heck of a lot faster and easier to write and maintain.
Amen to that!

Offline The Chief

  • Hero Member
  • *****
  • Posts: 2237
Re: Best programming language
« Reply #12 on: January 03, 2013, 01:16:49 PM »
While I agree with you in practice, I disagree on academic principles. C code abstracts away the hardware limitations of a processor (i.e. the fact that there may only be 16 registers in the micro or the fact that an 8-bit micro cannot access a 32-bit float as an atomic operation). Knowing and understanding these limitations can produce faster, safer, and more efficient code as well as forcing good programming practices. Writing the code in C as opposed to assembly makes the programmer not think about those details and the compiler/linker with their optimizations may produce suboptimal code. I am speaking from 15+ years of hands on experience of writing firmware in C and assembly here.
True enough, and I have considerale experience there myself.  With modern processors, the loss in processing efficiency is minimal, and the gains in programmer efficiency is considerable.

Quote
But please don't get me wrong. I am not advocating for writing everything in assembly. C is just as capable of doing everything if you remember to use it correctly (i.e. use the volatile and register type modifiers). What I am simply pointing out is that if you start learning how to write firmware from the C side, doing everything correctly in C is not intuitive.
Yes, you need to understand the language and how to use it,

Quote
Even modern compilers and linkers can and do produce logic errors when compiling a higher level language. In fact, about a month ago at my work, I spent 2 days chasing just such a problem in the IAR for MSP430 compiler.
I spent several years working with just that setup.  I don't remember ever encountering a problem traceable to the compiler.


Retired Senior Chief, Retired Software Engineer, Active GrandPa

Offline phorneker

  • Full Member
  • ***
  • Posts: 131
  • Linux Solutions for Everyone
    • Horneker Online
Re: Best programming language
« Reply #13 on: January 03, 2013, 02:58:53 PM »
If you wish to learn programming, the first thing you need to ask yourself is what kind of programming are you doing?

Before the Internet was common, BASIC was the language one would typically start programming with.  When I was in high school (back in 1982), I learned Applesoft BASIC and 6502 assembly language on an Apple II+ and Apple IIe.  When I was in college ( http://www.valpo.edu ), I learned Pascal and Fortran on a Data General MV-8000.  My first exposure to UNIX came when my alma mater acquired two Sun 386i workstations running SunOS (now Solaris) and the NeWS graphical interface.  (These machines would in 1995 become their first web servers.)

These days, if you are looking to program applications for Linux/UNIX, I recommend starting with C for the basics, then C++ to learn object oriented programming.

I would also recommend Pascal to start as that language was designed to teach programmers good programming practices such as top down design, modularization and structured programming.  On PCLinuxOS, FreePascal is available and is source compatible with Turbo Pascal 7 (and Delphi).

Next, I recommend Java, for creating of Internet applications.

For scripting, I recommend Python and Ruby, as well as the scripting languages that are built in to shells such as bash, csh, tcsh, and ksh.  Tcl and Tk (from the creators of Java) are good choices, but are not as widely used as Python or Ruby.

Perl should not be forgotten as it has been around for some time.

There have been some new languages such as C#, Go, Vala, Erlang, and Falcon.  The FSF frowns on C# because of its association with Microsoft and their .NET platform (represented by the Mono project). 

If you are looking to program for the Internet, you must learn at least HTML, CSS and JavaScript.  This is enough to create web pages.  For Internet applications, I recommend Java, PHP and a database language such as MySQL/MariaDB and PostgreSQL.
Online since 1996.
HW:  Toshiba Satellite L305-S5944 with 4GB of RAM and PCLinuxOS 2012 always kept up to date.

Offline P38Lightning

  • Full Member
  • ***
  • Posts: 87
Re: Best programming language
« Reply #14 on: January 04, 2013, 05:43:46 AM »
Thanks, I've decided to go ahead and start with C, and branch from there.  Any particular free tools y'all recommend for learning C?