|
How the React Hooks ESLint plugin saved me hours debugging useEffect
-
maxrozen.com
-
5 years ago
-
eng
useEffect is great for fetching and rendering data, but are you using it correctly? There's an eslint plugin to check!
|
|
If your plan is to loop over a collection: You shouldn’t check for it being non-empty first. Don’t do this: if (!stuff.empty()) { for (Item item : stuff) { // ... } } Do this instead: for (Item item : stuff) { // ... } Benefits: Shorter Less nesting Same performance I used to do this too at some point in the past, because I thought this would have performance benefits, but in reality, the performance benefit is hardly measur..
|
|
If your plan is to loop over a collection: You shouldn’t check for it being non-empty first. Don’t do this: if (!stuff.empty()) { for (Item item : stuff) { // ... } } Do this instead: for (Item item : stuff) { // ... } Benefits: Shorter Less nesting Same performance I used to do this too at some point in the past, because I thought this would have performance benefits, but in reality, the performance benefit is hardly measur..
|
|
If your plan is to loop over a collection: You shouldn’t check for it being non-empty first. Don’t do this: if (!stuff.empty()) { for (Item item : stuff) { // ... } } Do this instead: for (Item item : stuff) { // ... } Benefits: Shorter Less nesting Same performance I used to do this too at some point in the past, because I thought this would have performance benefits, but in reality, the performance benefit is hardly measur..
|
|
Hillel Wayne has a great newsletter, and one recent post had this observation: The abstract concept here is knowledge or skills that You are unlikely to discover on your own, neither through practice and reflection nor by observing others apply it. Once somebody tells you about it, you can easily learn and apply it. Once you can use it, it immediately gives you significant benefits, possibly to the point of raising your expertise level.
|
|
Hillel Wayne has a great newsletter, and one recent post had this observation: The abstract concept here is knowledge or skills that You are unlikely to discover on your own, neither through practice and reflection nor by observing others apply it. Once somebody tells you about it, you can easily learn and apply it. Once you can use it, it immediately gives you significant benefits, possibly to the point of raising your expertise level.
|
|
This post derives the theoretical MAD value for the Gumbel distribution and computes the corresponding bias-correction factor. Pragmastat recommends Spread — the Shamos estimator — as a more efficient robust scale alternative. Confidence intervals are available via SpreadBounds . pragmastat.dev github.com/AndreyAkinshin/pragmastat The Gumbel distribution is not only a useful model in the extreme value theory , but it’s als....
|
|
Memory issues can be hard to track down. A function that only allocates a few small objects can cause a space leak if it’s called often enough and those objects are never collected. Even then, many objects are supposed to be long-lived. How can a tool, armed with data on allocations and their lifetimes, help sort out the expected from the suspicious?
|
|
Memory issues can be hard to track down. A function that only allocates a few small objects can cause a space leak if it’s called often enough and those objects are never collected. Even then, many objects are supposed to be long-lived. How can a tool, armed with data on allocations and their lifetimes, help sort out the expected from the suspicious?
|
|
This post derives the theoretical MAD value for the Gumbel distribution and computes the corresponding bias-correction factor. Pragmastat recommends Spread — the Shamos estimator — as a more efficient robust scale alternative. Confidence intervals are available via SpreadBounds . pragmastat.dev github.com/AndreyAkinshin/pragmastat The Gumbel distribution is not only a useful model in the extreme value theory , but it’s als....
|
|
Where Can You Earn Better Interest Rates Now That Even High-Yield Savings Account Rates are Low?
-
www.joehxblog.com
-
5 years ago
-
eng
I love my online high-yield savings account. I’ve had the account a number of years now, and it was great when the interest rate was just over two percent. But over the past year, the interest rate has slowly been dropping, and now, it’s under one percent.
|
|
Ignoring return values can often be dangerous in subtle ways but you may be so used to doing it that you don't even notice anymore. It's…
|
|
Here I list my other writings that I published and talks that I held. Writings Mob Programming - Remote Teams in the Flow | Telekom MMS Blog ( Internet Archive ) Ansible Best-Practices | Telekom MMS Blog ( Internet Archive ) Erfahrungen und Best-Practices mit Ansible | Telekom MMS Blog ( Internet Archive ) Updated: Erfahrungen und Best-Practices mit Ansible| entwickler.de ( Internet Archive ) Automating dev-sec releases wi....
|
|
Lately I’ve been fascinated by the possibility to analyse the assembly code emitted by the Java JIT (just-in-time) compiler. So far I had only looked only into Java class files using javap ; diving into the world of assembly code feels a bit like Alice must have felt when falling down the rabbit whole into wonderland.
|
|
Lately I’ve been fascinated by the possibility to analyse the assembly code emitted by the Java JIT (just-in-time) compiler. So far I had only looked only into Java class files using javap ; diving into the world of assembly code feels a bit like Alice must have felt when falling down the rabbit whole into wonderland.
|
|
It's wild that you can couple a physical business to digital technology to the extent that one can't operate without the other
|
|
It's wild that you can couple a physical business to digital technology to the extent that one can't operate without the other
|
|
It's wild that you can couple a physical business to digital technology to the extent that one can't operate without the other
|
|
Well, well, well. It's that time again when I revisit some random thing I built years ago and brace myself for the extent of potential code rot. Confession…
|
|
Bro., there are so many plugins for browsers to handle this, it's better for you to recommend some of them rather than risk the hassles of a plugin to your blog. I for one would be hardly offended at running into Spanish on your blog, and could get it translated on my end without giving it much thought.
|
|
Well, I never needed anything that extravagant. I always used the "units" CLI utility in Linux to supply metric units in my blog posts, for example. Still, the tool you found is pretty cool for visualizing the scale of things.
|
|
We live in a world that is gradually and incessantly attracted by over-rationality and order. In this article we'll burst the enchanted bubble and embrace corruption and chaos — We're going to discuss the topic of image glitch art.
|
|
Previous Entries 0 - Motivation Introduction So I finally got started on Cabin Fever. Given that I have chosen to not proceed from an…
|
|
Technology is a crazy ride, and like that lyric in the Talking Heads song Once in a Lifetime , “…you may ask yourself, well, how did I get here?” If that’s the case, you’re in luck, because this post is a no-nonsense, give-me-the-big-picture timeline of what the heck happened in the technology landscape these past 50 years. Of course, not every little detail is in there. Just those that are actually important (in my expert opinion, of ..
|
|
Technology is a crazy ride, and like that lyric in the Talking Heads song Once in a Lifetime , “…you may ask yourself, well, how did I get here?” If that’s the case, you’re in luck, because this post is a no-nonsense, give-me-the-big-picture timeline of what the heck happened in the technology landscape these past 50 years. Of course, not every little detail is in there. Just those that are actually important (in my expert opinion, of ..
|
|
macOS supports many Emacs bindings (out of the box). You can, for example, press C-p and C-n to move the cursor up and down (whether editing text in Emacs or any other macOS app). Jacob Rus's Customizing the Cocoa Text System offers a more in-depth picture and also shows how to customize global macOS keybindings (via DefaultKeyBinding.dict). In addition to moving Emacs point (cursor) up/down using C-p/C-n, I've internalized the same b....
|
|
Combine in a pot 2/3 cup of basmati rice 400 ml of coconut milk 4 cups of milk [^6] 3 tablespoons of honey [^7] 1/4 teaspoon of crushed cardamom seeds [^8] 1/8 teaspoon of salt Simple. Combine all ingredients in a pot. Boil and simmer Bring ingredients to a boil and simmer at low heat for 45 minutes. Stir occasionally. Mix in butter 1 tablespoon of butter. Turn stove off, add a tablespoon of butter, and mix in. Serve warm or cold ..
|
|
This is a contribution to the Rust 2021 Roadmap Blogs request. As a developer using Rust in a proprietary, polyglot code base, I want Rust to improve non-Cargo builds My story comes from spending the better part of a year migrating a roughly 700,000 line code base (and several hundred upstream dependencies) to build using Bazel circa 2019. As Rust becomes more popular, a large chunk of developers will want to use it as a complement to exist..
|
|
This is a contribution to the Rust 2021 Roadmap Blogs request. As a developer using Rust in a proprietary, polyglot code base, I want Rust to improve non-Cargo builds My story comes from spending the better part of a year migrating a roughly 700,000 line code base (and several hundred upstream dependencies) to build using Bazel circa 2019. As Rust becomes more popular, a large chunk of developers will want to use it as a complement to exist..
|
|
Introduction I am writing an experimental time tracker for software development workflows. It is called Tempus and you can see more…
|
|
Rate limiting connections with iptables and hashlimit (BASH)
-
snippets.bentasker.co.uk
-
5 years ago
-
eng
It's sometimes desirable to limit the rate at which connections can be established with a server - whether to act as a defense against simpler DDoS's or simply to enforce usage limits This snippet details how to use the hashlimit module to limit connection rates Read more…
|
|
If you use Python, then you probably have used pip to install additional packages from the Python package index. Part of the magic behind pip is the dependency resolver, and there is a new version of it in the latest version of pip. This week on the show, we have Sumana Harihareswara and Georgia Bullen, who have been working on the recent releases of pip. Sumana is the project manager for pip, and Georgia has been working on pip's user expe..
|
|
A data-driven argument for why Artsakh must be independent — examining historical claims, demographic evidence, and the indisputable pattern of ethnic violence.
|