<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://m3r3k.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://m3r3k.github.io/" rel="alternate" type="text/html" /><updated>2026-08-06T19:46:30+00:00</updated><id>https://m3r3k.github.io/feed.xml</id><title type="html">Blog of Kerem</title><subtitle>Technology and philosophy</subtitle><entry><title type="html">Flutter installation</title><link href="https://m3r3k.github.io/flutter/2024/12/05/flutter_installation.html" rel="alternate" type="text/html" title="Flutter installation" /><published>2024-12-05T02:01:13+00:00</published><updated>2024-12-05T02:01:13+00:00</updated><id>https://m3r3k.github.io/flutter/2024/12/05/flutter_installation</id><content type="html" xml:base="https://m3r3k.github.io/flutter/2024/12/05/flutter_installation.html"><![CDATA[<p>Flutter is a multi platform development framework that is made by Google team to accelerate the process of developing
    multi platform apps on a single codebase. It is a versatile tool for developers as it has a dedicated team of
    developers and a superb quality of documentation behind it.</p>

<p>But, as with any software, there are some problems that you might face when you're trying to install it on your
    machine </p>

<h2 class="section-heading">Installation problems</h2>
<p>When I was trying to install flutter on my machine, I faced some problems that I want to share with you. </p>
<p>First of all; before installation, you have to have:</p>
<ul>
    <li>Git</li>
    <li>Powershell or a cmdline software.</li>
    <li>Minimum 7gb of disk space</li>
</ul>
<p>After you have these, you can start the installation process. </p>
<p>First, you have to clone the flutter repository from the github. You can do this by typing the following command in
    your terminal:</p>
<div class="container">
    <div class="code-wrapper">
        <pre>
             <button id="copy-button">Copy</button>
              <code id="code" class="language-bash">git clone https://github.com/flutter/flutter.git</code>
</div>

<p>After you have cloned the repository, you have to add the flutter/bin directory to your PATH variable. 
    Now this step is where I have stuck earlier when installing flutter, as I didn't realize I had to add the bin folder,
     so I only added flutter folder which unsurprisingly it did not work</p>
<p>After you have added the bin folder to your PATH variable, you can run the following command to check if the flutter is
    installed correctly:</p>
<div class="container">
    <div class="code-wrapper">
        <pre>
             <button id="copy-button">Copy</button>
              <code id="code" class="language-bash">flutter doctor
flutter doctor --android-licenses
              </code>
        </pre>
    </div>

</div>
<p>After you have ran this command, you will see the output of the flutter doctor command.
    Now the next step involves downloading and installing
    Android Studio which is a straightforward process. Even if
    you don't use the Android Studio which is powered by
    Jetbrains IDE, you have to install it because it is needed to
    download android toolchain</p>
<p>After you have installed the Android Studio, you have to open it and go to the settings. In the settings, you have to
    go to languages section where there is an Android SDK section where you can download the Android Command Line Tools.
</p>
<img src="/img/posts/flutter_install/01.png" class="img-fluid">

<p> After you have downloaded the tools, you can close the Android Studio and go back to the IDE of your choosing and
    start developing awesome apps!</p>]]></content><author><name></name></author><category term="flutter" /><summary type="html"><![CDATA[Flutter is a multi platform development framework that is made by Google team to accelerate the process of developing multi platform apps on a single codebase. It is a versatile tool for developers as it has a dedicated team of developers and a superb quality of documentation behind it.]]></summary></entry><entry><title type="html">Stateless vs Stateful Widgets in Flutter</title><link href="https://m3r3k.github.io/flutter/2024/12/05/stateless_vs_stateful.html" rel="alternate" type="text/html" title="Stateless vs Stateful Widgets in Flutter" /><published>2024-12-05T02:01:13+00:00</published><updated>2024-12-05T02:01:13+00:00</updated><id>https://m3r3k.github.io/flutter/2024/12/05/stateless_vs_stateful</id><content type="html" xml:base="https://m3r3k.github.io/flutter/2024/12/05/stateless_vs_stateful.html"><![CDATA[<p>In Flutter, stateless and stateful widgets are two fundamental types of widgets that define how a UI component
  behaves and interacts with the application state. It is important to differentiate between them as it is a concept
  used every time a developer tries to create a new widget</p>

<h2 class="section-heading">Stateless Widgets</h2>
<p>A StatelessWidget is immutable, meaning it cannot change its state after being created. It is designed for widgets
  whose configuration and appearance remain constant throughout their lifecycle.</p>
<h4>Characteristic properties of Stateless Widgets</h4>
<ul>
  <li>
    Immutable: Once created, the widget cannot change.
  </li>
  <li>
    Lightweight: Suitable for UI elements that do not need to update or interact dynamically.
  </li>
  <li>Rebuild Mechanism: When the widget tree is rebuilt (e.g., due to a parent widget's state change), a new instance
    of the StatelessWidget is created.</li>
</ul>
<p> Stateless widgets are typically used in Static text or images, icons and layout containers such as Row, Column or
  Containers. Example code given below:</p>

<div class="container">
  <div class="code-wrapper">
    <pre>
                 <button id="copy-button">Copy</button>
                  <code id="code" class="language-dart">class MyStatelessWidget extends StatelessWidget {
final String title;
                  
MyStatelessWidget({required this.title});
                  
@override
Widget build(BuildContext context) {
    // Displays the title passed during creation
    return Text(title); 
    }
}
                  </code>
</div>

<p>In this example, MyStatelessWidget simply displays the title. You can't update the title after the widget is created.</p>


<h2 class="section-heading">Stateful Widgets</h2>
<p>A StatefulWidget is dynamic and can change during its 
    lifecycle based on user interaction, data updates, or other events. It consists of two classes:
</p>

<ul>
    <li><em>StatefulWidget Class</em>: Represents the widget itself.</li>
    <li><em>State Class:</em> Maintains the state of the widget and contains logic to update the UI.</li>
</ul>

<h4>Characteristic properties of Stateful Widgets</h4>

<ul>
    <li>Dynamic State: Can update or modify the UI in response to events.</li>
    <li>State Management: The State class stores properties that change and provides methods like setState to trigger updates.</li>
    <li>Lifecycle Methods: Includes methods such as initState, setState, and dispose to manage the widget's lifecycle.</li>
</ul>

<p>Stateful Widgets are typically used in Form inputs, 
    Buttons with toggling states, Animations or timers or generally 
    Widgets that respond to asynchronous data(Such as API calls).</p>



    <div class="container">
        <div class="code-wrapper">
            <pre>
                     <button id="copy-button">Copy</button>
                      <code id="code" class="language-dart">class MyStatefulWidget extends StatefulWidget {
  @override
  _MyStatefulWidgetState createState() => _MyStatefulWidgetState();
}

class _MyStatefulWidgetState extends State<MyStatefulWidget> {
  int counter = 0;

  void incrementCounter() {
    setState(() {
      counter++; // Updates the counter and refreshes the UI
    });
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        Text('Counter: $counter'),
        ElevatedButton(
          onPressed: incrementCounter,
          child: Text('Increment'),
        ),
      ],
    );
  }
}
                      </code>
    </div>

<p>In this example, pressing the button updates the counter state, 
    which triggers a UI rebuild to reflect the new value. 
    This is also the default code when building a new project in flutter.</p>

<h4>Choosing Between Stateless and Stateful Widgets</h4>
<ul>
    <li>Use <b>StatelessWidget</b> when the widget does not need to change after being created.</li>
    <li>Use <b>StatefulWidget</b> when the widget needs to respond to user input, animations or data updates dynamically.</li>

</ul>

<p>Understanding the difference between Stateless and Stateless Widget is crucial as it affects the design of the whole application!</p>]]></content><author><name></name></author><category term="flutter" /><summary type="html"><![CDATA[In Flutter, stateless and stateful widgets are two fundamental types of widgets that define how a UI component behaves and interacts with the application state. It is important to differentiate between them as it is a concept used every time a developer tries to create a new widget]]></summary></entry><entry><title type="html">Garbage collection</title><link href="https://m3r3k.github.io/technology/2023/05/03/garbage.html" rel="alternate" type="text/html" title="Garbage collection" /><published>2023-05-03T14:45:13+00:00</published><updated>2023-05-03T14:45:13+00:00</updated><id>https://m3r3k.github.io/technology/2023/05/03/garbage</id><content type="html" xml:base="https://m3r3k.github.io/technology/2023/05/03/garbage.html"><![CDATA[<p>In a typical program that runs code and dynamically allocates the part of your memory on your hardware, it's mostly
    unknown how much memory you will use concurrently. This program can be anything from a website that you load up on
    your browser to a game that you play on lazy Saturday nights. So the implementation of garbage collection basically
    does is, it constantly searches and detects a memory that is not referenced(used) but allocated for the program and
    when it detects the aforementioned memory, it releases it so other processes can use that bit of space to run
    smoothly and makes it possible to multitask on modern computers.</p>

<img src="https://images.unsplash.com/photo-1542978709-19c95dc3bc7e?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1074&q=80"
    class="img-fluid">
<span class="caption text-muted">Volatile memory is stored in a RAM modules. (Photo by <a
        href="https://unsplash.com/@possessedphotography?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Possessed
        Photography</a> on <a
        href="https://unsplash.com/photos/nuc3NFB_6po?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash)</a>
</span>



<h2 class="section-heading">Manual memory management</h2>
<p>Typically in older programming languages for example, in C language you manually get a memory space with certain
    functions. So to get a memory of a certain quantity, you have to type how many bytes you want to allocate and free
    that memory space once you're done using it. To give an example of this, here is an example code written in C:
</p>

<div class="container">
    <p class="language" id="language-copy">C</p>
    <div class="code-wrapper">
        <pre>
            <button id="copy-button">Copy</button>
            <code id="code" class="language-c">#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
int main() {
    int *ptr;
    int n = 5;
    ptr = (int*) malloc(n * sizeof(int)); // allocate memory for 5 integers
    if (ptr == NULL) {
        printf("Memory allocation failed");
        exit(1); // exit the program with an error code
    }
    // assign values to the memory block
    for (int i = 0; i < n; i++) {
        *(ptr + i) = i;
    }
    // print the values from the memory block
    for (int i = 0; i < n; i++) {
        printf("%d ", *(ptr + i));
    }
    free(ptr); // free the allocated memory
    return 0;
}     
            </code>
        </pre>
    </div>
    <span id="copy-success">Copied to clipboard!</span>
</div>
<script src="/js/code.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>

<p>The Malloc function takes one argument, which is the amount of memory to allocate in bytes. It then returns a pointer
    to the allocated block of memory. In the case of allocation, the operation is not successful, the function returns a
    NULL pointer. Here in the given code we've allocated 5 integer amounts of bytes to ptr and assigned values to them.
    Then finally we freed the allocated memory using the free function. Freeing existing memory at the last step is
    really important in order to prevent memory leaks. The common error people make when building large-scale codebases
    on these languages is that when at any point of the program, the allocated memory is not freed, the computer won't
    take it back because it is flagged as being used by that program. The other common mistake is when you freed the
    memory and you try to access that same bit of memory, in that case, the OS might have given that block to some other
    process and because of that, you might get compile-time errors or some random value you didn't ask for.</p>
<img src="https://images.unsplash.com/photo-1589995186011-a7b485edc4bf?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80"
    class="img-fluid">
<span class="caption text-muted">Photo by <a
        href="https://unsplash.com/@redaquamedia?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Denny
        Müller</a> on <a
        href="https://unsplash.com/photos/1qL31aacAPA?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
</span>


<p>In this approach, as we have seen from the examples, we might encounter loads of problems. So in order to get ahead
    of that, most high-level programming languages have some sort of garbage collection built in. In short, garbage
    collection basically gives you memory when you don't need it anymore.</p>

<h2 class="section-heading">Ways of garbage collection</h2>

<p>The most obvious way of garbage collection is reference counting. In this method, the allocated memory has a property
    called reference counter, you keep track of how many references that bit of memory has, and you free the
    aforementioned memory when it finally has zero references in the program. This approach has its own tradeoffs,
    firstly you have to remember to add or decrease this property and the other one is that with this approach you now
    have an integer associated with all of the memory spaces in your program which makes the program memory inefficient
    and can decrease the program's performance. Another problem is some sort of memory leak where you have some memory
    blocks with reference counter that doesn't go zero in order to free them. This in itself can be classified as a
    memory leak. With its tradeoffs, the reference counting is used in programming languages like Python where it's used
    with other sound methods of garbage collection like mark and sweep algorithm.</p>

<h2 class="section-heading">Mark and sweep</h2>
<p>To understand the mark and sweep algorithm we need to know about live memory and dead memory concepts. Live memory is
    a memory block that is actively referenced, whereas dead memory is a memory block that doesn't have any references
    to it.</p>
<img src="/img/posts/garbage/garbage1.jpg" class="img-fluid">
<span class="caption">In this example, x and y is referencing memory blocks 1 and 2 so they are live memory and
    therefore marked.</span>
<p>Mark stage goes through all of the accessible memory blocks, even the blocks that are not directly referenced. Here
    in this example if we remove the y reference to the memory block 2:</p>
<img src="/img/posts/garbage/garbage2.jpg" class="img-fluid">
<p>Marking goes through all the direct or indirect references marks them one by one sort of like a boolean value,
    because of that the program size is lower than the reference count method.</p>
<img src="/img/posts/garbage/garbage3.jpg" class="img-fluid">

<p>Sweeping stage frees up the unmarked memory block, making our program less dependent on high chunks of memory.
</p>

<br>
<h6><em>Source section</em></h6>
<ul>
    <li class="sourceItem">Debnath, M. (2023) Understanding garbage collection in go, Developer.com. Available at:
        https://www.developer.com/languages/garbage-collection-go/ (Accessed: May 3, 2023). </li>
    <li class="sourceItem">DeBrie, A. (2023) Python garbage collection: What it is and how it works, Stackify. Available
        at: https://stackify.com/python-garbage-collection/ (Accessed: May 3, 2023). </li>
    <li class="sourceItem">Garbage collection in Java (2022) GeeksforGeeks. GeeksforGeeks. Available at:
        https://www.geeksforgeeks.org/garbage-collection-java/ (Accessed: May 3, 2023). </li>
    <li class="sourceItem">Garbage Collector Design (no date) Python Developer's Guide. Available at:
        https://devguide.python.org/internals/garbage-collector/ (Accessed: May 3, 2023). </li>
    <li class="sourceItem">Heller, M. (2023) What is garbage collection? Automated Memory Management for your programs,
        InfoWorld. InfoWorld. Available at:
        https://www.infoworld.com/article/3685493/what-is-garbage-collection-automated-memory-management-for-your-programs.html
        (Accessed: May 3, 2023). </li>
</ul>]]></content><author><name></name></author><category term="technology" /><summary type="html"><![CDATA[In a typical program that runs code and dynamically allocates the part of your memory on your hardware, it's mostly unknown how much memory you will use concurrently. This program can be anything from a website that you load up on your browser to a game that you play on lazy Saturday nights. So the implementation of garbage collection basically does is, it constantly searches and detects a memory that is not referenced(used) but allocated for the program and when it detects the aforementioned memory, it releases it so other processes can use that bit of space to run smoothly and makes it possible to multitask on modern computers.]]></summary></entry><entry><title type="html">Philosophy of Nietzsche</title><link href="https://m3r3k.github.io/philosophy/2023/04/25/nietzsche.html" rel="alternate" type="text/html" title="Philosophy of Nietzsche" /><published>2023-04-25T14:45:13+00:00</published><updated>2023-04-25T14:45:13+00:00</updated><id>https://m3r3k.github.io/philosophy/2023/04/25/nietzsche</id><content type="html" xml:base="https://m3r3k.github.io/philosophy/2023/04/25/nietzsche.html"><![CDATA[<p>Friedrich Wilhelm Nietzsche was born on October 15, 1844, to a middle-class family with his father being the Lutheran
    Minister in the village of Röcken, close to Leipzig. His father and his brother died when he was only 5 years old
    and was the only male in his household. Shortly after these losses, the family moved to an urban neighborhood in
    Naumburg, Saxony.
    In his early teens, he joined the prestigious Christian school called Schulpforta where he received education in
    Theology, Humanities. While studying he left a good impression on his teachers.</p>

<img src="https://www.thoughtco.com/thmb/ovHIYN1hxn0xFyDLKnyQCqt1pys=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc():format(webp)/nietzscheportrait-a6cfe34a104349e5b59991a1c94ea482.jpg"
    class="img-fluid">
<span class="caption">Nietzsche emphasised will and power in his works.</span>



<p> In 1864 he entered the University of Bonn and shortly after his entry, he focused his academic life on Philology
    where he wanted to study classical languages. His contribution and curiosity towards ancient texts (mainly ancient
    Greek) drew the attention of Professor Ritschl and he was praised highly of him during that period. With all the
    praise he became semi-famous in the academic scene. He, later on, entered the University of Basel in Switzerland and
    became the Professor of Greek Language and Literature just at 24 years old.
</p>
<img src="https://www.historytoday.com/sites/default/files/2021-03/Basel.jpg" class="img-fluid">
<span class="caption">Depiction of Basel in 1493.</span>



<p>But he quickly lost interest in becoming an academician and later on moved to Sils Maria on the outskirts of the
    Swiss Alps and lived relatively peacefully while working on his sensational philosophic ideas. He published The
    Birth of Tragedy, Human All to Human, The Gay Science, Thus Spoke Zarathustra, and many more where he talked in
    great depth about his philosophy.
    At that point in his life, he was having difficulties with his family, was failing relationships with women and his
    books weren't selling as expected. And when he was mid 40's he had a mental breakdown and when he was trailing on
    the street he saw a horse getting beaten by its driver and quickly embraced the horse shouting "I understand you".
    Nietzsche never recovered from that breakdown.</p>

<img class="img-fluid" src="https://upload.wikimedia.org/wikipedia/commons/b/b9/Nietzsche_Olde_11.JPG" alt="">
<span class="caption">Nietzsche never really recovered from his mental breakdown.</span>

<p>Despite being depressed and having constant breakdowns, Nietzsche's philosophy was full of heroism and
    self-improvement. His ideal type of human was called an ÜBERMENSCH(superman) who overcomes difficulties and accepts
    what life throws at them. His work emphasized on getting people to become who they are in life. In order to achieve
    that, we need to implement 4 main recommendations.</p>

<h2 class="section-heading">Four main recommendations of Nietzsche</h2>

<p>The first one of the recommendations is owning up to envy whereas major Abrahamic religions teach envy as something
    to be feel ashamed of and it is associated with evil. However, to Nietzsche, being envious as long as we utilize it
    to make our life better than today. Every person should be seen as a goal rather than a pure object that makes us
    jealous. People who cross the boundaries of success are hinting us who we might become one day. This approach
    basically tells us that we should face up our true desires and resist them and only then if we encounter failure we
    should mourn it. Übermensch utilizes that principle in his/her life.</p>

<img src="https://images.unsplash.com/photo-1613834926943-9e4ac2945744?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=870&q=80"
    class="img-fluid">
<span class=" caption">Nietzsche's idea of superman was not as hollywood depicted but was much more subtle and
    interesting man.(Photo by <a
        href="https://unsplash.com/@messrro?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Mehdi
        MeSSrro</a> on <a
        href="https://unsplash.com/photos/-1v0JL_wINc?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
    )</span>

<p>His second recommendation was "Don't be a Christian". In Abrahamic religions, envy is associated with evil and
    emerged from the mindset of timid slaves that lacked the courage to get what they wanted. Those wanted entities
    could be money, fame, power, and women. Being a Christian, one was always clung to a philosophy that embraces
    cowardice. This was called slave morality in Nietzsche's terms. Religious people deemed these values as evil and
    embraced a hypocritical ideology and condemned what they always wanted. So in other words, sexlessness, and poverty
    became some sort of purity and goodness. Therefore Christianity is a giant cage for people who are in resentful
    denial.</p>
<img src="https://cdn.thecollector.com/wp-content/uploads/2022/03/michelangelo-creation-adam-detail-featured.jpg?width=1200&quality=70"
    class="img-fluid">
<span class="caption">To Nietzsche being a christian is accepting a hypocritical creed.</span>

<p>The third one on the list is "Never drink alcohol." Nietzsche himself was quite an interesting man as he only drank
    water. He makes the argument that narcotic substances and mind-numbing ideologies are the most dangerous to modern
    civilizations as it impedes the thinking process and numb people physiologically and mentally. Nietzsche hated the
    idea of numbing pain and reassurance of ideas at the expense of facing the truths and changing our lives for the
    better. As you can tell by these recommendations, he was an anti-conformist from the heart. As he calls it "The
    secret of a fulfilled life is: live dangerously."</p>
<img src="https://images.unsplash.com/photo-1520371764250-8213f40bc3ed?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80"
    class="img-fluid">
<span class="caption">"Taking action and facing problems head-on is the correct approach to life."</span>


<p>The last recommendation is "God is dead". His statement is not some sort of a celebration call, and the decrease in
    belief in higher order is not anything to cheer about. He understood that religion is false however, he also
    acknowledged that the belief helps us cope with the distress of life.
    This kind of deterioration of belief should be replaced by culture and fine arts in the form of art, music etc. For
    Nietzsche, philosophers should be on the fore front in handling great developments in social life and guide people
    when transitioning from old to the new age.</p>

<br>
<h6><em>Source section</em></h6>
<ul>
    <li class="sourceItem">Magnus, B. (2023) Friedrich Nietzsche, Encyclopædia Britannica. Encyclopædia Britannica, inc.
        Available at: https://www.britannica.com/biography/Friedrich-Nietzsche (Accessed: April 25, 2023). </li>
    <li class="sourceItem">Mambrol, N. (2019) The philosophy of Friedrich Nietzsche, Literary Theory and Criticism.
        Available at: https://literariness.org/2019/04/18/the-philosophy-of-friedrich-nietzsche/ (Accessed: April 25,
        2023). </li>
    <li class="sourceItem">May-Hobbs, M. (2023) Nietzsche: A guide to his most famous works and ideas, TheCollector.
        Available at: https://www.thecollector.com/nietzsche-famous-works-and-ideas/ (Accessed: April 25, 2023). </li>
    <li class="sourceItem">Rothfeld, B. (2018) How to live better, according to Nietzsche, The Atlantic. Atlantic Media
        Company. Available at:
        https://www.theatlantic.com/magazine/archive/2018/10/nietzsches-guide-to-better-living/568375/ (Accessed: April
        25, 2023). </li>
    <li class="sourceItem">Töniges, S. (2020) Nietzsche: The thinker who exploded the philosophy world – DW –
        08/25/2020, dw.com. Deutsche Welle. Available at:
        https://www.dw.com/en/friedrich-nietzsche-the-dynamite-german-philosopher/a-54691125 (Accessed: April 25, 2023).
    </li>
</ul>]]></content><author><name></name></author><category term="philosophy" /><summary type="html"><![CDATA[Friedrich Wilhelm Nietzsche was born on October 15, 1844, to a middle-class family with his father being the Lutheran Minister in the village of Röcken, close to Leipzig. His father and his brother died when he was only 5 years old and was the only male in his household. Shortly after these losses, the family moved to an urban neighborhood in Naumburg, Saxony. In his early teens, he joined the prestigious Christian school called Schulpforta where he received education in Theology, Humanities. While studying he left a good impression on his teachers.]]></summary></entry><entry><title type="html">Dijkstra’s algorithm</title><link href="https://m3r3k.github.io/technology/2023/04/11/Dijkstra.html" rel="alternate" type="text/html" title="Dijkstra’s algorithm" /><published>2023-04-11T14:45:13+00:00</published><updated>2023-04-11T14:45:13+00:00</updated><id>https://m3r3k.github.io/technology/2023/04/11/Dijkstra</id><content type="html" xml:base="https://m3r3k.github.io/technology/2023/04/11/Dijkstra.html"><![CDATA[<p>In our daily lives, most of us are travelling frequently from Point A to Point B, now this might be your home to your
    office or to your mistress who nobody knows about, you need a tool that navigates you through your ethically
    ambiguous journey. There is no better tool than GPS on our phones which we can rely on to take us toward our
    destination. Now the joke was that the GPS tools were taking us through some bizarre paths and they were somewhat
    unreliable, this was in the early smartphone era where map data around the world was scarce and the algorithms that
    created these paths were not very much optimized. Today, thanks to advanced imaging and large quantities of mapping
    data this problem has become a thing of the past. The algorithm which almost every Computer Science student has
    learned or at least heard of had published back in 1956 by Dutch computer scientist Dr. Edsger W.Dijkstra</p>

<img src="https://www.freecodecamp.org/news/content/images/2020/09/image-112.png" class="img-fluid">
<span class="caption text-muted">Dr. Edsger Dijkstra at ETH Zurich in 1994 (image by Andreas F. Borchert)</span>



<h2 class="section-heading">Brief introduction of graph concepts</h2>
<p>To explain Dijkstra's algorithm, one should need to understand the basic concepts of graphs. In short, graphs are
    data structures that are used to denote connections between pairs of elements. We call these elements nodes.
    Sometimes these nodes are directed, which means for example we can go from A to B but not from B to A. As a final
    concept, there is the weight property which denotes the weight of a certain connection, this can be thought of as
    the distance between points.
</p>

<img class="img-fluid"
    src="https://images.unsplash.com/photo-1456428746267-a1756408f782?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2070&q=80"
    style="width: 90%;">
<span class="caption text-muted">Graphs are a fundamental concept in data structures. (Photo by Clint Adair on
    Unsplash)</span>

<p>The algorithm starts at the chosen node and keeps track of the currently known shortest distance from each of the
    connections to the starting node and it updates when it finds a shorter path. Once it found the shortest connection
    that node is marked as visited and added to the path. This goes on until all the nodes have been added to the path.
    To demonstrate I put together an example graph to further understand the concepts.</p>

<img class="img-fluid" src="/img/posts/dijkstra/Graph.jpg" alt="">
<p>We will keep track on what is the shortest path from node S (start) to E (end) and also list the shortest path to
    every individual node.</p>
<h4>Distance: S=0, A=∞, B=∞, C=∞, J=∞, K=∞, E=∞</h4>
<h4>Unvisited nodes:{A, B, C, J, K, E}</h4>
<p>At this point, we need to check the distance from starting node to the neighboring nodes.After that, we need to
    update the distance list</p>
<h4>Distance: S=0, A=2, B=6, C=∞, J=∞, K=∞, E=∞</h4>
<p>Then we need to select the node that is closest to the starting node and mark it as visited and also add it to our
    path.</p>
<img class="img-fluid" src="/img/posts/dijkstra/graph-a-b.jpg" alt="">
<h4>Unvisited nodes:{B, C, J, K, E}</h4>
<p>At this point, we need to further analyze the new adjacent nodes and update our distance list. Since we already
    analyzed node B, we only need to update the new node C.</p>
<h4>Distance: S=0, A=2, B=6, C=7, J=∞, K=∞, E=∞</h4>
<p>Before going through the other junction, we will backtrack and analyze the node B to C</p>
<img class="img-fluid" src="/img/posts/dijkstra/graph-a-b-c.jpg" alt="">
<h4>C = 2+5 vs 6+8 shortest is 2+5=7
</h4>
<h4> Distance: S=0, A=2, B=6, C=7, J=∞, K=∞, E=∞</h4>
<h4>Unvisited nodes:{J, K, E}</h4>
<p>We continue updating our node distances</p>
<h4>J= 2+5+15
    K=2+5+10</h4>
<img class="img-fluid" src="/img/posts/dijkstra/graph-k.jpg" alt="">
<h4>Unvisited nodes:{J, E}</h4>
<p>We will continue through the K junction to find the node E</p>
<h4>node E= 2+5+10+2 vs 2+5+15+6 =19</h4>
<p>node E becomes 19 and therefore the shortest path from S to E becomes:<br>
    S => A =>C => K =>E</p>
<img class="img-fluid" src="/img/posts/dijkstra/graph-e.jpg" alt="">
<hr>
<h2 class="section-heading">Conclusion </h2>
<p>To summarize all that we have talked about, Dijkstra's algorithm helps us find the shortest path in a given graph. It
    is used on navigation systems, although a modified version of some sort, because in this algorithm we check every
    possible node to reach our final destination, let's say we want to apply a large graph, then it becomes inefficient
    to check for all nodes. This algorithm is highly optimized later on to give priorities to certain nodes in order to
    be more efficient and faster.</p>

<br>
<h6><em>Source section</em></h6>
<ul>
    <li class="sourceItem">Abbas, S. H. (n.d.). What is Dijkstra's algorithm? Educative. Retrieved April 11, 2023, from
        https://www.educative.io/answers/what-is-dijkstras-algorithm </li>
    <li class="sourceItem">Dodsworth, D. (2023, March 14). Dijkstra's shortest path algorithm explained, with examples.
        History. Retrieved April 11, 2023, from
        https://history-computer.com/dijkstras-shortest-path-algorithm-explained-with-examples/ </li>
    <li class="sourceItem">Navone, E. C. (2022, February 3). Dijkstra's shortest path algorithm - a detailed and visual
        introduction. freeCodeCamp.org. Retrieved April 11, 2023, from
        https://www.freecodecamp.org/news/dijkstras-shortest-path-algorithm-visual-introduction/ </li>
</ul>]]></content><author><name></name></author><category term="technology" /><summary type="html"><![CDATA[In our daily lives, most of us are travelling frequently from Point A to Point B, now this might be your home to your office or to your mistress who nobody knows about, you need a tool that navigates you through your ethically ambiguous journey. There is no better tool than GPS on our phones which we can rely on to take us toward our destination. Now the joke was that the GPS tools were taking us through some bizarre paths and they were somewhat unreliable, this was in the early smartphone era where map data around the world was scarce and the algorithms that created these paths were not very much optimized. Today, thanks to advanced imaging and large quantities of mapping data this problem has become a thing of the past. The algorithm which almost every Computer Science student has learned or at least heard of had published back in 1956 by Dutch computer scientist Dr. Edsger W.Dijkstra]]></summary></entry><entry><title type="html">What is big O Notation</title><link href="https://m3r3k.github.io/technology/2023/04/04/bigO.html" rel="alternate" type="text/html" title="What is big O Notation" /><published>2023-04-04T14:45:13+00:00</published><updated>2023-04-04T14:45:13+00:00</updated><id>https://m3r3k.github.io/technology/2023/04/04/bigO</id><content type="html" xml:base="https://m3r3k.github.io/technology/2023/04/04/bigO.html"><![CDATA[<p>One of the fundamental building concepts of Computer Science is big O notation. Students may learn this concept in
    their data structures and algorithms course because, in basic terms, big O notation is used to describe the
    efficiency of a certain algorithm. This type of approach lets us compare different algorithms and lets us decide
    whether or not we should implement that algorithm given its size and function.</p>

<img src="https://images.unsplash.com/photo-1642952469120-eed4b65104be?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80"
    class="img-fluid">
<span class="caption text-muted">Photo by <a
        href="https://unsplash.com/@alpridephoto?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Андрей
        Сизов</a> on <a
        href="https://unsplash.com/photos/nuz3rK5iiKg?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
</span>



<h2 class="section-heading">The role of big O notation in data structures and algorithms</h2>
<p>To type out this notation shortly, when we want to show the runtime complexity of a linear search algorithm it is
    simply: " <em>O(n)</em> "<br>
    This means that the time increases linearly as the number of elements increases. This deduction has been made by
    considering the worst possible scenario in a given algorithm. The runtime of let's say a sorting algorithm can be as
    little as one(instant), however, this is not guaranteed and therefore is not taken into account when we talk about
    big O notation. Here are the different algorithms with their big O notations and their relative positions on a
    linear graph.</p>

<img class="img-fluid" src="/img/posts/bigO/03_02.jpg" style="width: 90%;">
<span class="caption text-muted">As the graph shows, we can deduct whether an algorithm is efficient and its feasibility
    before implementing it.</span>

<h2 class="section-heading">Combining algorithms and for loops</h2>
<p>When combining different big O values, we must follow these mathematical rules. Firstly, let us imagine two
    functions, namely f, and g which have their own runtime complexity.<br>
    If we want to combine these two algorithms and
    deduct the big O notation of the combined algorithm, we would get: <em>O(f(n) + g(n))</em> <br>
    Consequently, when we iterate over a set of elements or arrays, we get the size of the element as n where n is the
    number of elements( infinitely large) in the loop. The complexity can be expanded when we put the same size loop
    inside a loop where at that point, the big O notation expands exponentially.</p>

<img class="img-fluid" src="/img/posts/bigO/03_03.jpg">

<h2 class="section-heading">How code slows as data grows</h2>
<p>To conclude this post, big O notation is an essential tool when it comes to scalability, where the feasibility of
    certain approaches is decided by programmers. It is certainly a great tool for anyone working with the new emerging
    technologies in IT, namely Artificial Intelligence and Machine Learning.</p>
<br>
<h6><em>Source section</em></h6>
<ul>
    <li class="sourceItem">Cormen, T., &amp; Balkcom, D. (n.d.). Big-O notation (article) | algorithms. Khan Academy.
        Retrieved April 04, 2023, from
        https://www.khanacademy.org/computing/computer-science/algorithms/asymptotic-notation/a/big-o-notation </li>
    <li class="sourceItem">Huang, S. (2022, December 8). What is big O notation explained: Space and time complexity.
        freeCodeCamp.org. Retrieved April 04, 2023, from
        https://www.freecodecamp.org/news/big-o-notation-why-it-matters-and-why-it-doesnt-1674cfa8a23c/ </li>
    <li class="sourceItem">Nielsen, J. (2020). What is big O notation? jarednielsencom RSS. Retrieved April 04, 2023,
        from https://jarednielsen.com/big-o-notation/ </li>
</ul>]]></content><author><name></name></author><category term="technology" /><summary type="html"><![CDATA[One of the fundamental building concepts of Computer Science is big O notation. Students may learn this concept in their data structures and algorithms course because, in basic terms, big O notation is used to describe the efficiency of a certain algorithm. This type of approach lets us compare different algorithms and lets us decide whether or not we should implement that algorithm given its size and function.]]></summary></entry><entry><title type="html">Philosophy of Spinoza</title><link href="https://m3r3k.github.io/philosophy/2023/03/28/spinoza.html" rel="alternate" type="text/html" title="Philosophy of Spinoza" /><published>2023-03-28T04:45:13+00:00</published><updated>2023-03-28T04:45:13+00:00</updated><id>https://m3r3k.github.io/philosophy/2023/03/28/spinoza</id><content type="html" xml:base="https://m3r3k.github.io/philosophy/2023/03/28/spinoza.html"><![CDATA[<p>Baruch Spinoza (1632-1677) was a Dutch philosopher with a Portuguese-Jewish descendant. In this article, I want to
    tell a bit about Spinoza's philosophy and his interactions with the 17th-century European community.</p>


<img class="img-fluid" src="/img/posts/spinoza/02_01.jpg">
<span class="caption text-muted">Portrait of Spinoza</span>

<p>In his teens and early adult life, he met with plenty of people from diverse backgrounds through his time selling
    tropical fruit. His curiosity turned into questioning the accuracy of the Judaic religions when he started to
    attract attention as a heretic. This curiosity later grew when he read Pre-Adamitae (Man Before Adam) by Isaac La
    Peyrère. It challenged the ideas of the Catholic Church and consequently the whole Christian world by questioning
    the accuracy of the Bible and he supported his idea by suggesting the spread of human beings all over the world
    implies the nonexistence of Adam and Eve and concluded his remark by saying Bible is the history of Jews and their
    surrounding communities and should not be taken into account when examining the history of the world.
</p>
<img class="img-fluid"
    src="https://d3d00swyhr67nd.cloudfront.net/w1200h1200/collection/SOM/VAG/SOM_VAG_BATVG_P_1900_21-001.jpg"
    style="margin-left: 5%; width:90%;">
<span class="caption text-muted">17th-century Amsterdam was a metropolitan heart of Europe (Photo credit: Victoria Art
    Gallery)</span>



<p>In light of these events, he was formally excommunicated in 1656, and harsh rules were applied to anyone who dared to
    have any relationship with him. Despite this, his community offered help and was reluctant about his
    excommunication.
    A short time after he changed his name from Baruch to the Latin word Benedictus, both of which have the meaning of
    "blessed".During his time in Amsterdam, he had met with members of Collegiants and Quakers (religious groups in
    Amsterdam that resisted any formal creed and practice.) and joined their discord on philosophy, and formulated some
    parts of his philosophy from their doctrine.</p>
<blockquote class="blockquote">"Although I have been educated from boyhood in the accepted beliefs concerning Scripture,
    I have felt bound in the end to embrace other views" <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Baruch Spinoza
</blockquote>

<img class="img-fluid"
    src="https://www.learnreligions.com/thmb/u6G61LERScWzEJj5bs0TgMt2OU8=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc():format(webp)/QuakersBeliefs-72882874-594a9d083df78c537bac9fed.jpg"
    style="width: 95%;">
<span class="caption text-muted">Quakers were somewhat popular during the 17th-century</span>

<p>His philosophy in simple terms moves away religion from superstition, formal creeds, and practices. According to this
    belief only accepted scientific truths and facts were the objective truth. God is not a person who stands outside of
    nature; consequently, there is no one to hear our prayers to create miracle events or punish us for our sins beings
    aim, and most importantly, there is no afterlife. Despite all these claims he is not an atheist, quite the opposite
    he remained a persistent defender of God. Spinoza's God is the nature, existence, and the very fabric of the
    Universe and everything within the scope of imagination and therefore cannot be individuated. </p>

<img class="img-fluid" src="/img/posts/spinoza/02_04.jpg" style="width: 60%; margin-left: 7rem;">
<span class="caption text-muted">Ethica today is a popular philosophical book</span>

<p>Humans try to understand how and why the universe works the way it does and accept the things that come from
    scientific pursuits rather than whine, pray, or protest the facts and events.</p>

<blockquote class="blockquote">"Whoever loves god cannot strive that God should love him in return"</blockquote>
<p>To understand, the quote suggests that only a narcissistic and egocentric person believes in God and would take an
    interest in bending the rules of the Universe to benefit a single person. This philosophy was influenced heavily by
    Stoic philosophy which argued that the protest against how things are is not a wise action but making continuous
    attempts to understand the world and only then bow down to the Universe. The last part of Spinoza's philosophy is,
    how do you understand the concept of God? Well to understand God, one must understand how the Universe and life work
    through natural sciences, psychology, and philosophy. One of the most critical aspects of this is it suggests we can
    exceed to a divine eternal perspective through studying the Universe.</p>

<img class="img-fluid" src="https://fieldnotesathudson.files.wordpress.com/2021/02/cele.jpg?w=1024">
<span class="caption text-muted">As humans, we should strive to achieve scientific feats (Bill Ingalls/NASA, via Agence
    France-Presse — Getty Images)</span>

<p>According to Spinoza, there are two ways of looking at life. We can either act egoistically from our own perspective
    as he called it Sub Specie Durationis (under the aspect of time) or we can see things eternally Sub Specie
    Aeternitatis (under the aspect of eternity). Our life as we experience with our bones and flesh may pull us towards
    time bound view (Sub Specie Durationis) but our reason and intelligence can give us a unique perspective it can
    quite literally allow us to participate in eternal royalty (Sub Specie Aeternitatis)</p>

<h2 class="section-heading">Why was Spinoza not popular?</h2>
<p>The question then becomes why was Spinoza not popular for his beliefs. His famous book Ethica (Ethics) is one of the
    world's most beautiful books. It serves as a calming perspective regarding life. It replaces the all-powerful and
    sometimes angry God figure with a wise and consoling pantheistic type of God. The reason it is not popular is that
    religion includes far more emotion, belief, fear, and simply tradition. People stick to their religious beliefs
    because they like traditional values and regular events. Ethica is a well-structured book but it alone cannot
    contribute to people changing their beliefs. But in today's world even if Ethica is not known by a lot. Its ideas
    are more or less the cornerstone of western religious beliefs.</p>

<br>
<h6><em>Source section</em></h6>
<ul>
    <li class="sourceItem">BBC. (2009, July 3). Religions - christianity: Quakers. BBC. Retrieved March 28, 2023, from
        bbc.co.uk/religion/religions/christianity/subdivisions/quakers_1.shtml </li>
    <li class="sourceItem">Dutton, B. (n.d.). Internet encyclopedia of philosophy. Retrieved March 28, 2023, from
        https://iep.utm.edu/spinoza/ </li>
    <li class="sourceItem">Encyclopaedia Britannica, T. E. of. (2021). Quaker. Encyclopædia Britannica. Retrieved March
        28, 2023, from https://www.britannica.com/topic/Quaker </li>
    <li class="sourceItem">Encyclopædia Britannica, inc. (n.d.). Dutch civilization in the Golden Age (1609–1713).
        Encyclopædia Britannica. Retrieved March 28, 2023, from
        https://www.britannica.com/place/Netherlands/Dutch-civilization-in-the-Golden-Age-1609-1713 </li>
    <li class="sourceItem">Hopkin, R. (2023, April 1). Benedict de Spinoza. Encyclopædia Britannica. Retrieved March 28,
        2023, from https://www.britannica.com/biography/Benedict-de-Spinoza </li>
    <li class="sourceItem">Nadler, S. (2020, April 16). Baruch Spinoza. Stanford Encyclopedia of Philosophy. Retrieved
        March 28, 2023, from https://plato.stanford.edu/entries/spinoza/ </li>
    <li class="sourceItem">The Dutch Golden Age - a new breakthrough for Dutch art after the ... (n.d.). Retrieved March
        28, 2023, from https://artpaintingartist.org/dutch-golden-age-new-breakthrough-dutch-art-renaissance/ </li>
</ul>]]></content><author><name></name></author><category term="philosophy" /><summary type="html"><![CDATA[Baruch Spinoza (1632-1677) was a Dutch philosopher with a Portuguese-Jewish descendant. In this article, I want to tell a bit about Spinoza's philosophy and his interactions with the 17th-century European community.]]></summary></entry><entry><title type="html">Mandelbrot set is beautiful</title><link href="https://m3r3k.github.io/technology/2023/03/21/mandelbrot.html" rel="alternate" type="text/html" title="Mandelbrot set is beautiful" /><published>2023-03-21T02:01:13+00:00</published><updated>2023-03-21T02:01:13+00:00</updated><id>https://m3r3k.github.io/technology/2023/03/21/mandelbrot</id><content type="html" xml:base="https://m3r3k.github.io/technology/2023/03/21/mandelbrot.html"><![CDATA[<p>In mathematics, one of the most beautiful visual representations in my opinion is Mendelbrot set. To appreciate its
    beauty, one doesn't have to be a mathematician or from a similar background. However I think it is better to
    understand how we achieve this fractal pattern because it will show us that this pattern is not something
    human-made, but is a natural phenomenon. Next paragraph will explain the mathematics behind this set.</p>

<p>Firstly we will set our iterative function and set an initial real number.Our iterative function is as
    follows:<br>
</p>
<span style="margin: 0 35% 0 35%;"><em>f(z)
        = z² +c</em></span>

<p>What was most significant about the lunar voyage was not that man set foot on the Moon but that they set eye on the
    earth.</p>

<p>Let's say we chose 2 and the iterative values are: <br>
    1st: 6<br>
    2nd: 38 <br>
    3rd: 1446 <br>
    4th: 2090918 <br>
    ......</p>

<p>This value gets really big as we iterate on and on again, this means the value diverges over time. However the
    strange thing happens when we pick any value between -2 and 0.25 (inclusive), to show that let's say we pick 0.21 as
    an initial c value:</p>


<p>1st: 0.2541 <br>
    2nd: 0.27456681 <br>
    3rd: 0.2853869331535761 <br>
    4th: 0.2914457016148037 <br>
    5th: 0.2949405969897452 <br>
    ...</p>

<p>As you can tell by this example, this iteration is stabilizing around 0.29 and nearly never change around a
    significant iteration later. In mathematics this is called converging. This interval of numbers that are converging
    is called Mandelbrot set.</p>



<p>This can be shown in a simple graph:</p>

<img class="img-fluid" src="/img/posts/mandelbrot/01_img.png">

<p>As you can see there is nothing too interesting about that graph. However, when we add another dimension to this
    graph in the form of complex numbers, the graph will have the following shape where the behaviour of the iteration
    can be bounded which means the value will stay within a distance from the point zero but will not converge, it can
    converge or can diverge.</p>

<img src="https://upload.wikimedia.org/wikipedia/commons/2/21/Mandel_zoom_00_mandelbrot_set.jpg" class="img-fluid">

<h6 class="section-heading">Here is the example code:</h6>
<div class="container">
    <p class="language" id="language-copy">Java</p>
    <div class="code-wrapper">
        <pre>
            <button id="copy-button">Copy</button>
            <code id="code" class="language-java">public static void main(String[] args) {
    double number =0.21;
    double init =number;
    int i=0;
    while(i<8) {
        i++;
        number = number* number +init;
        System.out.println(number);
        }
}
            </code>
        </pre>
    </div>
    <span id="copy-success">Copied to clipboard!</span>
</div>


<br>
<h6><em>Source section</em></h6>
<ul>
    <li class="sourceItem">Mandelbrot set. from Wolfram MathWorld. (n.d.). Retrieved March 21, 2023, from
        https://mathworld.wolfram.com/MandelbrotSet.html </li>
    <li class="sourceItem">Devaney, R. (1970, November 24). What is the Mandelbrot set? Plus Maths. Retrieved March 21,
        2023, from https://plus.maths.org/content/what-mandelbrot-set </li>
    <li class="sourceItem">Fractal geometry. IBM100 - Fractal Geometry. (n.d.). Retrieved March 21, 2023, from
        https://www.ibm.com/ibm/history/ibm100/us/en/icons/fractal/ </li>
</ul>

<script src="/js/code.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>]]></content><author><name></name></author><category term="technology" /><summary type="html"><![CDATA[In mathematics, one of the most beautiful visual representations in my opinion is Mendelbrot set. To appreciate its beauty, one doesn't have to be a mathematician or from a similar background. However I think it is better to understand how we achieve this fractal pattern because it will show us that this pattern is not something human-made, but is a natural phenomenon. Next paragraph will explain the mathematics behind this set.]]></summary></entry></feed>