Applied Algorithms - (01) - Undo/Redo

preview_player
Показать описание
Applied Algorithms is a series of videos where I create a small algorithm to use in an app. Algorithms are not just for coding interviews, they are useful in actual programming :) When we go from the application to the algorithm, there is a good chance we see the way it is created and tend be more useful exercise.

In this video, I've created an algorithm for undo/redo of an app with state. This is quite simple as you'd see. We select the data structure appropriate for the task at hand, and illustrate the operations performed on it.

If you have any questions or suggestions, please leave a comment.

Mindmap App:

Live Coding Twitch Stream at Every Saturday 10AM GMT

My eBook: Drawing Text on Canvas

Music:
Walking in the Sky - Nico Staf

#applied #algorithms #datastructures #coding #tutorial
Рекомендации по теме
Комментарии
Автор

So here's a new series where I create a small algorithm and use it in an app. Let me know if you have questions.

CodingwithIndy
Автор

Why do the state save BEFORE the change? There are more advantages by doing the save AFTER the change. For example, the save request could be posted to be done at idle-time if done after the change. Further, because the save is done at idle-time, more processing can be done with the current state and the previous one to optimise the states so that only relevant changes to the states are reinstated during an undo or redo operation. For example, the difference between the two states can be obtained and used later to make only the relevant changes to the program data during a redo or undo. Saving the state BEFORE the change prevents save from being done at idle-time. Also, doing the save after the change does not require an 'isDirty' variable.

velcomat
Автор

Oh wow this is great! I was JUST searching for info on how to undo and redo in Flutter the other day! Amazing! Thanks!!

jonathan
Автор

That's amazing I saw some of your videos, and it was really helpful, Thanks for sharing

abdurrehman
Автор

Thanks, Looking for a text or resource with dart applied Algorithms as a reference guide any thoughts? Looking forward to this series. Great job with the video.

hectorprx
Автор

How do I do it without removing state? So when a user undoes something and then does things, and then redoes, it goes backwards step by step..?

keplaris