Otte: staring into the abyss
Posted Aug 3, 2012 12:31 UTC (Fri) by
jzbiciak (
✭ supporter ✭, #5246)
In reply to:
Otte: staring into the abyss by man_ls
Parent article:
Otte: staring into the abyss
I guess it depends on the language and the nature of what it is you're writing. For what it's worth, I've typed most of this comment without looking at the text box. :-) It's just easier that way. I'll go back and read it before I hit submit.
As for code, it's more often true that I'm not really "seeing" my edits when I'm restructuring existing code, as to writing new code. I do structure my code visually a rather particular way, though, so that I can do quite a lot with my peripheral vision. So, I more half-see than see much of my code, but I do rely on sight pretty heavily. I'm one of these folks that lines things up religiously. Examples:
/* Calculate bit_r 8-bit bit-reverse table */
for (i = 0; i < 256; i++)
{
uint_32 bit_r = i;
bit_r = ((bit_r & 0xAA) >> 1) | ((bit_r & 0x55) << 1);
bit_r = ((bit_r & 0xCC) >> 2) | ((bit_r & 0x33) << 2);
bit_r = ((bit_r & 0xF0) >> 4) | ((bit_r & 0x0F) << 4);
stic_bit [i] = i << 8;
stic_bit_r[i] = bit_r << 8;
}
...
stic->stic_cr.read = stic_ctrl_rd;
stic->stic_cr.write = stic_ctrl_wr;
stic->stic_cr.peek = stic_ctrl_peek;
stic->stic_cr.poke = stic_ctrl_poke;
stic->stic_cr.tick = stic_tick;
stic->stic_cr.reset = stic_reset;
stic->stic_cr.dtor = stic_dtor;
stic->stic_cr.min_tick = 57; /* to get started. stic_tick will reset. */
stic->stic_cr.max_tick = 57;
stic->stic_cr.addr_base = 0x00000000;
stic->stic_cr.addr_mask = 0x0000FFFF;
stic->stic_cr.parent = (void*) stic;
stic->phase = 0;
stic->next_phase = 57;
stic->fifo_ptr = 0;
stic->stic_accessible = 0;
stic->gmem_accessible = 0;
if (stic->req_bus)
{
stic->req_bus->intak = ~0ULL;
stic->req_bus->intrq = 0;
stic->req_bus->intrq_until = 0;
stic->req_bus->intrq_until = 0;
stic->req_bus->next_busrq = ~0ULL;
stic->req_bus->next_intrq = ~0ULL;
}
Code like that I can often whip out while only half-looking at the screen.
(
Log in to post comments)