I’ve never understood why linters don’t have this baked in. You want to deprecate a pattern, but marking it as an error and failing the build won’t work. So you mark it warning and fill everyone’s editors with yellow lines. And then we just get used to the noisy warnings.
Rubocop allows generation of a TODO file, which is basically an extra config file that you include in the main one and that contains current violations per cop+file and sets appropriate values to cops that have numerical limits.
From there on you can only go one direction.
OP's ratchet would simply be a new custom cop that matches a string, and the whole ignore existing violations would Just Work (and actually "better" since one wouldn't be able to move the pattern around)
Grovel over your linter's command-line options and/or configuration file. It's not an uncommon feature but from my personal and limited experience it is also not always advertised as well as you like. For instance, golangci-lint has not just a feature to check only changed code, but several variants of it available, but I think possibly the only places that these are mentioned on its site are in the specific documentation of the issues configuration YAML documentation: https://golangci-lint.run/docs/configuration/file/#issues-co... written in a My Eyes Glaze Over coloration scheme [1], and mentioned in the last FAQ, which means reading to the bottom of that page to find out about it.
Most mature systems that can issue warnings about source code (linters, static analyzers, doc style enforcers, anything like that) have this feature somewhere because they all immediately encounter the problem that any new assertion about source code applied to code base even just two or three person-months large will immediately trigger vast swathes of code, and then immediately destroy their own market by being too scary to ever turn on. So it's a common problem with a fairly common solution. Just not always documented well.
[1]: Let me just grumble that in general coloration schemes should not try to "deprioritize" comments visually, but it is particularly a poor choice when the comments are the documentation in the most literal sense. I like my comment colors distinct, certainly, but not hidden.
Python linters have a one-step way to suppress all individual errors. I assumed a SaaS like Sourcegraph is the only solution to ensure a codebase doesnt become worse.
Honestly it would be better to bake in source control context so you can mark new code as more strict than legacy.
You can usually achieve this by adding ignore pragmas to your legacy warnings (although you need to touch that code). But at least that way, daily workflow will see errors and you can find the legacy errors by disabling the pragma.
This is awesome! I don't know your goals with this, but maybe opening the rule markdown files through GitHub to crowd source info would allow you to reduce the hard work of writing the rules.
It comes with the (possibly harder) hard work of managing an open source project though.
My first thought is dedicating an hour or two a month to reviewing, merging, and deploying, but not sure if that'd be accurate.
Already done. There’s a link on the homepage to the GitHub, and you can just add a new markdown file in the rules folder. It auto deploys on merge to master.
I want search engines to operate similar to this. Instead of using googles monolithic index, you can subscribe to different trusted sources for lists of sites that are curated and maintained. Then your personal search engines queries them all at once.
I think if you could balance the incentives right it would put the onus on the curators to make sure that their indexes were full of high quality sites. And if one starts giving you rubbish, just remove their index from your search engine.
It’s a color space designed to be perceptually uniform. So as you blend through colors the saturation appears to stay the same. Check some of the reds and greens in the other color spaces and see how they get really saturated.
Oh wow, this is the first internet baby tip that has actually worked. Our two year old would take 30 minutes of settling every night, with one of us in the room sitting in a chair. Tried this checking in every couple of minutes idea, and within a few days he only took 6 minutes and was relaxed the whole time. Thanks a bunch! Got any tips for when they wake up freaking out in the night?
Maybe even add a bookmark for it, filed under a new tag: bragging_rights ;-)
But please remember I did not come up with this, see sibling comment (pjgalbraith). It seems the method is called the Ferber method although I learned a modified version from what I found when I looked it up[1]: the way I learned it was to increase by two minutes each day, not more, ie first day 1 and then 3 minutes, second day 3 and then 5 minutes etc. I believe this will be even gentler and it has worked wonderfully for both children and adults.
Now to your question:
> Got any tips for when they wake up freaking out in the night?
Two things:
Once kids learn to associate bed with relaxing on their own they can often find their way back to sleep easily but not always.
My rule of thumb has been that if they have been asleep and wake up I walk in immediately as soon as I can so to make sure they aren't worried about being alone. Then it is up to ones judgment as a parent: if it is just old habits, start the countdown timer. If however they are scared (nightmares etc) stay a bit longer or if necessary take the child out of bed and hold them.
This is easier to judge if one arrive quickly because otherwise it is hard to know if they were scared when they woke up or if they became scared after thinking they were alone.
I think this speaks to how when learning a concept, just having it framed in the right way can really help.
I’d heard of the Ferber method before and we tried it a bit to no success. But just hearing the same idea framed as “the parent checking back in regular like a metronome”, rather than “the baby needs to learn to self settle” just clicked in my head.
Thanks for the tips, will keep trying this and see if it sorts out the late night wakes too.
Seems like you already have the most important part settled from the start: you care about the child :-)
And, since you mention it: like a metronome is a good way to think about it. I used to use a digital timer or a phone but anything with fine grained resolution is fine I think, the point seems to be to be predictable.
Also I try to remember to point out that I go back also if the kid doesn't cry.
Some people think if the kid is silent then they are about to fall asleep and we should not wake them.
In my experience if the child feels safe they fall asleep with no problems even if I walk in and out.
On the other hand, if they haven't fallen asleep that will teach them that if they don't cry I won't look after them, at least that is what I think.
My wife has been reading a book on mushroom foraging. This section on different types of mushroom poisoning was particularly terrifying.
Trichothecenes, symptoms: Multi-organ failure, which can commence soon after exposure (such as through drinking an infusion), particularly bone marrow failure and lamellar desquamation (shredding and reddening) of palms, soles of feet and face. Death may occur.
Agaricus Bisporus is indeed universally safe, and comes in large, small, brown and white varieties. The variety of flavors and textures that awaits the slightly more adventurous is a delight!
There are also other tasty cultivated mushrooms like shiitake! More expensive (at least in the US), but much cheaper than a visit to the emergency room after eating a dangerous wild mushroom...
They kept it really low level and didn’t make many opinions on how to join the dots. There are functions to manipulate data, functions to make scales, and functions to and functions to render svg (plus dom bindings). These decisions make individual charts quite verbose, but the trade off is you can visualise anything you want. Just look on npm how many charting libraries use d3 as a base.
This is true. We decided to use D3 directly to render charts at my job, and it was honestly kind of a terrible decision. Ideally you would use a library that uses D3 to render charts.
It's too low level. For reference, I just re-implemented the entire thing in React. just react, with svg elements directly. Not using D3 at all. And it was roughly the same level of effort.
edit: saying that D3 was a terrible choice is not saying that D3 itself is terrible. D3 is amazing. But before choosing it, you should know exactly what it is, and whether it helps in your specific use case.
I'm not sure how you'd implement scales, color theory, etc.. in React (a rendering library). There are a lot of useful parts of d3 which have nothing to do with rendering to the DOM. In fact, React and D3 complement each other quite well (maybe that is what you were saying?).
D3 is slightly more verbose than the one liners, but with that I get complete control over the scales and appearance of my chart. In addition it's trivial to combine multiple charts in a single diagram.
Out of interest, how did the performance compare between the React+SVG and D3 implementations? (and what sort of data size / structure were you working with?).
> D3 is amazing. But before choosing it, you should know exactly what it is, and whether it helps in your specific use case.
I agree. D3 is really great, but not always the most appropriate solution.
That's the idea when you're using D3 with React: React handles the DOM updates, D3 handles data wrangling and math. You said you reimplemented your charts in SVG directly – did you also reimplement scales, chart axis generation, d3-collections, d3-time, etc?
each D3 project is an entire application of its own
adding the “simple pie chart” to your view is not simple at all.
It needs independent UX planning, system architecture planning, and multiple sprints to implement
All the example code and prebuilt charts are outdated due to using old versions of D3 or other dependencies and essentially have to be rebuilt from scratch
All the example code and prebuilt charts are outdated due to using old versions of D3 or other dependencies and essentially have to be rebuilt from scratch
As part of moving them over to observable (which I'm not a fan of) the examples are being updated to use the v5 API.
I had the same experience. It started great when you just want a simple line chart, but when you need more and more features, it will be like creating tons of abstractions and writing a whole charting library ...
I was inspired by `tig` to make a tool to search your working directory for coverage reports and display it in the terminal. It only works right now on Istanbul reports but I'd like to add more types if possible.
reply