Yunpeng's Blog

Life, coding and everything


  • Home

  • Categories

  • Archives

  • About

Re-understand JavaScript

Posted on 2019-06-18 Edited on 2019-07-13 In Technical , Web Comments:

In this post, we will be looking at a few interesting (but could be challenging) JavaScript questions.

Most of them are actually testing the so-called “down-side” of JavaScript. You certainly should not write such code in a real-world codebase. As I have repeated many times, code should be clear, precise and concise, in that order of importantce. Nevertheless, they are indeed good questions to test your competency in JavaScript.

9 or 10?

You are given a function called magic_length, which is defined as follows:

1
2
3
function magic_length(input) {
return input.length == 10 && input == ",,,,,,,,,";
}

Please give one possible value of input such that magic_length(input) will return true. Notice: input should be of basic data type provided by built-in libraries.

Read more »

Introducing your Guide to be AWS Certified

Posted on 2019-06-15 Edited on 2019-07-13 In Technical , Cloud Comments:

Hi guys, it has been a long time since my last post. In the past few months, I have been preparing for the AWS Certified Solutions Architect – Associate examination, which is part of the series of AWS Certificate Examination.

This examination (and its siblings) focus on some cloud computing concepts, as well as a lot of details specific to the services provided by AWS. To prepare for this examination, there are a few important learning resources:

  • Official Examination Guide and sample questions;
  • AWS whitepapers, which have been collected and available at https://aws.amazon.com/whitepapers/;
  • AWS Training Learn Library, which offers a free subscription currently;
  • Some online courses, of which A Cloud Guru being one of the most popular providers.
Read more »

Consistency between Redis Cache and SQL Database

Posted on 2019-05-04 Edited on 2019-07-13 In Technical , Database , Redis Comments:

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 database). This cache layer is usually implemented using an in-memory cache. This is because, as stated in many textbooks, the performance bottleneck of traditional SQL databases is usually I/O to secondary storage (i.e., the hard disk). As the price of main memory (RAM) has gone down in the past decade, it is now feasible to store (at least part of) the data in main memory to improve performance. One popular choice is Redis.

Read more »

How Query Optimizer Works in RDBMS

Posted on 2019-02-07 Edited on 2019-07-13 In Technical , Database , SQL Comments:

In a previous post, we discussed how the various relational operators are implemented in relational database systems. If you have read that post, you probably still remember that there are a few alternative implementations for every operator. Thus, how should RDBMS determine which algorithm (or implementation) to use?

Obviously, to optimize the performance for any query, RDBMS has to select the correct the algorithm based on the query. It would not be desirable to always use the same algorithm. Also, SQL is a declarative language (i.e., as a programmer we only declare what we want to do with the language, not tell how the language should accomplish the task). Therefore, it would be an anti-pattern if the user of the database system needs to specify which algorithm to use when writing the query. Instead, the correct approach would be that the user would treat the entire system as a blackbox. The end-user should not care about which algorithm is picked but expect the performance optimization is guaranteed.

Read more »
123
Niu Yunpeng

Niu Yunpeng

The world never stops for you.
11 posts
8 categories
RSS
GitHub Facebook LinkedIn Website
Creative Commons
0%
© 2017 – 2019 Niu Yunpeng
Powered by Hexo v3.9.0
|
Theme – NexT.Gemini v7.2.0