Do you prototype code in another language?
Moderator: MaxCoderz Staff
- benryves
- Maxcoderz Staff
- Posts: 3087
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
Do you prototype code in another language?
I was just curious as to whether people prototype code in another language before rewriting it in assembly, ala Ken Silverman and QuickBasic.
I find it a lot easier to work in a higher level language to try and work out how to do something before implementing it in Z80. I'll start with everything in floating point, then slowly convert down to fixed point until it's all using 16-bit or 8-bit variables. Some things, if I can automatically think of them in a fixed-point style, I'll write in Z80 assembly straight up.
Does anyone else do this?
I find it a lot easier to work in a higher level language to try and work out how to do something before implementing it in Z80. I'll start with everything in floating point, then slowly convert down to fixed point until it's all using 16-bit or 8-bit variables. Some things, if I can automatically think of them in a fixed-point style, I'll write in Z80 assembly straight up.
Does anyone else do this?
-
- MCF Legend
- Posts: 1601
- Joined: Mon 20 Dec, 2004 8:45 am
- Location: Budapest, Absurdistan
- Contact:
Not for Z80 projects, those are simple enough (at least the ones I made so far) to be quite tractable. As for bigger ones, I found that prototyping in a high-level domain specific language can be very helpful. One example was a parse tree postprocessor which transformed trees by certain rules and also required pattern matching. I wrote a prototype in Prolog, then rewrote it in C++ after the algorithm reached its final shape.
I usually don't, but sometimes when I start working on something new, something I have never done before, I prefer to try things out in a language I am most comfortable with at that time, before rewriting it in the desired language. That way I spend less time implementing and more time thinking about the logic behind it, which can be quite beneficial.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
I agree with Timendus, though I don't code in z80 Asm I have done something similar to this. When I was in Comp Sci I used to code the assignment in TI-Basic, which would get me thinking of the logic rather than the actual code, then go onto the computer and code it. Sadly it was a Java class, but I was able to do some things in it.
- KermMartian
- Calc Wizard
- Posts: 549
- Joined: Tue 05 Jul, 2005 11:28 pm
- Contact:
If it's a "simple" program, then no, I jump straight to low level logic and add comments to supplement the lack of pre-code. For any massive project, however, I write the logic in pseudocode (on paper if I'm at school, in a text editor at home), where it is then broken down to low-level logic (i.e. routines, macros, defines), and finally coded (with comments). This "modularization" method (+comments) eliminates most of the potential logic errors and therefore I don't have to recode it after a month just because "the code is weird" or "I don't know what the * I did"
"If SOURCE is outlawed, only outlaws will have SOURCE."
-
- Calc Master
- Posts: 1089
- Joined: Fri 17 Dec, 2004 9:53 am
- thegamefreak0134
- Extreme Poster
- Posts: 455
- Joined: Mon 23 Jan, 2006 10:09 pm
- Location: In front of a Computer, coding
- Contact:
I do things backwards. I code my ideas in Calculator BASIC before doing anything in GBA code. This way, I can see my logic run "as it happens" due to the calcs slowness, and pretty much identify any logic errors in real time. Being able to easily look at variable values is nice too, as you can see them even if the program crashes.
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
Cool, now I don't feel alone!Rezek wrote:Dude! Me too, same situation!When I was in Comp Sci I used to code the assignment in TI-Basic, which would get me thinking of the logic rather than the actual code, then go onto the computer and code it. Sadly it was a Java class, but I was able to do some things in it.