Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to start??????
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
1slipperyfish
Forum Jester


Joined: Mon May 09, 2005 3:52 pm
Posts: 2425
Location: wigan

PostPosted: Sun Aug 21, 2005 10:59 am    Post subject: Reply with quote

i think java is the best language to begin with as it's is fairly straight forward, but powerful, that was my first language(sams teach yourself java in 24 hours) i have also had a go a few others jscript, c#, c++, python but none of them compare to java in my opinion Rolling Eyes
if you decide to learn c++ from the internet beware as most offerings are in an older version of c++ and are not compatible with most new compilers Rolling Eyes
</two penneth>
paul
_________________
i am a follower of the culture

Back to top
View user's profile Send private message
jjmac
LXF regular


Joined: Fri Apr 08, 2005 2:32 am
Posts: 1996
Location: Sydney, Australia

PostPosted: Sun Aug 21, 2005 11:46 am    Post subject: Reply with quote

Howdy 1sf (troll)


A lot of the C/C++ is ancient ... true. X is a good example there (grin). Java was basically designed to contain the programmer from themselves ... that is, enforce safe habbits in order to get embedded production systems up and running. The net idea came later, so it isn't the "pure" lang that it often promotes it self as. I do like java, but comes accros as a bit restrictive for my tast. And it isn't that fast, unless you have a fast box that is. C++ has come a long way over a short time. One problem that people will have yhough ... is that when they attempt to code in plus, they will either try to impose the concept space of another language on it, and then get disapointed when they find problems there ... or they think they __must__ do the full object thing. As Mr BS says, well written C will be C++ by default. If written to modern specs. Ic'e seen .cc or .cxx files with "printf" functions being used, and that just ain't plus Smile.

But i can see what your saying though Smile, java was my real first lang aside from basic. At the time there was a lot of documentation around, so it was also very accessable. Mainly due to Sun pushing it forward i guess. And the first always seems to have a certain hold.

Java is more of a smallTalkish kind of thing really too, that uses C++ style syntax ... and hides all its pointers (grin). And very library based, but so is C++ now anyway. Apparently one can get gabbage collection for plus too Rolling Eyes But, of course, i haven't looked there (money).

The older versions -=- well, theres an opportunity to translate fragments up. Smile


jm
_________________
http://counter.li.org
#313537

The FVWM wm -=- www.fvwm.org -=-

Somebody stole my air guitar, It happened just the other day,
But it's ok, 'cause i've got a spare ...
Back to top
View user's profile Send private message
1slipperyfish
Forum Jester


Joined: Mon May 09, 2005 3:52 pm
Posts: 2425
Location: wigan

PostPosted: Sun Aug 21, 2005 8:24 pm    Post subject: Reply with quote

i just meant that if you're a beginer java is a lot easier to learn as you say, no pointers, automatic garbage collection, i have quite a fast box so i've never really noticed a difference in speed, and when i was learning c++ a lot of the tutorials on the internet where actually more c than ++ in their syntax( i presume this was an earlier version of ++/ late version of c to get coders to change languages)
also with a good grounding in java the transition to c and all it's variants will be a lot easier(well i thought so anyway Very Happy )
paul
_________________
i am a follower of the culture

Back to top
View user's profile Send private message
jjmac
LXF regular


Joined: Fri Apr 08, 2005 2:32 am
Posts: 1996
Location: Sydney, Australia

PostPosted: Mon Aug 22, 2005 2:33 pm    Post subject: Reply with quote

Howdy 1sf (troll),

I mentioned it hides its' pointers, not that it dosen't have them ... all passes in java are by reference not value. It's just that your not allowed to do arithmetric on them, and "dot" syntax is used rather than ->. References are pointers basically really. And there are proprietry gabbage collecter available. But if all your objects/types have handles ... there not really needed with care. A lot of the leaking in C/C++ was really occuring in the libraries rather than directly in the apps too. But even libc has come forward on that issue.

I know what you mean though, when you mentioned "a lot of bad code", like, is there what Smile. One thing that drives me crazy is when a "non-object" creation is found in src. Such as a function pass where a parameter is replaced with just a "new blah" statement. Rather than a declaration, call to new, then passing the handle. How can it be deleted other wise Rolling Eyes Heaps of that goes on unfortunately. But thats a habbit issue.

A lot of the code out there is old ... in context with older standards ... but things move quickly, so i would think that in whatever is being learn't ... the info refered to should be in terms of the current language standard. Though i bet the X coders probably wouldn't agree there, lol Rolling Eyes

>>
i just meant that if you're a beginer java is a lot easier to learn ...
>>

Can't agree there. It all depends on what learning facilities are available to a person and how the person relates to the sources their learning from. Java is great though, i quite like it. But i think i realised that the main reasons were that i had access to free Java IDEs (PCPlus) and the language aspects i liked were the C/C++ ones anyway. Syntax flexability.

And what about "BASIC". Iv'e had some great times with basic. It handles strings just so well (grin). And does good math too, with a few tricks applied sometimes.

Even LT (tux) said once that C++ was no good, in that he tryed it for the kernel once but it was to cumbersome ... so C was the choice. But that was back in the mid nineties, and at the time the comment was true. ++ has gone through a lot of ratification since. I think we are all still in yesterday (grin).

>>
a lot of the tutorials on the internet where actually more c than ++ in their syntax
>>

There the same, except that well written C, complying with modern C standards, will be C++ by default.

It's like ... say you declare an int in a function ... then you create a conditional statement ... say "if (blah) { }"

Then you declare another int, same name, within that conditional. In old C, that would be an error, due to the double declaration within the function, but in ++ it wouldn't. It would just hide the outer int for the duration of the conditional.

That provides a more flexable structure ...

Code:


int blah_func()
{

   int i;

   i = 7;

   if (blah) {
       int i;
       i = 8;
 
       whatever ....
    }

  return i;
}


You have two "int i"'s in ++, as the inner will hide the outer. In C you would likely get an error or a warning.

Though it's all 6 of one and half a dozen of the other really Smile i guess. I always like McGrawHill books whenever i come across them. They seem to generally have a fairly good reading style about them Smile

>>
i have quite a fast box so i've never really noticed a difference ...
>>

(grin) it helps Smile



jm
_________________
http://counter.li.org
#313537

The FVWM wm -=- www.fvwm.org -=-

Somebody stole my air guitar, It happened just the other day,
But it's ok, 'cause i've got a spare ...
Back to top
View user's profile Send private message
1slipperyfish
Forum Jester


Joined: Mon May 09, 2005 3:52 pm
Posts: 2425
Location: wigan

PostPosted: Mon Aug 22, 2005 8:13 pm    Post subject: Reply with quote

i have never learned c as i have always been lead to believe that it is a very leaky language(security wise) and with java you can't accidently write something that will start to ?systematically? delete your hard drive Rolling Eyes
it could happen Very Happy
paul
_________________
i am a follower of the culture

Back to top
View user's profile Send private message
A-Wing
LXF regular


Joined: Tue Jul 05, 2005 8:25 pm
Posts: 460
Location: Wellingborough

PostPosted: Mon Aug 22, 2005 8:24 pm    Post subject: Reply with quote

GCC4 pretty much fixes all the leakyness as you call it. With the correct libraries or good programming they don't happen anyway.
I haven't seen a C program that can accidently delete your hard drive, don't see how it can happen unless you are doing low level disk access which you shouldn't be doing anyway.
_________________
Andrew Hutchings, Linux Jedi
www.a-wing.co.uk
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
overflow
LXF regular


Joined: Tue Aug 23, 2005 2:40 pm
Posts: 158
Location: London

PostPosted: Wed Aug 24, 2005 12:21 pm    Post subject: Not Basic! Nooooo! Reply with quote

Avoid Basic in all its flavours. It is a ghastly language. You will have to unlearn all sorts of bad stuff when you progress to a proper language.

Start with Python. It is a very clean, uncomplicated language with some very nice features and a clear object model that is easy to understand.

http://www.python.org

There is also a very helpful newsgroup at comp.lang.python.

Getting the hang of objects, both using other people's objects and writing your own is a vital step in learning programming and Python will help you understand that. You can then explore other languages like C++ and Java, which make objects more of a drama.
_________________
overflow
Back to top
View user's profile Send private message
jjmac
LXF regular


Joined: Fri Apr 08, 2005 2:32 am
Posts: 1996
Location: Sydney, Australia

PostPosted: Sat Aug 27, 2005 12:31 pm    Post subject: RE: Not Basic! Nooooo! Reply with quote

Howdy overflow,

I'm not disagreeing with you [ i think (grin) ] ... but,

I don't think that objects are really that neccessary initially, in order to learn a language. They may well get in the way of getting familiar with the overall mind space associated with a particular language too. The less complext that stage is the better -=- more fun, with the satisfaction of actually getting small units to work.

Different languages have different paradigm associations ... so comparisions become somewhat futile really. As BS has said ... it's a common mistake that people do, to bring the mind space of one language, often something their more familiar with ... and try to impose it on an other language. Resulting in a disapointment in how the other language performs (for them).

So what ever language is being considered, it needs to be looked at in terms of its' own purpose rather than in terms of some thing else. and in all cases/flavours ... why make it over complexed. Better to have fun with it than try to grasp all of its aspects to soon. What ever understanding that may be there, hidden away in the more esoteric areas of a particular language ... forget it ... it will reveal it self eventually depending on how long the person has been involved with it. Much easier that way i recone.


When you say "more of a drama" ... in what way do you mean ?


jm
_________________
http://counter.li.org
#313537

The FVWM wm -=- www.fvwm.org -=-

Somebody stole my air guitar, It happened just the other day,
But it's ok, 'cause i've got a spare ...
Back to top
View user's profile Send private message
overflow
LXF regular


Joined: Tue Aug 23, 2005 2:40 pm
Posts: 158
Location: London

PostPosted: Sat Aug 27, 2005 10:02 pm    Post subject: Reply with quote

More of a drama owing to the number of different types of objects which necessarily introduce syntic elements that Python doesn't have. Like: 'public', 'abstract' and 'final' for example. These are confusing concepts to somone learning about classes.

Python lends itself really well to someone learning programming. Simple stuff is really simple in Python.

Code:
print "Hello world!"


As a first program, it doesn't get much simpler than that.

But this initial simplicity doesn't hinder using the language for large, complex projects. I work at a software company and we use Python for just about everything.

We take on new recruites straight out of university and they learn the language from books with peer help. Generally these people already know Java or C++ but they take to Python and everyone prefers it.

It is a remarkably productive language.
_________________
overflow
Back to top
View user's profile Send private message
Arion



Joined: Sun Apr 24, 2005 7:41 pm
Posts: 5

PostPosted: Sun Aug 28, 2005 8:29 pm    Post subject: Reply with quote

The unfortunate fact, as I'm sure you've noticed, is that you can ask 10 different people what programming language to start with, and you will get 10 different answers.

Personally I would recommend Python, although I'll go through a few of them, highlighting what I think are advantages and disadvantages as a first language.

I hope you find the following useful. Having tried all the following languages I would recommend Python, for its sliding simplicity(simple for simple stuff, with advanced features when you need them), and good habit generation.(Python insists on indentation).

C/C++:
Once you know C or C++ anything else will be relatively easy. A lot of languages use C syntax, including Java, Javascript, PHP, and to a certain extent Perl.

C is a very difficult language to master. It requires a lot of learning theory, and you need to learn things about memory management, and memory allocation and all that. There are libraries(prewritten/reusable pieces of code) to help you out with this(such as GLib). C++ uses different libraries, but from an ease of learning point of view, it is C but way more stuff to learn. Very few people know 100% of C++. A very good C++ programmer would know about 90% of the language.

Perl:
Perl is an excellent language for processing text. It is however the only language that looks the same before and after encryption. This makes it very hard to read existing code, to learn new stuff. In many cases you need to study each character before deciding what it all means. On the upside you don't need to worry about memory management.

Java:
Java is a bit like C++ without the memory management, plus manditory OOP(Object Orientation). You can write non-OOP with C++(which will be basicly C), but java insists that everything is an object.

Python:
Python is a very OO language, perhaps even more so than Java. Everything from a string to a number to a number to a function to er just about everything, is an object. This only becomes clear when you learn more about the language.

Indentation is manditory in Python, where as in C-syntax languages(all languages discussed so far), Indentation is strongly encouraged. Indentation is a good habit to get into, and Pythons insistance is IMO a good thing. With python you use as advanced or as simple of concepts as you like.

PHP:
PHP is a language designed originally for web development, in which it excells. It has since made its way into GUI and console development, but it doesnīt have the same community support as some of the other languages discussed here. PHP GUI development is restricted to GTK, where as Python has pyGTK, PyQT, wxPython, and a lot more besides.

Javascript:
Javascript is very like C without the variable types, and memory allocation. It isnīt quite as Object oriented as it is object based. By that I mean you generally don't make your own objects in JS(it's messy IMO), but you use the pre-built ones provided by your enviornment.

The other advantage with Javascript is that you already have all you need to start programming, namely a web browser.
Back to top
View user's profile Send private message
jjmac
LXF regular


Joined: Fri Apr 08, 2005 2:32 am
Posts: 1996
Location: Sydney, Australia

PostPosted: Thu Sep 01, 2005 1:13 am    Post subject: Reply with quote

overflow:
>>
As a first program, it doesn't get much simpler than that.
>>

Smile

jm
_________________
http://counter.li.org
#313537

The FVWM wm -=- www.fvwm.org -=-

Somebody stole my air guitar, It happened just the other day,
But it's ok, 'cause i've got a spare ...
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast