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

Learning to Program

  • 01-01-2008 1:15am
    #1
    Registered Users, Registered Users 2 Posts: 1,583 ✭✭✭


    Ok for the New Year, I want to learn to program.
    I'm not sure what language I want to learn first and would like to know which is the easiest one to start off with? I'm fairly good with computers and the likes but any guide I have ever read on how to program has bored me rather than interested me! I'm not sure of the advantages of each language or which language is best to learn, I really just want to learn some language to prove I am able to take the first step. I would like some advice about what to start with? Possibly some good guides that tell you which software (compliers etc.) you need and then how to use them to write programs. I always found that most guides never told you what software you actually needed to program. I hope you can understand what I'm looking for.

    I know this thread may seem like another cliche but I really do want to learn to program.

    And Happy New Year!


Comments

  • Closed Accounts Posts: 890 ✭✭✭patrickolee


    I'd start in Javascript if I were you... www.w3schools.com has some good lessons that will get you up and running pretty good. Nice and forgiving and syntacally similar to java/C++. If you want to progress, I would recommend Java then. Lots of IDEs, like eclipse perhaps? www.eclipse.org.


  • Registered Users, Registered Users 2 Posts: 760 ✭✭✭mach1982


    Personaly, i started with C, as most of the main lanuages have evloved from it, it's a good lanuange to teach you the basics, varibles, contion statments (if, If-else, switich) loops ( for do-while , while) fuctions ( also know a procedures or methods in other lanuages). Most colleges start with java, have look that thread recommed books.


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


    I'd start in Javascript if I were you... www.w3schools.com has some good lessons that will get you up and running pretty good. Nice and forgiving and syntacally similar to java/C++. If you want to progress, I would recommend Java then. Lots of IDEs, like eclipse perhaps? www.eclipse.org.

    Javascript is a very unusual one to recommend. Why recommend that over the conventional choices such as C (for the low level approach) or Java/C# (for the managed approach).


  • Closed Accounts Posts: 413 ✭✭sobriquet


    mach1982 wrote: »
    Personaly, i started with C, as most of the main lanuages have evloved from it
    No, they didn't, unless you're talking about curly brace syntax.

    OP, I'd recommend Python. It looks like pseudo code (reading examples, other peoples' code or re-reading your old code is much easier) and is quite forgiving. It's beneficial too in that it supports many forms of programming - procedural, object oriented, and functional to a degree, without forcing any one of them on you.

    To get started, the Python tutorial is good, it covers all the basics like starting the interpreter and having it evaluate code. I recently came across this free book, which seems to have a similar bent. There are more out there too, google can help you find them.

    Other high level languages like JavaScript or Ruby may fill this description too, but I've not used either of them. Many languages like Java or C# come with the reputation of being more serious or enterprisey, but I wouldn't recommend starting with them. Both those languages like to treat everything as though there's effectively only one programming technique for solving a problem, and it's not a good way to start. (Or continue, for that matter, and those languages are adding features as they evolve that make them more like Python and Ruby.)


  • Closed Accounts Posts: 71 ✭✭Mach


    sobriquet wrote: »
    No, they didn't, unless you're talking about curly brace syntax.

    Well may be evloed was the wrong one "buit on top " might have abetter way to describe it .


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    I would personally start with PHP as its got a mix of all languages in there.

    Its got a lot of Java's Syntax/OOP capabilities.
    Its got C syntax.
    Its very similar to Perl.
    Its web based plus its handy to know web scripting.
    Tons of resources out there.
    Its free and easy to set up as well.


    Then after you get to know this you should really start on C to really get understanding of low level concepts and then you should find Java simple enough provided you done the basic OOP stuff in PHP.

    That's what i'd do anyways. Its what i've done.


  • Closed Accounts Posts: 1,444 ✭✭✭Cantab.


    Personally, if I wanted to be able to program for websites and stuff like that, I'd start off learning HTML, JavaScript, PHP and MySQL -- in that order with a good bit of overlap.

    If I wanted to program for creating GUIs or something, I'd learn either Java or C# -- toss of a coin situation really.

    If I wanted to learn to program so I could do some serious number crunching or simulating physical events, I'd learn C++ or C. (maybe a bit of MATLAB too for good measure)

    If I wanted to learn so I could program microcontrollers or build electronic boards, I'd learn assembly (AVR) and C -- in that order.

    Ideally, the OP would get himself a linux box and learn c/c++ in a "bottom up" fashion (command window programs -> simple GUIs -> databases -> communicating with the net -> real-time functionality and threading -> etc. Unfortunately, most people get their hands of a copy of visual studio and away they go on their blissfully unaware voyage -- and there's a lot to be said for this approach too!

    It all depends on what the OP is trying to achieve I guess.

    (leave Python, Perl and Lisp to the geeks in the basement offices)


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    When learning to program simply for the purpose of learning to program it doesn't really matter a whole lot what language you learn. All of the modern common languages mentioned are roughly the same. That said I'd recommend either Java or C#, they make it easier to focus purely on the programming principles, but it really doesn't matter too much.


  • Registered Users, Registered Users 2 Posts: 7,182 ✭✭✭Genghiz Cohen




  • Closed Accounts Posts: 12,382 ✭✭✭✭AARRRGH


    I recommend PHP, simply because -

    It's easy
    You can quickly create real world applications with it
    There are lots of PHP jobs out there

    A good book is "PHP & MySQL Web Development" by Luke Welling.

    Once you understand the concept of programming it's easy enough to jump to a different language. Object Oriented languages like C# and Java might be a bit too much for a beginner.

    C is a nice language too.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    dublindude wrote:
    PHP & MySQL Web Development
    +1 - Great book to get started on.

    Once you are good with this, check this book out to start working out the OOP world of PHP 5 - I think its excellent and better still its free!
    http://www.phptr.com/content/images/013147149X/downloads/013147149X_book.pdf


  • Closed Accounts Posts: 890 ✭✭✭patrickolee


    Javascript is a very unusual one to recommend. Why recommend that over the conventional choices such as C (for the low level approach) or Java/C# (for the managed approach).

    Eh... cause its easier????

    Also he'll see some results quickly, might enjoy it and get some satisfaction.
    Agree with other poster who also said PHP, for the same reasons.


  • Hosted Moderators Posts: 7,486 ✭✭✭Red Alert


    Disagree on PHP because it can encourage sloppiness (simple example being the fact that $x=1;$x='x' is ok).

    I think C fits the bill best here. Has the 'old style' write, compile, debug methodology. Can use simple editor or IDE (another teaching discussion in itself). Forces people to learn difference between variable types and passing reference vs value.


  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    Red Alert wrote: »
    Disagree on PHP because it can encourage sloppiness (simple example being the fact that $x=1;$x='x' is ok).

    I think C fits the bill best here. Has the 'old style' write, compile, debug methodology. Can use simple editor or IDE (another teaching discussion in itself). Forces people to learn difference between variable types and passing reference vs value.
    Fair point, it all depends how far you want to go - how serious you are becoming a programmer. But no harm just spending a few weeks on PHP first just to get the general idea of things and then go into the strict syntax of C.


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


    Eh... cause its easier????

    Also he'll see some results quickly, might enjoy it and get some satisfaction.
    Agree with other poster who also said PHP, for the same reasons.
    It can be argued that Java/C# are just as easy and produce results just as quickly - also, they produce better results.

    Try creating a GUI application in javascript then create one in Java/C#.


  • Closed Accounts Posts: 890 ✭✭✭patrickolee


    A proper gui application maybe. But I've taught someone to know enough javascript to get images bouncing around a web page... (really annoying for a user, but he loved it!) in about 2 hours. Also a form submit, with validation.

    How much of AWT/SWT/Swing would you cover in two hours... layout managers? ActionListeners? Frames? Images, Buttons?

    OP, said "would like to know which is the easiest one to start off with". That's javascript/HTML hands down.... but I suspect we've scared the poor OP away at this stage, cause he's gone terribly quiet. Sorry OP.


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    Tbh to learn programming properly I don't see why anyone would start with any kind of web based languages, either client side or server side, they're just adding complications to the process. Learning to program should be about getting a good grounding in the principles of programming, using variables, conditional statements, flow control, OO etc. Once someone gets this grounding they can easily move into any other domain specific programming they want, write GUIs, server side web scripts, or make pictures bounce around web pages.

    The really beauty of programming comes from taking the basics and pulling them together in clever ways to make an algorithm that does the task you need it to, if someone doesn't get this, they're quickly going to tire of programming, any tricks they've been thought will get boring quickly, any new ones won't make sense and they won't be able to create their own as needed. But someone who does get this will easily be able to move into any specific domain that happens to interest them, and they will enjoy the transition and learning process too.

    It's all about learning the basics, and IMHO while you can do that with any language, if you try doing it with web languages you're going to be wasting time on setting up servers etc. IMHO C++/C#/Java are the simplest most straight forward ways to get into the basics (prefferably one of the latter two for their more modern syntax and OO concepts) and are what any beginner should focus on.


  • Closed Accounts Posts: 1,827 ✭✭✭Donny5


    I agree with stevenmu, and I'd recommend Java to begin. As has been said, programming is about designing algorithms to complete a task, and then writing it in a language is really just implementing the program. Java, I find, is a good language to learn to implemant with. The memory management is certainly more suited to newbies! It's also easy to move over from Java to most of the other languages.

    Or, alternatively, if you want to be hardcaore, try brain****.


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    How much of AWT/SWT/Swing would you cover in two hours... layout managers? ActionListeners? Frames? Images, Buttons?

    In 2 hours I would cover the basics of variable declaration and possibly if-else statements. Perhaps, if they were quick, functions and function calls. Which, tbh, would give them a better grounding in programming and leave them in a better position to start writing some code on they're own. C/C#/Java would be at the top of my list with C#/Java prefered over C.

    While C gives a great understanding of what happens at a lower level I think it would be more beneficial to teach them how to program into a language rather than program in a language*.

    For the OP: Java/C# would be a good place to start.

    *And read Code Complete from the Microsoft Press if you want to learn how to program. After that the language is really just academic but with the current popularity of C#/Java its easy to get help online when you're stuck.


  • Subscribers Posts: 4,076 ✭✭✭IRLConor


    OP: I'd encourage you to use a language like Python or Perl to learn initially. Languages like those tend to be fairly forgiving (no needing to bugger about with memory allocation, failures tend to be at least somewhat informative). Learning Perl, aka the Llama book, is pretty decent for teaching programming via Perl rather than just teaching Perl. Before the rest of ye slate me for suggesting this, my first "real" language was Perl and it hasn't scarred me too badly. :D

    Once you have learned to program, you should probably make sure to learn at least one less forgiving language. C or C++ are good candidates for this as they are actually useful and still used "in industry". They'll give you a much better idea about how the language interacts with the machine. Don't worry about the difficulty level, your second and subsequent languages are always much easier.

    I would say though, if you have a friend who lives nearby who knows how to code then learn a language (s)he knows best. The benefit of having someone on hand to talk you through stuff in person will probably outweigh any differences in the choice of language (well, maybe not brainf*** :)).


  • Advertisement
Advertisement