I think the meat being more prominent in the second one is subjective. If I were writing a method to do something like this with ifs, I would handle the edge cases first and return early from them. The meat would be what's left after the edge cases. So this lines up with the first form.
I see so many educated people not realising this. The maths involved is something we learnt in ~ 5th grade, and I distinctly remember doing exercises on marginal rates in primary school in maths class. It's even simpler than compound interest - which is a staple of maths class later on.
Yet so many people say there's a problem with the education system that it doesn't teach practical skills like these. It clearly does, kids just don't remember it. Maybe it's because they don't need to use this knowledge until almost a decade later.
triarius
joined 1 year ago
Yeah I got it last after reading the article. Was more commenting on the inadequacy of the summary. Then again, the summary was so confusing that it made me read the article...