First 250 days of software dev - Part 20

4 min read

Day 191

Day 192

Day 193

Unfortunately I lost the files containing these days' work :(

Day 194

I completed the morning offline. When the user logs in, they are in the "available" state. After that, he can choose one of the options "away, busy, available". But when the user logs out or closes the application, it was directly taken offline. Then the notification part for messages was partially completed. But as you said, the data structure I built will take up much more size and require more computation time when scaled to larger systems. So tomorrow I will fix that part and complete the missing parts. "Close all sessions", which seemed to work normally and as desired before, did not work today. I was given extra time to fix that part. Fixed.

Day 195

Today I completed the message notification part. Since I keep the data in JSON and I have used the data structure related to user ids in many different places before, I associated the notification part only with the user id and the date of the first unread message. Since all the structures are on the JSON file and format, this structure can be kept if a non-relational database management system is used in the future. Or it can be changed. That was not considered at this stage. After completing the notification part today, a few parts of the past were broken during the changes made to the code, but they were fixed afterwards.

We wanted to enable the input field where the messages are written towards the evening to expand vertically as the message lengthens, as in skype or different message applications. But since this dynamic structure cannot be done with the input element (actually I never thought it could be done via javascript), we will replace the input field with a span and use the span as an input. That part is unfinished, but it will be fixed tomorrow morning.

The chat order should be based on the chat with the last message. I will try to complete that part tomorrow. There is one big missing. Deleting a friend from chats. This feature was not added yet. Tomorrow it will be completed. If these features are completed tomorrow, there are no other major shortcomings at this stage.

If there are different problems, I think I can fix them.

Day 196

This morning and at noon, the input field for typing messages was made to work correctly (as desired). Then the dates of the messages were converted to time, days of the week, or "day/month/year" format as in Skype and other messaging apps. After that, the last chats would be sorted. Instead of creating the first logic that came to my mind, I thought about how I could write a different and algorithmically more optimal code. This took me some time. This part is not completed, but it will be completed by noon tomorrow. After that, the friend deletion feature will be added.

Day 197

In the morning, the sorting of chats by last message date was completed. Then the ability to delete friends was added. There were also some problems in the group quit section and they were fixed. Something like quitting the general chat has not been added yet. When the app turns into a desktop app, it is expected to be very nice if the ability to mute notifications is added.

The problems from the past have been solved so far. If there is a problem, it can be fixed again, but no serious problems have been found.

Towards the evening, 3 or 4 different issues came to mind:
  1. How can peer-to-peer messaging be done and how can privacy of messages be ensured? This will be added if possible.
  2. Audio recording and sending status will be added (with MediaRecorder api)
  3. Live video and voice chat will be added.
  4. When the first 3 items are completed, it is thought that the most basic functions of a chat application will be provided
  5. Although the introduction part is completed as backend, the frontend is still very primitive. Then the front-end will be written.
  6. It is thought that there may be problems in the operations that more than one user performs at the same time from the json file. Therefore, a transition to a database management system can (should) be made.
  7. The readability, editing and updating of the code for developers should be brought to a standard suitable for OOP (It should have been done from the beginning).

Day 198

Today, to be honest, I spent a bit more time planning what to do and researching related topics. I've been thinking about what I need to do, reading different people's code and opinions on related topics in general. Even if I'm not going to add end-to-end encryption, I wanted to learn how it works, and I think I did.

Day 199

Today I started reading the documentation provided by Google as an introduction to WebRTC. Since the document I read started directly with the coding part and the interpretation of the code, I didn't read anything comprehensive that explains the essence of the event and the structure and logic of the technologies it uses. Afterwards, I researched the subject from Wikipedia and a few other sources. I need to get my hands dirty by getting some more ideas about the subject (by researching the subject a little more if I have the opportunity on vacation). On Thursday I will start (try) to integrate these situations into the system.

Day 200

I will make careful corrections tomorrow as some anomalies occurred while I was modifying the code on the parts you showed today. Before that, I tried to learn and implement live (stream peer-to-peer comm.) data exchange with WebRTC. First I tried to understand by copying the examples I found and reading the code, but I had some difficulties. I will return to this part after I make my application object-oriented.