Stop pulling hair out with git

To help understand how git works, I scrambled this post on what I know about simple workflow in git. I first started my project locally and then I added VCS using ‘git init’ in the existing project’s root directory.

Then I wanted to host it on github. I did this by creating
git push -u

But if I want to skip adding “-u” everytime I push, I can do:
git remote add up

If I want to compare my local current branch commits to my remote’s branch, I need to do:
git branch –set-upstream master up/master  //replace master with your branch

To see your tracked files:
git ls-files

To see your modifications, here is neat coloured output:
git log –pretty=format:”%Cblue%h:%Cred%ce: %Cgreen%s” –name-status –graph

Make alias of above in your .gitconfig in default home directory.
hist = log –pretty=format:\”%Cblue%h:%Cred%ce: %Cgreen%s\” –name-status –graph

A common thing is to compare my local branch to remote for unpushed commits. You can do this by:
git hist origin..      //this is implied as git hist origin..master


The converse, “git hist ..origin” would show how far your remote is ahead in commits.


The importance of learning and continued learning: Address the failings of institutionalized learning with Online Courses

I am a software engineer. It’s still hard to fathom how I got here from the days of studying at university, knowing only a fraction of what I know today. I never liked the course curriculum in university or highschool as they follow strict guideline on what to teach students and judge based on how students adapt to it, not allowing enough freedom. I, like most people, did struggle in university from rapid learning, testing, and demanding schedules. I think that did more damage to my learning process as that meant that to get a good marks, I selectively picked courses that I knew I could manage better and avoided courses that I knew I would have hard time in. Not only was this correct in experience, but the fact that I had to do this to avoid learning something so crucial was I think a failure in educational experience. You could argue that it entirely depends on student(I) to make the choice to learn or not, but when you are judged on how well you understand a difficult subject in limited time, a realist in student must make a choice.

That’s why I chose to instead pick online courses that I couldn’t comfortably pick in university. One such course I HIGHLY HIGHLY recommend is Algorithmic Thinking on Coursera. If you haven’t taken a course in university that teaches the fundamentals of computing (Most CS students will learn this, but engineering student me could only optionally take it), you should take this. It teaches you about all the fundamentals of computing, the tools and theories that empower you to approach most problems easily. It’s essential to being a programmer, so much so that if you weren’t taught this, I don’t know how you call yourself a programmer. Even if you weren’t, do learn this, and you become master of the tools to tackle any problems previously taught to be hard and trivialize them with few lines of python.

Transitioning from Windows to Linux Mint: Blender

It’s been sometime since I moved from using Windows to Linux Mint and for more than reasons I can currently describe, I am satisfied with what Linux has to offer. Some argue that the reason they stay on Windows is that there is no media softwares and games on Linux. I tell them if they knew what Blender is and what it’s capable of. The lack of games on Linux is more or less chicken and egg problem where game developers and publishers cite lack of market presence of gamers on Linux platform, hence refusing to develop on, let alone port their games to Linux. I don’t develop games (yet) and am probably not qualified to tell you which OS supports better environment for developing games. However, since using Linux from growing up through university and day job, I’ve quite grown fond of the extremely-dev-friendly environment that Linux has set up for its users.

I’ve disliked development offerings on Windows such as lack of a useful shell and compiler and the fact that to get anything done on Windows you need to buy proprietary software for anything. Sure, I could shell out a few thousand bucks for latest Visual Studios, Photoshop, etc., but the thought that I can never find a use case that would require proprietary software over a free one just seemed irrational. At first, like many others, I tried dual-booting Linux with Windows. But this process has caused me way more undeserved pains, so I eventually ended up just going pure Linux route.

I began searching for “replacement” tools on Linux that are equivalent in function in Windows. For office related tools, there was LibreOffice which more or less has everything I need. For video editing tools, I was pleasantly surprised that Blender is capable of this as well. Search youtube and you’ll find the power Blender gives to users on video sequence editing which supports multi-stream video/audio editing plus many mods which are scriptable through Python, which is one of the EASIEST and SIMPLEST scripting language you should and must master (without it, how do you even call yourself a programmer?). Learning how to use Blender was a lot of fun, discovering many things it can do: General 3D graphics editor, Video/Audio editor, Game Engine

If that weren’t enough, Linux let me experiment and learn how a server is setup. The whole thing is baked into the OS which is very nice. Seriously, it’s so easy to just grab a virtual server from cloud provider like digitalocean/cloudatcost, a domain name, and willingness to dig into server tools like apache, a little sudo apt-get install’s and you have a working private server which you could access anywhere you go. Nice thing about servers is that you get tons and tons of bandwidth that you can’t even get as a home internet service here in Canada. I have 15 Mbps down / 1 Mbps up bandwidth home internet. I measured 700 Mbps down/up from my virtual server.

If you were stuck on Windows, you’d never figure out how you can even start doing this. I’m still a novice in many vast areas, but Linux has shown me the light.

Here’s a crappy T-rex I made in blender 😀


All other blender works that I made are found here: