---
# System prepended metadata

title: Questions to old Dev

---

# Questions to old Dev

##### Why did you rewrite the App?
- There was 0 documentation.
- Old version was using Bloc incorrectly. They used bloc initializaiton in the build method :D. Funny bugs were then happening. State was resetting and so on...
- Huge number of unnecessary abstractions were also present.
- Server side was in Java and this guy must have done the frontend as well :D
- Source was very messy. He rewrote it in 300  hours.

##### Why did you leave the project?
- Better to ask Patrick. Some details do not depend on him. 
- Patrick is a nice person. Nothing bad between them. 
- There were some issues outside of them. 
- He just relocated to Australia and got some good offers there as well. So makes more sense. Maybe even joins Google.

##### How does the sync work. Especially the down sync and this special **index** number
- If something was deleted it stays deleted.
- Also told us the timer is not needed. Obervables are better as I also assumed.
- Something about direct access to boxes from UI is bad for him.
- Server keeps the list of lists of changes and the index of it uploaded. Index is a version number of the data.
- It's not possible to get all goals from the list of lists on the Server. Server needs to refactored with a hashtable. Or we just normalize the data into separate tables/collections and store the version index number alongside them. Then we should be able to query for everything that is new and should still be send out to the client. And when we update data, updates would also be consolidated and we are sending every little change back. Only the latest version of a specific entity.
- **We have to comment out the consent check maybe for the 500 error**
- Downsync really is one giant list right now that looks at all lists of lists and takes out all changes and puts them into one giant list.
- Hive key is randomly generated and stored in secure storage.

##### How did you want to scale with Hive? Some widgets seem problematic because they just load all data from a box and filter
- The user generated data is not so much. It's below 1000. Even skills are just 200 something. So when there are not that many entities it's not a problem to filter in Dart. 
- Only for 10+ thousands or more he would consider a real database. If we get a big entity then we could store an index manually.

##### Do you have a list of known bugs?
- No.
- Is new for contentful items is not working. He forgot to fetch the timestamp from Contentful. The item is new if the last update date is within 2 weeks.
- Source code has some comments that still need attention.
- Richtext with links in explanations. In the new version this doesn't work (clicking the link).

##### Is there anything left in the old app to move?
- Sounds like it and we have to compare on our own...

##### Random stuff from him
- Old PDF generation logic was copied over. For that he had to also use same names and IDs or something.
- Contentful pages must have a deleted flag to true and not really delete
- Contentful content should create a full JSON snapshot and this should then be synced from our server directly.
- 2Factor is right now just a one time email validation.
- If you change the email it validates the old email again but not the new one ...
- If a new consent was not accepted, there is a mandatory popup and the user cannot do anything until accepted.
- The old Developer before him was basically complete trash. He asked simple Flutter Questions and he couldn't answer them ...