Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- GitHub



  Consistency between Redis Cache and SQL Database

Nowadays, Redis has become one of the most popular cache solution in the Internet industry. Although relational database systems (SQL) bring many awesome properties such as ACID, the performance of the database would degrade under high load in order to maintain these properties. In order to fix this problem, many companies & websites have decided to add a cache layer between the application layer (i.e., the backend code which handles the business logic) and the storage layer (i.e., the SQL d...

   REDIS,CACHE,DATABASE     2019-07-07 08:14:16

  A simple example of drawing bar chart with label using d3.js

D3.js is a very popular graph library to help developers draw various kind of charts using JavaScript in a webpage. It utilizes the SVG format supported by all major modern browsers and can help developers get rid of the old age of Flash or server side graph drawing libraries. In this post, we will introduce some simple examples of drawing bar chart with labels using D3.js.  First, let's see what will be the final look of the graph drawn. Below is the complete source code for this example....

   JAVASCIPT,D3,BAR CHART,LABEL,TUTORIAL     2020-05-16 23:25:40

  Use pdb to help understand python program

  As I have mentioned in Why do I need a debugger?: (3) Debugger is a good tool to help you understand code. So when I come across difficulty to understand vfscount.py code in bcc project, I know it is time to resort to pdb, python's debugger, to help me. The thing which confuses me is here: counts = b.get_table("counts") for k, v in sorted(counts.items(), key=lambda counts: counts[1].value): print("%-16x %-26s %8d" % (k.ip, b.ksym(k.ip), v.val...

       2017-08-22 22:42:37

  Computer skills one can learn within one day

Computer related technical skills are usually thought as complicated and difficult to understand. It's very difficult for one to get hands on one skill or master one skill. But if you really do want to learn something useful within one day, there are some good choices which will not take too long to get to know and use.. Version control:- Git, GitHub and SVN Regular expressions AWK sed Grep Learn how to do things with Vim that you never knew could be done. Set up a crawler that can scrape some ...

   Computer skills,Learn     2013-09-16 08:51:35

  9 reasons to use Zsh

Like majority *nix users, I have been using bash for many years. Sometimes I feel uncomfortable with bash. I tried use some other shells as well such as ksh, tcsh and zsh which I am going to talk about. A few days ago, I found an open source project ranking in the 6th named oh-my-zsh on Github, I downloaded it and had a try with it. It's amazing. We should use zsh to replace bash now. Why do we need to use zsh? Here is a 4 minutes YouTube video which shows many reasons why we should switch from ...

   zsh, advantage, command     2012-09-28 12:46:39

  Why I love Common Lisp and hate Java

“Common what?” is a common reply I get when I mention Common Lisp. Perhaps rightly so, since Common Lisp is not all that common these days. Developed in the sixties, it is one of the oldest programming languages out there. In its heydays it was used mostly for Artificial Intelligence research at MIT, Stanford, Carnegie Mellon and the like, and therefore has a lingering association with AI. People not in AI shy away from Lisp. Common Lisp is a powerful and versatile program...

   Lisp,Java,Comparison,Common Lisp     2012-01-30 05:48:16

  Solving easy problems the hard way

There’s a charming little brain teaser that’s going around the Interwebs. It’s got various forms, but they all look something like this: This problem can be solved by pre-school children in 5-10 minutes, by programer – in 1 hour, by people with higher education … well, check it yourself!  8809=6 7111=0 2172=0 6666=4 1111=0 3213=0 7662=2 9313=1 0000=4 2222=0 3333=0 5555=0 8193=3 8096=5 7777=0 9999=4 7756=1 6855=3 9881=5 5531=0 2581=? SPOILER AL...

   Problem solving     2012-04-05 23:40:35

  Advantages and disadvantages of GoLang

GoLang is a strong typed language which means it is less flexible than interpreted languages by nature. But Go provides Any type(interface) and Reflect mechanism which make the language very close to interpreted languages on flexibility. More and more people start to learn GoLang. This post is mainly for listing down some of the advantages and disadvantages of GoLang. Advantages Performance(Machine code) GoLang is a compilation language which can be compiled to machine code and the compiled bina...

   GENERICS,GOROUTINE,GOLANG,DISADVANTAGE,ADVANTAGE     2018-11-10 20:46:45

  The details and analysis of capturing gRPC packets

Introduction If you're only using gRPC at the application layer, I believe studying the examples on the gRPC official website is sufficient. However, when planning to extensively use gRPC within a team, you will face many challenges, such as authentication schemes between services, routing solutions for multi-region services, and compatibility solutions with existing RESTful services. I recently realized that applying a technology stack requires mastering a wealth of information about that stack...

   GRPC,GOOGLE     2024-01-14 05:59:13

  4 asynchronous programming methods in JavaScript

You may know the execution environment of JavaScript is single threaded. The so called single thread means only one task can be running at any time, if there are many tasks, they need to be in a queue and wait for the previous task to be completed. The advantage of this mode is it's easy to implement and the execution environment is relative simple; the disadvantage is that if one task takes long time, the tasks following it must wait in the queue and this will delay other tasks consequently. Th...

   JAVASCRIPT,ASYNCHRONOUS PROGRAMMING, EVENT MODEL,PROMISE     2012-12-25 00:55:47