How to Become a Programmer
Hey! As a newbie, I don't know if I'm posting in the completely wrong forum, please correct me if I am.
I'm an NT lab assistant for my university's computer science department. I've become friends with an aspie learning Java who, unfortunately, has a reputation among the lab assistants for being highly dependent on our help. The prof's at a loss, and I've sort of taken up the task of figuring out how to help him pass the class.
What I really, really need to hear from other brilliant aspies is how you learned to program, particularly the abstractness of it all. He claims that he himself is a computer that must be programmed; he can only reproduce what he has seen before and cannot problem-solve. If a lab assistant tells him how to solve a problem or exercise, or gives him an algorithm, he can hack it out—right now this also takes a lot of help, but I think he could get to the point where the syntax and coding was simple. He just can't get his mind around translating logic to code, or writing one method that applies to all situations instead of just a sample situation. The result is that without a lab assistant feeding him the logic bit by bit, he's incapable of writing a program.
Java and all object-oriented programming is founded in abstraction and reusability. From what I understand, this is exactly what challenges aspies; and yet Google, IBM, Intel, etc. are overridden with aspies. Clearly I'm missing something magical. Please help!! !! !! !
I learned programming back in the 80's. It was easy for me. To me it's not so abstract. I could visualize programming concepts such as building arrays and using embedded loops step by step to get from one point to another. I tutored other students in programming languages. Most of the students I tutored couldn't write their own algorithms and wanted me to do it for them. All I could do was to take them through the process of developing an algorithm and I told them that if they were serious about becoming a programmer they would have to be able to write there own algorithms. Some of them wanted to pay me to do their homework for them, but with some, I was able to help them by explaining the thought processes I used to solve problems. But as the above poster said, playing with it is the best way to learn. Start with something simple and work your way up to something more complex.
undercaffeinated
Pileated woodpecker

Joined: 28 Oct 2012
Age: 50
Gender: Male
Posts: 185
Location: Canada
Here's a lot of rambling, some small part of which might be useful. Hopefully. It jumps around a bit, so if the first part looks irrelevant there may still be something useable later.
Personally, I learned by reading the GW-BASIC reference we got with our first PC cover-to-cover, then writing simple programs in it for fun (this was in the 80's). Later, I bought a C compiler and did the same with that. After that, it was just a matter of continuing to read and experiment, and writing programs for my own use until I eventually got a job programming in Delphi.
One thing I've noticed when I've looked at materials for learning Java (especially for introducing programming using Java) is that many of them focus on the ideas of objects, classes, and an object-oriented way of approaching problems upon the student right from the start, and then fill in the other details later; They focus on using classes before explaining anything about how to actually make them do something. Sometimes it helps to work in the opposite direction, and start with simple, procedural programming, and then tackle objects and classes later.
Also, the concept of classes/objects is often introduced in an awkward way that can give the impression that a class needs to mirror a real-world object directly -- of course, it doesn't, and attempting to design classes this way often leads to overly complex and/or awkward designs. It's important to understand that an object is really just a collection of related data relevant to a single instance of something, and maybe some functions used to work with it (simplifying things a bit). It doesn't need to correspond to anything that's distinct or meaningful outside the program, and it doesn't need to perfectly model a real item even if it represents one. I think failing to dissociate classes from the real, outside world is something some people stumble over at first.
I didn't start with object-oriented programming right away, I learned about it later after I'd already been programming for some time. And it got a lot less awkward when it clicked that classes/objects could be used much the same way that I was already using structures, but with the structures and related functions merged into classes; that classes were more of a way of organizing code than anything else, and didn't need to be a radically different way of doing things.
Another thing I've found is that when I first learn something I may sort of understand it, but it requires a lot of mental effort to apply it and it goes slowly... then once I become comfortable with the concept there's a sudden, dramatic improvement. If that's what's happening with your friend, he may surprise you after things have had some time to soak in. It's also more difficult to try to soak in several new things at a time, though, so it's probably best not to rush things too much.
It could also be that he's having trouble because he's trying to work on too many different aspects of the process at once. Possibly when he's gotten more comfortable with the language and with basic concepts like functions and variables, he'll be better able to focus on the algorithm and how to implement it. It's also possible that he can understand the core concepts just fine, but gets stuck trying to decide what approach he's supposed to take -- in which case he's not using your guidance as a way to solve the problem, but as a way to resolve his indecision. If so, he'll probably get better when he's gotten more comfortable with things, and when he's under less pressure. It might also help in that case to make sure he feels he can choose his approach freely and doesn't feel like it's imperitive that he select exactly the "right" way, and to remind him that if it doesn't work he can always try something else. I realize he's probably expected to learn good practices, but it might be best to focus on simply getting it done first, then worry about correcting his style later.
The issue of abstract thought and Asperger's is not necessarily as simple as "aspies don't understand abstract concepts". The strange thing is, that although they're noted for having problems with some kinds of abstraction (like figurative speech) they're also noted for (at least sometimes) excelling in fields that depend on abstractions (like math, computer programming, various forms of art, etc.). It's always seemed paradoxical to me, and suggests that there are some very significant things that are very poorly understood about Asperger's in that respect.
One thing that will help him if he feels he can do it is self teaching.
If ever he gets time he should really follow tutorials outside of the lab on Youtube or something.
Learning code takes a while.
Heres a brilliant Java tutorial series:
http://www.youtube.com/watch?v=Hl-zzrqQoSE
I learned half of my skills from this guy. I started off with a book then onto the tutorials.
_________________
?Sometimes when you innovate, you make mistakes. It is best to admit them quickly, and get on with improving your other innovations.? -Steve Jobs.
I'm a self taught programmer. Many of us Aspies have a natural inclination towards programming and find it very easy to learn. All we generally need is a computer, compiler and access to reference material. We just plunge in and learn. Human help generally not needed. Maybe he doesn't have a natural aptitude for programming - in which case he's in the wrong job.
_________________
I've left WP indefinitely.
This is what I did as well. I eventually quit asking for help because it was completely useless. I was able to try different things to get the basics of it. For example, once I was able to isolate myself it only took me an hour or so to figure out what a counter was and figure out what the heck they were talking about.
The only way I was able to do that was to pull out VB.net put a counter in and have it display the results. I did like this.
Dim x as integer = 5
x=x+1
msgbox(x)
5
x=x+1
msgbox(x)
6
x=x+1
msgbox(x)
7
x=x+1
msgbox(x)
8
From this I was able to derive what a counter was instead of listening to an abstract lecture of it. What I was doing wrong was at first is this. I was trying to consider "x=x+1" as an equation to be solved. I had to think of this in a different sense and once I did I was able to make the connection.
From my experience with programming he is trying to be to dependent from outside help and the outside help has people with neurologies who don't think like him. When I ditched the instructors and just read the crap and did the crap myself I became a lot better.
This is what occurred with classes, abstraction, and inheritence. One does not have to use classes at all. Classes make one's code readable. Undercaffenated is correct about what he says. When I was learning about them in intro to java the instructions example used animals and mammals. This kept throwing me off and I saw no use for classes until I had to connect to a particular database in multiple ways. I kept wishing to myself I wish there was a better way and that I could just plug something in. Guess what? It was classes. Why couldn't they explain it more in a practical sense?
Marybird, I 100% agree with your assessment.
So many replies! This is great, I appreciate it! What I'm hearing is, tell him to quit listening to the lectures and lab assistants and read the book.
It seems that his greatest challenge, the semester project, may be difficult because it involves writing a program for the game Reversi where the classes (board, piece, player) are meant to mimic real life very closely. But I'm not sure how to practically explain why this is a useful structure, especially when the architecture has already been created and he's just supposed to write the code for each method. The architecture is documented, of course, but there's no book or anything to explain it better - besides the lab assistants. Any ideas?
Honestly, I would not know either. I believe he would have to stumble onto it himself as he gains experience. This would establish a frame of reference. The problem is he has no frame of reference to go. To establish this, he needs to practice and eventually accidently stumble onto it one day. He needs to read the book and try things out himself including the practice exercises if there are any. This is what I did.
Does this involve creating an A.I. player and the Min-Max Algorithm? Either way, if he is doing something like creating a game this is what I had to do to create an A.I player for Tic-Tac Toe. I had to break down the game to managable chunks. In tic-tac-toe there are nine slots to place X's and O's. I had to reduce the amount of slots and code it in chunks. I coded it for a one by one board at first. I then added it for a 1 X 2 board. After that, I did it to a 2 X 2 board. I did it for a 3 X2 and then finally a 3 X 3. This was how I was able to successfully able to create a Tic Tac Toe game with an AI player. I started with the simple 1X1 and there was only one rule which was only x player could play and put an x. I expanded upon this and so on.
Tic-tak toe (noughts and crosses) is one of the first games I ever wrote while learning Fortran 66 on an IBM mainframe thirty years ago. This was before the days of graphics screens so it was all purely text based. The very first game I programmed was 23 matches. These types of simple games all help to cut one's teeth on the techniques and programming tools. Most of the software I've written since has been for businesses; though last year, just for the hell of it I wrote a chess program from scratch in VB-2008 incorporating full chess rules and a graphical interface / animated piece movement, with a choice of chess sets. You can let it play black, white or play against itself. It plays a reasonable game too - it usually beats me on the highest setting - which feels a little bizarre as I'm its programmer! Outsmarted by my own algorithms!
_________________
I've left WP indefinitely.
What I really, really need to hear from other brilliant aspies is how you learned to program, particularly the abstractness of it all. He claims that he himself is a computer that must be programmed; he can only reproduce what he has seen before and cannot problem-solve. If a lab assistant tells him how to solve a problem or exercise, or gives him an algorithm, he can hack it out—right now this also takes a lot of help, but I think he could get to the point where the syntax and coding was simple. He just can't get his mind around translating logic to code, or writing one method that applies to all situations instead of just a sample situation. The result is that without a lab assistant feeding him the logic bit by bit, he's incapable of writing a program.
Some of the best computer instructors I've had basically encouraged us to shamelessly steal, borrow, or otherwise re-use people's code. Which is not to say to wholesale steal other people's programs, but to use other people's code as examples. I think when you're first learning, this is a great way to go because it gives you exposure to solutions to common problems. If your friend's weakness is that he can't come up with stuff on his own, then I think he needs to build up his "toolkit" of problems that he's learned to solve by looking at other people's code. Hopefully he'll then develop a sense of how to apply these "tools" he's gained - i.e to be able to take a given problem and relate it to another problem that he's already been exposed to the solution.
Bottom line is, we've all been exposed to complicated problems that we didn't "get" at first. For me, it was proofs in geometry. I could usually look at a solved proof and figure out why it worked and why it maid sense, but taking one from scratch and solving it on my own was really tough. But eventually from looking at enough examples I learned and became more comfortable with the techniques that were used and figured out how to apply them myself.
I could say the same about some of the areas of computer science that seem more abstract when you first learn them too - recursion, for instance took me a while to really gain comfort with.
By the way, I've encountered many "programmers" in my career who, judging by the code they produce, seem to be unable to think abstractly to save their lives.
But, honestly, it just sounds like maybe Computer Science doesn't align itself well with whatever aptitudes your friend might poses. Maybe he should be looking at pursuing something else.

Ha! TallyMan, you know you're a good programmer when a chess game you coded yourself can beat you!
Thirty years ago I did a game called "Life" in Pascal on an HP mainframe. It was a game of life death and survival among simple organisms inhabiting an array. I also did a dart game that would predict all the winning combinations of 6 darts thrown at a board. Those programs were so much fun to write!
I ended up doing COBOL business applications for 25 years. Not as much fun.
thomas81
Veteran

Joined: 2 May 2012
Age: 44
Gender: Male
Posts: 5,147
Location: County Down, Northern Ireland
I have a tendency to think procedurally myself. The BASIC programming I grew up with was procedural. Do X, then Y, then Z, etc. then maybe go back up to line 130 depending on something, etc. When execution reaches the end, the program stops. There were subs and functions for organization, but most of the time I didn't even use those! It was all a long list of raw instructions.
Nowadays what usually happens, particularly with any kind of GUI, is that the program, by default, sits and "listens" for events such as mouse clicks on buttons and stuff. It's a completely different way of thinking of the execution of a piece of software that took me some time to grasp.
To this day my code tends to look messy and long-winded, not using functions as much as it really should for readability and reusability.
_________________
Your Aspie score: 98 of 200
Your neurotypical (non-autistic) score: 103 of 200
You seem to have both Aspie and neurotypical traits
AQ: 33