News for hackers. Stuff that matters.
Re:Please do not attempt to simplify this code by war1025 on Thursday December 27, 2018 @10:47PM (#18774766)
A technique I use quite a bit is to group functionality within a method using `#{` and `#}` to bound the code doing the thing. It gets you the "grouping" idea of lots of methods, but if the code is only used in one place, there is no reason to pull it out into a method.

Something like:

  #{ Parse input parameters
  .... <several lines of code here>
  #}
Re:Please do not attempt to simplify this code by spockz on Friday December 28, 2018 @06:24AM (#18776171)
I like this idea and will try to apply it to our code. Why do you prefer it over splitting the code out in a different method? Is it so you can read everything in one glance? If so, an ‘inline’ feature could be added to IDEs to show definitions inline.

Also, when using applicative or Monadic style programming there is little reason not to split things of in small separate functions and chain them together in the right order.

Re:Please do not attempt to simplify this code by war1025 on Friday December 28, 2018 @11:20AM (#18777625)
Yea, it probably doesn't make sense for every coding style. I just find that if I split things apart too much it turns into spaghetti that I have to try to weave my way through to understand what's going on.

There are definitely places where it works out really well though.