[ale] Any language (wuz: Assembly Language?)
Jim Kinney
jim.kinney at gmail.com
Mon Oct 28 15:13:10 EDT 2013
On Mon, Oct 28, 2013 at 2:01 PM, Michael B. Trausch <mbt at naunetcorp.com>wrote:
> On 10/28/2013 01:41 PM, JD wrote:
>
> It is possible to create crap code in any language, of that I am certain. Some
> of my recent perl stuff is just a gorgeous as the highly reviewed code that
> introduced those catastrophic bugs. Being pretty does not guaranty bug-free. I'd
> submit that pretty code makes finding bugs harder ... sometimes.
>
>
> I suppose that depends on how we define "pretty".
>
> I define "pretty" as:
>
> - Following a consistent code style throughout an entire source file.
> - Using proper visual cues to indicate program flow; in languages
> where brackets are used, indentation must follow the flow as indicated by
> the brackets.
> - Functions do One Thing and Do It Well™.
> - With some exceptions (e.g., state machine implementations are a
> prominent example), functions should be limited to less than about 20–30
> lines of code, and no more than three or so levels of indentation. If
> you're doing more than that, break it apart. This makes it a lot more
> testable anyway. Put another way, functions must be short enough to be
> "obviously correct"—and should not be "clever" unless a previously
> obviously-correct and tested implementation is being optimized.
> - Speaking of testing, test, test, test. I think that testing is so
> important that I think on future projects I'm going to consider writing the
> tests themselves to be non-billable time, so that there is no objection to
> them being done. If not every line and every branch is tested both for
> success and failure cases, it's *broken*.
>
> — Mike
>
OK. Mike clearly defines "pretty" from a German perspective wheres JD does
it from an Italian perspective :-)
>
> --
>
> Michael B. Trausch
>
> President, *Naunet Corporation*
> ☎ (678) 287-0693 x130 or (855) NAUNET-1 x130
> FAX: (678) 783-7843
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>
--
--
James P. Kinney III
*
*Every time you stop a school, you will have to build a jail. What you gain
at one end you lose at the other. It's like feeding a dog on his own tail.
It won't fatten the dog.
- Speech 11/23/1900 Mark Twain
*
http://heretothereideas.blogspot.com/
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20131028/e7fdb1a6/attachment.html>
More information about the Ale
mailing list