<?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 Tomas Makaj on Medium]]></title>
        <description><![CDATA[Stories by Tomas Makaj on Medium]]></description>
        <link>https://medium.com/@tmakajcoding?source=rss-87312423ea75------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*BQpUrqMbwTMccSgdDNdS1w.jpeg</url>
            <title>Stories by Tomas Makaj on Medium</title>
            <link>https://medium.com/@tmakajcoding?source=rss-87312423ea75------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 16:22:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tmakajcoding/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[My first week of Python ]]></title>
            <link>https://medium.com/@tmakajcoding/my-first-week-of-python-fd8cde64f951?source=rss-87312423ea75------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd8cde64f951</guid>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python-for-beginners]]></category>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Tomas Makaj]]></dc:creator>
            <pubDate>Tue, 08 Nov 2022 19:03:12 GMT</pubDate>
            <atom:updated>2022-11-08T19:14:56.489Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/341/1*YUr1IbR3Zc3t_0riz3ad3Q.png" /></figure><p>Today is my first full week learning Python. I’ve been spending 5–6 hours a day of deep learning. There is a lot of information so i’ve been going back the next day to try and reinforce what i’m learning. I honestly am enjoying the process, Im going through Python Crash Course by Eric Matthes page by page chapter by chapter which I can’t say enough about the book. It was a gift after graduating my bootcamp at Flatiron so its a special learning experience right now. Python syntax is similar to Ruby which I loved and does things that remind me of React lol.</p><p>Some beginner syntax</p><p>message = “Hello Python world my name is Tommy!”<br>print(message)</p><p><em>Hello Python world my name is Tommy!</em></p><p>name = “Tomas Makaj”<br>print(name.title())<br>print(name.upper())<br>print(name.lower())</p><p><em>Tomas Makaj<br>TOMAS MAKAJ<br>tomas makaj</em></p><p>first_name = “tomas”<br>last_name = “makaj”<br>full_name = f”{first_name} {last_name}”<br>message = f”Hello, {full_name.title()}!”<br>print(message)</p><p><em>Hello, Tomas Makaj!</em></p><p>To insert a variable’s value into a string, place the letter f immediately before the opening quotation mark. In python these are called <em>f-strings.</em></p><p>The f is for format, you can do a lot with <em>f-strings</em>. You can use them to compose complete messages using the information associated with a variable or you can them to compose a message, and then assign the entire message to a variable. <em>f-strings</em> were also first introduced in Python 3.6 if using any version before you need to use format().</p><p>Adding Whitespace to Strings with Tabs or Newlines</p><p>print(“Python”)<br>print(“\tPython”)</p><p><em>Python<br> Python</em></p><p>To programmers it looks pretty much the same, but to Python they are two different strings. Its important to think about whitespace if we have an instance involving checking peoples usernames when they log in to a website. Python can look for extra whitespace on the right and left sides of a string to ensure that no whitespace exists we can use methods such as</p><p>favorite_language = ‘python ‘</p><p><em>To remove the whitespace from the right side with</em></p><p>favorite_language = favorite_language.rstrip()</p><p><strong>To remove the whitespace permanently you need to associate the stripped value</strong></p><p><em>To remove the whitespace from the left side with </em><br>favorite_language = favorite_language.lstrip()</p><p><em>Or from both sides with </em><br>.strip()</p><p>Apostrophes</p><p>message = (“One of Python’s strengths is its diverse community.”)<br>print(message)</p><p>One of Python’s strengths is its diverse community.</p><p><em>If you use single quotes python can’t indetify where the string ends because of the comma</em></p><p>message = (‘One of Python’s strengths is its diverse community’)</p><p><strong>Integers</strong></p><p>You can add(+), subtract(-), multiply(*), and divide(/) integers in Python just like most programs</p><p>2 + 3</p><p>3–2</p><p>2 * 3</p><p>3 / 2</p><p>Python uses ** to represent exponents</p><p>3 ** 2</p><p>3 ** 3</p><p>10 ** 6</p><p>Python also supports order of operations too so you can multiple operations in one expression. <br>You can also you () to modify the order of operation to evaluate your expression in the order you specify.</p><p>2 + 3*4</p><p>(2+3) * 4</p><p><strong>Floats</strong></p><p>Python calls any number with a decimal point a float.<br><em>For the most part you can use decimal points without worrying about how they behave.</em></p><p>0.1 + 0.1</p><p>0.2 + 0.2</p><p>2 * 0.1</p><p>2 * 0.2</p><p>But be aware that you can sometimes get an arbitrary number of decimal places</p><p><strong>Underscores in Numbers</strong></p><p>universe_age = 14_000_000_000</p><p>When writing long numbers, you can group digits using underscores to make large numbers more readable</p><p>When you print that number to the console that was defined using underscores, Python will only print digits!</p><p>A constant is like a variable whose value stays the same throughout the life of the program. Python doesn’t have built-in constant types, but Python programmers use all CAPITAL LETTERS<br><em>To indicate a variable should be treated as a constant and never be changed</em></p><p>MAX_CONNECTIONS = 5000</p><p><strong>&gt;&gt;&gt; import this</strong></p><p>The Zen of Python, by Tim Petes Enjoy!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zj7DAIJilsKSPjI1UiWQqg.png" /></figure><p>My next blog will go in depth on Lists. When I started learning Python a few days ago I didn’t understand why they didn’t call them arrays but I do now!</p><p>Happy Coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd8cde64f951" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Beginner’s Guide to Redux]]></title>
            <link>https://medium.com/@tmakajcoding/the-beginners-guide-to-redux-97ac0d0811db?source=rss-87312423ea75------2</link>
            <guid isPermaLink="false">https://medium.com/p/97ac0d0811db</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Tomas Makaj]]></dc:creator>
            <pubDate>Wed, 26 Oct 2022 17:46:21 GMT</pubDate>
            <atom:updated>2022-10-26T17:47:05.192Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/254/1*XP-ywhblBVHlf-dhfLoVWg.png" /></figure><p>Redux is an open-source JavaScript library for managing the state of a web application. During my time at Flatiron we interacted with state on a small scale, 5–15 components what if we are handling 50–200 components it it would be very messy and hard to do. As the app becomes larger debugging would be a nightmare &amp; we would easily lose sight of how information is passed around from component to component.</p><h3>Core Components of Redux</h3><p>Redux introduces a couple of new components to an application to facilitate this state management.</p><ul><li><strong>Actions </strong>— Actions are used to send data from the application to the Redux store. A typical action consists of the type property and an optional payload property. Actions are the only way to update your Redux store (changing information). And you update your store via the <em>store.dispatch()</em> function. Here’s an example of an action in Redux:</li><li><strong>Reducers </strong>— This is a function that accepts the current state and action as arguments and returns the updated state according to the action. Reducers <strong>are functions that update your store</strong>, depending on the actions that were sent. When you use the<em> dispatch</em> function to dispatch an action, you are sending the information to the reducer.</li></ul><p>The reducer will take that information, and do something, depending on the <em>type</em> property of that action.</p><ul><li><strong>Store </strong>— This is the heart of Redux where the state is stored. The state is kept in plain JavaScript objects and arrays. The store holds your application’s state. Like a cloud out there, or the sun, that each person (component) can see (have access to).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*RzfdT3ksN7HvqhYXUSMx8Q.png" /></figure><p>The image below gives us a better understanding without Redux and with Redux</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/1*PNOFAMTqHWNFg1nf4YjuNQ.png" /></figure><h3>Additional Notes</h3><p>There are also a few more terms you’re likely to encounter when using Redux:</p><ul><li><strong>Boilerplate: </strong>sections of code that have to be included in many places with little or no alteration. One of the reasons Redux can seem tricky to beginners is because it contains more boilerplate than you’re likely used to for front-end development.</li><li><strong>Payload: </strong>the conventional name used for the property that holds the actual data in a Redux action object. A payload isn’t necessary, but it’s fairly common to see actions defined like this:</li><li><strong>Middleware: </strong>in general, middleware glues together client-side and server-side code, allowing (back-end) developers to implement logic based upon the request made from the client. In Redux, middleware provides a way to interact with actions that have been dispatched to the store before they reach the store’s reducer.</li></ul><p>This is just the tip of the iceberg, I used this blog to better my sense of Redux as I go along</p><p>HAPPY CODING !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97ac0d0811db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beginner basics of Ruby on Rails]]></title>
            <link>https://medium.com/@tmakajcoding/beginner-basics-of-ruby-on-rails-861442e2438c?source=rss-87312423ea75------2</link>
            <guid isPermaLink="false">https://medium.com/p/861442e2438c</guid>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[ruby-on-rails-development]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Tomas Makaj]]></dc:creator>
            <pubDate>Wed, 05 Oct 2022 21:00:03 GMT</pubDate>
            <atom:updated>2022-10-05T21:00:03.838Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*WAyhfFWVCqoj-dlmw6aglw.png" /></figure><h3>What is Ruby on Rails?</h3><p>Ruby is a language developed in the mid-1990s by <strong>Yukihiro “Matz” Matsumoto</strong> while Rails is a web framework developed in 2003 by David Heinemeier Hansson. Ruby on Rails can be used to build an “MVP” (<strong>Minimum Viable Product) </strong>in minimal time. <strong>It comes with all the basic tools needed to build an application, unlike other web frameworks that are just routers</strong>.</p><h3>Why Ruby on Rails?</h3><ul><li>Rails is a “batteries included” framework</li><li>When a new project is created(rails new &lt;project_name&gt;), it is created with a directory structure that you will always find handy to put stuff into.</li><li>It comes with all the basic gems(libraries for non-rails people) that you will need to bootstrap a new product from zero.</li><li>It follows Convention over Configuration. Even when the project grows large you will know where to find what. Any new beginners can get going with a Rails project in no time.</li><li>It comes with generators that help you create MVC objects like controllers, views, models with a single command. For instance to create a new model, run rails generate model &lt;model_name&gt; or even shorter rails g model &lt;model_name&gt;</li></ul><h4>Model</h4><p>The model layer is where you define classes for the data your application will use/store. For instance, if you want to store posts for a blog, you will have a “Post” model. The model has the capability to interact with the database, to retrieve and store data.</p><p>This functionality is gained by inheriting it from the ActiveRecord super class. Any methods, which act upon this data, should also be placed in the model.</p><h4>View</h4><p>The view layer has one main purpose — to return the relevant HTML to be rendered on the users browser. In Rail a view is held in an erb (Embedded Ruby) file, which contains both HTML and embedded Ruby statements.</p><h4>Controller</h4><p>Without the controller, nothing would happen. The controller interacts with the model to retrieve and store data. It will then pass any data, acquired from the model, to the view.</p><p>The view returns the resulting HTML to the controller and the controller sends this back to the users browser.</p><h4>MVC Summary</h4><p>This is quite a concise overview of MVC. I highly recommend that you read up on this topic, as it is the key to cracking Rails.</p><p>However, the best way to learn is, install it and start playing with it.</p><h4>MY FAVORITE THING ABOUR RAILS !</h4><h3>Scaffolding</h3><p>rails g scaffold</p><p>Scaffolding can be used for building rapid prototypes/mock-ups for your client. They can also be very useful for learning how to use Rails. In one simple command you can create a model, controller and several views, effectively building a large chunk of functionality in one fell swoop.</p><p>This has helped me save so much time during my phase 4 here at Flatiron, be aware that things can get messy if you don’t start correctly. Understanding Active Record and whats going on under the hood is extremely important.</p><p>Well there is so much to cover I just wanted to write all the good about rails and how much i’ve been enjoying the framework!</p><h4>What Next?</h4><p>Try learning MVC, so you really understand the concepts behind it. Try to understand the advantages of Rails and MVC; this will motivate you to learn the framework. You really need to just get stuck in and play with the framework. Download and Install Rails and take your first steps towards more productive and enjoyable web development.</p><p>Happy Coding</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=861442e2438c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ruby vs JavaScript]]></title>
            <link>https://medium.com/@tmakajcoding/ruby-vs-javascript-d844b54e0de2?source=rss-87312423ea75------2</link>
            <guid isPermaLink="false">https://medium.com/p/d844b54e0de2</guid>
            <dc:creator><![CDATA[Tomas Makaj]]></dc:creator>
            <pubDate>Wed, 31 Aug 2022 13:21:15 GMT</pubDate>
            <atom:updated>2022-08-31T13:21:15.325Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JNnGEXSS4yWH-lEbtqXWaA.png" /></figure><p>Phase 3 at Flatiron School introduced me to a whole new language Ruby. After days of coding I can hear the chatter surrounding my fellow classmates and how they felt more comfortable with Javascript so I decided to write my second blog on Ruby and Javascript differences and similarities. Both languages were both made around the same time period 1995 but were made with different goals. JavaScript was made by Brendan Eich with the purpose of being able to run in the browser. Ruby was made By Yukihiro Matsumoto, and was designed to make programmers life easier. He wanted it to be simple and dynamic to use, easy and light to write, but capable of building complex things quickly. Javascript is a client-side coding language that excels at front-end application development. On the other hand, Ruby on Rails is a full-stack framework that is most often used for backend development. It’s obvious from this description that they don’t compete, but rather complement each other. Ruby is a modern, dynamically typed coding language that is specially designed to make scripting and app development not only easy, but also fun to work on. It utilizes a full stack, and superbly optimized web framework known as Ruby on Rails framework. It’s generally used for backend development.</p><p>Let’s start of with some basic syntax differences, “puts” is a built-in Ruby method that will output a string of text to the terminal. It’s the Ruby equivalent of console.log</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*T242cO_Cet5qRn5nP1EdKw.png" /></figure><p>You can also see in this image that in Ruby, any line that starts with a “#” won’t be executed. This is the Ruby equivalent of “//” in JavaScript.</p><p>Like JavaScript, Ruby lets you define strings with either single quotes or double quotes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*CvAfnppIQYMPzwqyEXMNRQ.png" /></figure><p>If you want to use string interpolation in Ruby, use double quotes like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*AXI16IEATUjBkKTnnf8KFA.png" /></figure><p>In Ruby, unlike JavaScript, there are two types of numbers: Integers and Floats.</p><p>Integers are whole numbers, like 4</p><p>Floats are decimal numbers, like 4.4</p><p>In Ruby, there is one special value that represents the absence of a value, nil.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*Q6AwTR2tnvGE4-wam0QgiQ.jpeg" /></figure><p>In JavaScript, there are two different data types for representing the absence of value: “null” and “undefined”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/1*q0vOGPdB0lWgUkq6vCGj_w.jpeg" /></figure><p>Booleans</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/210/1*jCFqY4jAmHRNynPVd-tdjw.jpeg" /></figure><p>There are only two values of the Boolean data type: `true` and `false`. In Ruby, however, there is no such thing as a Boolean class. Instead, every appearance, or instance, of `true` and `false` in your program are instances of `TrueClass` and `FalseClass` respectively:</p><p>In Ruby, only nil and false are falsy values. Everything else is truthy, even 0 and empty strings.</p><p>Contrast this with JavaScript, where null , undefined, false, 0, NaN, an “” are all falsy values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/1*sZS1tgWymXMpohA2iNpNSA.jpeg" /></figure><p>One of the first things you likely learned in JavaScript was how to write a function. In Ruby we will write methods see the difference below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*P629oId_GQK7qAYfmlpFaQ.png" /></figure><p>Ruby has slightly different syntax for writing conditional statements using `if/else` then JavaScript. Here’s an example below `if/else` statement in both JavaScript &amp; Ruby</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*atv8OSsJy-bdwNlD5YHTrg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*0j338fJSd1KBzp2yhsCLag.png" /></figure><p>I spent much of my time above showcasing the differences/similarities in the above codes. They are two different pieces of code that basically accomplish the same thing. As mentioned before both of these simple programs do essentially the same thing. This covers some of the differences and similarities so i wont go on to explain the rest because hopefully by now you get the point, both of these codes are done in different languages using different methods, but despite all that their end goal is the same.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d844b54e0de2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coding Challenge: Phase 2]]></title>
            <link>https://medium.com/@tmakajcoding/coding-challenge-phase-2-4608cf55ba7e?source=rss-87312423ea75------2</link>
            <guid isPermaLink="false">https://medium.com/p/4608cf55ba7e</guid>
            <dc:creator><![CDATA[Tomas Makaj]]></dc:creator>
            <pubDate>Mon, 22 Aug 2022 19:08:57 GMT</pubDate>
            <atom:updated>2022-08-22T19:08:57.519Z</atom:updated>
            <content:encoded><![CDATA[<p>For my first blog during my time at the Flatiron School, I have decided to help others along the way by writing out the steps to complete the Phase 2 React code challenge. THE BANK OF FLATIRON</p><h3>The First Core Deliverable</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*XrU97nSMypxUj_k5-0S8Ug.png" /></figure><ol><li>We Create a const by using useState. We fetch transaction data from the JSON server using a GET request in the AccountContainer Component. We also place our fetch within a UseEffect with no dependencies since we want our data to be fetched <em>once</em> after the DOM has been rendered. We pass down transactions to the TransactionList.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*_vAURraSB1ppUH-5Hh41gg.png" /></figure><p>2. In TransactionList we pass down our transactions prop then we render the transactions by using .map and map through our transactions. We return the new array into our Transaction child component every Transaction is given a unique key using the transactions individual id.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*Iud1JPtjjToJvXXnAvrPLA.png" /></figure><p>3. In Transaction we place our transaction characteristics in the HTML template and get our transaction to render on our page!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*0Dx1vB6YJRyFIh7nOSVFeg.png" /></figure><p>MAGIC !!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_EgsoD5U7dZnSE3uaAY7hQ.png" /></figure><h3>The Second Core Deliverable</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*MuNKN_x71zqb5j60Wg7POQ.png" /></figure><ol><li>Since our Transaction Data state will need the new item to render it in the DOM, we switch to our AccountContainer (parent to AddTransactionForm component) and construct our addItem function to pass as a prop to our child component.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*FhpIvS3OC1HZgy-qOMwpqA.png" /></figure><p>2. Then we pass down addItem to the AddTransActionForm</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*Uo-azBCV4dBjVE7YLCDNHQ.png" /></figure><p>2. Switch over to our AddTransactionForm, where we construct our user’s addItem state, we construct a function to continually update our state when the user types, we construct our submit function to pass our callback function in our POST request, and reset our form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L64w1Eo9V92zG3Gp4IC1oA.png" /></figure><h3>The Third Core Deliverable</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*4X1clgrazhDWdc6jNtN2Pg.png" /></figure><ol><li>We set up a new const using useState. We create our searchFilter function and use .filter to filer the transactions in the search bar. We also create a new const for newTransactions = search filter and we pass down setSearch in search &amp; newTransactions into transactions</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*eeOYPbKl_iPEYgooGz4aFw.png" /></figure><p>2. We pass down setSearch as a prop in search. We create 2 functions one to handleClick and the other to handleString to have the search button work when we are searching transactions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*uUrILd3ZHyspXx42njygnA.png" /></figure><h3>Conclusion</h3><p>Magic! You passed your Phase 2 React coding challenge!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4608cf55ba7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>