Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarity on Starter Flow chart #393

Closed
ramink opened this issue Dec 22, 2024 · 29 comments
Closed

Clarity on Starter Flow chart #393

ramink opened this issue Dec 22, 2024 · 29 comments

Comments

@ramink
Copy link
Contributor

ramink commented Dec 22, 2024

Hi,

First of all, I appreciate this awesome resource! I wish you every success with it.

I'm just looking at it, considering adopting it as my framework and looking at the "Making a sourdough starter" chapter, flowchart 1 looks slightly off to me. Surely, the "Is good?" decision should come before feed and discard? Once we've done the feeding, it seems that the "is good" assessment is difficult to make.

Edit: Some further comment after reading section 3.3. Again, I'm a bit confused about the assessment step seeming to be after feeding, which again, seems to get in the way of assessment. Am I misunderstanding?

Thanks!
Ramin

@cedounet
Copy link
Collaborator

I see what you mean… would circular arrows like of 4 and 5 help? Or better if you hand draw one as you understand it should be we can discuss.

@ramink
Copy link
Contributor Author

ramink commented Dec 22, 2024

Yes, that's a good idea. Here's what I think is being suggested in the book, for creating your initial starter:

  1. Start with a fresh mix of 50g flour and 50g water. Wait 24 hours.
  2. Check if the starter is ready to be used
    +-- 2.1 Assess whether it is bubbly, grown in size, has vinegary/yoghurty smell
    +-- 2.2 if all of those conditions are met then it is ready for use, go to step 4
    +-- 2.3 if you have fed the starter ten times already, your starter is spoiled, discard everything and go to step 1.
    +-- 2.4 the starter is not ready yet, proceed to step 3
  3. Discard Excess and Feed starter
    +-- 3.1 Discard all but 10g of your starter
    +-- 3.2 Mix in 50g of flour and 50g of water
    +-- 3.3 Wait 24 hours, then go to step 2
  4. Final Prep of Starter for use in Dough
    +-- 4.1 Discard all but 10g of your starter
    +-- 4.2 Mix in 50g of flour and 50g of water
    +-- 4.3 Wait 6-12 hours, then go to step 5
  5. Prepare Dough

I haven't read beyond this, so I don't know how you suggest the starter is incorporated into the dough prep. But with the above outline, which I know is cumbersome and repetitive, I want to make sure I'm understanding the process, correctly. Once I have that understanding, I will try to simplify it to a simpler flowchart.

By the way, it looks to me like flowchart2 is incorporating decisions that have to do with maintenance. I have excluded such decisions from my above outline deliberately. I think it makes sense to keep things simpler at the beginning to help understanding.

@ramink
Copy link
Contributor Author

ramink commented Dec 23, 2024

So based on the above, here's a sketch of what might work as a flowchart. I've left step 4 above out, as it can be considered part of Prepare Dough.

starter

As an improvement I would use something like asterisks and footnotes to link the details to the relevant steps.

@cedounet
Copy link
Collaborator

Nice! Will let Hendrik review…

foonotes in TiKZ looks like a lot of trickery https://tex.stackexchange.com/questions/564492/how-to-add-a-footnote-in-a-text-inside-tikzpicture-in-latex

@hendricius
Copy link
Owner

@ramink great suggestions - thanks for opening up the issue here.

image

We could move all of this into the respective entries in the chart too, or? Would make it a bit easier. But I agree - the overview is really nice.

@ramink
Copy link
Contributor Author

ramink commented Dec 30, 2024

Thanks for your consideration! I have now read further into the book, and I would make the following improvements to my proposal:

a) it will increase clarity if we split the final position from "Dough Prep or Starter Maintenance" to another choice "Do you want to start bread prep now?" with the "yes" choice going to "Dough Prep", and "no" going to "Starter Maintenance".
b) I now see that there are several discrepancies between this flow chart and some of what is said further in the text. For example, there are different recipes for the feeding mixture, depending on the starter type being targeted. Also, in the text it says that some people take up to 20 feedings to get to their starter. So the limit of ten feedings in the chart is not correct.

Of course, there are many ways of resolving the problems raised in b). My vote goes for choosing the most sensible starter (the stiff starter seems to be the recommendation in the next section) and going specifically for that, but also clearly labelling the flowchart as targeting that type of starter. There could be mention somewhere of what adjustments need to be made to the flowchart for other starter types.

Another option that's worth considering is to go the other way completely. ie make the flowchart apply to all starters, but put all the variable parts in a table that accompanies the flowchart. I can mock one up if you don't know what I mean.

And finally, yes, I think the other flowcharts could be improved too. The starter readiness one doesn't really make sense. Would you like me to propose some improvements to them too? If so, in new issues, or in this one?

@hendricius
Copy link
Owner

@ramink

a) Sounds like a good idea, feel free to suggest something. We could improve the text in that case.

b) I recommend people to try again if it is still not there after 10 attempts. Some people keep testing with 20 attempts, but it is not recommended. My default recommendation is always to go for the 1:1 starter initially and get that ready. Then you can fork your starter and proceed with either the liquid or the stiff route. The higher hydration also helps to establish bacteria which will lower the pH relatively fast and thus make the mixture food safe faster.

Not sure if I understand the one big flow chart as you suggest, feel free to suggest something.

As you prefer, but I'd probably open up one issue per unclear flow chart and we can take it from there.

Thanks a lot for your thoughts and improvement ideas.

@ramink
Copy link
Contributor Author

ramink commented Dec 31, 2024

Thanks for clarifying. Here are my updates:

a) This has the extra logic at the bottom, and I've rearranged the flow for better aesthetics.

starter v2

b) based on your response, it's clearer to me now that the intent is to have a single recipe for creating a starter (always the regular kind), so what you called the "big flow chart" is not really needed. For what it's worth, here's what I meant:

starter big chart

@ramink
Copy link
Contributor Author

ramink commented Dec 31, 2024

And, finally (I hope), after reviewing the Placement of Diagrams issue, I see that it would be better to keep the flowchart as minimal as possible, so I'm offering this:

starter v4

@ramink
Copy link
Contributor Author

ramink commented Dec 31, 2024

Please note that the critical difference compared to the version currently live is how "Is it Ready?" comes before feeding.

@cedounet
Copy link
Collaborator

cedounet commented Jan 1, 2025

I do like that, again would have not occurred to me to compare size after feeding but I somehow get how somebody would think that this is the way to go.

I like the idea to experiment with smaller nodes and a table explaining details, not sure when I will get to it but I am more than happy to help you submit a PR for it, TikZ is not as scary as it looks and the documentation is awesome.

thanks

PS: if you go ahead remove the arrow from discard and start over to start… that’s not needed.

@ramink
Copy link
Contributor Author

ramink commented Jan 1, 2025

I'd be willing to put I the time to learn TIkZ, but I don't have access to a linux box at the moment. Would someone be able to spare a login for me somewhere? All I'd need is a container, say, that has ssh access enabled and I only need to be able to build the html output from the project to some random place where I can view the results.

@hendricius
Copy link
Owner

@ramink I think it looks great.

On which OS are you? I personally use the docker version myself, I am on Mac OS. Just install docker for desktop on your computer and then in the root of the project run: make website. That should build you the website. Sometimes I do run things to clean up old files make mrproper && make && make website.

This should work for all OSes 😎

@ramink
Copy link
Contributor Author

ramink commented Jan 1, 2025

I am on a Mac, so I can probably do that. I haven't used docker on the Mac in a few years, but what you described sounds quite straightforward. I'm sure I'll have questions once I get started (maybe tomorrow). But thanks!

@cedounet
Copy link
Collaborator

cedounet commented Jan 1, 2025

@ramink not sure you need to learn TikZ for the prototype… if you match node sizes, Colors and fonts in the graphical tool you are using it should be enough for a fair comparison.

if you decide to go TikZ then makefile has faster way to just build the flowcharts, no need to wait ages for the entire website to build. Let me know when you get there…

I am not clear why it doesn’t run natively on macOS and you would need docker but somehow I had issues 😞

@ramink
Copy link
Contributor Author

ramink commented Jan 2, 2025

I have docker installed and successfully did a make website. I tried tweaking a fig* file and yes, rebuilding takes a long time. If there's a faster method, do share, please!

@cedounet
Copy link
Collaborator

cedounet commented Jan 2, 2025

Great !

say you modify fig-Dutch-oven-process.tex I think you can try make fig-Durch-oven-process.pngwill create an image with the flowchart… at least it should.

@ramink
Copy link
Contributor Author

ramink commented Jan 3, 2025

Thanks! I tried make fig-starter-process.png in the main, book, and website dirs and it didn't work.

It looks to me like some intermediate target is needed in the main makefile that will run the right command within the container. I tried $(DOCKER_CMD) "cd /opt/repo/book && make fig-starter-process.png" and that's not quite right either. Any insights? I'd rather not spend my time deciphering the Makefile.

Also, in case it's relevant, I note that the image on the web page is an svg, not a png.

@ramink
Copy link
Contributor Author

ramink commented Jan 3, 2025

Here's what I have so far. If you have some ideas on how to handle the sidebar within the flowchart, let me know. So far, I'm suspecting it would best require delving into pgf rather than pure TikZ.

book3x

@cedounet
Copy link
Collaborator

cedounet commented Jan 3, 2025

thanks @ramink

You were right there was some code rot in the png generation... I created a branch for you so you can have examples
https://github.com/hendricius/the-sourdough-framework/pull/new/tiks_quick_debug

you can now run make figures/fig-starter-process.png or the equivalent in docker and that will create a png... much to my surprise the pdf to png isn't that fast

The other option is to use the mwe.tex I added as well lualatex mwe.tex will create the pdf with just that flowchart (or all the one you wanted) I would recommend to work on the pdf this way you can see if it fits on the page or not. The website will take care of itself. Note that to reduce compilation time I did not include the entire sourdough.sty so packages might be missing for some other flowcharts, juts add them.

last there is a mod in that branch that shows how to add text on the side (I suppose this is what you call sidebar?), not clear what you call pgf/pure TikZ ? The latter is a programming layer on top of the former, I never tried to bypass it.

Last, main thing to take care of is that it fits in an A4 page... which is why I think pdf is best and why I use mwe.tex. YMMV of course. After that if the height is too big it will never land where you want it in the page, so shoot for squarish or H/W <1 as much as you can.

Hope this helps,

C/

@cedounet
Copy link
Collaborator

cedounet commented Jan 3, 2025

ok that is interesting... I just checked on MacOS for you (native not through docker)

@echo "\\\begin{document}" >> [email protected] is needed on MacOS while what is in the makefile works just fine on linux... (same goes for \end{document} a few lines below. I need to think how to make that portable.

@ramink
Copy link
Contributor Author

ramink commented Jan 4, 2025

Thanks! I can confirm that's working for me, and thank you for throwing in the sample sidebar as a starting point.

@ramink
Copy link
Contributor Author

ramink commented Jan 4, 2025

Thanks again for the updated makefile. It made iteration much faster.

After a lot of experimentation with various layouts, and aiming for compactness, I've ended up somewhere quite similar to the starting version, but smaller still, and addressing the points in this issue:

Screenshot 2025-01-04 at 6 52 58 pm

I've added arrows.meta to flowcharts_tikz.tex so that I can use the "Latex" style of arrowheads, which I think are more suited to flowcharts.

Remaining issues:

  • Layout is inconsistent between PDF and web versions. I wonder if this is an issue of units? Should we be using points or ems or something like that instead of cm?
  • The top of the decision diamond is clipped. This is true in the old version too. Do we know of a way to fix this? A hacky way might be to add a transparent items above the diamond, for instance.
  • A bit of padding would also be nice between the Details box and the Flowchart title.
  • I would like to experiment with the Details box being left-justified, but I can't figure out how to do it. Any suggestions?

A simplified version of the code for the Details box is as follows:

\node [shape = rectangle,draw] {
    \begin{tabular}{c}
        For the Initial Mixture, ... \\
        To  Feed the Mixture, ... \\
    \end{tabular}
};

@cedounet
Copy link
Collaborator

cedounet commented Jan 5, 2025

it looks great… thanks a lot

Thanks again for the updated makefile. It made iteration much faster.

You are welcome

I've added arrows.meta to flowcharts_tikz.tex so that I can use the "Latex" style of arrowheads, which I think are more suited to flowcharts.

That’s good, I seem to remember the one we had were
A bit thin… was that your concern?

Remaining issues:

  • Layout is inconsistent between PDF and web versions. I wonder if this is an issue of units? Should we be using points or ems or something like that instead of cm?

I never noticed that, will have a look.

  • The top of the decision diamonds is clipped. This is true in the old version too. Do we know of a way to fix this? A hacky way might be to add a transparent items above the diamond, for instance.

again… never saw it. Now can’t unsee it. Not saying thank you on this one 🤣. I suspect the solution is to lower the first one a little then diamond will not overflow?

  • A bit of padding would also be nice between the Details box and the Flowchart title.

that should be ok to do.

  • I would like to experiment with the Details box being left-justified, but I can't figure out how to do it. Any suggestions?

have you tried \node[align=left] ? If you share code this is easier to make suggestions…. Best you make a PR (if you haven’t already)

some comments:

I think it will be better to use an array (which was my example) this way you can vertically align several fields

Use siunitx I.e. \qty{5}{g} will be easier for it to be consistent

Use \emph{and} not bold to emphasis the text.

great work once again!

@ramink
Copy link
Contributor Author

ramink commented Jan 5, 2025

Oops. Sorry, I didn't see your response, and I kept editing my message after you had responded. It doesn't matter much if you missed a few tweaks (including code sample) and some iterations. You probably caught the main points.

I've added arrows.meta [...]

That’s good, I seem to remember the one we had were A bit thin… was that your concern?

The arrowheads are hard to see unless you're squinting. The flow of the diagram is much clearer with these, I think. Feel free to switch back, though!

  • The top of the decision diamonds is clipped. This is true in the old version too. Do we know of a way to fix this? A hacky way might be to add a transparent items above the diamond, for instance.

again… never saw it. Now can’t unsee it. Not saying thank you on this one 🤣. I suspect the solution is to lower the first one a little then diamond will not overflow?

I tried that. I suspect that whatever part of the pipeline that is generating or cropping the images is incorrectly figuring out the bounds. Moving the elements up (I added yshift=1cm) ends up with the same problem because it just cropped it at the new shifted location.

  • A bit of padding would also be nice between the Details box and the Flowchart title.

that should be ok to do.

This is a similar issue to the cropped diamond, and I don't know how to solve it. I would be tempted to add a transparent thing below and hope the cropping takes it into account. Or it would be a layout thing outside the flowchart.

  • I would like to experiment with the Details box being left-justified, but I can't figure out how to do it. Any suggestions?

have you tried \node[align=left] ?

I did try that, and a few other things. I couldn't get anything to work. I do think it will look better left-justified, but it's not super urgent.

Use siunitx I.e. \qty{5}{g} will be easier for it to be consistent

I have done so. Thanks!

Use \emph{and} not bold to emphasis the text.

I have switched. I know this is more correct, typographically, but visually, it's harder to notice. Compare the version in my previous comment to the one in the PR. Anyway, it's not my show, so I'll leave it up to you folks.

thanks!

I have submitted a PR. Please tell me if I should have done something different (eg link it to this issue somehow).

@cedounet
Copy link
Collaborator

cedounet commented Jan 5, 2025

Can you please make a PR to the tiks_quick_debug branch instead? this way we can work on it before attempting to merge to main.

At least I can see your code now so that is good.

@cedounet
Copy link
Collaborator

cedounet commented Jan 5, 2025

@ramink :

  1. I did a code review of your PR
  2. I added new commits to the branch to show you how you can left align (2 ways) mwe will now build both old and dew flowchart so we can compare.

Font is defo too small in the details and \emph{} not working out as I expected... I might give it another go later, but if not you have examples.

@cedounet
Copy link
Collaborator

cedounet commented Jan 5, 2025

@ramink I added another example how I would have done it.. for inspiration only 😸

@ramink
Copy link
Contributor Author

ramink commented Jan 20, 2025

I think this is all settled, right? Thanks for responding to the request!

@ramink ramink closed this as completed Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants