7 ms·
This was actually less complicated that I had expected it to be.
by saagarjha 7y ago
This was actually less complicated that I had expected it to be.
- nickff 7y agoYes, it was something I'd never thought of before, but definitely simpler than I guessed before I clicked the link. That said, each time you add a conditional, you need to be increasingly careful about where you put it, and what other impacts it has. I would also imagine that there are a variety of other features which require similar flow charts.
- evfanknitram 7y agoYes, this is what my co-workers refer to as an if-statement.
- saagarjha 7y agoI mean, the chart is still useful to have, and it'd be a couple of methods probably had I written it. But it's not a huge state space, and most of the transitions are fairly reasonable.
- Drdrdrq 7y agoI can imagine it was quite a lot of work to come to such a clean and relatively simple chart.
- hombre_fatal 7y agoComing up with this chart from a generic ticket like "impl notifications" is one of the hardest parts of being a developer. Code is generally the easy part once you know exactly what you're doing.
- zimpenfish 7y ago> one of the hardest parts of being a developer. Not least because it's really the product designer and product owner's job to make this kind of chart.
- Drdrdrq 7y agoWhich they never do to a satisfactory level (in my experience). So it still falls on the developer to do it properly, then PO just copies it for their presentations.
- dudul 7y agoThis is not about how it translates into code. I see a lot of value in this diagram when compared to the half-assed "requirements" most PMs put in their JIRA tickets.
- sethammons 7y agoThat is my takeaway: PMs and non-developers - you must think through the entire workflow. When you don't, your engineers will and will either pepper you with questions that you are not prepared for or they will decide for you.
- dudul 7y agoI'm exactly on the same page, this is uncanny!
- JoshuaDavid 7y agoAs an engineer, I consider fleshing out incomplete workflows to be one of the largest parts of my job. I've found the technique of saying "hey, the specification doesn't mention what to do in this situation, based on X/Y/Z elsewhere in the specification / this other similar feature, I'm operating under the assumption that it should work like <description of your best guess>. Let me know if that's mistaken". Then I make sure I have a commit of the state of the code, and start building based on the stated assumption. A large fraction of the time, the PM just goes "that is correct", and the spec / ticket / whatever gets updated. When the answer is not "that is correct", you do lose out on whatever work you've done since sending that message, but writing code you eventually throw away isn't the end of the world. Also "that is not correct" responses often highlight areas where either the developer misunderstood what the PM was envisioning or the PM has a misunderstanding of what the system can do or how their proposed feature interacts with something else. For this to work, you need: 1. Some variety of asynchronous channel that the developer can push stuff into at whatever frequency they want, and that the PM periodically catches up on entirely. 2. The developer to have a working understanding of how existing systems work and the system as a whole, from the business level. 3. The flexibility to modify specifications between the initial conception and implementation. If you have all of those things, the PM doesn't necessarily need to think through the entire workflow beforehand -- it's nice if they can do that, but you can still ship working features without that and sometimes that is the pragmatic way to do it.
- paxys 7y agoAll programming is just if statements. That doesn't mean systems can't be complex.
- a1369209993 7y agoNot true; if the conditional branch goes backward then it's a (possibly do-) while statement. Also subroutine calls.
- seisvelas 7y agoCounternitpick: Those subrouting calls and while statements are compiled to conditional jmps. If you squint your eyes it's just a fancy 'if'.
- zimpenfish 7y ago"It's no use, @a1369209993 - it's IF statements all the way down!" Apologies to William James' apocryphal quote.
- adrianN 7y agoIf you're creative you can get away without conditional branches: http://www.jucs.org/jucs_2_11/conditional_branching_is_not/Rojas_R.html http://www.jucs.org/jucs_2_11/conditional_branching_is_not/R...
- paxys 7y agoIt's also like 3 years old. Would love to see what it looks like now.
- folmar 7y agoIt's like never true, it does not show that you can't get email notification faster than in 30 minutes. Also now should include adding random old stuff to notification.
- MichaelDickens 7y agoThings like notifications have pressure on them to be simple, because users want to be able to decide when they will receive notifications, which means it needs to be easy for them to understand when they will and will not receive them with particular settings. I'm sure there are examples of some non-user-controlled decisions that have much more complicated flow charts.
- lliamander 7y agoI think the example still works because, while it is not too complicated to understand, it is also non-trivial. It's also probably more complicated than the typical non-technical person would think. It's also worth mentioning that this diagram doesn't capture dataflow or the relationships between the subsystems needed to make this work. The logic for notifications requires interaction with user preferences, channel membership, comment parsing, thread management, and more[0]. All told, you may still be looking at (low) thousands of lines of code, with maybe 1.5-2x times that amount for test code. [0] I'm just guessing how the app is structured internally. I have no idea what it is actually like.