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

 ALL


  First impression of Github Copilot

It has been some time since I heard about the new generation of AI powered coding assistant -- Github Copilot. Don't get chance to experience it until obtained the tech preview access recently. So this post will document some first impression while using it.For now, this tool is only supported in VSCode and it can support various different programming languages. To enable it, just need to search and install the Github Copilot extension within VSCode. Once that is enabled, you will find that whenever you type something in your editor, there might be some suggestion with grey text showing up.And...

2,076 0       GITHUB COPILOT FIRST IMPRESSION


  Will nil == nil be true in GoLang

There is some interview question may ask whether nil == nil be true in GoLang. Wil it be true. false or compilation error? To know the answer, some knowledge about nil in GoLang needs to be explained first.nil definitionAccording to Go's official documentation, the definition of nil is// nil is a predeclared identifier representing the zero value for a// pointer, channel, func, interface, map, or slice type.var nil Type // Type must be a pointer, channel, func, interface, map, or slice typenil is the zero value of types like pointer, channel, func, interface, map or slice. Itself is NOT a GoLa...

5,878 2       GOLANG NIL NIL EXPLANATION


  Alibaba gains spotlight due to female employee alleging sex harassment from supervisor

During the weekend, the Chinese e-commerce giant Alibaba gains spotlight from Chinese general public due to a hot discussion going on on various Chinese social media platforms where a female employee alleges that her supervisor(alias Yi Qu) conducted sex harassment on her during a previous business trip.The case happened a couple of weeks back where the female employee at Alibaba was asked by her direct supervisor to go for a business trip to Shandong province(a northern province in China), she initially declined the request due to severe weather condition(typhoon Yanhua). However her supervis...

2,645 0       ALIBABA SEX HARASSMENT


  Install and use GSpace to install apps from Google Play on Huawei Harmony OS

Huawei has released its own branded mobile OS Harmony OS sometime back and some Huawei device models now support installing or upgrading to use Harmony OS. Since this OS is Huawei's own OS and it doesn't come with Google Play by default which most of the current Android apps are hosted on. In this case, how can someone install the apps from Google Play on Huawei Harmony OS or use GMS services like Google Play, Google Maps?The solution provided by Huawei is to install GSpace which is an APP container where it can be thought as a virtual gallery store where apps from Google Play can be installed...

23,327 7       HUAWEI GOOGLE PLAY HARMONYOS


  Time to think about supporting max/min functions for integers in GoLang

Sometime back we wrote a post explaining why there is no max/min function support for integers in GoLang, one of the reasons is that no overloading is supported and the function name has been used for other numeric types float64. To solve this problem and make max/min function support integer as well, either GoLang should support overloading like in Java or the same set of functions need to be created in a different package other than standard math. These don't look like good options as overloading is more a OOP concept and supporting the same set of functions in a different package doesn't so...

4,930 0       GOLANG GENERICS MAX MIN


  Install and enable redis extension in PHP 5.X on Windows

Redis is frequently used as a caching layer for web applications to improve its performance. In PHP 5.x, if one wants to use Redis, the redis extension needs to be installed and enabled first.This post will show how to install and enable redis extension on Windows with PHP 5.X. Basically there are two dlls to be downloaded: php_redis.dll and php_igbinary.dll.Below are detailed stepsGo to http://windows.php.net/downloads/pecl/releases/redis/2.2.7/ and find the respective php_redis zip matching your environment.Go to windows.php.net - /downloads/pecl/releases/igbinary/2.0.1/ and f...

5,299 4       PHP WINDOWS REDIS PHP 5.6


  Fix --go_out: protoc-gen-go: plugins are not supported

When generating RPC code using proto file template in GoLang, one may face the issue like below when running the command protoc.Error: exit status 1Output: --go_out: protoc-gen-go: plugins are not supported; use 'protoc --go-grpc_out=...' to generate gRPCSee https://grpc.io/docs/languages/go/quickstart/#regenerate-grpc-code for more information.Normally this issue is caused because the version of protoc-gen-go being used is not correct. One way to fix the issue is to follow the instructions provided by Google to run a new command.Another way to fix this is by having the Github version of proto...

16,021 0       PLUGIN GOLANG PROTO BUFFER


  Top 10 Go Coding Traps and Tips

Go is currently the most common programming language in cloud development. Though I use it very much in my work, I am still repeating certain mistakes. This article is more a record of these errors, figuring out the causes and solutions so that people who read this article will save themselves time when coming across the same problems.Let’s cut through to the tips.Don’t rely on index var in the for loopThe most common mistake we make is that we often create goroutine inside a for loop and rely on the index variable. For example,package mainimport ( "fmt" "sync")fun...

1,516 0       TIPS GOLANG NIL INTERFACE