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

Best first language, high level or low level?

Options
  • 17-03-2005 3:38pm
    #1
    Registered Users Posts: 1,865 ✭✭✭


    What do youall think is the best type of language to teach someone first, a high level language (eg Perl, Python) or a low level language (eg C, Java)? The goal here is teach someone how to be a decent coder, and I think all decent coders/hackers should be familiar with both high level and low level languages, so the question is which to teach first?

    High level languages have the advantage that one doesn't have to think about the low level stuff, and one can instead learn about algorithms. However I don't know how easy it would be to learn a low level language if one has only been exposed to high level langauges.

    Low level languages can lead to your focus being diverted form learning a algorithms and learning how to programme to learning the nitty details that high level languages provide by default.

    Thoughts?


«1

Comments

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


    Java is about as low level as commercial aircraft in mid-flight, to be honest. If you want ground level, you're looking at ASM.

    But as a first language, I would recommend either Java, C# or I hear Python is quite good for teaching the basics as well.


  • Registered Users Posts: 7,276 ✭✭✭kenmc


    See this thread for loads of opinions on why C is often chosen as a first language, and why others disagree that it's a good starter..
    http://www.boards.ie/vbulletin/showthread.php?t=231680


  • Closed Accounts Posts: 1,010 ✭✭✭kasintahan


    Perl, Python are barely even programming languages, more like scripting languages.

    Java is VERY High Level.

    C is High level (C++ is slightly higher, maybe, sometimes).

    ASM is Low (ish) level (probably as low as practical or necessary).


    Personally I'd teach them Java. The use of other peoples classes for JOptionPane etc gives you a nice looking programs right from the start, very encouraging.

    I learnt C first (well, Basic 1.1 but that was years ago) and it was difficult to grasp in so far as the code seemed so removed from real life. It was nice and logical though.


    ASM is the dogs proverbials for really getting an understanding of what is going on.

    If they were doing a computers course in DIT or UCD then they'd be learing Computer Architecture (sp?), Java (or C) and ASM - ALL AT THE SAME TIME.


  • Registered Users Posts: 8,219 ✭✭✭Calina


    Okay, for what it's worth, this is what I think.

    The difference between Java/C++ and Perl/Python is not that the former are low level languages and the latter are high level. The primary difference is that the latter are interpreted languages and the former are compiled, although strictly speaking Java is somewhere between the two ideas.

    I'm a bit wary of starting from a premise of "the idea is to teach someone to be a good coder" for a number of reasons, a) I think it's sort of woolly and b) if you can learn one, you can learn pretty much all of them. To my mind, a lot depends on whether you can get your head around writing code at all. It is actually possible that someone knows how a lot of programming languages are written and still provide lousy code in each of those languages.

    So I'd start from a different position. What do they want to learn to do? What do they want to be able to create at the end? Are they actually interested in computers and how they work?

    This is kind of relevant I think, because if they are interested, I'd go straight for assembler. If they're not, it'll scare the living daylights out of them.

    Otherwise, base your answer on what they want to do and all other things remaining equal, I'd go for Java.

    Realistically speaking, there are frustrations to learning either first. I write assembler and frankly, aspects of Java wreck my head because it protects me from myself so much.


  • Registered Users Posts: 1,865 ✭✭✭Syth


    Calina wrote:
    The primary difference is that the latter are interpreted languages and the former are compiled, although strictly speaking Java is somewhere between the two ideas.
    Actually both Perl and Python are compiled into a virtual machine bytecode and then run, just like Java, but because they are trying to be all open sourcey and stuff, they combine it into one step. Java does have all kinds of 'Just In Time' compiling and the like though. (Don't know much beyond this, so I'll stop).
    kasintahan wrote:
    Perl, Python are barely even programming languages, more like scripting languages.
    And C isn't a script for a processor? :)

    The reason I think Java is low level is because to me it seems closer to C++ then Python. With Python (and Perl) one can do all kinds of funky things like create functions that return classes, add methods and fields to your classes at run-time (something I took advatage of yesterday), pass functions as arguments into other functions, etc. To me the only thing that makes Java higher (by a bit) than C++ is the absense of pointers and automatic garbage collection.

    I suppose instead of the 'be a good coder' goal, I should have said 'least likely to make someone hate coding'. A langauge that is difficult to use and horribe to code with (eg Brainf***), would quicly turn people off coding (and hence make them a bad coder). However a language that was easy to use and allowed people to make pretty cool things, would be a good encouragement to the student, and make it more likely that they would continue coding.

    I suspect having to deal with segfaults and memory errors could turn people off coding if they were new to it. (When I was new to programming I only half knew what I was doing, I just copied other code and tweaked it. If the whole thing crashed for some esoteric reason, that would be quite a discouragement (luckily it was BASIC, so that never really happened)) Thus I think a first langauge should be pretty robust to code newbies.


  • Advertisement
  • Registered Users Posts: 885 ✭✭✭clearz


    kasintahan wrote:
    ASM is Low (ish) level (probably as low as practical or necessary).

    Low (ish). My God what would you consider low if ASM is lowish. Ones and Zeros. ASM is as low as you can go my friend. Every command in ASM can be directly tied to machine code.


  • Registered Users Posts: 307 ✭✭Thordon


    binary.jpg
    Real programmers do it in binary


  • Registered Users Posts: 4,276 ✭✭✭damnyanks


    It depends on what you actually want them to achieve. If you want them to have an understanding of programming as in the basics maybe something like php would be a reasonable start.

    I started with Coldfusion many years ago (4.0). Ok, its beefed up HTML but it had the the essentials with regards to programming. Variables, loops and if statements (Among other things:D

    I was able to pick other web scripting languages up easily and whatever else came my way later (VB, Java, C, C# etc.)

    I think people starting off programming convince themselves its going to be complex. Welsh is complex if you've never seen it before. Ever try to teach a tourist some Irish? I think the best thing to do is just make sure whoever is learning it doesnt have it in their head it will be difficult to learn.


  • Closed Accounts Posts: 447 ✭✭MickFarr


    Syth wrote:
    What do youall think is the best type of language to teach someone first, a high level language (eg Perl, Python) or a low level language (eg C, Java)? The goal here is teach someone how to be a decent coder, and I think all decent coders/hackers should be familiar with both high level and low level languages, so the question is which to teach first?

    High level languages have the advantage that one doesn't have to think about the low level stuff, and one can instead learn about algorithms. However I don't know how easy it would be to learn a low level language if one has only been exposed to high level langauges.

    Low level languages can lead to your focus being diverted form learning a algorithms and learning how to programme to learning the nitty details that high level languages provide by default.

    Thoughts?

    Teach him what ever you find easiest to explain first


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


    MickFarr wrote:
    Teach him what ever you find easiest to explain first

    LOGO!

    Whatever you pick I would recommend that they learn or at least read up on ASM. It is easy to pick up just insanely slow to do anything in it. But it gives you a better understand of how a computer works.


  • Advertisement
  • Closed Accounts Posts: 1,567 ✭✭✭Martyr


    I learned 16-bit assembly first, but found 32-bit easier because of the flat memory model and elimination of segment addressing.

    If you look at a package like MASM, its never been easier to write applications in 32-bit assembly for windows now.

    Personally i've found it easier to understand computers and programming.
    But i wouldn't reccomend anyone use it for large applications.
    I use it for apps that require use of MMX/SSE or perfect pairing which
    some compilers aren't able to do yet.

    Java and C++ are brilliant though, easier to work with.


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    Calina wrote:
    Okay, for what it's worth, this is what I think.

    The difference between Java/C++ and Perl/Python is not that the former are low level languages and the latter are high level. The primary difference is that the latter are interpreted languages and the former are compiled, although strictly speaking Java is somewhere between the two ideas.
    .

    At least PERL, and I think also Python, are beginning to use JIT compilation. C can be interpreted, if you feel like it. Python and PERL are both very weakly typed, and don't force object orientation, C, C++ and Java are strongly-typed and Java DOES force a certain knowledge of OO. None of them are low-level languages (tho C is lower than the rest).

    You can certainly return classes in Java and C++ (and you can return FUNCTIONS in C and C++).

    ASM's nice to learn, but it's best not actually USE it unless you've got a VERY good reason to; it's not exactly the most portable :).


  • Closed Accounts Posts: 1,502 ✭✭✭MrPinK


    I think the Java/ASM combination that many colleges go with is ideal. It pretty much covers all the bases.
    rsynnott wrote:
    You can certainly return classes in Java and C++ (and you can return FUNCTIONS in C and C++).
    You can return methods in Java too. The reflection API can be a godsend at times.


  • Registered Users Posts: 1,865 ✭✭✭Syth


    MrPinK wrote:
    You can return methods in Java too. The reflection API can be a godsend at times.
    rsynnott wrote:
    You can certainly return classes in Java and C++ (and you can return FUNCTIONS in C and C++).
    I knew about passing functions as arguments in C, so it makes sense that one could return functions. Can one create a function at run time and return that? Or is it limited to code that has already been written?

    A lot of people are saying to learn assembly as it helps you understand how a computer works. Yes, it can help you learn how the current implementation of computers work, but that's arbitary. If all our CPUs were turing machines then learning x86 assembly would be of no use. However learning how algorithms and the like work is much better and much more portable.


  • Closed Accounts Posts: 5,372 ✭✭✭The Bollox


    well I started with Visual Basic, but thats just me, its ****e!


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    Syth wrote:
    If all our CPUs were turing machines then learning x86 assembly would be of no use. However learning how algorithms and the like work is much better and much more portable.

    Yep, but all pretty much all current computers work fairly much the same. (This may change when things like IBM Cell and the new UltraSparc come out, if ever, but for the moment that's the way it is.)s


  • Registered Users Posts: 1,048 ✭✭✭BobTheBeat


    ASM is handy for a low level view of whats going on...
    You'll see that a number of statements are ofter required to complete one statement made in a higher level language.
    I think it also instills a good sense of deconstruction for problem-solving. This will prove invaluable when it comes to your future endeavours!


  • Registered Users Posts: 9,557 ✭✭✭DublinWriter


    It really depends on what you want to achieve career wise.

    Business wise? VB (6 and .NET), Oracle PL/SQL and Delphi, although C# is now becoming more wide-spread in business.

    Graphics and Software Engineering/OS orientated? Pure C++ or Assembly.

    A general language such as VB or Delphi (Pascal) are good for teaching people the basics of programming in an abstracted and structured way.

    I find scripting languages just as Perl more syntax-orientated and not the best way to get into programming and their functionality is very OS specific.


  • Registered Users Posts: 528 ✭✭✭Drexl Spivey


    When I see how much time you need to develop a gui in Java I wonder why use Java. VB is very simple to use and yet you can develop complex programs. I don t know .net but it may be the same.

    You can develop a simple gui in 2 mn with VB. How long does it take in Java !? Look at the following example, it s meant to be a basic GUI, one input field, one button, one action responding to a click on a button.

    http://java.sun.com/docs/books/tutorial/uiswing/learn/example-1dot4/CelsiusConverter.java




    Even jsp is difficult when compared with let's say asp.

    What does Java do that other languages can not do ? (just a few examples ..)


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


    Jeff Bond wrote:
    When I see how much time you need to develop a gui in Java I wonder why use Java. VB is very simple to use and yet you can develop complex programs.

    First up, you are using a wizard to create the UI within VB. Find me anyone who writes the UI for VB by hand. Have you looked at the source of GUI in VB? It's longer then java.

    As for java you have a number of different UI types. SWING, AWT, SWT, JFACES, XMLFace, etc.

    Writing by hand I find that SWT is the easier of the lot and gives better results, however you can get wizards for all those types of UI which are as fast as VB for creating a UI.

    Saying that VB is better because you can use a wizard is bunk.
    Even jsp is difficult when compared with let's say asp.

    JSP is not java.
    What does Java do that other languages can not do ? (just a few examples ..)

    Each has language has its own pros and cons. Java was made to solve the issues of..

    i) Localisation. (eg. UI / property files)
    ii) Portability. (eg. run on any OS)
    iii) Maintaince. (eg. structured coding/javadoc)


  • Advertisement
  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    Java allows creation of software that runs fairly transparently on many, many platforms. Bit more than you can say for VB or ASP :rolleyes:

    Also, it's much nicer for large complicated projects.

    Not the perfect language by any means, but beats VB handily.


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


    Java can run on any operating system which has a JVM. VB can barely run on windows.


  • Registered Users Posts: 640 ✭✭✭Kernel32


    rsynnott wrote:
    Java allows creation of software that runs fairly transparently on many, many platforms. Bit more than you can say for VB or ASP :rolleyes:

    Also, it's much nicer for large complicated projects.

    Not the perfect language by any means, but beats VB handily.

    You must have a good breadth of experience to be able to make a claim like this. I would be interested to know the pro's and con's between the Java/JSP/J2EE implementations you have been part of and the VB/COM+/ASP implementations? Did you run into scalability issues? Did you use the COM+ services or manage stuff like transactions in the database? In the production environment do you find it easier to maintain the java applications or VB/COM+ applications?


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


    Kernel32 wrote:
    You must have a good breadth of experience to be able to make a claim like this. I would be interested to know the pro's and con's between the Java/JSP/J2EE implementations you have been part of and the VB/COM+/ASP implementations? Did you run into scalability issues? Did you use the COM+ services or manage stuff like transactions in the database? In the production environment do you find it easier to maintain the java applications or VB/COM+ applications?

    I believe he was only comparing VB to java. I am not sure where JSP/J2EE came into it as they are different technologies.

    Also you should say Java/JSP/EJB vs VB/ASP/COM+

    VB is cack btw. As also pointed out Java/JSP and J2EE all run on multiple platforms/Operating Systems and J2EE scales quite well (if you code correctly).


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    Kernel32 wrote:
    You must have a good breadth of experience to be able to make a claim like this. I would be interested to know the pro's and con's between the Java/JSP/J2EE implementations you have been part of and the VB/COM+/ASP implementations? Did you run into scalability issues? Did you use the COM+ services or manage stuff like transactions in the database? In the production environment do you find it easier to maintain the java applications or VB/COM+ applications?

    For the implementation bit, I was simply refering to the complete lack of a VB implementation for anything other than MS Windows (and MSDOS, sorta). There are two non-windows ASP implementations (three if you count the highly quirky and free Apache::ASP); neither are free, or all that wonderful.

    For the suitability to large projects, I was spoofing a bit; I've never undertaken or been part of a large VB project. I would see something that only runs on Windows as INTRINSICALLY unsuited to a large project tho; it requires you to stick to one platform for a very, very long time. Historically, that hasn't worked out well. What I know of VB, and anecdotal evidence from people who DO work in it, suggests it's not so suitable, tho.

    Incidentally, JSP vs ASP isn't an entirely fair comparision; a lot of large Java web projects use a JSP/Servlet platform.


  • Registered Users Posts: 640 ✭✭✭Kernel32


    Hobbes wrote:
    I believe he was only comparing VB to java. I am not sure where JSP/J2EE came into it as they are different technologies.
    I was trying to highlight the different between language and technologies. VB, Java being language. JSP, J2EE, ASP, COM+ being technologies.
    Hobbes wrote:
    Also you should say Java/JSP/EJB vs VB/ASP/COM+
    You are correct. I don't know a huge amount about Java in general. This is why I am trying to understand peoples motives for considering java implementations as a better choice over an implmentation that will run on windows only(or will only run well on windows).
    Hobbes wrote:
    VB is cack btw. As also pointed out Java/JSP and J2EE all run on multiple platforms/Operating Systems and J2EE scales quite well (if you code correctly).
    I don't disagree that VB wasn't the greatest in the world. I have worked on and consulted on large projects that used VB and COM+. Some were very successful, well written, very modular and highly scalable. Some were rubbish. The different being the level of competence of the developers.

    As far as I know most decent sized java applications use an application server. If you wished to move from WebLogic to Oracle App Server is that pretty easy to do? Does it happen a lot?
    rsynnott wrote:
    For the implementation bit, I was simply refering to the complete lack of a VB implementation for anything other than MS Windows (and MSDOS, sorta). There are two non-windows ASP implementations (three if you count the highly quirky and free Apache::ASP); neither are free, or all that wonderful.
    I think we crossed wires here. I was actually asking about the large java projects you have implemented, versus the large VB projects you have implemented. Did they scale as well as you thought? If not where was the biggest failing on each? Which scaled up better and which scaled out better? Which was the easiest to perform updates on while in a production environment?
    rsynnott wrote:
    I would see something that only runs on Windows as INTRINSICALLY unsuited to a large project tho; it requires you to stick to one platform for a very, very long time. Historically, that hasn't worked out well. What I know of VB, and anecdotal evidence from people who DO work in it, suggests it's not so suitable, tho.
    Based on my own experience of working on several large projects that are locked into windows I haven't seen any problems with it. I find that generally the bigger the company the less likely they are to ever change platforms unless there is some huge ROI for a move like that. IT in large companies is often and unfortunately treated as a cost center which makes it very difficult to get approval for any large changes. I know it does happen from time to time and its usually phased in over a long time period.
    rsynnott wrote:
    Incidentally, JSP vs ASP isn't an entirely fair comparision; a lot of large Java web projects use a JSP/Servlet platform.
    I wouldn't call it a fair comparison either. The little I know about JSP and Servlets is that they were a lot more advanced than ASP. ASP is pretty old at this point. ASP.Net is probably a better comparison.


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


    Kernel32 wrote:
    You are correct. I don't know a huge amount about Java in general. This is why I am trying to understand peoples motives for considering java implementations as a better choice over an implmentation that will run on windows only(or will only run well on windows).

    No operating system lockin. Windows costs are high. It scales better (at least hardware wise).

    As far as I know most decent sized java applications use an application server. If you wished to move from WebLogic to Oracle App Server is that pretty easy to do? Does it happen a lot?

    Enterprise applications use an application server, java applications can mean anything (eg. Eclipse is a java application).

    As for moving from WebLogic to Oracle App Server in theory it should be possible. In Practice I am not sure as I have not used those technologies (Websphere person).

    I find that generally the bigger the company the less likely they are to ever change platforms unless there is some huge ROI for a move like that.

    Most companies I reckon. I've seen some companies still use 286's and software from 10+ years ago because its so stable for what they want to do.


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    Hobbes wrote:
    Most companies I reckon. I've seen some companies still use 286's and software from 10+ years ago because its so stable for what they want to do.

    There are still companies running proprietary software on PDP-11s and worse. It's usually not because they don't want to modernise, it's cause it's cheaper in the short term NOT to modernise. Because they wrote the software in non-portable languages. So they spend a fortune every year appeasing the old computer's hunger for proprietary hardware. This is the fate that awaits VB programmers ;)
    Rob


  • Registered Users Posts: 4,072 ✭✭✭muckwarrior


    Getting back to the point....

    In college I learned Pascal first. I thought this was a pretty good starter language as it's non complex syntax allows you to focus on learning the programming concepts as apposed to trying to remember the specific syntax for doing whatever.

    In second year we done C as our primary language. This teaches you some more advanced concepts like memory management and pointers. While you mightn't need to know this in modern languages with garbage collectors, I think it's good to have a grasp of the concepts as it can only have a positive influence in making your code better/more efficient. However I think the best thing about doin C is that it makes you more appreciative of higher level languages like Java or C#(personally my favourite).

    Finally in third year we done Java which I felt was a good platform to teach OO concepts.

    Anyway thats the way we done it. I think it was a pretty good way to learn!

    With regards to the High level / low level debate I'd say that C/C++ were low-level high-level languages, if ya catch my drift, Java and C# are mid-level high-level languages, and VB is a high-level high-level language. The likes of Assemble is what I would regard as a low-level language.


  • Advertisement
  • Closed Accounts Posts: 1,502 ✭✭✭MrPinK


    Syth wrote:
    A lot of people are saying to learn assembly as it helps you understand how a computer works. Yes, it can help you learn how the current implementation of computers work, but that's arbitary. If all our CPUs were turing machines then learning x86 assembly would be of no use. However learning how algorithms and the like work is much better and much more portable.
    I'd disagree. Assembly is programming in it's most basic form. All of the niceties such as variables, while loops, etc. are stripped away, and you really get to know the guts of program logic. You learn a lot more from it than just how the current implementation of computers work. In fact, I'd say it's even better to learn something other than x86 (maybe MIPS, DLX or ARM), which is a really bad and over-the-hill instruction set.


Advertisement