SEARCH KEYWORD -- Memory model
Restore mocked variables in GoLang unit test
One of the guarding principles of writing unit test is that there should be no real external calls for dependant services. Unit test should run by its own and can run without issues on any environment including local, build, test environment. This indicates there should be some mock responses whenever an external call is needed so that different unit test scenarios can be covered. How can this be done in GoLang? In GoLang, anything can be assigned to a variable even including functions. A variab...
GOLANG,UNIT TEST,MOCK FUNCTION,RESTORE MOCK 2021-12-10 20:43:00
Programming Achievements: How to Level Up as a Developer
How does a good developer become a great developer?Forget greatness for a moment: How does a decent developer become a good developer?There is no definitive path from Step 1 to Step n. Heck, it's not even clear what Step n is. And as logically-minded developer types, the lack of a well-defined route can make for a daunting journey from novice to master.I've spent a fair bit of time over the last few years bumping up against this conundrum. What's next? How do I go from being a goo...
Good developer,Great developer,Comparison,Knowledge,Skill,Platform 2011-11-09 02:12:58
Why are column oriented databases so much faster than row oriented databases?
I have been playing around with Hybrid Word Aligned Bitmaps for a few weeks now, and they turn out to be a rather remarkable data structure. I believe that they are utilized extensively in modern column oriented databases such as Vertica and MonetDB. Essentially HWABs are a data structure that allows you to represent a sparse bitmap (series of 0's and 1's) really efficiently in memory. The key trick here is the use of run length encoding to compress the bitmap into fe...
Database,Column oriented,Speed analysis,Vertica 2012-01-29 04:27:05
The Book That Every Programmer Should Read
No, it’s not Knuth’s “The Art of Programmingâ€. I’m talking about quite an easy-to-read (compared to TAoP) book, which, in fact, does not require any engineering or mathematical background from the reader.I am talking about C. Petzold’s “CODEâ€. It is a truly remarkable book about how computers work. Let me explain why I think this book is so awesome.The book starts from the very beginning, from explaining what code is, bringi...
Programmer,Book,Must read,CODE,C. Petzold 2011-10-31 10:43:58
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...
GOLANG,CACHE,GO-CACHE,BIGCACHE,GOURPCACHE 2022-04-16 07:48:11
Additional steps need to implement to setup shadow-boxV2 OPTEE on Raspberry PI
We followed the Shadow-box v2 project from the https://github.com/kkamagui/shadow-box-for-arm to set up the trustZone on Raspberry PI modeB to protect the Linux Kernel. But got a problem when doing the step: [3.6.5. Activate Shadow-Box for ARM and Start Secure Pi!] to create the hash for the memory area. The result is not shown. If you met the same problem, this is what I did to fix the problem on my PI: 1.1 When we do the step [3.5.1. Copy OP-TEE OS with Shadow-Box for ARM and N...
HARDWARE,RASPBERRY PI 2019-05-20 08:52:55
Lasagna Code
Anyone who claims to be even remotely versed in computer science knows what “spaghetti code†is. That type of code still sadly exists. But today we also have, for lack of a better term — and sticking to the pasta metaphor — “lasagna codeâ€.Lasagna Code is layer upon layer of abstractions, objects and other meaningless misdirections that result in bloated, hard to maintain code all in the name of “clarityâ€. It drives me nuts to see how badly some c...
Lasagna Code,Analysis,spaghetti code 2011-11-16 03:12:03
Java vs F#
Dr Cliff Click of Azul Systems, specialists in manycore JVM systems, recently published a blog post about the performance of Java compared primarily to C and C++ but also discussing C# and .NET. Three of Cliff's comments are of particular interest:Under the heading "Places where C/C++ beats Java for obvious reasons":"Value Types, such as a 'Complex' type require a full object in Java." - Dr Cliff ClickWhat Cliff forgot to mention is that .NET also provides value types and a far more compell...
Java,F#,Performance,JVM 2012-03-07 05:07:31
The 10 Greatest Hacks of My Life
My co-founder and I briefly considered applying to YCombinator for the Winter 2012 session. We eventually decided to bootstrap Curvio initially, and raise a seed round on our own after we launch (so far so good!). But looking over the YC application, one question intrigued me:Please tell us about the time you, tansey, most successfully hacked some (non-computer) system to your advantage.Now, there are a lot of ways to interpret this. A mechanical interpretation would be about...
Hack,Most important,Example,Curvio 2011-10-22 12:47:42
User experience : Exception handling
Exception handling is the process of handling emergencies or unpredictable operational errors. The specific time of the occurrence of unexpected events and the actual consequences of the specific situation are difficult to predict. How to handle this unexpected crisis is also related to the user experience of your users. Let's first look at how some famous products deal with unexpected exception encountered by users:1. Goodyear tires can automatically expand when leaking.Tire blast is one of the...
User experience,Exception handling 2013-04-06 05:05:04
RECENT
- Private LLM Integration with RAGFlow: A Step-by-Step Guide
- First Touch on OpenAI API
- Special ARP Uses: Gratuitous ARP, ARP Probe, and ARP Announce
- SIEM Big Data Visualization [04] : Data Transmission Latency SIEM Log Analysis Dashboard
- How to make select in WinSock exceed the 64-socket limit
- EtsiosApp Release Date: All You Need to Know
- SIEM Big Data Visualization [03]:Graph-Based SIEM Log Analysis Dashboard
- How AI is Changing Web Development: A New Era of Digital Innovation
- SIEM Big Data Visualization [02]: National Cyber Threats Dashboard
- Exploring the Impact of a Loan Origination System on Financial Institutions
- more>>