Live data from Hacker News

Linus Torvalds: 'I Do No Coding Any More'

linux.slashdot.org

71–80 of 246 posts

Re: Linus Torvalds: 'I Do No Coding Any More'

#71

> commit messages to me are almost as important as the code change itself This is high on my list of code craftsmanship points. It's very difficult to explain to young programmers who have never worked on an old code base how valuable this is when done well. In fact, often you hear complaints about how a code base "is crap", but more often than not I'd wager this is just a result of the context at the time not being…

This so, so much. Too many people think that commit message is to explain HOW you did something. Unless you did something extremely clever (and in any commercial project, 99% of clever solutions are wrong - simple is the king), it should need more than few words. WHY you did it this way is the most important part. Given known and understood set of constrains, a lot of engineers will come up with similar solution, or…

>Too many people think that commit message is to explain HOW you did something.

>WHY you did it this way is the most important part.

What was done is better suited for the commit message than how and why it was done, in my opinion. The latter two are better explained by comments in the code. I agree that why something was done is important for future reference, but when I'm tracking down code changes I'm looking for hints of the change itself. Understanding why comes next once you have the commented code in front of you to reference.

Re: Linus Torvalds: 'I Do No Coding Any More'

#72

> commit messages to me are almost as important as the code change itself This is high on my list of code craftsmanship points. It's very difficult to explain to young programmers who have never worked on an old code base how valuable this is when done well. In fact, often you hear complaints about how a code base "is crap", but more often than not I'd wager this is just a result of the context at the time not being…

Yeah, but 99% of projects aren't anywhere close to long lived. Most products fail to launch. Most products that launch shutter within a few years. Having a code base survive long enough in close enough to its original state for a commit message to be meaningful a year later is unlikely outside of a few cases. Also, this is all predicated on the business case for the software being well understood that it could be wri…

Short-term coding practices produce short-lived code.

Predetermining code longevity is challenging.

Re: Linus Torvalds: 'I Do No Coding Any More'

#73

Earlier quoted context omitted.

This is what I don't like about open source, it seems to encourage these sort of behaviours.

Open source itself does not encourage that kind of behavior, it's just there are a lot of arseholes developers like in any other area and because it's much more transparent you can actually see the toxic discussions. But that depends on the project, it's not fair to say it's connected to open source

[deleted]

Re: Linus Torvalds: 'I Do No Coding Any More'

#74

> commit messages to me are almost as important as the code change itself This is high on my list of code craftsmanship points. It's very difficult to explain to young programmers who have never worked on an old code base how valuable this is when done well. In fact, often you hear complaints about how a code base "is crap", but more often than not I'd wager this is just a result of the context at the time not being…

Head of Engineering with 15 years of experience here.

If found that when we starting using Github flow, with pull-requests and etc, commit messages stopped really matter, in favour of PR descriptions. Plus when you use "squash" strategy, and use PR description as commit message, history looks great.

When you look at commit history through Github tooling, all PR ids turned into links, and it is very easy watch for the history. Additionally you have a good integration with Github features, like discussions (which sometimes as important as description itself).

Yes it is a vendor lock-in, but lets be frank, Github most likely will survive your project.

Re: Linus Torvalds: 'I Do No Coding Any More'

#75

> commit messages to me are almost as important as the code change itself This is high on my list of code craftsmanship points. It's very difficult to explain to young programmers who have never worked on an old code base how valuable this is when done well. In fact, often you hear complaints about how a code base "is crap", but more often than not I'd wager this is just a result of the context at the time not being…

Yeah, but 99% of projects aren't anywhere close to long lived. Most products fail to launch. Most products that launch shutter within a few years. Having a code base survive long enough in close enough to its original state for a commit message to be meaningful a year later is unlikely outside of a few cases. Also, this is all predicated on the business case for the software being well understood that it could be wri…

> Yeah, but 99% of projects aren't anywhere close to long lived. Most products fail to launch. Most products that launch shutter within a few years. Having a code base survive long enough in close enough to its original state for a commit message to be meaningful a year later is unlikely outside of a few cases.

A lot of companies run code in production that was written years if not decades ago. Being able to look at the commit history and blame output helps in terms of getting some context about what was done and why it was done they way it was when the original authors have long since left the company. In my company, we still have some code written back in 2005 still running in production.

Re: Linus Torvalds: 'I Do No Coding Any More'

#76

I'm an academic (post-doc) and while I am about to transition, I've never really worked hard to get an actual tenure track position because honestly I don't want to become a grant writer who does so little actual scientific work, in all honesty. I might have to for my future's stability sake but I've been loathe to. I want to do science, not academia.

Doesn’t seem appealing to me either, but I don’t think this is Linus doing what he must to survive. He’s got a lot of options so this is presumably what he prefers.

Re: Linus Torvalds: 'I Do No Coding Any More'

#77

> So commit messages to me are almost as important as the code change itself. Why commit messages rather than code comments?

Commit messages cover the entirety of the change, and only exist in the context of the commit it is attached to. A comment is without exception outdated by the next commit, unless it is rewritten for that commit.

Re: Linus Torvalds: 'I Do No Coding Any More'

#78
post #66
post #61

Earlier quoted context omitted.

> Not written in the particular arbitrary style that I'm used to Like "arbitrary styles" such as "a function shall not be 500 lines long".

An individual function can quite reasonably be 500 lines long. A giant case statement handling routing is one example. More controversially, if I am gong to need to do a lot of ugly compatibility hacks then I prefer to consolidate them and thus keep most functions clean.

Cyclomatic complexity is one of the more well-rigorously studied measure of code quality, I don’t know if I’d pick that hill to die on.

Re: Linus Torvalds: 'I Do No Coding Any More'

#79

> commit messages to me are almost as important as the code change itself This is high on my list of code craftsmanship points. It's very difficult to explain to young programmers who have never worked on an old code base how valuable this is when done well. In fact, often you hear complaints about how a code base "is crap", but more often than not I'd wager this is just a result of the context at the time not being…

This so, so much. Too many people think that commit message is to explain HOW you did something. Unless you did something extremely clever (and in any commercial project, 99% of clever solutions are wrong - simple is the king), it should need more than few words. WHY you did it this way is the most important part. Given known and understood set of constrains, a lot of engineers will come up with similar solution, or…

I really love those useless comments in the code that state in plain english what code does but nothing more. Such a waste of space. Bonus points if offenders are using bad variable names like "var asd = fuFunc();" and instead of naming those in clear way they add comments. Like you could save memory space on variable/function names or something and those guys were not form the 80's.

Re: Linus Torvalds: 'I Do No Coding Any More'

#80
post #41

Earlier quoted context omitted.

It should be anybody's prerogative. Maybe somebody is exploring an idea and doesn't really care about maintainablity or something else.

Moreover, everyone has a different perspective of what is a maintainable codebase. Why the other one must always be the right one?

I would say that there are a fairly specific set of criteria against which you could evaluate how maintainable a codebase is. I feel most of it boils down to how many hours it takes to resolve a change request on average. Developer time is money, good developers are scarce, and if you are doing this for business reasons it's really hard to ignore this aspect as a primary driving factor.
Post reply on HN