First 250 days of software dev - Part 10
Day 91
Yesterday I had created the use cases, but they were too complicated. Today I organized it a bit more and cleaned it up on the computer. So I still haven't created the domain model yet. Tomorrow I definitely need to finish it and even complete the sequence diagrams. So I'm going to get a good night's sleep today and pick up where I left off tomorrow.Day 92
I created a total of 11 use cases. Today, I created the domain class model, sequence diagram, and finally the class diagram of only 1 of them. There may be missing or incorrect parts, but I tried to do it as well as I could. Since I won't be able to advance all of the remaining 10 use cases tomorrow, I think I will continue to work at full speed on Sunday.Day 93
I didn't know how to estimate the duration of the task I was going to do in my project, because it was the first time I was going to do something like that. If I am a person who doesn't know math at all, I can't estimate how long it will take me to calculate that 1+1 is 2 with my existing knowledge. I can only make it up. But if I have done this calculation or something like it before, I can make a more realistic estimate. If I haven't done this calculation, how can I make an estimate? By not reinventing the wheel, of course. I wanted to come up with an appropriate solution to this time problem without reinventing the wheel, but since I couldn't find the temporal data provided by different people, I obviously made up the project duration at the beginning by trying to be logical. After 1 week, based on my own experience, I was able to get an idea of how long it would take me to finish part of the project, and then I made an estimate accordingly, but I was careful to create it in the least risky way for myself.What I learned on the last day was this: If I have a project in front of me that I don't know how long it will take and I need to complete it, I need to do research about that project first. If my previous experiences, different people's experiences can help me, I can make my estimate with high accuracy. If not, I can break the project into smaller parts and create an estimate for the parts where I can find a reference (myself or someone else). This has just occurred to me. For the parts that are unknown, I will pass on the unknown parts to the person who forwarded the project to me and explain the current situation with accuracy.
Sometimes I like to play with a problem and solve it with a simple approach, but sometimes I can turn it into a monster, which can cause difficulties for me in terms of progress. I'm usually aware of what I'm doing, but sometimes the monster can be attractive and I feel like it's pulling me deeper and deeper. I've felt that a couple of times in this project. But even though I get tired and lose time fighting it, I still think I come out ahead, because it's not real. Me and my progress is real. I think I've gotten bogged down in too many unnecessary details. An ordinary creature with a developed brain.
Day 94
I continued where I left off today. The class diagrams of the product search and review, adding the product to the cart were the subject of today. Tomorrow I will be halfway through these diagrams for two or three use cases. I think I will complete the details (verbal parts) of the report on Wednesday.Day 95
At the beginning of the day, I was looking at converting the use case into a class diagram, and then I was thinking about the communication of objects over and over and over again, and I started to come up with my own outlandish ideas. Objects were communicating in pairs and these relationships were provided by methods. Since the objects were created in relation to contemporary life (not in software, of course), I thought, why does an object need another object to touch it for messaging? In a movie whose trailer was shown in the movie theater today, there was a saying "The one you seek is the one who seeks you" (maybe we shouldn't take Sufism as an example in this regard, but I wanted to add it when I thought of it). In order for me to put one object in contact with another, it has to seek it. The other object is waiting to be sought. It's a bit like "it was already being searched for", but that's how it is. I thought what would happen if a third object listened to the other objects talking, that is, an object that listens to two or more objects talking. Objects communicate only when they are called. It's like a snake that doesn't touch me. Actually, this may be the purpose in the current use. I think the opposite situation (objects that hear everything and communicate) is in the procedural method. I dreamed too much unnecessary dreams, I felt like it was going nowhere. Let me end this paragraph by saying that at least dreaming is also important.And then I looked at Actor Model, and Alan Key has a Quora account and he answers a lot of questions there. When I saw this, I was very impressed because he became one of the heroes of fairy tales in my eyes. He mentioned that Actor Model is actually not much different from OOP. In fact, since the pure object oriented logic that was first created turned a little more class oriented afterwards; he said that Actor Model is more similar to pure OOP than the OOP currently used. The reason is that it focuses on messaging as far as I understand. I understood the concurrency advantage, but since I haven't seen it in practice, I only grasped it logically. Apart from that, I guess Actor Model can also be used in PHP. So I thought why Actor Model is not used now instead of OOP. There were answers I found. But I didn't fully understand. The only thing I can relate it to is that it might be similar to why SmallTalk is not used now. Of course it is used, by the way, discrete (like microservice. I only know it as a concept. I have no idea of the details) especially for systems. But I realized that it is not very common.
Then I looked at self reference classes, which is also possible in different ways. The most striking feature is its similarity to the linked lists I encountered while looking at algorithms. It was possible to create linked objects just like linked lists.
I did a bit too much research today, to be honest. I did what I had to do, but I also did a lot of research on this kind of stuff.
Day 96
Today I completed all the verbal parts of the project. Then I added the work I did before to the file and completed it. I realize that there are many, many shortcomings. Especially when creating the diagrams, they seem to have evolved. Because they really evolved. I always tried to try out the new things I learned in the new parts I created. Some of the classes may have had insufficient attributes, some of them may have been redundant. When I started to think about these things enough, I was starting to get into programming logic a lot, so I left it a bit more superficial.At the end of the day, I thought about English. I also lack a lot in speaking. The reason for this is that I have trouble finding words when speaking a foreign language and I think I also lack self-confidence in this particular subject. Because while I feel very comfortable talking to a foreigner, I don't enjoy speaking a foreign language with a Turkish person at all. Because I feel like he/she will always look for something wrong with me and that's why I prefer not to speak unless he/she is a humble normal person. Why did I mention English? The advice at the core of speaking English is not to think in Turkish and to try to speak and think in English without translation in daily life. I always give up on this because I don't know the word meanings of the things I encounter in daily life. How can this be solved? It can be done by thinking about the words and sentences that are frequently used in daily life and learning those words. Diagrams were created for communication between objects. I assumed that I could create a diagram for this too. I will say the sentence to the machine in Turkish and it will give me the English equivalent. For example, Cortana or Siri is spoken in a language, yes. But what if the machine responded to my sentence in English? What if it specifically specified those words to me and tried to make me speak. In a way, the machine would be my English teacher. Like Elsa, it could present my mispronunciations to me as statistics. She could send me a text of our conversations. I could read it if I wanted to. I'm talking about different technologies here, all in one place. Maybe there is such a thing and I don't know about it. In short, I just thought of an application that could help me think and speak in English. It could provide the translation part with an API related to translate. But artificial intelligence would come into play for things like him asking me, which I don't know anything about. Still, it seemed like something I could think about.
Day 97
Today was a mixed day. I read a lot of interesting topics on Mozilla Developer Network, I kind of did it again. Afterwards, I saw an article on MDN about publishing a web page and it talked about creating a static web page on Github. From an article on Medium, I learned that this page can be provided with a database using the Firebase API. The static site normally only has Javascript, HTML, and CSS. I will try to pull the information I get from the user into the database using Javascript with the help of the API. If I can do it, I think this can be my backyard or garage. At least I think I will have learned how to use the API, how to get the data to the NoSql database and how to process it, what GIT is and how to use it, how to create a project on Github and how to update the project instantly with GIT or Github Desktop. I think I will look at this over the weekend when I am free. I looked at GIT a little bit today, but I found it confusing at first because I'm new to it. So Github Desktop is very simple to start with, so I used it to simplify project updating. Actually, there are solutions with Firebase for both mobile app development, hosting and database, but for now I want to solve the database part. First note: I installed GIT and Github Desktop on my own computer. I could have done without it, but for learning purposes. Second note: There is another site called Heroku that does something similar to what Firebase does but it can cause some problems: Cors Doc on Mozilla Deev. That's why I haven't looked at it at all. Third note: Today I also did a little research on Libra (now called Diem) and SDR. I came across the concept of pegging money to several different currencies and not being affected by inflation. There was also a lot of talk about the concept of stable coins. But I am not yet familiar with the subject. I will look again. This is a small step for both humanity and me: Its not here. But my first attempt to publish a static website :)
Day 98
Biraz daha erken döneceğimizi düşünüp akşama bırakmıştım raporu. Ama geç vakte kaldı. Dün baktığım konular üstünden gittim bugün. Github Pages’te dinamik web sayfası oluşturmak anladığım kadarıyla backend bir servis olmadan yapılabildiği için onun üstüne çalışmak gereksiz geldi. Hâli hazırda static bir web sayfasını yapmak gibi bir amacım olmadığı için o konudan vazgeçtim. Sonrasında yine OOP ile ilgili konulara baktım biraz daha. Bir şeyi ya bilmiyordum ya da sonradan tekrar keşfettim: Javascript’te conctructor fonksiyonlar varmış. Sınıf dışında bir fonksiyonun constructor olarak tanımlanmasını daha önce görüp görmediğimi hatırlamasam da yeni öğrenmiş hissediyorum.Bugün de yine bol bol yazılımla ilgili konular hakkında araştırmalar üzerine geçti diyebilirim.
99. Gün
Today, instead of being result-oriented, I was path-oriented. Maybe it was not the destination, but the paths taken on the way to the destination that mattered... Yes, I should be more technical than literary and philosophical.I tried to reconcile the task given today with the design patterns and SOLID that we had worked on before. I wanted to create something accordingly. Did I succeed? No, I didn't. But I'm trying, I will try. I realized again that it's really not as easy as it was when I was reading. Producing something is as enjoyable as it is difficult. Yes, I am creating a class diagram, but the connections between them are so incomplete that I am aware of it myself. For example, I have not yet written what type the input and output parameters will be. Although I try to make the communication and relationship between the classes as much as I can, I don't yet know how much it will resemble that class diagram when I write code. I will succeed no matter what, at least I will try.
A game story generator (ludo.ai) has impressed me quite a lot. The only things that attract me in mobile games are strategy games. That's why I chose strategy as a theme. I thought, why not a game inspired by the naval wars of the Ottoman Empire and the states of the period? And I was surprised by the ideas the app gave me. It told me about possible enemies, alliances, regions to fight in (such as the Mediterranean, Istanbul axis, North African coasts), periods in which the game could take place (even modern Turkey after the second world war was included), difficulty levels, attacks from near land to the warship or from the aircraft carrier to the land. It was like the AI was playing a game of whack-a-mole. It was blindfolded and I just directed it to "hot and cold", but there was a problem. I think it was just taking inspiration from the games that had already been made and published. Because I wanted to develop a scenario like this but he always suggested the opposite arguments. The scenario I wanted to create was: "What if Adolf Hitler had won?". For example, it would have given me pleasure to play the game or read and watch the fiction. But since the practice, as in most games, tries to make Germany lose, I was left at the beginning.
My favorite feature is that it unleashes the creative side of a person. It gives you ideas to start with and you can create different fictions based on that. It made me think more about AI, even though it's a bit independent of game making. I thought, if an app can create these scenarios, why can't AI somehow write poetry? Because it can seriously use existing scenarios to create a complex product. It can manipulate us with its fictionalized stories. And they proved this with dating apps that it can be a person of the opposite sex. Our primitive relatives used hand tools to break down food, extract it from parts of the hive they couldn't reach, use fire, use different animals for transportation and communication because they themselves weren't fast enough, and there are so many other things. Now, because we don't think our intelligence is enough in some areas, we want to use something perhaps more intelligent for us. I hope that my existential anxieties are the result of the actions of beings much more intelligent than me.Day 100
I realized that my perspective on OOP has improved over time. I still have many mistakes, but I say I'm glad we did those readings because there is to think about it in practice, to produce, to get tired if necessary, to suffer.I remember when we first looked at what object-oriented programming was, and you expected something about products and categories. You wanted us to build an OOP based structure where categories and products were related to each other. At that time, I remember using interfaces everywhere because I had just learned about interfaces. In addition, there was only inheritance. And later, when I was working on SOLID, a mistake I made in that work was engraved in my mind: "Interface Segregation Principle". It was about an object that implements an interface should use its methods. When there were branches and branches in inheritance, some objects had to implement methods that they would not use. And that's why ISP was the rule I thought I understood the fastest in SOLID.
I learned how to use interface incorrectly. Then I heard the names of the relationship between objects: "Association, aggregation, composition, dependency". The concept of "part-whole" was mentioned, but I didn't understand it at all and I was covering it up. And I thought that I was learning from places that were explained with different concepts. Which I really felt that I was learning. Then I studied design patterns. Learning design patterns in 1 week was like learning regex in 1 day. When I read it, when I looked at the examples, I thought I understood it, but I felt that I had forgotten it because I didn't encounter it in practice and assimilate it. But it's not like regex, I need to have a good grasp of at least a few of them in the near future.
I suffered a week ago. The report, the planning, it was difficult. It was necessary to suffer.
In the structure I set up yesterday (registration and login), there were aggregation relations in many places. I thought it was wrong, that it shouldn't be this much.
Today, I established abstract class, interface, aggregation, association, composition relationships in the structure that is about seeing and updating user information. I established them not because I had to, but because the needs pushed me in that direction. Maybe my logic may be completely wrong, but I think I understand a little more. I can feel that my perspective on the relationship between objects is getting a little better by looking at it from different angles every day.