Placeholder Image

Subtitles section Play video

  • what is up, guys, For us here yesterday and, uh, the live stream.

  • I was talking a little bit about how I kind of want to connect the dots for any newcomers and even for more advanced people for the later on steps when it comes to solve for development, basically take you everywhere from downloading the I D.

  • Which is basically, like two seconds of this video to creating a simple turbine application within that I d e ready few tests for that term application because we're gonna be pushing it up to get up, creating our own get repositories and whatnot, and then go on ahead and using circle see eye to integrate.

  • Some continues integration.

  • And those tests are gonna be run through circle C.

  • I before pushes it over to our master branch on target of repositories.

  • That's why I say it's for beginners and people who are a little bit further along because you have no experience when it comes to C.

  • I c d.

  • Work flows.

  • That's something that you're gonna run into one way or another if you be planned to become a professional software developer.

  • So I think that anybody of any skill level, from beginner to Maybe you've been doing this for a while, will take something away from this video.

  • At least that is my hope in plans.

  • Quick disclaimer.

  • I'm not sure how good of a teacher I am.

  • Sometimes I tend to just gloss over some important facts because I may assume that already know it.

  • Other times that may fall down a rabbit hole because I don't think you know anything about it.

  • So we'll see how this goes.

  • All of this is being done on Windows 10 and I could make any argument.

  • World is why Maybe you want to be using Lennox for software developer, but I just want to break down the barrier to entry there.

  • So many different questions when it comes to linen in the destro's and things that nature.

  • So we're gonna be running it on Windows 10.

  • If you have Mac OS, that should be the same exact thing.

  • And I also want to make it before we get started.

  • Is that Circle C.

  • I, A sponsor is the sponsor of this video.

  • And while we are gonna be going over a little bit of ah, I say a little bit.

  • We're gonna be setting up a C.

  • I had continuous integration workflow for a very simple terminal application.

  • Circle C.

  • I does a whole lot more than that.

  • I just want to read a few notes that I took down on my experience in Circle C.

  • I that for some of you who are a little bit more advanced and want to do a little bit more, maybe hop into the continuous deployment side of things as well as the continuous integration like we'll be doing in this video service.

  • See, I have my own notes, professional service, something you'll see in top companies like Facebook, Spotify, Kickstarter and Go pro.

  • It allows debugging in your CCD pipelines with SS H.

  • You can use work flows to schedule jobs, share data among jobs where each workflow has an associated work space which could be used to transfer files to downstream jobs.

  • As a workflow progresses, cashing dependencies is another big one.

  • It makes jobs faster and circle c i by reusing the data from expensive fetch operations from previous jobs, and you can use a Circle C I C ally to split tests all of that that I just mentioned is available for free on their performance plan.

  • However, they offer even more like resource classes scaling concurrency and Dr Lane Cashing.

  • If anything I mentioned or everything I mentioned went right over your head, I want to be leading links down to the appropriate circle.

  • See, I paid for everything I just listed so you can go ahead and click down there and just have fun falling down that rabbit hole because there's a whole lot to learn when it comes to C I.

  • C d.

  • Work flows and things that nature.

  • And, like I said, professional saw for development environment you're going to be using continues integration and or most likely, and continuous deployment.

  • So it's definitely something worth learning.

  • If that is your ultimate goal.

  • My first things first eclipse dot org's slash download.

  • You're gonna download Eclipse for this particular project because we're gonna be creating a Java terminal application.

  • Caesar's cipher.

  • I'll explain that in just a second, but basically all you do is eclipse that orc slash downloads Download whatever it suggests.

  • Probably your 64 bit.

  • If you're on Windows 10 click download.

  • You're gonna be downloading this right down here is gonna be an excusable file and just follow the prompt if sometimes there's different options like, Oh, do you wanna do custom settings or just stop default settings?

  • If you don't know that you want either one of those just to default, Eclipse knows what you need better than you.

  • If you don't know that you need something specific.

  • I'm very I really love cryptography and puzzles and just things of that nature and effect.

  • That Caesar cipher is a very, very simple site for some that I think you'll be able to just catch on to an innocent if you don't already know what it is in the program itself is fairly simple that I already know what I have in mind when it comes to the tests.

  • That's what we're gonna be doing today if you don't know what Caesar Cipher is.

  • All know, Caesar Cipher is an encryption technique, a very, very simple encryption technique at that.

  • What you do is you take the alphabet.

  • You shifted down a certain amount of letters, and that is how you write your message, and what will be coding up is the ability to take a message, throw it into our code, and our code is going to spit out the encrypted message using a Caesar cipher.

  • All right, so you want to be ableto pullup eclipse?

  • I'm gonna use this as the default and do not ask again.

  • Please.

  • This is eclipse Workspace.

  • This is where you're probably gonna be saved.

  • You would get this page when you first somebody clips because they're gonna try to recommend you gonna try to steer you in the right direction.

  • And I do.

  • After we go through this term application through this video, you take a look at the overview.

  • Or maybe some tutorials are samples because the more you're exposed to what is going on within your I d e, the better you'll be able to use it, the more useful it'll be for you.

  • Knowing your i.

  • D is just as important is knowing your language is just as important is knowing how to write tests.

  • And all of this plays into the part of being yourself a developer.

  • But we're gonna close out of that bed.

  • You'll see.

  • It'll give you a few options, which you could do right here.

  • Or you can come on up to file you click on new and it has this window right here.

  • Now normally, what you would do that potentially is come up here and creating job a project.

  • But since we're gonna be creating a continuous integration workflow, what we're going to need to do is come down to other and we're going to be creating a greater projects under here.

  • You'll see Great.

  • All you'll see greater project.

  • Gonna click on that click next run a name, this project Caesar's cipher.

  • Just as such.

  • All right.

  • Next.

  • I think everything else is just fine.

  • Never gonna click Finish.

  • He's gonna do a lot of work over here.

  • Don't seem too intimidated by what we got going on over here.

  • So we have source Main job directory.

  • We have our Caesar cipher package and we already have a library dot java file.

  • Don't worry about any of this.

  • We just need to create it as a great old project.

  • Referred to work properly, roomie, implement the continuous integration with Circle C.

  • I.

  • So what you want to do is obviously you'll see your source main job.

  • And now you could create it right in here.

  • Or if you wanna keep all of this stuff closed.

  • You see, you have this source file right here, and then we're gonna come on here, right Click main we're gonna cover.

  • Ever knew were going to go down to class?

  • This is your Java class.

  • We're gonna name this now naming conventions.

  • While they don't necessarily matter too much when it comes to the project itself.

  • When it comes to the Java classes, make sure you capitalize every single word just like that.

  • This is going to be Caesar cipher.

  • We don't need to make a main right now.

  • We'll make that later and finish.

  • Now.

  • This is the part where most people can get Thio and think I don't know where to go from here because I like what you start typing.

  • What do you start typing here?

  • Well, you gotta think about whatever project you're about to build.

  • We're gonna be building Caesar cipher, and obviously we have an understanding of Caesar Caesar cipher.

  • This is when this notebook come in handy.

  • You could write down exactly what you need, the objects in which you'll be using.

  • So let's just talk about it here.

  • So we're gonna need the alphabet, because in order to implement Caesar cipher, we're gonna have to shift it down a certain amount of characters down the alphabet.

  • So we're going to need the alphabet will start off there, and then we're also gonna need to be able to implement that shift or that offset.

  • And we're also gonna have a message in which we offset, and that's going to turn into deciphered message.

  • So let's just start there and I'll talk about it towards the end of me coding all of this up.

  • All right, this is a good place to pause.

  • And that is because we have this red underlined right here and I say paused by me, explaining to you what exactly I just did within our public string cipher.

  • So we ever in parameters of our cipher.

  • So this cipher, when I say cipher, this is the message encrypted.

  • This is the encrypted message.

  • So what do we need within that?

  • We need the original message, and then we need the offset.

  • So the offset in which you are applying to your message and here's the thing.

  • We want to make sure that the offset because it's gonna be oh, it's gonna be a manager is gonna be a number in which we offset by does not exceed 26 because we could only offset it by up to 26 letters.

  • Offset module equals alphabet size and that allow it to avoid overflowing over 25.

  • So, basically another way to write this, uh, I'll just write it like this.

  • Offset equals offset module, alphabet size.

  • And if you're wondering how it did that just there, let's take a step back.

  • Right?

  • Typed in the beginning of something, I've already declared a l alphabet size control or command space alphabet size.

  • Okay.

  • And so I don't have to type it in every single time I want to do that.

  • There's a lot of those shortcuts like that.

  • But this right here is the same exact thing.

  • Is this right here?

  • So in case you want to see it where it makes a little bit more sense in your head and more traditional manner of looking at things, we're gonna take that out And what we're what we have going over here.

  • So we have our sharing.

  • We just declared a character array.

  • We called it character, and we have a string message and we're going to take the message.

  • The string message were to turn that into characters and store all of the characters into our character array.

  • So if we have 25 characters within our string that is stored within message, they could say, How are you doing today?

  • Each one of those characters h o W.

  • Those will be stored as characters in our character array that we called character.

  • And what we have going on over here is shift.

  • This is our shifting.

  • This is the same offset.

  • Uh, you know, a lot of C.

  • I could name this offset by that's Let's do that.

  • So you stay consistent.

  • So offset by this is going to be our method offset by road to create new method.

  • There there's gonna be calling in the parameters are character from a character array and the offset what this code is doing right now is calling this method right here basically.

  • So whenever I call this method offset by it offsets our message to how we want it and then return new.

  • If you notice that this if I took out return to right here, it's yelling at us up here and is because We need a return statement with this.

  • So return new string character.

  • What we're doing is basically when we go through our string cipher, we go through this all these statements right here.

  • What we end up with is our character that we're converting to a string storing industry now want to offset by.

  • We just had to throw in the logic there.

  • So whenever we called this method right here, it actually does something.

  • And this is our logic right here.

  • So let me explain this for a 2nd 1 This is yelling at us for the same reasoning that the offset by was yelling at us because we need to create a method out of what we have going on right here.

  • And we're gonna add a little bit more logic, and then we'll be we'll be done.

  • So that is the offset Char.

  • We'll get to that in a second, but let me take you back to the fourth.

  • So that's just a regular for Luke.

  • I'm going to take you through it anyway.

  • But just know that Hey, it's regular for them.

  • So we declared, it's your eye.

  • We're gonna be using this only in the four loop.

  • We equaled it to zero, and then we have while I, which right now equal zero, is less than character length.

  • We're going to be doing whatever is in the four loop.

  • And every time we do a rendition of what's in the four loop, we're adding one to I.

  • So next time it comes through, it's gonna I's gonna equal one, and then it's going to go to.

  • And the thing is, with character length, character length.

  • That is the value of how many characters are within our character array that we determined up here, which is obviously storing our message as each individual character in the array as we previously discussed, and how many characters like I said, If it says, How was your day today?

  • However many characters, that is, let's say it's 15 characters.

  • This right here basically just equals 15.

  • So while I is less than 15 we're going to be keep on doing a four loop and also within this four loop what we're doing here.

  • We have our character, I and with I were running through each and every character that is within our message.

  • That's all that I represent.

  • So zero while I equals zero up here As we go through the four loop, I will equal zero or I've a lickle one and then two and then three and then four.

  • And that will represent the position in which the character is within our character, you with me in it.

  • And then we're also running this method that we just create him about their logic into in a second, which this is our message, traverse all this is us implementing Caesar cipher into our character and your message, and we're just storing it within this, right?

  • So now we need to do is our offset character.

  • So the logic into there.

  • So I mentioned our previous method where we're gonna have letter and letters and we're going to assume that every character in our message is lower cased representing a lower case, A and a lower Casey or not, We don't care about the upper case because we have control over the message.

  • So that is what we have decided together within this within our offset char.

  • We're also on Lee allowing us to do a left rotation.

  • We're going to be looking at the lower bounds with this statement right here, too, to account for a left rotation perspective.

  • If you have the letter E.

  • If you want to shift it the whole entire alphabet around 11 Letter E three, the amount of three you could dio e f g h or you could dio e d c B.

  • So that's three.

  • But that's either way.

  • We're only allowing for a left rotation if we wanted to do a right rotation as well.

  • Well, let's just add that in there.

  • Why not?

  • It's basically the same exact thing we got going on here, but we want to shift around the less than to a greater than and it's gonna be greater than the last character of the alphabet.

  • And that is the letter Z that we have determined up here.

  • And then we also want to do C minus alphabet size, not C plus alphabet size.

  • They're just changed a few things, and then we obviously changed turns here.

  • Tours return, see, And this is a Caesar cipher.

  • However, since we're doing everything in eclipse the way that we want to run this in order to make it cleaner, we want to create a main dot Java file we're gonna be creating a main method within that main dot job, a file that is basically going to be our operations.

  • That is what we're gonna say.

  • Hey, run this because whenever we clicked, this run button up here is gonna look for our main method is gonna run our main method, and then we'll start basically doing all of this code from our main method.

  • But we'll get into that, come down your source main right, click new, and we're gonna create a new Java class.

  • So under Java class, we're gonna name this main member Capital M.

  • And which method Stubbs, would you like to create Rex going to create a main method?

  • We're going to check that and click finish.

  • So this is what we're gonna do with in Maine.

  • While we are going to be calling our cipher here.

  • We're also gonna be determining hard coating in for the purpose of this so you can actually see how everything works.

  • We're gonna be hard cutting in the message.

  • We're going to be hard cutting in the offset.

  • We could prat the user, actually, if we wanted to to type in the message and then type in the offset.

  • Uh uh, We'll figure that out here in a second.

  • But what are we going to do?

  • We're gonna have We're gonna have Caesar's cipher, so we need Caesar cipher.

  • Here, let me take a second right here.

  • I know I was previously going through the whole entire code and then explaining at the end, but as I do it, I think I'd make a little bit more sense.

  • Okay, let me take it back a step.

  • So, Caesar Cipher, This right here is a whole entire representation of this file right here.

  • This class, I should say.

  • So this class Caesar cipher, we created an instance of this class within our main with this line right here.

  • So, Caesar Cipher, That is obviously referring to this class.

  • We just named it Caesar cipher.

  • We could name this whatever he wanted to make it.

  • Name this Bob.

  • As long as we call it as Bob, it doesn't matter.

  • But conventions, you name it the same exact thing.

  • You just lower case it and then it gives you the ability to call anything any object within that class and has a list right there.

  • But if you have a lot of objects within your class.

  • You could just start typing, and then it'll obviously filter out.

  • Hit, Enter.

  • And now it's asking us.

  • Okay, We need toe fill in the message and fill in the offset.

  • So what do you do here is we could create a variable.

  • That is message.

  • Let's just do that message and offset.

  • Everything is separate when it comes to this particular class and the other one right up here.

  • Let's just create message.

  • What?

  • His message.

  • Mrs A String.

  • How are you doing today?

  • Remember, we didn't take into account any of any of this any any special symbols and upper case.

  • So what I'm doing right now, I think I'll just ignore the special symbols.

  • Not 1% share what we're doing right now.

  • How are you doing today?

  • And then we're going to throw that deceiver site.

  • Caesar's a cipher.

  • We're gonna have an ent offset.

  • And we're gonna put offset of 12th.

  • I'm a format.

  • This a little bit better.

  • Keep that there and keep that there.

  • And this is what we got going on.

  • So if we come on up here, we click Run main Java.

  • It does all the work, but it doesn't tell us anything because we haven't printed out any of the work.

  • So what do we want to do here?

  • All right, so let's take a second right here because I made a mistake.

  • I made a mistake.

  • Obviously, I didn't touch my code thoroughly beforehand.

  • As you could see it, Seifert our message, and I'll explain a little bit as to why here in a second.

  • But it's separate our message, but it also shifted all of our spaces agency space, space, space, space.

  • So these air after three characters after three characters after three characters.

  • So three characters space F three characters, F three characters, F five characters, five characters, F capital left.

  • So what we did here is we forgot to basically ignore the space is not within our character, Ray, but within our cipher.

  • So what we're gonna do here within our character, we're gonna do an if statement.

  • If so, what we've done here, I'm going to say that, So if character I does not equal space, then we're going to offset the character by what we're doing.

  • All within this method that we called appear now, it should work.

  • All right, let's test this out.

  • All right?

  • Now that we have everything pointing out exactly what we want to we have our original message we have are offset.

  • And we have our seIf erred message.

  • We actually have a little bit of redundant code.

  • So since we're printing out our cipher message and we're running the code right here, we don't need this code right here so we could delete it.

  • We also could run this code and assign it to we could save string.

  • SeIf erred message.

  • And we could basically let let's do that.

  • So it just so that it's a little bit more clean.

  • Little bit, little bit cleaner, all right?

  • And that should do the same exact thing.

  • That's the same exact thing here.

  • All right, so now that we have exactly won't put it out in our bar code seems to be working this this planned.

  • Allow me to take you through basically the order of operations that happens.

  • That eclipse does when it runs our code from the time we click this run button to the time it prints out what we got going on down in the console.

  • So whenever we start off, we click this run, but it looks for our main methods.

  • So remain methods right here in our main class and runs this code, but not all of it.

  • Once it goes, it goes the line by line.

  • So online said, we're declaring our message.

  • We want our messages say, How are you doing today?

  • This is the message that we want Seifert and Online.

  • Eight.

  • We're determining the offset of that of that message to be seIf Erred, and that is the value of 12 pretty simple stuff online.

  • 10.

  • What we're doing is we're creating an instance of the class Caesar cipher, and we're giving it the name Caesar ciphers.

  • Every time we call Caesar Cipher, which is right here, we're basically accessing putting our hand down into the the class that is Caesar Cipher.

  • So now we're able to access all of the code within these curly brackets right here, which is all of the code so we can even access letter A or letters e or alphabet size.

  • All of these are objects creating an instance of Caesar cipher were able to access those objects, and that is exactly what we're doing online.

  • 11 so online.

  • 11.

  • Let's look at the code that is being executed.

  • Remember this code on the right side of the equal?

  • Sign it.

  • Whatever the result of this is going to be stored into cipher message.

  • Just like the value.

  • How are you doing today?

  • Is being stored in the string message where the value of 12 is being stored.

  • An offset every time you use offset.

  • That is just a representation of 12.

  • Because that is a value in which it is storing.

  • Every time you use cipher message from here on out, which is right down here, you are accessing the value in which is stored in there after running this code.

  • But what?

  • This is where we basically run all of the coats, their Caesar cipher.

  • That is obviously the instance of Caesar cipher class.

  • And what I say before, we want to be specific with what object we choose to dip our hand down into.

  • So we said, Hey, we want to access the method cipher.

  • So we're gonna be accessing the method cipher that is within the class Caesar cipher gonna be passing in our own parameters off our string message, which is how are you doing today?

  • In our end, offset, which we have given it the value of 12th.

  • All right, Now let's get into it within this cipher.

  • What are we doing here?

  • So we have our offset.

  • Now, this is now equal to 12 in this message right here.

  • This is now equal to How are you doing today?

  • So now that it's in our method, cipher is going to start running the code.

  • So line 10 runs Langton Iran's 9 11 And remember line 11 that is turning our string called message.

  • Which is how are you doing today into a character A called character and then aligned 12.

  • We're going to be calling offset by the method offset by right down here and passing in the parameters character and offset.

  • And then basically what online?

  • 12.

  • It is going to access.

  • All of this code is going to run.

  • All this code is gonna run the four loop as long as it allows.

  • Gonna hop to the F statement as long as the character I does not equal a space and there's gonna run line 19 Now, remember online 19 were running this code, and we're actually gonna be storing it within character.

  • I So this code right here this is us calling the offset charm method down here passing in our parameters.

  • So every time we come through a letter, we run all of this code returned the new letter to be stored within character I So basically it comes down to the H H is offset by 12.

  • And now that age eagles A T, we return t into our character array and then we go on to Oh, and oh, it's offset by 12 That is now an A.

  • We return a and now that is being stored in our character array.

  • So on and so forth you get the idea until we are at the end of our character array.

  • The middle line 13.

  • What we're doing is a returning new string character which now no longer equals a character array of our message.

  • How are you doing today?

  • It now equals a character array of our seif erred message, which is time id que que pas fop.

  • It's not supposed to mean anything that's all point of ciphering a message.

  • But now this right here is stored within this because this line 12 ran basically all of this code which ran all of this code.

  • I just love it and then with So now that we're out of our cipher method And remember, the last thing we did in our cipher method was return our character, which is now this, and we're going to be storing it.

  • Because remember, everything that we just talked about is this right here, and we're gonna be storing it.

  • Our character.

  • What?

  • We returned in our cipher method into our string Seifert message.

  • You follow me here, and what we're doing down here is we're printing out our original message, Which is how are you doing today?

  • We're printing out our offset, which is 12.

  • We're printing out our seif erred message, which that we ran.

  • All this code is tied mid Cute.

  • I'm not going to say all that again, but that's what it is.

  • And that is exactly how this code works.

  • Now it's right.

  • Some tests.

  • We already have our Caesar cipher.

  • That job we are to have remained at Java.

  • And just as we created those down under source main, we're going to create the test under source tests.

  • Makes sense, right?

  • We're gonna right click, Govern.

  • Ooh, not go over class were actually gonna come down here, and we're going to create a J unit test case.

  • Since you're writing these tests for caesar cipher dot java back, you're gonna name this Caesar cipher test.

  • The only change I'm going to make here is select new J unit Jupiter Test instead of Jay Unit four tests were gonna click Finish.

  • We're going to add the unit five library to the build path.

  • Okay.

  • And now it's time for me to write some tests and hope that they work.

  • I'll get back to you.

  • All right, so we have to test here.

  • That should work.

  • They're telling us that this you work, but let me explain a little bit of what these tests are actually doing first.

  • So, first of foremost, we have to create an instance of Caesar cipher within our test, just as we do with main.

  • Because we need to access that.

  • And then our first test test Seifried message with offset of 12 test names are typically very, very specific to what they're actually doing.

  • So you avoid any type of confusion because maybe you want to test every message with offset of 11.

  • You want to make sure that is very specific, Assert equals within our tests.

  • This is basically saying that this on the left side of this comrade here is equal to this.

  • On the right side of this common here, we're asserting that these two values are equal.

  • So let's actually take the right side of it.

  • First.

  • Caesar cipher dot cipher.

  • We're passing in the message.

  • How are you doing today?

  • And we're offsetting it by 12.

  • Well, we we've already done this.

  • We know that if we pass on the message, how are you doing today and offsetting it by 12 just as we see down here are suffered.

  • Message is Thai, mid CUC this and as you can see, this is the same.

  • Exact is what we have right here.

  • So, yes, this value is the same as this value.

  • This test should pass.

  • Then, on our second test, we're testing an empty street.

  • We're doing exactly that.

  • Throwing in an empty string within our cipher right here were saying offset this by 12.

  • But since there's no letters and it's an empty string, we should get back the same sex thing which is an empty street.

  • So in theory, this test should pass as well.

  • As a matter of fact, let's go ahead and test this.

  • We can right click.

  • Come on down to run as we right now.

  • We're gonna run it as a J unit test.

  • All right, Cool.

  • Very nice.

  • We tested it.

  • Alright.

  • Test cipher message with all set a 12 past test and the string passed.

  • Now let's let's do it.

  • Let's do a failing test.

  • All right.

  • Well, this is our failing tests.

  • Very quick.

  • All we're doing is testing suffered message with offset of 11.

  • We change the offset.

  • It's the same exact thing is this We change the offset from 12 to 11.

  • But we kept this value the same meaning it should be wrong.

  • So we're gonna come down here, run as J.

  • D.

  • N a test and boom, it failed.

  • Now there's two reasons a test will fail.

  • One is that obviously the test is written incorrectly, but two.

  • And this is the main reason you right tests it shows broken code.

  • So if we know that this right right here this 12 offset of 12.

  • We know that this value should be equal to this value.

  • But it's not.

  • That means our code is wrong.

  • Somewhere.

  • That means the offset is incorrect.

  • Maybe the way you put it in the array, maybe you've added one.

  • And now the offset is all weird because your race started zero.

  • It could be anything.

  • And that's when you have to start digging into Why is this test failing?

  • But for now, I'm actually just going to comment this out.

  • Highlight all of it.

  • Control slash.

  • Common it All out save.

  • All right, so we know our tests work.

  • I'm gonna run it one more time just to make sure J Unit tests.

  • Okay, Those work.

  • I'm actually gonna come back on over to our main dot Java file, come over here and click run to make sure that works.

  • Okay, That works exactly how it should work.

  • I just want to test that out because our next step is creating a get hungry po and pushing all this code up to the get hungry Po.

  • And you always want to make sure you test your code, test your test before you push it up to your remote repositories.

  • You wanna come into your give account.

  • I'm obviously logged in as myself get hub dot com sites for us tonight.

  • In case any of you want to follow me, you want to come on up here, you can click new right here, but this one's all, regardless of what screen you're on.

  • Hit the down new repositories for creating new depository pasta Rename what a name.

  • This Caesar's cipher of you two.

  • And now with you.

  • You could you could make this public.

  • But since I'm creating a video and y'all won't be seeing this, I will make this public eventually, probably whenever this video goes live.

  • But for now, I'm just gonna make a private not going to initialize read me.

  • If I wanted Thio creator, read me.

  • I could just do an eclipse when you create the repositories.

  • This was empty Repository looks like, but for now we're gonna hop on him back into eclipse.

  • We wanna hop on over to our package explore window right here.

  • This is obviously our seniors have a project.

  • We're gonna right click on Caesar cipher, come down to team and over on team.

  • You'll see shared project.

  • Click on that.

  • And right on here this is our configure depository.

  • Basically, what we're doing right now is we're creating a local git repositories.

  • That way it'll be consistent with a remote git repositories that we just created on Get up.

  • And for this particular instance, we're going to use the creative process story and parent photo project.

  • Gonna click on that?

  • Gonna come down here.

  • We're gonna check this.

  • We're gonna create repositories right here.

  • We're gonna click Finish.

  • We should be good to get what you want to do their different ways to do this.

  • They're different ways to do all of what is mentioned in this video.

  • But in order to take full advantage of our tools, we have within eclipse, we're in a coal mine over here, to our upper right.

  • We're gonna hover over open perspective.

  • Click on that and we're gonna come on over here and to get we're gonna click on Get, we're gonna open.

  • Now.

  • This is pre installed on your eclipse, but just in case it's not, for whatever reason, click on help.

  • Come down to eclipse marketplace type and e get hit, enter and installed this right here.

  • If it says installed, then you have the option for that perspective.

  • So this right here, this is our get perspective.

  • And this is our project are get depository that we actually just created.

  • This is that's our project.

  • But we want to come down here to get staging.

  • See, this is the middle Taff get staging.

  • You notice that all of these air unstaged meaning that these air inconsistent with our depository.

  • We want to stage all of these.

  • We want to type in.

  • This is our initial commit.

  • But before you commit, I do want to point out something.

  • When you come down to author and commit er you may notice that it is your actual PC user that is your author and you're committed.

  • But you don't want it to be your PC user you want when you commit up to your getup depository to show up as your get abuser.

  • Otherwise, it'll show is a non get abuser and will actually say whatever your PC name is.

  • You don't want that.

  • So in order to fix that, what you do is you come up to window, come down to preferences, you type in, get and it'll say team get configuration.

  • So you want to type on configuration right here.

  • And open up with this table.

  • If it doesn't open up with this table, click on user settings and actually, your table will be empty.

  • We'll have anything already added my user.

  • But what you want to do is you wanna add entry, you wanna type in user dot name, and your value is going to be your get hub User name minors.

  • I received first night and you want to add a new ad entry again.

  • You do user dot email, and your value is going to be your get hub email.

  • Click add.

  • You want to apply, apply and clothes.

  • And then now you can change your author commit er to what you just added.

  • So exit out of that.

  • Start typing in your get of user name minus first night so I can click right here and added, as far ast night.

  • Same thing for commit er.

  • Same exact thing for commit er and just make sure it is consistent with whatever your hub user name and use your email is.

  • If it doesn't show up under that drop down, just type in your username.

  • Do a less than sign type in your email.

  • Greater.

  • They unsigned.

  • Just a CZ, you see Formatted like this.

  • And we're going to commit and push to our master branch now.

  • Now what you're doing is you're going to connect this local git repositories right here to your remote git repositories right here and how to do that.

  • Make sure that https selected.

  • Come on over.

  • Click copy.

  • That's what that button does right there.

  • Go back on over to eclipse and under location.

  • You are.

  • I you want to paste in what you just copied.

  • Your user and password will probably not auto feel like minded.

  • But for user type in your get hub email and for password type in your get hub password.

  • That is how your local repositories gonna be able to communicate with your remote repositories within your give account.

  • Okay, Preview.

  • Everything looks good to go preview.

  • Okay?

  • And push cool and close.

  • Now what?

  • That just did it.

  • Pushed all of your code and all those files up into this repositories right here.

  • Just click at five, or refresh.

  • And now you could see all of your files.

  • Cool.

  • Now it is time to implement a continuous integration workflow using circles see, I Now the link to this is going to be in the top of the description.

  • Click on that and I'll take you to this page right here.

  • Obviously, what you want to do is sign up with Get up.

  • I'm already signed up, so I'm gonna log in with it wherever it is.

  • I'm taking you whether that be your project, dashboard or your workflow pipelines.

  • Wherever, Maybe come on over to add projects and you'll notice that all of your projects are listed in here, private and public.

  • Obviously, this is our Caesar cipher.

  • You to project.

  • You want to set up this project?

  • Obviously, our project is a great ally Java project.

  • That is why we created the project is a greater project instead of just a Java project owner for all of this to work.

  • And we're going to start building.

  • But we need to make a change.

  • First back.

  • Go on over into eclipse.

  • You can change back into your job of perspective right here.

  • Up in your upper left were to come down to our build dot grable file, and we're gonna add to dependencies.

  • We're gonna add a new test implementation run at a new test run.

  • Time on Lee.

  • Now, we're going to keep this old test invitation as well.

  • The reason for this is because R J u N a test that we wrote within a Caesar cipher tests.

  • This is using, As you can see, j unit dot Jupiter die P i j.

  • Unit five.

  • I mean, you could see that J Unit five is right here in our project.

  • We could have chosen J Unit for I want to use the latest greatest Jay in a five.

  • And within our bill dot grade.

  • Oh, file.

  • We just need to ensure that test implementation J unit that Jupiter Version five is what we implement.

  • Test run time on Lee J Unit Jupiter, version five.

  • Same exact thing.

  • Also want to know something that I had previously forgot to add into our bill dot Great.

  • Oh, file.

  • And that is underneath our dependencies.

  • We're going to add a test.

  • So within our test would have used J unit platform.

  • Otherwise, when we circle see, I, it does his job and runs our tests.

  • It won't be using the J unit platform so it will recognize a failing test versus a passing test.

  • So we need to make sure that we have that into our bill dot Great.

  • Oh, file.

  • And what we're gonna do is we're going to stage our build that cradle change, so hit the plus sign.

  • Okay?

  • It's stage.

  • We're just going to say updated.

  • Greater file.

  • Gonna commit and push.

  • You'll notice back on over here that we just update a greater file just now.

  • Cool.

  • Everything is connected.

  • You could just go into your get perspective with any clips and you're good to go now.

  • We're ready now.

  • We're gonna come back on over to our circle C.

  • I set up, and we're going to start building now.

  • What this is going to do at this convict your repo is to create a new branch on the user's project called Circle C I dash project set up.

  • And that is that a circle see eye config template based on your language, which is located in a newly made dot circle C I directory called config dot gamble.

  • Now, this is done in a separate branch so you could test your configuration like you would.

  • Any other coat had conflict will take you over to your pipeline.

  • You'll see that it is running and we can only hope that it works.

  • And it did.

  • Wow, Cool.

  • That took 25 seconds.

  • We can drill on into this Click on success right here.

  • You can see step by step executive the config that GMO file is doing for.

  • So it starts off with spitting up the environment, which is creating a Dr Tainer and running this image in here is you could see the images cast a circle C.

  • I opened a k a J T k.

  • You could see where we told it to do that in our convict Yemma file build dark container.

  • But this image and then it starts preparing environment variables where using built environment variables.

  • All of these are environment.

  • Variables we specifically declared are working directory as this repo where, as you can see our posture, you're Ellis Caesar cipher YouTube.

  • When I get home.

  • Repo name is used for YouTube zone so forth and were taken from Branch Circle C I project set up and then it checks out our coat.

  • This step right here, we'll check out our project source code into our working directory and there were restoring cash, whereas we don't have anything cash just yet because this is our first build.

  • Next up is great.

  • All dependencies.

  • Obviously, if your call, we added in a greater Independence, see if I can find it right here to run R J unit tests.

  • Those along with the boilerplate Gretel dependency code are being run right through here.

  • And then we're saving cash to be using future builds.

  • When we're going to be restoring the cash on bill to restoring cash will pull from our safe cash.

  • And then we're running our cradle test Sergej unit tests.

  • And how it's able to do that is because we added those greater dependencies for R J unit tests.

  • Now we can come back over and see a little bit more and death of what it did.

  • So notice right here.

  • It says one branch because right now we have a master branch.

  • We refresh this and you'll see now that we have two branches, we can view our two branches.

  • We have our master branch.

  • But we also just created that new circle C I.

  • D.

  • S project that set up branch via circle.

  • See, I I'm not gonna drill on into this.

  • Well, obviously see that our latest commit checks out code builds tests past cool.

  • And if we wanted to, we can click on this.

  • Compare comparing poor requests and I am going to create this pool request.

  • Merge it on over.

  • All right.

  • All checks have passed.

  • That means our circle C I jobs have passed.

  • And then this branch has no conflict with the base branch.

  • We could look it all checks and that it see I circle c I build your tests passed on circle C.

  • I That is a Circle C.

  • I job telling us that our tests that we wrote past and this is safe to merge into or master branch.

  • Now, what I would like to do is murder poor quest into our master branch.

  • And this has taken everything from our circle CR projects set up that is different from our master branch.

  • Obviously that is our config dot yellow file, and we're going to merge that poor request.

  • One other words that code over into our master branch that looks good.

  • Confirmed merch.

  • Now I could see that we have our config dot yamma filed merge on over to our master branch.

  • Now, Something to note is that one of the main reasons why you have multiple branches?

  • Well, there's a few main reasons.

  • One, you're implementing a new feature.

  • So you have a ticket.

  • You're working on this feature, and before you push it into the master branch for all of production to see you push into your feature branch for Circle C.

  • I tow, run all your tests, do the circle C I jobs and make sure that your coat is good, but also for code of use to ensure that you are writing the code in the best possible way.

  • And if not, then your team can help you write a little bit better coat.

  • Another reason is you could have multiple different branches you can have for development, and that is what your development team works on before it goes up to a Q a branch where you have people, whether that's in users or que es testers testing it and then up into production branch Enough.

  • Of course, that goes to a production server.

  • So with this, what we just did is we just added, are config file to our master branch.

  • We can delete that branch that we just had, because once you murdered over into master, there's there's no reason to keep it other than for records sake.

  • And for this particular instance, we're just going to delete it.

  • You just click on branches right here.

  • Come on down.

  • You'll see your branches.

  • Active branches, circle C.

  • I project set up, and we can trash that.

  • All right, refresh this page and you'll see that it is no longer there.

  • And you could see what we have left is our master bridge.

  • Now, what I want to do is show you what happens when we throw in a failing test.

  • Remember the one that we wrote earlier right here into the mix to see exactly what Circle C I will do now, before we do.

  • Actually, before we do, anything we're gonna have to do is come over here, right? 00:41:33.120 -->

what is up, guys, For us here yesterday and, uh, the live stream.

Subtitles and vocabulary

Click the word to look it up Click the word to find further inforamtion about it