1. If you're receiving a message that you are banned from the Current Events or Politics forums, it's not you specifically: those forums have been hidden for all users. For more info, see here.
    Dismiss Notice

Need to pick a new programming language...

Discussion in 'Programming & Software Development' started by Grim-Reaper, Sep 27, 2002.

  1. Grim-Reaper

    Grim-Reaper Member

    Joined:
    Dec 23, 2001
    Messages:
    1,139
    Location:
    Melbourne
    Ok, lately I've just started getting into Linux a fair bit, and are planning on using it full time for my OS (once Wine is up and running). I'm thinking in regards to this, to learn C and C++ plus then that'd come in handy a fair bit.

    But then there's also security etc, as I like that stuff a fair bit, which would be Java, HTML, PHP, those sorts of languages.

    I don't find programming languages all that hard to pickup. I know VB at a high level (learnt it for the past 3 years, and have Tafe certs for it), can read HTML, and PHP fairly fluently.


    Now's the question, I don't know which language will help me the most in the long run...I want to learn PHP and C, C++ probably but don't know which to do and mainly focus on...or even HTML. *shrugs*

    What's your input, which language do you think would be best to cover Linux, Security, and maybe a smidgy of webpage making (Like 1 page every 6 months, hehe)

    Edit: For Linux coding and debugging, etc, that'd be C and C++ right?
     
    Last edited: Sep 27, 2002
  2. gatecrasher

    gatecrasher Member

    Joined:
    Dec 30, 2001
    Messages:
    2,640
    Location:
    London
    I say learn c or c++ (c is probably easier).

    then once you know that it will not be hard for you to learn languages like javascript/java/perl etc. But i do think you should start on c or c++...

    my 2c:D
     
  3. Tanus

    Tanus Member

    Joined:
    Jun 27, 2001
    Messages:
    923
    Location:
    Melbourne
    Start with C.
     
  4. Geo

    Geo Member

    Joined:
    Jun 27, 2001
    Messages:
    2,368
    Location:
    Adelaide
    I'd start with C. Perl is also handy if you use a unix-like system.

    btw why do you think Java is related to security?
     
  5. sewid

    sewid Member

    Joined:
    Dec 24, 2001
    Messages:
    652
    Location:
    Sydney
    What do you mean by "security" and what does it have to do with the web languages you list? You are thinking down the wrong track there. Security doesn't have anything to do with any particular programming language or languages.

    And you might also be confusing Java with JavaScript. Two very different things.

    My advice is to learn C. once you get an understanding of the syntax it will benefit you when learning many other languages. For example, most of the time you can code Perl using C like expressions and get the added bonus of string data types, transparent data type conversions, bounds checking string manipulation functions... etc.

    Its good to learn a object oriented language these days as well so learning C++ or Java (not JavaScript) is excellent.
     
  6. OP
    OP
    Grim-Reaper

    Grim-Reaper Member

    Joined:
    Dec 23, 2001
    Messages:
    1,139
    Location:
    Melbourne
    Ok, maybe I didn't explain too well in the security aspect.

    Security aspect for Web languages as exploits in pages, manipulating the code to do what its not mean etc. That sort of thing is what I meant for security...

    Then for the OS exploits, I guess that'd be C then.

    Hrmmm, all the recommendations have lead to C, so I think I'll start there :)

    Also, the difference between Java and JavaScript is...?

    Btw, recommend any good books/sites that start from the VERY start for C?


    Just one last question..when programming in C, do you need to install any 3rd party software to program under Linux, or can you code it in just a normal file, then compile it like you do any other program that you download?
     
  7. Geo

    Geo Member

    Joined:
    Jun 27, 2001
    Messages:
    2,368
    Location:
    Adelaide
    Save the program to a normal file and then compile it using gcc.

    For example:

    Code:
    
    #include <stdio.h>
    
    int main ( ) {
    
            printf("Hello World!\n");
            return 0;
    }
    
    
    save that to file called hello.c then run "gcc -o hello hello.c" That tells gcc to compile the file hello.c and output it as hello. You can then run hello by typing "./hello". Read the gcc manpage for more info.

    As to which book to use? Sams have a decent linux programming book, Teach yourslef Linux Programming in 24 hours, or something like that. You should also get a book that teaches you the core C language too, eg The C Programming Language by Kernighan and Ritchie.
     
  8. Nasher

    Nasher Member

    Joined:
    Jun 27, 2001
    Messages:
    1,228
    Location:
    Hobart
    JavaScript is a scripting language used in conjunction with HTML for use in browsers. It might have other purposes, but I'm not aware of them. Its use is similar to that of PHP, although it's a lot less powerful. If you're serious about programming, avoid this one.

    Java is a (supposedly) platform independant programming language, which you could use for practically any purpose. It's a language that is of a higher level than C, so you don't get much control over memory and hardware, though if you're only starting out, you don't need to bother with this anyway. Java programs will (again, supposedly, I've never tested this) run almost identically on any platform without needing to change any code.

    Java is a good language to know, but I agree with the others, start with C, and don't bother with JavaScript.
     
    Last edited: Sep 27, 2002
  9. OP
    OP
    Grim-Reaper

    Grim-Reaper Member

    Joined:
    Dec 23, 2001
    Messages:
    1,139
    Location:
    Melbourne
    Thanks Geo for the explanation...that makes everything a heap easier to do and learn being able to save it to a normal file :) goddamn did it annoy me in Visual Studio :)

    I've been looking at some books at www.everythinglinux.com.au (which i found in a thread in Other OS forum)...i never got a reply from them which i sent asking them what that Rating thing is they have on some of the products...weather the higher number means a better quality book...does anybody here know maybe?

    Its hard to decide which book ill grab off there...any suggestions (if you've been there and seen them before that is..)

    Also, thanks for that explanation Nasher.
     
    Last edited: Sep 27, 2002
  10. Tanus

    Tanus Member

    Joined:
    Jun 27, 2001
    Messages:
    923
    Location:
    Melbourne
    JavaScript isn't really like PHP at all. PHP interprets your php script on the server, with all the output from it sent to the client to render as HTML. Javascript on the other hand is embedded into the HTML on the client side, and acts entirely on the client side. It allows you to access most parts of a webbrowser through HTML, so that you can dynamically change the viewing environment without having to reload the webpage.

    I'll second Geo's recommendation of Kernigan and Ritchie, it's a very good book.
     
  11. OP
    OP
    Grim-Reaper

    Grim-Reaper Member

    Joined:
    Dec 23, 2001
    Messages:
    1,139
    Location:
    Melbourne
    The one's im considering over are:

    Linux Programming Unleashed 2/e: $89.00
    Everything Linux Rank: 1576

    Linux Programming Unleashed is a complete and comprehensive reference for intermediate to advanced Linux developers that covers every possible use of Linux. Topics include: Core Linux Programming; Interprocess Communication; Device Drivers; Development Tools (make, Emacs, diff and patch, etc.); Programming the User Interface; programming (including Motif, Athena, GTK, QT, and more); Scripting; Security; System Programming Using Libraries; Package Management; and Licensing. Linux Programming Unleashed contains hundreds of professional programming techniques and code for many real world applications.
    ------------------------------------------------------------
    hehe, look @ this one :D
    Linux Programming for Dummies: $27.25
    Everything Linux Rank: 1493

    Linux® Programming For Dummies® is the fast and easy way to get up-to
    speed on designing, developing, and debugging programs on the Linux
    platform.

    ------------------------------------------------------------
    Linux Programming Bible: $65.50
    Everything Linux Rank: 607

    The description is fairly big: http://www.everythinglinux.com.au/cat/books/programming?start=8&max=8&sortby=name
    ------------------------------------------------------------
    I might get this one later on:
    Linux Kernel Programming 3/e: $101.35
    Everything Linux Rank: 2437

    Linux Kernel Internals, Third Edition is written for anybody who wants to learn more about Linux. It explains the inner mechanisms of Linux from process scheduling to memory management and file systems, and reveals the structure of the kernel-the heart of the Linux operating system. This book is targeted to all developers who want to know how the Linux kernel interface is implemented, and helps readers to understand the operating system mechanisms better and to optimize Linux applications. The reader will learn how a modern multi-tasking operating system works and will be able to understand how the open Linux sources work. This Third Edition includes coverage of memory management, file systems, device drivers, interprocess communication, networking, and symmetric multiprocessing (SMP). For those who intend to write kernel code, or just want to know how the kernel of a Linux system works. The accompanying CD-ROM contains a Linux distribution and its complete source code. So, every user can start experimenting with Linux by buying the book.
    ------------------------------------------------------------
    Beginning Linux Programming 2/e: $74.05
    Everything Linux Rank: 239

    Quite a large description also: http://www.everythinglinux.com.au/item/WR2971



    any suggestions???

    thanks for the help guys...


    Edit: Tanus and Geo, does that start from the extreme basics? and is there much difference between learning the Linux Programming in C, or the Core C Language? they would both be implemented the same wouldn't they?
     
    Last edited: Sep 27, 2002
  12. DRILL SGT

    DRILL SGT Member

    Joined:
    Feb 21, 2002
    Messages:
    508
    Location:
    Brisbane
    Learn C/++, as being a Javascript coder. Javascript is developed to be ran in a webbrowser. It is a client side based language. Allows you pick up user events. Allows you to mathematical operations and manipulate strings etc. Javascript is a bit like php insofar as the structure being the same, although as being previously stated php is exectued on the server as opposed by the clients browswer. Javascript is also very powerful at manipulting DHTML ie menu bars and is good at situations involving cookies.
    At the moment I am learning C++, although it is argued that if you do it this way you are just "learning a higher level of C'. I am using C++ By exmaple and have found it pretty good and I intend on purchasing "C++ Unleashed". I also have "Thinking in C++" PDF format and it is pretty good. Anyway 'nuff luck with learning your language.
     
  13. Geo

    Geo Member

    Joined:
    Jun 27, 2001
    Messages:
    2,368
    Location:
    Adelaide
    Those linux programming books will teach you how to use C in Linux, if you haven't done any C you first need a book that teaches you how to program in C.
     
  14. Tanus

    Tanus Member

    Joined:
    Jun 27, 2001
    Messages:
    923
    Location:
    Melbourne
    Start with the core C books. Those other programming books will assume you already know your way around C, and are only building on that knowledge and applying it for Linux specific coding.
     
  15. OP
    OP
    Grim-Reaper

    Grim-Reaper Member

    Joined:
    Dec 23, 2001
    Messages:
    1,139
    Location:
    Melbourne
    Ok Thanks. I've already got a book lying around here somewhere named "Sams Teach Yourself C++ In 24 Hours"...i think ill take a look at that first...

    Generally, how much harder and different is C and C++...both can be compiled the same way in linux right (by coding in a normal file, then using GCC compiler to compile both languages..?

    Depending on the difference and skill level of them, I might start reading this one...or might grab one of the C books and start from there then move onto C++ later...
     
  16. martinus

    martinus Imperator Augustus

    Joined:
    Jun 29, 2001
    Messages:
    2,641
    Location:
    Holy Roman Empire
    The bible for C still is the Kernighan/Ritchie, the bible for C++ is the Stroustrup (those people are the inventors of the respective languages).

    Before delving into Linux, why not read the classic: The Design of the UNIX Operating System by Maurice Bach?

    Having said that, the key qualification for a succesful software engineer is the analysis of a given problem domain, and the translation into a maintainable software solution, etc. etc. The programming languages are really interchangeable...
     
  17. Kermalius

    Kermalius Member

    Joined:
    Mar 15, 2002
    Messages:
    870
    Personally, I would suggest learning the difference between a programing language and a scripting language to start with...


    That and do yourself a favour, take a course. Knowing some VB is not sufficient to learn the concepts of coding in a real language. A course will (generally) teach you about concepts such as data types, pointers, memory and memory allocation, function ettiquette (of which C has none) and most importantly, coding style.

    A programing language is simply a tool. Once you know one in a given paradigm, you can pick up another in the course of a week or two (tops). Knowing how to program on the other hand takes a little more practice.
     
  18. zeuss

    zeuss Member

    Joined:
    Jul 1, 2001
    Messages:
    275
    Location:
    Hawthorn East, Melbourne
    To have a bit of fun in Linux you might wanna have a shot at Perl or Python. They are both reasonably powerful and give you plenty of conrol in Linux.

    On the other hand, you might be better of learning a shell programming language, like bourne shell (?) or something like that. Shell programming is easy to pick up and can open many doors in Linux..
     
  19. OP
    OP
    Grim-Reaper

    Grim-Reaper Member

    Joined:
    Dec 23, 2001
    Messages:
    1,139
    Location:
    Melbourne
    The C Programming Language by Kernighan and Ritchie...

    The bible for C by Kernighan/Ritchie...

    I'll take a look around for these two books...any other suggestions for C?
     
  20. DRILL SGT

    DRILL SGT Member

    Joined:
    Feb 21, 2002
    Messages:
    508
    Location:
    Brisbane
    Right fucking on, coding is more then hard coding it is theory and thought processes. If you fail to master these concepts you will never be able to write reliable, robust code.
     

Share This Page

Advertisement: