Things I need to improve on: Mapping back the commands I use in a tool to what it is I am trying to achieve with the tool

Things I need to improve on: Mapping back the commands I use in a tool to what it is I am trying to achieve with the tool

I would like to dedicate this blog post and all of my subsequent blog posts on things I need to improve on to two really wonderful men: my current new line manager and my former line manager - two really wonderful and kind and supportive men without whom I would not be where I am today. I am so so grateful to them for supporting me so much. I am so grateful to them for supporting me to achieve everything I have achieved - and for giving me such clear direct guidance and structured feedback. I am really so so grateful to them.

Right. So I messed up recently. I messed up on git and Alembic combined and it sort of exposed knowledge gaps in both. I mean first things first. I thought I knew git and I didn’t. It’s one thing to do basic git commands and even do rebases or whatever and do cool stuff. It’s another thing to do extremely complex things with git and really understand them. Or even mid level complicated things with git and really understand them. So I really screwed my self over last week and last some time but that is totally okay and really all good with me as well. So I want to reflect on some things. But also hit the main point of this blog post. So firstly

I messed up at git because I did not truly understand what the commands were doing. Now I am doing a git course and I am doing so much better. More on this later - thanks

The other thing I totally messed up on was Alembic. I mean I totally totally just messed up on this too. My first thing that I did wrong was to not do the tutorial and I will do that next week before my next ticket. Probably on Wednesday or on Monday if I close my next ticket. Tuesday I have off. Anyway.

I made a mistake because I didn’t understand from the codebase how important Alembic was and therefore did not take the time to do the tutorial. I also did not know how much more work I would be doing in this repo but turns out it’s a lot. So I accept my mistake. When looking into a new repo, look into what ORM it is using. 

If you are going to be working with this repo then take some time to learn the ORM. So that was my mistake and I feel silly and I am grateful to those more experienced than me for guiding me.

But then learning the actual commands then as well

What do git and Alembic have in common?

What do got and Alembic have in common? No that’s not a joke. The thing they have in common is command line commands. 

Which have always terrified me btw and even though I use them all the time I still don’t feel like I know exactly what I’m doing. 

But it is making sense now when I write about it, for example when I install updates then my files update. When I git commit then my files get committed to git. And when I make run Alembic migrations then my Alembic migrations get run. Aaaaaaah they terrify me ahhhhhh. And I feel so embarrassed and humiliated because I DO pick up new technologies.

And I can pick them up very quickly and easily. I just need some better techniques and approaches for picking them up I suppose.

I have a blog post coming on this.

And I have a blog post on for example comparing Alembic to Django coming.

But I am beating around the bush.

But anyway back to the point of this blog post please. MAPPING COMMANDS BACK TO WHAT I DO

A futuristic image of red code and text with the blog post title


MAPPING COMMANDS BACK TO WHAT I DO

Okay so I have been very silly and not mapped back my CLI commands to what it is that the command was actually doing. So for example.

There was a command to create the new migrations file. In Alembic. And that… create the new migrations file and then there was a command to run the migrations. And they actually runs those migrations. And… I can see… so…

So. If I run the make command then it builds the migrations file.

If I run the run make command then it migrates the migrations ie run those migrations files. If I run the downgrade then it downgrades the latest migrations.

If I checkout a git branch then I just switch to a series of files and versions that represents the version of the code that I want to work with right now. If I reset my git branch then I just go back to a previous version of my files that I wanted it to go back to from a couple of saved versions ago or something.

If I rebase my git branch then I change files inside of that branch into what has changed since from the desired rebase branch and as well as my new latest changes in my files. You see I get it. I get software engineering. People think that I am stupid sometimes or a not a very good software engineer but it just takes me longer to get things sometimes. And when they click, the really click. So tell me I am not a software engineer. Go on you try then. You can tell me…

If I make the migrations in a Django command then it prepares those migrations.

If I migrate in a Django command then I run those migrations files

If I run a file in the command line or a test then the code in that command line or that files executes

So does that make sense

I must always think about the command I am running. And about what I am actually trying to get it to do

Comments

Popular posts from this blog

Hello World

Where To Hide A Star

In the Water, I find Fire