<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alexander Antoniades on Medium]]></title>
        <description><![CDATA[Stories by Alexander Antoniades on Medium]]></description>
        <link>https://medium.com/@alexantoniades?source=rss-7916ada57528------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kYWLq7wHWMiANmoqztvBIQ.jpeg</url>
            <title>Stories by Alexander Antoniades on Medium</title>
            <link>https://medium.com/@alexantoniades?source=rss-7916ada57528------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 10:24:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alexantoniades/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A simple guide to useEffect in React]]></title>
            <link>https://medium.com/@alexantoniades/a-simple-guide-to-useeffect-in-react-b8cb985034f9?source=rss-7916ada57528------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8cb985034f9</guid>
            <category><![CDATA[useeffect]]></category>
            <category><![CDATA[hooks]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Alexander Antoniades]]></dc:creator>
            <pubDate>Fri, 30 Dec 2022 14:57:00 GMT</pubDate>
            <atom:updated>2022-12-30T15:36:15.099Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fk8DgRZdp6PsC0r44BkQjg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@flowforfrank?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Ferenc Almasi</a> on <a href="https://unsplash.com/photos/tvHtIGbbjMo?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>The <em>useEffect</em> hook is a “method” in functional components that allows developers to handle side effects that are caused in response to changes in the component’s props or state. It has a similar purpose to the <em>componentDidMount</em>, <em>componentDidUpdate</em>, and <em>componentWillUnmount</em> lifecycle methods in class-based components, but it is more flexible and easier to implement.</p><h4>The effect function</h4><p>The <em>useEffect</em> hook takes a function as an argument, which will be executed after the component renders. This function is called the “effect” function, and it can be used to perform any side effects that are needed.</p><pre>import { useEffect, useState } from &#39;react&#39;;<br><br>const TodoList = () =&gt; {<br>  const [todos, setTodos] = useState([]);<br><br>  // Will call fetchToDoList once when the component mounts.<br>  useEffect(() =&gt; {<br>    fetchTodoList();<br>  }, []);<br><br>  const fethTodoList = async () =&gt; {<br>    const response = await fetch(&quot;http://somedomain/todos&quot;);<br>    const data = await response.json();<br>    setTodos(data);<br>  };<br><br>  return &lt;div&gt;{/*Render list here */}&lt;/div&gt;;<br>};</pre><h4>The Dependencies Array</h4><p>The <em>useEffect</em> hook also takes an optional array of dependencies as a second argument. The dependencies array tells React which values to watch for changes. If you don’t specify dependencies, the effect will run on every render, which can lead to performance issues and unexpected behavior. To avoid these problems, make sure to specify the dependencies explicitly and only re-run the effect when they change.</p><pre>// It will run on every re-render.<br>useEffect(() =&gt; {<br>  // Do something...<br>});<br><br>// It will only run once.<br>useEffect(() =&gt; {<br>  // Do something...<br>}, []);<br><br>// It will run every time the &quot;props&quot; dependency changes.<br>useEffect(() =&gt; {<br>  // Do something...<br>}, [props]);</pre><h4>The clean-up function</h4><p>The <em>useEffect</em> method returns a cleanup function that is called before the effect is re-run or the component is unmounted. You can use this function to cancel subscriptions, clear timeouts, or perform other cleanup tasks. This is especially useful when you are using external APIs or libraries that require explicit cleanup.</p><pre>// useEffect will run once.<br>useEffect(() =&gt; {<br>  window.addEventListener(&quot;scroll&quot;, callback);<br>  // The cleanup function will run everytime the component unmounts.<br>  return () =&gt; {<br>    window.removeEventListener(&quot;scroll&quot;, callback);<br>  }<br>}, []);</pre><h4>Avoid race conditions</h4><p>When using multiple <em>useEffect </em>hooks in the same component, be careful to avoid race conditions, where one effect depends on the result of another effect. To avoid these problems, make sure to order your effects correctly and use the useState hook to manage intermediate state.</p><pre>import { useEffect, useState } from &#39;react&#39;;<br><br>function CounterComponent() {<br>  const [counter, setCounter] = useState(0);<br>  useEffect(() =&gt; {<br>    const interval = setInterval(() =&gt; {<br>      setCounter((prevCounter) =&gt; prevCounter + 1);<br>    }, 1000);<br>    return () =&gt; clearInterval(interval);<br>  }, []);<br>  return &lt;div&gt;{counter}&lt;/div&gt;;<br>}</pre><p>In this example, the <em>useEffect</em> hook is used to set up an interval that increments the counter state variable every second. However, the <em>useEffect</em> hook does not have any dependencies, so it will be re-run every time the component is rendered. This means that multiple instances of the interval will be created, leading to a race condition where multiple threads are attempting to modify the counter state variable at the same time.</p><h4>What to avoid</h4><p>In general, you should avoid:</p><ul><li>Managing state within the <em>useEffect</em>.</li><li>Including too many dependencies. Too many dependencies may lead to unnecessary re-renders, leading to performance issues. It is important to carefully consider which values the effect depends on and to only include the necessary dependencies.</li><li>Not including dependencies. If the <em>useEffect</em> hook does not have any dependencies, it will be re-run every time the component is rendered. This can lead to performance issues and can cause unintended side effects.</li><li>Failing to clean up effects. If the <em>useEffect</em> hook sets up a subscription or other resource that needs to be cleaned up, it is important to return a cleanup function from the effect. Failing to do so can lead to memory leaks and other issues.</li><li>Performing expensive operations in the effect. The <em>useEffect</em> hook should be used for tasks that have minimal impact on performance, such as making API calls or setting up subscriptions. Avoid performing expensive operations or calculations in the effect, as this can lead to performance issues.</li></ul><h4>Conclusion</h4><p>In summary, the <em>useEffect</em> is a powerful hook in React and by understanding how to use it properly and how to optimize its performance through the use of dependencies, you can build more efficient and maintainable applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8cb985034f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Call, Apply, Bind — The Basic Usages]]></title>
            <link>https://medium.com/@alexantoniades/call-apply-bind-the-basic-usages-d24b200d6315?source=rss-7916ada57528------2</link>
            <guid isPermaLink="false">https://medium.com/p/d24b200d6315</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Alexander Antoniades]]></dc:creator>
            <pubDate>Sat, 07 Mar 2020 16:20:37 GMT</pubDate>
            <atom:updated>2020-04-13T20:45:56.643Z</atom:updated>
            <content:encoded><![CDATA[<h3>Call, Apply, Bind — The Basic Usages</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*ghDceYNXGdZR0txMW69OoA.jpeg" /></figure><p>In this article I’m going to show you some of the basic usages of call/apply &amp; bind and the problems they solve. I will also show you some practical examples in order to start using them in your projects.</p><p>Call/apply &amp; bind are all methods within the function prototype. Both methods are doing the same thing but slightly differently. What they actually do is allows us to call a function with a given <em>this</em> context and arguments. They let us call a function and have access to the properties of another function or object. We can borrow methods of one object’s prototype and use it to another, for example we could apply Array’s <em>slice</em> method to a string or use Math’s <em>max</em> to find the maximum number of a bunch of numbers in an Array.</p><p><strong>WHAT IS “THIS”?</strong></p><p>I’m not gonna dive into much details here but understanding the <em>this</em> keyword is crucial to grasp the concept of call/apply &amp; bind.</p><p>Everything in javascript is an object, functions are objects too (first-class objects). Every object(or function) has a <em>this</em> object assigned to it. <em>this</em> object acts as a reference to the object’s variables and methods:</p><pre>let obj = {<br>  name: &quot;Alex&quot;,<br>  getName: function() {<br>    return `My Name is: ${this.name}`;<br>  }<br>}</pre><pre>obj.getName(); // &quot;My Name is: Alex&quot;</pre><p><em>this.name</em> is a reference to the object’s(obj) <em>name</em> property value. In other words <em>this</em> refers to the properties of this particular object.</p><p>But what if we try to access the <em>name</em> variable outside of the object?</p><pre>let name = &quot;Alex&quot;;<br>let obj = {<br>  getName: function() {<br>    return `My Name is: ${this.name}`;<br>  }<br>}</pre><pre>obj.getName(); // My Name is: Undefined</pre><p>Now we get <em>undefined</em> because <em>name</em> is no longer within our local variable environment.</p><p><strong>CALL METHOD</strong></p><p>Call accepts a <em>this</em> value and a list of arguments:</p><pre>Function.call(this, arg1,arg2,...)</pre><p>Let’s say we have an object with a <em>food</em> property key and a <em>favFood</em> function that accepts a string as an argument. In order for <em>favFood</em> to have access to the object’s <em>food key we need to call favFood using the call method and give it the _this</em> context of the <em>obj</em>. In simple words we need to attach the <em>obj</em> to <em>favFood:</em></p><pre>let obj = { food: &quot;Pizza&quot; }</pre><pre>function favFood(text) {<br>  return `${this.food} ${text}`;<br>}</pre><pre>let text = &quot;is awesome!&quot;;<br>favFood.call(obj, text); // &quot;Pizza is awesome!&quot;</pre><p>As you can see we’ve just passed the object (<em>obj</em>) as a first parameter to the call method -therefore it’s context (<em>this</em>)- and a single argument as a second parameter to our <em>favFood</em> function. This way we have access to any method and property of this particular object (<em>obj</em>).</p><p>We could also pass multiple arguments seperated by a comma.</p><p><strong>APPLY METHOD</strong></p><p>Apply is the same as call but instead, apply accepts a single array of arguments.</p><pre>Function.apply(this, array)</pre><pre>let obj = { <br>  add: function(a,b,c) {<br>    return a + b + c;<br>  }<br>}</pre><pre>function sumItUp(a,b,c) {<br>  return this.add(a,b,c);<br>}</pre><pre>let numbers = [1,2,3];<br>sumItUp.apply(obj, numbers); // 6</pre><p><strong>BIND METHOD</strong></p><p>Τhe tricky part about bind is that it has the same functionality as apply but instead of calling the function immediately, it returns a bound function:</p><pre>let obj = { <br>  add: function(a,b,c) {<br>    return a + b + c;<br>  }<br>}</pre><pre>function sumItUp(numbers) {<br>  return this.add(...numbers);<br>}</pre><pre>let numbers = [1,2,3];<br>let bound = sumItUp.bind(obj); // Returns a bound function<br>bound(numbers) // 6</pre><p>In this case we pass the <em>obj</em> to the sumItUp function -in order to have access to the <em>obj</em> context — then we call the bound function and pass an array of numbers as an argument. Nice thing about bind is that you can call the returned bound function whenever you need.</p><p><strong>BORROWING PROTOTYPE METHODS</strong></p><p>The cool thing about these methods (call, apply, bind) is that we can borrow methods and functionality from other object’s prototype.</p><p><strong>Borrowing Max from the Math Object</strong></p><p>Let’s say we have an array of numbers and we need to find the maximum number within the array:</p><pre>let numArray = [1,3,4,5,6];</pre><p>Now we know that the <em>Math</em> object has a method for finding the minumum and maximum values of a list of numbers, but arrays are not supported because they’re not considered as numbers therefore are not a valid parameter. If we try:</p><pre>let numArray = [1,3,4,5,6];<br>Math.max(numArray); // NaN</pre><p>We’ll get NaN (Not a Number) and that’s totally normal beause an array is not a number:</p><pre>Array === Number // False</pre><p>But here’s where the cool part comes, by using apply we can pass our array as an argument to the <em>Math</em> object like this:</p><pre>let numArray = [1,2,3,4,5];<br>Math.max.apply(null, numArray); // 5</pre><p>Here we pass <em>null</em> as the first argument because we don’t need to pass any context to the <em>max</em> method, instead we only use the second argument to pass our array which is going to be converted into arguments and finally be accepted by max as a valid parameter.</p><p><strong>Borrowing Filter from the Array Object</strong></p><p>Now let’s say we have some letters and we’d like to filter out some of them and store them in an array using the Array’s filter method.</p><pre>let letters = &#39;abcdef&#39;;<br>let arrayFilteredLetters = letters.filter(letter =&gt; letter);<br>console.log(arrayFilteredLettes); // Filter is not a function.</pre><p>We get <em>filter is not a function</em> because <em>letters</em> are a String object thus it doesn’t have access to Array’s <em>filter</em> method. What we could do is use <em>call</em> again to invoke <em>filter</em> and pass <em>letters</em> as an argument.</p><pre>let letters = &#39;abcdef&#39;;<br>let arrayFilteredLetters = Array.prototype.filter.call(letters, letter =&gt; letter !== &#39;c&#39; &amp;&amp; letter !== &#39;d&#39;);<br>console.log(arrayFilteredLetters); // [ &#39;a&#39;, &#39;b&#39;, &#39;e&#39;, &#39;f&#39; ]</pre><p>As you see, we can use call/apply &amp; bind to borrow methods from one object’s prototype and use it to another. This is one of the coolest applications of call/apply &amp; bind.</p><p><strong>Important notes about Arrow Functions</strong></p><p>In case of arrow functions our methods: Call/Apply &amp; Bind doesn’t work as expected.</p><p>As the documentation of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions">MDN</a> states:</p><p><em>“Since arrow functions do not have their own this, the methods call() or apply() can only pass in parameters. thisArg is ignored.”</em></p><p>Arrow functions doesn’t have their own <em>this</em>. <em>This</em> is lexically bound and it uses the <em>this</em> of the context in which the arrow function was called. Call/Apply &amp; Bind can be used only to pass parameters.</p><p><strong>CONCLUSION</strong></p><p>By now you should be able to understand the basic usage and applications of call/apply &amp; bind and be able to attach different contexts to functions and objects. You’ll also be able to borrow methods from other prototypes and use it to pass unrelated values -like looping over a string using array’s filter-</p><p>In javascript there are countless ways to do something. All the examples above has many alternative syntaxes and methods to have the same results. In this article I decided to use simple examples in order to make sure you get the basic knowledge in the most simplest way.</p><p>Have Fun!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d24b200d6315" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beat UI: Handling reusability with components]]></title>
            <link>https://medium.com/taxibeat/beat-ui-handling-reusability-with-components-43dff4a084b7?source=rss-7916ada57528------2</link>
            <guid isPermaLink="false">https://medium.com/p/43dff4a084b7</guid>
            <category><![CDATA[ride-hailing]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[components]]></category>
            <dc:creator><![CDATA[Alexander Antoniades]]></dc:creator>
            <pubDate>Mon, 21 Oct 2019 15:57:24 GMT</pubDate>
            <atom:updated>2019-11-08T09:08:42.484Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>By </em><a href="https://medium.com/@alexantoniades"><em>Alexandros Antoniades</em></a><em> and </em><a href="https://medium.com/@m.vandegoor"><em>Panagiotis — Maurice Van de Goor</em></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IWXIyLW9fRJgmo4QBeN3yw.png" /></figure><p><strong>A collection of reusable components used to standardize Beat’s user interfaces.</strong></p><h3>Set the stage</h3><p>As a ride-hailing service that is deeply rooted in technology, <a href="https://thebeat.co/">Beat</a> creates lots of portals and web apps that help agents and teams to work better, faster and more efficiently. Being in the process of breaking down our monolithic backend system to microservices, raised the need to create portals and tools that could help our teams manage these microservices without the involvement of the Devs and DevOps teams.</p><blockquote>One the main goals of all Frontend Engineers at Beat is to build user-friendly interfaces that are tailored for our agents and teams worldwide. In order to achieve that, our UI/UX experts design interactive elements and components that meet all the acceptance criteria of all our apps.</blockquote><p>Our portals and content management systems are heavily based on forms that agents use for their various everyday tasks. That being said, our systems need to be consistent, both in design and functionality.</p><h3><strong>Enter ‘Beat UI’</strong></h3><p><strong>Beat UI is a library of reusable components in-house built by Beat’s Frontend team. It contains a huge collection of custom components that we designed and use in our web apps.</strong></p><p>From form fields and drop-downs to sliders and many more, Beat UI includes a variety of well designed and branded components, available to use whenever we need. This helps us maintain<strong> consistency</strong> in design, functionality and performance. Building our own library provides us with <strong>full control</strong> over the components, thus avoiding the need for third party libraries that will not meet 100% of our needs.</p><h3><strong>The creation of a component</strong></h3><p>We usually decide to add a new component in the library when we receive a new portal request and assess that a specific component can be reused in multiple portals. We then start a ‘how session’ where we decide the implementation approach that we will follow.</p><p>When everything is clear, we start the implementation in Storybook. Storybook enables us to develop a component faster and in isolation. We can also style the component using <a href="https://emotion.sh/docs/introduction">Emotion</a> and thanks to plugins we can even make it responsive by verifying the component in different screen sizes.</p><p><strong>Most of our components have multiple properties to support different functionalities. </strong>For example, our drop-down component has a search functionality, a multiple selection functionality and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CPWXE-Top66AWREt" /><figcaption><em>The Modal component as appears in Storybook.</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qIgojzBLePPJjVKM" /><figcaption><em>Some of the Modal props as seen in Storybook using the ‘knobs’ addon.</em></figcaption></figure><p>When the implementation is done, we add unit tests to make sure the code works as expected in every case scenario. We would use a TDD approach for components only or after we have very specific requirements. As it may happen in any organisation, requirements can change during the development process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/0*xtMjjRe3xLWbZiRF" /><figcaption><em>Modal unit tests passing.</em></figcaption></figure><p>Once our component has passed all code reviews, it’s time to publish the newest version!</p><h3><strong>Versioning &amp; Publishing</strong></h3><p>In every new addition to the Beat UI library we update the version in the package.json file. We use the semantic versioning as described in the <a href="https://docs.npmjs.com/about-semantic-versioning">npm docs</a> and we publish it to our private npm registry, where it is ready for use by all the Frontend Engineers.</p><h3><strong>Using a reusable component</strong></h3><p>When everything is completed and our new component is officially part of our Beat UI library, we install the updated version in the portal. We are now ready to import and use our newly created component to our project:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/0*ofJKPl8KOdRqRXBv" /><figcaption><em>Usage of the Modal in a portal.</em></figcaption></figure><p>Applying the design principle of SoC (Separation of Concerns), our reusable components are functioning independently. <strong>The technologies we use to develop our components are React, Storybook, Emotion and Jest.</strong></p><p><a href="https://reactjs.org/">React</a> is a javascript library for creating declarative user interfaces.</p><p><a href="https://storybook.js.org/">Storybook</a> offers an independent playground to develop a reusable component in isolation -in terms of styling and functionality- and allows us to document their usage in detail.</p><p><a href="https://emotion.sh/">Emotion</a> library provides us with theming capabilities to style our components.</p><p><a href="https://jestjs.io/">Jest</a>, along with <a href="https://github.com/testing-library/react-testing-library">@testing-library/react</a> is used for unit testing our React components.</p><p><strong>What we gain </strong>by using reusable components are a few very important things:</p><ol><li><strong>Faster and independent</strong> development</li><li><strong>Consistency</strong> in design and functionality across apps</li><li>Easily <strong>testable and maintainable</strong> code</li></ol><h3><strong>The Current State of Beat UI</strong></h3><p>The Beat UI is currently in version 0.4.0 and we are looking forward to make it public in the near future.</p><p><em>Do you have a passion about UI? Join us on the ride to create an awesome interface for our end-users. </em><a href="http://beat.careers/"><em>See all our job openings</em></a><em>.</em></p><h4><strong>About the Writers</strong></h4><p><a href="https://medium.com/@alexantoniades"><em>Alexandros Antoniades</em></a><em> is a passionate Frontend Engineer creating exceptional user experiences for the web. At Beat, he codes super clean user interfaces using approved coding standards from the FE community and the latest tech in the industry. His top priorities include code quality, performance and accessibility.</em></p><p><a href="https://medium.com/@m.vandegoor"><em>Panagiotis — Maurice Van de Goor</em></a><em> is an excited Frontend Engineer who constantly feels challenged to explore the amazing possibilities of his focus field and the secrets of the web. As a Beat Engineer, he creates user interfaces and ensures their quality, with high user experience and accessibility standards.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43dff4a084b7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/taxibeat/beat-ui-handling-reusability-with-components-43dff4a084b7">Beat UI: Handling reusability with components</a> was originally published in <a href="https://medium.com/taxibeat">Beat Engineering Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Book Suggestions — Part 1]]></title>
            <link>https://medium.com/@alexantoniades/5-book-suggestions-part-1-c8b9718501ad?source=rss-7916ada57528------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8b9718501ad</guid>
            <category><![CDATA[reading-books]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[readinglist]]></category>
            <category><![CDATA[suggestions]]></category>
            <category><![CDATA[philosophy]]></category>
            <dc:creator><![CDATA[Alexander Antoniades]]></dc:creator>
            <pubDate>Thu, 18 Apr 2019 08:58:10 GMT</pubDate>
            <atom:updated>2019-04-18T08:58:10.783Z</atom:updated>
            <content:encoded><![CDATA[<h3>5 Book Suggestions — Part 1</h3><p>The books that will be presented to you here are those that had a HUGE impact in my life and the way I create, work and view the world.</p><p>Enjoy.</p><h3>Man’s Search for Meaning</h3><p><strong>Genre:</strong> Psychology<br><strong>Author:</strong> Viktor Frankl<br><strong>Summary:</strong><br>This book is the author’s journal (Viktor Frankl) about his experience as an inmate in Auschwitz concentration camp. He writes about how important to longevity and survival is to have a purpose and a meaning in life and how people who had a purpose and imagined a more optimistic future in those gruesome circumstances had more chances to live longer and even survive.</p><p><a href="https://www.goodreads.com/book/show/4069.Man_s_Search_for_Meaning"><strong>MORE ABOUT THIS BOOK</strong></a></p><h3>The Paradox of Choice: Why More Is Less</h3><p><strong>Category:</strong> Time Management, Choice &amp; Decision Making<br><strong>Author:</strong> Barry Schwartz<br><strong>Summary:</strong><br>This book is about how having too many options can make you miserable and unhappy and what to do about it.</p><p><a href="https://www.goodreads.com/book/show/10639.The_Paradox_of_Choice"><strong>MORE ABOUT THIS BOOK</strong></a></p><h3>Essentialism: The Disciplined Pursuit of Less</h3><p><strong>Category:</strong> Productivity<br><strong>Author:</strong> Greg McKeown<br><strong>Summary:</strong><br>In this constant noise of distractions and options, the main idea of this book is about focusing on the few and essential things that really matters instead of wasting your time on many, unproductive and unimportant tasks.</p><p><a href="https://www.goodreads.com/book/show/18077875-essentialism"><strong>MORE ABOUT THIS BOOK</strong></a></p><h3>Ego is The Enemy</h3><p><strong>Category:</strong> Psychology<br><strong>Author:</strong> Ryan Holiday<br><strong>Summary:</strong><br>This book explains how our ego can become our worst enemy when it comes to achieving our dreams and becoming successful.</p><p><a href="https://www.goodreads.com/book/show/27036528-ego-is-the-enemy"><strong>MORE ABOUT THIS BOOK</strong></a></p><h3>The 4-Hour Workweek</h3><p><strong>Category:</strong> Productivity<br><strong>Author:</strong> Tim Ferriss<br><strong>Summary:</strong><br>From my favourite Tim Ferriss, this book has some great practical tips for living a better life and be more productive.</p><p><a href="https://www.goodreads.com/book/show/368593.The_4_Hour_Workweek"><strong>MORE ABOUT THIS BOOK</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8b9718501ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NEGATIVE VISUALIZATION: HOW IT WILL HELP YOU APPRECIATE LIFE MORE]]></title>
            <link>https://medium.com/@alexantoniades/negative-visualization-how-it-will-help-you-appreciate-life-more-3e114d8d6c4e?source=rss-7916ada57528------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e114d8d6c4e</guid>
            <category><![CDATA[meditation]]></category>
            <category><![CDATA[appreciation]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[visualization]]></category>
            <dc:creator><![CDATA[Alexander Antoniades]]></dc:creator>
            <pubDate>Tue, 15 Jan 2019 22:08:53 GMT</pubDate>
            <atom:updated>2019-04-18T09:03:27.712Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xqelAk3QJ2GBtd6QA0NNyg.jpeg" /></figure><h3>Negative Visualization: How it will help you appreciate life more</h3><p>In this fast-paced modern world, people tend to take everything for granted. We live as if our life will never end, treating our friends and our loved ones as if they’re gonna be there for us forever. We suck at reminding ourselves how temporary life is.</p><p>It’s a fact of life that we are never satisfied with what we have. Every time we pursue something new: a raise, a new fancy car, a new home or any other possession, this satisfaction eventually fades after a while and we return to our stable level of happiness, looking for the next big thing to acquire.</p><p>This tendency to return to our stable levels of happiness after positive or negative events in our life is called: <a href="https://en.wikipedia.org/wiki/Hedonic_treadmill">Hedonic Treadmill</a> or Hedonic Adaptation, a theory by Brickman and Campbell, two psychologists who introduced the term in 1971 in their essay: “Hedonic Relativism and Planning the Good Society”.</p><p>Hedonic Adaptation is not a bad thing though, it helps us get more advanced and improve our living conditions. If we were constantly happy, there would be no reason to improve ourselves and move forward technologically. The bad thing is that this stability makes us getting used to things pretty easily, we tend to take important things for granted: our health, our loved ones and even some of our possessions. It makes us forget of the importance of the small things in life until it’s too late.</p><h3>“It’s only after we’ve lost everything that we’re free to do anything.” –Tyler Durden (Fight Club)</h3><p>The good thing is that we can override this adaptation proccess by using the ancient stoic technique of Negative Visualization. Stoics used to spend some time of their day visualizing that they’ve lost something of value from their lives: a limb, the ability to breath, a loved one etc. This technique helped them to be mindful of the importance of those things thus creating a sense of gratefulness.</p><p>However bleak this may sound, whenever you find yourself being ungrateful or when you think your life sucks, when you’re stuck in traffic or when your battery phone is low, before you start complaining, just stop and imagine how your life could be so much worse.</p><p>When you fight with your loved ones for insignificant reasons, stop and think how would it be if that person wouldn’t be alive the next day. When you don’t feel like going somewhere by feet, imagine that you had no legs and so on…</p><p>The main concept of this technique is to make you aware of the blessings around you and stop being ungrateful of those valubable things in your life. It will make you appreciate your life more.</p><h3>Negative Visualization</h3><p>Take a moment and look at your hands, open and close them gently, see how they’re working perfectly for you to be able to feel, touch and grab things, move your arms slowly up and down, feel the motion. Now imagine yourself having no hands or arms and being unable to touch or feel anything. Take a moment and imagine you’ve lost your legs, does this feel worse? Think about your life without limbs, how would it be?</p><p>Imagine yourself having no sight. How would your life be if you couldn’t see anything? Imagine you’ve lost your hearing, unable to listen to anything. How would it be if you couldn’t smell or taste your favourite food?</p><h3>“We should love all our dear ones…, but always with the thought that we have no promise that we may keep them forever — nay, no promise even that we may keep them for long” — Seneca</h3><p>This should work as a daily reminder that you have to keep in your mind. Whenever you find yourself treating your people like shit, stop and think about it. Spend more time with your loved ones, if you live in distance call them on the phone more. The presence of our loved ones is not guaranteed in this life.</p><p>I know some of these visualizations are really hard to imagine and most people try not to think about it. Unfortunately you can’t hide from life. These techniques will bring you to a whole new level of appreciation of life.</p><p>Some may argue that this technique is for those who have it all right in their lives and how about those people who are already in bad situations. Apparently this technique works for everyone because everyone could be in much worse situations than they already are.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e114d8d6c4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[It's Your Life. Evolve!]]></title>
            <link>https://medium.com/@alexantoniades/evolve-5ebe28108ed5?source=rss-7916ada57528------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ebe28108ed5</guid>
            <category><![CDATA[success]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Alexander Antoniades]]></dc:creator>
            <pubDate>Wed, 27 Sep 2017 06:47:05 GMT</pubDate>
            <atom:updated>2017-10-05T20:19:33.980Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EMrEUYYjQC161tydzisZug.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/EAvS-4KnGrk?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Pablo Heimplatz</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>We live in the 21st century, it’s probably the best time to improve ourselves, make shit happen and lead better lives. Despite the ugly stuff: War, Murder, Illnesses, hunger, et cetera— which were always part of any century — now is the best time to follow our dreams and passions. It’s also an opportunity to make the world a better place.</p><p>But before doing all these, we have to start with the basics.</p><h3>Read More Books</h3><p>Knowledge is available to us 24/7. We have unlimited access to resources that can help us expand our mind. We can read articles and ebooks of any subject, watch lectures and “how to” guides. We can even take online courses and study whatever the fuck we want. And all that, thanks to the internet.</p><p>Reading books will expand your knowledge and the way you view and think about the world. Will also save you time by learning from other people’s mistakes, experiences and achievements.</p><p>You don’t have to re-invent the wheel and learn everything the hard way. Reading books is one of the greatest gifts you can do to yourself right now to change your life.</p><p>A few great books to get you started:</p><ul><li><a href="https://www.amazon.com/Awaken-Giant-Within-Immediate-Emotional/dp/0671791540"><strong>Awaken the Giant Within</strong></a><strong> </strong>by Tony Robbins</li><li><a href="https://www.amazon.com/Barking-Wrong-Tree-Surprising-Everything/dp/0062416049"><strong>Barking Up the Wrong Tree</strong> </a>by Eric Barker</li><li><a href="https://www.amazon.com/Power-Now-Guide-Spiritual-Enlightenment/dp/1577314808"><strong>The Power of Now</strong></a><strong> </strong>by Eckhart Tolle</li><li><a href="https://www.amazon.com/4-Hour-Workweek-Escape-Live-Anywhere/dp/0307465357"><strong>The 4-Hour Workweek</strong></a> by Tim Ferriss</li><li><a href="https://www.amazon.com/Subtle-Art-Not-Giving-Counterintuitive/dp/0062457713"><strong>The Subtle Art of Not Giving a Fuck</strong></a> by Mark Manson</li></ul><p>Remember: Reading books will change your life.</p><h3>Choose Who You Spend Your Time With Wisely</h3><blockquote>“Be wary of friends-they will betray you more quickly, for they are easily aroused to envy. They also become spoiled and tyrannical.”<strong> — Robert Greene, 48 Laws of Power</strong></blockquote><p>There are gonna be different kinds of people in your life. Some will love you, some will hate you and some will envy you. It’s your job to filter out the unwanted and the toxic.</p><p>But it’s not always easy, there’s a kind of people who I call them “snakes”. Unlike your enemies which you know where they stand and they know where you stand. With snakes things are different. You will never be sure on which side they are.</p><p>At first they act as if they&#39;re your friends and on the same side as you. They act nice and good to you, they smile when they see you — with a fake smile, eyes not moving — and pretend to be your friends. You know something is wrong with them but you can&#39;t put it into words. Their actions are not aligned with what they say. Their body language and their words are out of sync.</p><p>These are the people who talk shit behind your back with other snakes. Stay away from those toxic people. They’ll start to envy you the moment they see you progress and do better in life than they do. Their negativity is like a spreading disease and eventually will poison your life.</p><p>Surround yourself with honest, supportive and ambitious people who go after their dreams and will motivate you to do the same. You may not realise it now, but who you spend time with has a huge impact in your life.</p><p>Remember: Who you surround yourself with you&#39;ll become.</p><h3>Say “No” More Often</h3><p>Your time is valuable and you have to spend it on things that makes you happy and aligns with your purpose. Time is your most valuable thing right now and if it’s not, you need to make it valuable.</p><p>Say no to everything that does not align with your purpose. Say no to everything that doesn’t make you happy or make you better. Say no to things that doesn’t bring you closer to where you want to be in life. Say no to people who think you owe them your time as if they’re entitled to it.</p><p>Stop wasting your energy on the wrong things, you don’t have to commit your time to anyone. Stop being a “yes person”, you’re nobody’s doormat and you can’t please everyone.</p><p>I’m not telling you to be an asshole and start rejecting everyone and everything— sometimes you need to say yes to unpleasant things — Unfortunately you don’t always get to choose how to spend your time, but at least you can leave more space for the great things to thrive in your life by rejecting others.</p><p>Remember: it’s your life, it’s your time. Make it count!</p><h3>Stop Complaining And Be Responsible</h3><p>Give up complaining and take responsibility for everything you do in life. It’s nobody’s fault that your life is a downward spiral to hell.</p><p>Average people complain all the time about everything and they blame others for their own inactivity. They blame politicians for tax raises, they blame the rich because rich people stole their money, they blame everything and everyone except themselves. People complain but they do nothing to improve their lives and find solutions to their problems. They always wait for some magic moment in the unknown future to save them. They&#39;re prisoners of their own mental limitations.</p><p>Life is like a game, not everyone is born with good cards on their hands but at least we have to play the game as best as we can. Start by breaking the mental chains of your mind, take full responsibility of your actions, your life depends on you and only you. Find solutions not problems.</p><p>Remember: You are your only saviour.</p><h3>Practice Mindfulness and Gratitude</h3><p>In this fast paced world, it’s easy to forget about the simple things in life, take for granted everything and get lost in your head and your problems. There’re thousands of ways to practice mindfulness and gratitude, I prefer the simple ones.</p><h4>Mindfulness and Gratitude Practice</h4><p>Take a moment in your day to pause. Stay still for a few minutes and take some deep breaths. Stop thinking about your worries. Stop thinking about the past or the future. The most valuable moment you have is right now. Nothing exists outside of this very moment. Observe your breathing, watch and touch your hands, feel the warmth and texture of your skin. Now you can start feeling some gratitude, realise that you are alive, your body is alive and everything right now within your body is working for you to be able to breath, to love, to taste, to listen and to experience this moment right now. Do this at least once a day.</p><h4><strong>Gratitude Practice</strong></h4><p>This one is simple. Every morning when you wake up, take three minutes of your time to write down three things that you&#39;re most grateful for. It can be something like:</p><ol><li><strong>I&#39;m grateful for being healthy.</strong></li><li><strong>I&#39;m grateful for being surrounded by good people.</strong></li><li><strong>I&#39;m grateful for doing what I love for a living.</strong></li></ol><p>Alternatively you can do this before you go to bed and jot down three things that happened within your day that you feel grateful for. Have these notes as a reference to remind you how blessed you are.</p><p>Try to keep notes of different reasons every time.</p><h4>Mindfulness Practice</h4><p>Take a moment and start paying attention to your surroundings. If you&#39;re outdoors observe the people, watch the cars passing by, pay attention on the small details of those things you observe. If you notice any mind chattering or judgement, take a note of it and keep your practice. Remember: while you do this try to be fully present.</p><p>Bonus tip:<strong> </strong>To avoid getting lost in your head, write the word “NOW” on your wrist with a pen as a reminder to slow down, relax and live in the present moment every time you see it.</p><p>Remember: All you have is the present moment.</p><h3>Workout and Eat Healthy</h3><p>Having a healthy lifestyle is the most important thing to do if you want to enjoy your life, be stronger and have full energy to achieve things.</p><p>Working out makes your body look good and sexy, it boosts your mood, reduces stress, prevents diseases, improves your memory and even makes you sleep better. Exercise releases endorphins, these are chemicals in the brain that makes us feel awesome.</p><p>You should exercise daily, put it in your schedule — and if you don’t have one, make one — Go for a jog, ride a bike, do some pushups, workout your abs, do squats, lift some weight. There are plenty of things you can start doing and feel awesome! Exercise for at least 15 min to half an hour.</p><h4>Avoid Junk food</h4><p>I can’t stretch this enough. On the top causes of death worldwide are heart attack and stroke. And that’s because of unhealthy eating habits.</p><p>Eating junk food is slowly killing you everyday and people nowadays consume shitty food all the time. No wonder why they get sick and die.</p><blockquote>Ischaemic heart disease and stroke are the world’s biggest killers, accounting for a combined 15 million deaths in 2015. These diseases have remained the leading causes of death globally in the last 15 years. <strong>— World Health Organization</strong></blockquote><p>According to the Worldwide Health Organization these are the top five unhealthiest foods you should avoid:</p><ol><li><strong>Sugary Drinks &amp; Sugar in general (pastries and stuff)</strong></li><li><strong>Salty &amp; cheesy foods (burgers, pizzas, hot dogs etc..)</strong></li><li><strong>Fried food (fried chicken, fried fries, etc)</strong></li><li><strong>Food high in saturated fats</strong></li></ol><p>I know it’s hard to resist a tasty pizza or that creamy cheese cake after a hard working day — I eat my junk food too once in a while— but at least you should consider putting some healthier ingredients to it. There are plenty of alternatives.</p><h4><strong>Eat Right!</strong></h4><p>Eat healthier. Start by removing all the junk food temptations from your house and replace them with healthier alternatives. Replace processed fruit juices with fresh juices. Replace White bread with whole wheat bread, White sugar with Stevia. The choices are endless.</p><p>Eat more fruits, lean meat and vegetables! <a href="http://www.healthline.com/nutrition/50-super-healthy-foods">Need direction?</a></p><p>Start researching! You’ll find plenty of lists on healthy food on the internet. Do these little improvements to live longer and healthier.</p><p>Bonus tip: When buying groceries, read the food label, if it writes more than 5 ingredients and most of them sounds Greek to you. Unless you know what they mean, don’t buy it, it’s probably processed.</p><p>Remember: Your health should be the top priority in your life.</p><h3>Keep Evolving!</h3><p>Start today, don’t wait, life doesn’t wait. Take action towards being a better person and having a better life. You are the designer of your own world.</p><p>Don’t be afraid of failure, failure is essential part of the process, dare to fail. You will fail plenty of times before you achieve anything worth doing in life.</p><p>Start chasing your dreams, It’s better to fail than never take action and regret it on your deathbed. Make your days count.</p><p>Don’t be a passive observer of life. Evolve!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ebe28108ed5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>