 |
 |
 |
 |
| Programming & Packaging A place to discuss programming and packaging. |

6th June 2007, 05:12 AM
|
 |
Registered User
|
|
Join Date: Apr 2005
Location: Littleton, CO
Age: 28
Posts: 2,855

|
|
|
Would like some recommendations on a first programming language.
The title says it. The closest to programming I've ever come are a few very simple bash scripts.  Having no expertise in this area I would appreciate some advice.
|

6th June 2007, 06:17 AM
|
 |
Registered User
|
|
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,300

|
|
|
This is actually a difficult question to answer well.
If you want to understand what computers do in great detail - then assembler language is the thing. OTOH you can't really write modern complex programs by hand with such a crude tool. Compiler writes must understand the assembler (or even the underlying machine code) in great detail. Folks programming near the hardware (like the kernel writers) must understand and write modest streches of assembler. Generally it is to be avoided except where necessary - and of course for the joy of understanding computing full depth.
The "C" language is efficient and close to the machine in many ways. The Linux kernel is written in C. C has data structures and a very limited notion of scoping but it doesn't have the modern features associated with object oriented languages. C introduced the notion of pointers in high level languages (well there were precedents) which is both extremely powerful and extremely dangerous. A classic language and still widely used.
C++ is the archtypal modern object oriented language, and is seems to be still evolving (somewhat annoying). It include pointers and is almost a superset of C. Tho' it goes far beyond. The extensive runtime features mean that's rather difficult to write a OS or a driver in C++. OTOH it is a wildly expressive language which requires you to understand what you are trying to do before writing code.
Java is very similar to C++ (except that it lacks real pointers and multimple inheritance). The whole point of Java was to make a modern language which compiles into portable intermediate code and then the intermediate code is run - with really good protection - on any machine with a 'virtual machine' program. High portability of the 'pseudo-binary'. Faster than interpreted language, but much slower than compiled language.
The idea & releases behind Java seems a little stupid to me. Sun invented Java to be ultra portable and yet able to the source closed/sectret by distributing pseudo-binaries'. The protection features meant that eventually people wer able to make very effective de-compilers - to the sources wasn't as closed. Then Sun only ever made virtual mashine programs available for just a few computers & OSes - so the advantage of portability was squandered. Finally Sun is in the process of making Java open source - which inproves portability - but far too late.
Still Java is a good 'learning' language.
For a computer scientist's view of languages learn lisp or prolog. It will change your thinking about computers.
I'm currently learngin Haskell - a functional language with some odd features. Very interesting.
--
There are buckets of interpreted languages - starting with sh. csh, ksh, bash and running through python, perl, tkl and ruby. I have some respect fot ruby. I'm not a fan of the other -tho' they all have their place.
====
Of course their are hundreds of others, many with special purposes.
My advice is to learn C++ first. Many online tutorials and examples and a highly expressive language. Yo ucan use all the various C and C++ libraries and windows libs. Also ObjectiveC and C are *almost* subsets of C++. So you can then read these easily. My other advic e wrt C++ is to avoid the Bjarne Stroustrup C++ book - it's disorganized. Authoritative but poorly written.
|

6th June 2007, 01:24 PM
|
 |
Registered User
|
|
Join Date: Jun 2005
Location: Leeds
Posts: 1,264

|
|
Seems you have already started with your first language with shell scripting.
If your going to be using Linux for ever and a day you will inevitably come across mountain ranges of C code that to the unknowing can be a daunting sight. get some C under your belt and the rest just fall into place. (erhum he said)
Of course if your looking at been a software engineer get stuck into c++ and embrace the OO.
If your on MS a lot though they seem to be increasingly going down the c# route so i would suggest you learn that.
At the end of the day most langauges follow a similar kind of layout (loops, conditionals etc) so once you learn about it all in one language the next l;angauge is simply a matter of syntax and keywords. (thats how i look at it anyway).
__________________
A Hangover Lasts A Day, But Our Drunken Memories Last A Lifetime
--
Linux user #349545
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCfdjyzXscddzQvlhBedAcD7qfKmHo==zx0H
|

6th June 2007, 02:39 PM
|
|
Registered User
|
|
Join Date: Jan 2005
Posts: 214

|
|
|
I would suggest starting with C++ and/or Python.
|

6th June 2007, 03:04 PM
|
|
Registered User
|
|
Join Date: Mar 2007
Posts: 1,047

|
|
|
If you like to make web pages, learn some php and some html.
|

6th June 2007, 04:29 PM
|
 |
Registered User
|
|
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,300

|
|
|
I'll suggest it's better & easier to learn C++ first then C, rather than the other way around.
Python is certainly a possibiility, but I'd choose ruby first.
Still I think you want to start w/ a strictly typed language like C++ first and then descend into
looser arrangement like Python & Ruby.
|

6th June 2007, 05:10 PM
|
 |
Registered User
|
|
Join Date: Nov 2006
Location: Detroit
Posts: 4,616

|
|
I'd recommend Tcl/Tk. It's simple to learn and very powerful. It also has an interactive interpreter for both text-mode and GUI scripting, which is nice for just trying things out. For instance, a GUI window with a button that prints a message when pressed is a one-liner in Tk: type 'wish' in a terminal window then enter this
Code:
pack [button .b -text "OK" -command {puts "Hello"}]
After Tcl/Tk I'd go with Java. It's a great language that can be used for a wide variety of tasks, and Sun has open-sourced it recently, so I expect it to become even more popular in the Linux world than it already is (don't listen to the naysayers here, Java is one of the main reasons why Linux in the enterprise keeps growing - the ability to run web applications in free JSP/Servlet containers like JBoss and Tomcat on Linux has been very important, trust me, I've seen it first-hand  ).
|

7th June 2007, 03:17 AM
|
|
Registered User
|
|
Join Date: Nov 2006
Posts: 23

|
|
|
Perl... it goes anywhere and does windows! Remember, the poster did not say what he wants to do, and perl will do most anything even though it's a "scripting" language. Then Python followed by C/C++ if you're really serious about programming in general. I won't say anything bad about Java, except it does provide sufficient and probable justification for poking one's eye out :-) Of course, so do C and C++, but everybody says bad things about them. I know you naysayers are going to point to perl's obvious obfuscation issues, but you know it's perl. Practical Extraction and Report Language (Pathologically Eclectic Rubbish Lister). It gets the job done.
--roofer
|

7th June 2007, 04:38 AM
|
 |
Registered User
|
|
Join Date: Apr 2005
Location: Littleton, CO
Age: 28
Posts: 2,855

|
|
|
Hmm, I didn't considered my bash scripting to be programming. I'm not really into web pages. From what I've heard, tcl/tk isn't really a marketable skill. I considered perl, since it is supposed to be easy to learn. However, I agree with RupertPupkin. Every piece of software the open source community has got it's hands on has increased in quality fairly quickly. Also, the ability to program in java is a readily marketable skill.
I'm one of those gifted/cursed people who has almost universal aptitudes. This makes it very difficult to decide what to do as a career. I'm down to 4; programmer, sculptor, 3dmodeler, or writer. Learning a programming language should tell me if I want to do this as a career, or as a hobby.
That you everyone for your input. It has been useful in making my decision.
|

7th June 2007, 04:59 AM
|
|
Registered User
|
|
Join Date: Dec 2006
Location: Atlanta
Posts: 48

|
|
|
I strongly encourage Ruby. You really ought to start with a high-level language in this day and age - unless you plan to be doing really low-level (as in operating system as opposed to script/application) development, there's really no point in learning C or C++ since applications as a whole lend themselves quite readily to the idea of a high-level language.
Python is similarly a good choice.
|

7th June 2007, 02:12 PM
|
|
Registered User
|
|
Join Date: Nov 2006
Location: Malta
Age: 23
Posts: 166

|
|
|
I wish to create a program that could run on Windows , Linux and MAC Os? Which language do I choose and what program to use. I know C#.
__________________
AMD XP 3000+
512MB RAM
Nvidia GeForceFx 5200
Fedora 10 beta & Win Xp Pro
|

7th June 2007, 06:53 PM
|
|
Registered User
|
|
Join Date: Dec 2006
Location: Atlanta
Posts: 48

|
|
Quote:
|
Originally Posted by clifweb
I wish to create a program that could run on Windows , Linux and MAC Os? Which language do I choose and what program to use. I know C#.
|
You can use C# over Mono, which'll work for Linux and Windows.
Install MonoDevelop for an IDE.
|

7th June 2007, 07:45 PM
|
|
Registered User
|
|
Join Date: Sep 2006
Posts: 24

|
|
|
Try something multiplatform like Ruby or Java.
|

8th June 2007, 04:08 AM
|
 |
Registered User
|
|
Join Date: Apr 2005
Location: Littleton, CO
Age: 28
Posts: 2,855

|
|
|
My apologies, my above comment was unclear. I have decided to pursue java as my first programming language. Thank you, everyone, for your input.
|

8th June 2007, 07:45 AM
|
 |
Registered User
|
|
Join Date: May 2006
Posts: 333

|
|
Quote:
|
The extensive runtime features mean that's rather difficult to write a OS or a driver in C++.
|
I don't think this is the case at all. C++ does not do garbage collection, so it is perfectly possible to do deterministic programming in C++. This means that one can write operating systems in the language without any loss of performance.
The reasons why so many--in fact, almost all--of the extant operating systems are written in C instead of C++ are historical rather than technological.
I think both C and C++ are suitable as the main language for operating systems and device drivers. In the case of device drivers, the object orientation of C++ becomes somewhat redundant, which might lead to the more widespread adoption of the smaller and more compact C for the task. But it is also possible to write drivers in C++.
__________________
Registered user # 441814
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 22:14 (Sunday, 19-05-2013)
|
|
 |
 |
 |
 |
|
|