But your case is wrong anyways because i <= INT_MAX
will always be true, by definition. By your argument <
is actually better because it is consistent from < 0
to iterate 0 times to < INT_MAX
to iterate the maximum number of times. INT_MAX + 1
is the problem, not <
which is the standard to write for loops and the standard for a reason.
- 3 Posts
- 279 Comments
Huh?
I’ve used Vim for a decade and I would be offended if it made any noise.
kevincox@lemmy.mlto Technology@beehaw.org•Apple unveils new Mac Studio, the most powerful Mac ever2·4 months agoIs the limit 2 VMs or two macOS VMs? I thought it was technically a “licensing” restriction.
kevincox@lemmy.mlto No Stupid Questions@lemmy.world•Can I still consider myself a “young woman” after I turn 24? I turn 24 in March (next month).16·4 months agoYou can consider yourself whatever you want for however long you want.
If you feel young and people thing you are weird for saying so that is their problem. Young is a feeling not a number.
kevincox@lemmy.mlto Firefox@lemmy.ml•Has anyone seen Firefox raise all sticky footers like this?9·4 months agoFirefox on iPhone isn’t Firefox in the way that matters here. All iOS browsers are forced to use Safari’s rendering engine. iOS alternate browsers are just different UI and things like bookmark management on top of Safari.
kevincox@lemmy.mlto Selfhosted@lemmy.world•Which reverse proxy do you use/recommend?English4·4 months agoI’ve been using nginx forever. It works, I can do almost everything I want, even if more complex things sometimes require some contortions. I’m not sure I would pick it again if starting from scratch, but I have no problems that are worth switching for.
kevincox@lemmy.mlto No Stupid Questions@lemmy.world•What can I actually do with 64 GB or RAM?1·4 months agoIIUC it isn’t censored per se. Not like the web service that will retract a “bad” response. But the training data is heavily biased. And there may be some explicit training towards refusing answers to those questions.
This is a case of the streetlight effect. Evaluating the skills needed to do the job is very difficult in an interview setting, so most of the focus going on evaluating skills that are easy to evaluate in an interview (such as people skills).
It isn’t wrong, as all else being equal it is still better to hire the person with better skills that you can measure but obviously is not a strong evaluation of candidate quality.
#1 items should be backups. (Well maybe #2 so that you have something to back up, but don’t delete the source data until the backups are running.)
You need offsite backups, and ideally multiple locations.
IMHO Arch is actually a great choice. They do have a minimum update frequency you need to maintain (I don’t recall exactly, I think it is somewhere between 1 and 3 months) but if you do, and read the news before updates (and you are usually fine if you don’t, usually the update will just refuse to run until you intervene) things are pretty seamless. I had many arch machines running for >5 years with no issues and no reason to expect that it would change. This is many major version updates for other distros which are often not as seamless.
That being said I am on NixOS now which takes this to the next level, I am running nixos-unstable but thanks to the way NixOS is structured I don’t need to worry about any legacy cruft accumulating from the many years of updates.
And after all of that I don’t think it really matters. I think any major distro you pick, weather stable, release-based or LTS will be fine. They all have some sort of update path these days. (unlike in the past where some distros just recommended a re-install for major updates).
That’s true. And I’m not saying B2 is bad, it is just something that you should be aware of.
Their automatic replication isn’t quite as seamless as GCS or S3 though. For example deletes aren’t replicated so you will need a cleanup strategy. Plus once you 2x or 3x the price B2 isn’t as competitive on price. My point is that it is very easy to compare apples to oranges looking at cloud storage providers and it is important to be aware.
For me B2 is a great fit and I am happy with it, but I don’t wan to mislead peope.
I think it depends on your needs. IIUC their storage is “single location”. Like a very significant natural disaster could take it offline or maybe even lose it. Something like S3 or Google Cloud Storage (depending on which durability you select) is multi-location (as in significantly distinct geographical regions). So still very likely that you will never lose any data, but in the extreme cases potentially you could.
If I was storing my only copy of something it would matter a lot more (although even then you are best to store with multiple providers for social reasons, not just technical) but for a backup it is fine.
I’ve been using Restic to Backblaze B2.
I don’t really trust B2 that much (I think it is mostly a single-DC kind of storage) but it is reasonably priced and easy to use. Plus as long as their failures aren’t correlated with mine it should be fine.
kevincox@lemmy.mlto No Stupid Questions@lemmy.world•Why is daisychaining multiple extension cords considered unsafe, even if only done to the length of a standard cable?2·6 months agoThe circuit power doesn’t matter for the example. I was just picking easy numbers. You can have the same problem as long as the rating of the extension cord is less than the circuit breaker. (And as you pointed that out this is a very common case due to the frequently low rating of extension cords.)
kevincox@lemmy.mlto No Stupid Questions@lemmy.world•Why is daisychaining multiple extension cords considered unsafe, even if only done to the length of a standard cable?4·6 months agoYeah, there are two components here
- Adding extra length.
- Adding more outlets.
2 is the main problem, but you need a little of 1 to have it fail in an unsafe way (ie. not just tripping the circuit breaker).
If you just add a lot of extra outlets and plug lots of stuff in then you will simply trip the circuit breaker. (Assuming that everything is properly set up according to code.) In order to create a problem you need some extra wiring that is rated for less load than the wall wiring. (Now in practice every splitter has some amount of wiring, so these can be the same device, but most power bars are rated to be “fully used” or have a fuse internally). So the problem looks something like this:
- Have a 20A wall circuit.
- Plug a 10A extension cord into it.
- Plug a power bar or other splitter into the extension cord.
- Put enough devices into the splitter to generate 15A of current.
Now you are overloading the extension cord and risking fire.
kevincox@lemmy.mlto No Stupid Questions@lemmy.world•Why is daisychaining multiple extension cords considered unsafe, even if only done to the length of a standard cable?21·6 months agoYes, you will have double heat output due to twice the resistance which causes twice the voltage drop and more or less the same current. But this heat output is spread across twice as much wire, so unless the extension cables are coiled together on the ground each will heat up the same amount as a single one would.
kevincox@lemmy.mlto No Stupid Questions@lemmy.world•Why is daisychaining multiple extension cords considered unsafe, even if only done to the length of a standard cable?7·6 months agoTo clarify a bit, the benefit of the UK system isn’t the end device having a fuse, but the cable itself having a fuse.
In the US the setup would be something like
- Wall has 20A wiring.
- Electrical panel has 20A fuse to avoid the wire in the wall from overheating.
- Extension cord is designed for 10A
- You plug in 2 10A devices to the extension cord.
- The wall wiring is fine, it can take 20A.
- The circuit breaker doesn’t trip as it is also 20A.
- The extension cord overheats and starts a fire.
In the UK the 10A extension cord will have its own 10A fuse in the plug. So when you turn on the two 10A devices the fuse in the extension cord will blow and prevent the extension cord from overheating.
kevincox@lemmy.mlto No Stupid Questions@lemmy.world•Why is daisychaining multiple extension cords considered unsafe, even if only done to the length of a standard cable?53·6 months agoBut unless coiled up on the ground the longer cable also has more area to dissipate heat, so the longer cable doesn’t change anything here. The heat output will be consistent for any section of the cable no matter how much more cable there is on easier side of it.
The only think that the different resistance would affect is the voltage drop to the end device. But voltage drop varies wildly so you are unlikely to have a meaningful difference caused by a few extension cords (unless maybe you are already a bad case like an apartment building to start).
kevincox@lemmy.mlto No Stupid Questions@lemmy.world•Is it worth investing if I can only contribute $50 a month?8·6 months agoThe others have made great points about how any amount adds up. Especially with compounding.
But the most important reason me just be making it a habit. If you are saving $50/month you have a place to put your savings and an investment strategy for that money. The next time you get a pay raise or get rid of some recurring spend it will be natural to start saving $60/month, then $100 and more and more. It is much easier to improve an existing habit than starting a new one. So as soon as you have the chance start that got habit.
This is what I moved to after Gandi started becoming shit and I have nothing bad to say about them yet.