PDA

View Full Version : How did you start learning how to program?




tekboi
Mar 16, 2013, 10:12 PM
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...



ArtOfWarfare
Mar 16, 2013, 10:19 PM
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:

http://c.learncodethehardway.org/book/

overanalyzer
Mar 16, 2013, 10:21 PM
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): http://www.apress.com/9781430245124

firewood
Mar 17, 2013, 01:48 PM
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.

overanalyzer
Mar 17, 2013, 03:13 PM
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.

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.

saberahul
Mar 17, 2013, 09:18 PM
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:

http://c.learncodethehardway.org/book/

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

960design
Mar 17, 2013, 11:58 PM
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.

Mr. Retrofire
Mar 18, 2013, 07:20 PM
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.
I use Real Studio as a RAD tool. I use the apps to test my libraries, usually written in C/C++ & assembly language.

ArtOfWarfare
Mar 18, 2013, 08:17 PM
I use Real Studio as a RAD tool. I use the apps to test my libraries, usually written in C/C++ & assembly language.

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.)

Mr. Retrofire
Mar 18, 2013, 11:46 PM
Why assembly?
Video-/Audio-Codecs are impossible without assembly code (see H.264).

That seems like it would introduce some major headaches for you whenever Apple releases new hardware.
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 (http://en.wikipedia.org/wiki/Application_binary_interface), and Apple/Intel has a stable ABI.

roxxette
Mar 19, 2013, 12:37 AM
How will you guys suggest someone with basic knowledge of html and css jump into programming ? I know html is not really programming :o

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 :)

overanalyzer
Mar 19, 2013, 07:40 AM
How will you guys suggest someone with basic knowledge of html and css jump into programming ? I know html is not really programming :o

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 :)

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++.

firewood
Mar 19, 2013, 08:14 PM
... 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#...
.

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.

overanalyzer
Mar 19, 2013, 10:14 PM
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.

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.

chown33
Mar 20, 2013, 01:27 AM
How will you guys suggest someone with basic knowledge of html and css jump into programming ? I know html is not really programming :o

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 :)

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?":
http://en.wikipedia.org/wiki/Saw#Types_of_saws

roxxette
Mar 20, 2013, 02:38 AM
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?":
http://en.wikipedia.org/wiki/Saw#Types_of_saws

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 :o

chown33
Mar 20, 2013, 10:52 AM
But my main focus will be making programs for personal use and nothing mobile related.

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.

notjustjay
Mar 20, 2013, 01:52 PM
How will you guys suggest someone with basic knowledge of html and css jump into programming ? I know html is not really programming :o


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.

roxxette
Mar 20, 2013, 02:25 PM
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.

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

----------

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.

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

notjustjay
Mar 20, 2013, 03:10 PM
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

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.

roxxette
Mar 20, 2013, 03:44 PM
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.

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

chown33
Mar 20, 2013, 04:15 PM
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

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.

overanalyzer
Mar 20, 2013, 04:22 PM
Is there any book that will introduce me first to the concept like you mention ?

This book is quite good for conceptual introductions to problem solving when writing code: http://www.amazon.com/First-Design-Patterns-Elisabeth-Freeman/dp/0596007124/

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.

balamw
Mar 20, 2013, 04:28 PM
Another possibility is JavaScript. It's pervasive, also has lots of tutorials, and has a strong tie-in with HTML and CSS.

Plus, it can be used for creating apps that can run on both major mobile platforms.

While this book is a bit dated, I found it fairly decent. http://shop.oreilly.com/product/9780596805791.do

The Android equivalent was updated: http://shop.oreilly.com/product/0636920022886.do

B

roxxette
Mar 20, 2013, 08:29 PM
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.

ConCat
Mar 21, 2013, 10:40 PM
Believe it or not, I started with AppleScript on a first-gen iMac. I was amazed by how readable the syntax was, that I was able to just pick it up and use it (much like BASIC was for many of you guys). Now I'm doing Objective-C, C, C++ and JavaScript mostly (and AppleScript where applicable).

ArtOfWarfare
Mar 21, 2013, 11:37 PM
Believe it or not, I started with AppleScript on a first-gen iMac. I was amazed by how readable the syntax was, that I was able to just pick it up and use it (much like BASIC was for many of you guys). Now I'm doing Objective-C, C, C++ and JavaScript mostly (and AppleScript where applicable).

I can still hardly use AppleScript... I have a single script I wrote about 9 months ago that I use on a fairly regular basis that takes whatever I have selected in an iWork app and saves it as a PNG with transparency. It took a lot of time to write... it's like 30 lines of code... basically needed to ask here for help with every line. It saves me a huge amount of time though since I regularly do vector based art in iWork to mockup my apps, and then I realize my mockup was perfect and I want it to use exactly it for my app.

roxxette
Mar 22, 2013, 12:43 AM
I can still hardly use AppleScript... I have a single script I wrote about 9 months ago that I use on a fairly regular basis that takes whatever I have selected in an iWork app and saves it as a PNG with transparency. It took a lot of time to write... it's like 30 lines of code... basically needed to ask here for help with every line. It saves me a huge amount of time though since I regularly do vector based art in iWork to mockup my apps, and then I realize my mockup was perfect and I want it to use exactly it for my app.

Brilliant ! Most be an amazing feel to create something on you own :) specially if its usefull.

ConCat
Mar 22, 2013, 03:45 AM
Brilliant ! Most be an amazing feel to create something on you own :) specially if its usefull.

I've found AppleScript to be one of the most useful scripting languages out there, especially given its easy access to the command-line. Whatever AppleScript can't do, chances are bash can. :D

Hans Kamp
Mar 24, 2013, 10:46 AM
I have quite a history of programming.

I believe it was when I was 14 (now I am 46). I borrowed books from a library about programming. It was about Pascal. Computers were not as usual as they are now. Later on, I learned programming on a Commodore 64 with BASIC, later on with Simon's BASIC (which was an extension to it). I was 16 then.

At the same time, I learned actually to program in Pascal, using Pascal 64, which is a program for the Commodore.

At 18 I learned to program in C by means of Turbo C, a compiler from Borland. I tried to learn other programming languages, COMAL (similar to Visual Basic), COBOL (administration oriented language), but the most experienced I am in C and Pascal. Now I write macros for Excel. The programming language is Visual Basic for Applications.

If you read my first post in the topic about the newcomers, I also started learning to program with Xcode. In the first instance for the iPhone and the iPad, but - because I have an Apple MacBook Pro now - also for the Apple laptop itself. And... now I am here. :)

The visual environment makes programming very easy and encouraging. First I used Delphi (that is an IDE with a designer and event programming), later on C++Builder (the same IDE, but only C++ instead of Object Pascal), and now Xcode the IDE for the Apple.

Although I am a newbie, I am very eager to learn new things.

tekboi
Mar 24, 2013, 11:26 PM
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.

That sound nice. Unfortunately I wasn't born at the time of the Apple II release lol. But I appreciate all of the responses in this thread so far.

----------

I have quite a history of programming.

I believe it was when I was 14 (now I am 46). I borrowed books from a library about programming. It was about Pascal. Computers were not as usual as they are now. Later on, I learned programming on a Commodore 64 with BASIC, later on with Simon's BASIC (which was an extension to it). I was 16 then.

At the same time, I learned actually to program in Pascal, using Pascal 64, which is a program for the Commodore.

At 18 I learned to program in C by means of Turbo C, a compiler from Borland. I tried to learn other programming languages, COMAL (similar to Visual Basic), COBOL (administration oriented language), but the most experienced I am in C and Pascal. Now I write macros for Excel. The programming language is Visual Basic for Applications.

If you read my first post in the topic about the newcomers, I also started learning to program with Xcode. In the first instance for the iPhone and the iPad, but - because I have an Apple MacBook Pro now - also for the Apple laptop itself. And... now I am here. :)

The visual environment makes programming very easy and encouraging. First I used Delphi (that is an IDE with a designer and event programming), later on C++Builder (the same IDE, but only C++ instead of Object Pascal), and now Xcode the IDE for the Apple.

Although I am a newbie, I am very eager to learn new things.

I agree. Everything being object oriented now makes programming really easy. I've done some small class assignments with pure C. It was a nightmare when I first started working with it as it was not object oriented at all.

After having my Apple Developer account for over 6 months I've finally opened xCode and jumped into some basic programming. Much easier with an IDE...