Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Beginner's Advice..

  • 25-09-2006 5:35pm
    #1
    Closed Accounts Posts: 13


    Ok, so I'm a 6th year at the moment.. thinking of studying Computer Science (BA) in UCD, so I figured I had may aswell get a head start by getting a grounding in programming, as it's something i've always wanted to get into anyway. When I was about 15 I learned html and some javascript,dhtml and basic c++ but every single iota of that is forgotten by now so i'm at square one.

    I have a book on C and on Microsoft Visual C++, but both are quite old (80's and mid 90's respectively). The visual c++ book presumes a knowledge of C so i suppose I'd have to work through both books.

    I'm just wondering what you would all recommend as the best route for a beginner to programming to take? (Bearing in mind I hope to study Computer Science) I ran it by a friend of mine, who has an intrest in programming and he confused me slightly, but said that he used C#, which he suggested to me.

    Thanks for any help :)


Comments

  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    IMHO I'd go with Java. Its free, works on any OS. Its really up to yourself though and why are you learning it.


  • Closed Accounts Posts: 583 ✭✭✭monkey tennis


    I have a book on C and on Microsoft Visual C++, but both are quite old (80's and mid 90's respectively).

    Doesn't matter. The book most people learned C from (K&R) was written in 1978 and still serves as a good introduction to programming.

    You'll probably learn Java in college, so you could give that a go, but I think C is a great start for many, many reasons. I think there was a whole thread on it on these here boards, but here are some reasons off the top of my head:

    It's relatively easy to learn the basics (hello assembly!).

    You learn reasonably low-level stuff, but it won't take you a week to figure out how to output to the screen (hello again assembly). Learning low-level stuff is important, as when this stuff is abstracted away (Java) but you know what's going on under the bonnet, troubleshooting is less of a fumble in the dark. If you want to be serious about programming, you should learn from the ground up (within reason, assembly!).

    There are more tutorial websites, example code repositories and books for C than you could possibly read in a lifetime. This language has been around for over 30 years and has millions of fans (or at least people who have learnt it at some point).

    A number of more modern languages are inspired by or based on C. If you know C syntax, you've a headstart for learning C++, Java, PHP, or Perl.

    Although the above languages are gaining more and more popularity, C is still used professionally both for new projects and as a huge installed base. C experience could be valuable in a job, particularly if you go down the UNIX road.


  • Closed Accounts Posts: 7,230 ✭✭✭scojones


    Hobbes wrote:
    IMHO I'd go with Java. Its free, works on any OS. Its really up to yourself though and why are you learning it.

    I'm being pedantic here, but Java doesn't necessarily work on "any OS". It works on any OS with a java interpreter. Just like C/C++ works on any OS with a C compiler for that arch. Going with Java because of this is a really bad reason to chose Java IMO.

    I think that before someone starts coding in an Object Orientated language they should try procedural first. Go with C, then C++, then Java. I am unaware of the course you're going to do in college, but I would definitely recommend going with C first. After you are somewhat familiar with C, you'll pick up Java (the way it is first taught in colleges) in no time at all.


  • Closed Accounts Posts: 13 _Ganondorf_


    IMHO I'd go with Java. Its free, works on any OS. Its really up to yourself though and why are you learning it.

    Free isn't really a problem. Nor is OS, as the only OS I have an interest or experience in is Windows. I want to learn a language to get a grounding in programming.
    Doesn't matter. The book most people learned C from (K&R) was written in 1978 and still serves as a good introduction to programming.

    You'll probably learn Java in college, so you could give that a go, but I think C is a great start for many, many reasons. I think there was a whole thread on it on these here boards, but here are some reasons off the top of my head:

    It's relatively easy to learn the basics (hello assembly!).

    You learn reasonably low-level stuff, but it won't take you a week to figure out how to output to the screen (hello again assembly). Learning low-level stuff is important, as when this stuff is abstracted away (Java) but you know what's going on under the bonnet, troubleshooting is less of a fumble in the dark. If you want to be serious about programming, you should learn from the ground up (within reason, assembly!).

    There are more tutorial websites, example code repositories and books for C than you could possibly read in a lifetime. This language has been around for over 30 years and has millions of fans (or at least people who have learnt it at some point).

    A number of more modern languages are inspired by or based on C. If you know C syntax, you've a headstart for learning C++, Java, PHP, or Perl.

    Although the above languages are gaining more and more popularity, C is still used professionally both for new projects and as a huge installed base. C experience could be valuable in a job, particularly if you go down the UNIX road.

    Hmm, I think you have me sold sir!! :D Partially cause it's nice to have things in hard copy and I don't feel like buying new books, and mostly cause you've said alot of things I can identify with- I want to learn the basics of programming, so as to build upon it and whatnot. Though I have absolutely no clue about UNIX. It's definatley something I'm doing for the sake of learning from the ground up- I'm studying for learning's sake as opposed to a specific programming goal.

    And yeah, I understand that the other languages are perhaps more modern and popular, but i definatley want to start at the basics so C sounds like a good route. Do you think I should bother with the visual C++ book for the near future, or leave that for now?
    I think that before someone starts coding in an Object Orientated language they should try procedural first. Go with C, then C++, then Java. I am unaware of the course you're going to do in college, but I would definitely recommend going with C first. After you are somewhat familiar with C, you'll pick up Java (the way it is first taught in colleges) in no time at all.

    Thanks for that.. reconfirming some of the things I may have thought I suppose. I posted in the UCD forum asking about the curriculm so hopefully that will give me some further ideas.

    Out of curiosity, what is the significance of C#, as it is the one which I was advised to learn? Is it an extension of C++, or a parallel to it or what?


  • Registered Users, Registered Users 2 Posts: 5,618 ✭✭✭Civilian_Target


    Everyone's gonna give you different advise - there are so many aspects to programming and no starting point.

    If you want ease of use and to create something and see good results simply, I'd suggest a scripting language like PHP - it's very easy to see results fast (Sams Learn PHP in 24 hours is an excellent resource for this)

    However, it's not necessarily the best way to go because PHP is loosely typed and very forgiving, so it may introduce you to bad programming practice. If you have the patience, you'd be well advised to start with the C books you've already got. But learning some PHP is better than learning no C, but be wary of taking shortcuts if you do decide to learn PHP instead!


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 23,212 ✭✭✭✭Tom Dunne


    sjones wrote:
    I think that before someone starts coding in an Object Orientated language they should try procedural first. Go with C, then C++, then Java. I am unaware of the course you're going to do in college, but I would definitely recommend going with C first. After you are somewhat familiar with C, you'll pick up Java (the way it is first taught in colleges) in no time at all.

    I'm with sjones on this one. Yeah, OO languages are "where it's at", but to get a good grounding, especially if you are initially going to teach yourself, procedural languages are the way to go.

    C all the way.


  • Registered Users, Registered Users 2 Posts: 9,480 ✭✭✭projectmayhem


    since you're in 6th year and you'll be busy, maybe just pick up a bit of Visual Basic to get the fundamentals down. you'll learn C++ etc. in college, and they'll treat you like you've no idea in the first place


  • Registered Users, Registered Users 2 Posts: 5,112 ✭✭✭Blowfish


    As I said in the UCD forum, you'll mainly be using Java. Bizzarly enough it is actually possible to get your degree without doing any C programming at all.

    If you want to get a head start on your classmates in the short term, go with Java, but personally I'd agree with the others in that C would be a better place to start, although it will take more time and effort than Java.

    Maybe i'm just biased because its what I started with when I was 8 :)


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    sjones wrote:
    I'm being pedantic here, but Java doesn't necessarily work on "any OS". It works on any OS with a java interpreter. Just like C/C++ works on any OS with a C compiler for that arch. Going with Java because of this is a really bad reason to chose Java IMO.

    No because c/C++ have differences between windows and say Linux where if you code for one you ultimately end up having to change loads of code to get it to work from one system to another.

    You don't have to do that with Java. The saying "Write once, test everywhere" only applies if your trying to do something really funky these days.

    Also name me an OS that doesn't have a JVM on it. Heck most portable devices have a JVM now as well.
    I think that before someone starts coding in an Object Orientated language they should try procedural first.

    If you have never done any coding in your life prehaps, but the OP has done a number of things and you would be better learning OO programming sooner then later.

    C++ is going to lock you into an operating system somewhat (regardless of what OS you take).

    Again as I said it depends a lot on what you plan to do on the future. The industry is moving towards Web Services which is very platform independant.

    In which case based on your experience and preferences you would be better learning .NET

    Java route is J2EE although in both instances SOA is a technology onto itself.

    Edit. although as someone mentioned if your in UCD you might be better going with Java. Your going to have to learn it anyway and you would be better off focusing on one language as your going to have enough to be learning anyway.

    In the end its up to you though.


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Hobbes wrote:
    name me an OS that doesn't have a JVM on it.
    The Java team would have way too much time on their hands if they have a JVM for Singularity :p


  • Advertisement
  • Closed Accounts Posts: 7,230 ✭✭✭scojones


    Hobbes wrote:
    No because c/C++ have differences between windows and say Linux where if you code for one you ultimately end up having to change loads of code to get it to work from one system to another.

    You don't have to do that with Java. The saying "Write once, test everywhere" only applies if your trying to do something really funky these days.

    Like you said, it really depends on what you want, need and the level of abstraction you require. I could get into a rant about the areas that C and C++ kick Java's ass into the next millenium, but that won't help the OP with what he wants from this thread. I could also rant about where Java would be better suited, as I'm sure you could too. Feel free to start a language war thread if you like. :)
    Hobbes wrote:
    If you have never done any coding in your life prehaps, but the OP has done a number of things and you would be better learning OO programming sooner then later.
    Not really. He has forgotten everything, so it's best to start from scratch. Just because he may go down the OO route does not mean he should start there. It is definitely better practice to start with a procedural language first. He wants an introduction to programming, and all that means is what a program is, a compiler, and the basic syntax of a language. Learning the basics of C will make it extremely easy for him to pick up Java. I'm speaking from experience here. I was coding in C for 2 years before I started college, and we were taught Java there. It was simple to pick up because I had C knowledge.. Now sure I had 2 years and that was a factor, but even having the basics will make picking up Java extremely easy.
    Some people find the concept of OO hard to pick up, and trying to understand that along with the basics of a language can be daunting. When he looks at Java after playing with C it will really only be a matter of getting used to OO for him, and a small difference in the syntax. This is why in most Java courses it is taught as a procedural language in the first year - to get people used to what variables, functions(methods) are before trying to understand OO.


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    sjones wrote:
    Just because he may go down the OO route does not mean he should start there.

    And on this I totally disagree with you. There is no other route then OO route if your serious about development. Its one of the core things you will learn.

    Procedual languages are a nightmare to maintain and as such are not a good jumping point to start learning.
    Learning the basics of C will make it extremely easy for him to pick up Java.

    I disagree with that too. C++ would be a better jump to Java then C as your would be learning OO concepts as well.
    and we were taught Java there. It was simple to pick up because I had C knowledge.. Now sure I had 2 years and that was a factor, but even having the basics will make picking up Java extremely easy.

    Picking it up and knowing the language are two different things. If your planning to do a course on a language you would be better off learning the core concepts of it beforehand (language/syntax/coding conventions) as Java is far from a simple language once you get into it.

    For example one issue I see often is the lack of use of loose coupling between classes (which is standard OO practise). Javadoc is another that people don't pick up by learning a different language.

    You are better off learning OO sooner then later.
    This is why in most Java courses it is taught as a procedural language in the first year

    Java is not a procedual language and teaching it as such is an extremly bad thing to do (imho). It would be like teaching C++ as a procedual language. You would have too many bad habits to break after the fact.


  • Closed Accounts Posts: 7,230 ✭✭✭scojones


    Hobbes wrote:
    And on this I totally disagree with you. There is no other route then OO route if your serious about development. Its one of the core things you will learn.
    And I disagree with you again. :) There is no other route? Not likely. It really depends on what area you are going to get into. If you're writing device drivers for linux, which would be written in C and ASM, your reasoning doesn't hold true. Alot of people are in this line of work and there are alot of jobs out there in this area - and it is a fairly serious development area. But you are missing the point I was making. I know procedural languages have their pitfalls - it's why OO was invented in the first place. What I'm saying is, learning a procedural language first, then moving onto OO, will make it easier to pick up OO because of a few reasons. Firstly, you will be used to language syntax and picking up new syntax will be easy for you. Secondly you will be familiar with the pitfalls of procedural languages so again, getting to know OO concepts will be easy because they make alot of sense => you can see why things doing this way are better than being doing procedurally (sp?).

    That's basically what I am saying in a nutshell. Do you not see where I'm coming from? It's just a matter of opinion - just like chosing vi or emacs, and we don't want to go there. :)
    Hobbes wrote:
    I disagree with that too. C++ would be a better jump to Java then C as your would be learning OO concepts as well.

    Every talented C++ developer I know recommends learning C first. Why do you think this is? It's because of the reasons I have already stated.


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    sjones wrote:
    And I disagree with you again. :)

    We can agree to disagree. :)
    There is no other route? Not likely. It really depends on what area you are going to get into. If you're writing device drivers for linux, which would be written in C and ASM, your reasoning doesn't hold true.

    Actually it would. As I said the reason for OO is mainly for maintaining code. The majority of all coding is maintaining someone elses work.

    OO was invented because they realised that procedural coding was an absolute nightmare to maintain and even worse if you ever needed to add features. You ended up changing massive chunks of code to implement a small change.

    The next step up from OO is Enterprise development (eg. J2EE) and further up that step is SOA where languages and operating system are no longer a major factor in the development cycle at all.

    As for ASM there is OO ASM out there too btw.

    You are better off starting from OO to begin with.
    What I'm saying is, learning a procedural language first, then moving onto OO, will make it easier to pick up OO because of a few reasons.

    Well if your just trying to understand from an absolute basic baby steps then why not start with LOGO? or VB :)
    Firstly, you will be used to language syntax and picking up new syntax will be easy for you.

    This is subjective imho. If you were going from a C to C++ then yea probably. If your going from a C to Java then your going to hit a lot of stuff that is just going to slow you up.

    Most simple one offhand is that comparison statements always equate to a boolean of true/false in Java while it doesn't have to in C++.
    Secondly you will be familiar with the pitfalls of procedural languages so again

    Unless you have been seriously coding/working with procedural languages I beg to differ. :) It can be very hard to break bad habits.

    Take VB for example. Can make even an absolutely greenie to coding build something easily but at the same time make the code so piss poor that when they actually get training on how to code properly they have bad habits already.
    Every talented C++ developer I know recommends learning C first. Why do you think this is? It's because of the reasons I have already stated.

    Its because they probably started there as well.


  • Closed Accounts Posts: 13 _Ganondorf_


    Haha so obviously people are pretty split on this! Understandable.. But yeah I'm pretty much split between either Java or C.. leaning heavily on C though. By virtue of the fact I have the book (which was given to me and recommended by my uncle, an experienced programmer) and that as I said, I'd like to try it out from the ground up. I'l probably dabble in C and visual c++ and then have a look at Java aswell maybe. It's not like I'm working toward a specific aim, I just want to obtain knowledge. Thanks for your help :)


  • Closed Accounts Posts: 4,943 ✭✭✭Mutant_Fruit


    Just a quick word about C#. It's just as cross platform as Java (again, i can't think of a platform NOT supported by either MS .Net Framework or the Mono Framework). It's a nice one for learners to work on, but it isn't at all low level like C (but you still have "unsafe code" and can use pointers and interop with native code if that's your thing).

    There's no reason to not choose that over Java really. I believe you can even embed Mono in devices meaning your C# can run on embedded devices.


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Its not so much split. If you were planning on starting for the very first time and have absolutly no experience and don't plan to actually do anything professional in 3-4 years time then yea go with a procedural language.

    As it stands based on what you have done so far you would be better picking an OO and learning it well and learning more then just "how to code". Theres 100's of things to know about Java that extend beyond just knowing the language. C++ is probably the very same.

    Mutant_Fruits suggestion is also good because as mentioned the market is moving away stand alone applications and more enterprise/SOA is where the money will be in the future.


  • Closed Accounts Posts: 22,479 ✭✭✭✭philologos


    Everyone's gonna give you different advise - there are so many aspects to programming and no starting point.

    If you want ease of use and to create something and see good results simply, I'd suggest a scripting language like PHP - it's very easy to see results fast (Sams Learn PHP in 24 hours is an excellent resource for this)

    However, it's not necessarily the best way to go because PHP is loosely typed and very forgiving, so it may introduce you to bad programming practice. If you have the patience, you'd be well advised to start with the C books you've already got. But learning some PHP is better than learning no C, but be wary of taking shortcuts if you do decide to learn PHP instead!

    I'd agree that PHP is v.easy for starting off. I'm in 5th year and I have been doing PHP for the last six months. Working between it and MYSQL is very easy along with some other fancy things like the GD library. Documentation is always availiable on their website which makes it easy to find out information on it.


  • Closed Accounts Posts: 13 _Ganondorf_


    I can't find a C compiler..! Help.. preferably something with a front-end. I got something called DJGPP with RHIDE, but I can't figure out how to start the damned thing. Whats a good, simple compiler?


  • Closed Accounts Posts: 7,230 ✭✭✭scojones




  • Advertisement
  • Closed Accounts Posts: 4,943 ✭✭✭Mutant_Fruit


    Cygwin and Emacs are a good starting combination. When installing Cygwin you have to go to the "devel" section and check the box for "GCC - a c compiler" or something similar. Emacs is just your editor for writing your .c files then.

    gcc -o myOutputFile.exe myfirstcfile.c

    Thats the syntax to compile. I have to admit, it's much easier to learn when there's someone there who knows all the common error messages and how to solve them.

    BTW: You get double points if you manage to "confuse" to compiler so much it bails out. A friend of mine has actually managed to make the compiler print out a message saying it's been confused by previous errors and has to exit :p


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    http://sources.redhat.com/cygwin/ = GCC. It's the compiler of choice for linux people. :)

    If you want an IDE you can also use CDT which is Eclipse. Supports c & C++

    http://www.eclipse.org/cdt/

    Its technically a plugin for Eclipse so you need to download that too (correct version).

    I think also if you register with the MSDN site they have a free version of visual Studio you can download.

    I think Borlands free compiler handles C as well (handles C++).
    http://www.borland.com/downloads/download_cbuilder.html


    There is also Watcom. (never tried it)
    http://www.openwatcom.org/index.php/Main_Page


  • Registered Users, Registered Users 2 Posts: 16,890 ✭✭✭✭Nalz


    I found Turbo Pascal really good for fundamental concepts , great for starting off and familiarizing yourself with the basics. a dead language, but a great teaching one non the less


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Trilla wrote:
    I found Turbo Pascal really good for fundamental concepts , great for starting off and familiarizing yourself with the basics. a dead language, but a great teaching one non the less

    Not totally dead. Think there are still Delphi jobs out there.


  • Closed Accounts Posts: 583 ✭✭✭monkey tennis


    Here's another vote for Dev-C++, very nice little IDE.
    Cygwin and Emacs are a good starting combination.

    Then, when you want to do things properly, you'll have to switch to vi :p

    * Runs away before the violence begins...


  • Closed Accounts Posts: 4,943 ✭✭✭Mutant_Fruit


    look, why would i do things using 3 keypress in VI when i could do it in 10 simple steps in emacs? ;)


  • Closed Accounts Posts: 7,230 ✭✭✭scojones


    look, why would i do things using 3 keypress in VI when i could do it in 10 simple steps in emacs? ;)

    :D


Advertisement