How did you start learning how to program?

Discussion in 'Mac Programming' started by tekboi, Mar 16, 2013.

  1. tekboi, Mar 16, 2013
    Last edited: Mar 16, 2013

    macrumors 6502a


    I'm in a weird situation. I have took a few programming classes at my university a few years back and loved it. But life happened and I ended up stepping away from it for years. Now I have an idea for an application and I really want to be able to implement it in the form of an mac application. But I have no idea where to start.

    Even though I have knowledge of basic programming principles, I have no idea what to do when it comes to REAL WORLD PROGRAMMING. I learned html & css by reverse engineering websites that I found interesting. It would be cool if I could learn the same way with programming...
  2. macrumors 603


    First off, you're in the Mac Programming section of these forums - there's a separate iOS programming section of these forums.

    Second off, to learn iOS programming, I suggest you first learn C, then dive into Stanford's free CS193P course (it's on iTunes U) which covers iOS programming.

    I find Learn C the Hard Way is a quick and to the point (and free) eBook that'll teach you just what you need on C:
  3. macrumors 6502a

    There are lots of good tutorials on iTunes U, including entire programming course lectures from Stanford and others. It can also be worthwhile to buy a good intro book that's in tutorial format and just go through the whole thing. I liked an old version of this book, personally (although for clarification, I had been programming for ~20 years when I played around with iOS development):
  4. macrumors 603

    A lot of people started out with an Apple II and a bunch of magazine articles on Basic, until they could code up or copy and mod a simple game.

    This was tons easier than learning C or Objective C, so succeeded with a vast number of kids, many who later moved on to more professional software engineering.
  5. macrumors 6502a

    Yep, that's how I started. But I was 6 at the time...I think the process for learning when you're starting as an adult is often more time constrained.
  6. macrumors 68040

    Awesome site… used it long ago but forgot about it… now I can brush up on Python
  7. macrumors 65816

    I started out on a TI-99/4A back in 1981. The first program I wrote came from a programming magazine that I cannot remember the name. It had a section each month with about 100 lines of code to make your computer do all sorts of things like bounce little squares around. I wrote my first 'real' program in GW Basic; about 1500 lines; all saved to a cassette tape; called Agent X. I showed everyone. :)

    Now I know and write code in multiple languages daily, today I wrote some Ruby, PHP, javascript, ObjectiveC and Java ( also did some HTML5 and CSS work ).

    I'm all about jumping right in and forgetting about theory, I've had 8 years of theory, just give me syntax examples, I'll figure the rest out, Haha.

    I read several books on iOS. The one that got things to stick was Big Nerd Ranch iOS Programming and Learning Coco 2D. I use Blender to build the environments and character models. A long time ago ( 10 years ) I used Maya but at that time found it too combersome and blender too immature. I've only just started working on my on 3D stuff ( about 2 years ) and haven't had the need for Maya power ( or price ) yet.
  8. macrumors 601

    Mr. Retrofire

    I use Real Studio as a RAD tool. I use the apps to test my libraries, usually written in C/C++ & assembly language.
  9. macrumors 603


    Why assembly? That seems like it would introduce some major headaches for you whenever Apple releases new hardware. (I don't really know - I've only ever written assembly for class assignments... I was under the impression that assembly code has to be modified for each ISA... which I'm under the impression changes with each new CPU.)
  10. Mr. Retrofire, Mar 18, 2013
    Last edited: Mar 18, 2013

    macrumors 601

    Mr. Retrofire

    Video-/Audio-Codecs are impossible without assembly code (see H.264).

    No, the “old” instructions, like SSE2 are also available on SSE4 platforms. Many parts of OS X and iOS are written in assembly language: Parts of the kernel, the accelerate framework, the core crypto library, the system framework and many other parts (CoreGraphics framework, et cetera). The ISA is more important for the developers of the GCC & LLVM compilers. I need a stable ABI, and Apple/Intel has a stable ABI.
  11. macrumors 68000


    How will you guys suggest someone with basic knowledge of html and css jump into programming ? I know html is not really programming :eek:

    Some people suggest me to start with assembly but most always say to pickup Java or C++

    Any recommendations are welcome in regards of where and how to start learning :)
  12. macrumors 6502a

    I think starting with Assembly these days is overkill. While it forces you to learn programming from a low level, most people are writing software for business applications, web apps or lightweight games/entertainment purposes, and are going to use a fairly high level language for it. Besides, I've seen plenty of developers who started with low level languages who never developed good habits when they got to object oriented languages like Java and C#.

    I'd personally say to either start with a language you actually are interested in using for something (at least a "for fun" project), and if you're not sure, try Java, C#, Objective-C or C++.
  13. macrumors 603

    And, I've seen plenty of developers who started with high level languages who never developed the good skills needed when they got to a cost-sensitive embedded or performance critical project.

    The need is not rare. Note the top revenue game apps that can do 60 fps complex rendering plus real-time environmental audio. Versus the percentage of simple apps that crash even in the humongous vast memory available on the same iPhone 3GS. Now what happens when some company intros a hot-selling wristwatch sized environment?

    I'd say an Arduino is a great environment on which to learn to code.
  14. macrumors 6502a

    Agreed, I'm not saying the need doesn't exist. I'm saying someone just venturing into starting to learn how to code whose previous experience is HTML & CSS isn't likely going to undertake single-handedly writing a 60fps game with a complex rendering environment and real-time audio. You have to start somewhere, and I personally think it's better to start with something of interest and in a language/platform where you might accomplish something. You don't become an expert at something by learning master level work before you've ever started.
  15. macrumors 603

    Decide what interests you, tell us what those interests are, then learn a language that helps you explore that interest. Without knowing what engages your interest, nor what you want to do with your programs, it's difficult to make a suggestion.

    In some ways, any language will work for any purpose, it's just a question of difficulty. Avoiding pointless difficulty is part of the reason for choosing a specific language.

    Programming can be like carpentry or woodworking. There are many different things one can build, some with great artistry and others strictly utilitarian. There's also a question of scale: the tools for making model boats or miniature furniture are not the same as those for full-size boats or furniture. For example, "What kind of saw should I get?":
  16. macrumors 68000


    Yeah i understand what your saying, honestly atm i dont have any specific "field" of interest :) start as a hobbie and who knows, my bread and butter is networking.

    But my main focus will be making programs for personal use and nothing mobile related.

    Ps. Excuse the poor english :eek:
  17. macrumors 603

    Then maybe you should try a couple different languages, and see which one you like.

    An easy one to start with on OS X is Python. It comes pre-installed, there are lots of tutorials on the internet, it has capable text handling, and you can develop using lots of different tools (including programming text editors like BBEdit or Smultron).

    Another possibility is JavaScript. It's pervasive, also has lots of tutorials, and has a strong tie-in with HTML and CSS. Unless you already know it, in which case you already know a programming language. You can learn that one better, or you can apply your knowledge to another one.

    It's probably less important which one you pick, and more important that you stick with it. Becoming good at something takes practice, and you won't be writing great programs in just a few days. Or even a few weeks. There's a lot of individual variation in how fast one acquires the skills, and it's best to be systematic and work at your own speed.
  18. macrumors 603


    It's not a bad jumping-off point though, depending on what you want to do. One easy way to start would be to learn something like JavaScript.

    For example, write a simple web page that pops up a dialog and asks for your name, and then writes "Hello, Name!" on the web page title.
  19. macrumors 68000


    What are our thoughs about going from python to another language ? I had the same idea but in another forum several people said i should avoid it as a first programming language because its very different from the other and it might be hard to change in the future


    Have consider javascript too due it will be more easy to implent and practice myself :)
  20. macrumors 603


    In my opinion the trick to becoming a programmer is learning how to think like a computer, how to break a problem down into logical, step-by-step instructions that operate on simple data structures like numbers and strings and arrays. You will learn about algorithms, data structures, debugging, etc. Different areas of programming will also revolve around specific skills/concepts that are independent of language such as: event-driven programming, databases, object-oriented programming, real-time programming, embedded systems, etc.

    You can learn these skills in one language (such as Python), and when it's time to learn another language (such as C++) all you need to learn are the tricks to the new language itself.

    Think of it like learning to become a writer using Microsoft Word. There are really two sets of skills you are learning: one, how to work with Microsoft Word itself, (where is the button to create a table? where do you find out the word count?), and the other is storytelling skills like developing a plot and characters and breaking down dialogue and whatever. If you switch to Apple Pages, you'll need to learn a new set of layout tools, but your understanding of how to write stories still applies.

    I started programming as a kid at home using Apple ][ BASIC, then in high school using QuickBasic and Pascal, then in university using Java, C, C++, and x86 assembler, and now at work I use C, C++, and Python.
  21. macrumors 68000


    Is there any book that will introduce me first to the concept like you mention ?
  22. macrumors 603

    Some things you need to find out for yourself. Different people have different areas of difficulty. After you know how one language works, you will almost certainly be much better equipped for understanding how any other language works. There will be different degrees of overlap, but that's mostly because different languages are designed for express purposes.

    I see no great obstacle to learning other languages after learning Python. Yes, it's different, but so is every other language. Even languages that can be traced through a definite lineage, like C to C++ to Java will be different in important ways. Take each one on its own terms, reuse principles where they apply, and learn how to learn by lesson and by discovery (i.e. reading documentation and exploring by writing programs, as distinct from reading tutorials or other overt instructions). Writing programs to learn how something really works is a skill you will always use.

    If you're dithering because you hope that somehow someone will give an exact answer that is certain to work for you, you're mistaken. No one can predict how someone else learns things, nor where the difficulties will occur.

    That's why I said that the choice of language was less important than choosing one and sticking with it. One only really learns how to program by actually writing (and reading) programs, and debugging them to make them actually work.
  23. macrumors 6502a

    This book is quite good for conceptual introductions to problem solving when writing code:

    The examples are in Java, but are applicable to any object oriented language (I've never been a Java developer and found this book useful years ago), and a lot of them are useful for less structured languages as well.

    Like most technical books, there are others published with similar names/formats about various topics. I've never seen any of the others, but they all look well rated on Amazon.
  24. Moderator


    Staff Member

  25. macrumors 68000


    Thanks for the responds guys ! :) and sorry to the op for taking hes thread.

    Hopefully in the future i can comeback here and share my experiences.

Share This Page