> I dislike using Jira as much as anyone, mainly because it's so excruciatingly slow.
But there is no competing product (suite) that offers comparable functionality and provides the same long-term flexibilty.
This is maybe true, but the future belongs to more flexible software. Eventually Notion [1] or Fibery [2] will replace Jira. They may do it now for smaller team already (10-500 ppl), it just takes time to enter large companies.
Two of these (plus another, Price Parrot, that I forgot to include: https://sandpiperhq.com/pricing !), are spin-outs of a side-project (https://quailhq.com) that I started in 2014and that I've been working on for 7 years -- and that became my full-time job in 2021. That one definitely isn't a failure!
The five (six including Price Parrot) are just the failures from this year. I try to live by "fail fast"!
Book with a promising name, but very mixed content. Two good thoughts:
1. Modules should be deep. It is better to have fewer deep modules than more shallow modules
2. The increments of development should be abstractions, not features. When you need an abstraction, invest time and design it clearly
There are many good advices, but on my opinion the book is not deep enough to have this promising title. Also, it's a crime to spend 30 pages of 170 on how to write comments.
>Also, it's a crime to spend 30 pages of 170 on how to write comments.
I strongly disagree. Software engineering will be greatly improved, in my view, when comments are viewed with the same rigor as code. In code reviews, we've finally gotten to the point where we don't generally approve code unless there are unit tests to accompany it. Codebases will be even stronger when PRs and code reviews require inclusion of updates to the corresponding comments and docs and are examined with the same care and attention.
Important problems disappear when comments are kept in sync with the code: 1) technical debt goes down, 2) it's much easier for new devs to get on board with the code base, 3) refactoring is facilitated.
The problem is that everyone has different ideas about comments should be. Many devs prefer a minimal approach, others a very talkative approach, etc. This book is the first to lay out a systematic approach to commenting with an explanation for the preferences the author espouses. Nobody else does this to my knowledge.
Those 35 pages are gold. And if all you take from the book is a deepened appreciation for comments and a systemic approach to commenting, I contend you will have greatly benefited.
I am still in the middle of reading the book and have not read the part about comments, but so far I have yet so see good comments in source code up to a point where I have a rather biased opinion on comments:
* good software needs hardly any comments: small methods with good naming facilitate readability
* unit tests are superb documentary as every dev can see how it is used and how it works at runtime.
* meaningful documentation is hardly ever provided in source code: purpose of abstraction layers and modules, how one class/module relates to another and so on (design and architecture).
Counterpoint: API documentation. I'd rather read a high level overview of a component + its methods than have to open up and read (= decode) the contents, or trudge through the unit tests. If I'm working with it on a lower level then maybe.
Counter-counterpoint: that documentation should not exist as comments in the code, but as separate, properly formatted documentation. Yes, there are tools (JavaDoc, Doxygen, etc) which will take specially formatted comments and turn them into standalone documentation. However, in my experience, using those tools did not encourage the sort of documentation you're talking about. The average JavaDoc is an auto-generated stub article that just lists the method name and the names and types of the arguments to the method, which is information my IDE already gives me.
Counter-counter-counterpoint: if you separate that documentation out, you'll guarantee it getting stale. Good documentation needs low friction - and preferably be part of code review process, so that the reviewer can spot when code changes without updating relevant documentation.
Documenting in comments is one way to achieve this, and it also brings two other benefits:
- High locality - you're likely to spot the documentation as you read the code it pertains to, because the comments are right there, mixed with the code.
- IDE support - interface-level comments are often automatically displayed in autocomplete and hover popups, so you can read them as you browse through suggestions and highlight interesting code fragments.
> Counter-counter-counterpoint: if you separate that documentation out, you'll guarantee it getting stale.
In my experience, having the documentation in the source code has very little effect on whether it gets stale. Unless you make checking for documentation changes an explicit step in the code review, documentation is going to get stale no matter where it is. And if you do have such a step in code review, then it's relatively immaterial whether the documentation is in a wiki or in formatted comments in the source.
> High locality - you're likely to spot the documentation as you read the code it pertains to, because the comments are right there, mixed with the code.
That actually brings to mind one of my complaints about relying on documentation that's inline with the source code. It's often too local. I can usually read a function and figure out what it's doing. Occasionally, when a function is doing something strange or counterintuitive, some documentation can be helpful, and I definitely acknowledge there's a role for comment-based documentation there.
More often, though, I don't want documentation to tell me what this or that function does, I want documentation to show me the big picture. What are all the components of this system? How do they communicate? How does user input propagate? Where does validation occur? These questions are almost never answered by comment-based documentation because of the locality principle that you cite.
In addition, the answers to these sorts of questions aren't likely to go out of date. After all, it's not like you're completely rearchitecting how validation works every week (and if you are, documentation is the least of your worries). These sorts of high-level questions are best answered on a wiki or some other tool that supports things like diagrams and well formatted prose text.
Yes, in an ideal world, we'd have both. Inline documentation which documents the design at a "micro" level and a wiki or some other knowledge-base which documents the design at a "macro" level. But we don't live in an ideal world. We live in a world where developers are pressed for time, and documentation is most often written after the fact. In this world, I would much rather have the wiki than the inline docs. I can, with a little bit of effort, figure out what each individual function is doing. It's the high-level "how it all fits together" design where I require assistance.
well I prefer some high level "unit-tests" (ofc they are not unit tests strictly speaking).
or perhaps I should name them "demo cases" or the like. Currently I am deeply sceptical about formats different from source code. "demo cases" require the dev to update them when they fail where as docs tend to get stale- (nearly) always.
Even good software runs in a context. The last commit I did was just to add a comment about a specific ordering in an argument to a function call that had to be that way to compensate for a bug in the library from where the function was imported.
> * unit tests are superb documentary as every dev can see how it is used and how it works at runtime
Unit tests tell me how the code is supposed to behave given certain inputs, but without a statement of what the function is trying to accomplish I can't tell if any necessary unit tests are missing. Or if any are just accidentally working.
> * unit tests are superb documentary as every dev can see how it is used and how it works at runtime.
Those unit tests have to be derived from somewhere, though, right? Hopefully, there are requirements docs -- but often those are too high-level, or omit details that were discovered during implementation, and in those cases I'm very appreciative of comments describing intent and purpose of a code snippet or function. Of course, like all things, comments rot without active maintenance and refactoring.
In a perfect world, code comments would be redundant, but they do provide a very low-friction way of documenting interesting bits while writing the code, while it takes a lot more effort to back-port information into requirements documentation.
I strongly agree with your first two points. Good naming supplants the need for commenting.
I find diagrams a far terser communication tool of architecture than comments.
The book has an entire chapter called "Choosing Names" and another titled "Comments Should Describe Things That Aren't Obvious from the Code". Yes, good naming supplants the need for many comments, but the author goes into much greater detail about when and why comments are helpful even when you have given deep consideration into naming things.
I wish we had better tooling for showing the git blame inline like comments. I'd rather put a one line comment "read the commit log for this line" which some editor could inline or pull up quickly than litter the source with prose (but either is better than nothing).
Some code is intended to last, potentially a very long time, and has to be separable from history metadata. If for no other reason, git trees can get really big. I had a large monorepo at an old job with some code dating back to the mid 80s and it took 10 minutes to clone because of all the history. When we finally gave up on Kiln, years after its own developers abandoned it, we migrated only the code and not the history. After that, you could clone the entire repo in 10 seconds instead of 10 minutes.
They key is you want to be able to do something like that without losing crucial information. So anything that absolutely has to be there to understand what code is doing should be directly embedded in the code, that is, it needs to be a comment, not a commit message.
Except the same belief in "self-documenting code" that makes people ignore the need for comments, also makes them ignore the need for writing proper commit messages. Git blame won't save you, if every commit message is just a one-liner like "fix foo in bar".
Viewed from the other end: commit messages are essentially comments over changesets. If you write those well, you can use the same approach to write good comments for your types, functions and modules.
I am not sure who is the target audience of that book, but I think it's not practical. I respect the authors but the book has gone overboard with flexibility at the expense of good abstractions and design
Overall it's about finding new generalizations and collapse your extensive complexity by new abstraction.
For example, you build a Todo-list software (everybody does). You have requests from customers "I want to be notified 3 days before due date", "I want to be notified 1 day before due date" and "I don't need notifications".
OK, so you are adding a new setting "[ON/OFF] Notify me [X] days before due date".
Then you get feedback "I want to be notified when someone unassigned me" and "I want to be notified when someone assigns me".
OK. You're adding new setting "[ON/OF] Notify me about changes of my assignments"
Then you receive feedback like "I want to be notified about important tasks assigned to me only".
You say "Fuck it" and implement a notification engine where every user can set up own notification rules.
X notifications settings were collapsed into a new more abstract (but more complex) solution. You have to choose abstractions carefully and be aware that premature abstractization is as bad as premature optimization. This is hard.
I really liked the simplicity of your explanation and it makes total sense to me. I checked your blog and you have some interesting articles but most I can't read. I think it is time to start rescuing the insights of software engineering practitioners with several decades experience to go beyond the fads of the day. I feel that some of the old agile ideas/principles are lost in the noise. (e.g Do The Simplest Thing That Could Possibly Work)
Given a programming context we are always writing code on an abstraction layer, such a layer (which can be as granular as a language construct or a function) can accommodate features. We essentially encode our feature in terms of the given abstraction(s).
Now I didn't read the book but I immediately thought of this: If we want to provide a feature, we should think of how our abstractions accommodate the feature. Are the assumptions or the interface of the abstractions in line with the functionality, or guarantees of the feature?
A good example of this would be HTTP REST. The interface is general and has clear, well defined semantics. It is a good abstraction for the web, since every request/response cycle has a clear way of reaching possible states and resources. It accommodates new features very well if they can be encoded in terms of HTTP verbs, hypertext representation and request/response cycles.
"2. The increments of development should be abstractions, not features. When you need an abstraction, invest time and design it clearly"
Thank you for so perfectly stating a concept I have been struggling with this week. I've been messing around with trying to build a Cocoa-bindings-ish ArrayController for the browser. I was trying to build it in an incremental way feature by feature and kept running into walls. The realization I eventually came to was that I needed to look at it as a larger system and design the whole thing rather than try and incrementally code it feature by feature. Stepping back and designing the whole abstraction was how I ended up moving forward.
But there is no competing product (suite) that offers comparable functionality and provides the same long-term flexibilty.
This is maybe true, but the future belongs to more flexible software. Eventually Notion [1] or Fibery [2] will replace Jira. They may do it now for smaller team already (10-500 ppl), it just takes time to enter large companies.
[1] https://notion.so [2] https://fibery.io