First 250 days of software dev - Part 22
6 min read
Day 211
Today, as the first thing I did, I brought the landing page status you mentioned earlier to the desired state. I fixed two small errors that occurred while completing this status. Afterwards, I fixed a bug that occurred when a person deleted a chat and created a chat with the same person again. On Friday, if I can fix a bug that occurred during the exit from the group, I think it will be ready and sufficient for the presentation on Saturday.Day 212
Today I wanted to make the last edits before the delivery. I fixed the bugs I found. First of all, the part of quitting and adding to the group was problematic on the front side. It was fixed. Secondly, the uploaded files were restricted. This restriction was removed. Mime types were controlled on the backend side and forwarded to the user. The problem here is also eliminated. Whatever the mime type is, the file is presented with that file extension.Day 213
I was looking at electron's document today and I saw two separate links about node.js and google chrome on their page. The cartoon in this link was only about chrome. I read it. Before that, I edited the code one last time and sent it to you.
Afterwards, while I was browsing the node.js documentation again, I came across a news article in one of the links in the document. On a Turk's brief disruption of worldwide web development in 2016 . More precisely because npm causes this.
I was surprised to see that many developers using react and babel had problems with a simple 11 lines of code being removed from npm.Yes, today was a quiet day. I really enjoyed reading a cartoon summary of the ideas and work of the Chrome developers. I've used a web browser for years, but I've never consciously thought about how it works until now. The idea of each tab as a separate process, the idea of blocking malware with sandboxing, how the asynchronous structure was written out of necessity (yes, I already knew these things or learned them without realizing it). The part about the reason for writing the V8 js engine and the lack of a good garbage collector was also a very enjoyable read. If Ataturk were alive, I think he would have recommended reading it in general.
Months ago and even now (though not very often anymore), I was making an extreme effort to understand you. I was trying to learn how to comprehend, learn, use, speak the language without translating it into Turkish. I think I have progressed, but as a junior's junior, I still have a long way to go.
Day 214
Today I tried to make the application examples myself by looking completely at the electron document. As with browsers, Electron has different api's. For example, there is a separate api for clipboard. For example, the clipboard api is presented as a separate api in electron in a very similar way. I think the parts where there will be incompatibilities can be predicted and can be switched to electron without much difficulty. Tomorrow, if I am not given a different task, I will start switching to electron.Today I also took note of what you said about the codes that were written, I will change the relevant parts and I have committed the reasons to memory.
Day 215
I actually switched the app directly to electron today. Everything that used to work was still working normally. The Inter Process Communication part is as I understand it (I'm writing it again because I may look at these notes in the future): When Chrome or any browser is running, the user can open multiple tabs. As far as I understand, the most primitive browsers are thought of as a single tab. In case of multiple tabs, it was necessary to separate the JavaScript operations and memory operations of each tab. Because if a site explodes in one tab, all other tabs are affected and the browser crashes (I remember it hard because it was a long time ago, but yes there was such a thing). Each tab was called a separate process and all these small processes were managed by a main process. This method was later adopted by all other browsers. Electron follows the same logic here and divides it into main process and rendering process. It seemed like it could be considered as two separate contexts.I haven't looked at the session/cookie part in detail yet. I will check tomorrow to see if there is a problem there.
Now, while I was writing these lines, the idea of creating a template for daily reports came to my mind, but I gave up because the template I had in my mind was very simple and it was not difficult to write.
Day 216
Today, I first updated the application icon and name in the top bar of the Electron application. Since I had problems changing the color of the top bar, I completely hid the top bar and rewrote it in the rendering process section as I wanted. While writing, I added minimizing, maximizing, unmaximizing, closing functions to this section. Normally incoming notifications only appear in the application. But if the page of the person using the application is minimized, I should ensure that the desktop notification comes. Tomorrow I will add this part. Of course, I will do this with the api provided by electron. Today I also organized the page sizing part according to the case of using electron. In general, I will only give electron-specific rendering operations to the relevant files as a separate file. Tomorrow I will complete that part as well.Day 217
Trying to show a notification box with an input field in windows os seems like a lot of work. You need to add a lot of separate software to use the module. I don't know why it wasn't included in electron.js or why it wasn't made easier to use, but it felt like a bit more of an overly detailed part.I'll try again tonight at the office, but probably tomorrow I'll just have it show a normal notification without going into that much detail, unless otherwise required. Then I will try to package the app and make it ready to use. I think it can be added in later versions of the app.
Thank you very much for giving me this project again. I learned and did so much when it came down to it (in my opinion). Good night.
Day 218
First of all, I apologize for the late report. I wanted to write it anyway.Today I completed the notification part within the specifications electron gave me. Then I created a flash-like image on the icon in the taskbar when a new notification arrives and when the application is first opened. Then I packaged the application with the electron builder library. It worked. But there was a problem. The cookie data was lost when the application was closed. It was also disappearing when running in Electron, but I thought it would be fixed when it was built. It didn't. Then I searched for how to fix it. I haven't solved this problem yet, but just like with notifications, I can use a native api that electron provides for sessions. I think it could be done without using it, but I couldn't do it even if I tried. I will try a different solution first thing tomorrow.
Day 219
After clarifying my thinking this morning, I solved my problem with a little google search. Basically, the cookie information was already coming into the electron app. But it wasn't storing this data somewhere permanently (like modern browsers do). The "changed" event was listened for changes in cookies. When the cookies changed, the session information was saved to a default location that Electron itself set. Then the application was packaged and ready to use. At this stage, the application satisfies me. But it needs further development (Webrtc, fixing the notification part, front-end improvements, and of course optimizing the process of pulling chat data from the backend to make it scalable).After that, I continued reading the book on functional programming that I had started reading before, I guess to discover new horizons, to broaden my perspective and to feel stronger. The parts I'm looking at now are all about math, logic, basic Haskell data structures. I just want to read it as a hobby and in my free time and finish it.