The greatest thing about working is that it qualifies you for a greater work.
Once you have done something once, you can do it over and over again – a million times over. You can decide to raise the bar, a little improvement every time you do it and then you achieve mastery over it.
These things tend to be easier said than done, true. However, it is not impossible.
I also tend to write my software programs faster if I have done some work in that area before than when I am breaking fresh ground in uncharted territory. Every project adds some new skill to the mix.
If you have worked hard at anything before, any project and felt betrayed or sidelined or cheated, do not fret. If you actually did the work, the knowledge and skills you acquired can never be taken away from you.
So, rather than getting bitter over how things turned out or did not turn out, focus on how you can derive some new value from your experiences.