I have female friend from civil engineering background who would like to start programming. What would you recommend as the starting point? She has done some C++ in high school but the way it was tought (many small programs) really discouraged her.
... friend from civil engineering background
who would like to start programming.
Why? Is this just a vague thing of "programming seems like the thing to do" or does she have things in mind that programming will enable? Does she want to get a job in programming, or does she need it as a tool for her own interests?
Without specific things to do, problems to solve, and itches to scratch, getting and staying motivated is really hard.
... the way it was taught (many small programs)
really discouraged her.
Why did many small programs discourage her? What was it about that? All programs start as "Hello World" and then get grown.
Without specific tasks to perform it's hard to suggest a place to start. If she will have no problem with motivation then I'd suggest "Learning Python the Hard Way." If she has specific small things to do, find a mentor and start mutating small programs. Or start with Khan Academy or Codecademy and see where the motivation disappears - then analyse why.
She doesn't like her field and looking at what I do, she thinks this might be the career choice for her.
The small programs where basically a variety of tasks to perform with "for loop" which is quite boring. The reason why you outpul "hello world" is to make you feel you progressed and it's not the case when you spend half a year outputting different numbers after writitng 10 lines of code.
Using the "Hello World" program is not about making you feel like you're making progress, it's about ensuring that you understand your end-to-end process. You need to:
* Create a program
* Compile and/or invoke
* Find the output
Then everything else is about increasing that processing you do between input and output.
Learning programming simply because you think it will be a good career is hard. I would suggest starting on Project Euler[0] and concentrating not just on solving the problems, but solving the projects well. Reflecting on the quality of code means you stop just hacking out something that works, and worry about readability, maintainability, and other such important issues.
I am myself learning, struggling and learning right now.
Here's my conclusion on how to learn programming-
1. Pick a language(say Python or Ruby or JavaScript), no matter what, just stick to it for sometime (maybe 3 months).
2. Quickly go through a very light book/tutorial in the languge(learn python the hard way, or ruby hard way) (max 6 hours)
3. Build a small program for yourself. Solve your simple, stupid problem (e.g. a small interactive calculator). Keep pushing your limit with every small project. Try to learn a new concept of the language always. Hard part would be figuring out what "new concept" to learn? At this point, pick a advance book of the language(e.g. Programming Ruby), skim through table of content to see what you haven't implemented yet.
4. Keep learning basics. ie. keep digging deep into concepts (e.g. understand how lambda function really works)
5. After a good grasp of language, pick up a framework and start building apps(small apps to bigger apps).
6. Repeat from 1 to 5, until you feel confident.
7. Venture out, try out other languages/frameworks.
Tips-
1. Read blog posts regularly from people good in that language.
2. Don't get overwhelmed by how much you have to learn. Go easy but go full. Learn things properly.
3. Do Algorithms and data structures problems regularly.
4. Don't just copy and paste code. Understand it properly and then type it. (It helps)
5. Be consistent and Persistent. (Code daily, don't give up)
I haven't reached the top of the mountain, but here is how I got started. First I did learn Ruby the Hard Way - just went as far as I could. When I got stuck, I went back to the beginning and started again.
About that time I found Codecademy and did their lesson. Next I started building a Rails app reading the Oreilly book. That was supplanted by Rails For Zombies as soon as I found that. I followed the RFZ tutorials 1 and 2.
Somewhere around this time I saw a presentation at General Assembly by a guy named Mattan Griffel. He did an hour class on getting started. A few months later he launched a site called One Month Rails - it laid out a tutorial to build a Tumblr-type site I believe.
It was most helpful for me to always find a new tutorial, and get as far as I could with it. When you're just learning the basics, repetition and focusing on new projects kept me interested. There are a wealth of tutorials on the internet that teach in different voices, different orders and build different projects. For me, the best way to go was to try as many as I could.
I started back in '92 (so when I was 12) with visual basic 3 / 4 - things were a lot simpler then, but also more difficult with no Google / stackoverflow / etc...
A big point in programming I think is the need to solve a problem - ie: write software that doesn't exist for yourself, improve on an existing idea or try to increase your income with freelance / a better job.
If you don't have the drive to accomplish one of those things, programming is difficult - I've worked on projects I had no interest in and regardless of the pay, they just dragged on.
That said - a good programmer can write in any language; the key to becoming a good programmer is learning how to think logically and realizing all languages are roughly the same, just different syntax, performance, usage, etc... Deciding the right language will come with time as there is tons of overlap for any given task.
So -
Step 1: find a need - maybe start with a personal website or a task manager app for her favorite OS.
Step 2: find a language that works on that platform that's popular and well documented - php, ruby, javascript for web; VB, C# for windows, Obj-C, Swift for iOS, etc...
Step 3: start reading documents or books and get the basics of the language down; make smaller programs that accomplish a portion of what the greater app will do (my first program in VB was a program to tell time in various formats, start and stop intervals and timezones)
Step 4: start writing! make mistakes, ask questions, make more mistakes, pull out some hair, drink tons of coffee, make more mistakes and eventually, you'll get good at it.
A big challenge in programming I think (having spoken to new programmers) is getting the terminology down - knowing what to search google for and getting a good answer - to a new programmer, you might be curious about how to "get data from mysql into html table with javascript" when the real question is closer to "php mysql export data to json" and "javascript parse json string from ajax post response"
For more experience and getting to know the languages I recommend http://www.codewars.com/ - great for solving puzzles, very similar to Project Euler!!
Without specific things to do, problems to solve, and itches to scratch, getting and staying motivated is really hard.
Why did many small programs discourage her? What was it about that? All programs start as "Hello World" and then get grown.Without specific tasks to perform it's hard to suggest a place to start. If she will have no problem with motivation then I'd suggest "Learning Python the Hard Way." If she has specific small things to do, find a mentor and start mutating small programs. Or start with Khan Academy or Codecademy and see where the motivation disappears - then analyse why.