FAQ: Which Language Is The Best To Learn.

Discussion in 'Software' started by ChViRuS, Jun 18, 2003.

Thread Status:
Not open for further replies.
  1. ChViRuS

    ChViRuS Private E-2

    (can someone with the relevant powers make this sticky?)

    This is a question which comes up time and time again. To advoid people asking the same question again and again, I decided to make list of languages and what they are good for. There is no best language to learn. They are all different and used for different reasons (hence, so many of them). This is as much of an exhustive list as I can think of. If you want to add to the list, be my guest:

    Assembly (ASM):
    You'll typically want to use MASM or NASM for this (compilers). Assembly is a pnumonic form of the core 0s and 1s the CPU directly understands to carry out instructions. It requires alot of instructions, typically, to do anything obviously useful. The use of assembly is virtually obsolete now, what with higher-level language compiler technology so good nowadays, there is no need to use assembly (a new C super-compiler exists, apparently, that even knocks hand-written+optimised assembly into a hat!). You would want to use assembly for very efficient code (because the instructions allow complete manipulation of the CPU). What is typically used, are Assembly directives in a C program (so you can write the bulk in C - alot easier - and the bits that need to be optimised, in assembly). Although good higher-level-language compilers do exist, they are very expensive (so this C/ASM approach is still an option). Good only for very complex projects, due to the difficultly in learning and using assembly.

    C:
    This is a higher-level-language than ASM. This means, that each instruction does more (so less has to be written, and it's easier to debug). C has become the de-facto standard for ALOT of companies. This reason is historical (and that, as a result, more people know C than any other language), and not necessarily a good one. Learning C is good if you want to write something on a CV you'll know be useful for a lot of computing jobs. C, however, allows alot of dirty tricks and has poor memory management. This basically means, its very easy to insert a bug which exists only because the program has allowed an action to take place that shouldn't be allowed to happen. The latter means a thing known as "memory leak" happens frequently, which is where over time the program fails to deallocate memory it used. The syntax of C also makes it a hard language to get into C. However, C is both very fast and very flexible (its possible to use the "dirty tricks" for clever programming). Both free ANSI compilers, and paid for Borland and Microsoft compilers are typically used to compile C. (Integrated into Unix. Therefore very easy to write a C program for, say, Linux)

    C++:
    Same as C, but with OOP added (among other things). OOP (object orientented programming) is a very big trait used in programming today, especially for large projects. It is a useful thing to know, and hence alot of people skip to learning C++, without bothering to learn C first. Same pros+cons as C apply for C++. The only thing to remember is, C programs are typically faster than C++ programs. But this is due to C++ programs usually containg objects. On the flip-side, the use of OOP allows for programs that would be tricky to do in C, and not likely be as efficient.

    Ada95:
    Very strict language. Similar syntax to C (well, closer still to Pascal, but i don't really know anything about that language). It forces good programming technique, by inforcing strict rules on what you can and can't program. This takes away some of the flexibility, that would be visible in a C program; this isn't a problem, however, since problems are worked around, and are more likely to work. It is used for safety-critical systems, where it is a necessity the program doesn't crash (e.g. the software used to control a nuclear-power-plant). For this reason, its not often learnt by the layman, but is still good to consider, if you think you might want to extra discipline to help in learning good programming practise. Free compilers can be found on the net easily. Contains OOP. (infact, is the only language officially supporting OOP.) Typically not as fast as C, but apparently, frequently beats similar C++ code in speed.

    Visual Basic:
    OK - my knowledge of VB is fundamental at best, but it is supposedly a very easy language to learn. It also used in macros in Office apps, but also as a variant called VBA or Visual Basic For Applications. VBA is the language to learn if you want to integrate and manipulate Microsoft Office Documents and MS Access Databases. Contains OOP. Another variant of this (Simialr to how Java and Javascript are) is ASP or Active Server Pages.

    ASP: Like PHP, this is a scripting language and is not compiled prior to being run. It is interpreted at run time. This generally causes a performance hit because the code is being interpreted as it is "read" into memory by the server when the page is requested. This is object oriented. All variables are of type VARIANT which again causes a hit because they are not specifically declared as a "string" or "integer" etc. ASP is a dynamic language that allows dynamic content,database driven applications and websites to be made much like PHP. ASP has the ability to call ActiveX components that perform specicif functions based on parameters passed to the ActiveX Object that is instantiated when called. ActiveX components can be written in C/C++ , VB or .NET. ASP can only be run on Microsoft IIS though there is an emulator for *nix, it is very slow.

    Java:
    Cross-compatable code. Compile once, and it should work on any computer with a Virtual Machine. Used everywhere, mobile phones, PDAs, Web-sites; the list goes on. It is useful, because you can learn one language and be able to code for your PC, but also for your mobile phone. SImilar syntax to C. Supports OOP. Not as fast as the aformentioned languages, due to having to run on a VM. However, my argument for that is: I suspect there are very few people, who want to program, that will ever write code that absolutely requires that extra bit of speed. If your program is too slow, its because you've written it badly, not because the language is a bit slower. Free and Pay-for compilers available.

    PHP:
    A back-end language for web-applications and services. It allows dynamic content for a web page (e.g. a forum, you click the same link, but the page content will vary depending on whats on the database). Supports OOP, and has alot of nifty features that allow for some pretty powerful code. Using the Zen pre-processor (i don't think it counts a fully fledged compiler) can be faster than all the other currently available back-end languages. Its free, and requires no compilation (since it runs natively on the server's software).

    JavaScript:
    A cut down, and slightly modified version of Java. Used for web-page wizardry (e.g. when you choose an item from a drop-down menu in a form, and the form changes slightly: thats JavaScript doing that). This allows the site to be dynamic once its downloaded to your browser (rather than generate a dynamic page). Basically, anything that wants to move on your site (unless its done in Flash or is an animation file) has to be done in JS. Its pretty essential to learn, therefore, if you plan on making web-sites.

    HTML:
    Hyper-Text-Markup-Language
    This is the "language required" to build the body of any web page. This is an absolute must if you plan on getting into web-design. Though HTML isn't really a language, it is mostly for formatting web pages for display purposes.

    XML:
    Extensible-Markup-Language
    This is pretty cool to learn. It can be used in web pages, but can be used in any program really. It (much like HTML, which are basically the same thing. HTML can be expressed in XML.) is parsed, meaning the syntax of the language is checked, and any semantic meaning behind a tarticular tag results in code being executed. (It's no great surprise, the parser is typically written in C). The domain for use of this is fairly specific, I would say. Learn, only if you have to (or want to). (Eg someone says, oh, yes, XML would be good for that.)

    Others:
    Prolog, Lisp:
    These are declerative types of language. (Excepting XML and HTML, all languages mentioned so far are imperative). The main difference is an imperative language describes how to do something, a declerative describes what do to. It can be difficult at first to get your head round, but it allows for very powerful (it not for consumer programs) programs. Prolog is typically used to write AI. Don't get excited, however, and think that you should learn Prolog. It requires a shed load of mathematical knowledge to use correctly, and even then is only used for AI you almost certainly won't be writting. "AI" for games, for example, is just a series of clever tricks (and hence, written in C usually). The "AI" that prolog writes is WAY to complex for a normal computer to handle alongside graphics, sound, etc etc.
    Free compilers can be found for both.
     
    Last edited by a moderator: Sep 7, 2003
    1 person likes this.
  2. vasarnap2000

    vasarnap2000 Private E-2

    FORTRAN is still alive and cooking.

    FORTRAN (Formula Translation): {definition is taken from http://www.yourdictionary.com/}: A high-level programming language for problems that can be expressed algebraically, used mainly in mathematics, science, and engineering.

    A good source for information and links to other useful sites can be found at:
    http://www.nsc.liu.se/~boein/fortran.html
     
  3. ChViRuS

    ChViRuS Private E-2

    Hi guys.

    Ummmm, firstly: sorry for the delay in replying; haven't been on the boards for a while :D

    OK - so quick responses:

    firstly masm and nasm ARE compilers. Both of these provide pre-processing commands, and syntax checking. The process of converting pnemonics into binary also comes under compilation.

    There are two primary parts to compilation: front-end and back-end

    Front-end is lexical and syntactic checking.
    Backend is optimisation and code-generation.

    Whilst there is no optimisation possible when writing ins assembly, all the other parts take place.



    Also - with regards to ASM coding (sorry I skipped out most of your conversation, just hoped I picked up on the gist :)) vs C etc coding.

    Firstly, no. High-end compilers now-a-days will knock hand assembly into a hat. The primary reason for this, is that they can have a much more global perspective of the system. Even your basic app could easily have 1 mil instructions in assembly. The sheer volume of code, and inter-relations between eg. far/near jumping, code-reorganisation, memory optimisation etc etc etc etc (and goodness me, even more etc) means that the human mind really cant take all this into consideration. At most you would be given a module to code, of maybe 100 to 500 thousand lines, and then, even with abstraction of code, optimisations between modules are possible. And a final point, not many people both understand the hardware system AND the OS system that they code for SO well, that they could optimise for it completely.

    Im not saying that on a small scale, with say a few thousand lines of code *only*, a human couldn't match (or **maybe** beat) a high-end compiler, but you wont find many projects where this is a reality, and software now-a-days just doenst come in packages that small.

    But I supose I should clarify (also in response to who asked which compilers achieve this). There IS a difference in compilers. That's why you might pay a few hundred for MS's Visual compilers (actually the GNU compilers, which are free, are quite respectiable for this class of compiler) aint gonna match to a enterprise IBM compiler costing 10s of thousands of pounds/dollars/euros. ;)
     
  4. chaslang

    chaslang MajorGeeks Admin - Master Malware Expert Staff Member

    MASM is an assembler. That is why Microsoft called it MASM (Macro Assembler).
    Compilers translate high-level languages into machine code and assemblers convert assembly language programs into machine code.
     
  5. gryfang

    gryfang Private E-2

    I don't want to sound stupid but isn't this a "right tool for the right job". I mean most of the high order languages are made because they wanted somthing special to be done in an easier way. If I want cross compatibility I won't use lisp or one of the several different assembly languages, but java, etc.

    Also there are several different Assembly languages, because it's part of the instruction sets (the interface between the processor and the software basically). The Intel processors and the Mips Processors have different Assembler languages is an example.

    Also I didn't see Perl, Python, Scheme, C# which all have their different uses
     
  6. ChViRuS

    ChViRuS Private E-2

    No, compilation (when we are talking about it, in the domain of traditonal HLLs, not your bytecode language or interpreted) is the process of compiling non-machine code, into machine code binary. The fact that the pnemonics of Assembly have a 1-1 relationship with binary representations, is a side-issue. Besides, NASM has macro support, which is certainly not a 1-1 relationship. The compilation process in NASM compilers involve syntax checking, and actual output of binary code. That is a front ot back code generation process. That is what compilation is. But, we argue over symantics :D

    Further, to the last response. Correct, languages are a best-tool for the job. That's what I was hoping to illustrate here with my post. It certianly isn't a comprehensive list (and at the time, when it was compiled, C# and the .Net structure was a very new baby indeed. I didn't know enough about it to include it)

    However, firstly.... I suspose I should clarify some points some more:

    You mention that you wouldn't use Lisp for cross-compatibilty. However, that would be a very good reason to use Lisp (or Python,or TCL, or Perl, etc) because they are "intrepreted languages", which means that they there is no "compilation" (see above :)), merely a instruction to an underlying intrepeter to call some function. Java, is a different beast again. Java isn't intrepeted like this. Java actually creates what is known as "byte-code", a mid-way version of assembly, which can be abstractly thought of as the native instructions of the "virtual machine" it runs on. It is this VM layer between the byte-code (which will always be the same) and the actual binary generated by the VM from the byte-code, that is platform specific, that creates the cross-compatability of Java. C# is basically the same notion, although the "VM" in this case is the .Net framework and stack implementations.


    Umm, oh yes, and scheme is an object-oriented version of Lisp. It is effectively the same language.

    I really need to edit my original post.... but last time I was on the boards, I couldnt.. maybe because its "sticky".

    Oh, and finally, with regards to your assembly point (just because I feel like a pedantic annoying know-it-all, and work is boring atm :D), assembly IS the entire instruction set of the PU (processor unit) of a system. You are absolutely correct, assembly differs from architecture to architechture. But it's not the interface between the hardware and software. Assembly is the 1-1 pnemonic mapping of the instructions that result in execution of the binary values that have been read in from the pipeline of the PU. It is actually the lowest abstraction of software possible on a machine (well, ok, the actual binary itself it, but, meh).

    Enough from me..... :/
     
  7. ChViRuS

    ChViRuS Private E-2

    Blah... i cant find the edit button after a few minutes.....

    But i meant to say "exhustive list" not "comprehensive list".....
     
  8. Kodo

    Kodo SNATCHSQUATCH

  9. rpgfan3233

    rpgfan3233 Private E-2

    [This is a sticky, so this isn't exactly bumping...]
    I think PHP would be the best as well. I'm currently learning it. I'm finding that if you can understand how some JavaScript (or C++; they do have some similar methods) works, you can understand PHP. The problem with me is that PHP and MySQL (databases) tend to go together, so I'm actually trying to learn 2 at once... Once I do learn though, I'll be able to finally create my own forum since MySQL is required to store user info/preferences, threads/topics, etc...
     
  10. Void_where_prohibited

    Void_where_prohibited Private E-2

    It might be the best to learn but I find Liberty BASIC to be the easiest to learn.
     
  11. Le4rner

    Le4rner Private E-2

    There is no best language. You would not code a web page in C++ or Qbasic. Different languages are there for different reasons. If I were to recomend a language for someone to learn I would want to know a few things first.

    1.) Do you know any other language?

    2.) Are you familar with OOP Object oriented Programing

    3.) What is it you want to do? That is do you want to make stand alone GUI applications? Make web pages? Make command line scripts?


    The hot thing right now 12/12/2005 is

    C++, | many vendors
    Java Enterprise, |Sun Microsystems, few others make compilers
    .Net platform | Micro$oft
    PHP |http://php.net
    SQL data bases | http://mysql.com , http://www.microsoft.com/sql/default.mspx , http://www.postgresql.org/ ,
    C and C++ | http://gcc.gnu.org/, http://www.borland.com/downloads/download_cbuilder.html,

    Do not confuse C/C++ with micr$ofts Visual C++. They are not the same.

    You also have your markup languages such as SMIL, XML, HTML, XHTML, SGML http://xml.coverpages.org/sgml.html (not for meer mortals)


    So to answer the question... There is no single best language. As a matter of fact once you get into programming you will often find you NEED more than one to get the project done. Most video games these days are C++ with some assembly thrown in for speed. There are also MANY more things going on as well.
     
  12. Kodo

    Kodo SNATCHSQUATCH

  13. Kodo

    Kodo SNATCHSQUATCH

    VB6 is dead..MS is no longer supporting it. .NET is the new environment/framework that MS has delivered.

    http://www.microsoft.com/net/default.mspx

    There are vast new improvements to developing software with .NET . There are also several .NET languages... VB.NET, C#.NET, J#.NET and a slew of others. Since you're into VB, I would recommend staying the VB route until you wrap your head around what .NET is. I can say this.. VB.NET a lot different than VB6 and the IDE (Visual Studio 2005) is just outstanding! You can get an express IDE for free from MS (legit!) http://msdn.microsoft.com/vstudio/express/vb/ this way you can download a nice IDE to see what it's all about.

    Don't bother with VB6.. it's legacy.
     
  14. Jungalist

    Jungalist Private E-2

    Just a note, the .NET framewrok itself is a free download and you can get free .NET development tools from Microsoft. The thing is that unlike Visual Studio, which has everything in one App, the free ones are language specific.

    The Express Editions come in Web, C++, C# and VB flavours.

    http://www.microsoft.com/express/product/default.aspx
     
  15. PC-XT

    PC-XT Master Sergeant

    IDE is Integrated Development Environment, which is a tool used to develop programs, usually in a particular language. There are IDEs for Java, C++, Basic, etc. The alternative to an IDE is usually a text editor, but an IDE includes features that help with the language, and usually can automatically run the compiler for you. Many also help with debugging. QBasic and Edit are the same basic editor, but QBasic is more like an IDE. I tried Visual Basic demo 6, I think, but it was too buggy for me. I use C++ instead, with Quincy or Dev-C++ IDEs. I like legacy technology. I still use win95, 98, DOS3.3+ (both PC and MS), and many other legacy stuff. I often work a problem out in them when it doesn't work in a modern situation, than translate.

    My first language was Texas Instruments Extended Basic. My Mom showed me programming in it. I then learned BASICA and CBASIC, as well as DOS batch and Assembler on an IBM PC-XT. Shortly afterward, I added QBasic and HTML to my arsenal. Now, I know JavaScript, Java, C, C++, PHP, and some languages I have no experience in, but can read. I never wondered which language to learn first, I wanted to learn them all. lol I think the suggestions already given to choose a language are good, though. Here is how I choose which language to code a particular project in:
    factors:
    1. environment to work in: Operating System, hardware, means of communication if more than one computer or involved or if external routines are to be used
    2. Will you want to make quick changes to a text file (script) or do you want to compile for more effecient execution?
    3. If any source is already coded, can that language or similar be used?
    4. Which language do you have the most experience programming something similar?
    As for #1, Here is how I categorize my best languages:
    DOS: Assembler, GW-BASIC, QBasic, batch files
    Windows: Windows Scripting Host, C++, Java, and some DOS languages
    Macintosh: AppleScript, HyperCard, Assemblers
    Linux: C++
    Internet: HTML (or other SGMLs like XML) for structure, JavaScript and Java for client-side (and PHP for server side) actions.
     
  16. Wlerin

    Wlerin Private E-2

    So... Where to begin.

    A) Bat files and sh/bash scripts are both examples of shell scripting. Look up unix shell scripting. But these are very simple languages that rely more on coordinated installed programs than doing anything new. I wouldn't, personally, include them in a list of languages to learn, except as addendum.

    B) It's mnemonics, not pnemonics. "Pneumonics" relate to the lungs or other air-pumping devices, mnemonics are devices to aid memory.

    C) The OP neglects to mention most of the dynamically-typed languages, i.e. Python, Perl. Not to mention Ruby-on-Rails and a host of other things I've read about but don't really know enough to write on, though this might be due to the date of the post.

    D) XML is gaining importance, and may soon replace HTML in the guise of XHTML. Not to mention its value in databases.

    E) The OP also left out INTERCAL, for what reason I cannot fathom.
     
    Last edited: Nov 30, 2008
  17. hdg653

    hdg653 Private E-2

  18. DavidGP

    DavidGP MajorGeeks Forum Administrator - Grand Pooh-Bah Staff Member

    Locked this FAQ on Programming Languages, so if you have a question on Programming Languages then please do start a new thread on your issue and give as much detail as possible.

    Thanks.
     
Thread Status:
Not open for further replies.

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds