Showing posts with label youtube. Show all posts
Showing posts with label youtube. Show all posts

This Week I Learned 2018 - Week 37

Something from the archive or last week post.

If you want to do a YouTube video on tutorial on photography, how should you do it? So far, nothing can top this video. Well choreographed, interesting topic, and relevant demonstration on applying Morandi (a famous 20th century Italian still life painter) colour style in your photography. What impressed me was the tutorial was not focusing on the post-processing but instead stressed on the importance on scene selection and model's clothing choices. Sometimes, you can't simply post process (photoshop) everything.


How easy to setup development workstation in Ubuntu these days? In seconds, if you exclude the time needed to download all the packages. I've been looking into TypeScript, React, and VS Code these days and it's the right time to setup a new development environment through Ubuntu's Snap.
$ sudo snap install node --channel=10/stable --classic
$ sudo snap install vscode --classic
$ sudo snap install --edge typescript --classic

What is the best approach to read a book? Reading with a pencil  (via HN) or also known as marginalia. The idea is simple, you're basically collaborating with the book author by scribbling down your questions, thoughts, and ideas in the free margin space (limited for some books). In other words, purposeful annotations while reading or active reading (suitable for research papers but not some book genres where you read for leisure).  Also, such reading method is not applicable for ebook reader (yes, reMarkable exists but the steep price does not justify it), which still does not provides a good paper experience for doodling.

Is JQuery dead? Not yet but soon, probably within these few years. Reading through the blog post by Github Engineering on removing JQuery from Github frontend, little have I realized that the frontend (JavaScript) have matured enough to deprecate JQuery. What does this indicates? The web have move beyond the dreadful old incompatible Internet Explorer versions, which the main reason of the existence of JQuery project. What next? TypeScript becomes ES Next (maybe?) and the standardization and popularity of custome web components. One thing for sure, old things will be rediscovered, reimplemented, and rehyped again and again, as usual. Same old same old. (ง'̀-'́)ง

How to teach yourself hard things? (via HN) Alternatively, the Richard Hamming tackled this in his The Art of Doing Science and Engineering: Learning to Learn course and Edward Kmett in his Stop Treading Water: Learning to Learn lecture. Furthermore, comments in HN provides us with a few good gems in area of exercising, programming, or physics. However, this is only applicable for those who are discipline, having intrinsic motivationgood quality sleep, and don't get burn out (you will eventually). In short, learning will come naturally if you interested in tackling the problem itself. Time is limited, pick your battle wisely.

Why Microsoft Word is a better writing tool than LaTeX? Reading through the post by Thorsten Bell on the tools he used to write his book (via HN) reaffirms the mistake I've made when typesetting documents, books, and thesis using LaTeX, ConTeXt, and pandoc. Fancy tools may distract you from doing what matter most, writing itself. If the writing is difficult, we can be sidetracked through fiddling with these tools under the pretense of productive procrastination.That's why, a slow and noisy typewriter (surprise that it's still expensive these days) was such an efficient tool for writing. You can't do nothing else but type or write. Which is why so many distraction-free editors exists in these Interweb days.

Why I still love PostgreSQL after all these years? 100-plus of custome data types (even table and view can be as well) supported in the database itself (via HN). Programming languages can change numerous times for a long maintained systems. Not sure for the database system. Some developers prefer strongly typed programming languages, but they seldom look into database systems with custome data types support.

How do we test web service API through console or command line? (via HN) There are so many choices like Strest, Newman (console version of Postman), shakedown (Bash script), karateDSL, UnRAVL, Artillery, and Tavern (Python-based). Coming from console background, I have preference for shakedown and Tavern due to its simplicity.

To rent or buy a house? HN user isostatic gave a practical answer to this question. Buy if you're investing, having kids, or don't want to be forced to move. Rent if you don't want to maintenance the house.

What is the symptom of midlife crisis in a good way? Extreme athleticism. (via HN) One key point I agree with the writer is that we're preparing for the coming old ages as highlighted in this quote. Interesting days ahead.
...... extreme fitness is less about being young again and more about building yourself up for the years ahead. In other words, getting better at getting older.

Source Code Visualization Using Gource

Found this visualization tool, Gource, while surfing. Decided to try it out on the project I have been working on for the past year. Installation and generation instruction as follow for Ubuntu 12.10.


1. Install the necessary softwares. FFmpeg, the video encoder, is needed to generate the video.
$ sudo apt-get install gource ffmpeg

2. Before we can visualize anything, we must generated the log file. If you're not sure the log command for your version control software, just use the --log-command flag as shown. I am using Subversion for this example.
$ gource --log-command svn
svn log -r 1:HEAD --xml --verbose --quiet

3. Go into your project folder and generate the log file.
$ svn log -r 1:HEAD --xml --verbose --quiet > project.xml

4. Visualize the log file and be amazed
$ gource project.xml

5. By default, Gource will show everything. However, sometimes we need customize the visual output to hide certain sensitive information and adjust the screen resolution. Play with the settings to get the best visual output. Customization very much dependent on the size of the log file and the number of developers. This process can increase disk I/O rate, you may experience some slowness.
$ time gource --camera-mode track --seconds-per-day 0.25 --hide date,dirnames,files,filenames,usernames -640x360 project.xml -o gource.ppm

real    2m6.712s
user    0m40.415s
sys     0m47.443s

Two important notes on reducing the file size. First, I compressed 4 days log into one day using the (--seconds-per-day 0.25) flag. Second, Gource core dumped on me when I tried using resolution of 426x240, the lowest resolution suggested by YouTube to maintain 16:9 aspect ratio. Hence, I have to switched back to 640x360.

6. In step 5, we have generated an uncompressed sequence of screenshot in PPM format (gource.ppm). Now we are going to encode the PPM file to create the video to be uploaded later to YouTube. Following the encoding instruction,
$ time ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i gource.ppm -vcodec libx264 -preset ultrafast -threads 4 -bf 0 gource.mp4

real    1m11.968s
user    0m20.273s
sys     0m33.950s

7. Upload the video to YouTube. See video above. By the way, the blue user icon is me.