I know I wouldn't have put that in there... ;) It seems to be working
fine now...
I know I wouldn't have put that in there... ;) It seems to be working fine now...
Woo! It's a nice feeling when you squash a bug that's been hanging around a while :)
It sure does... I just can't believe I would have put that in
there... :)
Well, after a set number of times, it would eventually exit out of the procedure with a message on the screen stating "All available jokes have been posted".
Well, after a set number of times, it would eventually exit out of th procedure with a message on the screen stating "All available jokes h been posted".
Looks like the joke was on you :)
Many of you are writing code in Free Pascal. Find a unit testing
framework for it and learn how to use it well, then get into the habit
of writing tests for your code. Also, start using a revision control system if you don't already and get into the habit of making lots of
small commits.
Much of the, "I put a getc(); or readln; into my program so I can see
what was happening at that point in the code" is for debugging purposes.
I get it; I've been there too (I develop kernels for a living so you better believe I pepper code with a bunch of, `asm volatile("HLT;":::);` in various places so I can figure out what's faulting and why). But
getting into the unit testing discipline gets rid of the need for most
of it, and the revision control system makes it easy to back that stuff out and get back to a known-working state.
Hope that helps!
On 02/16/18, tenser said the following...
Many of you are writing code in Free Pascal. Find a unit testing framework for it and learn how to use it well, then get into the habi
I didn't even know that was an option until I read this... I've looked
it up, and it seems that Lazarus already has a couple of options available. I'll be doing some looking into that. Thanks.
of writing tests for your code. Also, start using a revision control system if you don't already and get into the habit of making lots of small commits.
Revision control I have been doing. On the other hand, I have a tendency make commits that are a lot larger, and contain many additions/changes.
I really should stop that...
Much of the, "I put a getc(); or readln; into my program so I can see what was happening at that point in the code" is for debugging purpos
I find myself doing that a lot. I'll have it writeln what is contained
in the variables to the screen, and then put a readln, so I can read it.
I get it; I've been there too (I develop kernels for a living so you better believe I pepper code with a bunch of, `asm volatile("HLT;"::: in various places so I can figure out what's faulting and why). But
That has got to be an interesting and sometimes frustrating job. :)
getting into the unit testing discipline gets rid of the need for mos of it, and the revision control system makes it easy to back that stu out and get back to a known-working state.
Do you think using something like github would be a good idea for
revision control? Or do you think just copies on the hard drive, and figuring out which .PAS file is which, would be sufficient? :)
Hope that helps!
It really does. Thank you.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 214:10:49 |
Calls: | 6,619 |
Calls today: | 1 |
Files: | 12,168 |
Messages: | 5,317,481 |