How to get into coding?

Discussion in 'Mac Programming' started by Arfus, Jan 12, 2011.

  1. Arfus macrumors member

    Joined:
    Aug 11, 2010
    #1
    How do ig et into coding? i have never done any coding before
     
  2. uberamd macrumors 68030

    uberamd

    Joined:
    May 26, 2009
    Location:
    Minnesota
    #2
    Loaded question. Grab a good book, sit down for a weekend or two, read it and go through the examples, then try a project on your own.
     
  3. Sander macrumors 6502

    Joined:
    Apr 24, 2008
    #3
    Witout giving any background, it's going to be hard to suggest a good book to you. It depends on what your goals are, what type of learning fits you, etcetera.
     
  4. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #4
    What are your goals? Why do you want to do this? Have you heard it is cool and a fun way to spend your spare time? Do you want to make a career change to programming/software engineering? Do you want to build iOS apps in your spare time for your friends or to sell on the app store to make money on the side? Do you have some tasks that you want to automate on your own machine? Do you have piles of meteorological data that you want to process in an interesting way?

    How much money to you want to spend learning this? Do you have time to take classes? Do you have money for a bootcamp-style course? Can you afford books?

    What level of proficiency do you wish to reach? Do you want to be able to get things to sort of work for personal projects or be able to teach others about programming and write rock solid code?

    We really need a lot more information before we can give you any worthwhile recommendations. Based on what you've given, open terminal and enter:
    Now you're into coding.

    -Lee
     
  5. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
  6. Mactrillionaire macrumors regular

    Joined:
    Oct 16, 2010
    #6
    For anything basic, you can probably start learning to code from reading a few books. However, if you are responsible for anything of sizable complexity, you need a deeper understanding of programming and the proper math background. Let's face it, even if you succeed at writing a popular program, no one will use it if doesn't use a pragmatic approach (for instance, using cubed or exponential sorting algorithms, or, the big no no on iOS: running out of memory because you coded the program for a desktop instead of a mobile run environment). Successful programming is largely about making the right design decisions before you even begin to code. You also need to test your code thoroughly in order to maximize the efficiency and security of your programs. So, while you may able to get away with writing a couple hundred line program without much experience, that will be less possible as you progress onto complex programs and challenging to implement algorithms. If you are not writing anything terribly complex, there are plenty of free online guides that can help get you started. I can't really tell what is right for you since I didn't get a sense of what you intend to do.
     
  7. Bill McEnaney, Jan 16, 2011
    Last edited: Jan 16, 2011

    Bill McEnaney macrumors 6502

    Joined:
    Apr 29, 2010
    #7
    Here's a link to an online edition of a book called How to Design Programs. The authors wrote it for high school students, but professional programmers learn from it, too. It'll be much different from many books that lots of other people would suggest because it's about the Scheme programming language. I'm suggesting it because it teaches more than Scheme. It shows you how to design programs.

    http://htdp.org/

    This http://racket-lang.org/download/ link takes you a site where you can download the Racket programming environment that HTDP's authors used to call DrScheme.
     
  8. chrono1081 macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #8
    I'm pretty ashamed to not know how to do this after coding since roughly 1998. Granted I don't do it full time but I should at least learn this.
     
  9. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #9
    Which part? The file creation with echo or the compilation and execution from the command line? :p

    You would generally have an editor around (vi, nano, pico,...) so I wouldn't worry too much about using echo to create files. Definitely handy in a pinch, but far from essential.

    B
     
  10. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #10
    I was just too lazy to type up instructions for an editor, and was afraid if a graphical editor like TextEdit was used they'd end up with an RTF.

    -Lee
     
  11. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #11
    Sure, it's much easier to deliver as "type this" instructions and actually have a chance of getting the expected results.

    I was just curious as to what chrono1081 thought they should learn from it.

    B
     
  12. chrono1081 macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #12
    I'd just like to learn how to do it. I have friends who are programmers for a living and they know how to do all of that stuff where as I've been using IDE's my entire programming life.

    If I use linux for example, I don't even know how to compile a program from source.

    I'd like to learn it more out of curiosity than anything.
     
  13. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #13
    This is the primary reason I advocate text editor + command line for beginners. I feel like it's a lot easier to go from a separate editor, a compiler, a debugger and console I/O at the command line to an IDE that pulls those pieces together (although sometimes heavily obscuring the console I/O) than try to go from an editor window and a "compile/run" button to performing the steps manually.

    I know you "always have an IDE" these days, but at least in my job there are times that i have a shell on a remote system and need to get something done. I know how to setup X-forwarding, and i could probably get some sort of graphical environment going, an IDE installed, etc. but it's a lot easier to fire up vim and get the job done and go back to bed.

    I guess it makes me feel better to know what's going on at various steps. It helps me work through problems, etc. Certainly the same solutions and approaches are available with an IDE, but I guess I feel like sometimes they are too clever.

    The only exception I make is large-scale Java projects. I'll bang out a small tool with javac and jar, but once a project gets complex I definitely prefer an IDE. I don't mean to knock Java, but it is incredibly verbose. I am a fast typist, but I definitely like having completion available when working with Java.

    If one were to want to get started learning a "terminal-only" workflow I'd say:
    http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html
    (Queue emacs lovers flaming)

    http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/gcc.1.html

    If you aren't familiar with piping things around a terminal:
    http://www.injunea.demon.co.uk/pages/page208.htm

    Once you're spending too much time managing dependencies when compiling:
    http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/make.1.html

    I don't believe IDE addiction is incurable. I had a mild dependency for a number of years, but once I started running OS X instead of Windows and developing primarily on Unixes the command line just clicked.

    -Lee
     
  14. chrono1081 macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar

Share This Page