<?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 Amnon on Medium]]></title>
        <description><![CDATA[Stories by Amnon on Medium]]></description>
        <link>https://medium.com/@amnons?source=rss-1502a276faf8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*TGmJAKIoJvv49HbZMC9uaA.jpeg</url>
            <title>Stories by Amnon on Medium</title>
            <link>https://medium.com/@amnons?source=rss-1502a276faf8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 10:00:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amnons/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[D&D Spells Out True Meaning of Cooperation]]></title>
            <link>https://medium.com/@amnons/d-d-spells-out-true-meaning-of-cooperation-41d00d6f89da?source=rss-1502a276faf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/41d00d6f89da</guid>
            <category><![CDATA[tabletop]]></category>
            <category><![CDATA[dungeons-and-dragons]]></category>
            <category><![CDATA[creative]]></category>
            <category><![CDATA[team-building]]></category>
            <category><![CDATA[gaming]]></category>
            <dc:creator><![CDATA[Amnon]]></dc:creator>
            <pubDate>Tue, 21 Aug 2018 03:27:05 GMT</pubDate>
            <atom:updated>2020-04-23T19:39:58.167Z</atom:updated>
            <content:encoded><![CDATA[<p>Dungeons and Dragons is arguably one of the most popular tabletop games out there. There’s a very high chance that you’ve at least heard of it. Although it’s seen as nerdy, there’s a lot more to D&amp;D than meets the eye. It’s actually excellent for team-building, both personally and professionally. I’m here to shed some light and hopefully put a positive spin on one of the best team-building exercises out there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*zjjHjydCQT04EzEoQGonkQ.jpeg" /><figcaption>Dungeons &amp; Dragons tabletop, with a map and tokens.</figcaption></figure><h4><strong>Not Just For Nerdy Kids</strong></h4><p>In the past, there’s been a stigma against D&amp;D due to its reputation as a hobby for nerds. The stories would portray D&amp;D as a nerdy board-game for kids who have no friends or are socially inept. A lot of movies and TV shows would go about strengthening that stereotype, one of the most notable examples being The Big Bang Theory.</p><p>The truth is, D&amp;D is for everyone. Although it originated in nerd culture, it’s not exclusively so. Whether you fall under a teenage niche, or work the old 9–5 and return to your family, D&amp;D can be compatible with you. It’s a hobby that actually requires friends and social interactions. It also requires a lot of creative thinking of problem-solving, so it helps being skillful and knowledgeable in a variety of topics and fields.</p><h4>D&amp;D Mimics Real Life</h4><p>Being a tabletop RPG (role-playing game), D&amp;D requires not only logic but also creative thinking. This can include thinking outside the box when presented with a challenging task, but also your own character whom you control. Every player has their own character, with their own skills, health, inventory, backstories, and more. There are a lot of aspects to your character.</p><p>D&amp;D really gets people’s creative juices flowing, because players will spend time to come up with creative backstories for their characters, which will impact their characters’ behaviour and disposition. This includes where and how they grew up, what their race is (human, elf, orc, etc), their class (ranger, paladin, wizard, etc), and more. Some even go as far as to illustrate and paint artwork depicting their characters.</p><p>The point is, it’s your job to make your character come to life. This is done through acting, management, and creative thinking.</p><h4>Born To Be Free</h4><p>D&amp;D, like most other tabletop RPGs, can give you a feeling of freedom that doesn’t exist quite as well in other games. This is the freedom to do as you please, whether creative or logical. You can be good, evil, neutral, lawful, chaotic, a mix, or ever-changing. You can focus on exploration, go all brawl, or use your brawn.</p><p>In fact, you may have the same skills and spells as other players out there, but depending on the situation and your way of thinking, you could attempt to use them in different ways. You could even use them unconventionally.</p><p>For example, a bow and an arrow would normally be used to attack your enemies, but I’ve tied rope around an arrow and shot it across a deep drop. My arrow hit the wall and stuck there. This enabled my party and me to cross over safely instead of attempting to jump across and probably fall to our deaths.</p><h4>Teamwork is in the Eye of the Beholder</h4><p>The underlying point of the game, ultimately, isn’t to slay a dragon or find a golden chalice. It’s to work together with your team, because of everyone’s qualities, and despite everyone’s differences. You have to think creatively, as well as use sharp logic, to solve challenges. Whether it’s battle strategies, or diplomatic investigations, or traversing difficult situations in general, everyone has to work together to achieve the common goal of finishing the campaign. One person can’t and won’t carry the entire party alone.</p><p>Most importantly of all — remember to have fun. Together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41d00d6f89da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Promises]]></title>
            <link>https://medium.com/@amnons/javascript-promises-5fa129ecbc?source=rss-1502a276faf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fa129ecbc</guid>
            <category><![CDATA[es6]]></category>
            <category><![CDATA[tacos]]></category>
            <category><![CDATA[promises]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Amnon]]></dc:creator>
            <pubDate>Tue, 29 May 2018 22:36:16 GMT</pubDate>
            <atom:updated>2018-05-29T23:44:16.017Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is a reupload of an old presentation I’ve made in graduate school. Although it’s a bit dated, I believe the logic (and creativity) behind it still applies.</em></p><p>JavaScript is a linear language, so every line is<em> usually </em>read one after another in sequential order from top to bottom. It can be great for organizing your code and having a sort of order.</p><p>However, it can also be a PITA, since sometimes, certain events might happen before we have a chance to even listen to them with Event Listeners. Event Listeners are better for things like keypress events and mouse clicks. They can happen many times and don’t relate to events.</p><p>Unlike Event Listeners, promises can succeed or fail only once. They can also have respective callbacks added later, despite the fact the promises have already taken place. This means you can chain promises, much like functions or methods. Therefore, promises are great for when you want to focus on whether something actually happened or not, and then react appropriately.</p><p><em>Keep in mind that promises came to JavaScript in ES6. For use in ES5, you must use libraries like BluebirdJS.</em></p><p>Think of a JS promise like a real promise — someone promises you something, and several things can happen as a result.</p><ul><li><strong>Pending</strong> — The promise has yet to be completed.</li><li><strong>Settled</strong> — The promise has been completed.</li><li><strong>Resolved</strong> — The promise has been kept!</li><li><strong>Rejected</strong> — Sorry, looks like the promise has been broken!</li></ul><p>Let’s say I wanna go grab some tacos with Andrew. So, I make him a promise.</p><blockquote>Yo, Andrew! Let’s go grab some tacos on Friday!</blockquote><p>It takes a while for Friday to arrive, right? So in the meantime, I can go do other things! Friday rolls in, it’s time to talk to Andrew about that promise I made earlier…</p><blockquote><strong>Scenario A: </strong>Yo, Andrew, ready to go get tacos? — “Yes! Tacooos!”</blockquote><blockquote><strong>Scenario B:</strong> Yeah, uh, I’m still working on those wireframes. Sorry! <em>—</em> “You guys are no fun!”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*teVJjtCiL2B8fUR1T648nA.png" /><figcaption>A basic promise can be found here in the wild, dreaming of tacos and wireframes…</figcaption></figure><p>Let’s say I want to make another promise, this time to Wasim, but it depends on the previous promise. So that means I can’t make the second one until the first one takes place. Simple, right?</p><blockquote>Yo, Wasim! Andrew and I went for tacos. Wanna see? — “Uh, sure, dude, whatever…”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*bPs2gnCW2abgRV-OWMH0pA.png" /><figcaption>Here we see two promises being chained. The second promise cannot take place until the first one succeeds.</figcaption></figure><p>In this scenario, there is no way for me to show Wasim pictures of tacos if I haven’t even gone out with Andrew for tacos in the first place, right? The same logic works here.</p><p><strong>Wanna make a promise and have it complete only when all of its conditions are met (instead of chaining on and on)? Use Promise.all().</strong></p><p><em>That way, you have one promise that takes an array of promises, and is fulfilled only when all of its sub promises are fulfilled. That way, you grab ’em all at once.</em></p><p><strong>Wanna do the opposite and have a promise fulfill or reject ASAP and go through your chain quickly? Use Promise.race() instead!</strong></p><p><em>Keep in mind, if the first item fails, the entire promise stops. It’ll only race to the finish line if it keeps getting green lights…so to speak.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fa129ecbc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coding In Components]]></title>
            <link>https://medium.com/vali-tech/coding-in-components-351b6834b4d?source=rss-1502a276faf8------2</link>
            <guid isPermaLink="false">https://medium.com/p/351b6834b4d</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Amnon]]></dc:creator>
            <pubDate>Mon, 16 Oct 2017 16:57:27 GMT</pubDate>
            <atom:updated>2017-10-16T17:08:41.105Z</atom:updated>
            <content:encoded><![CDATA[<h3>Coding In Components — My story about trying to learn React &amp; Redux</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LwIhVol9n0uRBvmDJSEXlA.jpeg" /><figcaption><a href="https://afrogleap.com/development/how-to-learn-react-native/">Image source: https://afrogleap.com/development/how-to-learn-react-native/</a></figcaption></figure><p><strong>What even is React?</strong></p><p>React is a very powerful JavaScript library that can do a lot of amazing things. A lot of websites and apps are using it these days, especially Facebook — after all, they are the ones who made it. Similar to Angular, React allows you to smoothly make changes to the DOM without having to refresh the entire page. It lets you to create an interactive UI and manage it seamlessly by updating only the components that to be updated as their data changes. It also makes your “code more predictable and easier to debug.”</p><p><strong>Nitty Gritty</strong></p><p>JavaScript on its own is already fairly great and powerful, but there are so many things that it can’t do on its own (at least without writing a lot more code than most developers would like to deal with), therefore requiring libraries, plug-ins, and the like. Thankfully, React is a library that is very easy to install. However, it is written in a slightly different flavour called JSX — JavaScript XML. As the name suggests, it adds XML syntax to JavaScript in order to write React. It can be easily “translated” to plain JavaScript using Babel.</p><p>It definitely takes a while to get used to it. I mean, on the one hand, JavaScript and XML on their own are fairly straight-forward, especially once you work with them for a while. However, when you put them together, and use React’s structure and syntax, it starts to get a bit complex. It definitely has a very different mindset than that of vanilla JavaScript or even JQuery.</p><p>As mentioned before, React makes use of components. Basically, everything is a component — input field, button, header, image, etc. That makes it great for each component updating its state individually, thus allowing React to render only the components that need to be updated as they change. That means you don’t need to refresh the entire page or document, and your website will smoothly rerender things on an as-needed basis.</p><p>It does get more complicated the more components you have in your project, which means you eventually want a way to manage all of them. This is where Redux comes in. Redux allows you to make a JavaScript object called Store, which manages and stores the states of all objects found in the project. That allows you to manage them more easily by changing the main state, which will automatically change only what needs to be changed, instead of you manually updating every component’s state yourself. Oh, and did I mention it also solves the problem of updating parent components’ states?</p><p>The more you look at React and Redux, the more you realize why it’s becoming more and more popular, and why it’s used so heavily in apps like Reddit and Twitter. With that much data, you want to be able to update and manage it all as seamlessly and easily as possible.</p><p><strong>Final Thoughts</strong></p><p>Although it can be somewhat daunting leaping into React and, eventually, Redux, it’s a very important skill to have. React is starting to be used in many places and serves as, arguably, a competitor to Angular. It can be very powerful and efficient, and allows you to speed your development up, especially for newcomers. Although it seems complicated at first, you eventually get the hang of it. You just have to change your mindset, which in my opinion, is the most difficult part.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=351b6834b4d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vali-tech/coding-in-components-351b6834b4d">Coding In Components</a> was originally published in <a href="https://medium.com/vali-tech">Vali Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>