|
Performance is an important feature for many projects. Unfortunately, it’s an all too common situation when a developer accidentally spoils the performance adding some new code. After a series of such incidents, people often start to think about performance regression testing. As developers, we write unit tests all the time. These tests check that our business logic work as designed and that new features don’t break existing code. It look....
|
|
Performance is an important feature for many projects. Unfortunately, it’s an all too common situation when a developer accidentally spoils the performance adding some new code. After a series of such incidents, people often start to think about performance regression testing. As developers, we write unit tests all the time. These tests check that our business logic work as designed and that new features don’t break existing code. It look....
|
|
Handler Handler 主要用于在不同的线程中相互通信,使用场景最多的应该就是在子线程中更新 UI。 与 Handler 相关的类: Handler :处理与发送消息(Message) Message :消息的包装类 Looper :整个 Handler 通信的核心,接受 Handler 发送的 Message,循环遍历 MessageQueue 中的 Message,并发送至 Handler 处理 MessageQueue :保存 Message LocalThread :存储 Looper 与 Looper所在线程的信息 关系流程图: 上图简单概括为: Handler 将 Message post 或者 send 到 MessageQueue 中,Looper 不断循环从 MessageQueue 中取出 Message 交由 Handler 来处理。 Handler 消息处理 Handler 处理消息的方法为 dispatchMe....
|
|
This list contains some of the major conference talks that I did in the past years. 2018 Linux Delay Accounting at Gophercon (Lightning Talk) [Slides] [Video] Understanding Go Memory Allocation at Gophercon UK [Slides] [Video] Entendendo Alocação de memória no Go at The Developers Conferece SP (PT-BR) [Slides] The Developers Conference Gophercon Brazil [Video] Containers na Globo.com - Passado, Present..
|
|
Dave, this conversation can serve no purpose anymore. Goodbye.
-
www.practicallyefficient.com
-
8 years ago
-
eng
Via Hobo Signs : An artificial intelligence system being developed at Facebook has created its own language. It developed a system of code words to make communication more efficient. Researchers shut the system down when they realized the AI was no longer using English. The observations made at Facebook are the latest in a long line of similar cases. In each instance, an AI being monitored by humans has diverged from its training in ....
|
|
Dash.el is a lovely library, and one of the most popular on MELPA. If we can squeeze every last drop of performance out of it, everyone benefits. Let’s take a look at the black art of making elisp faster. Measure First! Chris Wellons has a great optimisation blog post that discusses the performance overhead of creating lambdas with mapcar. If we look at --map, it does indeed create anonymous functions: ( defmacro --map ( for....
|
|
A very successful salesman for 50+ years, my grandpa recently retired at the ripe old age of 85. Even though he doesn’t work anymore, he still follows a similar routine, including sticking to his system for getting things done. With writing that’s probably legible only to himself, he lists out the tasks for the next day on a diary page. He carries that piece of paper, folded up in his pocket, crossing off tasks as he completes them. If ..
|
|
July 28 Made a bit more progress on the authentication basics today. Relevant commits are: Add http package; have auth0 test delete user it has just registered after test is done Create json util; add logout test July 29 Today I focused a bit on the building and installation of snaillifecli. I switched my custom app configuration code for Viper because it apparently integrates really well with Cobra , which is a library to help ..
|
|
In my last article I discussed the basics of Swift's new Codable protocol, briefly discussed how to implement your own encoder and decoder, and promised another article about a custom binary coder I've been working on. Today, I'm going to present that binary coder. (Read More)
|
|
Friday Q&A 2017-07-28: A Binary Coder for Swift Friday Q&A 2017-07-28: A Binary Coder for Swift In my last article I discussed the basics of Swift's new Codable protocol, briefly discussed how to implement your own encoder and decoder, and promised another article about a custom binary coder I've been working on. Today, I'm going to present that binary coder. Source Code As usual, the source code is available on GitHub: h....
|
|
If you’re a regular visitor to this blog, you might be aware that we have been transitioning to a microservices based architecture over the past four to five years, as we have shared insights into the process and the related challenges on multiple occasions. To recap, adopting a microservices architecture has allowed us to regain team autonomy by breaking up our monolithic backend into dozens of decoupled services, each encapsulating a well..
|
|
TLDR; with a deadline looming, my productivity shot up exponentially. I’ve had mixed feelings about deadlines. Having perfectionist tendencies, I often felt that they prevent me from doing my best work. When I do the best work I can do, I feel extremely satisfied. Like a craftsman after a finished piece of work. However, this also leads to a lot of unfinished projects. On the flip side, when deadlines have been set, my productivity goes..
|
|
The Breville Boss To Go is a sleek, powerful personal blender with a die-cast metal driveshaft. It easily liquifies leafy greens and finely grinds seeds.
|
|
If you’re a regular visitor to this blog, you might be aware that we have been transitioning to a microservices based architecture over the past four to five years, as we have shared insights into the process and the related challenges on multiple occasions. To recap, adopting a microservices architecture has allowed us to regain team autonomy by breaking up our monolithic backend into dozens of decoupled services, each encapsulating a well..
|
|
It’s almost 2am and I’m sleepy, but I wanted to write this down while it’s relatively fresh in my mind.
|
|
I recently gave a talk at DevOps Days ( slides ) and it had a pretty great response. I’m still pretty care-mad about the topics it covered so I figured I would turn some key points from it into a blog post. The overall outline of the talk covered the past, present, and future of usable security. Let’s start with the past. The Past A lot of the security tooling of the past (that we still use today) require users to jump through a lot of ....
|
|
1300-1600 words, 6 1/2 to 8 1/2 minutes. An Etching of Samson by Julius Schnorr von Carolsfeld, from an 1882 German Bible. “He grasped two pillars of the temple and bowed himself with all his might” - Judges 16:30. Introduction This post is about online services which rely partly, or wholly, on user-contributed content. It’s about what happens to that content if those services close. I’ll examine the constraints and motivations of the parti..
|
|
In this episode we'll tackle a topic that joins many parts of the systems and so is hard to fully cover. It has a relationship with everything in the system, it glues it together. We're going to be discussing processes on Unix.
|
|
Gabe whipped up a great list of checklist tools. My favorite aspect of his post is that there’s no clear winner. There shouldn’t be. Checklists can come in all forms, and the ideal format depends entirely on the application. For me, checklists make sense when I need to see not only what needs to be done, but also what I’ve already done . Apps that automatically “vanish” completed tasks fail to do the latter. For me, sometimes there’s....
|
|
Problem: Express a boolean logic formula using polynomials. I.e., if an input variable $ x$ is set to $ 0$, that is interpreted as false, while $ x=1$ is interpreted as true. The output of the polynomial should be 0 or 1 according to whether the formula is true or false as a whole. Solution: You can do this using a single polynomial. Illustrating with an example: the formula is $ \neg[(a \vee b) \wedge (\neg c \vee d)]$ also known as
|
|
Problem: Express a boolean logic formula using polynomials. I.e., if an input variable $ x$ is set to $ 0$, that is interpreted as false, while $ x=1$ is interpreted as true. The output of the polynomial should be 0 or 1 according to whether the formula is true or false as a whole. Solution: You can do this using a single polynomial. Illustrating with an example: the formula is $ \neg[(a \vee b) \wedge (\neg c \vee d)]$ also known as
|
|
Problem: Express a boolean logic formula using polynomials. I.e., if an input variable $ x$ is set to $ 0$, that is interpreted as false, while $ x=1$ is interpreted as true. The output of the polynomial should be 0 or 1 according to whether the formula is true or false as a whole. Solution: You can do this using a single polynomial. Illustrating with an example: the formula is $ \neg[(a \vee b) \wedge (\neg c \vee d)]$ also known as
|
|
My first foray into software development when I was a kid was as a web developer. I don’t admit this to many people, but the first language I ever learned halfway decently was PHP. I led a confused childhood. After that, though, I was introduced to Ruby on Rails, and I’ve been using it ever since. I don’t do web development professionally anymore, but I have a number of web-based side projects, making websites for friends or family.
|
|
Poor Visual Studio code generation for reading from and writing to member variables
-
www.forwardscattering.org
-
8 years ago
-
eng
I spend quite a lot of time trying to write fast code, but it is something of an uphill battle with Microsoft's Visual Studio C++ compiler. Here is an example of how MSVC struggles with member variable reads and writes in some cases. Consider the following code. In the method writeToArray(), we write the value 'v' into the array pointed to by the member variable 'a'. The length of the array is stored in the member variable 'N'. clas....
|
|
I’ve got an Asus C301S at work, it’s a Chromebook with Chromeos. I like those little laptops, for the price it’s actually a very good little machine. ChromeOS is responding very well, ssh and Chrome are working too. But I often need more, like X11 forwarding or offline coding … You will see the C301SA is marked as a C300SA internally. Here are the steps to install Arch Linux on it, do it at your own risk, you can brick your computer, you wi..
|
|
Intel and their x86 computing architecture have pretty much dominated the computing industry since the late 1980s. In other words, nearly all computers that you’ve used at work or home for the past three decades have used Intel’s proprietary x86 (and later, x64) CPUs. The Intel 80-386 running DOS and Win3.1 won the PC wars by the early 1990s. Then came the Intel 80-486, Pentium, Pentium II, Pentium III, Pentium IV, Core Duos, Core i7s, a..
|
|
Intel and their x86 computing architecture have pretty much dominated the computing industry since the late 1980s. In other words, nearly all computers that you’ve used at work or home for the past three decades have used Intel’s proprietary x86 (and later, x64) CPUs. The Intel 80-386 running DOS and Win3.1 won the PC wars by the early 1990s. Then came the Intel 80-486, Pentium, Pentium II, Pentium III, Pentium IV, Core Duos, Core i7s, a..
|
|
In the winter, I get questions about how I deal with the cold. In the summer, I get questions about how I deal with the heat. Being the more agreeable seasons, spring and fall are generally less concerning to people. I’ve talked about dealing with the cold already. Just throw on a few of your favorite layers and cozy up with a comfy blanket. But winter is so last season. With Bay Area temperatures occasionally reaching triple..
|
|
In the winter, I get questions about how I deal with the cold. In the summer, I get questions about how I deal with the heat. Being the more agreeable seasons, spring and fall are generally less concerning to people. I’ve talked about dealing with the cold already. Just throw on a few of your favorite layers and cozy up with a comfy blanket. But winter is so last season. With Bay Area temperatures occasionally reaching triple..
|