3 ms·
Its so true... Recreating apps you've already created in different languages is the best way I have found to learn a new language; its exactly like translating
by mimiflynn 14y ago
Its so true... Recreating apps you've already created in different languages is the best way I have found to learn a new language; its exactly like translating from English to Spanish to learn Spanish.
But, how about the people that don't know any programming language? If they had never engineered anything from the start through planning and designing and implementing, how can they begin to use a programming language they are beginning to learn? None of the tools that languages provide have a context for a new programmer, much in the same way that high school kids don't understand why math is so important.
I agree with your first statement in that "things" should mean something other than software. Maybe they should build a treehouse or a toothpick bridge or anything to get the process of creation and engineering into the mix of thinking about writing code.
- kyllo 14y agoI think that the most important concept that needs to be grasped when initially learning to program, is that big problems need to be attacked by breaking them up into smaller, more manageable sub-problems. If you solve each sub-problem and put them all together, you have solved your super-problem. It's like the old saying, "How do you eat an elephant? One bite at a time." Once someone understands this, you can show them Python or Javascript or whatever and basically go, "Here's the syntax to declare/call a variable, function/method, array, boolean test, iterative loop, etc. Now here's a real-world programming problem. Break it into smaller sub-problems and solve each of them using these tools, then put the steps together into a logical sequence to create a runnable program. Google the documentation for the language and its libraries if you get stuck." Planning, designing, testing, etc. can be learned later. First you just need to take a problem, break it up into bite-sized pieces, and start taking bites. This is why object-oriented programming is bad for beginners, by the way. OOP puts design ahead of problem-solving. You really don't always need to create an abstract model of a problem before you can work on solving it, but OOP forces you to do this.
- mimiflynn 14y agoThats true, seems like that is what algebra books try to do when covering topics like factoring. You learn to factor and then, later on, you use factoring to solve a bigger problem. You could teach in small chunks and work up to big chunks in order to illustrate to the student how the smaller chunks make up the whole, instead of starting with the whole and making little chunks out of it. It could make the process of learning to code less daunting.
- bennyg 14y agoI learned to program by doing the above method with Objective-C, an OOP. Basically I made a Tip Calculator, and did it in a very functional way. Here was my thought process. I basically had one method, "didClickCalculateTip" - a button click-down. First I knew I had to take the user input as a string, and convert it to a float. Okay, Google, show me what you got. Then doing math on the float. Okay, now I have a result. How do I put that back on screen onto a label? Hmm, it won't let me set the string property of my UILabel to a float. Google: how to make a UILabel's text (string property) show a float. Okay, now print to the console to make sure it works. And voila. So, using an OOP language isn't bad right off the bat, because I was able to plug in and figure out OOP design and principles by virtue of playing around with the language over time. I'm a pretty proficient Objective-C developer right now because I haven't stopped playing around with it over the past year and 3/4. Object-oriented design patterns aren't mystical, they make a lot of sense when you just think about them. I chose the language because my quest was to make an iPhone app I had as an idea (not the tip calculator haha) but needed to start somewhere to learn how to program. So I picked the tool that would directly translate to the product I actually wanted to make.
- kyllo 14y agoObjective-C is a language that has object-oriented features, but unlike Java, doesn't force you to use them. You just gave an example of a project where you didn't use an OO design pattern nor OO features beyond a superficial level (An NSMutableString object doesn't count). You used a more event-driven design pattern, which was more appropriate to the problem you solved.
- bennyg 14y agoYes, obviously, but I made the point to show that shunning an OO language from the get-go isn't necessarily the best way to proceed if you want to learn programming from nothing.