Today Lessons: Take notes of available of any API when designing a dependant app and keep in mind about the properties of a data structure and its characteristic.

Averrous Saloom
2 min readNov 18, 2021

--

A great day for me. If you read my yesterday article about managing energy, I implied that I will change my approach to time chunks and reduce context-switching as much as possible. It works, I don’t feel very exhausted, I feel calmer.

Today I got some lessons. When writing code for a shopify app project, I do it straight away without truly reading the API. As an amateur, I don’t realize how CORS really can be a silly problem, a problem that can make our works useless at the end. I write this frontend code, which try to redirect the parent of an iframe to some link, it turns out it is not allowed to do so because the difference in domain (CORS), that made me have to reworks the works. I write the script outside the main page, when actually there is an Api in shopify admin that allow us to add script as event. I should’ve read the Api in the first place.

Next lesson is in my DSA class, we were learning BST and we have a task to write some function. A simple search problem, but I do it inefficiently because I traverse all nodes in the trees. I didn’t kept in my mind that I worked on a BST, which has special characteristic that I have to use. Remembering the characteristic, properties, and characteristic of the properties really is important to make suree we create a good algorithm.

--

--

Averrous Saloom
Averrous Saloom

No responses yet