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

 ALL


  Our Go Cache Library Choices

In Build a Go KV Cache from Scratch in 20 minutes, I walked you through what matters when writing a local cache, and eventually implemented one, whose performance was beaten badly by that of the popular go-cache on Github though. However, the bright side is that we can learn a lot from those excellent Github Go cache products, studying their features, applicable scenarios, and implementations, and extracting what we need.In this article, I will mainly analyze and compare the four cache libraries of go-cache, bigcache, golang-lru, and groupcache, which are all...

1,570 0       CACHE GOLANG GO-CACHE BIGCACHE GOURPCACHE


  golangci-lint to enable comment check for exported functions

golangci-lint is a command line tool which aggregates a list of different go linters to check whether the source code is in correct condition from different aspects. It is built to run during the CI pipeline so that there is no obvious coding issues before compiling and building the program.It is easy to run it with just below command$ golangci-lint run -vINFO [config_reader] Config search paths: [./ /Users /] INFO [config_reader] Used config file .golangci.yml INFO [lintersdb] Active 10 linters: [deadcode errcheck gosimple govet ineffassign staticcheck structcheck typecheck unused varcheck] I...

6,679 1       GOLANG GOLANGCI-LINT REVIVE GOLINT EXPORTED COMMENT


  The magic of go:linkname

When writing Go program, there is frequent need on using time.Sleep() function to pause the logic for some time. And if jumping to the definition of this function, can see below definition:// Sleep pauses the current goroutine for at least the duration d.// A negative or zero duration causes Sleep to return immediately.func Sleep(d Duration)I's strange that there is no function body defined here. What happened? The actual definition of the function body is residing at runtime/time.go indeed.// timeSleep puts the current goroutine to sleep for at least ns nanoseconds.//go:linkname tim...

12,534 0       GOLANG GO:LINKNAME TRICKS


  Some frequently used ES6 code snippets

Below are a list of ES6 code snippets which are used frequently. Hope that it will be helpful.1. Shuffle array elementslet arr = [67, true, false, '55']arr = arr.sort(() => 0.5 - Math.random())console.log(arr)// [ '55', 67, false, true ]2. Remove characters which are not numbersconst str = 'xieyezi 23213 is 95994 so hansome 223333'const numbers = str.replace(/\D/g, '')console.log(numbers)// 23213959942233333. Reverse sequence or wordsconst sentence = 'xieyezi js so handsome, lol.'const reverseSentence = reverseBySeparator(sentence, "")console.log(reverseSentence);// .lol ,emosdnah os sj ize...

1,489 0       JAVASCRIPT TIPS CODE SNIPPET ES6


  SkipList in Go

Algorithmic thinking is the must-have in the coding world, so I have been keeping the routine of algorithm practice every week, consolidating my knowledge of data structures on one hand, and improving my coding skills as well.A difficult one happened to be stuck in my mind- Implement SkipList with Go, which took me quite a weekend. Below is the front-line report of how I finally got the hang of it.First, from its concept. Wiki has explained it well.a skip list is a probabilistic data structure that allows O(log n) search complexity as well as O(log n) insertion co...

3,197 2       GOLANG SKIPLIST


  Returning To Work After COVID-19: How To Ensure Your Employees Are Ready

Every aspect of our day-to-day lives has been impacted by the Internet, whether it be work or personal time. Since nations enforced strict lockdowns, employees have mostly been working remotely. Now that the world is slowly getting back on its feet after the lockdown, employers are evaluating their options and planning strategies to ensure employee safety after returning to the physical office. With some restrictions remaining, companies must consider not just the workplace, but employees' daily travel as well. It is the need of the hour to deploy proper training to employees that are hea...

659 0       TRAINING COVID-19 REMOTE WORK


  Certificate is invalid for localhost in Chrome

...

13,362 2       HTTPS CHROME LOCALHOST CERTIFICATE ELASTICSEARCH


  Public Vs. Private Cryptocurrency Keys

Before investing in any form of cryptocurrency, you must become familiar with the terminology used in the industry. This will prevent mistakes that could jeopardize your entire investment, and no one should be investing in any type of security or asset that they don't fully understand first.Crypto WalletsBefore we even delve into what public and private keys are, we first need to discuss what the keys are for. Your Bitcoin or crypto wallet is basically the account that you store your cryptocurrencies in after purchase. It is entirely controlled by you, and this level of control means that unfo...

1,153 0       SECURITY CRYPTOCURRENCY