News for hackers. Stuff that matters.
Re:I Have a Dirty Secret. I’m a Software Craftsman by CameronNemo on Sunday April 23, 2023 @02:32PM (#35679155)
Yeah line count is a hard metric to evaluate. Is your code 100 lines of code like this:

    let foo = Foo::new()
        .with_bar()
        .with_baz(bak, bat)
        .listen();
Or code like this:

    for f in in foo.iter() {
        if f == 1 || f > 9 || f % 2 == 0 || is_edge_case(f) {
            ret.push((f * 100).to_string());
        }
    }
Makes a big difference for readability. If you have a complicated conditional, go ahead and give it a name!

There are no comments on this comment yet.