Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.linux.misc    |    Linux-specific topics not covered by oth    |    135,536 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 135,157 of 135,536    |
|    Chris Ahlstrom to All    |
|    Re: The Value of a 2nd Look At Code    |
|    26 Jan 26 07:11:48    |
      From: OFeem1987@teleworm.us              Lawrence D’Oliveiro wrote this post by blinking in Morse code:              > On 25 Jan 2026 11:07:20 GMT, Stéphane CARPENTIER wrote:       >       >> That's why it's stupid to consider the best programmer as the one       >> who produce more lines of code than others.       >       > I once took a program of about 8000 lines of code, written by someone       > else, and cut its size in half.       >       > Actually the basic idea behind the simplification was very simple. The       > program was a plugin doing import and export of object definitions       > between the host application’s internal format and an external       > database. The import function was one gigantic sequence of handlers       > for all the database fields, which generated corresponding attributes       > for application objects, while the export function went the other way.       >       > What I did was replace the bulk of both functions with a single table       > of the correspondences between the two data representations. That       > shrank the import and export functions down to just a couple of dozen       > lines each -- they became just interpreters of table entries. I also       > found some discrepancies between the two original functions, which       > disappeared as a result of using the common table.       >       > This is called “data-driven” or “table-driven” programming. It’s       quite       > a common technique for reducing code size. Less code to write means       > less code to maintain going forward, and less opportunity for bugs to       > sneak in. Win-win.               "Show me your flowchart and conceal your tables, and I shall        continue to be mystified. Show me your tables, and I won't        usually need your flowchart; it'll be obvious."        -- Fred Brooks, The Mythical Man Month (1975)              --       Women, when they have made a sheep of a man, always tell him that he is a       lion with a will of iron.        -- Honore' de Balzac              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca