- Published on
Major Planda Bugs log
- Authors
- Name
- Christina Yang
Some notable issues I’ve dealt with. Sorry this is such a mess:
Drag and drop (Summer 2022)
After leaving fullcalendar, I had high expectations for drag-n-drop. I wanted, needed it to be smooth. Ended up using a combination of two styling libraries, dnd-kit and react-rnd. Took me like 2-3 whole weeks to figure this out, was a lot more difficult than I initially expected, but it is so crucial as one of Planda’s goals is to be intuitive to use
NoSQL database struggles (DynamoDB)
My data is quite relational, but NoSQL is so much cheaper, so I’ve had to just deal with it. I’ve actually found I really like database design, hopefully I’ll get to do more of it in the future. I still haven't figured out the best way to query for tasks by start and/or end dates, since dates aren't necessary, and change often, so I don't keep them in keys. Maybe a GSI in the future though, we'll see. So much wasted dates if only query by one, but that’s all I can do with DynamoDB database Worked with TTL with some other projects, but too scared to use it for Planda. Especially since I’m not currently backing my tables up, which is bad I know.
Single table design?
My dad says it’s unrealistic. I'm starting to agree more and more now, but honestly, even if putting more items in one table means larger item sizes due to adding prefixes, I at least don't have to manage multiple tables. I have a lot of utilities I've written for making creating api's easier, and storing most of my data in one table makes it easier to make these utilities. I'm just one person, so having many tables is a bit harder to manage myself. If I had terabytes of data, and more complex use cases involving Dynamodb Streams (which I actually do use, but need to remove), more GSIs, TTL, etc., I would definetly use many tables, but I just don't have that much yet.
Working with dates
Timezones, bleh Daylight savings is even worse. I finally fixed daylight savings for Planda through my library event-cron-parser, by adding allowing a start date for crons, and making the daylight savings timezone relative to that. Thank goodness for date-fns, it’s saved me a lot of time.
OAuth
Using next-auth now, but have spent so much time trying to figure out how to do more custom types of auth. What I’ve found is that there are so many security concerns, that you pretty much can only do what they give you. Trust me, I’ve even tried forking next-auth, still didn’t figure it out. Or don’t, because I’m sure it’s still possible. I know I’m lacking a lot of open-source and dev experience in general. I remember oauth took me a long time to learn too. I am so glad I didn’t go with AWS Cognito, which was what my dad told me to do. Now he’s working with Cognito and he says it’s terrible. Serves him right. (Kidding) Trying to figure out how next-auth will translate to working with auth in mobile. I want the app to redirect you to planda for sign in, but haven’t figured that out with React Native yet (haven’t had time to deal with it mostly)
Cross-browser compatibility
Still an ongoing struggle Windows doesn’t hide scrollbars like mac does, and I’ve still been unable to solve the inconsitencies that arise because of it.
AWS CDK + codepipeline
Takes forever to debug. I have deleted so many stacks and recreate them Initially my infrastructure was made manually, but I switched everything to CDK this summer. It was extremely time-consuming. The funny thing is I’ll use the exact cdk code I’ve used for a different project, but every time I reuse the code, something will not work. Sometimes AWS change’s defaults I’ve found. Also version updates for everything just come out so fast. ECS gets stuck on Codepipeline sometimes, and now I know to reduce the number of desired tasks to 0 when that happens, but boy the amount of time I’ve spent struggling with the pipeline failing to rollback, stop updating, or delete because of this. ECR permission errors. This is the most confusing thing ever. I’ve pretty much learned that when I get this, it’s probably not an ECR permission thing. Maybe I’m going over my memory limits. Maybe I have to delete some old task definitions (dunno why this works sometimes). Maybe it’s even some Cloudwatch IAM permissions thing. I still am not sure how to deal with it, I keep muddling through this, and sometime random will just make it work, and I’ll still be left confused afterwards. Pull request limit reached (ECR Docker stuff) Looked into fixing this quite a bit. All the fixes seemed much too complicated, and not worth the effort. Pretty annoying that I have to rebuild sometimes, and it’s random chance to some extent whether your build will pass or not.
AWS cost optimization
Ongoing struggle, trying to limit my logs, trying to figure out how to use one load balancer for multiple domains/webapps. Using a public EC2 instance, which I know is bad, but simply can’t afford those NatGateway costs Currently on a free-tier EC2 instance, but that’s expiring soon so I’ll have to figure out what new instance migrate to, and am anticipating more cost struggles.
Forms
Forms suck I hate them I tried making them prettier and more animated, but I still wonder why there isn’t a better way. Forms are so freaking annoying to input. Switched from Formik to React-hook-form at some point. Don’t regret it so far, I quite like React-hook-form, but I don’t quite remember why exactly I switched. I think it was mostly cuz I just hated forms. Of course, react-hook-forms is still forms, so that hasn’t changed I’d love to build sometime in the future to change the way we do forms. But still trying to come up with ideas.
I'm hoping with the explosion of NLP, forms will become less rigid, and easier to deal with.
ChatGPT API
Using zod-gpt. Tried forking it, and adding another feature. Scrapped that at some point, I think I realized what I was doing wasn’t actually necessary. Why are costs so high. Need to do more cost optimizations Not super accurate right now, might try GPT 4 and see how much it improves. (GPT 4 too expensive, not worth cost)
CORs
All I remember is pain. I think this took me like 2-3 days to debug, and my dad was really surprised when I actually got it working. Brianna told me once that you forget trauma, I’m pretty sure she was talking about IB, but it applies here too. Thank goodness I’ve never had to deal with it anymore, since I don’t use API Gateway anymore Wrongly formatted items getting into my databases Causes everything to crash, which I know means my system isn’t built right. I should be able to handle it, and I am working on making it more robust Haven’t had this happen for a long, long time, so I hope my system is getting more robust.