Separate names with a comma.
Discussion in 'Mac Programming' started by Arfus, Jan 12, 2011.
How do ig et into coding? i have never done any coding before
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.
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.
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.
No links to the MR guide? http://guides.macrumors.com/Cocoa_FAQ
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.
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.
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.
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.
Which part? The file creation with echo or the compilation and execution from the command line?
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.
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.
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.
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.
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:
(Queue emacs lovers flaming)
If you aren't familiar with piping things around a terminal:
Once you're spending too much time managing dependencies when compiling:
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.
Thanks for the links!