My Git Cheat Sheet

2019-02-26T00:00:00.000Z


Piano Adventures

2019-01-14T00:00:00.000Z

It's been couple months I started playing piano. I knew how to read sheet music and play keyboard before, but now I'm learning to play classical pieces such as Bach, Beethoven, Mozart, Chopin,... and trying to practice more seriously.

Amongst all, I like Bach and Chopin, Franz Liszt. I found Bach works interesting since, when right and left hands are played separately, the music does not make sense, but when playing both hands, they complete each other as well as the main melody. Unlike most of the works for piano which right hand is playing the main melody and the left hands is more accompanying the main melody.

One challenge I found, is when left and right hands are playing in different timings: left hand is playing 3/4 and right hand is playing 4/4. Or let say the left hand is playing a group of 3 notes in each beat, and the right hand is playing 4 notes, now the brain needs to sync the 4 notes to the 3 notes. Easy when practicing each hand separately but the timing gets messed up when plating hands together. It requires a lot of practice. It is like drawing a square by your right hand and a triangle by the left hand at the same time.

I read an article other day about deep learning machine that listens to Bach then writes its own music in the same style. I guess the future artists include AI systems! Will there be a day when we buy tickets to see an AI system perform live? Or an AI generated music becomes a hit?


New Website is Up!

2018-11-28T00:00:00.000Z

So, to learn a whole new technology stack, I re-wrote this website from scratch using NodeJS, MongoDB, Bootstrap 4. And after couple hours, I was able to get a raw Ubuntu VPS and setup the server and deploy the website. Interesting experience with Linux server! And I don't think I'd come back to Windows :). I was so exited about it that after seeing the website is up, immediately started blogging on it! My previous website was written in C#, ASP, SQL back-end and was hosted on a Windows server. This website loads so much faster than the previous one, the main reason being, the old one was on a shared host and the SQL database was on a different machine, I noticed the connection to the database was taking so long. If you would load the page for the first time, It would talk around 40 seconds to load.

The focus in the website is not the looks, but the content. I tried to keep the design and front-end minimal. Nothing too fancy (Not enough time for that either). This website is open source and is available on GitHub. I would be more than happy if someone would like to contribute to the source.

Next step is automating the deployment process, and improving the website security, logging, and monitoring and more.


JavaScript: New favourite stack for web development

2018-10-28T00:00:00.000Z

Having worked with JavaScript on a regular basis, the more I learnt about it, the more I got interested in moving towards an all JavaScript stack. Not to mention, I used to dislike JS when first started using it. I was coming from a C++ and OOP background and noticing there is no class keyword in JS bothered me :)) . After experiencing and trying different JavaScript tools and frameworks, so far, the following technologies caught my eyes for rapid development (The list will be different in future of course):

Back-End
  • NodeJS
  • Not a big fan of using a lot of packages, but here are some that I would use:
    • ExpressJS for REST api development
    • PM2 or supervisor
  • MongoDB
Front-End
  • Pug
  • KnockoutJS:
    • It is lightweight and quick
    • pure JavaScript!
    • no dependencies
    • does not change frequently (unlike AngularJS, Angular 2, Angular 4, ...)

These tools and frameworks are also very well documented and very simple to learn and use. Prior to this, I've mostly used C#, PHP, and a little Python. But I guess for my next projects (if it is not a big one) I would use the above stack.

Also made a template on GitHub with the above, that can be used to quickly start a new project with.

In general, Web Development is my least favorite task! and I'm more interested in coding lower-level programs, middle-ware, embedded systems, game development and graphics of course! (and more...). However web development can also be enjoyable sometimes.


aReport

2017-12-28T00:00:00.000Z

I was looking at some C code snippets online where I saw variable names starting with letter i: iSecret, iGuess. This reminded me of my programming habits when I first started to code where I prefixed class names / project names / file names with letter a (my initial).

During the first years of my Bachelor's degree, I remember creating a C console application to keep track of my grades at school and to calculate my GPA. I called it aReport! Back then, I was not too familiar with Apple products and how they name everything with the prefix letter i. The only thing I heard about Apple was Power PC and how expensive they were. Later on, my cousin bought an iPod Classic, and as time passed and I heard about ā€œiā€ devices and also --after buying my first Macbook Pro in late 2005 when apple transitioned to intel x86 processors, software and applications like iWork.

aReport was a simple command line tool. It would display a text menu, something like the following but probably with more items and also submenus:

  1. Add a course
  2. Update grade
  3. Display report

You would add your courses for each semester and enter your grades. Afterwards, you would be able to see your transcript as a plain text table. You would also be able to save your so called "Report" on a file.