First 250 days of software dev - Part 1

16 min read

Day 1

I think I have learned a lot today, or at least I have studied. I can briefly list the topics I have studied in the way I remember them:
  • Binary-bit-byte-shifting concepts
I spent time on things like binary system, bits and bytes, which I had researched before but hadn't gone into much detail. I learned the concepts of big endian, little endian.
  • Asynchronous programming
I learned the difference with synchronous programming. Asynchronous seems to stay in my mind as 'I will call you back'. In short: when there is an operation in our code that may take a long time or there is a situation that may prevent it, doing other pending tasks and returning to the undone operation after finishing those tasks is called asynchronous programming. In other words, it doesn't do the sequence of operations in a straight line, and if an operation on that line fails, it skips it and continues on its way. Then it goes back there again. It's faster than synchronous because it doesn't get stuck in the same position. The number of threads is also important, of course, with two or three threads instead of one thread, the process can end much faster.
  • Variables, arrays and object in Javascript
I was inspired by similar examples and for the first time I was able to write something on the console in the web browser. I consider it important as a first step. I did some small examples about object and creating the contents of an array. I learned about variable types.
  • About Scope
I learned how to assign variables (or constants) with var, let and const, and the scope properties when using them. I learned that assigning in the scope (i.e. local scope) between the curly brackets with let and const does not make sense for the global scope, which may actually be more advantageous than defining a variable with 'var'.
  • AST (Abstract Syntax Trees)
If we think of source code as a tree, it can be thought of as a branching process from the root to the leaf. It's used to show the structure of the code, in the analysis phase of the compiler, and in static code analysis. According to Wikipedia, it's also used in program transformation systems, but I'm not familiar with it, but I've seen examples of how to extract an AST and I understand it.
  • To be able to provide the advantages of a loop without using a loop
I created a very simple 'do while' loop in PHP using only recursive function and if statement. Obviously I had some help by googling but I understood the logic.
  • Lastly SEO
I actually compared e-commerce sites that do equivalent / similar work to our e-commerce business on Turkish and foreign websites. Honestly, I want to research a little more, but it's not till tomorrow. I can say that I made an introduction to SEO I wish to learn and use information that will always expand my horizons tomorrow and beyond.

Day 2

I can say that most of the day was like a basic programming lesson with Javascript. But I think it added a lot. If I summarize the day quickly:
  • Javascript
The topics I looked at during the day: 'Conditionals, Functions, Scope, Arrays, Loops, Iterators'.Unfortunately, I didn't have enough time for Objects because I examined more than 50 examples in the topics I mentioned and wrote similar codes on all of them one by one. I looked at the solutions in the parts I had difficulty, but they took a little more time because I wanted to grasp the underlying logic. The best information I learned today was actually about 'Iterators'. Seeing that a function can be used both as a 'data' and as a 'parameter', and then analyzing the code and understanding the logic was the most positive result of the day for me. In higher-order functions, while accepting the function as a parameter and performing operations, I realized that similar operations can be done without using callbacks. I think I understand the logic of the call-back function, but I haven't figured out exactly how the machine follows the order of operations. If nothing urgent happens tomorrow, I will learn that first thing. Also, I saw a code on stackoverflow where event and callback functions are used in another programming language. It was very pleasing to be able to analyze and understand the code structure. I did a lot of examples with arrays and functions, and I should mention that I learned how to use the concepts, not their names.
  • Variable
When you think about the structure of variables, a variable basically consists of two things: Identification and assigning a value. This is done by saving it in some part of the computer memory. Here I imagined the following example to myself: God creating man, and giving him a first name. And it is certain that this human being was born somewhere on Earth, even if God may or may not specify where on Earth this human being is located. And that God can directly change the position of this being if he wants to. The variable was man. The data it occupied in the memory was Adam. The memory was the world. The space it occupied was the location. Then I wanted to expand this example a lot, but there was no opportunity. Yes, it was an unnecessary (Stanley) Kubrickian approach, but I still wanted to write it down.
  • SEO
I learned that Google updates its algorithm every year, according to which Google puts its related site on the first page (or even at the top) in the browser. After doing some research, I found reports and articles published on this. One of them was actually talking about the importance of the speed of the website, or the speed at which it is displayed in the browser. I thought that if it takes a website on the first page among an average of 200-300 million results in 0.61 seconds, these pages should also be capable of loading quickly. Therefore, I observed the site's performance analysis, structural analysis, site load time (there are many concepts such as LCP, TBT, CLC). I examined these values from 'gtmetrix' and 'google page speed' and looked at their improvement (optimization) suggestions accordingly. Since even operations in milliseconds are very important in these matters, I suddenly thought of 'the advantage of defining a variable in block scope in terms of its transience in taking up memory space and issues such as not taking up memory space by always staying as a global variable'. I learned that small coding differences that seem so simple, image sizes within the site, CSS with Bootstrap actually cause excessive load times. Of course, these are not the main issues in SEO. There are more basic issues like Keywords. I will move on to more technical topics. Summary of the Day : I am amazed to see that a person who simply thinks and counts '1,2,3' when asked to count to 3 can explain his own logic to a machine and succeed in doing so, and I continue to learn.

Day 3

  • Today I completed the Iterator and Object topic with examples. I felt that today was a bit less productive because I worked a bit too much yesterday and was sleep deprived. But it was also nice to complete the Beginner-Javascript course at CodeAcademy in two days. Next is to complete the Intermediate part. Of course, I'm trying to be a little fast here because there is a lot of information and I want to learn as much as possible, see how they are used, and even if I forget, when a project comes up or a question comes up, I want to know the algorithm, the code structure, the expressions in the code and their usage.
  • I found a Github source related to the topics, projects, examples in the 'Eloquent Javascript' book. When I get more into Javascript - even after each topic - I think I will look at them and reinforce them even more.
  • I looked at 'page speed' yesterday, one of the topics you talked about in your office meeting today, and when I overheard that Javascript-related improvements were needed, I actually felt like I was looking in the right place. I didn't look at SEO at all today, but I want to make up for it tomorrow.
  • Towards the end of the day, I actually saw the topics discussed in the meeting as brain gymnastics and I listened to them very much. When I heard you talk about artificial intelligence, the basic assumptions on which mathematics is based, I wanted to read 'Gödel, Escher, Bach' even more, but I think I will first watch the lectures about this book at MIT and then read the book.
Good night, and thank you very much for sharing your thoughts on computers/life/science/information/philosophy with us today, even though you don't have to.

Day 4

I'm mostly on Javascript again today, so I'll get right to the point:
  • Object
First I went into a bit more detail about Object, I learned about factory functions for example. Actually, it was a bit similar to a class, but I shouldn't talk big because I haven't really looked at the class. But factory functions was one of my favorite places about object for today.
  • Web Compatibility and Transpilation
After finishing the bbject topic completely, there was the browser web compatibility and transpilation topic. I looked at the documentation on caniuse.com and babel.io on how to return ES6 and ES5 related code from ES6 to ES5. I think in 2021 there is no syntax transfer from ES6 to ES5 format anymore, but a few years ago it was necessary because most of the web supported Javascript in ES5 format. This was done by using Terminal, downloading Node.js packages and downloading the babel library. I followed the process a bit to learn how to use Terminal, but after 2021 (when more than 97% of the web (according to caniuse.com) uses ES6) I preferred to just research this topic.
  • Class
I looked at constructor, instance, method and method call. I think I understand it but I need to look at the examples again. After that, I was thinking of completing the class topic today, but when I learned that we were going to enter next week, I left it halfway and I wanted to repeat everything we have learned so far from the book called 'Eloquent Javascript' with examples. I finished two chapters today. Tomorrow, if I can, I think I will look at all the examples, try to write them myself, write them, and if I have a problem and can't reach the solution, I think I will complete the day by looking at the solution manual. Since everything is explained in the most concise and understandable way in the book and I have been reading, researching and learning a little bit about the concepts for a few days, I think it will be a very good repetition. At the same time, I think it would be good if I repeat the points that I missed, or the subject content that I didn't look at much on purpose, but may be important.
  • SEO
When I looked at SEO two days ago, I looked at the internet speed of our website, and the analysis of other parameters that I could access. At the same time, when I analyzed the competitors (or companies that trade on similar products) in the same way, I saw that our website was better as a website (in terms of software, such as connection speed, structural analysis of the site). But again, I don't think it is very good in issues such as social media, awareness, which can be handled within SEO but I think it doesn't concern me much. But I think that something good is done by putting in-site comments for communication with the customer. I don't know if you have noticed anything, but (using Google Analytics I think at least the marketing part has definitely noticed it) when our website and similar sites were searched on google, I came across a search result about the reliability of our website in suggestion searches. I have seen the same many times in the search suggestions of similar sites. Even when I looked at the comments of our website and similar sites in eksisozluk.com(a website like reddit in turkish), I saw that they touched on the issue of security. If one side of what we call SEO is the site, the other side is the user, and the middle is Google, we need to somehow give what the user wants, and I thought of a way to say that it is safe-reliable without expressing these words, but I couldn't find an answer. Obviously, my ideas about SEO have started to form, but I am only writing my personal opinions because it is not at the level I want.

Summary of the day : When you do something you really love, you lose track of time. This means that I haven't been doing things with love for a long time. I didn't think so, but my logic made me say that now. I mean, it's a bit irrelevant, but it's from Morpheus:

This is your last chance. After this, there is no turning back. You take the blue pill - the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill - you stay in Wonderland and I show you how deep the rabbit-hole goes.
I wish to stay in Wonderland, to find out how deep the rabbit hole goes, to continue without saying 'Ignorance is bliss' (actually, why not?).

Day 5

Let me briefly describe today:
  • I think I commented the code that you asked us to comment today correctly, but of course the shortcoming was that I didn't specify the purpose of the functions. Actually, I wrote the result of the code on paper and tried to calculate it by hand, and because I was wasting some time, I didn't write the comment with the purpose of the function.
  • Most of the day was spent revisiting previous topics from the Eloquent Javasscript book, the author's interesting thoughts and thought-provoking explanations about the topics, and making/reviewing the examples there. I looked at 'class' a bit yesterday but not today to tell the truth. Tomorrow I plan to finish the 'class' topic completely, and I will if nothing unexpected happens.

Day 6

Today was all about Javascript.
  • I completed the missing parts of the 'class'. I learned the inheritance structure and the static method.
  • I learned what a promise object is and why it is used, how to create a promise object, how to use structures like catch(), promise.all(), etc. I analyzed a structure that creates several promise structures in a chain and solved examples on top of it. Here's what I remember from today's work on 'promise':
    • They are used in asynchronous programs.
    • They are in three states: 'Pending, resolved, or rejected'. There was an example of housekeeping. It said that when you do housework, for example, you don't just vacuum the rooms. You also put the laundry in the machine, you can put the dishes in the machine. When you're done sweeping, you can clean the windows. But instead of doing these things one by one, the machines can work while you are doing your own work. This is where the asynchronous structure comes in. Javascript is actually a single threaded programming language, that is, a programming language that does one by one, but it has the ability to work like multi-thread with the event-loop. I looked a lot about event-loop and call stack today, I learned which operations are prioritized and how the system works. Let's go back to the example. If the washing powder is not put in the machine, the machine gives a warning, this is called rejected. If the machine completes its work, it means resolved. Initially it is in pending status.
    • setTimeout (works with the Node API) can be used to delay the execution time. Here it is useful to understand the logic of the event-loop. setTimeout gives a callback function and a delay time as arguments.
    • When the promise is resolved, we can call it using .then().
    • .then() : 'I have a promise. When it settles, here's what I want it to be'.
    • .catch() in case of reject, which is our other handler.
    • We can also use Promise.all() to take advantage of concurrency.
    • Multiple promises in a chain instead of nested ones are more functional, so we should use them if we have to.
  • Understanding the problem in your code today was one of the most enlightening topics of today. It was a great example of the dangers of using global variables and how the code works differently with a very small difference between the two codes. I think I can read the code, I feel like I'm very close to seeing the 'big picture', but I think I'm getting a bit lost in the concepts and code. Since we are in the learning phase, I think it is more important whether we can take logical approaches or whether we can approach things analytically enough to make an effort and understand things, rather than expecting us to read, understand and analyze all the codes at once.
  • The most interesting thing about async-await today is that I learned that by using a few await constructs, the code can look and read like synchronous code.
  • The purpose of async-await is not to get rid of .then() chains and write short code, but to make it look like synchronous code and thus help the developer to maintain and debug. It is also easier to store.
  • Singleton Pattern: It is the general name of a pattern that can be used with a getter structure to access the properties of a class whose constructor is private. In this process, there is only one instance.

Summary of the day: Veni, Vidi..

Day 7

Today was the first time I felt that I was struggling, so I stressed a little bit. I thought that I had to send you a code quickly, and when I found the solution directly on stackoverflow and copy-pasted it, I felt bad and looked at the topic again and wrote it myself. After all, the goal was not to write a code, but to produce something that I wrote myself, even if I was wrong. The reason was to approach with a prejudice and look for the solution when I encountered things related to logic circuits for the first time. But when I got into it, I realized that it could be done. In the code I wrote myself, I found a Half Adder. I couldn't find half of the Full Adder and put the others into code, but it would have happened if I tried a little. I can't use a sentence like I finished this and that today because I didn't. Today I realized the importance of practicing rather than reading something to write code. I adapted your last code to Javascript and got a smooth output. After that, I started commenting from the first function, but it stayed at the beginning. One last thing, after you left, I stayed in the office and worked a little more, but I didn't have any bad intentions, don't misunderstand, I stopped because working in the office is more productive than working at home. I should have informed you about this, but I didn't want to disturb you, sorry.

Day 8

Today, until lunchtime, I spent the day analyzing the given php code after it was converted to javascript. Then I looked at what is a design pattern and what are the examples. Especially I researched a lot about the singleton pattern. Actually, it has a simple logic, but I realized that I don't have a full command of the subject yet. When I came to the conclusion that I should make the constructor private in Javascript, I was a bit stunned. But I learned a structure that can behave like private without making the constructor private: Object.freeze (). Tomorrow I'm thinking to solve it on a good example. If I can, I'll try to do async, singleton, privacy with module pattern and factory pattern in one code. If I can't, I'm thinking to write and comment them all separately. Today, while looking at design patterns, I learned that they are actually developed with object-oriented programming. Then I found something called UML (Unified Modelling Language). With UML, object-oriented models designed abstractly can be visualized. Even the simplest issues such as the inheritance relationship between classes can be visualized. In other words, design patterns seem to have been born as a reaction to very similar problems that have accumulated for years in software, and to produce a solution according to this pattern. In this way, the readability and correctability of the code increases. Because you can comprehend the design pattern and logic of the person who wrote that code before you.

Day 9

Today, until lunchtime, I tried to complete the assignment given yesterday. I researched Singleton and other constructs a lot and now I think I understand them. I want to learn things slowly, so I like to understand the existence of each construct and the reason for its use, instead of doing it fast and missing a lot of things. When I was doing the homework you gave me today, I realized that some structures need to be used a lot so that they are memorized. Just like learning a foreign language, you don't get much result without exposure. That's why I looked at Singleton, Factory patterns, async...await structure, and some try catch structure today. They were topics I've looked at before, but it was very good to repeat. Towards the end of the day I started to do the homework and most of it is done. Here's what I just need to do: Select the product the buyer wants randomly (or in the order it is found) from the array of unsold products, and then do the following operations. At the end of the day, I have the logic of that part in my head, and tomorrow I will continue where I left off.

Day 10

Today went well. While I was doing some parts of the assignment, I thought I couldn't do some parts, but I think I was able to get it done after thinking about it over and over again with a new breath. Although the outputs were not in the desired format, I am a little happy that the right things came out. It was especially nice to 'read' a code with your own labor, to analyze it, to shape it in line with what was desired. Inevitably, there are many places where logic comes into play and this gives you pleasure because you use your intelligence and create something. Yes, let's come to the things I need to write:
  • Today I learned better how a code using the singleton pattern works. I reinforced how to extract an object from a class and how to do other operations on those objects. I used everything we have learned so far such as .foreach, .map, .push, if statement, for loop, etc. in this example. Adding an object to an array, removing an object from an array (hiding it, more precisely, because of the method I used), using another function as an argument inside a function, in short, objects and arrays were on the agenda today. And I think making this example helped a lot. Most of the day was spent trying to understand the logic of the assignment in different ways and coming up with solutions.
  • I learned the concept of module today. We may need to save some code fragments in several different files within the same file and perform operations accordingly. Here, I learned the commands that will act as a bridge between those files. Although they have slightly different names in ES6 and Node Runtime environments, the general logic is the same. The 'module.exports' and 'require()' constructs are basically used for Node to export and import. I looked at a few examples and tried it myself.
  • This is actually a bit of preliminary research and reading for background information. I did some research on HTTP Requests and I came across concepts like 'event loop, heap, stack, event queue' and even 'XML, AJAX'. I did some reading about them and watched some videos to visualize them. In more detail:
    • The best feature of Javascript is that it's non-blocking, or asynchronous.
    • Websites with a lot of photos, for example, will have a better user experience with this feature. For example, a newspaper website might have large photo files. If you wait for them to load, the user doesn't want to stop or has to wait. But it is possible to read the articles in the meantime.
    • Event loop is used for asynchronous function calls in javascript. Function calls are added to the stack. Function requests that have to wait for the server to respond are forced to queue. As soon as the stack is empty, the next ones are executed. The execute order is determined by the first in, first out rule.
    • Web developers also use event loops for a better user experience.
I think I am starting to learn what I need to learn, but I am still at the very beginning. I hope the end will be good, that's all for today.