A Newbie Coding



  • What is the best way to start coding, i would like something that is multi-platform (im a big OSS guy) and easy to learn



  • First you should learn how to create syntactically correct structures (like sentences for example). Staying in the bounds of the grammar of your programming language is crucial, otherwise you'll fail fast and early. If you mastered that you have several roads to go. Start with C(++) for a very techy, low level approach that in the end will give you most likely the greatest skill though. Start with Java for true platform independence, however make sure you have learned and understood the basic concepts of OOP before. Lastly, start with scripting languages (Perl, PHP, JavaScript, Ruby) for a quick-and-dirty approach wherer you have to follow very few rules and will see impressing results very soon. But be aware that this is also the way that has by far the highest risk of creating monumental WTFs and that it can become very difficult to switch to more powerful languages later.



  • @PSWorx said:

    First you should learn how to create syntactically correct structures (like sentences for example).

     

    I find your ideas intriguing and would like to subscribe to your newsletter.  



  • Avoid script languages. Also avoid Visual Basic and other WTFy languages like DataFlex (You've probably never heard of DF. I envy you.)

    Start with C++, C# and Java. These languages are a bit alike as they have common features (C Family).

    Learn OO: http://www.bluej.org/

     



  • You need to learn scripting languages AND "hard" languages at the same time. It is important to understand the tradeoffs of each system (compile->integrate) vs. (fetch resource->evaluate) and understand what is a language vs. the language environment and standard library.

    Stay away from Java as a first language. Java is too conceptually abstracted away/simplified from the languages it was inspired by and designed to replace that many lessons learned are lost when beginning in that system (doomed to repeat mistakes)

    C# is okay. If only because the object system is richer. I would stick with C/C++/Obj-C/D. Or Objective Caml if you want to try a different paradigm without turning your head inside out.

    At the same time: look at Ruby, Python, Perl or JavaScript. Pick any two of the scripting languages and become proficient with them as well.

    The hallmark of a good programmer is being able to recognize how to do the same job in multiple languages, and to be able to evaluate which environment is best suited for doing the job effectively.

    This is how you find the way. 



  • IMO good languages to learn the concept of programmings are easy-to-read, easy-to-understand languages like Pascal, Ruby and Basic. I would give too much emphasis on multi-platform in the beginning, since your first programs will suck anyway and it takes some time to become able create something that is interesting to others; by the time you have probably already learned another language.



  • Start with a little bit of C.  It is fairly easy to get started with and it gives you a feeling for old-style low-level programming.  That's a good thing to do.

    Then realize to yourself, C should not be used in any new large projects these days.  Working in C you will spend your time worrying about memory and pointers, instead of worrying about objects and design, so C is not a good language to keep gonig in.

    After doing a little bit of C (not very much, just a little) move on to a language which makes you think in objects.  I know, Java makes you think objects and it's a great language.  The problem with Java is that the learning curve of figuring out how to compile a program and run / deploy it is so high.  "I just learned Java and now I also need to learn how to use Ant and Tomcat and...."  That's too much and it will be frustrating.  So you need to use another language that doesn't have any of those issues, and lets you get right to objects and running objects.  I would recommend Ruby.

    From there... you will get experience and understand what is going on, and then try Java.

    I recommend Joshua Bloch's [i]Effective Java[/i] as the best Java book out there.

    [url=http://chiralsoftware.com/blog.jsp]Software development blog[/url]



  • @kirchhoff said:

    At the same time: look at Ruby, Python, Perl or JavaScript. Pick any two of the scripting languages and become proficient with them as well.

    I would say don't start with JavaScript, if only because there is an overwhelming abundance of really bad code examples on the 'net, and it's too easy to learn really bad habits at the start.  Stick with Python or Ruby because their userbases are small and tend toward more experienced coders (than JS, at least).  Perl's cool, too, because it's so easy to get going.  But pick up an OOP language soon afterward, because that's the way the industry has trended. 



  • @bstorer said:

    But pick up an OOP language soon afterward, because that's the way the industry has trended. 

     Those are all OOP languages. Or maybe the definition has changed since I last checked.

     What you really meant was: pick up a compile-able language (as if to give your software an aire of respectability or business applicability).



  • @kirchhoff said:

    @bstorer said:

    But pick up an OOP language soon afterward, because that's the way the industry has trended. 

     Those are all OOP languages. Or maybe the definition has changed since I last checked.

     What you really meant was: pick up a compile-able language (as if to give your software an aire of respectability or business applicability).

    I mean to pick up an OOP language if you opt first for Perl.  While Perl supports its own (special) brand of OOP, it's really a procedural language at heart.  I just recommend backing it up with a language that was designed around OOP principles, instead of having them kinda tacked on.



  • @bstorer said:

    I mean to pick up an OOP language if you opt first for Perl.  While Perl supports its own (special) brand of OOP, it's really a procedural language at heart.  I just recommend backing it up with a language that was designed around OOP principles, instead of having them kinda tacked on.

    The whole point of Perl is that it allows you to be paradigmic without being paradogmatic. It can do everything that a language "designed around" "OOP principles" can do - the only difference is that it can do other things too.

    At heart, Perl is Perl. It is not an "OOP language" or a "procedural language", but it is an expression of the observation that thinking in terms of "OOP language" or "procedural language" is just crippling yourself. 



  • DON'T LEARN PERL!  Perl will not teach you anything valuable about software design.  Perl will teach you that anything goes, that sloppy is ok.

    There isn't even a specification for Perl.  Perl wasn't designed, it just sort of happened.



  • @JavaCoder said:

    DON'T LEARN PERL! Perl will not teach you anything valuable about software design. Perl will teach you that anything goes, that sloppy is ok.

    There isn't even a specification for Perl. Perl wasn't designed, it just sort of happened.

    Great!  Let's start this argument again!  Does anybody want to throw out some jibes at VB while we're at it?

    Look, you'll never catch me writing anything more than 30 lines in Perl; it just doesn't work the way my mind works.  But Perl's great at what it does, it has a huge community, and it's great place to learn basic programming concepts because it's so forgiving.

    From your user name, I'm guessing you'd recommend Java?  I use Java all the time, but Java has its flaws, too.  For example, it's mind-numbingly strong-typed.  And it's GUI toolkit is laughable.  And the sheer amount of classes needed to get anything done is just frustrating.



  • @bstorer said:

    From your user name, I'm guessing you'd recommend Java?  I use Java all the time, but Java has its flaws, too.  For example, it's mind-numbingly strong-typed.  And it's GUI toolkit is laughable.  And the sheer amount of classes needed to get anything done is just frustrating.


    No, read my post above; I don't recommend Java for a newbie coder.  It is mind-numbing to get the IDE, build and deployment working, among all the other things like figuring out classes and all that.  All those things get in the way of learning to write code.

    I would suggest an OO language that makes it quick to get started, like Ruby.

    As for Java's strong typing, that is one of its good features.  It catches so many bugs at compile time.

    The GUI toolkit is laughable until you use NetBeans Matisse to lay out your pages, and then it's quite serious.  The only problem right now is there isn't a data binding system that can bind storage to Swing components in some way.  But that is coming too.



  • @JavaCoder said:

    Perl will teach you that anything goes, that sloppy is ok.

    On the contrary, it is impossible to write non-trivial software in perl without unlearning this, and strongly developing your senses of laziness, impatience, and hubris. Perl is not known as the "unix swiss-army chainsaw" for nothing: if you approach it thinking that sloppy is ok, you'll cut your own damn leg off. 



  • @JavaCoder said:

    @bstorer said:
    From your user name, I'm guessing you'd recommend Java? I use Java all the time, but Java has its flaws, too. For example, it's mind-numbingly strong-typed. And it's GUI toolkit is laughable. And the sheer amount of classes needed to get anything done is just frustrating.


    No, read my post above; I don't recommend Java for a newbie coder. It is mind-numbing to get the IDE, build and deployment working, among all the other things like figuring out classes and all that. All those things get in the way of learning to write code.

    I would suggest an OO language that makes it quick to get started, like Ruby.

    As for Java's strong typing, that is one of its good features. It catches so many bugs at compile time.

    The GUI toolkit is laughable until you use NetBeans Matisse to lay out your pages, and then it's quite serious. The only problem right now is there isn't a data binding system that can bind storage to Swing components in some way. But that is coming too.

    Fair enough.  I've never used Matisse.  Every Java GUI builder I've used simply delays the torture, not relieves it.  How is it that much more effective?

    I agree that Ruby (Or how about Python, with it's forced consistent indentation?) would make a great first language.



  • Matisse really is excellent.  Like everything else in Java there is quite a learning curve before it becomes truly useful, but once you get through that it is excellent.

    I don't personally have experience with them, but Ruby and or Python seem like the obvious choice for new coders these days.  The other languages are either too awful (perl) or too hard to get into (Java).  Or they focus on things that should not be the main focus of programming, like memory management (C).

    The ideal qualities of a language for newbies:

    1. The tools for editing and executing should be obvious and easy to use with no learning curve, ie, if you know Wordpad, you should be able to write and execute your program.  Any reasonable scripting or non-compiled language passes this.  Java flunks this big-time: you gotta learn javac and Ant and maybe also Tomcat etc before you can even run "hello world".  And Java Enterprise flunks this even harder.  Newbies shouldn't have to learn about compilers, at least not immediately.

    2. The language should focus the programmer on thinking correctly.  Perl flunks this; perl lets the programmer do practically anything.  C flunks this; the programmer has to immediately start thinking about memory management issues.



  • How anyone gets going with a Java EE server I'll never know.  I spent the better part of a week once trying to learn enough about EJB, Servlets, JSP, and Tomcat just to get a basic website going.  And then I added Struts and Hibernate.  And Faces and Spring are out there, lurking, mocking me from the shadows.  Fact: I have an entire shelf of O'Reilly books about J2EE/Java EE technologies.  Another fact: I gave up on all of them and moved to Ruby on Rails.  A third fact: I only occasionally regret it.

     



  • As a person who is in contact with a huge number of people were introduced to programming in C, I'd discourage you from starting with low-levelish languages. The technical details connected with the computer architecture are often confusing, it's easy to make a mistake with which the compiler won't help you at all and you're likely to be very frustrated by hunting elusive bugs. I think you'll be best off starting with Python. You'll be able to concentrate on the concept you're trying to implement without worrying about technicalities. It's syntax encourages clarity and brevity which are foundations of good style. It also has a very universal but not overwhelmingly large standard library. From what I'm told, Ruby is similar in idea. I believe MIT uses Scheme for it's introductory courses which is quite a recommendation. Stay away from Java unless you hope to find work as a programmer. Pascal is plain stupid.
     



  • Just learn UML and let softwares like Visual Paradigm generate the code for you! That too in the language of your choice!


     

     



  • On a serious note, the choice of your programming language depends heavily on your motive behind it.
    If you want to learn programming with a focus on intellectual "purity" and on core computer science'y issues like data structures, algorithms, etc - then start off with Python, Ruby or even Lisp. Of course, these languages have great commercial appeal too.

    On the other hand, if you are seeking to make quick money or trying a new career path - then Java and C# are your safest bets. The truth is these languages have years of material, foundation(s), frameworks and sheer community wisdom to gain from - but it can be quite an overwhelming challenge, especially for a beginner. And not to mention the fact that a lot of material "out there" is outdated, inaccurate, are simply bad. In terms of pure programming languages, Java and C# are not bad at all and you can definitely learn the finer aspects of programming from them (to an extent at least). However all the extra fluff that comes with these languages can make you feel lost.


  • Here's a good reason to start in C, just to play devil's advocate: C does not have a string object.  At least you'll be forced to avoid a lot of the WTFs on this site where the solution to every problem is "put it in a string."  And frankly, that's the only recommendation I can give C as a first language.



  • @GizmoC said:

    On the other hand, if you are seeking to make quick money or trying a new career path - then Java and C# are your safest bets.

    Reality check: if these are your goals, then your safest bet is to skip programming languages and learn how to bullshit ignorant people. You'll make far more money and career progress that way - sure, 10% of the people you talk to will know that you're making it all up, but they won't tell the other 90%, who will throw money at you like water. If you look good in a suit, you'll be a senior consultant in a megacorp before the end of the year, and an executive in less than a decade.



  • @asuffield said:

    @GizmoC said:

    On the other hand, if
    you are seeking to make quick money or trying a new career path - then
    Java and C# are your safest bets.

    Reality check: if these are your goals, then your safest bet is to skip programming languages and learn how to bullshit ignorant people. You'll make far more money and career progress that way - sure, 10% of the people you talk to will know that you're making it all up, but they won't tell the other 90%, who will throw money at you like water. If you look good in a suit, you'll be a senior consultant in a megacorp before the end of the year, and an executive in less than a decade.

    Exhibit A



  • Never programmed anything in your life?

    I personally have found the Online Ruby Tutorial rather enlightening, as far as Ruby goes. It introduces one to concepts such as strings, input, output, hashmaps, integers, variables etc. And there's a *very* poignant guide for it, next to a rather great technical reference

    I think Ruby is a good one to start with. And if one wants to get serious, there's an all-in-one install package that includes a server, the Ruby interpreter and a DB.

    Wise Words:

    Programming will not be learnt in a day. Or a week. Or a month. Sometimes not even a year.



  • @dhromed said:

    Wise Words:

    Programming will not be learnt in a day. Or a week. Or a month. Sometimes not even a year.

    My preferred variation:

    Gaining expertise in any field takes about ten years (give or take two), and programming is no different.

    For a rough comparison, programming is about as difficult to learn as playing the violin, and takes about the same amounts of time, effort, and dedication (including the initial phase where you are merely trying to learn how to play actual notes, rather than screechy, atonal noises).

     

    Ruby probably isn't a bad choice to start with, but it's important to realise that you don't know anything significant about programming until you understand why the choice of language isn't really relevant to the subject, and you can't understand this until you know a minimum of three languages (and usually more like half a dozen). Knowledge of any particular language makes you a programmer in the same way that ownership of a violin makes you a musician. Branch out as soon as you are comfortable with one. At the very least, learning some more languages will keep you busy and thus limit the amount of damage you're likely to cause.



  • If you are just starting, do what ever language for which you can find a decent textbook and free tools. IMHO the language does not matter. The point is to learn something. But Java is as good as anything.  I Highly recommend the book Java How to Program by Deitel & Deitel. Their C++ book is excellent as well. Eclipse, an Integrated Development Environment (IDE) is available for Mac and PC - free. Also SUN has a Java IDE called NetBeans - also free. That will get you started.



  • Learning C is probably your best option. You can google for resources.

    http://www.cppreference.com/index.html

    I use this as a reference when I'm to lazy to get my Complete C++ Reference (by Herbert Schildt) when I just need to know a member for the STL and it's arguments/purpose.




    This is the first programming community I've ever been part of. It's actually really nice, if you go o the the forums check out the FAQ board, it has a lot of good tips. Also it has a board for each of the following: C, C++, C#, Window Programming and Linux Programming, it may have added more since I was last there. The only thing I don't suggest is their code downloads, none of the ones I downloaded seemed to be any good for learning from.



  • start eh? coding eh? multi-platform eh? easy eh? learn eh?

     

    sorry nothing for u. 



  • If you're a big Unix person then you might want to check out the book Minimal Perl.  You don't have to learn all the gory details about Perl but it would be enough material to get started thinking like a programmer.

    I'm not a huge fan of Perl but it's something that just works on any Linux or Unix system.  It's also useful right away for solving problems.  I never used Python or Ruby so I can't comment.

    I've seen battle-hardened veteran programmers try to learn Java, only to throw their hands up in confusion and despair when they try to do something important and their Eclipse build path breaks or they start getting ClassNotFoundExceptions (which is always).  Visual Studio works great most of the time but when it breaks it breaks hard, and it's not exactly multi platform.

    Here's the progression of how I learned to program, but it wasn't pretty:

    - Early high school: Wrote some QBASIC programs, and read Teach Yourself C in 21 Days (*sigh*).  Just dicking around trying to create games.  It didn't go very well.
    - Late high school: PHP and C++.  I hacked together PHP for some webpages and picked up C++ for a programming competition I did in high school.  That wasn't too bad since I already knew some fundamentals of C (i.e. I knew what a pointer was, I knew about printf, malloc, free, etc).  I didn't win the competition though, I knew nothing about data structures or file i/o.
    - First year college: Java.  That wasn't too bad since I was comfortable with C-style syntax and I vaguely understood "object oriented" from when I was trying to learn C++.  It took me a while to get interfaces and event handlers.
    - Second year college: Took a C++ class which filled in a ton of gaps in my knowledge.  I somehow got hired for an internship where I had to write a J2EE application.  I realized I knew nothing about real programmers used Java, and experienced my first death march project.  Then I got another internship where I did a bunch of C# web programming.  I'm glad I got the chance to do serious work in both Java and C#.

    - End of college: Took a class about Lisp and Prolog, but honestly I never use those languages and I never use the concepts they were supposed to teach.  I'm sure most people would say the same thing in private.  I did more part-time work programming with Java and J2EE servers.  Also did some more C# programming for a class project.
    - Now: I do systems programming using C++ and assembler code.  It's definitely been a learning experience the whole time.  I'd be more comfortable if I was still doing Java, but I guess it's good to branch out and do something completely different.

    I guess the moral is: If you learn one language well, it gets progressively easier to learn everything else.  I don't recommend starting out with QBASIC, PHP, or Teach Yourself C in 21 Days.



  • My first exposure to programming was some obscure Macintosh BASIC variant called "Future BASIC."  This was taught in a high school programming class, and it was (mostly) a good experience.  If nothing else, it gave me exposure to a some of the common concepts and control structures (variables, types, loops, if statements, array, functions, etc.)  When I got to college, it made it a lot easier to transition into C++ during my first year.  Until we got into things like OOP and pointers/references/memory management in general, it was all pretty much a matter of learning new syntax.  Could I have jumped straight into C++?  Probably.  Am I glad I had some prior exposure to programming, even if I was hardly scratching the surface? Yes.  The thing is, when you learn BASIC, you have to remain open to learning a better way of programming in the future.  Look at the language as "training wheels" rather than a serious skill.  One my favorite quotes by Dijkstra is "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."

     


Log in to reply