LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-28-2005, 08:42 AM   #16
davholla
Member
 
Registered: Jun 2003
Location: London
Distribution: Linux Mint 13 Maya
Posts: 729

Rep: Reputation: 32

Quote:
Originally posted by Harishankar
Sure, you have Python on many platforms. That's what not I meant. I meant writing 100% cross-platform code in Python is harder than in Java.

What I meant was that in many cases you will not be able to use the write-once, run-everywhere thing with Python.

Unlike Java, you do find platform specific APIs in many Python modules/bindings which might not work on all platforms.
I disagree when you write python code you should know that a module is not cross platform and therefore it will not be cross platform.

The bad thing about python is that Windows does not have python by default unlike Java so people have to install it to get cross platform code.

However as python is open source it can be ported to all platforms with a C compiler unlike Java, which does not work on all platforms I think.

So in some ways it is easier in python to write cross platform code.
 
Old 07-28-2005, 09:34 AM   #17
enemorales
Member
 
Registered: Jul 2004
Location: Santiago, Chile
Distribution: Ubuntu
Posts: 410

Rep: Reputation: 31
Quote:
Originally posted by davholla
I disagree when you write python code you should know that a module is not cross platform and therefore it will not be cross platform.

The bad thing about python is that Windows does not have python by default unlike Java so people have to install it to get cross platform code.

However as python is open source it can be ported to all platforms with a C compiler unlike Java, which does not work on all platforms I think.

So in some ways it is easier in python to write cross platform code.
With Jython, the set of platforms where Java runs is a subset of the set of platforms where Python does...
 
Old 07-29-2005, 10:56 AM   #18
pgmer6809
LQ Newbie
 
Registered: Apr 2004
Distribution: Mint 21.1 Vera
Posts: 23

Rep: Reputation: 0
What problems interest you

The big thing about learining to program is learning the first language.
The way to learn a language is to write a program.
So what kind of program would you like to write?
Most languages are best for certain kinds of problems.
a. web page scripting etc. RUBY or PHP
b. parsing text, and generating other languages. PERL
c. Coding library routines or neat utilities to deal with disks, displays etc. H/W => C
d. GUI based app where the user interface is a major componnent => JAVA, C++
e. Getting your mind around Object Oriented concepts etc. PYTHON, RUBY, JAVA, EIFFEL

Well you get the idea.
Dont try to hammer a nail with a screwdriver.
 
Old 07-29-2005, 02:02 PM   #19
Quigi
Member
 
Registered: Mar 2003
Location: Cambridge, MA, USA
Distribution: Ubuntu (Dapper and Heron)
Posts: 377

Rep: Reputation: 31
At your Linux command line, type
Code:
printf %x\\n 64
and it will tell you it's 40 in hex. It's no big deal -- in a program you can just type what you have, 64 or 0x40 or 0100 (decimal, hex, or octal), and it's all the same thing.

There's way more to object oriented programming than we can tell you here. You try to structure your problem in terms of "objects" and what you can do to them. There's some lingo that comes with OOP. The operations that an object supports are often called "methods" instead of "functions" or "subroutines". Objects of the same type are said to be in a "class". A more specific class can be derived from another class, which can be read as an "is a" relationship, like "a dog is an animal". One says the derived class "inherits" members/capabilities from the base class. In this way, you build class hierarchies. Well, this is probably going to sound like gobbledygook till you read a book.

E.g., C++, Java, and Perl are object-oriented. Each has its merits as a first language.

Perl will be the quickest to get a program running and do something interesting. "Perl is designed to make the easy jobs easy, without making the hard jobs impossible". Perl has a wealth of language features, which let you write very dense code, to the point of being cryptic. Other people's perl can be hard to read. There are good books -- I thoroughly enjoyed reading "Programming Perl" by Wall, Christiansen, Schwartz.

If you look for discipline, use a strongly typed language like Pascal, C++, or Java.

Java may be a good start. It's still high level and goes to great lengths in preventing you from getting into lower level trouble. It checks your every array access, so you learn right away when you reach outside. It collects garbage after you (which gives you less to worry about, but may teach you to be sloppy, because you just drop objects when you're done with them).

C++ is a very rich language. It lets you get closest to the machine, which you may need to write an mpeg3 player :-). There are several language features that you don't get in Java, e.g., operator overloading (you can define what "a + b" means if a and b are your custom objects), templating, and multiple inheritance. You will not use these features right away, but when you need them later, they are ready.
Learning C first seems like a detour -- I wouldn't start there.
 
Old 07-29-2005, 07:24 PM   #20
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
i would say that knowing introductory algebra would be helpfull if you were
learning C. Please note tho that pure algebra is not implmented into C.
Programming language as a general is just a way to make humans understand
how to talk to a computer that is more natural for them so that they can make
it do what they want. Think of computers are your slaves they no nothing and
do nothing more then what you tell them to do.


As to witch one is eazier to learn or witch would be beter its more style. Or
better level of control. C gives you the ablity to control memory and more
closly exactly how the program will be executed. Assembly gives even more
control . Java gives you less because you do not need to worry about as
much things.

Note i have never learned any programming language other then C and very
little C++ (even tho most programs in C++ are just C programs with cout )

from what im told tho working with some of the so called eazier languages like
python and java are better for new programmers because you do not need
to worry so much on memory management or other processes.

If i would have to recommend if you can understand algebra like basic algebra heres an example x = 45 means x is 45 then you can probably learn C or C++
 
Old 07-29-2005, 09:34 PM   #21
Jonescity
Member
 
Registered: Jul 2004
Location: Jacksonville
Distribution: Slackware Current - (Using Slapt-get!)
Posts: 51

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Quigi
At your Linux command line, type
Code:
printf %x\\n 64
and it will tell you it's 40 in hex. It's no big deal -- in a program you can just type what you have, 64 or 0x40 or 0100 (decimal, hex, or octal), and it's all the same thing.

There's way more to object oriented programming than we can tell you here. You try to structure your problem in terms of "objects" and what you can do to them. There's some lingo that comes with OOP. The operations that an object supports are often called "methods" instead of "functions" or "subroutines". Objects of the same type are said to be in a "class". A more specific class can be derived from another class, which can be read as an "is a" relationship, like "a dog is an animal". One says the derived class "inherits" members/capabilities from the base class. In this way, you build class hierarchies. Well, this is probably going to sound like gobbledygook till you read a book.

E.g., C++, Java, and Perl are object-oriented. Each has its merits as a first language.

Perl will be the quickest to get a program running and do something interesting. "Perl is designed to make the easy jobs easy, without making the hard jobs impossible". Perl has a wealth of language features, which let you write very dense code, to the point of being cryptic. Other people's perl can be hard to read. There are good books -- I thoroughly enjoyed reading "Programming Perl" by Wall, Christiansen, Schwartz.

If you look for discipline, use a strongly typed language like Pascal, C++, or Java.

Java may be a good start. It's still high level and goes to great lengths in preventing you from getting into lower level trouble. It checks your every array access, so you learn right away when you reach outside. It collects garbage after you (which gives you less to worry about, but may teach you to be sloppy, because you just drop objects when you're done with them).

C++ is a very rich language. It lets you get closest to the machine, which you may need to write an mpeg3 player :-). There are several language features that you don't get in Java, e.g., operator overloading (you can define what "a + b" means if a and b are your custom objects), templating, and multiple inheritance. You will not use these features right away, but when you need them later, they are ready.
Learning C first seems like a detour -- I wouldn't start there.
That does sound a little strange right now but, I've just two books on C++ and one C the C book they had assume you knew other program languages as I do not. and Thank You all for all of your info so far I Truuuuly Appreciate it! As i'm trying to get a programming career off the ground!

Hmmm.... I did not know linux could a "print" command like that! Thanks!

Last edited by Jonescity; 07-29-2005 at 09:57 PM.
 
Old 07-29-2005, 09:55 PM   #22
Jonescity
Member
 
Registered: Jul 2004
Location: Jacksonville
Distribution: Slackware Current - (Using Slapt-get!)
Posts: 51

Original Poster
Rep: Reputation: 15
I bought these books could anyone comment on these and make a suggestion on these titles? Has anyone had any of these titles?

1. Practical C++ Programming by O'REILLY (With some kind of Squirrelly-Rat on the cover LOL! )

2. SAMS Teach your self C++ in 24 hours. By Jesse Liberty, Davis B. Horvath. (Obviously i'm NOT trying to learn C++ in 24 HOURS!)

These are the only two books I've read the intro on in the store THAT ASSUME you didn't have any program experience.

I picked this one up just in case. As i've heard rave reviews on this one and that is

3. The C Programming Language (ANSI C) (Second Edition) By Brian W. Kernighan and Dennis M. Ritchie

As from my understanding they are the pioneers on the C programming language but, this book assumes you know how to program I think.


Anyone has a take on these titles or even recommend something else?

Last edited by Jonescity; 07-29-2005 at 11:33 PM.
 
Old 07-29-2005, 10:02 PM   #23
Jonescity
Member
 
Registered: Jul 2004
Location: Jacksonville
Distribution: Slackware Current - (Using Slapt-get!)
Posts: 51

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by exvor
i would say that knowing introductory algebra would be helpfull if you were
learning C. Please note tho that pure algebra is not implmented into C.
Programming language as a general is just a way to make humans understand
how to talk to a computer that is more natural for them so that they can make
it do what they want. Think of computers are your slaves they no nothing and
do nothing more then what you tell them to do.


As to witch one is eazier to learn or witch would be beter its more style. Or
better level of control. C gives you the ablity to control memory and more
closly exactly how the program will be executed. Assembly gives even more
control . Java gives you less because you do not need to worry about as
much things.

Note i have never learned any programming language other then C and very
little C++ (even tho most programs in C++ are just C programs with cout )

from what im told tho working with some of the so called eazier languages like
python and java are better for new programmers because you do not need
to worry so much on memory management or other processes.

If i would have to recommend if you can understand algebra like basic algebra heres an example x = 45 means x is 45 then you can probably learn C or C++
OK I have the math part covered I! (don't really love math all that much anyway but, I know it's important) One question does the order of operations apply with programming (PEMDAS) especially C++ or do they have their own? (I think this is called the order of operators).

Last edited by Jonescity; 07-29-2005 at 10:04 PM.
 
Old 07-30-2005, 07:01 AM   #24
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
Yes there is an order of operations but it can differ slightly to that in algebra. Almost any C book will tell you what it is tho.
 
Old 07-30-2005, 07:43 AM   #25
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
What you will be looking for in a book is "operator precedence", or something similar.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
which programming language is used to do tcp/ip programming?? gajaykrishnan Linux - Networking 9 12-21-2012 05:16 AM
Mandrake - good to begin with??? JNaas Linux - Newbie 10 09-24-2004 12:00 AM
Best language to begin with? Eits0 Programming 78 12-22-2003 05:03 AM
Wine Keyboard Language Problem!!!HELP PLZ!!! idontknowaname4 Linux - Hardware 0 10-23-2003 11:17 AM
Is Python a good language to learn for a newbie to programming? prophet621 Programming 2 05-19-2003 03:48 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration