Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4

Author Topic: How difficult is computer programming?  (Read 5599 times)

Stiefel

  • Bay Watcher
    • View Profile
How difficult is computer programming?
« on: January 21, 2014, 11:49:00 pm »

I want to learn C and C++ for a career or a job in computer programming. What are classes like? Are there cheap and effective ways to learn, or is it a "you get what you pay for" sort of thing? Also, how likely is it that there are people in China and India who want my job? I live in the US by the way.
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: How difficult is computer programming?
« Reply #1 on: January 22, 2014, 12:09:45 am »

I honestly suggest learning formal logic and flowchartting first.

Yes. Both are boring.

Both will save you a lot of greif when learning to program.

I am not sure that C (++, and others) is proper for a person that is new to the concepts of programming.

I would be more apt to suggest that you cut teeth on something more high level first, like python. I think it is better to learn the fundamentals of what programs are, and how computers perform actions than it is to learn to fight the idiosyncrasies of a programming language designed to be a common denominator between all platforms that expects you to know those things already.

Regardless of the language you decide to begin with, understanding logical program flow and the different types of loop and decision structures is useful universally.  That's why I suggest formal logic and flowchartting as prerequisites. It really will help you immeasurably.

Once you have a grasp of what computers actually DO, and how they do it, programming becomes very easy.


Logged

DJ

  • Bay Watcher
    • View Profile
Re: How difficult is computer programming?
« Reply #2 on: January 22, 2014, 02:39:44 am »

Really easy or incredibly difficult, depending on how well it suits you. It's more art than anything. I think an apt comparison would be novel writing. Learning to program is like learning how to use a typewriter, and some formal stuff about story structure etc., but to actually write something good you just have to have a knack for it.

And there's definitely cheaper labor abroad that wants your job, but you can still make it if you stand out in quality.
Logged
Urist, President has immigrated to your fortress!
Urist, President mandates the Dwarven Bill of Rights.

Cue magma.
Ah, the Magma Carta...

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: How difficult is computer programming?
« Reply #3 on: January 22, 2014, 03:00:15 am »

Indeed, Carmack's "fast floatingpoint inverse square root solver" is a thing of pure beauty.

I am not really a software developer; I just know how to make programs that work, and how to identify inefficiency and fix it. That is the quintessential code monkey.

But I appreciate art when I see it, and that was art.
« Last Edit: January 22, 2014, 04:53:39 am by wierd »
Logged

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: How difficult is computer programming?
« Reply #4 on: January 22, 2014, 06:52:46 am »

This tutorial thought me how to program. The tutorial itself learns you Python, but most of the concepts can be applied to other languages. You have to make some sort of "click" to understand programming, but once you do, it's easy. Different languages are just different syntaxes for the largest part, but they all have their own intricaties (but you'll learn those by using the language a lot)

Once you can program, it's good to try and contribute to an open source project or game. It can teach you quite a bit about code maintainability and, probably, Object-Oriented code.
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: How difficult is computer programming?
« Reply #5 on: January 22, 2014, 07:12:00 am »

If you have the inclination, programming is easy. Wierd is right, though; a good understanding of logic and critical thinking skills is an immense help. He's also right that you should learn python first. If anyone suggests Scratch or any other "learning language" ignore them. They don't really teach programming skill, although they have some merit as training for logic.

Textbook wise, I recommend How to Think Like a Computer Scientist (often abbreviated as Think CS), as it gives you a good all-around grounding, is available for Python, Java, C++, and probably more, and is free. If, after reading/working through it, you still don't know what's going on you might want to consider taking an actual course.
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: How difficult is computer programming?
« Reply #6 on: January 22, 2014, 07:16:59 am »

The tutorial I linked is one of those Think CS tutorials, BTW.
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: How difficult is computer programming?
« Reply #7 on: January 22, 2014, 10:49:41 am »

I really don't think it's art, and low-level optimisations like the Carmack one are the exception, not the rule. Programming is just a tool to do what you want. A very, very complex tool that gets as complicated as you want it to get.

I'd go with learning Python because it's easy on you, has a decent syntax, and forces you to make your code pretty by indenting. I'd suggest using Eclipse and PyDev.

That said, don't confuse knowing a particular programming language and knowing to program. Once you know basic program constructs (functions, classes, ifs, loops, etc), you will need to know how to organise code, and for that there are myriad paradigms, suited to different sorts of applications, design patterns, etc. Once you've got the basics, just keep reading things related to your intended application, and keep practicing.

I will say that at some point it does indeed *click*, like someone else said, but before that you'll just feel dumb. After that you'll feel a little smarter... :)

It's also insanely frustrating, because a single typo might cause gigantic programs to run in completely weird ways, and it can take days, weeks or months to figure them out and fix them.

But hey, it's one of the most powerful tools out there.

Muz

  • Bay Watcher
    • View Profile
Re: How difficult is computer programming?
« Reply #8 on: January 23, 2014, 05:36:40 am »

Quote
I want to learn C and C++ for a career or a job in computer programming.

Those languages are going out of fashion quite rapidly. Comp Sci courses in one university around here don't even teach C and pointers anymore because it's considered an unemployable skill. Even though IMO it's an important skill to learn how computers work. But you probably won't need it unless you work in something low level like operating systems or electrical engineering.

Try to pick up something like Java, .NET, Python, PHP.

I'd say it's almost necessary for everyone to learn programming these days. Doctors, designers, engineers, architects, accountants... you name it. It's the new literacy. And much like learning to read and write, don't concern yourself too much about grammar and spelling (code styles and syntax). Concern yourself more about communication and getting stuff done. I'll probably teach my kids to program whether or not they become software engineers in the future.


Quote
Are there cheap and effective ways to learn, or is it a "you get what you pay for" sort of thing?
Yeah, plenty of cheap online courses. My personal choice is WiBit.net. Good humor, gets right to the important points. I graduated from a good college familiar with C. WiBit taught me a little more than I learned in college, and secured me my job for the last 2 years even though I started not knowing a thing about Java.

Udacity and EdX offer some very good interactive courses too.


Quote
Also, how likely is it that there are people in China and India who want my job? I live in the US by the way.
Oh, very likely! I actually pay Indian programmers $5 for a week worth of work. You can probably go with the Tim Ferriss style of outsourcing components you don't like and selling it for more, though.
Logged
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

LordBucket

  • Bay Watcher
    • View Profile
Re: How difficult is computer programming?
« Reply #9 on: January 23, 2014, 09:13:44 am »

What are classes like?

As someone who is self taught and then took classes afterwards, I would say that the classes I took were a complete waste of time, slow and inefficient, and not useful at all. If you possess the sort of personality that will be good at programming, an entire semester of coursework is probably worth about 2-3 weekends of time on your own.

Quote
Are there cheap and effective ways to learn, or is it a "you get what you pay for" sort of thing?

Choose a language/environment then pick a project, a game, or whatever you'd like to make. Ask a friend familiar with your chosen environment to sit down with you for half an hour or so to teach you basic syntax. Then google a command reference chart for your chosen language, download some sample code and figure it out.

Quote
how likely is it that there are people in China and India who want my job? I live in the US by the way.

Difficult to predict. Any language you learn now has a reasonably good chance of being irrelevant in 5-10 years. But programming is a skill unto itself that is not language specific. If you understand programming, learning a new language of similar high/low level abstraction will generally be fairly trivial. But, from my point of view at least, over recent decades there's been a strong movement towards encapsulating code in needless formalism for the purpose of "simplifying" to the actual end result of making things stupidly complicated because the formalisms are so far removed from actual programming that they take more time to learn than programming itself.

If you're looking to become employed as a programmer, it's possible that knowledge of those formalisms might be more important than actual ability to code, because the people hiring you will hire based on your knowledge of industry buzzwords, and your ability to interface with other programmers who've learned and think with those formalisms. Learning to be hirable as a programmer is not precisely the same goal is learning to be a good programmer. If your goal is to become hireable, then taking classes might be approaching absolutely necessary. But again...it's difficult to predict. Languages and industry conventions come and go quickly. Imagine for example, that you spend the next few years learning highly formal and specific programming conventions of today, then 5-10 years from now everything changes. It might be difficult to find a job using the material you learned because it's no longer used. Good luck finding a job programming in fortran, for example. But when I was attending school, fortran was a required language for a CS degree. And yes...even at that time it was obsolete. But it was required anyway. Just because. But a person who learned programming, and understood programming, would have an easy time picking up the new "trendy" language quickly and getting a job using it before the more formally inclined people could adapt. But...on the other hand, imagine being an extremely capable self-taught programmer going into a job interview with no particular credentials, then being asked interview questions about industry buzzwords that you knew nothing about. Good luck convincing them to hire you.

So...difficult to predict. The computer industry is somewhat less constant than most other industries. "What's popular and in demand" in 5 years might be a language that doesn't yet exist for hardware that doesn't yet exist.

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: How difficult is computer programming?
« Reply #10 on: January 27, 2014, 12:32:27 am »

Classes are about learning what to learn. Or at least good ones are. They say "Here are some things you should learn about; we won't waste your time by forcing you to wait for the slowest person in the class to understand everything, and instead will tell you to actually learn the material on your own time." Any intern-level codemonkey can read online documentation if they knew what it was they were looking for. Becoming a good programmer isn't about learning new things, it's about learning about how to learn new things. To become an observer from all sides, seeing things in every light and every perspective, regardless of whether they are new or old.

Programming is all about taking a complex task apart in your head. You start with "What do I want this to do?" and then figure out what that actually means. Computers are the lamp-inhabiting genies; they will do exactly what you tell them to, whether or not it is what you intended. The job of a programmer is thusly to not only figure out a solution, but to reduce that solution into a form which is airtight and open to no interpretation.

For example, some code I did several years back was 2D shadow calculation. I wanted to be able to feed in shapes, then figure out what shadows they would make based on light emanating from a point in the 2D space. By the time I finished planning out the systems and sub-systems I would use to code this, I had a 2000 word google doc written up, complete with a dozen or so diagrams. The code itself was even longer; something like 1800 lines. A single variable incorrect, a single mis-step in my logic, and you get bugs ranging from mundane to catastrophic. So then there's the second part of programming: debugging. For debugging, you must understand the code in question; how it flows, and how it sends information around and processes it. Then, you figure out what is going wrong, and look for the origin of that error.

So to be a good programmer, you need to be capable of incredible memory loads, since you're keeping vast structures in your head, and critical thinking capable of ripping a problem into its component pieces or working through the logic of a complex structure someone else wrote.

Languages to learn: C++ is the biggest one. If you can code in C++, you know and can code with any other language in existence. That goes doubly if you know some semblance of an assembly language as well. Muz is absolutely wrong there. The reason for this is because C++ straddles multiple paradigms, while also being relatively low level. If programming is going to be your actual profession, you really need to learn this, as it will pretty adequately prepare you for just about anything that anyone can throw at you. Which is also why LB is wrong; while the specific languages may not exist today, nor the hardware for them, a programmer well versed in the fundamentals exposed by low-level programming can adapt to any of that without skipping a beat. Words and languages are worthless; it's the paradigms and ideas behind that which is important. And there is only one thing which will change the hardware-level basics, and that's quantum computing; which only affects a small subset of problems, won't be useful for a decade or so, and will make perfect sense if you know the basics anyway.

But C++ is just the beginning. After that, there is the specialist knowledge. A generalist programmer won't really get hired; or if they do, it won't be as in-demand or well paid as a specialist.
A really hot topic these days is statistics and modern AI (as they are really one and the same). So read up on some AI rooted in Bayesian Reasoning if you want to go that direction.
If you want to go into games or scientific computing, there's GPU programming (which is what I do). This involves using APIs like DirectX, OpenGL, OpenCL, CUDA, HLSL, GLSL, and so on, to write code for the GPU; this is very important in games, since it's the core of the graphics programming, and important for both games and scientific computing since a GPU has about 100 times the computational power as the CPU.
Another in-demand specialty is network programmers; these are the people who write the low-level backend for specialty server applications and games. It's a really difficult skill, as it involves highly asynchronous operation, and accounting for everything that can go wrong over a network.
Then there's database programmers. They write the code that manages massive databases, queries to those systems, ect.
There are plenty of other specialties, but those are some big ones.

I will say that at some point it does indeed *click*, like someone else said, but before that you'll just feel dumb. After that you'll feel a little smarter... :)
Also, this is false. It's a highly cyclic operation in which you learn more, open up your horizons, and see the vast unexplored wilderness before you. Again, it's all about learning what you need to learn.

For getting started, I suggest online tutorials. I've also heard good things about the (free) site CodeAcademy, though I've never used it. To put it quite bluntly, the internet was created by programmers, and so they utilize it better than any other profession. Documentation and tutorials on any language and in general any code you will have access to will exist online. Google and similar search engines are also created by programmers; and so will very readily find useful information on topics you want. IMO, the first part to becoming a good programmer, going back to where I started, is to learn how to learn. To enhance your Google-fu and ability to phrase queries such that you can locate the information you seek in as timely a manner as possible. It's flippant to just say "google it," but googling it is itself a process and a skill. Working that into your brain such that it is your default modus operandi upon pondering a subject will prove extremely valuable as a programmer.

Now for specific, highly relevant tutorials:
C++
http://www.cplusplus.com/doc/tutorial/
C#
http://msdn.microsoft.com/en-us/library/a72418yk.aspx

« Last Edit: January 27, 2014, 12:37:17 am by alway »
Logged

Shakerag

  • Bay Watcher
  • Just here for the schadenfreude.
    • View Profile
Re: How difficult is computer programming?
« Reply #11 on: January 27, 2014, 04:50:10 pm »

Difficult to predict. Any language you learn now has a reasonably good chance of being irrelevant in 5-10 years.
But COBOL and assembly are forever.

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: How difficult is computer programming?
« Reply #12 on: January 27, 2014, 05:09:51 pm »

SNIP

I'd say the biggest problem with the suggestion to start with C++ is that it assumes the learner has 1) unshakeable willpower and 2) will enjoy programming from the start. I'd say this assumption is false for the vast majority of people. In fact, C++ throws so many hurdles for you to overcome that most learners will eventually give up and stop learning. Because it's C++, it will also have a longer development cycle, so that you'll see results much later than if you're using something higher level.

Suggesting C++ is something I've seen from a lot of people who already know C++ and are very knowledgeable already. I used to hold that belief, until I started programming in other languages and became much, much more productive (i.e. problems solved per unit of time).


I'll agree with most other points :)

Regarding this:
I will say that at some point it does indeed *click*, like someone else said, but before that you'll just feel dumb. After that you'll feel a little smarter... :)
Also, this is false. It's a highly cyclic operation in which you learn more, open up your horizons, and see the vast unexplored wilderness before you. Again, it's all about learning what you need to learn.

It depends on the perspective. You're clearly an experienced programmer, and when you're so far past the initial learning stages, where for loops are magic and recursion is a concept beyond your wildest dreams, it's easy to see it that way. For a beginner it's really complicated because nothing makes sense just yet. I'd still say that when you're still fighting syntax and trying to internalise program flows, you still haven't had the first *click*. And that's the first goal you should have. Sure, there'll be many more clicks, one for each important concept (recursion, pointers, different paradigms, design patterns, etc), but that first one is crucial for motivation :)

gimlet

  • Bay Watcher
    • View Profile
Re: How difficult is computer programming?
« Reply #13 on: January 27, 2014, 11:19:00 pm »

Yeah, if I were suggesting a path to serious software development mastery, I'd probably recommend doing it something like this, similar to a lot of college software engineering programs:

1st class/study -  Relatively high level intro to concepts where the language isn't crazy complicated and getting in the way, with focus on learning about objects and patterns and getting used to writing programs.  My 1st thought would be python although there are arguably other very good alternatives.
2nd class - LOW level study of hardware architecture, cpu instructions, and an assembly language.  Low level debugger operation.  This is actually a shit-ton harder than when I did it, because of multi-core cpus and the way they parallelize and optimize.  Possibly only do an idealized single-core version this early, and save anything beyond a survey of the trickier parts til a bit later...
3rd - data structures and algorithms, at least touch on computational complexity, efficiency and optimization
4th - database theory, structure and query languages.
5th - at least a primer on internet architecture, and html/php/cloud/thick-thin clients/distributed architecture/load balancing/that kind of stuff (you can tell this is not my forte :D)
6th - (SORT of optional) - low level networking, routing, protocols, network layers and abstractions (heh ditto, I never really learned this rigorously and I still regret it)
7th - NOW maybe pick some pro language like c++.  Serious debugger, instrumentation and profiling tools and techniques.
8th - actually probably earlier, certainly NEED some bits of this before now - requirements analysis, design, project management, source code control/version control, development environments, testing, test plans
9th - maybe earlier - operating systems, goals, tradeoffs, comparisons, architectures

I think that gives you a pretty good survey of the field, and a broad basis for now really getting into the real gritty bits of some area, while still knowing how/what it takes to transition into other areas.   For comparison look at the course order and requirements of software engineering degrees at good schools like MIT, Cal Tech, U of Illinois Champagne Urbana, etc.   Look at the syllabuses of the individual courses to see better detail on what they cover.   It's usually in there for a pretty good reason - make sure you have a plan to learn it, or a damn good understanding of why you could possibly leave it out.

If you're already interested in a specific application area, go through the steps of learning that earlier or at worst at the same time - programs aren't (generally) written in a vacuum, they're to solve problems in specific domains, each of which has its own terminology and conventions. 

Any languages you learn in the course of this are primarily for instruction, it all changes pretty quickly, fads come and go, and I strongly agree with what was mentioned before: you have to learn how to learn - how to pick up languages and new architecture/application areas.
Logged

Tellemurius

  • Bay Watcher
  • Positively insane Tech Thaumaturgist
    • View Profile
Re: How difficult is computer programming?
« Reply #14 on: January 28, 2014, 10:15:10 am »

Quote
I want to learn C and C++ for a career or a job in computer programming.

Those languages are going out of fashion quite rapidly. Comp Sci courses in one university around here don't even teach C and pointers anymore because it's considered an unemployable skill. Even though IMO it's an important skill to learn how computers work. But you probably won't need it unless you work in something low level like operating systems or electrical engineering.
Woah now, As much people complain how archaic C and C++ is and its difficulty curve, there is still no problem acquiring much of a job for it. Most java environment jobs out here would take people in for C++. Revision 11 is starting to kick up work in for multithreading and parallel work so I believe its still an industry skill even outside engineering.
Pages: [1] 2 3 4