Learning programming [Not one of THOSE threads]

MajinCry

Distinguished
Dec 8, 2011
77
0
18,580
When I've asked people how to get started in programming, I always get the same response:

"Read a book", "Just learn it", "Program and learn what you need to know".

The responses were not EXACTLY like that, but sifting through all the opinions and small-talk, that is what they all came down to.
However, how does one "Just learn it"? I was greeted with the response "Think of a problem, then code to fix it.". But HOW? How does one learn to code to fix the problem? Then I was directed to read a book again, but that method is just awful. Command prompt and basic CIN and COUT stuff, but no actual creating windows, dialogue boxes or interacting with the user's input devices (I.E, mouse, cursor, etc.).
Asked how would I go about doing all that, I was prompted to read a book again, soon after which I was ignored.

Trying a different approach, I asked: "How did you learn programming", to which I was responded "On my computer", or other such device. When I asked how, I was greeted with "I just did". Asking to elaborate, they just repeated themselves.



So, here I ask: How did YOU learn programming? Did you read from a book (If so, do tell which book in specific), and what did you do after finishing the book? What did you do after doing the stuff you did after learning the book?

Also, I ask: How would I learn programming? Being told to take a class an' such is out of the question for me at the moment, poor health and living far away from any educational institute puts a damper on things of such a nature.



Thanks in advance, lookin' forward to the responses y'all may have.
 

gamerk316

Distinguished
Jul 8, 2008
325
0
19,060
Without getting a formal education, you really do need either to use an online tutorial, or, yes, a tutorial book. They will explain the basic concepts of what you need to know (basic terms, program structure, control statements, exception handling, memory management, classes, OOP, and so on).

The only other way to learn is to take some piece of open source software this is VERY well documented, and learn from that. Much harder without a solid base.

My advice is to start with a REALLY easy to learn language (ALGOL68, or even BASIC works very well for teaching concepts), then moving up the chain toward C based languages. (C/C++ itself is hard to start with).
 

Ijack

Distinguished
There are a host of online resources and books that will teach you what you want to know. I can only think that you are looking at the wrong books.

Perhaps you need to brush up your search skills first so that you can find what you are looking for. People can't tell you exactly what is right for you, they can only point you in the right direction.

Here is just one book that will teach you how to create Windows, Dialog Boxes, etc. http://www.amazon.co.uk/2010-All---One-Dummies-Computers/dp/0470563486/ref=sr_1_2?s=books&ie=UTF8&qid=1354036882&sr=1-2#_
 

majestic1805

Honorable
Oct 1, 2012
69
0
10,590
I got my start in high school in a half-day vocational program. A local company brought me on their web team and had me go through an ASP in 21 Days book and they would assign me increasingly complex tasks as I got through the book and they were basically treating me like a full developer, albeit a junior one, by time I was done. After that the trick has been learning various patterns and practices that are situationally contingent, new languages as necessary like T-SQL/HTML/CSS/C#/etc, learning about various tools to enable me to do my job better, and learning how to operate as a professional with my peers and management.
 

Scott_D_Bowen

Honorable
Nov 28, 2012
50
0
10,590
Read this, but be warned if you have poor enough health and are unable to engage with students of OOP your health may suffer from trying to learn OOP.:
- http://www.cplusplus.com/files/tutorial.pdf

[cpp]/** This is not OOP, it is just a very basic loop that calls two functions and passes a Boolean by reference, instead of by value */
while (!understandThis)
{
SleepOnIt(&understandThis);
ReadItAgain(&understandThis);
// When you 'get' the above two lines of code, it'll just magically click, and you can go to the next section.
} // end while_[/cpp]

Do NOT try to learn a crappy ancient, archaic language first it will only confuse the cr&p out of you.

Learn basic C, then basic C++
- The tutorial isn't very long, esp if printed double sided.

After you know 70% to 90% of it off the top of your head you'll be better than most Uni grads are at coding within 90 days.
- It's just the first 6 weeks or so that is hard, it does get easier if you put the time in.

After you learn the basic syntax of C++, try C#. NET and get more into OOP using Visual C# Express 2010 (I say 2010 because 2012 has a very different GUI to what most people are used to).

If you want to, add me on Facebook and I will teach you to code in C#.
- I have PM'd my Facebook profile link to you.
 

calmstateofmind

Distinguished
Jul 2, 2009
292
0
19,010



Considering all, I'd classify C to be more of an "ancient" language than not. It came out around the same time as Cobol and Basic, some 40 years ago, and isn't too distant from Fortan and LISP. If that's not ancient I don't know what is...

I'd recommend going with a more dynamic, rewarding language like PHP (which would also verse you in HTML, CSS, Javascript, AJAX and mySQL). It may sound like a lot but it's really not, as the other languages get introduced over time as your projects become more complex and functional. PHP will shift you in the direction of web applications (websites) and is pretty easy to learn too, which allows you to move quick through the material and see results early on.

One of the reasons I think it's easy to learn is because most people are already familiar with websites, so instead of what a language like C or C++ might do, give abstract analogies, PHP doesn't need to do that. Books/instructors reference already known, common features of websites, and people understand what they mean with little effort.

Once you're skilled in PHP and supporting languages, you could make a web portfolio for yourself and offer independent contracting, making small time websites for local companies or updating ones already created. You'd be able to normally charge anywhere from $500-5000 per project, and it only taking you a few weeks to a few months to complete (generally speaking). If you get a few projects going at the same time, you can make some nice cash on the side.

Regardless of what language you go into though, I'd suggest looking into what "Object Oriented Programing" is first, as it holds critical concepts that most every language build upon, and is almost inevitable with how programming is today.

Best of luck!
 

calmstateofmind

Distinguished
Jul 2, 2009
292
0
19,010



I learned first in school, but was only following what the teacher was doing (and what my fellow students were doing ;) )

When I really learned to program was when I taught myself, just by going through a book, downloading the exercise files, and actually completing the book; and not progressing until I knew the material. It wouldn't hurt to watch a few Lynda videos on whatever subject you go into...those are pretty good instructional videos.

If you go with PHP this would be the book I recommend: http://shop.oreilly.com/product/0636920023487.do
 

gamerk316

Distinguished
Jul 8, 2008
325
0
19,060
The reason I recommend basic languages to start with, is you learn "proper" program control without having to worry about those little issues of C/C++ [For example, how the /0 is a character, when to use and not use "new", and so forth], or jumping straight into OOP (Java, C#).

Nevermind I see too many training programs that try and tech C/C++ at the same time, and interchangeably mix the two. (Using printf in a C++ program, for example].

Basically, I generally recommend learning in three tiers:
Tier1: Basic programming, problem solving, and flow control (basically, everything up to creating functions) [ALGOL68, Pascal, Basic]
Tier2: Classes (this covers a LOT naturally), templates, and generics [C, Ada]
Tier3: OOP principles, memory management, and threading [C++, C#, Java]

I dislike starting in languages like Java (Try explaining what "public static void main(String args[])" is on day one!) because they expose too much at one time, without getting the user a proper footing. Then, some time later, working on some "real world" system, not being exposed to even basic memory management (as newer languages tend to hide those details) working in a pure C domain, the user basically makes every rookie mistake under the sun. [And yes, this has happened, many times over.] Sure, in a pure C/C++ domain, you can cover just about every topic there is, but it exposes far too much to start with, in my opinion.
 

calmstateofmind

Distinguished
Jul 2, 2009
292
0
19,010


If you want to work with a language that's that powerful very early on, something like Objective-C would work for you. You'd be writing apps for iOS, and could easily transition to OSX. The only thing with Obj-C is that you have to be in an OSX environment to develop, so if you don't own a Mac you'd have to get one.

Objective-C is just a superset of C and you'd have the ability to use C/C++ right along Obj-C when coding.
 

Ijack

Distinguished
The only thing with Obj-C is that you have to be in an OSX environment to develop, so if you don't own a Mac you'd have to get one.
OS X is not necessary. The GNUStep environment allows Objective-C programming on just about any platform.
 

calmstateofmind

Distinguished
Jul 2, 2009
292
0
19,010


Well if you want to use Xcode, you need an OSX environment with Intel based hardware. Most all tutorials found online are done so with Xcode, most all books that teach Obj-C do so with Xcode and Apple's developer's library talks of nothing but Xcode.

If you program Obj-C, chances are you're going to use Xcode. Anything else and it's an unnecessary, uphill battle.
 

Scott_D_Bowen

Honorable
Nov 28, 2012
50
0
10,590

I'll give you +10 points for that one :sol: , but is C cr&ppy? (even if it is archaic or even 'ancient').

He's promted me to start a new discussion for those that want to teach programming, just casually to others that genuinely want to learn programming but are not sure where to start.
- Mini C# 2010 Graphical User Interface Crash Course
- Not trying to hijack the thread, as I'm sure we're all running tabbed or mobile equivalent browsers. :lol:
- I want to gear it towards learners who are results driven, and 'know what they want when they see it, since they benefit the most from a visual learning environment (be it NetBeans, or Visual Studio) where changes can be tested with a debugger, breakpoints, and have near instant results (in the form of a graphical user interface).

Myself, I wouldn't mind learning some PHP on the side :), and I'm already comfortable enough with MySQL (having used it as the back-end database for a Java application).
 

Ijack

Distinguished
If you program Obj-C, chances are you're going to use Xcode.
I think you are confusing iOS/OS X programming with Objective-C programming. It is a perfectly good language in its own right and just happens to be used by Apple. It's not as if they invented it.
 

calmstateofmind

Distinguished
Jul 2, 2009
292
0
19,010


How do you mean?? Obj-C is the primary programming language for iOS and OSX applications. And no, Apple didn't invent Obj-C, but Jobs purchased licenses to use Obj-C pretty much right after it came out, and it gained all of its popularity through NeXT/Apple. Obj-C was first used to develop NeXTSTEP, which is where OSX and iOS came from, and the Cocoa/Cocoa Touch APIs that Apple offers are practically all in Obj-C (bits of C/C++ here and there).

Obj-C doesn't "just so happen" to be used by Apple; Apple is the one who's supported and evolved Obj-C from it's birth to what it is today. It's what Apple uses to make the majority of their products with, and Obj-C isn't used for many other applications. Yes, it's possible to use Obj-C in other contexts, but you don't often use a screwdriver to hammer in a nail. Apple definitely has the cornerstone on Obj-C.

No offense, but it doesn't sound like you're familiar with what you speak of...
 

calmstateofmind

Distinguished
Jul 2, 2009
292
0
19,010


No, C it's still a pretty good language, especially when first introduced into programming, but can be rather bulky in comparison to others (naturally). PHP is really fun because it's so dynamic and powerful. Plus, like I mentioned earlier, with learning PHP usually comes other supporting languages, like HTML/XHTML, CSS, JS, AJAX, SQL, XML, etc., so you become very well rounded.

I first started programming with Java, then moved to C++, then Obj-C, and now I'm at PHP and related. The only thing I dislike so much about Obj-C is that every function name is sooo long; like, 30-40 characters long. :??: :sarcastic: :D
 

Scott_D_Bowen

Honorable
Nov 28, 2012
50
0
10,590
If a company asked me to produce a language the 'public' version of it would have function names as cryptic CRC32's of the old, old,... old name so that we could sell volume sets of books to people that use it.

Even if the language API itself was free!
 

Ijack

Distinguished
A implies B doesn't mean that B implies A; that's a common fallacy. Unix is written in C; does this mean that C is a language only to be used on Unix? Of course not. The same goes for Objective-C. Objective-C was not used for NeXTStep "right after it came out"; it was first developed in 1981 and a commercial product released in 1986. It was not licensed by NeXT until 1988.

No offense taken, but I am entirely familiar with that of which I speak. The history of OS X, NeXTStep, OpenStep and GNUStep are not unknown to me. I develop in C, C++, Objective-C, Java, C#, and a few less familiar languages.

To get back on topic - you do not need a Mac to learn Objective-C and to write useful programs with it. Whether it is a sensible first language to learn is another matter.
 

calmstateofmind

Distinguished
Jul 2, 2009
292
0
19,010


I don't see how it came out in '81 if that's when Stepstone (creators of Obj-C) was first introduced to Smalltalk (a major influence in Obj-C). Research for Obj-C didn't start until '82, and it was then released in '86; Jobs picked it up in '88. That's a pretty short timeframe if you ask me.

And you're right, A implies B but doesn't mean that B implies A, but we're not talking about propositional logic right now; we're talking about history and facts. Apple picked up Obj-C very early on, Obj-C was doing nothing before that, Apple utilized it for most of their products, not many (if any) other companies have, and as a result Apple has carried and evolved Obj-C for the past 30 years.

I'm trying to see the grounds you're standing so strongly on, but I'm not having any luck.



That's true; you also don't need an umbrella to stand out in the rain, yet for some reason most people use one...
 

randomizer

Distinguished


Function names - in fact, entire function signatures - are probably near the top of the list of things I hate about PHP. The first thing you learn about PHP (ie. language-specific knowledge) is that you should never guess or make assumptions about naming or parameter ordering conventions. There simply are none. To compound the problem, a high percentage of function/method names are ambiguous and do not convey the purpose of the function/method properly, or are utterly meaningless. Keep the function reference on php.net open at all times. ;)