 I'm going to put here, okay. Hi everyone, thanks for coming to this talk. My name is Javier Azeiduno, and I'm working at AtomTrack as a software engineer. Probably some of you are thinking about what is this talk about with this strange title that we have here that is developing in a black hole. Okay, I usually, in my, normally when I was calling, I always use the two same tools. In one hand, I use my favorite editor to write, read, and modify the code. And in the other hand, I always use a terminal to execute Django commands. For example, commit changes to GitHub or execute the test of my application. I make a lot of talks about coding in living session, and I'm always received the same question when I'm writing code. And the question is, what are the tools that you are using? And the answer is always the same. I use BIM and T-Max. And people say, really? Do you have colors in BIM? Yeah? Can you split a window in different tabs? And I say, yes, yes. For that reason, I have prepared a talk to show you the tools that I use every day for coding and improve my productivity. So let's start with a question. How many of you use BIM here? Oh, yes. Perfect. And how many use T-Max? Right. And HTTP? OK, perfect, perfect. So that are the tools that I am going to talk to. Sure. I don't have to put it here. That are the tools that I am going to talk here today. So with BIM, what is BIM? BIM is a text editor that runs using the command line interface and comes with another documentation. You have a huge community behind, and it's really extensible, customizable, and portable. Now BIM runs under Macintons, Windows, and any flavor of Unix. So BIM works in four modes. Use four modes to work. When you open BIM the first time, when you edit, when you open a file, by default, you open BIM in normal mode that is used to navigate. You have also the visual mode to select test, the insert mode to insert new text, and the last one is the command line that is used to execute BIM functions. Here you can see I'm using BIM to make the slides. And here you can see some steps. And here the code. I'm going to work with the code here. Like any other editor in BIM, you can navigate inside one file. But instead of use the mouse and use the arrow keys, you use different keys. You use H, J, K, and L. At the beginning, you say, why that key? Why do you have to use that key? When you practice with that key, you understand that it's really, really powerful because you have your fingers always in the middle of your keyboard when you are coding. So this is awesome. For example, we are going to go here. We have a lot of moments. And we can use the forward key. So we can go, imagine that we want to go to the number one. So we can press H times the letter W that is used to go forward. But in BIM, the idea is to press the fewer keys as possible. So here we can use a multiplier. So we can say H times the letter W to go to the same number. But also, we can do it better. And we can go directly to the number one, saying, go to number one. So you can use these multipliers with all the moments. But are you saying that I have to count the numbers? For example, imagine that I here at the bottom of the file. Do you see that I have to count one, two, three, four, five to go here doing that? Yes, you have to count. Or you can configure BIM to say that instead of put the lines number, you put the relative number. So imagine that example. Imagine that I here and I want to go to the class definition. I see that I have to go up H steps. So you can say H up. I imagine that you want to go to the fields. You can click on nine down. So you can configure that in your BIM configuration. And you can make a lot of movements, like for example, go to the beginning of the file, to the end of the file. Go to the end of the query line and go to the beginning and a lot of movements. And what about actions? If you want to insert the BIM, you have to click on. You have to press the letter A. For example, imagine that we want to put here something. But you click N I, and you write the code that you want to do. You can make a lot of actions. For example, here we can insert directly something at the end of the line. You can undo. You can redo. You can change that word. You can change, for example, and put M. But my favorite action is to repeat your last command that is using the key dot. So imagine that we want to put here as M to use this library as M. So to do that, we have to go here and say, change word and put an M. After that, you can use the dot key to repeat the action. And what about cert? How you can cert some string inside the file? You can use in the back. You can say models, and you find all the models that you have in your file. You can do it like that, or you can do it in a different way. You can imagine that you are reading the code, and you say, I want to see where I'm using models. I can say, what is the string that I have in my current position? And to replace that string, we can say, imagine that we want to do the same example as before. Here we can put a M. So we have to change the models by M. So we can say, S, look for models, replace by M, and tell me if you want to change or not. In that case, I don't want to change this one, but I want to change all of these. Now it's time to talk about a different mode, that is selection mode. Imagine that I want to put the incident action constant in uppercase. You can select the constants, and you can say, all this one, you can make an action. After that, put it in uppercase, or imagine that you want to remove it. You can remove it selecting before. And also, we can make an action that is called block selection. Imagine that we want to put the prefix incident in all these variables. We can do it with block selection. We can say here, incidence, and it's repeated in the four lines. What about how can I work with different with multiple files? Imagine that we want to have different files in the same screen. So here we can use a vertical split like this and open a new slide. Or we can use a horizontal split. Oh, sorry. Open a new one. This is the way that BIM gives you to create different panels. But also, you can use a tab to put here a different file. Here, I can see a different file. OK, now we have this one. I'm going to remove it. OK, now we know how to read the code, how we can change it, how we can navigate inside the file. But how can I save the changes that they have? To do that, you have to use the BIM functions. So imagine that to write the changes in the file, you have to execute the function write. If you don't have what is the function that you have to use, or you don't know how to use it, you always can use the help function. And put here, I would like to know more about write. Here you go to the documentation to see the information about that command. And this is, in BIM, you can instant different plugins. This is the list of the plugins that I'm using, the most relevant plugins. And the bundle is the plugin manager. But I'm using also Net Tree, Contra P, and this one. Let me show you an example. Net Tree, when you do that, with Net Tree, you can list the directories and the files that you have in your work directory. For example, you can go over here and put the file. With Contra P, you can directly go to the model that you want. For example, I want to see the model driver. And you can open here the class. And with ACK, you can find an string in your code. OK, and here you see the class that you are looking for. So now that I know a little more about BIM, it's the time to work with the rest of action that you usually do, or I usually do. That is, use a different terminal to create Django migrations, push changes to GitHub, these kind of things. To do that, you only have to use a terminal. But can I use the same terminal that you are using here to execute BIM? Yes, you can do it. For example, with ITERM, you can create a vertical split. And you have a different terminal to do different stuff. But today, I would like to talk a bit about TMAX. TMAX is a client-server terminal multiplexer that lets you switch between several problems in one terminal. To run it, you only have to go to your terminal, install before OK, and execute TMAX. How you can see, I have created a TMAX section with one window, the window number one. And I'm executing the C cell. So now that we have created a window, we have created a lot of windows. For example, you can create a new window. You can rename it. For example, here, I am going to put my own track project. And you can move between different windows. To do that, you can say, give me the list of windows that you have in that TMAX section. And you can say, I kind of go here or here. Or you can directly use the number of the window. You can say, go to window one. I'm going to put here the slides. I'm going to remove that terminal. I'm not going to use it more. OK, windows. But I usually work with windows and panels in the same window. For example, I like to put a beam in one panel. So you can create a panel here. Beam, you can create a vertical panel. Here, I always use Docker to run my application. And I create a panel for Docker. A new panel for the cell to execute different Python with the context of your application. I create a new terminal to execute Git Django commands, for example. Here, you can move and change the size of your windows, of your panel, sorry. And you can move between each panel going to the number two, for example, or going to the number four. But I like to do it like in BIM. I like to move in different panels like in BIM. To do that, you can go to your TEMUX configuration file and bind the keys that you use to change between panels. So if I see my TEMUX configuration, here you can see that I have bind the keys to change between panels. It's really useful because you are using the same keys for BIM and for TEMUX. But what happen if you have here a vertical split? I would like to move between splits between BIM panels and TEMUX panels using the same way, like this. I can move it between BIM and TEMUX using the same way. To do that, you have to remember that you have to install a BIM TEMUX navigator plugin. But if I go to my BIM configuration, as I'm using Bundle to install my plugins, it's this plugin. With this plugin, you can change between TEMUX and BIM using the same way. Okay, we have seen the panels. Okay, one more interesting thing is the panels is really small. If you want to maximize, you can maximize the panel. So imagine that we are here, sorry. And we want to see all the trace of forward application. We can say maximize and if you want to recover the previous state, you can say recover the previous state. It's really useful because you can be coding and you see here the trace of your code and you can say, I have a problem or something like that. More navigation. Like in BIM, you can navigate inside a TEMUX panel and you use the same keys that you're using in BIM. So for example, you can search info and you can move between info words. You can go up with the key K. You can go down and you can select some of your text to copy and paste in a different way. In a different panel, sorry. So let me try to give you an example. I am going to use Postman to execute a rigway to execute an endpoint in my API. I would like to create a driver. If I send, here we receive a 500 error. That means that we have an error in our application. So to see, we can go to a word project and here maximize and see the trace of your code. Where is the error is here? So you can take that file, copy and paste in your BIM to see what is the problem. Oops, okay, I forget the core. And if we go to the line, I don't know, H9, okay. You can go directly to the number, to the line H9. We forget to put here a parenthesis. If we run again, here we can see that everything now it's, it's okay. Now that we know how to move in between different panels between those and how to navigate inside one panel. One awesome feature that Temos gives you is the panel synchronization. Imagine that we have in development or in production two different servers, two different machines with the same structure, file structure. I do want to edit the same file in different machines at the same time. You can do that with Temus. If we go here, I'm going to rename this panel to sync. And I am going to simulate because I'm not going to use SSH to connect to a production environment, okay. So I am going to, I am going to use it here. I have two directories to replicate. So if you want to write only in one panel and replicate it in the other, you can activate the synchronize panels. So if we can be only writing in one panel and replicate it in the other. Indeed, we can edit the same file but in different machines at the same time. So imagine that we want to execute beam. And you can say, I'm writing two files at the same time. And here you can put the absolute path of that file. And you see that is in different machines, different directories. Okay, to disable is, take care with this command because, yeah, take care, I don't want to say more. Okay, so to deactivate, you have to execute the same command. So W, synchronize panels. And now you only write in one panel. But for me, my favorite Temox feature is that gives you the ability to work in pair programming. Pair, a lot of users, yeah, editing the same file at the same time. Before to run Temax, we have execute Temax without arguments. When you do that, you are creating a simple session and you are attaching to it. But we can do it in two steps. So we are going to simulate again that behavior. And imagine that we list, okay, history is your frame. So I am going to, I always use history. So if you see that magic letters appear is the history. You can, here you can see that I have, we have four windows. We can create a name accession with minus S and in the touch mode to say that I have created a Temox section that is here, at least called pair. So you can connect to it, attach to it. And here, for example, I can open example by, I don't know, I want to remove that. I'm going to put a row Python here. One of your colleagues, teammates, can connect to the same session that you are using. So if I go here to the machine two, that is a different user, can imagine that is the user two. You can list the session that you are using that you have in your machine and you see that you have the same pair session. So you can attach to it using the same way and you see the same file because you are sharing that connection. And this user can modify this. And user two can say, no, no, no, I don't like it. So it's better if you use communication here. Okay. If you remove, okay, I'll check it from there. Okay, now that we have all our environment in only one terminal, your editor and all that you need, I would like to don't have to go here to postman and execute a request using postman. I would like to use some tool in a terminal to do a request. And I think that all of you knows a query. So imagine that we want to work with our API and we want to use this little panel. I'm going to maximize. We can to interact with our API, first we have to create an access token. So using core, okay, here I'm creating the access token for the user Aero Python with the password 2080. If I execute this, awesome works. Okay, here we have the access token that we need to, for example, execute the route that we have open for Spain. So if I go here, take the access token, I can use it to get, okay, I can go and say, hey, I want to use this access token to get the routes for the country, Spain. Okay, and here I return the body. Okay, awesome, but I have to write a lot and it's not for humans because you have an string and you don't see anything. Instead of, for that reason, HTTP was born to resolve that problem because HTTP is designed for humans. So let's go to transform this core request to HTTP request, I'm going to go to beam to edit. So the first thing that we have to do is instead of use core, we have to use the HTTP command. And we have, and we say make a post and HTTP has been built to work with JSON APIs so you can remove the JSON headers that you need because by default, accept and content type is always application JSON. Okay, you can remove it. And to send the body, instead of send an string, you can send simple arguments. So in that case, we can say password and in this case is the same. The first thing that you notice is that we receive a beautiful JSON with highlighting and everything. So you can take it, this one, and we can do the same for the next core that is get this one, we can change it. And we can say HTTP, we can remove HTTP, the schema and the host because by default is HTTP and local host and it's better. To put the get parameters, you have to use two equals. And like before, we can remove the JSON headers. But what happened with the, oops. But what happened with the rest of the headers? Okay, you can send it like that, like this. You don't need, oh yeah, thank you. We execute it, we save the body in a JSON format. But we can do it better because we can use something that is called sessions. So if you use a session, for example, Aero Python, you can save the headers of that request for the next one. So the next time that you execute again, you can remove this token. So that's all about HTTP and to finish with the talk, I would like to give you some resources that I used to learn these technologies. That is three books. The first two is for BIM, learning the BIM and BIM editors gives you the basics of BIM and practical BIM gives you a lot of tips to work with BIM. The last one is to give you a step by step how you can use TMAX and how you can configure it. My last conclusion, I'm not here to say you that you have to use BIM. You are using BIM, so yeah. I'm here to say you that learn your tools and try to integrate to be more productive. So that's all. Thank you. Thanks very much. I guess we've got time for a couple of quick questions. In the HTTP example with this session, does it also store cookies that the server would send back to you? Yeah, and you are using the Google editor. Right, cool. Anyone else? You create a file where you store that and you can change it if you want. So when you navigate the shell with the keys, who is granting that? Is it TMAX or is it the BIM plugin? No, it's... And when you are navigating, it's TMAX. Okay. But you can configure TMAX with the same keys as you use in BIM. But is it TMAX by default or you have to configure it? I'm not sure. I'm not sure. Or is it also part of your shell, like I said? In the slide, you can see my dot files with the configuration. So there you can check if it's by default or not. I learned recently that there is a new implementation, Neo-BIM, have you heard of that? Yeah, I heard of that. But also, it's a really good idea. But now with BIM 8, you don't have to use it because he has done the same as Neo-BIM. So yeah, I heard it, but I'm not using it. It's awesome, yeah. The dark inserts were really awesome. You had dark inserts in the Neo-BIM, it's like instantaneous. Oh, yeah, yeah. That's the reason. Yeah, yeah, that's the reason. One question. In order to use those tools, you need to configure them. And in my case, I have a lot of machines, not necessarily all of them on the same network. So what solutions exist to synchronize those configuration files across the machines? I don't know. OK, you can use the answer. I actually have one more question, maybe to everybody. Because I switched to a different keyboard layout, and that is quite a problem. Because a lot of default shortcuts, especially in something like BIM, they are arranged in such a way that they work well with QWERTY. And with a different layout, I would basically have to reconfigure everything or learn everything differently. Is there any idea how to improve that? I have the same problem with the Spanish keyboard. In the end, I'm using a Spanish keyboard, but with the UK layout. Sorry. Cool. We just have one last quick question. I wonder if I have a question back here. Why is it not a question? So if you want to have a legit question. OK, let's have a legit question, sorry. So the talk had JQ in the title. I realize if you got it for time, just like a sentence, what this is about. Sorry, I don't have the title. The talk title had JQ in it. So it was a CTIP and JQ. Yeah, I don't have time to pick it up. If you can, just one sentence, but it is not demoed or anything. OK, now watch how we can see it. Yeah, there's a coffee break now, so we can have a longer discussion. All right, cool. And thank you again. OK, thank you.