There are a gazillion settings and commands for everything now: you take any simple component, like "Search in files", and there are probably 200 settings to customize it, it didn't use to be that way. I do not like it and that was the main reason why I switched to VSC in the first place, instead of using a JetBrains product. I fully know and understand I could just ignore those and go on with my life, but I still do not like it.
I am a huge fan of minimalist products with a minimal set of configuration settings that I can fully master, and the "number of settings" is negatively correlated with me liking a given piece of software (the worst offender here being, I'd say, MS Outlook vs GMail). The difference between JetBrains and VSC is reducing at every release, and it is not a good thing for me.
I fully understand and appreciate it is a biased opinion, I am not looking to be convinced otherwise. It is the same reason why I shop at Trader Joe's and Costco, with their limited and curated availability of options, as opposed to Walmart or Safeway.
I guess I'm the foolish one, but I thought the title implied that the book was about algorithms you can use to make decisions, not decision making algorithms.
Algorithms To Live By is an amazing book. My favorite chapter was the one about sorting where the author comes to the same conclusion I did many years ago – do not sort your socks. It's a waste of time. Bucket them by type instead.
Thanks for the reco - this book looks very promising. <Added via Audible>
A personal deficit I have noticed in myself is .... not being able to commit to making a decision, because I think probabilistically - that I can see the other probabilities but have been recently using some shortcuts. I need more.
Spherical photos or videos are my favorite. Yes you have to put on Google cardboard or whatever to really experience it, but it brings the VR experience brings me back to the moment, mentally, in a way that pictures can't.
We had the old essential phone, with the spherical camera attachment, and used the hell out of it. I still go back and watch those old videos. Venice in the snow was absolutely amazing.
I need to get another spherical camera ASAP, now that traveling is possible again.
I implemented a policy of "loom video, for all PR", at my last company.
Every video should include: an explanation of the problem, a walkthrough of the patch, a recording of the result.
PRs never sat long, because the willpower it took to understand the problem, the solution, and how to replicate/test manually (if you feel that necessary) was drastically reduced.
It shifts the burden of extra work to the requestor, who has motivation to get things merged.
Additionally, git blame became infinitely more useful.
We do this as well for anything that touches the UI, and oh my god has it made it easier for me to approve things (or deny them) when it's a bunch of UI stuff
I like this. We also strongly suggest that engineers do PRs first thing in the day. This has the benefit of minimizing interruptions, and a daily cadence to PRs is typically pretty good. Basically, interrupting your work to do PRs is generally bad. So that basically leaves the beginning of the day, right after a big interruption. (we try to not be religious about this though)
I've started pushing back on changes that don't start with a narrated video discussing the changes against current production. I wanted them to supply the page, element, and change description, but video just works better for them.
That's actually more or less how DRY is described in The Pragmatic Programmer (20th anniversary edition):
> Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
Further on:
> Dry is about the duplication of knowledge, of intent. It's about expressing the same thing in two different places, possibly in two totally different ways. [emphasis in original]
And the next paragraph:
> Here's the acid test: when some single facet of the code has to change, do you find yourself making that change in multiple places, and in multiple different formats? Do you have to change code and documentation, or a database schema and a structure that holds it, or...? If so, your code isn't DRY.
Early in my career, a co-worker and I developed the habit, when a bug was fixed, of asking each other "Did you fix it everywhere?"
But that's the problem right there. Why is there more than one place to fix it?
(Now, sure, if you're using a function call wrong, you need to fix it everywhere you call that function, and it's fine that there are multiple such places. That's what functions are for. But if it's something like how a value is calculated... why is there more than one place that calculates the value?)
Related tangent: "AHA" (Avoid Hasty Abstractions) is a decent counter to the over-application of DRY. IME, people reach for DRY too quickly, at the expense of other worthy but more subtle principles.
I think the old "remove duplication the third time you write it" is bad advice as well, to be honest.
First off, it excuses some really egregious behaviour like copying entire large chunks of code representing an identical concept just because "I haven't copied it twice yet". I've seen an entire controller and all related views copied wholesale because it needed to be placed in another area of the app (with identical visual and functional requirements)
Secondly, if the code is only incidentally identical, even 3 times isn't enough to say that you should apply DRY. 3 independent concepts that happen to currently share implementation still shouldn't be deduplicated. I think a great example of this is the inherited resources gem in rails that implements a "standard" interpretation of controller actions - which works well at first until your controllers need to do something other than basic CRUD. The fact that say, an update action handles parameters and saving in the same way as some other update action may currently be true, but is not at all guaranteed to be true in the future, even if you have 100 update actions in your app.
If you know what application you are writing, there is absolutely no reason to do WET. You should always know if some code repetition is real or accidental.
But we don't always know what application we are writing.
I've pointed out in the past that if the characters you're deduplicating don't actually have the same meaning, you're just compressing your code; I've been trying to popularize labelling that kind of aggressive misapplication of DRY "Huffman coding".
On the other hand, if you keep repeating the same character sequence there is probably some structure on your code that you can also abstract away. You are not restricted to factoring business concepts.
There's clearly structure you can abstract away; doing so may be convenient, and that convenience may even make it a good idea. I contend, though, that if it does not represent a "piece of knowledge" that you're factoring out then you are dealing with concerns other than "DRY".
I do agree that a piece of knowledge may not be a business concept.
Linux for laptop just isn't great in my experience. My desktop is Linux, and all is well.
But on all my laptops, I find things to just be to much of a PITA. Eg: hibernate, is way too buggy to depend on. Half the time something prevents hibernate, and my laptop is dead and/or over heated when I pull it out of my bag. The other half the time everything is bugged out when it comes out of hibernate.
I found that when I'm traveling, I'm happier with a very underpowered laptop, which has great battery life. I don't even use wsl. GitHub codespaces has been working well enough.
All these reports would be useful with the maker and model of the affected laptop. I tend to pick the boring models and they mostly work, but knowing which ones work so badly (like the XPS 13 people mention) would be extremely helpful.
Nice, I bookmarked your site. Weather data is surprisingly hard to navigate. Did you source it from NOAA.gov or somewhere else?
I tried to slap together a simple weekend app based on historical weather data by zip code, and never even got to the coding. Just spent most the weekend trying to decipher those API's.
Some if the comments here are way over the top IMO. Like a full time DevOps person went solo and spent a few weeks setting up their perfect deployment process.
If we're talking a plain saas type deal, I'd keep it simple, elastic bean stalk, or use a heroku or render.com like setup until you grow to the point of hiring a team. If it's just a basic saas, I don't see how a 1 man team could really out grow this setup. I've seen 100 person teams using heroku.
K8s is just way too much work. Even cloud formation is to much for my tiny show.
Use the automated backups setup by your host for your db. If you need to roll back, just redeploy your previous git hash. I typically use GitHub actions to deploy, so rolling back is just a matter of force pushing the prod branch to the sha I want to deploy
Skip micro services, they are too much work for a small time thing, and don't really provide much benefit.