News for hackers. Stuff that matters.
Re:Brilliant or insane code? by specialist on Sunday September 01, 2013 @04:43PM (#6312073)
claimed to be non-idiomatic

I write specialist-o-matic code. Lotsa DRY, composition, iterators, "fluent" APIs.

Makes me an unapologetically poor general purpose pair programming partner.

terse and clear at the same time

Concision is a virtue.

Re:Brilliant or insane code? by methodin on Sunday September 01, 2013 @10:43PM (#6313207)
I think the problem with terse and clear is that, typically, it solves the problem elegantly only in the exact current context in which the code is written. Meaning, as the software progresses, that previous elegant, perfect, concise code is rendered invaluable. In such cases, due to the size of the codebase, it becomes easier/necessary to work around that previously elegant code in the form of if blocks etc... which inevitably leads to crap code.

At least, that is my experience in the world of web-based programming. Scripts and other single-purpose code implementations are another case entirely.

Re:Brilliant or insane code? by adrianN on Monday September 02, 2013 @04:20AM (#6314049)
I think what you're talking about is a different problem. Terse and clear code that solves precisely the problem it means to solve is a good thing, provided the overall design of your system is flexible. If you design the proper components for an adaptable system, making each component terse should make maintenance simpler.
Re:Brilliant or insane code? by rhizome on Sunday September 01, 2013 @07:35PM (#6312666)
Concision is a virtue.

Can be.

Re:Brilliant or insane code? by jfoutz on Sunday September 01, 2013 @08:56PM (#6312916)
Concision is as short as possible, but still conveys the idea. If you don't get the idea from a piece of code then the code is not concise. It's just short. Concision is a virtue.

Or do you mean there's some value in redundancy? I'd be interested in an example. Even java added the <> to avoid the repeated template parameter,

    Foo<Things> x = new Foo<Things>();
becomes

    Foo<Things> x = new Foo<>();
Re:Brilliant or insane code? by luikore on Monday September 02, 2013 @02:10AM (#6313671)
You can just use projectlombok.org and

    val x = new Foo<Things>();