9,763 karma · joined Mar 4, 2015 (11y ago) · 1,712 submissions
comment 3y ago · link · parent
I use the temperature knob pretty much exclusively. If it's hot, the A/C comes on. If it's cold, it doesn't. If the windshield needs defrosting, you press that button and.. it defrosts, then press "auto" to get back. I've literally never manually changed the A/C setting, and once or maybe twice in 5 years of ownership have I manually adjusted vents.
The (physical) recirculate button is occasionally useful to manually if you're driving through dust/smoke/smell. But I'll also note the use of this with A/C is automatic: if it's really hot out or you turn the temp down really low, it'll automatically turn on recirculate (so it's cooling the already-cool inside air), but if it's able to use outside fresh air it'll do that instead. This is another thing that Just Works and I basically don't have to think about.
Remote start is similarly smart: When it's cold out, it turns on the defrost and heats the seats up. When it's hot, it runs the A/C. Either way when you get in it's usually already comfortable and it resumes whatever mode and temperature it was set to last time you drove -- and on only a mildly warm day, that might mean A/C isn't on. Manual control of A/C is just something you never need to do.
Sorry, but Honda absolutely nailed it on their climate control.
The lack of a physical volume knob, on the other hand...
comment 3y ago · link · parent
In my house, there's large south-facing windows that let in a lot of sun, and for a lot of the year the north side of the house will be several degrees cooler than the south. I was constantly battling how to set the thermostat, especially to keep the upstairs a decent temperature at night.
The Ecobee 100% solved that: at night the upstairs room sensors control temp, while during the day mostly the main floor does. No guessing: it just works regardless of how sunny it was that day. It would be hard to give that feature up.
Another handy feature which I didn't realize until owning it is the "min fan runtime per hour". Even set to 20 mins, this helped drastically with evening out the temperatures throughout the house.
There's already a thread about an open, local API, and I'd mirror that here. The Ecobee isn't open+local, but if they were to go under (or do something stupid like block HomeAssistant), it's $$$ to rip it out and switch to something else. When we're talking about a $$,$$$ system I wouldn't even consider it without a company committed to providing a proper local API -- including that it won't disappear in an over-the-air firmware update.
comment 3y ago · link · parent
The guy that ran a computer shop I used to frequent was an ex-Bell tech, and taught me about using flush-cut snips exactly to avoid this. They've been a part of my toolbox ever since. They're also my go-to cutting tool when working on small electronics.
comment 3y ago · link · parent
Ie: Do you just manually reapply your changes every time? Or just do in-place upgrade and then snapshot that?
Personally, by the second time I did this, I'd be writing a script. Then I'd want to script the running of the script.. and before you know it you end up with a framework..
comment 3y ago · link · parent
In C# the idiomatic way would be to have each of these 3 things be defined in a class using IDisposable, which is similar to D's scope() -- the declaring class gets a cleanup method when the variable goes out of scope, no matter how that happens.
I assume there's some interaction between these classes, but IMHO that should be explicitly defined and so the code would look something like:
public void foo(int bar) {
using var something = new Something(bar)
if (something.do()) {
using var stuff = new Stuff(bar);
if (stuff.init()) {
using var stuff2 = new Stuff2(bar); // two "stuff"s looks dumb but this is example code
if (stuff2.prepare()) {
return do_the_thing(something, stuff, stuff2, bar);
}
}
}
return null;
}
There's actually several ways to structure this code which would result in something that looks better than the above, but being example code and not knowing how `something` and `stuff` interact, it's hard to write this nicely. I'd probably aim for something much more concise like: public void foo(int bar) {
using var something = new Something(bar);
using var stuff = new Stuff(something);
using var stuff2 = new Stuff2(stuff);
return stuff2.prepare() ? do_the_thing(stuff2) : null;
}
In the above, I assume stuff2.prepare() calls everything it needs to on the dependent objects, but how I'd structure this for real entirely depends on what they're actually doing.comment 3y ago · link · parent
I'd argue it doesn't, really. GPL means it can only be used in software released under the GPL, or any network software (ie: web application) including proprietary.
Specifically, a proprietary vendor can use and/or modify your GPL-licensed library on their server-side application and is not obligated under the terms of GPL to release any changes, so long as they never distribute the app.
I'd argue using GPL for libraries is a good way to not get much usage. Every place I've ever worked has avoided GPL like the plague -- for startups it's a barrier to pivoting (eg: selling an on-prem version) and more importantly to being acquired, and any bigger companies have policy around it.
On a personal level I also tend to avoid it unless it's either the only choice, or I want or already have released under the GPL.
In general, given two library choices where one GPL and the other is MIT, I'm an order-of-magnitude more likely to pick the MIT one, even if it's lacking features compared to the GPL one, and even contribute the missing features. I suspect I'm not alone in this.
comment 3y ago · link · parent
Where does that expectation come from, exactly? The name?
The pricing page is clearly and explicitly all about pages per month [1].
> It's prepaid, but with an automatic recharge of 8€/month. Money that's not used stays on the card, forever.
So you're comparing a different type of plan here.
Prepaid mobile plans like this are akin to Amazon's "subscribe and save" program: they'll charge and send you a cartridge on whatever frequency you like, regardless of usage. Choose too frequent and you'll amass as huge stockpile; too infrequent and you'll run out of ink.
Instant Ink is like 'regular' mobile plans: you get x GB per month for a certain price. If you cancel your plan, even though you only used 5% of your data for that month, you don't get to continue your plan.
HP's FAQ even say this [2]:
> If you decide to cancel your HP Instant Ink, you can go back to using HP original Standard or XL cartridges. HP Instant Ink cartridges will not work after the end of the current billing cycle in which you cancel. To continue printing after your billing cycle ends, make sure you have standard replacement ink cartridges ready to use in your printer.
The alternative to all this is to just buy regular cartridges as you need them.
[1] https://instantink.hpconnected.com/sg/en/l/v2?jumpid=af_e1d0...
[2] https://www.hp.com/us-en/printers/instant-ink/faq.html#:~:te...
comment 3y ago · link · parent
I ran MythTV on a PC connected to my TV for a while, but when I wanted to add a second TV I had a really hard time getting a decent fanless client at a reasonable cost (this was mid/late 2000's). I ended up switching to SageTV purely for the hardware client.
A year or so after SageTV was acquired, I moved to Plex. The biggest miss was the hardware client. I went through several sub-par iterations of PC-based hardware -- including mini-ITX PCs and Raspberry Pi -- but never got a setup that could run Plex, Youtube and Netflix and work 100% without a keyboard/mouse involved. I also tried some hardware -- Roku, original Chromecast -- but nothing was even remotely good as the SageTV HD300's, even years later.
Until I found the Nvidia Shield -- though it's more Google TV doing the real magic, I think. I still have the original 2015 model in my living room, still working perfectly. My newer "media room" TV uses built-in Google TV stuff -- I originally intended to use the Shield but it requires upgrading my just-before-4K-came-out AVR to be able to do 4k, so this setup was simpler. I also have a cheap "Chromcast with Google TV" on an old smaller set in front of my treadmill.
Over the past few years, I have all but stopped using Plex, though, as we went to pretty much 100% streaming services, but it is still running.
It's really thanks to MythTV, though, that I started down this path 15+ years ago. I've never had a cable/satellite TV subscription in my name, ever. It's interesting now to look back, because all my media sources have entirely changed since I started. I do still have everything needed for OTA in a box somewhere, but I never hooked it up in this house -- maybe it's time to give it a shot again.
comment 3y ago · link · parent
All of this was being handled by the billing dept using a combination of the accounting software, spreadsheets, and manual effort (ie: insane). No one actually realized we had this many SKUs until we started technical requirements gathering.
What was happening was sales had some freedom to write terms, and so write terms they did. Things like "price per month is $x as long as there are y things after 6 months, otherwise the price is $z", "$x for the first 1000 things, $z for the next 5000, etc" or "$x per quarter in advance with a minimum of $y", exactly as stated in the post above. Billing in advance was one of the worst: it required manual adjustment afterwards to reconcile with reality, while dealing with minimums and date-limited exceptions.
On top of that, there were 6 different ways of even counting "things monitored" since it could vary, including: peak distinct per month, peak concurrent per month, # at the end of billing cycle (sometimes calendar month, sometimes anniversary day). And for very old plans, it could just be a fixed # written in the contract (which was also a max enforced in software).
Any one or two of these isn't a huge deal, but it was the combinations that was killer, especially since it was very much a long-tail: most of the SKUs only had a small number of customers, and many had 1 (though some of these were the biggest customers). To automate billing, we'd have to implement and test each, of course.
Billing found this tedious but just accepted this as the way things were. Sales just did what they'd always done. C-suite was happy we were growing. The meeting where we presented the 80 SKUs to the CEO and CFO was definitely an interesting one - they were ultimately responsible for approving all the deals that caused this mess, but were also who asked us to automate billing. The entire project was put on hold to first migrate down to a much smaller number of plans, and that's when my involvement stopped (It was deemed more cost effective to continue billing manually than to divert the dev team to spend the time on this). I don't know how far along they got.
My take-away was to at least think about automating billing early, just to avoid this explosion of SKUs problem.
comment 3y ago · link · parent
* Wifi reconnect
* Mqtt (and HomeAssistant) integration, with reconnect
* Hotspot (initial configuration) support
* Tons of hardware devices supported
* Even for basic digital io, there's nice quality of life things a line of yaml away: debounce, internal pullup, invert..
Basically by my second or third experiment I found myself starting to build more reusable libraries to do stuff like wifi+mqtt reconnect. Thought "someone must have done this before" and found "Yes, plus went 1000 miles further and built EspHome"
comment 3y ago · link · parent
I think there's nearly always value to be added:
* Explaining required fields, if null/blank/0 is allowed, where an ID comes from (db vs app-generated), if string values are formatted or require formatting (credit card, phone numbers), max length or other restrictions
* If a class/method is thread-safe or not (when not obvious and misuse is dangerous), error conditions, timeouts.
* Any external or indirect dependencies for use (config, packages, etc)
* Links to other docs/wikis or tickets is hugely useful.
When you're writing/working on the code you already know all this stuff, and it takes only a couple minutes to document. When someone else (or you, 6 months later) comes along to use or modify it, figuring everything out from scratch can take hours -- or worse, bug reports from QA or customers. Docs shave this down to seconds and directly avoid bugs.
The other huge benefit I often experience is through trying to write docs for something I realize there's a better, more obvious name that makes it easier to use and requires less explanation (less docs). This happens on easily 5-10% of the things I write docs for.
comment 3y ago · link · parent
What is the phone number for? When I read it, is it ready for display as-is or should I be formatting it? Same question when I set it. Can it be null or empty? Does or can the system use this number for anything - such as sending SMS messages?
Being static is a huge red flag, though, and even though it's private I'd still ask. Why is it static? Is this thread-safe (and how)? What context does it get set in, and when can I use it?
comment 3y ago · link · parent
comment 3y ago · link · parent
Though that site is likely also storing the TOTP shared secret in plaintext, beside the password, making it pretty much pointless. If the site itself is compromised, it's hard to come back from that.
Pretty much the best thing you can do is never re-use passwords across sites.
comment 3y ago · link · parent
I think experienced users use the common git workflows, which usually avoids this situation.
But, FWIW, this is a litmus test for me of one's true git prowess. Merge commits like "Merged origin/master into master" tell me the user doesn't know how to use git (as in: doesn't know how to rebase).
If you know how to rebase, I don't know why you wouldn't have this set by default, because undoing it if it accidentally happens is more work -- and requires rebasing anyway.
comment 3y ago · link · parent
It only takes effect when you are both behind AND ahead of the remote (as in: you have local unpushed commits, and there are remote commits you don't have).
It pulls the remote commits first, then rebases your commits using those as a base.
You are left with a repository where you are ahead of remote, and can just push your commits normally.
Only your local history is affected (insofar as your hashes will change).
comment 3y ago · link · parent
git config --global pull.rebase true
I understand why this isn't the "safe" default option.. but at the same time, it's the sane default option for anyone working with others. Maybe it would make more sense for the default to be a prompt: "Your local and upstream both have changes: do you want to rebase (replay) your work on top or generate a noisy merge commit?"Luckily in many of the common usages (git flow, github flow, scaled trunk-based development) where developers are doing actual work on independent branches and merging via pull requests, this doesn't happen often.
comment 3y ago · link · parent
Simply put, you make an algorithm like:
let hash = md5(filename)
let folderPath = path.join(root, hash.substr(0,1), hash.substr(0,2), hash.substr(0,3), filename)
The original name can be used to derive the sharded path, so you don't need a lookup database or anything crazy like that.You end up storing files like:
.../7/7f/7fa/somefile.png
This scales to whatever depth you want: with 3 levels and 1.2 million files, you can expect about 1200000/16^3 = 293 files per directory, which is trivial.There's lots of other strategies, too, depending on your needs:
# filename are already GUIDs or hashes:
.../1/1f/1fd/1fd2dd27-d307-47b2-b37d-11903fd0f03d.png
# date-based to make cleaning up old files easy:
.../2023/01/19/app.log
# hash by existing numeric identifier (like customerid) using modulus:
.../customers/4/94/52194/customerfile.datcomment 3y ago · link · parent
I think it shows something different from that: "the stunt you saw was real". As in: there were no wires, camera tricks, editing, or visual or special effects. Just someone extremely disciplined and good at what they do, trying many times to get it perfect.
I don't think the only thing preventing people who watch his movies thinking they could fight a gang of people using a 10'step ladder [1] is the blooper real..
comment 3y ago · link · parent
Many people, even those that were "top students" in other STEM classes, complained about how hard his tests were. As someone terrible at memorizing, I not only enjoyed the challenge but aced that course, despite not really being that interested in chemistry.
The remainder of high school and a lot of university was just memorization. If you knew the formula you could do great, but I had such a hard time remembering that type of detail. I did ok, but on many occasions I remember wishing more courses were like that Chem class, and it still stands out over 20 years later.
comment 3y ago · link · parent
comment 3y ago · link · parent
1. Your evaluation can be interactive: you're watching them step through, can stop and ask questions about their thought process, etc. If it's a theoretical problem (ie: not on a live computer) you can even re-calibrate on-the-fly if they're really quick (maybe a lucky guess) at narrowing down the issue, or just asking "what if this happened instead, what would you do?"
2. Grading the candidate is subjective, just like the rest of the interview process.
The OP was talking in the context of college-style evaluation. I don't think you can apply either of these things to grading someone in a course. (1) doesn't scale, and (2) isn't a fair (or unbiased) way to evaluate students.
comment 3y ago · link · parent
Maybe there are multiple DNS servers for the zone that are returning different IPs, maybe one or both of them is even in split-zone configuration so it returns a different IP depending on if you're internal or external. Maybe the client has manual DNS configured or a hosts entry that's wrong.
Each of these problems would have several more layers of troubleshooting steps and branching, and it's not even a complete list -- and this is only if the problem is DNS-centric! There's hundreds of other branches for each of the other problem categories.
comment 3y ago · link · parent
Often debugging is a hunch, and quickly branches. One person will go down the path of trying the same site from another PC. Another will try a different site from the same browser/PC. Another will try to ping the server.
If you're running this live you're always going to have the chance where someone's hunch or first try basically pinpoints the problem and eliminates a dozen checks from their consideration. If you're looking for things like "did they check DNS? Did they try another site?" but they skipped that and immediately figured out apache wasn't running, do they lose points? Or do they get 100% for their lucky (and/or experienced) guess?
If you do it on paper, the major problem is basically infinite branching for every step and possible result. How do you mark that? What's the minimum you need to do to get 100%? I think it's also unfair, because even as a seasoned vet I've been deep in troubleshooting to the point of (for example) greping source of nginx for a specific error message -- which I'd never have even thought of two steps earlier. I do t expect anything that complex on a school test of course, but the point is the result of each step is often the only way to even think of the next.
comment 3y ago · link · parent
The question is does the SHA1 step make this any easier?
Don't you still have to either break SHA256 (predicting the hash it will generate) or do this by brute force?