One year of GraphQL in production
2019 has become an interesting year since I commit to GraphQL in production in my team. We stitched and served Graphs with a single endpoint…
2019 has become an interesting year since I commit to GraphQL in production in my team. We stitched and served Graphs with a single endpoint…
Here what I learned. Be present and visible It should be the first priority to stay present. No matter how big or small the incident, an…
Vim is not a typed language and it allows keymapping multiple handlers onto the same key, which sometimes leads to unexpected behavior. Here…
2018 has been an amazing year for me. I moved to San Diego, been working and traveling in both California and Arizona; contributed to…
Recently I had an interesting conversation with a cool guy named Chris, where he asked if I can explain how Node.js works to some…
Dynamic programming might be the most interesting approach in computer science with a clean and elegant solution. The general idea is to…
This is a question asked by an interviewer from Evernote. Throttling and debouncing drop unnecessary events, with a slightly different taste…
I spent two hours speeding up my Zsh’s awful init time. After quite a bit of researching on both Zsh and some related plugins, I found the…
Last week, I was asked by an interviewer by tree traverse with both recursion and iteration. Though I had done recursion on that topic, it…
Fisher-Yates shuffle algorithm is a classic shuffling algorithm with great performance and mathematical correctness. Here is two…
Chrome is amazing, it provides closure scope variable for a better debugging experience. With the following codes in the console, the obj…
If you interview Casper Wang in the future, this is what you would get.
Using top-down pattern
I am having a different result from two simple looping approach. and The problem came from a bad use of for in for array looping with the…
I believed that the triple equal checks on both the type and equality, whereas double equal only checks for equality, making triple equal…
Use the following function to get non-duplicate version of a two-dimensional array
Set can store different kinds of element, but specifically for storing Arrays, you will have to use to avoid duplication. without stringify…
Side note It’s pretty useful for creating a Hashmap, since it doesn’t change an integer except changing undefined to 0.
Say you have a HTML tag like This means you can access the elements with an id lol by
Arrow The ES2015 specification introduces thearrow function syntaxfor writing function expressions. As well as being terser than regular…
Type is type, is an object standing for nothing, Expressions and conversions and are loosely equal, but the conversion of is a bit…
Avoiding something that you understand it fully, but disagree with, is wisdom. Avoiding the same thing without understanding it is blind…
Because of most of the thing in this world just needs me to know how to do rather than how it is.
output:
A few month ago, my friend Hongkai, Zhang, Ph.D. found me and asked me if I could crawl all the data from sina stock source, which, provides…
You better do rather than declare! Functional programming is all about what you “do” rather than what you “are” or what something “is,” and…
In programming, a statement is about changing states, while expression is all about the results. Which means. Expressions usually have…
char description unicode html html entity · Middle Dot U+00B7 · · • Bullet U+2022 • • ‧ Hyphenation Point U+2027 ₁ N/A ∙ Bullet Operator U…
the following two expressions do the same job, but the later one doubles the runtime.
Recently, I was learning functional programming, and I happened to notice in this book, the author uses eight widths of indentation all the…
And an illustration of a simple object:
the programmers spend 70% of their time not coding but reading and understanding the codes.
Just checked out the scala official doc, apparently they put the to-javascript compiler on the front page, which gives a pretty clean peek…
I love functional programming(FP), but at the same time, it makes me tend to reach more space and time in computing. As one of the core…
For all iterable typed data, we can iterator through the spread operator or
Ref: https://leetcode.com/problems/find-the-difference/description/
So, if you want to check if two arrays are equal, you might want Well, by that you would probably assume two trues come back, but actually…
Imagine filling out an empty 2d array with this wtf? I just assigned once! better use map instead
I love both closure and arrow function; I take one for simplified class and one for simplified function syntax. After a try, I found that…
Bad: Good:
Bad Good
The following and are block level elements, not inline level element as usual.
Apparently, in declaring an obj, a child cannot be assign or refer to another child within the same obj which is being declared. Instead…
The and operators must always be surrounded by whitespace. The operand of for instance will be parsed as a percentage followed by a…
I change the default to in the fields of , , all , , to make sure my Vim’s colors are more synchronized.
Let me show you some handy combination empowered by Vim keys. Start editing at the end of the word you are currently focusing Start editing…
Let me just say this: CVim wins, hands down. I would say that the default settings from Vimium are more friendly to new in-browser vim users…
I did this simply because Cvim is more powerful on all aspects. I would say that the default settings from Vimium are more friendly to new…
I spent a lot of time micro engineering and forgot to make things work first. I shouldn’t do that again. Overengineering in small parts is…
I took a look at this tutorial from styled components. Apparently, it uses javascript extensively, eg., uses , for mixins. That’s one way…
In general, it’s advised only ever to animate transform or opacity, as everything else has performance issues. (see here) It concerns with…
With the refreshing frequency will be 60fps, with less GPU usage even. scrolling example
I spend a few hours uploaded my first NPM modules, chinese-year, which returns the Chinese zodiac animals’ list, or, the name of a…
If you have some messy local thing, but you want to get rid of them and update with a remote branch, and you try to do you would get Now…
One of the best way to learn coding, is to see the open source codes. Read more and you will code better.
Recently, as the so-called Internet of action day comes, lots of tech companies are promoting the saving Internet Neutrality action. I…
Today I am self-encouraged to write more, which primarily influenced by the following reason: My blog site has just been finished and…
If you use Vim, you would be amazed that you can still find something super useful after a long time. Marker navigation is the same case for…
The big difference is that the Internet has always been far more than just the catalog of one company; it’s the catalog of every idea, plus…
I added this plugin called Tab position options today to help me opening a new tab right next the current one. Unlike the default behavior…
This blog is created from netlify CMS
Sometimes we want to revise a function with many arguments into a composition of sub-functions to perform partial applications by tweaking…
We can manually call from the scroll event in each tick. Tested on Firefox 23.
Apparently, the committee made some modifications on ES6, making the generator function not as a constructor anymore.
This page show's the typography of this site.