andrew firth wrote:I am trying to do this and getting frustrated with the process. What is the best way to do this without changing many lines of code around?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
andrew firth wrote:I am trying to do this and getting frustrated with the process. What is the best way to do this without changing many lines of code around?
My suggestion (and the first one is the same as I give to ALL newbies here) is this:
1. STOP CODING, and turn your computer OFF.
2. Back up and look at the problem (and also whether you are looking at this as simply a programming exercise or a real music program). If it's the first, then simply write out, in detail, what it is you need to do. If you need to actually provide implementations for the methods, then do that too, ON PAPER, before you write another line of code.
3. Scrap what you've done so far, and start again.
Sorry if it sounds brutal, but in order to write code for a solution you must first understand it. Most of the best programmers I know spend 20% of their life coding (at the most). The rest is spent with bits of paper, whiteboards, or just down the pub thinking (at least, so they tell me).
If the problem really is to write a musical program, then "tune the instrument" strikes me as a major challenge right off the bat. The bloke who came around to tune my mum's upright had been doing it for 25 years when I knew him, and said there were still things that he didn't fully understand about the process.
Winston
Dennis Deems wrote:You simply can't scrap everything you've done and start over every time you hit a rough spot.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
You might not, but I do. I have gone down with a nasty attack of déjà vu. You will get even more déjà vu, Winston, when you see what I said last time I saw that code:Dennis Deems wrote: . . . I see no problem in Andrew's Violin class, . . .
The code shown here is virtually identical to the other code I saw.You need to start small. Comment out everything, write (or un-comment) 5 lines, compile and run. Repeat the process until the class is complete.
Campbell Ritchie wrote:
You might not, but I do. I have gone down with a nasty attack of déjà vu. You will get even more déjà vu, Winston, when you see what I said last time I saw that code:Dennis Deems wrote: . . . I see no problem in Andrew's Violin class, . . .
The code shown here is virtually identical to the other code I saw.You need to start small. Comment out everything, write (or un-comment) 5 lines, compile and run. Repeat the process until the class is complete.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |