Elixir Exercism Track - Lesson 1 "Hello World"

Elixir Web Development
Transcript

English (Auto-generated)

Hello. I'm going to be working along the homework for the inter to elixir series. Um I just finished the first Hello World lesson and the homework is to tackle this um exorcism Hello World thing. So we are going to go ahead and work together um on that together. I haven't tried it all yet, so this is going to be a very live and reel um experience of us doing it together. So we're gonna go to the Hello World exercise. Perfect. I'm gonna do it locally so that my code will end up in my code editor here. Um so hopefully um this will work well I do have exorcism downloaded. Um it's decently easy to download. I just followed this here to do it before I started this video um back over to my code editor and we're gonna do this family too, user slash exorcism. Elixir, whole, whole the world. Mm hmm. Alright, so we're gonna do cd tv doc, nope. Already screwed it up. Mhm. And then we're gonna open code there and I'm gonna go ahead and actually add in that code base in here. Um So we got done on my other screen so you guys are going to be able to see what I'm doing here but perfect. So I'm gonna add that in there. So here we have the Alright, so mhm Hello World. Yeah, the classical instruction exercise just say hello World, Hello world. The traditional first program for beginning programming in a new language. The objectives are simple, write a function that returns the string. Hello World. Run the test suite and make sure that it succeeds, submit your solution and check it at the website. So let's do the read me here. So here's what we're gonna do. Um mm hmm. Hello world. So what we're going to do find a function which we agree called run and we're going to have that automatically given end. So that went in because of my format are there and we're going to do iO dot put Hello world perfect. And more about solving exercises locally. Exercise some of the exercise from how to run the tests help dot MD Okay. From the terminal, change the base directly to the exercise and execute the tests with bash mix dot test. Alright, so we're gonna give this a shot. I'm past one failure that says Hello World assertion with equals equals fails. But I didn't write this. Maybe we just wanted to say hello world like this. Yeah, It cost one failure. Mhm um Okay. I'm confused to why input. Maybe I want to get rid of this. Oh, I want to have it be Hello, I think. Okay, so write a function that returns to lower up on the test to make sure submit your solution. If everything goes well, you'll be ready to your first real exercise. So maybe I need to name my function. Hello? Oh my gosh, I don't remember what I did wrong here. Okay, so then we need to do Bernie's here, scared it up so we need to do hello world dot run assertion with equals equals failed. Do I just need to change this to Hello? Where else? I'm not sure what they're wanting in the exorcism. Okay. Oh, so they were just wanting me to change this test here. Okay. That's confusing. Can you help running the test or submit your code? Check out, try the starting point to help you get started with building your implementation sitting on the track. Okay. So this had back up here to see what we had here. So we wanted hello to just say hello world there. I deleted all of this. I said hello and then dead. Hello world. And it changed us to say hello. Now let's give this a shot. Yeah, so that's correct. So that's so I wonder why we don't want the io dot put so no, I owed outputs. Okay. So now we need to submit it. Break me help. Okay, so submitting Thank you. Mhm solution with somebody successfully go view it here using exorcism profile. Mm hmm. Perfect click. You're done with the exercise to unlock a few concepts. See all of your iterations Hello world, you're an editor overview. Okay, so Mark as complete. Show me the console. Oh, okay. That's a lot. Um I want to see here. Does it show you everybody else. Mhm. Mhm. Mm hmm. Mhm learn from other solutions. This is where we usually link people solutions. Okay. So it will do it, but not here. All right, okay. So this first one is done. I'm a little confused why we didn't do the io dot puts because that's what we learned in the tutorial. But yeah, this is what we learned here. Um let's look this up. So with elixir io dot pucks, Yeah. Mhm, mm hmm. Yeah. Okay, I get it. So I o is the working inside of the console, so it'll do the same thing as like a console log will but we don't want it to print to the council. We wanted to kind of return. Hello world, Right. Review, write a function that returns the string. Hello World. So this is just doing a return but just putting it in the console. Okay, that makes sense. I figured it out. Alrighty. Well, that was probably longer than I needed to take but I wanted to do kind of a realistic walkthrough of it. I'm sure you guys probably figured it out a lot faster than that. But my first lesson is done
266 Views 1 Likes 0 Comments

Welcome to the first exercise in the Elixir Exercism track! It's also the homework from the first Lesson in @tam's Intro to Elixir Series!

Comment
Leave a comment (supports markdown format)