Bugs: practice
Now let's move on to the "typical"
errors". Without any finger-sucking
let's directly analyze all the errors that arose─
whether when writing and a series of optimizations are effective─
kta"ball record"in New View 48K. This, co─
of course, not a big program with complex times─
branched functionality, but I would like to
look at someone who can do the same.
It is important to document the development process of the product
something larger :)
Started10/03/2014. Stages - it's entered─
new changes not related to the bug─
fixes. Bugs are numbered for each bug
it is indicated how it manifested itself and how it was found
(sometimes it's the same thing). Development about─
was carried out in SjAsmPlus with auto-assembly (from─
initially in TRD) using the mhmt packer
and trdtool utilities. II always use av─
assembly so as not to debug the sleep separately─
take a shot, and then write a loader and debug it again─
live. The first empty assembly is made from
Chaos Zoomer 1K sources.
- (stage 1)Drew a sprite of the ball.
- (stage 2)Graphics were manually transferred to
zeros and ones. Simple procedures have been written─
fools for sprite output. Tested for
coordinates from the bulldozer(y+=9,x++).
1. There was a dot in the middle of the mask (random
was the number put in after drawing???)-
I noticed it only when moving the sprite.
- (stage 3)The output procedure is replaced by
set of 8x8 generated pins (in
#c000..#ffff - for each combination x
mod 8, y mod 8), pin generator -
genprspr.
2. Forgotinitialize hl before loop
calling genprspr - found by tracing.
3. jr z instead of jr nz in genprbyte (part
genprspr) - found by viewing the generated
code.
4. I forgot the case when there was nothing after the mask
doesn’t overlap - found it by browsing the gene─
downloaded code. Optimized.
5. Forgot the case when the mask overlaps
the whole byte - found by viewing the generated one
code (and the first time I put the transition wrong─
That’s right, the second time the bug is due to the fact that it’s not
I moved the thread from another place).
6. Zigzag output did not work - found it
the first run of the generated code (and per─
the second time I wrote the label wrong, the second time
I didn’t save it once, the third time the zigzag was in the wrong place
phase - I was in a hurry to fix it and corrected it once
wrong after time, but these cycles went one by one
after another and very quickly).
7. Down hl did not work in the generated code
(ld a,l instead of ld l,a, copy-paste error) -
I found it by first running the generated code.
- (stage 4)In the pin generator─
our branches are not only forand:or(reallyor:
xor), but also foror,xor,and.Sprite invert─
rown for ease of writing for allbranches.
8. Erroneously set the units outside the mask
(because I inverted the mask and sprite
autocorrect) - found printing sprites without
background (previously printed on top of a copy of the ROM).
- (stage 5) In the pin generator up to─
added single bit output optimizer
(genprsprres).
9. Inc hl was omitted from genprsprres
(not copied entirely from another thread -
copy-paste error) - found by browsing sge─
unreleased code.
- (step 6)Add in the pin generator─
len optimizer of type constructionsinc l:
down hl:dec l(removeЗinc).
10. One branch is not serviced in removeZinc
exit - found by launching output from steam─
meters.
(From now on, you earned the right money─
driver.)
- (stage 7) Restored generator written─
washers (washers) genrespr (based on
pin generator) - shape washers
sprite, vialdi/lddfrom a screen copy, 8x8
pieces#8000..#bfff.In this regard, the asset─
This part of the program is separated from the initial─
ation and placed in#7800,and in#6000pos─
a copy of the screen. In this case, I had to use─
edit addresses in the depacker (depkmain.asm).
11. In genprsprxor (genprspr branch, real─
but not used) skipped inc c - on─
I was looking at the code when I was making it
another procedure.
12. Unpacking strapping depkmain.asm is─
rules in the wrong directory (different panel
TotalCmd) - the program did not start.
13. Forgot to copy the screen to restore─
infusions - found by starting to restore─
ki.
14. Forgot to assign de for restore─
lky - found it by looking at the source.
(An hour and 40 minutes have passed since
earnedhatch; from now on for─
The washing machine was working, already 858 lines.)
15. Instead of ld a,(hl):ld (de),a there was ld
a,(de):ld (hl),a - saw after fixing pre─
previous bug (there was a bug in three comments,
although ldi,ldd was written next to it).
- (stage 8) The output wiring has been written according to
sine (mainprO) and erase harness
(mainreO) through the use of values
calculated by the output trim (viaix=
COORDS+n). The number of balls is entered in cons─
tantu BALLS.I check the functionality and
number of clock cycles on test cases atnomove=1
(i.e. do not move sprites).
16. Instead of ld ix,COORDS+128 (work through
-128,+127) stood ld ix,COORDS - program
fell out.
17. The BALLS label is missing (although I have compiled it─
was deleted) - the program was reset.
18. jp nz,mainreO instead of jp nz,mainprO(copy-paste error) - reset program─
las.
19. But it was necessary to jp p both there and there (because
used ix+128) - buggy. In front─
lal on ix, ix-BALLS, ix-(BALLS*2).
(50 minutes after it started working
washing machine; one bug for >45 lines.)
- (stage 9)Optimized the output via
recalculation of the table of sines forXinto values,
needed for output:x/8andf(x&7)=8*(x&7)+
#c0(cyclerexsinO), and sine tables for
Y to the table of screen addresses of theseY(cycle
reysinO). Previously, it was used pro─
procedure for calculating screen coordinates in ROM
(8881).
20. It was COORDS=#8Off-BALLS instead of #8100-
BALLS - buggy.
21. ld (ix+),a afterthere was no optimization
it was buggy there.
(Another hour has passed, at this point it is written
1100 lines - one bug per 50 lines, including
No. 24.)
- (stage 10)I looked at the speed at different
drawings of balls. I chose the fastest va─
variant.
Second day:
- (stage 11)Added optimizer and erased─
ki -genreopt(starts aftergenrespr,
corrects an already generated procedure -
ld a,(hl):ld (de),a:inc l:inc e is replaced
onldi,and ld a,(hl):ld (de),a:dec l:dec e
is replaced byldd).
22. No omission was made in genreopt
inc l:inc e - Wisla program (and the first
since I corrected it incorrectly, I left ld a,#ed
along with ld (hl),#ed ).
23. In genreoptn (genreopt branch) there was a pro─
launched lda,(hl) before comparison (before─
temporary optimization) - reset program─
failed (and compiled it correctly for the first time─
nie without saving).
- (stage 12)Added compilation to tap.
After 2 days:
- (stage 13) Optimized the rice binding─
rollers and washers through parameter storage
cycle in registers that do not deteriorate when
call.
24. In rexsinO l was used instead of (hl)
- the balls were twitching (I realized it for the first time when─
rank incorrectly, then corrected the incorrectness─
flax).
25. Added ld c,0 after ld ($+3+2),a -
hung. If it was done through a mark,
there would be no glitch.
- (stage 14) Optimized the drawing tool and
erasing through constants in registers.
26. Changed prdhlsize, but forgot to fix it
in removeЗreinc (corrected in removeЗinc) -
artifacts on the screen (and fixed it for the first time
wrong, because you need to respr your dhl -
spoils de).
[False bug: first optimize dhl through
constantsseemed like a loser (I forgot for─
previously counted, found by looking at the bars in
debugger), ended up spending time on No. 26;
but subsequently in the new code this new
dhl option won.]
27. Added by jr z,genprsprorxorconst_c
instead of genprsprorxor2const_c (copy error
paste) - disabled at const_b=0.
28. Wrote 'xsin instead of xsin/256 - SjAsm
didn't compile.
A few days later:
- (stage 15)Wrote the background output (before this
the background was from ROM).
29. There was a typo: pgbg2, pgbgЗ instead
prbg2,prbgЗ (and prbgO,prbg1 was written─
sano correctly) - compilation error, but
started with the wrong background image─
coy.
A few more days later:
- (stage 16) Optimized rice binding─
rollers and washers through saving parameters─
ditch to the stack, and the call via ret:pop hl(this
saves registers for loop parameters and
rendering constants).
30. There was an error in the transition in genprspror
to genprsprorxorconst_c - instead of the required one
genprsprorconst_c (only one of three rows─
the house standing is incorrect!) - found by mistake
compiler (long jr), but everything worked!
31. There was another long jr on genprspror
- I found it by compiler error, but everything works─
melted!
When optimizing:
- (stage 17) Wrote another version of the style─
ralks that are generated directly from text─
background tours (settingbgtype=2), they don’t need─
to a copy of the screen in#6000.Naming procedure─
is availablegenrebg.
32. Comment (e&7)*8+#c0 instead of (x&7)*
8+#c0 - found when changing the source. This
a bug in the comment would be very dangerous
with subsequent changes.
33. I deleted the genreopt call, but forgot to delete it─
pour call genrespr - reset.
34. Before genrebgsO wrote ld hl,PROGS
instead of ld hl,PROGS-#4000 - hung from artef─
ktami onscreen.
35. It was jr nz,genrebgs1 instead of genrebgsO
(copy-paste error) - problem with artifacts
on the screen.
36. ld a,b:dec a:call nz,dde instead of call
dde:ld a,b:dec a:call nz,genrebgdhl (trans.─
The second time I corrected it the other way around).
37. IMVEC and IMER were overwritten with new lengths─
using special procedures rebg - reset. Pe─
transferred to other addresses (where the outputs are).
38. Forgot in genrebg at the beginning of the generated─
pop hl - reset.
39. Forgot push hl in the new mainreO branch
(starting washers from the main cycle) - sbra─
it was falling apart.
40. The size of rebg procedures can exceed
#80 bytes (for 1 byte) - found by special test
during generation, fixed background graphics
(#fe on #ff in the corner).
- (stage 18) I tried to restore─
flow throughpush(bgtype=0) - unprofitable
(needs a small window), but useful for
the following changes.
41. When I made three bgtype options, by─
set if..else without endif, not compiled─
moose (unexpected end of file) - you found it─
throwing parts of the source (wrapping
if..endif doesn't help).
(At that time 1436 lines were written - one
35 line bug.)
Moreafter a while:
- (stage 19) New speed calculation pa─
output parameters (pop hl:ld bc:add hl,
bc:ld (),hl- and on the stack for erasing
it is not the procedure address word that is patched or
screen address word, and one byte from
this and that). For this, everythingYfor balls
cycled, for each of the 8 phases of the input to the tab─
face Y"scripts" are generated (in#6000),
where Y are sorted from top to bottom. TableX
copied to the stack with a cyclic shift.
Settingsrex=1.
42. When generating tables for Y, no
sinuses, andconverted into addresses (on top
the same place in memory) - reset
(found by tracing and looking through memory).
43. Forgot to assign sp when entering a new one
calculation of output parameters - reset
(found by tracing and looking through memory).
44. Instead of PROGS&255 in the new calculation, one hundred─
yalo 0 - vislo (found by tracing).
45. After the new calculation were not assigned
registers before calling balls - reset─
elk (found by tracing).
[False bug: for a new calculation after co─
The rotation of the balls in Y should, in theory, be read
X-coordinates are not in a row, but in sorted order─
rows (found it when I started adding litter)
tiring). But then I sorted the record (not
reading) in order X and returned reading under─
row.]
46. When adding the ball number in order
sorting (i.e. 2 bytes instead of 1 in the list
y), forgot to skip this byte during composition─
stack lenition - artifacts on the screen, found
gradual return of changes, the first time
corrected incorrectly (missed the wrong one
byte).
47. When adding sorting, put jrnc,fillreysortskip ;skip if (hl)>=min together─
one hundred jr c,fillreysortskip ;skip if (hl)>min
- reset, found by tracing.
(From now on, display everything on Scorpio─
without cutting with a beam. 32 balls for a circle─
account logo so that y=ysin[i],i+=8. For now
The washing machine is used via push.)
- (stage 20)Optimized the washing machine through
push- on1,2,7rows of even numbers
fill everything with one register, because in graphics
there are zeros or ffs.
48. When optimizing a washing machine, one jr z is not
compiled, but everything started - found it
tracing the generated washer and
viewing the source.
- (stage 21)I figured out how to quickly generate─
set the parameters for the old washing machine (ge─
not removed from the background).To return to it,
started testing conditional compilation with
different combinationsrexibgtype- convince─
I hope it still works before writing
new calculation of parameters for the washing machine.
49. In conditional compilation in two places
it was if trex==0 instead of if rex==0 - you─
was leaking, found it when returning to the old me─
then erasing.
50. reysin (Y table recoding)
was thrown out of the procedures (return─
put it back in place) - reset, found the track─
scanning and viewing the contents of the table.
- (stage 22) Bringing the addressing closer closer─
filling the drawers to address the drawing stops─
new address bits (settingsREYYYYXXX,
SWAP2310- first debugged one, then
added a second one).
51. When adding the second address option─
sations in one of the two if REYYYYXXX were
branches are mixed up - artifacts on the screen,
found by switching REYYYYXXX (artifacts
remained) and viewing the source.
- (stage23)Now enter recovery─
For this purpose
in#c000..#ffOOputjp nzon the rise─
infusion#nn80,at the end of restoration
alwaysNZ,and at the end of the output I addedxor
a.SettingsPRJP.
- (step 24)Instead of the parameter generator
recovery made a patch for the output stack─
links (directly in the output) to turn
it in the washing machine stack - settingPRPATCHRE.
With the new addressing option, everything changes
one byte out of 4 for eachball.
52. When adding a stack patch to the output─
ku missed inc sp:inc sp - reset, found
tracing.
53. When adding a washer according to the patched
put ld a,l on the stack instead of ld a,(ysinst)
- found by tracing during the search for the following─
blowing bug.
54. The address on the stack was patched not of the current one, but
next ball (design error) -
artifacts on the screen, found by tracing.
55. In the drawing generator, the Y coordinate
for the patch it was taken from the wrong register -
artifacts on the screen, found by looking at the source─
day.
56. The Y coordinate was taken at the end of the ball,
when it no longer corresponded - artefa─
you are on the screen, I found it by looking at the source.
57. In mkscript (script generator by tab─
face Y) inc e:ld (hl),e instead of ld (hl),e:
inc (hl) and because of copy-paste another inc e
further, as a result there was no address on the stack
exit - reset, found by tracing and pros─
memory motor.
(From that moment on, I returned to washing machines,
generated from the background.)
- (stage 25) Remade the stack patch for
washing machine through (hl')instead of ex (sp),hl,
now the address of the desired ball is patched, and not
next.
58. When returning pop hl ;scr to the beginning
re (I previously moved it to the end for
fixing the address of the next share─
ka), mixed up conditional compilation branches,
so it remains at the end - reset, found
tracing.
59. In the new call, the washing machine is not assigned─
constants were added to registers - artifacts on
screen, found it by looking at the source.
60. In tap the screen was not cleaned - it hung on
washing machine generator, found by tracing.
(From now on, 32 balls work without
problems at 48K - in the Fuse emulator.)
- (step 26)Because in the Fuse emulator
do not see the number of clock cycles in the procedure, additionally─
Vlen customizable emptyldir,to view─
find how much free time is left.
Then it is made auto-adjustable, finds
by interruption, the worst case is setting
SPEEDMETER.
- (stage 27) Remade the stack patch for
washing through(de)instead of(hl').
61. When removing the constants const_d and
const_e wrote ifdef instead of if - noticed
by not changing the number of clock cycles.
62. In mkscript (script generator by tab─
face Y) when replacing hl' with de, missed inc
hl in the patch - artifacts on the screen, found
tracing.
63. In genprspr ret ended up in the conditional branch─
external compilation after adding xor a -
noticed by looking at the source when cleaning it up
xor a, when I changed hl' to de.
64. It was impossible to remove xor a, because she
gave Z - artifacts on the screen, found the trace─
siring, corrected by adding DRAWUP and
changing Z to C.
- (step 28)SettingDRAWUP- drawing
sprites from bottom to top to restore─
rolls have always been CY=0 (previously always
wasNZ,but forZyou need an extra one in the pins
command xor a,a forCY=1not necessary). Then
made the sprite to flip to co─
responses with this setting.
65. After inserting DRAWUP is not optimized─
lis inc l:dhl:dec l - found by counting ta─
whov.
- (step 29)Optimized generationX-
coordinates by re-sorting the table of sines
through 7 values and 2 bytes at once -x/8
andf(x&7)(settingSORTX7).
66. After adding SORTX7 called
fillrexO, although I added the code before it
(fillrex) - reset, found tracers─
coy.
- (stage 30)OptimizedfillrexO (ne─
transfer of data for X from the table of sines to
linear table, with simultaneouscyclically─
permutation of balls) - copying
not throughld,but throughldi.
67. When replacing in fillrexO copying from
ld on ldi forgot to save register c -
reset, corrected the mistake the first time─
flax (ld c,b, although ldi were in pairs).
- (stage 31)Removed fillrexO,replaced with
ldir.I looped the original table of sines
by adding a copy of the beginning to the end.
68. I did this copying not to +512, but to
+256 - approximately every 3rd frame was distorted,
I found it by looking at the source.
- (stage 32) Resorted steam calculation─
output meters in order ball number, so
read data forXfrom the stack, as planned─
was.
69.When adding re-sorting by ball
number in the search there was a loop without exit when
found - reset, found by viewing
source.
(At this moment, 2696 lines have been written in 8
modules - one bug per 39 lines.)
- (stage 33) Optimized in washing machines
down hlon odd familiar places throughset/
res 5,l.
70. When optimizing dhl on odd values─
somewhere in the DRAWUP branch I wrote set instead
res - artifacts on the screen, found a trace─
vkoy.
(At this moment, 2774 lines have been written -
one bug per 40 lines; about 7000 cycles
free at 32 balls.)
- (stage 34) 11.28.2014.I was looking for the best ones─
private palettes for balls and background, taking into account
opinion of the population at work.
- (stage 35) 12/02/2014.Added balls
over 32 - for this, the table of sinesY
increased beyond 256 bytes (8*BALLSbyte).
71. When adding balls beyond 32, write─
sal ysinst instead of ysin in two places - vi─
layer, found it by looking at the source.
72. Then I messed up hl in sorting X
(it was not obvious to the eye what he was using─
xia, premature optimization) - hung,
I found it by looking at the source.
73. Recalculated ysinst (sine phase according to
Y) before half was done with it
actions (premature optimization) -
every eighth frame was twitching, found a problem─
source motor.
74. There was an incorrect looping when
BALLS>32 - found by accident by browsing the source─
day when searching for the previous bug.
75. Checked if ysind - forward
reference, did not compile, rewrote
mathematics, first time wrong ld hl,
ysinst instead of ld hl,(ysinst).
- (stage 36)I immediately got 36 balls.
Optimized by selecting trajectories according toXand
Y,so that the 37th has time.
- (stage 37)Optimized the start of erasing─
lock by elimination methodjp #8080+#nnOOon
placepins that are not used in
trajectories - the washing machine itself is placed there
to which you previously switched (setting
MOVERE).
- (stage 38)When there are 37 balls,
lal step on the table of sinesX not 7, but 9,
Otherwise you would end up with a ring of balls.
76. When I took a step along X not 7, but 9, not─
I calculated correctly 0.9,...,252, (29 pcs) -
the frames were flashing, found by test changes
and viewing the source.
- (stage 39)Optimized access to the stack
with whites by moving the stack into place
pins that are not used in the track─
torii (settingMOVESCRIPT) - not yet─
compatible withMOVERE.
- (stage 40)Optimized output (setting─
ykaPRFORWAIT) - instead of..ld (hl),a:inc l:
ld a,(hl):or reg:xor n:ld (hl),a...now
will...ld (hl),a:inc l:ld a,reg:or (hl):
xor n:ld (hl),a...,this fits better
in whites.
(At this moment, 2932 lines are written -
one bug for 39 lines.)
- (stage 41)Optimized the entrance to the recovery─
fillers - do not recalculateSP(present─
roykaPRPATCHRESP).
77. When I added PRPATCHRESP, I didn’t replace─
assume that the stack has already been reassigned to mainprret
- reset, found by tracing.
78. Then I forgot to reset the CY flag - ar─
facts on the screen, found the outcome by watching─
Nick.
- (step 42)Optimized output from vos─
installers - without using the address
output toix,simply through conditional transfer
movement, as when combining pins with sti─
ralkami.
(At this point, according to an optimistic estimate
free about 500 clock cycles with 37 balls
- not counting emissions on individual frames.)
After a while(04.12.2014):
- (stage 43)I implemented one feature─
temporarily enable optimizationMOVESCRIPTand
MOVERE(although the latter is only 46 clock cycles
- even less when combined), at the same time additional─
setting is enabledEVENY- use only─
to even numbersY,to leave more
places forMOVERE.
- (step 44)I tried an even simpler one
ball drawing. Now there are almost 38 balls
(can't keep up on some frames).
- (stage 45)Minor optimizations of chapters─
of the cycle - moved xsinstto freeing─
moved lx,removed saving spfrom the cycle,
moved ysinst to usedld hl.All
is not yet in time. How many cycles is it not in time?
- impossible to understand (SPEEDMETERcalculates
only the remaining time, and he spends it himself
many clock cycles).
- (stage 46)Began to throw away unused ones─
my settings (move pieces of code to
main_nu.asm), so that the act can be better seen─
al code. Branches removedrex=0,PRPATCHRE=0,
PRPATCHRESP=0,PRJP=0,SORTX7=0.
- (stage 47)Removed jp mainloop,accelerated
branch tomainprret,removed reassignments─
vanie bcwhen entering the washing machine. Still not
does well.
- (step 48)In mainprret instead of ld hl,
-(BALLS*4+2):add hl,sp(which, by the way, gives
incorrect CY) now put ld e,
tscriptstkshift&255:ex de,hl.
- (step 49)Removed mainprret in quick
memory, because it is executed in the screen field
(although there are only 7 commands).
- (stage 50)Removed two pairspush...popin
preparing data forXbefore output.
79. At the intermediate phase of this optimization─
tion spoiled by de (premature optimization─
tion) - Vislo, found it by looking at the source.
- (step 51)Used stacktrexinstead
standard for interruption time - save─
mil one reassignmentsp.
80. Forgot to assign sp on the first iteration
- buggy and reset, found ittracers─
coy.
- (stage 52)Speeded up work withysinstfor
casesEVENY=1(use only even
numbersY in the table of sines, itselfYany -
The old behavior of this setting is erroneous
remains): since the actual data is from that
blitzesYare not readable, only the number is needed, and
in this case it is divided by 2 and becomes
one-byte. The next number is now taken
without branching through the table throughld l,(hl).
Already almost 38 balls with the new graph─
fikoy - blinks VERY rarely.
- (step 53)Insteadei:haltput ei:
:ld a,r:jp pe
(po=di,i.e. the interrupt was captured),
or evenld a,r:ret po:jp.All this for that─
so that a single slow frame does not give
skip the next frame byhalt.Now
with the new graphics does not blink on 38 balls and
almost manages 39.
81. When I removed the ld b,0 command: condition
if reconst_b!=0 was not compiled by SjAsm,
replaced with if !reconst_b, but in fact
it should have been the other way around: if reconst_b - found
reviewing the code.
- (step 54)Optimized ld l andld bc
based on bc=0 afterldirwhen entering
scripts.
82. I wrote a condition if !tscripts instead
if !(tscripts&255) - found by viewing co─
yes.
- (step 55)Optimizedld bcat the input
in drawing games.
(At this moment, 3154 lines are written, in
on average one bug per 38 lines; optimize everything─
Code versions for this day yielded a total gain
about 400 cycles (there is room for several more)
only bars in three places), but the change
graphics and interrupt capture algorithm yes─
significant gain.)
After a long time(01/30/2015):
83. Due to the removal of ld b,0 you couldn’t─
turn on EVENY and bgtype - it worked, I found it─
sirovka, temporarily returned ld b,0, left
TODO for a complex condition.
84. At the same time I discovered that two nast─
settings for sinx??opt were included, and for
bgtype=0 included a table without opt.
85. Phase X lay in lx, and he was busy in
bgtype=0 - noticed by the behavior of the balls,
Found it by looking at the source, corrected ix to
iy at repush.asm.
- (step 56)I did it in the window and removed the patch
stack forbgtype=0- now with new graphics─
which can handle 40 balls.
03/03/2015:
86. I noticed that the top and bottom lines
The screen does not need to be cleaned due to the shari pattern─
kov - found by viewing the screen, won 332
tact.
- (step 57) Replaced "optimized"
table Y to a simple sine - the speed is not
fell, but everything became visible at the same time
balls (previously they overlapped each other
and there was no such screenshot where it was visible
all). By adjusting the window I achieved 42 balls
with a small reserve for music.
And then everything started spinning - until the party os─
there was less and less time, and I
stopped documenting. Added a player
music, background appearance/erasing, fix under
music, but the main code and tables remain
unchanged.
* * *
Statistics (by ball record and color
chunkam):
- on averageI have one bug
for every 40 added lines. Therefore
need to be careful when adding pieces
100 lines or more - better than this hut─
to avoid catching several bugs od─
at the same time.
- out of 105 bugs recorded, 20 are related─
belong to the types mentioned above: 9 are
copy-paste errors, 7 - errors before─
time optimization, 4 - design errors─
testing. And of the remaining ones, it seems, the most
popular: incomplete changes (corrected in
in one place and not corrected in another), about─
missing lines, erroneous expressions.
- If I'm not mistaken in the calculations, 9 bugs
found by the compiler, 19 - by viewing is
walker (including with changes), 23 -
startup (including counting cycles), 3
- viewing the compiled code, 8 -
changing the testcase, 31 - tracing (in
including 6 - memory browsing, 4 - searching─
by the generated code), 1 - throw out─
I eat parts of the source code, 1 - gradual withdrawal─
volume of changes.
* * *
I recorded on video one example of how I
I write and debug code - in real time,
with all the mistakes. This is multicolor
scroller pictures for corporate 48K:
http://www.youtube.com/watch?v=eQacAM9VRmЧ
The program itself with graphics from Trixs/
Conscience is in the app.
* * *
It seems that everything is most importantI told you.
But the topic is interesting and promising. After all
if you know how to debug, you can take a risk
write a lot of code. If you don't know how, don't
you can. Of course, you also need to have imagination
perseverance and a certain outlook, but these
qualities are inherent in almost any creative work─
specialty.
All that remains is to wish you pleasant
glitches and successful code development with pain─
Sweet letters!
Share your thoughts about the article