News for hackers. Stuff that matters.
Re:Programming is terrible – Lessons learned from a life was... by MichaelGG on Sunday March 15, 2015 @06:07PM (#9208397)
Perhaps if you have a poor definition of utility code. Sure if you spend all your time writing random string functions or a new web framework or whatever. But that's sorta tautological: writing useless code is useless and bad.

I often find bottom up coding to be fantastic. I'll start with a general idea of what I want to do, then start writing low-level "helper" functions. Like "save image to blob storage", "perform search against remote API", "normalize search result into our document type", etc.

When I get around to tying it all together, if I've done it well, I find that hey, my "main" function is only 5 lines long as I've built up all the primitives I need.

And sometimes the reverse works, too, where I start off writing main and end up with a 1000 line function with lots of nested bits. Then go back over it and start extracting parts/structuring.

Like many things in software creation, this is one of those "artistic" or "creative" or "intuitive" parts where the developers internal heuristics and experience hopefully guide them to the right approach. Not to say it should be that way, but that seems to be a big difference between good and bad programmers, and I've not seen really hard, structured, learning approaches to teach the difference.

Re:Programming is terrible – Lessons learned from a life was... by glogla on Monday March 16, 2015 @02:15AM (#9210117)
I have heard the expression that wiring bottom-up is "building a DLS for your problem".

That would explain why we don't see a lot of it in the Java world and therefore why "traditional developers" think it's useless - first, creating DSL may need stronger language than Java to be practical, and second, most of the DSL is already done as parts of Spring or JEE.

Re:Programming is terrible – Lessons learned from a life was... by MichaelGG on Monday March 16, 2015 @08:04AM (#9210961)
Ha! All this time I thought DSLs were more, well, languages. More flexible syntax, or at least differently behaving functions or operators. Like some of those fluent APIs (usually not a fan), or test frameworks love to do. I'd not thought of just regular domain functions to be a DSL.

I'm curious though, what do you mean that Spring is the DSL? Certainly that's the opposite, being so generic?