Live data from Hacker News

Plotting the source code “TODO” history of the most popular open source projects

schleiss.io

91–100 of 114 posts

Re: Plotting the source code “TODO” history of the most popular open source projects

#91
post #84

Earlier quoted context omitted.

Or do both. Might as well add TODO: to make it stand out as a thing that can be improved while also making it greppable.

Might also be cool to automatically create these tickets (when commited to master?). Then you don't forget, and even if they end up not that detailed, you at least get a nice list of all of them.

One option if you're on github, https://github.com/marketplace/actions/todo-to-issue

Re: Plotting the source code “TODO” history of the most popular open source projects

#92
post #70

Earlier quoted context omitted.

While it's probably the case for postgres or Django, todos getting less could also mean high code churn.

Yeah I noticed several cases were there to do's drop dramatically. I wondered if that was because that was a module that had a lot of to-dos that was also low quality, and the subject of a complete rewrite or replacement at some point. Golang was also interesting because of a huge increase followed by an almost equally huge decrease a short time later, both of them seemingly vertical. I wonder if something got revert…

Might be some type of automation / tool adding a bunch of TODOs (as part of a migration?) which are then automatically removed in a later step.

Re: Plotting the source code “TODO” history of the most popular open source projects

#93
post #18

Just today I announced a sweep through all of the TODO's and to either turn them into issues, stories or remove them. Biggest problem in Xcode is that it clogs up the warning list and the real warnings get swamped by them. But it's funny to see that Rust has less outstanding TODO's than our brand new 45KLoC project.

TODOS are great documentation. They often reveal design decisions, suboptimal implementations and the thought process of the creator. This information is often completely lost in issues that noone will ever look at again. I also like to do TODO sweeps, but with a bias towards rewriting the into documentation or leaving them in if the are actionable.

Huh, if I add a TODO to typical code then it's something that ideally needs to be done there (e.g. "todo handle errors from invalid inputs" -- it'll work if you don't but... it's not ideal), or in LaTeX reports it's something that needs to be resolved still before shipping to the customer (e.g. "todo set \endDate variable"). Never is it a design decision or documenting my thought process. Why would that ever be labeled todo or, if you mean that todos indirectly convey that, why would having todos throughout the code as a means of conveying design decisions be "great documentation"?

"This information is often completely lost in issues" - of course, because an "issue" is "a vital or unsettled matter" and are not meant to be revisited once resolved. Writing design decisions or thought processes in issues seems equally weird to using TODOs to document that. They're kept around because it costs nothing and you might want to refer back to it for details on some past problem, but I've never heard of that being considered documentation.

Re: Plotting the source code “TODO” history of the most popular open source projects

#94

I always suggest TODO's to be replaced during a Code Review by: 1. A ticket number that will be picked up shortly if should still be part of a larger change. In a healthy team, this is done within two weeks and you know where to perform changes when you pick it up. 2. You do not add a TODO, but explain your current understanding of what is wrong and what should be done. This way you can refresh the knowledge if it ev…

I don't think I can agree with this, since some TODOs have a different target audience.

The kind of TODO you're talking about is splitting a ticket into parts so you can hit an artificial deadline (ie, it's no longer 'done done', it's just 'done'). If the artificial deadline is your boss, then we're in a bad place. If it's another team needing a feature, that's pipelining and that's often okay.

For the TODOs that make it to PR without human error, I write most of them for the next person who adds functionality to an area, to either encourage them to do so or at least not make things worse. But sometimes it's for the person who hits the Rule of 3.

Those TODO's should be addressed in six months, not two weeks, and having someone call me on them in a PR is not particularly helpful. No, I'm not going to quadruple the scope of this story because you don't like the word TODO.

Re: Plotting the source code “TODO” history of the most popular open source projects

#95
post #90

Earlier quoted context omitted.

TODO: Automatically create tickets based on TODO comments. We'll get to it. Someday.

https://en.wiktionary.org/wiki/round_tuit There used to be an ASCII art version occasionally slapped on Usenet posts: "here's a round tuit, you can go ahead."

Caption: "An artist's impression of a round tuit."

Re: Plotting the source code “TODO” history of the most popular open source projects

#96

Well, I'm glad I'm not the only one who never gets around to my //TODO#s. One related tip for devs: I've started adding "You are here" as a placemark for where I'm working in the code. So for example, on friday, if I want to pick up quickly next monday, I add "//TODO: YOU ARE HERE Finish doing foo". Then on monday, I search for "You are here" and pick up where I left off easier. Saves me a few cycles, though if I'm h…

I've been annotating my work several times a day, with `INK`, from "leave some water in the well", a productivity hack from Hemingway[0].

I forgot how I went from "Water in the well" to "ink the well", though. It's been a while since I started doing it, and I wrote a blog-post[1] with some scripts and helpers that I still use.

[0] https://www.fastcompany.com/3021905/hemingways-secret-to-mai... [1] https://berk.es/2012/05/30/leave-some-ink-in-the-well/

Re: Plotting the source code “TODO” history of the most popular open source projects

#97
post #33

Interesting that some of them don't grow, or don't grow much, over time. Someone at PostgreSQL and Django is actually reading and fixing the TODOs.

It would also be interesting to plot the number of TODOs against the size of the code base too. One would assume that as a project grows, the number of outstanding TODOs would grow too. Where and when this isn't true, might reveal something more interesting.

I bet it's more to do with rate of growth than total volume.

I believe that one of the cognitive dissonances with people who think a lot of code is good news is that they become overwhelmed by how much they would actually write if they stuck to their convictions and so they start using TODOs to make themselves feel better about doing the wrong thing.

Projects that grow slower I suspect have fewer TODOs.

Re: Plotting the source code “TODO” history of the most popular open source projects

#99
post #19

I was just thinking the other day that searching for TODO is probably a very good way to search a project for potential bugs or security issues. E.g; I see a bunch of todos in Firebase iOS SDK that look kind of interesting to an attacker. Without looking into how the methods are called I can't say if they are actually exploitable (and I am sure Firebase is fuzzed to high-hell) but it was a little seed planted in my h…

Am security tester. Can confirm.

Sometimes the vulnerabilities are just handed to you on a dark-themed platter and I don't look them in the mouth.

Re: Plotting the source code “TODO” history of the most popular open source projects

#100

Is it controversial to say that those with low TODOs are pretty clearly the cleanest packages I enjoy working with most? (Postgres, Rust, Django, VueJS, maybe Python)

Use and semantics of TODOs are decidedly not consistent across these projects. Just because you (and I) see correlation with our expected biases shouldn't be construed as proof: merely interesting chart wiggles. I think the shape (monotonic increase or sawtooth) can be used to see how a project handles either missing features of technical debt.

But if the semantics speak to project philosophy differences that result in a worse or better experience, then it is important that they don't have the same semantics.
Post reply on HN