• 0 Posts
  • 22 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle



  • Your dad is right. On desktop, navigation is on the left. On tablet, you shrink it to a rail. On mobile it should be a dismissible nav drawer.

    The top menus, especially the flyover(on mouse hover), are bad for accessibility because they convert a non-committal action (hover) to a context changing one (focus). It’s a uniquely web-only invention and thankfully falling out of usage. (Unless you mean menubar/toolbar. Those are fine but extremely rare on Web.)








  • The problem is it’s a script that logs onto Haier’s servers with the user’s email and password and starts polling for data. Considering that most designed usage is probably based around users every once in a while checking and adjusting their thermostat, just one user with an HACS install doing a poll every minute is 1440x more usage than the next who checks it once a day. If HACS uses were the majority of traffic for these devices I wouldn’t be surprised by that metric.

    That’s what probably meant by the ToS because the users using it are probably violating it, and the addon can be considered as something that makes violating it easier (it doesn’t have a secondary purpose other than using a set of credentials that are only given after accepting the ToS).

    I’ve had crappy “Smart” ACs and Samsung was the absolute worst. At random times their AWS instance in Europe would go down or their app wouldn’t respond. I gave up and coded my own script to directly interface with the device over the local WiFi. You cut Samsung completely out of the equation. You don’t have to worry about their servers not working anymore. That’s an ideal way for an add-on to work. Ideally most of the script can be retuned to work directly with the device.


  • Different locations can have different CPC (cost-per-click) bid configured. Even if you have multiple locations of a business, it’s still managed per site. Different areas also have different CPC rates depending on who is around that location (not including your own businesses). For example, a metropolitan CPC rate is higher than a rural one because so many others compete with you.

    That 25 minute one is near a bunch of other stores and I’d bet has a higher CPC rate. The 2 minute one is more isolated.

    I checked and that all have about the same rating (3.5), so it shouldn’t have been ranked by that. In the end, Google isn’t picking what’s best for the consumer, and enough to encourage me to go 20 minutes extra out of my way. Them being all the same franchise helps clarify it isn’t an issue of finding a better search term match since they’re all identically labeled the same.




  • I just recently worked on fixed point 8.8 and basically the way fractional values work, you take an integer and say that integer is then divided by another one. So you represent the number in question with two numbers not one. 0.3 can be presented in a number of ways, like 30 % 10, or 6 % 20.

    The problem is the way 0.1 is represented and 0.2 represented don’t jive when you add them, so the compiler makes a fractional representation of 0.3 based on how 0.1 and 0.2 were expressed that just comes out weird.

    That’s also why 0.3 + 0.3 is fine. When you wrote 0.3, the compiler/runtime already knew how to express 0.3 without rounding errors.




  • I’ve been writing my own render framework and component library for about a year now.

    One thing I enjoy most about it is that the types are automatically inferred. There’s a lot of Typescript wrangling going on, and it gets really deep into what TS is capable of and barely capable of (polymorphic this, dynamic return types based on input, Class type reconstruction, mixins that influence both static and instance properties, event listeners based on event name, typed property watchers based on property name).

    It’s all written in JavaScript with “JSDocs”. It’s not really JSDocs because there’s a lot of recursion that’s not possible with regular JSDocs. It’s TS type information slipped into JSDoc comments.

    Ridiculously complex core Class

    But that is to setup the ability to tap into inferred types. The actual code that’s written (eg: components) is fully typed check with little or no type declaration.

    Declarative-style component with almost no explicit typing

    The reality is, no complex piece of code should be written without some form of type checking. TS isn’t perfect and if there were something better, I’d move. Alliances are stupid. There are problems with some things that have not been, and likely will never be, fixed. But what type-checkers should do best is infer types dynamically.

    The result means all my code today just runs in the browser. I don’t have to wrangle builders or compilers (bye Webpack!). At most, I use just esbuild to minify, though it’s an optional step, not a mandatory one. If I want to mess around on Codepen with my library, I can refer to a git commit directly and load the file. I don’t need npm to package and release. (CodePen Sample)


  • As a PocketPC (WinMo) user before the iPhone even existed, I take offense to the claim.

    They pioneered capacitive touchscreen for ease of use, but I had ditched dumb phones years before iPhone.

    Note XDA refers to the old Windows Mobile XDA phone and then became an Android community. I was there for that transition and none of us were very impressed with the iPhone, but understood that it would be something for the tech illiterate would eat up.

    When Android came out, we went from Custom Roms for WinMo to Custom ROMs for Android.