First 250 days of software dev - Part 16

9 min read

Day 151

Today I experienced my greatest joy about programming within myself: I saw and you showed me that the code can be self-aware. I feel like there is so much to do and so much to learn, that it gives me so much pleasure just thinking about it.

Apart from that, today I looked at the Laravel documentation in general. I saw how cross site request forguery can be blocked and its place in mvc. When I came across Blade template engine while looking at the View section, I remembered ofEngine (a template engine) and paid more attention. I couldn't examine it very carefully because the code about Blade in Laravel was a bit too complicated, but I think I understand what the template engine does and how it works at the most basic level.

In addition, the pleasure of being able to read language-independent code is something else. Of course, I'm not very good, but it can be self-satisfying to see that I'm not ignorant in my own way.

Day 152

I can't say that I learned anything new today that opened my horizons a lot. Mentally it was pretty quiet. I looked at Blade's syntax again. I had read that there is template inheritance, but today I was able to see what it is in practice. I came across alternatives to Blade, Laravel, MVC quite often while researching the subject. Part of me says you shouldn't reinvent the wheel, the other part of me says you should do it to learn the logic of the business, to prove yourself. But the truth is this: let's think of any existing MVC framework as a tank. If I need a tank, I can use it directly. But if I need an airplane or a Ferrari, I should use them, if not, I should create them.

I also had the self-awareness program in the back of my mind all day long. I am glad you showed it to me. I will probably work on it tomorrow. The topics I am curious about and the things I want to do (as a side project or as something I need to add to myself) have become quite a lot. I need to finish the Algorithms book, I need to assimilate it, I need to finish it. I want to spend time thinking about what a self-aware program can do, how a project could be developed on it. Since I have never mastered what happens at the junction of software and hardware, I want to learn that part clearly. I have also heard a lot about David Malan's CS50 course, but I have never started it. I want to spend time on that too. Beyond that, I need to reinforce, learn, keep fresh my own topics (web, even mobile specific) to do my best in my own work. There is so much to do. So I am happy.

Day 153

Today was like a tribute to the masters. First of all, my respect for Martin Fowler grew even more because whatever topic I looked at in software architecture, his writings were always the foundation. Even though I thought I had found something new today (accessing my credit card from my phone with NFC), I learned that it had already been worked on, and I was impressed that you had done it years and years ago.

The subject I was working on today was ORM. Two architectures were used in ORM. Active record and data mapper architectures. I should not forget that ORM actually consists of two parts. "data abstraction layer" where SQL queries are abstracted and "data access layer" which consists of active record or data mapper. Both have their advantages and disadvantages, but I learned that which one to use depends on the situation. I actually likened it to a topic. Which is the weakest piece in chess? There are actually two options:
  1. The king who always has to run away,
  2. I think the answer is that it is not any stone that is weak, but the position of the stone.
In our case, questions like which architecture is good, which is the best ORM library, which is the best ORM technique are very similar to the second option in the example. It depends.

When I came home, I was browsing google services and I came across google finance. It was just like any other finance application, even more inadequate. Again, maybe thousands or hundreds of thousands of people have thought about this, but here's what came to my mind: There are a lot of charts on currencies, on valuable papers in the stock market. The predictability of these charts is actually quite low. If it were high, everybody would be rich (and it's impossible for everybody to be rich). I thought if there was a program that could predict the volatility in the value of an asset, if there was a smart bot that could play the stock market accordingly. But for this bot to be smart, it would need to have the mindset of a person who wins at the stock market (the heuristics it often uses). I think it would have to have the ability to follow and analyze the news, or read and predict what the charts mean, if they mean anything. Could our intelligent bot even manipulate? After all, the whole economic system, even human relationships, are based on trust and faith. It seemed like an intelligent bot could do what a human could do. I think I will think about it again.

Day 154

Today I used an ORM tool (TypeORM) in node.js to connect to the database and make queries. I personally felt that using ORM actually makes things much easier once you get used to it. If I was doing a more individual or small-scale application, I wouldn't immediately look for an ORM library with the prejudice that I should use ORM. I would either use an ORM library or a query builder that would work for me. But I think it is necessary for a large-scale application. One of the reasons why I think so is that ORM is based on separation of concerns, just like the reason for the existence of MVC. In the current project, I can fulfill my needs by writing SQL queries, but in the future, when dozens of developers are working on the project, the abstraction and single job ownership principle of ORM will make it easier for them and the project manager (whoever is involved). The only problem with ORM as I understand it is that it can cause performance issues as the project develops. Most popular ORMs have stated that they have developed their own solutions for this. But I am not very familiar with this issue yet.

Day 155

Today I took a look at TypeORM again and then looked at the syntax of Sequlize and how it is used. I found that they are very similar, but of course there are many differences. For example, in one the main character is Typescript while in the other it is Javascript. Or one has Active Record and Data Mapper Pattern options while the other only has Active record. The use cases involving relationships between objects (data models-database tables) were very similar.

Then I looked at how to write queries using keywords in sql such as group by, having, subquery, join in TypeORM and tried to adapt it to my own situation. It took a little long because I was a beginner. I think if I practice a little bit, it will fit quite well because it doesn't seem to be a problem to understand the logic.

That's all for today.

Day 156

The most important gains of the day were understanding topics in SQL that I didn't know, or that I didn't understand even though I looked them up.

At first I was going to continue with TypeORM. Even though the project I created yesterday worked fine, I gave up on TypeORM because of the typescript itself, the fact that the concepts were getting more and more complex and I was too dependent on the documentation (actually this was not a problem, the problem was that it was not easy to find what I was looking for in the documentation), the fact that ORM itself gives a lot of options, but after a while the use of these options could get a bit more complicated (probably due to my inexperience). Because ORM did not make my work easier, it took a lot of my time like learning a new bird.

I started using Sequalize right away. It was much simpler to use and didn't have a complicated syntax (at least from what I've seen and used). Especially the fact that it was Javascript, that the help messages were very detailed and allowed to speed up the process, and that the functions and options it provided were very useful. I used that ORM today.

Day 157

I think I can fulfill the given task. When I looked at the web-socket concept in detail for the first time, I had a hard time understanding it at first. Obviously, if I take a cursory look and copy paste, of course something can be done, but I'm trying to digest it thoroughly. I guess that's why I'm a little slow. But I think I'm doing well anyway.

It took me a while to get used to the concept of sockets, since I was so used to a stateless protocol (HTTP) and everything was based on that logic. It's still not quite there yet, but by the end of the day, at least I understood a little bit how it works.

Day 158

It was the quietest day of the week mentally. It was not the most empty day. On the contrary, I felt that I learned more than yesterday, through my own efforts and your leverage of course. I am aware that it is not a report full of information and I feel uncomfortable with that. But I will still send this content-less report and I can embellish it by noting the notes taken. This is not a bad thing if those embellishments add something to it. Nevertheless, this is the report for today. I don't think it will be repeated. With respect and love.

Day 159

Tomorrow I will try to put the ideas into practice without being afraid and hesitant to make mistakes. Today, when I came across many examples, applications, concepts, I inevitably had the idea of learning and applying the "rightest, best". Of course, I think I can run a sample application on the computer, but I think what I am looking for is the perfect thing. And what I am trying to do is the perfect thing. I expect a lot more than my own level, and because of this expectation, I postpone a little bit what I should do, starting from the most basic logic in solving the problem and growing the idea. I think I want to look at other people's grown ideas and grow my own ideas in the same way or get inspired. Or I'm afraid of doing it wrong and that's why I don't do it right. But being afraid of doing wrong is a wrong thought from the beginning. I should continue without getting into these thoughts. Your finance example reminded me of the art of meeting unlimited needs with limited resources. It was a really good definition.

Day 160

What I struggled with today was that I still haven't mastered node.js and the libraries I use, and even the technology I use. Yes, I can simply redirect a user who sends a request to a server to a different server, and I can send a few necessary parameters while doing that redirection. But when I send these parameters to the authorization-verification server and redirect the user to communicate with that server, I can't hide these parameters yet. And that was my main sticking point today. Of course, it can be overcome very easily, but I haven't found a solution to this problem yet. Maybe it's not a problem for now.

Tomorrow I will try to build a single sign on structure that works in the most primitive way without worrying too much about such issues. Of course, it will require a lot of improvements, but I think I can do them later. The biggest responsibility I see for myself tomorrow is to build that primitive sso structure.
Regardless of what's going on at work, today I wanted to write down a line from the finale of Person of Interest:
“Everyone dies alone. But if you mean something to someone—if you help someone, or love someone, if even a single person remembers you—then maybe you never really die at all.”
Listening to what we talked about yesterday and what was said today in the series finale about being "good", I felt a sense of peace. Before I started the job, and even for a few years, I thought I was quite nihilistic and rational in my thinking in general. I still am, of course. It was as if I had lost my ability to dream at the age of 18 and before. In this 6.5 month period, yes, I learned a lot about software, as much as you can learn. But the thing I learned the most was to dream again. Of course, you cannot follow those dreams with inaction and apoliticism. Although I don't have any gripping dreams yet, but it is very nice to feel that I can dream again in a satisfying way. Thank you very much for that. Unfortunately, I can't contribute more than thanking you right now. I still feel like a parasite, but hopefully this situation will become desirable. I still don't listen to the machine when I talk to it, and I try to apply what I know and what I see to it and ask it to give me the results I want. This is very wrong, but I am trying to fix it.