What should i avoide ?

  • Hello out there..


    I have followed the former The Daily WTF for some time, purly for fun.. But the thing is... I can't code...

    It's not like i dont know the principles... I just never had a reason to learn.. that is, untill now..


    So im now in a situation where i have to learn to code, probably C for starters. And since i know there is tutorials, and books, i wont bother you with the what should i get, questions..

    So here it comes; what are the does and dont's in learning to programe?

     What should i keep in mind?


    If it is any help, im going to use this for simulations and the like.


    Cheers 😉



    PS. Give me a good advice and i'll buy you a beer

  • I'd start with a more intuitive language like Ruby or Perl.  Or perhaps a fun language like Scheme.

  • Personally I would go for BlueJ. Its a nice way of learing OO, and has a book and everything, go to www.bluej.org .

    The language used is Java, but you can apply the principles to other language's as well

  • You don't have to start with it, but learn to program in a low-level language, like C or Pascal. Try some mode 13h game programming. You'll learn to appreciate all the work that higher-level languages and libraries save you from (garbage collection, nullpointer GPFs, ...), and you'll get a better feel for the fundamentals of the machine.

  • Perhaps even more important then what language you should start in, would be what you should start programming.
    Because after a few hours you wil know how to get a working "hello world" and the basic syntax of just about any language, but that's not programming now is it.

    That's why i wanted to give you the advice to try out the Coder Challenge forum on this site, if you skip the more C centric and difficult ones you will find that most are pretty do-able in a few hours or days, and will teach you more about how to use your chosen language then by just reading dry pages. Because in my experience the best way to discover how to use a language is to actually use it to do something and its always more difficult to decide what to do, then to find how to do it.

    However while this will teach you quickly the diffrent ways a language has for doing things, it won't actually teach you what the best or most optimal way is. For this your best bet is a good book about programming. And when i say a good book, i don't mean a lanugage specific book, but a book about programming in general. Like Code Complete or pragmatic programmer, i'm also quite fond of head first design patterns, but that limits itself to design patterns. In my experience books that are language specific (java in 5 minutes, php in 24 steps, C++ programming, etc.. ,etc..) are as good as worthless. Finding out how to do something in a language can be found online, but finding out how to do something in a good way isn't as easy, that's where a good book will really help.


    but if you really wanted to hear what language, i would say python. It's a easy to learn language with lots of online resources to learn it. And it's quite popular also, so it can't be bad to know it.


  • I side by stratos.

    And once a language has been chosen, I'd stress to find it's particular way of generating visible output. It's pointless writing a program if you can't see what it does.

    For example, in javascript:

    var output = 2 + 3;

    That's normal code. And it works. But big deal. Now what?

    Add a line:

    var output = 2 + 3;

    There we go! An alert box that says "5". Suddenly your program talks to you! Yay!

  • If you have to learn C, get K & R: http://cm.bell-labs.com/cm/cs/cbook/

    If you don't have to learn C, I too would recommend a different language to start with.  Python would be another strong candidate.  If you pick Scheme (which would not be a bad choice at all) The Little Schemer is a great book for beginning programmers: http://www.ccs.neu.edu/home/matthias/BTLS/

    The best way to learn to program is to do it.  Download the compiler/interpreter and get a hello world program working on your computer.  Then start going through a tutorial on the language.  Also, looking at other people's code is helpful.  Here is one good source: http://www.rosettacode.org/wiki/Main_Page.  Google code search and krugle are good too.

  • I suggest learning c#. You can get c# express and sql express for free.

    Id say what makes c# so easy to learn is the ide. When programming you have intellisense with the objects, you just have to start typing it and it will give you all the options you can program with. Java has this too. 

    It makes it really easy to learn programming because it requires less memorizing things like syntax because the ide will pop up with what is required and how it needs to be written for the most part.

    Then youll start to understand how the write programs and how they work, and move on to something different. 

  • I agree with plazmo on the idea that a more modern language would probably be a better place to start for getting the basics.  There's nothing more painful in programming that staring at 1 line of code for over an hour trying to figure out whether you forgot a semi-colon, used the wrong case on something, mismatched your parentheses, or made some other ridiculously subtle mistake.

    That being said, C is a load of fun.

  • cough while i agree with the inteli remark, most IDE's (that i have seen) have a manual of there own. And it will be a few hours until the make button will actualy compile your two lines of code. (which where very easy to write, i'll give you that)

    Also i can't say for C# but this is atleast true for java, you will need to first learn "the framwork" before your hello world will print. Understanding why stuff get's called automatically and such. Most (all?) interpeted languages don't have this, and while they also don't have a whoop ass* IDE, they will let you get results faster IMHO.



    * this is not ment sarcastic, good IDE's will improve your productivity a "whoop ass", but that is only After you figured out how the damn thing wants you to do things.

  • @Kunisch said:

    So im now in a situation where i have to learn to code, probably C for starters.

    Why C, in particular? Is this embedded design, or systems programming?

    PS. Give me a good advice and i'll buy you a beer

    take on C first unless you have a unix-like system handy, in which case
    you have an environment which is heavily geared towards such
    development from the beginning. (Here I will deviate from some other
    good points in this thread). You can do quite well with C as a first
    language if your coding against something like libSDL, Allegro, or the
    standard library where you have immediate feedback and have access to
    all the neato primitives. And you can download source code to your
    favorite apps to see how they work, if you are so inclined. You can get
    a sense of structure and style that way that is difficult to do
    otherwise unless you are thrown into a large project.

    It's hard
    to start high level and learn low level (throwing away abstractions
    that you have cemented as "reality" when they are but language
    constructs). Ideally everyone is taught assembly and LISP as first
    languages, and once they have those two down, everything else is
    syntactic sugar and domain specialization (haha). 

    But if
    you don't [b]need[/b] systems-level programming and just need to
    develop for the web or for end-user apps well then any language with a
    nice IDE and a thriving user community is a good choice. Take your

    So where's my beer? 

Log in to reply

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.