News for hackers. Stuff that matters.
Re:Erlang/OTP 24 highlights by travisgriggs on Wednesday May 12, 2021 @10:24AM (#27130669)
> there are still 260k lines of code added and 320k lines removed

So a net reduction of 60K lines of code? And yet functionality was added to the system as well. That's praiseworthy IMO.

Imagine if "we did more with less" infected much of software development today.

Re:Erlang/OTP 24 highlights by nullgeo on Wednesday May 12, 2021 @12:07PM (#27131906)
Recently I read somewhere that writing long prose is easy but writing something succinct takes way longer. I think that translates to writing code as well.
Re:Erlang/OTP 24 highlights by bwanab on Wednesday May 12, 2021 @12:48PM (#27132374)
“ I only made this letter longer because I had not the leisure to make it shorter.” Blaise Pascal
Re:Erlang/OTP 24 highlights by ijlx on Wednesday May 12, 2021 @06:49PM (#27136116)
Ironically that's quite a pithy statement.
Re:Erlang/OTP 24 highlights by bananabreakfast on Wednesday May 12, 2021 @12:32PM (#27132194)
Brevity is the soul of wit.
Re:Erlang/OTP 24 highlights by hinkley on Wednesday May 12, 2021 @06:12PM (#27135765)
Laziness is the father of efficiency.
Re:Erlang/OTP 24 highlights by deeviant on Wednesday May 12, 2021 @12:31PM (#27132180)
Imagine if we had a metric of "how easy is the code to understand and work with" rather than "can we do it with less lines of code".
Re:Erlang/OTP 24 highlights by hinkley on Wednesday May 12, 2021 @06:13PM (#27135782)
I think that's where people swing back to DAMP, or at least the rule of 3.

I'm not trying to fractally compress my code. I'm trying to make it succinct. Those two things are very different. Now if I could only convince a particular coworker of that...

Re:Erlang/OTP 24 highlights by pdimitar on Thursday May 13, 2021 @07:27AM (#27140898)
I think every good programmer has these rules of thumb, from most important to less important:

1. Make it so you'll understand it in 2 minutes after being away for a year. Positive side effect: it's very readable for your colleagues.

2. Make it brief.

3. Make it fast.

4. Make it pretty (although often times readable + brief code is pretty but obviously it's subjective).

Re:Erlang/OTP 24 highlights by all2 on Wednesday May 12, 2021 @05:41PM (#27135481)
I've gotten to a place where I start with a sketch of how I think my code ought to be used and then work backward into the implementation.

So far I've gotten a lot of pushback from others on my team. And, what starts as "oh, you should just have to ____" gets really messy as the implementation takes shape.

Re:Erlang/OTP 24 highlights by pdimitar on Thursday May 13, 2021 @07:29AM (#27140912)
So test-driven development (where you write the user -- the test -- first, and then the implementation)?
Re:Erlang/OTP 24 highlights by all2 on Friday May 14, 2021 @04:02PM (#27159076)
I think so, yes. But I start "before" the test? I write a use-case. Almost a user story, but in code. Sometimes I add comments inline with the code to try and sort out what abstractions are useful.
Re:Erlang/OTP 24 highlights by pdimitar on Friday May 14, 2021 @04:06PM (#27159109)
Still TDD, this could fall under the use of Cucumber where the integration test DSL reads almost like English.

So kudos to you for using good practices.

Re:Erlang/OTP 24 highlights by watermelon0 on Wednesday May 12, 2021 @02:18PM (#27133437)
Those two are not exclusive.
Re:Erlang/OTP 24 highlights by CRConrad on Thursday May 13, 2021 @03:51PM (#27146531)
> So a net reduction of 60K lines of code? And yet functionality was added to the system as well. That's praiseworthy IMO.

Yup.

> Imagine if "we did more with less" infected much of software development today.

Taken to its logical conclusion this should mean that the ultimate piece of software, that does everything and does it perfectly, is 0 LoC.

Hmm, fells like I need to check my logic here...