Learn to Code with Ruby - Section 01 - Lesson 04 - Mac OS : Install Atom Text Editor

Learn to Code with Ruby – Section 01 – Lesson 04 – Mac OS : Install Atom Text Editor



Views:607|Rating:5.00|View Time:9:43Minutes|Likes:5|Dislikes:0
Get the full Udemy course for $10 here:

all right in this video I'll take you through the process of setting up the Adam text editor for your Mac machine Adam is the editor that we'll be using to actually write our Ruby code throughout the course of course if you're familiar with any other text editor you're more than welcome to use that whatever is your personal preference for example if you've worked with something like sublime that's totally cool if you're familiar with full-blown E's or integrated development environments those are totally fine as well but if you're a complete beginner and you're sort of looking for your first text editor I think that Adam is a great choice so if you're unfamiliar with what a text editor is basically we can't write our code in something like you know TextEdit or notepad on Windows or even something like Microsoft Word we need something that's going to actually help us write our code as we can see here on the Adam page which you can find on Adam dot IO we can see here the text editor offers us things like color schemes that indicate certain words in certain colors it allows us to organize our files right here it allows us to open multiple files at once and really easily click among them just like we do with tabs in the browser basically a text editor makes it easier to write your code makes it much more easier to detect things like errors and things like that so we want to stick with this whenever we're writing our code and this farm as far as Adam itself it's a great choice because it's really easy for beginners to pick up Adam is actually developed by the exact same team that works on github if you're unfamiliar with github it's a very popular online storage place for people's code people store what are called repositories there which are basically just big projects and what that basically means is that Adam has the full support of a major tech company behind it so it's not going away anytime soon it's growing very quickly in popularity it has a very large theme of open-source developers behind it plenty of lots of plenty of add-ons and customizations and additional features that you can add on and remove and things like that it's very open-ended so I think it's a great choice for a first text editor if you're new to programming so if you head to Adam down IO you can go ahead and click this bright red download for Mac button and that will start the download of the zip file to your computer I have it downloaded right here in my finder here in my downloads folder so when everything is downloaded on your end you can simply double click to unzip the file that's going to give us the Atom application which we of course want to drag into our main Applications folder for an ease of reference so I'm going to drag it into here then what I recommend is to take this atom and simply drag it to the dock so you have it you know really easily accessible and once that's done we can go ahead and launch it for the first time the first time that atom launches it's probably going to give you a warning like this is going to ask you it's an application downloaded from the internet are you sure you want to open it yes you can click open it's totally safe and Adam might also open with a little bit of documentation depending on whether you've installed it previously it may not for example in my case it launches me straight to in a blank document but in your case if you simply see things like documentation you can go ahead and explore it up top you're going to see tabs like this the exact same way that they appear in your web browser for example Chrome or Firefox each one basically represents another open file so if you have a bunch of tabs open here you can simply click the X button next to each one to get rid of them until we're back to this empty screen so we've installed Adam but we still need to set up a couple other things to ensure that we can work very efficiently within this course the first thing that I want to do as soon as I've opened up this window is install a additional add-on for Adam called Adam runner the way we do that is by going to the main menu here clicking Adam and then down here we have this Preferences option let's click on that that's going to take us to the settings menu right here and on the left here we have a bunch of tabs that basically allow us to customize various features of the Adam text editor I want to click this install button on the bottom right here up top here you'll see that you can switch between packages and themes this is basically where you where you specify whether you want to search for a specific package a package is just an add-on what it basically does is add functionality on top of Adams so it allows you to do different things depending on whatever you want and they can be anything from serious programmatic help for example documentation or some kind of technical feature to something completely silly like making your text Explorer as you write so there's all kinds of different add-ons available and then themes of course deals with the aesthetics of the text editor which means how it looks what color schemes it uses what fonts it uses how tabs are represented that kind of stuff so let's go through an example of installing one package and one theme so for packages I want to search for an atom – runner like this alright and with packages selected I can press ENTER and it's going to be this very first result that says atom runner run scripts inside of atom keep in mind your version here may be a little bit a greater that's totally fine what you want to do here is just click the blue install button and that's all you need to do it's going to query an online server download that extension or add-on or library or package whatever you want to call it to our local computer and then atom runner is going to be set up once it's set up we can actually click on this Settings button right here and that'll take us to the documentation for the actual atom runner and as I scroll down here we'll actually see what a typical file will look like with atom runner here on the left we have our sample code and you can actually see here I don't know if you can see this right here but it says rubies so what we have here is valid Ruby code just like we're going to be writing throughout the course and on the right we have the output of running the actual Ruby file within our atom text editor that's why it's called the atom Runner because it runs our files within atom we don't need to jump out to the terminal every single time in order to test it we can simply write a line of code and then instantaneously get validation by seeing how it looks and this is basically how the entire course is going to proceed I'm simply going to write a bunch of code here on the left and then we're going to see the result in the atom runner feature on the right for certain features we'll have to go and dive out into the terminal because this functionality doesn't exist for every type of Ruby feature but for the most part we'll simply be using atom Runner to immediately see what we're going to what the result rather of what we've written and as I scroll down here you'll see a little bit of the documentation the only thing you have to remember here is in order to activate the atom runner all you have to do is press this combination ctrl + R so you write your Ruby code in a valid Ruby file that has an extension of dot RB and then once you write that code you just press ctrl R and this thing will pop up on the right and show you the result of your code and don't worry if this is a lot to take in I'll take you through a step-by-step example in just a few lessons alright so we've installed the actual atom owner itself let's go back to this install section right here and this time I'm going to switch to themes and I'm now going to search for a theme of course there's perhaps tens of thousands of themes available but I'm going to search for one called mana Chi light now you don't have to install this theme or even install any other theme you can stick with the default options available but if you want to follow along with my tutorials and you want everything to be exactly the same and by that I mean the colors and the fonts and all that kind of stuff if you like that similarity then this is the theme that I'm going to be using throughout the course so I'm going to click install right here that's going to do the exact same thing as with admin runner it's going to download it locally and that's it it's already installed we don't have to do anything more a couple other things we have to do here on the left you see this editor tab right here let's click on that scroll down to the bottom of this thing and you're going to see this feature called tab length and it's the number of spaces that are used to represent a tab make sure that this setting is set to 2 it may be set to 2 by default if it is then you don't have to switch anything but if any other number is written here just make sure you write to what this basically means is telling telling the text editor what's going to represent a tab in other words when we press the tab key on our keyboard how many spaces is that equal to and ruby's best practice is for a tab to be equal to two spaces finally what I want to do is actually activate the theme that I just downloaded so here on the left I'm going to click on themes here you see we have two options UI theme which is basically the user interface theme so that's things like this the look of the text editor itself its menus its buttons that kind of stuff here I'm going to switch this to one of the available default such as atom light that just keeps things a little bit lighter I think it's a little bit easier on the eyes for me of course if you like a more darker theme you're more than welcome to choose whichever one you like or download a custom one using the install button right here and here the syntax theme actually refers to the syntax within the code files that we actually write so when we're writing our Ruby code how is it going – hi like certain keywords within the language and things like that and here is where we're going to see our available Manik highlight that's the thing that we downloaded just a few seconds ago and install so this is what I'm going to be using and once you activate that that's it you really don't have to do anything else you can close out of your settings pane and here you can see the entire UI of the text editor has changed it's no longer dark we have the light theme and as soon as we starting start writing our content within a Ruby file you'll see that the syntax is also going to be a brand new one compared to the atom default that's really all there is to this lesson in the next lesson we'll actually practice diving into our very first Ruby file we'll write our very first line of code and use atom Runner to run it from within our atom text editor alright so I'll see you in the very next lesson

Leave a Reply

Your email address will not be published. Required fields are marked *