First 250 days of software dev - Part 13

8 min read

Day 121

When I looked at the calendar in the morning, I was surprised because I thought it was Wednesday. I don't know how this week went. I couldn't do what I wanted to do on time. When I looked at my code today, I felt like I was responsible for the murder of OCP (open-closed principle) in solid. Because it was both open for extension and open for modification, especially looking at the code I wrote today. I try to realize the mistakes I've made before and then try not to make them. I refresh. Then I try again.
//bullshit mode on // in free lang
do {
the same things
}
while (still you don’t know how to implement object oriented design in a correct ways)
gibi bir durum olmuyor. daha çok: 
attemptCounter = 0;
while( you don’t know how to implement your ideas in a solid way)
{
tryFailTryAgainFailBetter(effort, labor, time, experience, performance);
attemptCounter += 1;
if (you were satistied from your work and its results) {
things gonna be okay in a desired way somehow;
then you can get out from loop;
}
hide “the way you crawl along, failed attempts, etc”;
show “the result as (fail || success);
}
//bullshit mode off
Today I got stuck in the same places a lot, which was due to my own mistakes. I corrected the mistakes in the evening. Tomorrow I will be faster.

Day 122

At the beginning of the day, I was correcting my deficiencies in the PHP part again. Afterwards, I was going to complete the security settings. But since I turned to the frontend part, that's where I left off. I think I did something very similar to the introduction, but I must say it wasn't pixel perfect.

That's all for today.

Day 123

I'm looking at what I've done today. Actually, it seems a little, but I'm actually satisfied. Especially intervening in the frontend with Javascript is very enjoyable and instructive. Even if there are things I don't know or can't use, it's a great feeling to be able to use them somehow (with your help).

I plan to complete the IP related parts first thing tomorrow morning. Fixing the database table, adding the IP protection feature and logging in accordingly, showing the ip's registered in frontend (again javascript will come into play, basically).

If I talk about outside of work (for hobby purposes), I have played agar.io many times before. I want to do things like muting people I don't want in agar.io chat, bot messages with javascript in my free time (I don't think it's very difficult). I'm thinking if I can make a bot in the same game again. There are examples on github, but it seems a bit complicated at this stage. But that's what I want to do the most. (Yes, these thoughts may seem a bit unnecessary, but they interest me).

The other issue is actually not a hobby. I used to watch TV series and movies with Turkish subtitles for years. Now I started watching them with English subtitles. Even though there are many parts I don't understand, the parts I understand are not less. 22 episodes of person of interest ended like this. I hope to be exposed to the language and improve.

In addition, I also looked at the "fast inverse square root" topic you sent me. To be honest, I don't understand the bit calculation on 32-bit processors with the magic number given in hexadecimal form. Byte shifting is mentioned, but I got stuck there (that seems to be the most important part, after understanding the newton-raphson method). I will look at it again tomorrow because it left me with more questions than it broadened my horizons.

Day 124

Most of the day was spent adding, updating and reading json data to the database. Adding and deleting registered ip has not been done yet, but the infrastructure has been partially established. Tomorrow first thing will continue from where we left off. The most challenging part of the day was preparing prepared statement for sql query. It was first tried to be integrated into the system previously established for database operations, but since it was not successful, a temporary solution was created for this problem. It was not a general solution, it was installed only to meet current needs at this stage. But if you want to make it better, that part will remain as future development as the general solution will take time.

Day 125

It has been 125 days since I started reporting on a daily basis. It has been almost 5 months in total. After this brief realization, let's come to today:

Mysql functions such as json_set(), json_delete(), json_array_insert() were tried to be used for pulling and updating information from the database. However, since there were no efficient results, old methods (such as pulling the data with the select you mentioned, decoding and processing it, then encode and rewrite it) were used. Read and delete operations were done. The only part left is to update one of the existing ip's and add a new ip. Actually it's all the same thing (update operation), just separated into separate parts.

In the frontend part, time was allocated to javascript again today. Actually, it can be done more simply, but it was tried to be done for a bit of a challenge.

Day 126

Today I completed the things I wanted to do. Things I expected to be done in a much shorter time took extra time. I think I'll get better at time management with practice. It feels great to be able to build and do creative things, whether it's Javascript or PHP (JS in particular has a certain charm. The syntax is sweeter, but I don't have professional technical comments yet). In the same way, trying to find different approaches to solving a problem, trying to understand and grasp different approaches is also a very nice feeling.

In general, the problems I face at this stage are not unsolvable. Problems are solved, of course, but my biggest desire is to create very elegant and elegant solutions without causing bad code. I'm not at that level yet, I'm aware of that. I want to be like a good writer, like an artist. I have no idea if I have a beautiful voice, if my pen fills its ink with inspiration, if I have a lithe body, or if I have clever and ingenious ideas. I just want to find in myself the dedication of Usain Bolt on the day he breaks the world record, like a theater actor who will appear in front of the audience for the first time every morning and watch the audience and the stage through the darkness, as if he is dealing with an art form. And it's not just that I want to, I have the same excitement many days, I live it, when I solve a problem, I quietly feel myself soaring inside. I talk like this, but these are not thoughts that are written down with cheap and simple purposes at the level of "please don't throw me out, I'm good like this, I'm good like that", but just the echo of the voices that come from within. Of course they were a bit fantastic examples, but I wanted to write them anyway.

Day 127

Time needs to slow down, it is moving too fast.

Today I looked at what ajax is and how to use it in general. To be honest, there is not much difficulty in using it, even (although I cannot upload the file with the .png extension to the computer and pull it from the computer) it is a better method to use. Of course, I haven't learned and used it fully, but it doesn't seem like a subject that will take a lot of time. Ajax is a bit more like using a mathematical equation. Objects are ready, properties are ready. Only the calculation needs to be done to create the equation correctly and find the results. Of course, this analogy is valid for many things, but due to the structure of Ajax, it seemed like it was enough to use this formulation.

Day 128

Yesterday I learned how to use the XMLHttpRequest object to exchange data with the get or post method. Today I learned how to do this with the fetch api, which is based on the same system but simplified, and I tried to practice a little by trying it in my own code.

XMLHttpRequest and the Fetch API follow the same origin policy. So, if the response from other sources does not have the correct cors header, we can only send a request to the same source. What do you mean by origin? Protocol, host, and port (if specified) must be the same.

In general, I read a lot about data exchange with ajax-fetch api and tried to write in practice. Although there are different usage patterns, they usually lead to the same door.

Quote of the day:

God helps those who help themselves.

Day 129

Today, React Native was introduced. Components were created in a very simple way and visuals were created. In general, it was a day of trying to understand the concept. I think more progress will be made tomorrow.

Thank you very much for your help in the evening.

Day 130

I was depressed today because of the places I was stuck. Towards the end, I stayed at the computer like an animal whose venom had spread all over its body and was temporarily paralyzed. Instead of looking at the problems I was dealing with or thought I was dealing with from a narrow perspective and thinking intelligently about the solution, I was trying to remove the problem by pressing every key. Because I was frustrated by not being able to solve it. Towards the end, my own thoughts started to eat me up: "You can't do it, you can't be a software developer or anything, don't force it, give up". My inner Tyler Durden was insulting me, wanting me to beat myself up, to hurt myself. As I tried to stop the nightmarish thoughts from coming to my mind, I couldn't focus on what I was looking at and trying to understand. It was like the end of the world. It was like a virtual confrontation with myself (whatever a confrontation is).

When I think about it from a broader perspective, sometimes I can have problems. I may not always achieve what I want. When I encounter such a situation, I may feel sad. Because when the baby asks for a breast and the mother doesn't give it, the baby cries. If the mother still does not give it, it cries even more. But it doesn't stop asking for the breast. So I should continue to ask for the breast (what's the point of me asking for it, what kind of logic is that, Buğra?). For one thing, there is no such thing as crying and turning off the breast. I have to cry, struggle and tear more and get that breast. Sooner or later I will get it.