Git the Branch

I started playing with a way to control Git via Python. Kushal had asked me to write a program, that would show me the local git branches. So here it is! I call it Git the Branch. (painfully, punny, I know :)) And now I realise why he asked me to do this. The program itself is trivial. Here’s the code on my code repo, Gitlab, and Github. It just consists of me using GitPython to access the current folder via a GitPython Repo object. And then querying it for its branches. ...

November 13, 2020 · Mario Jason Braganza

Starting Work on Git-the-Branch

The Itch Aiming to write a tool using this which will show all the git branches in the current directory and the last commit date on those branches (and only the local branches :)) What I did today I had to carry my phone in to the service centre, so I did not quite have as much focussed time as yesterday, with all the coordinating and carrying, but I learned a few new things ...

November 12, 2020 · Mario Jason Braganza

A Good First Day

Was a really good day to ease back into Python today. I got my VS Code up and running. I got a personal [Gitea instance][crjw] up, to host my code, from where I will syndicate it to Github and Gitlab. And finally I got a projects page up, to slowly fill up with projects. I also managed to improve an old program I wrote for myself, but I’ll write about that in the next post. All in all, a day well spent. A journey well begun. ...

November 11, 2020 · Mario Jason Braganza

My Experience Learning the Dvorak Keyboard Layout

This post was sent to my newsletter on October 16th, 2020. You really ought to subscribe :) I was wondering about what kind of technical posts, I could write, since I am still learning programming and I did not want to bother you folk, with this is how I learnt to do lists in Python and this is what dictionaries do :) I then realised that it’s been slightly more than a year, I have been touch typing using the Dvorak layout. ...

November 2, 2020 · Mario Jason Braganza

A Hundred Days of Code, Day 026 - Refactoring

Worked only an hour today. Trying to change the little lookup program, I made the other day, into something a little better. Not quite a good day. Calling it quits early.

August 3, 2020 · Mario Jason Braganza

A Hundred Days of Code, Day 025 - Comprehension Exercises

Working on Comprehension exercises today. Reflections and Experience I really need feedback, when it comes to programming. I cannot face a blank page. I always seem to start with printing something out to screen and then my brain kind of kicks into gear. Everything after that is just type, print, is this what I expected, if not then fix, type, print … Exercise 3.1 and I think, I am finally getting good handle on comprehensions. from something that would take me at least 10 lines of code to just expressing it concisely in 1! I can read Python messages and take a gander at what I need to do next. I see a '_io.TextIOWrapper' object and know I can iterate over it. I see AttributeError: '_io.TextIOWrapper' object has no attribute 'strip' and realise that it cannot be stripped into parts. I need another way to skin that cat. And then I took it too far (just like this sentence), and nested a comprehension in another one, in where, I had to learn how to put in a conditional in the form of a ternary operator, in Exercise 3.2 (the commented for loop is much simpler!), but that was very good practice. Really stretched me! I caught myself getting distracted a lot. I needed to set a 30 min timer and I spent about 15, looking for where the timer app in my Mint Desktop was, instead of just setting the darned timer on the phone. Took an hour to figure out the comprehension for 3.2 and about 20 minutes to do it for Exercise 3.3. Practice helps! Watching the solutions, and I realise, I got them right in principle, but that I need to be more aware of what happens to an object in memory, so that I can simplify code. I was able to remove one level of comprehension, which I used just to get the end of a string.

August 3, 2020 · Mario Jason Braganza