sharmaaditya570191's Blog

From console.log to GSoC 2020

sharmaaditya570191
Published: 08/31/2020

It is time to share my wonderful journey to Google Summer of Code, tips and tricks to get selected and what all you can do before GSoC to take a step closer to your dream internship or job.

I have written in detail about my journey here - https://medium.com/@sharmaaditya570191/from-console-log-to-gsoc-2020-1a6e9dc2334e

Thank you EOS Design System and Python Software Foundation for this awesome opportunity.

Signing off!

View Blog Post

Final touches, Bug Fixing and last week nostalgia

sharmaaditya570191
Published: 08/24/2020

This is officially the last working week of Google Summer of Code 2020. This was one of the best experience of my life. I learnt a lot of new things. I saw my knowledge and technical skills growing exponentially with every passing week. I mastered the art of collaborating in a team and drawing inspiration and motivation from my hard working mentors and project partner.

This week I fixed various client and server side issues related to the authentication system and the states depending on it.

I spent time on making a final report for my project to identify the features we have completed. I also wrote about some interesting new ideas that can be added to our user story system.

I will always be a part of my awesome organization and would keep contributing.

I have published my report here - https://gitlab.com/sharmaaditya570191/gsoc-2020-project-report

View Blog Post

Inches closer to the GSOC’20 finish line

sharmaaditya570191
Published: 08/17/2020

Our sweet GSOC family literally coded the summer away with some of the best developers from around the world always ready to hold our hand in case we loose balance. Now the hardest week has come. Its time to say goodbye and I am not able to get over it. The end is getting closer as you read this but my heart is not designed to close the best doors so easily. My brain is full of brand new ideas to implement after the GSOC timeline. For now lets check out my latest patches which got merged this week.

What did I do this week?

We made a decision that we should polish and test the existing features before adding new ones so that we can find and fix bugs if any.

What is coming up next?

This is officially the last week of GSOC’20. I will make a final report for my project and get it reviewed from my awesome mentors.

Did I get stuck anywhere?

I firmly believe that as a developer if you are not stuck then you have not seen enough.

View Blog Post

Pagination, Privacy Policy, Bug Fixing and Testing in the User Story system in GSOC’20

sharmaaditya570191
Published: 08/10/2020

I started this week with a heavy heart. I entered the last coding phase of the best experience of my life. I made my mind that I will keep contributing to this project and organization and make the most of this awesome learning opportunity. I will not let it end here. I can already imagine a smile on my mentors face as they read this. You are the best people I have ever met and worked with. Now lets jump to my magic work. :)

“Many solutions will work but keep solving the problem till you optimize it and reach the best possible solution.” I do not know which genius said this but I my mind got stuck with this and I decided to spend some time to add pagination for our beloved users. This means users can reach any page with a click and we do not have to load all stories in one go. Imagine our free Heroku servers burning on hitting the API to load 500+ stories in one go. LOL!

The most important thing before going live was telling users how we are going to use their data. I worked on the privacy policy page and created a new model in the back end so that admins can manage its contents and update the privacy policy when needed.

This also means that we have to notify users of a privacy policy update. I wrote a custom lifecycle hook in Strapi which automatically creates a notification when the old policy is deleted and a new one is created. This special notification is displayed as a popup modal on the home page for users who are already logged in. They have the option to accept the new policy. If they do not accept then they can continue using our system but are logged out. This means they can only read existing stories.

New users will not see the modal as they can access the updated policy when they register into our system.

After pushing these heavy changes to production I fixed some bugs related to the my stories page and pagination not working along with product filters.

Finally I studied Cypress docs for some time. I set up Cypress for our client side so that we can write, run and debug tests easily.

I have identified some bugs on the client side and I will spend some time to fix them.

I will try to give the remaining time for writing tests as they are really important to future proof our application.

I have a lot of exciting new features in mind like Slack integration, email notifications etc and I will add them only if time permits.

I understand that the best things take time and patience and I will keep adding a thousand more features to user story even after GSOC. :)

It is natural to get stuck while trying to do the best things.

I got stuck at multiple places while trying to make the pagination feature work along with other filters. Covering all possible cases for the privacy policy model was also a bit tricky. Discovery of new bugs might be a bit easy but they can be difficult to solve. Cypress and software testing in general was absolutely new to me.

I do not give up easily and kept trying to overcome all obstacles by the end of the week. All my efforts were really worth it. I learnt a lot.

I am also blessed to have such awesome mentors for support and motivation. They work really hard everyday and I learn a lot just by observing them. :)

View Blog Post

Lifecycle hooks, threading and notification system in the user story system in GSOC'20

sharmaaditya570191
Published: 08/03/2020

A whole new set of awesome features are here for our beloved users. Do not get worried by the heavy terms in the title. Sit back, relax and follow me to catch a glimpse of my implementation for giving you the best possible user experience. You will soon be able to write your own story, share with us how you use our products, relate to other users’ stories, vote them up and we’ll make sure we deliver cohesive solutions to you.

What did I do this week?

This week it was time to design a personalized notification system for our users to notify them about the latest features when we launch them. Only author and followers(users who have voted) of the launched story should receive the notification so that we do not disturb other users who might be busy writing their own amazing stories.

The admins update the status of a user story to “launched” via the back end Strapi panel when our team have successfully pushed a new feature to production.

Now Strapi lifecycle hooks come into action. The lifecycle hooks are functions that get triggered when the Strapi queries are called. They will get triggered automatically when we manage our content in the Admin Panel or when we develop custom code using queries.

I wrote a asynchronous afterUpdate hook in the user story model which checks if the status of a user story has changed to “Launched” after being updated. If the status has changed then it creates a new notification record on the server with a custom message, seen status, link to the story page and a list of users to whom the notification is to be shown. I did this by utilizing Strapi services which are a set of reusable functions. They are particularly useful to respect the DRY (don’t repeat yourself) programming concept and to simplify controllers logic. Every notification on the server is required to have a different and unique message.

On the client side I fetch the notifications for the particular authenticated user using GraphQL queries. When the user has seen the notifications then they are marked as seen on our Strapi server too. This is done using GraphQL mutations which update the status of a notification. I made sure that we do not hit our API multiple times to update the status of a notification. 

The next major feature of the week was to add threading in comments. This allows users to reply to a particular comment on a story in a thread. I created a separate model on the server for user story comment replies. Each comment reply belongs to one comment, a user can have multiple comment replies, each reply belongs to one user and one comment can have multiple replies. Such was the complexity of relations between the models schema. You can also see the number of replies and even add your own reply via the client side. 

All these extra efforts will make your user experience super smooth. The blazing fast React re-renders and updates on the client side will be a icing on my cake. :P

What is coming up next?

I will spend some time to polish and test the existing features.

I will also work on the user story privacy policy to allow admins to manage and update the policies from the admin panel. Users should receive notifications whenever the privacy policies are updated. The user can then choose to accept them or remove their account.

Did I get stuck anywhere?

I got stuck at multiple places be it writing hooks and custom controllers in Koa for my server or implementing mutations in an effective and optimized way on the client side.

However, I did not give up and kept reading more about the topics and technologies involved. This way I was able to learn a lot of new things during the week. Debugging and troubleshooting became super easy after I hit my learning goals and covered all basic concepts properly.

This ended the week with the second evaluation. I received a really nice feedback from my mentors. I expressed my sincere thanks to them today for always supporting, motivating and inspiring me to learn more.

View Blog Post
DJDT

Versions

Time

Settings from gsoc.settings

Headers

Request

SQL queries from 1 connection

Static files (2312 found, 3 used)

Templates (28 rendered)

Cache calls from 1 backend

Signals

Log messages