Coding Screen Recording

I found it’s really helpful to do screen recording or screen casting while learning and practicing new technologies and tools. Instead of doing sophisticated note to document every detail, a screen cast can show every detail about what you had worked on, without the effort of documenting.

The tool I use is OBS Studio, it’s quite popular for gaming screen casting.

I had evaluated several different settings for balancing the quality and file size and here is my result.

My setup is a standard 1920×1080 resolution. The recording FPS is 10, to reduce file size. It looks quite limited but actually works well for recording coding process. We are not doing games which has dramatic screen changes all the time here.

FPS setting, see the screenshot below:

Then the next thing is to select a proper encoder and configure it. I selected software encoder x.264, the key thing is rate control. CBR is definitely not recommended, because it recording at a const level of bit rate. Our coding screen has little change between frames and even won’t change for a few seconds. Recording at CBR is a waste of storage for our case.

I had tried several settings and finally selected CRF as rate control method and CRF value of 23 to control the quality. Here is a very informative document explained CRF rate control method.

Encoder and Rate Control settings, see the screenshot below:


The result is that I can record my coding process at 10 FPS under a 1920×1080 resolution with 5 ~ 6 MB video size.

If you have better software and settings, please let me know.  I just love to do screen casting on coding.




Making Recommandation on MovieLens Data with Collaborative Filtering

I am doing some research on building recommendation engine.

Among resources I collected, the book Building Recommendation Engine from Packt Pub is a good one with overview on how to engineering recommendation engine and with working samples.

One problem I found in Chapter 5 BUILDING COLLABORATIVE FILTERING RECOMMENDATION ENGINES is the sample code in python doing recommendation on Movie Lens 100k data is that the RMSE values are as high as 11.

A quick google can find some tutorials on the web, doing the same thing on ml-100k data set, using SVD or ALS algorithm have a RMSE lower than 1.0, commonly 0.9x.

In the Chapter 7 of the book, BUILDING REAL-TIME RECOMMENDATION ENGINES WITH SPARK, author using Spark ALS reached 0.9x RMSE on same data set.

It looks the author did not put too much effort polishing Chapter 5’s code sample.

I would recommend following articles and samples over Chapter 5 of this book:

Issue of Windows 7 SP1 Slow Windows Update Checking

For some reason, I installed a virtual machine with Windows 7 Pro SP1.

The initial windows update checking was quite slow, with no progress for a couple of minutes and the cpu was keeping high as 100% by a service host process. Definitely something wrong here.

So I googled and found the solution from here. The key point is install a patch from a  MS KB article:

After that I received 200+ patches from Windows Update and installed them.


Resize HortonWorks Sandbox Disk Size


I’ve created a HortonWorks HDP Sandbox on Azure for testing.

The initial OS disk size is about 48GB, which is too small to hold my files in HDFS for testing.

I find out a way to extend the OS disk to simply increase the HDFS capacity.





Basically it’s create a new LVM partition then add this partition to existing LVM  OS logic volume group.

  1. Attache a disk in Azure portal to the HDP virtual machine.
  2. Create new partition (/dev/sdc1) on that disk (/dev/sdc) and assign partition id ‘8e’, which is LVM partition.
  3. Use ‘vgdisplay’ to find volume group name, it’s ;vg_sandbox’ on HortonWorks sandbox.
  4. Use ‘vgextend’ to extend ‘vg_sandbox’ with the newly created ‘/dev/sda3’.
  5. Use ‘lvdisplay’ to find logical volume name, it’s “lv_root”, path is ‘/dev/vg_sandbox/lv_root’.
  6. Use ‘lvextend –L +xxxG /dev/vg_sandbox/lv_root’ to extend size of the logical volume. xxxG is the free space in volumn group ‘vg_sandbox’, which can be find using vgdisplay.
  7. Use ‘resize2fs /dev/vg_sandbox/lv_root’ to resize the partition online, this step takes some time.


Syncing Calendar from Corporate Exchange to Account on Windows Phone

The requirement is simple, to sync my calendar from my company email account, which runs on Exchange Server and client is Outlook, to the Microsoft account on my Windows Phone.

This KB article stated that on Outlook 2010 or 2007, one can use the Outlook Connector software to do this, which is not my case as I am using Outlook 2013. The article also gives a silly solution for Outlook 2013, which simply need I copy meetings manually from the two calendar.

May I  create a little application to do this automatically?

Change Google Font CDN URL to Speed Up Semantic UI Page Loading

Semantic UI is a great web UI framework that ease UI related works.

The default font used in Semantic UI is google font and it is loaded from Google’s CDN, which had been blocked in China for a long time. This can cause a very long-time of first page loading.

To fix this, one can follow Semantic UI customization guide and make change there. An know issue has been submitted on Github site of Semantic UI.

For those who don’t want to customize it, there is a simple solution: change the semantic.sss in dist folder, change the first line from

@import ‘,700,400italic,700italic&subset=latin’;


@import ‘,700,400italic,700italic&subset=latin’;


The is a China local CDN which replicated from the Google one, makes access from China faster.

Ionic Framework with Visual Studio Cordova Tools

Playing IonicFramework with Microsoft Visual Studio Cordova Tools CTP3, I found a series of articles on setup demo IonicFramework app with MS Cordova Tools.

Here is the links:


And this is a brief:

  1. Create a TypeScript Blank Cordova App in VS 2013
  2. Get the Ionic package from NuGet, drag ‘script/ionic-bundles.js’ and ‘content/ionic.css’ to index.html to create script references
  3. Use command ‘ionic start myApp sidemenu’ to create a project scaffold
  4. Copy ‘www/templates’ folder from scaffold project to VS project, let it be the same level of existing ‘scripts’ folder
  5. Create a ‘app’ folder inside ‘scripts’ folder, move index.ts from /scripts into /scripts/app, update reference of index.js in index.html. Copy app.js and controller.js from www/js of that scaffold project to /scripts/app folder.
  6. Add or adjust references of js/ts files to index.html, create a ng-app directive.
  7. Install angularjs.TypeScript.DefinitelyTyped by right click on angular.js in scripts folder and select “Search for Typescript Typings”.
  8. Create a services.ts file in scripts/app folder, create service and inject to Angular
  9. Create a controller.ts file, register service to controller.
  10. Modify template data binding to fetch data from the service


For building failure of “The certificate specified has expired” on Windows platform, it’s a bug of Cordova tools. See:

Install RavenDB with Nuget


Install-Package : Updating ‘System.Spatial 5.2.0’ to ‘System.Spatial 5.0.2’ failed. Unable to find a version of ‘RavenDB.Database’ that is compatible with ‘System.Spatial 5.0.2’.



Install-Package RavenDB.Database -DependencyVersion Highest

Install-Package RavenDB.Embedded -DependencyVersion Highest

HTC 8X 电信版Windows Phone开启无线热点后,3G网络消失的问题

最近买了个¥1099的HTC 8X电信版Windows Phone,代替了使用了2年的Nokia 800C,准备尝试即将到来的Windows 8.1。

由于Windows Phone 8.1还没有官方推送下来,目前还是在Windows Phone 8.0系统,使用下来发现一个3g网络的bug。