Today LinkedIn suggested me to take C++ quiz to test my declared skill. This is a new solution of LinkedIn announced as "Skill Assessments to Help Professionals Showcase and Improve their Skills". I have not used C++ in "professional life" almost 4 years (UPDATE: I am happy that C++ is important again due to ML/DL … Continue reading LinkedIn C++ quiz: It’s a trap!
Art of Hacking Golang compiler
UPDATE 03/19/2018 CL https://golang.org/cl/91557 and https://golang.com/cl/100838 are committed and will be a part of Go 1.11. UPDATE 06/25/2018 Found a bug https://golang.org/issue/25936. Fixed by CL https://golang.org/cl/120255 What? map and append When I just started to learn Golang, found this example: You may see two likes[l] that are obviously not free if final machine code is doing it. There is no … Continue reading Art of Hacking Golang compiler
Change Rate Anomaly in Service Mesh
Overview Classic Service Mesh architecture uses sidecar proxies and load balancers, like Envoy, HAProxy or other, maybe proprietary solution. Load Balancer performs routing for different services or micro services and can track some obvious metrics - latencies, errors, availability. One popular approach for anomaly detection - compare service metrics with its historical values. But there … Continue reading Change Rate Anomaly in Service Mesh
Codegen test coverage
One of GoLang optimization that I named "cmd/compile: avoid mapaccess at m[k]=append(m[k].." (Issue 24364 and CL 100838) removes excessive runtime.mapaccess call. I provided usual tests and benchmarks that guarantee that the map still works as expected and performance has been improved. And I had to generate ASM code manually to make sure that CALL runtime.mapaccess is … Continue reading Codegen test coverage
go vet: Printf family check
What? I use golang with VSCode IDE. One of the features that I enabled is on-fly static code analysis. It uses standard golang feature Command Vet https://golang.org/cmd/vet. This article is about interesting Printf family check https://golang.org/cmd/vet/#hdr-Printf_family behaviour. If write a code go vet reports "Missing argument for Errorf("%v"): format reads arg2, have on". go vet … Continue reading go vet: Printf family check
git today? Data Driven conclusions only
Have you thought sometimes that you are doing too much debugging and bug fixing or spending too much time in meetings while other developers are having fun writing code? Or maybe you've heard that someone said "writing less or more code"? In both cases conclusion must be wrong! I have a story that made me … Continue reading git today? Data Driven conclusions only
REST based Embedded Tiny URL server
Motivation If applications, online services or websites have a rich query functionality, URL may be too long to share in a messenger and mail. In this case you may want to support Tiny URL service. If you can't use an external service like tinyurl.com then internal or even embedded Tiny URL service may solve the problem. For … Continue reading REST based Embedded Tiny URL server
How to implement Field Does Not Exist at Lucene?
Apache Lucene is a core for many search engines and naturally supports queries like Field Exists for static fields. For example, Lucene query "field_name:*" will return all documents that have field_name, any value. But there is no way to query: "-field_name:*" and hence there is no natural support for Field Does Not Exist. If application's search engine … Continue reading How to implement Field Does Not Exist at Lucene?
How expensive is Java’s socket option SO_TIMEOUT?
Does getSoTimeout and setSoTimeout use system calls getsockopt/setsockopt underhood?