Threads for hufman

  1. 14

    I’m very curious how these companies address the fact that there are countries where smartphones are not universally owned (because of cost, or lack of physical security for personal belongings).

    1. 8

      At least Microsoft has multiple paths for 2FA - an app, or a text sent to a number. It’s hard to imagine them going all in on “just” FIDO.

      Now, as to whether companies should support these people - from a purely money-making perspective, if your customers cannot afford a smartphone, maybe they’re not worth that much as customers?

      A bigger issue is if public services are tied to something like this, but in that case, subsidizing smartphone use is an option.

      1. 24

        if your customers cannot afford a smartphone, maybe they’re not worth that much as customers?

        I had a longer post typed out and I don’t think at all you meant this but at a certain point we need to not think of people as simply customers and begin to think that we’re taking over functions typically subsidized or heavily regulated by the government like phones or mail. It was not that long ago that you probably could share a phone line (telcos which were heavily regulated) with family members or friends when looking for a job or to be contacted about something. Or pay bills using the heavily subsidized USPS. Or grab a paper to go through classifieds to find a job.

        Now you need LinkedIn/Indeed, an email address, Internet, your own smartphone, etc. to do anything from paying bills to getting a job. So sure if you’re making a throwaway clickbait game you probably don’t need to care about this.

        But even this very website, do we want someone who is not doing so well financially to be deprived of keeping up with news on their industry or someone too young to have a cellphone from participating? I don’t think it is a god-given right but the more people are not given access to things you or I have access to, the greater the divide becomes. Someone who might have a laptop, no Internet, but have the ability to borrow a neighbor’s wifi. Similarly a family of four might not have a cell phone for every family member.

        I could go on but like discrimination or dealing with people of various disabilities it is something that’s really easy to forget.

        1. 15

          I should have been clearer. The statement was a rhetorical statement of opinion, not an endorsement.

          Viewing users as customers excludes a huge number of people, not just those too poor to have a computer/smartphone, but also people with disabilities who are simply too few to economically cater to. That’s why governments need to step in with laws and regulations to ensure equal access.

          1. 11

            I think governments often think about this kind of accessibility requirement exactly the wrong way around. Ten or so years ago, I looked at the costs that were being passed onto businesses and community groups to make building wheelchair accessible. It was significantly less than the cost of buying everyone with limited mobility a motorised wheelchair capable of climbing stairs, even including the fact that those were barely out of prototype and had a cost that reflected the need to recoup the R&D investment. If the money spent on wheelchair ramps had been invested in a mix of R&D and purchasing of external prosthetics, we would have spent the same amount and the folks currently in wheelchairs would be fighting crime in their robot exoskeletons. Well, maybe not the last bit.

            Similarly, the wholesale cost of a device capable of acting as a U2F device is <$5. The wholesale cost of a smartphone capable of running banking apps is around $20-30 in bulk. The cost for a government to provide one to everyone in a country is likely to be less than the cost of making sure that government services are accessible by people without such a device, let alone the cost to all businesses wanting to operate in the country.

            TL;DR: Raising people above the poverty line is often cheaper than ensuring that things are usable by people below it.

            1. 12

              Wheelchair ramps help others than those in wheelchairs - people pushing prams/strollers, movers, emergency responders, people using Zimmer frames… as the population ages (in developed countries) they will only become more relevant.

              That said, I fully support the development of powered exoskeletons to all who need or want them.

              1. 8

                The biggest and most expensive problem around wheelchairs is not ramps, it’s turn space and door sizes. A wheelchair is broader (especially the battery-driven ones you are referring to) and needs more space to turn around than a standing human. Older buildings often have too narrow pathways and doors.

                Second, all wheelchairs and exoskeletons here would need to be custom, making them inappropriate for short term disability or smaller issues like walking problems that only need crutches. All that while changing the building (or building it right in the first place) is as close to a one-size-fits-all solution as it gets.

                1. 5

                  I would love it if the government would buy me a robo-stroller, but until then, I would settle for consistent curb cuts on the sidewalks near my house. At this point, I know where the curb cuts are and are not, but it’s a pain to have to know which streets I can or can’t go down easily.

                2. 7

                  That’s a good point, though I think there are other, non-monetary concerns that may need to be taken into account as well. Taking smartphones for example, even if given out free by the government, some people might not be real keen on being effectively forced to own a device that reports their every move to who-knows-how-many advertisers, data brokers, etc. Sure, ideally we’d solve that problem with some appropriate regulations too, but that’s of course its own whole giant can of worms…

                  1. 2

                    The US government will already buy a low cost cellphone for you. One showed up at my house due to some mistake in shipping address. I tried to send it back, but couldn’t figure out how. It was an ancient Android phone that couldn’t do modern TLS, so it was basically only usable for calls and texting.

                    1. 2

                      Jokes aside - it is basically a requirement in a certain country I am from; if you get infected by Covid you get processed by system and outdoors cameras monitor so you don’t go outside, but to be completely sure you’re staying at home during recovery it is mandatory to install a government-issued application on your cellphone/tablet that tracks your movement. Also some official check ups on you with videocalls in said app to verify your location as well several times per day at random hours.

                      If you fail to respond in time or geolocation shows you left your apartments you’ll automatically get a hefty fine.

                      Now, you say, it is possible to just tell them “I don’t own a smartphone” - you’ll get cheap but working government-issued android tablet, or at least you’re supposed to; as lots of other things “the severity of that laws is being compensated by their optionality” so quite often devices don’t get delivered at all.

                      By law you cannot decline the device - you’ll get fined or they promise to bring you to hospital as mandatory measure.

                  2. 7

                    Thank you very much for this comment. I live in a country where “it is expected” to have a smartphone. The government is making everything into apps which are only available on Apple Appstore or Google Play. Since I am on social welfare I cannot afford a new smartphone every 3-5 years and old ones are not supported either by the appstores or by the apps themselves.

                    I have a feeling of being pushed out by society due to my lack of money. Thus I can relate to people in similar positions (larger families with low incomes etc.).

                    I would really like more people to consider that not everybody has access to new smartphones or even a computer at home.

                    I believe the Internet should be for everyone not just people who are doing well.

                3. 6

                  If you don’t own a smartphone, why would you own a computer? Computers are optional supplements to phones. Phones are the essential technology. Yes, there are weirdos like us who may choose to own a computer but not a smartphone for ideological reasons, but that’s a deliberate choice, not an economic one.

                  1. 7

                    In the U.S., there are public libraries where one can use a computer. In China, cheap internet cafés are common. If computer-providing places like these are available to non-smartphone-users, that could justify services building support for computer users.

                    1. 1

                      In my experience growing up in a low income part of the US, most people there now only have smartphones. There most folks use laptops in office or school settings. It remains a difficulty for those going to college or getting office jobs. It was the same when I was growing up there except there were no smartphones, so folks had flip phones. Parents often try and save up to buy their children nice smartphones.

                      I can’t say this is true across the US, but for where I grew up at least it is.

                      1. 1

                        That’s a good point, although it’s my understanding that in China you need some kind of government ID to log into the computers. Seems like the government ID could be made to work as a FIDO key.

                        Part of the reason a lot of people don’t have a computer nowadays is that if you really, really need to use one to do something, you can go to the library to do it. I wonder though if the library will need to start offering smartphone loans next.

                      2. 5

                        How are phones the “essential technology”? A flip phone is 100% acceptable these days if you just have a computer. There is nothing about a smartphone that’s required to exist, let alone survive.

                        A computer, on the other hand, (which a smart phone is a poor approximation of), is borderline required to access crucial services outside of phone calls and direct visits. “Essential technology” is not a smartphone.

                        1. 2

                          There’s very little I can only do on a computer (outside work) that I can’t do on a phone. IRC and image editing, basically. Also editing blog posts because I do that in the shell.

                          I am comfortable travelling to foreign lands with only a phone, and relying on it for maps, calls, hotel reservations, reading books, listening to music…

                          1. 1

                            The flip phones all phased out years ago. I have friends who deliberately use flip phones. It is very difficult to do unless you are ideologically committed to it.

                          2. 3

                            I’m curious about your region/job/living situation, and what about is making phones “the essential technology”? I barely need a phone to begin with, not to mention a smartphone. It’s really only good as a car navigation and an alarm clock to me.

                            1. 1

                              People need to other people to live. Most other people communicate via phone.

                              1. 1

                                It’s hardly “via phone” if it’s Signal/Telegram/FB/WhatsApp or some other flavor of the week instant messenger. You can communicate with them on your PC just as well.

                                1. 4

                                  I mean I guess so? I’m describing how low income people in the US actually live, not judging whether it makes sense. Maybe they should all buy used Chromebooks and leech Wi-Fi from coffee shops. But they don’t. They have cheap smartphones and prepaid cards.

                                  1. 2

                                    You can not connect to WhatsApp via the web interface without a smartphone running the WhatsApp app, and Signal (which does not have this limitation) requires a smartphone as the primary key with the desktop app only acting as a subkey. I think Telegram also requires a smartphone app for initial provisioning.

                                    I think an Android Emulator might be enough, if you can manually relay the SMS code from a flip phone, maybe.

                              2. 2

                                You’re reasoning is logical if you’re presented a budget and asked what to buy. Purchasing does not happen in a vacuum. You may inherit a laptop, borrow a laptop, no longer afford a month to month cell phone bill, etc. Laptops also have a much longer life cycle than phones.

                                1. 4

                                  I’m not arguing that this is good, bad, or whatever. It’s just a fact that in the USA today if you are a low income person, you have a smartphone and not a personal computer.

                            1. 3

                              Okay but what a fun website

                              1. 2

                                agreed! his youtube channel is worth checking out as well, i really enjoy his musical escapades like the MIDI Music Box and slide whistle.

                                1. 2

                                  Well I’ll have you know that I lost my entire afternoon and evening to watching this fellow, completely entranced; Thank you!

                                  1. 1

                                    Same! What a treasure trove. Fab :-)

                              1. 33

                                I particularly enjoy the Change In/Around commands: ci" replaces the inside of whatever double-quoted text block you are in, ca' replaces the single-quoted text block including the quote characters, and there are variants for various brackets, braces, parens, and paragraphs!

                                1. 14

                                  another fun fact about ci” is that you don’t even need to be inside a double quoted string or whatever… it will go from where you are on the line to the next double quoted string and let you change that.

                                  so ci” on this at the | :

                                  lor|em “ipsum” foo bar

                                  would change it to this with you being in insert mode

                                  lorem “|” foo bar

                                  1. 12

                                    Best paired (…) with https://github.com/tpope/vim-surround which is the first plugin I miss on a fresh installation of vim.

                                    1. 8

                                      See :h text-objects for more details. You can also create your own using omap.

                                      1. 3

                                        I think this is a great introduction to writing your own text objects:

                                        https://web.archive.org/web/20201108142554/https://vimways.org/2018/transactions-pending (web archive link because the site currently has an out-of-date certificate)

                                        I mention is below, but kana’s vim-textobj-user is also very helpful.

                                      2. 2

                                        If you like text objects, I definitely recommend checking out these. (People may already know about them, but just in case…)

                                        1. 2

                                          Oh wow, I always used ct" or xcf", but those obviously only work from the beginning of the block. These are great!

                                          1. 1

                                            Yup, we should learn about text objects sooner rather than later and hen get the kana/textobj-user plugin which will also give you a whole set of new text objects to play with. There are also alternate approaches like targets.vim.

                                          1. 27

                                            The author points to an anecdote about learning a language with an IDE vs without, and I have an anecdote to share about this exact scenario! I tried doing Advent of Code 2020 as a way to learn Rust, and I specifically used vi without crutches to Learn It Better, but all it did was frustrate me with errors until I gave up on Day 6. For AoC2021, I used IDEA and made it to the end, more successfully learning Rust and its common idioms than by fumbling through the compiler loop and getting frustrated.

                                            1. 3

                                              Good way to overcome that frustration is to learn by building an actual service or app, if possible. The end makes the means more tolerable. Then you get the hang of it and the means sorta become an end in itself. Virtuous cycle

                                            1. 7

                                              If the compiler use-case is targeting a terminal, an option might be to use ANSI escapes to temporarily switch the output to transparent foreground then draw the starting text of the previous line up to the error column, then revert back to the default foreground to print the error. Super cheating, however!

                                              1. 22

                                                (context: I’ve used Go in production for about a year, and am neither a lover nor hater of the language, though I began as a hater.)

                                                With that said, my take on the article is:

                                                1. The “order dependence” problem is a non-problem. It doesn’t come up that often, dealing with it easy – this is simply low-priority stuff. If I wanted to mention it, it would be as an ergonomic nitpick.
                                                2. The infamous Go error handling bloat, while annoying to look at, has the great benefit of honesty and explicitness: You have to document your errors as part of your interface, and you have to explicitly deal with any error-producing code you use. Despite personally really caring about aesthetics and hygiene – and disliking the bloat like the author – I’ll still take this tradeoff. I also work in ruby, and while raising errors allows you to avoid this boilerplate, it also introduces a hidden, implicit part of your interface, which is worse.

                                                It’s also worth pointing out Rob Pike’s Errors are Values which offers advice for mitigating this kind of boilerplate in some situations.

                                                1. 22

                                                  There’s a difference between explicitness and pointless tediousness.

                                                  Go’s error handling is more structured compared to error handling in C, and more explicit and controllable compared to unchecked exceptions in C++ and similar languages. But that’s a very low bar now.

                                                  Once you get a taste of error handling via sum types (generic enums with values), you can see you can have the cake and eat it too. You can have very explicit error documentation (via types), errors as values, and locally explicit control flow without burdensome syntax (via the ? syntax sugar).

                                                  1. 4

                                                    I agree.

                                                    But Go, eg, is not Haskell, and that’s an explicit language design decision. I think Haskell is a more beautiful language than Go, but Go has its reasons for not wanting to go that direction – Go values simple verbosity over more abstract elegance.

                                                    1. 15

                                                      If it’s Go’s decision then ¯\_(ツ)_/¯

                                                      but I’ve struggled with its error handling in many ways. From annoyances where commenting out one line requires changing = to := on another, silly errors due to juggling err and err2, to app leaking temp files badly due to lack of some robust “never forget to clean up after error” feature (defer needs to be repeated in every function, there isn’t errdefer even, and there’s no RAII or deterministic destruction).

                                                      1. 6

                                                        Sounds like you’re fighting the language 🤷

                                                        1. 5

                                                          there isn’t errdefer even

                                                          I mean, it’s a pretty trivial helper func if you want it:

                                                          func Errdefer(errp *error, f func()) {
                                                              if (*err) != nil {
                                                                  f()
                                                              }
                                                          }
                                                          
                                                          func whatever() (err error) {
                                                              defer Errdefer(&err, func() {
                                                                 // cleanup
                                                              })
                                                              // ...
                                                          }
                                                          

                                                          In general, to have fun in Go, you have to have a high tolerance for figuring out what 3 line helper funcs would make your life easier and then just writing them. If you get into it, it’s the fun part of writing Go, but if you’re not into it, you’re going to be “why do I have to write my own flatmap!!” every fourth function.

                                                          1. 3

                                                            commenting out one line requires changing = to := on another

                                                            I do not agree that this is a problem. := is an explicit and clear declaration that helps the programmer to see in which scope the variable is defined and to highlight clear boundaries between old and new declarations for a given variable name. Being forced to think about this during refactoring is a good thing.

                                                            1. 1

                                                              Explicit binding definition by itself is good, but when it’s involved in error propagation it becomes a pointless chore.

                                                              That’s because variable (re)definition is not the point of error handling, it’s only self-inflicted requirement go made for itself.

                                                              1. 3

                                                                Go takes the stance that error propagation is not different than any other value propagation. You don’t have to agree that it’s a good decision, but if you internalize the notion that errors are not special and don’t get special consideration, things fall into place.

                                                            2. 1

                                                              commenting out one line requires changing = to := on another

                                                              IMHO := (outside of if, for & switch) was a mistake; I prefer a C-style var block at the top of my function.

                                                              silly errors due to juggling err and err2

                                                              I think that this is mostly avoidable.

                                                            3. 6

                                                              Yup, Go (well, presumably Rob Pike) made a lot of explicit design decisions like this, which drove me away from the language after a year or two and many thousands of LOC written.

                                                              Beside the awfulness of error handling, other big ones were the inane way you have to rename a variable/function just to change its visibility, the lack of real inheritance, and the NIH attitude to platform ABIs that makes Go a mess to integrate with other languages. The condescending attitude of the Go team on mailing lists didn’t help either.

                                                              1. 3

                                                                There is no value in verbosity, though. It’s a waste of characters. The entire attitude is an apology for the bare fact that Go doesn’t have error-handling syntax.

                                                                1. 11

                                                                  What you label “verbosity” I see as “explicitness”. What to you is a lack of error-handling syntax is to me a simplification that normalizes execution paths.

                                                                  It’s very clear to me that the people who dislike Go’s approach to error handling see errors as a first-class concept in language design, which deserves special accommodation at the language level. I get that. I understand the position and perspective. But this isn’t an objective truth, or something that is strictly correct. It’s just a perspective, a model, which has both costs and benefits. This much at least is hopefully noncontroversial. And Go makes the claim that, for the contexts which it targets, this model of error handling has more costs than benefits. If you want to object to that position then that’s fine. But it’s — bluntly — incorrect to claim that this is some kind of apologia, or that Go is missing things that it should objectively have.

                                                                  1. 5

                                                                    It often feels to me that people who complain about error handling in Go have never suffered dealing with throwing and catching exceptions in a huge codebase. At least in Go, you can be very explicit on how to handle errors (in particular, non-fatal ones) without the program trying to catapult you out of an escape hatch. Error handing is tedious in general, in any language. I don’t think Go’s approach is really any more tedious than anywhere else.

                                                                    1. 5

                                                                      Error handing is tedious in general, in any language. I don’t think Go’s approach is really any more tedious than anywhere else.

                                                                      Yep, and a bit more — it brings the “tedium” forward, which is for sure a short term cost. But that cost creates disproportionate long-term benefits, as the explicitness reduces risk otherwise created by conveniences.

                                                                  2. 5

                                                                    The argument isn’t that verbosity has a value in itself – it doesn’t.

                                                                    The argument is that if you have to choose between “simple, but concrete and verbose” and “more complex and abstract, but elegant”, it’s better to choose the former. It’s a statement about relative values. And you see it everywhere in Go. Think about the generics arguments:

                                                                    People: “WTF! I have to rewrite my function for every fucking datatype!”.
                                                                    Go: “What’s the big deal? It’s just some repeated code. Better than us bloating the language and making Go syntax more complex”

                                                                    They caved on that one eventually, but the argument is still germane.

                                                                    As I said, I don’t personally like all the decisions, and it’s not my favorite language, but once I got where they were coming from, I stopped hating it. The ethos has value.

                                                                    It all stems from taking a hard line against over-engineering. The whole language is geared toward that. No inheritance. You don’t even get map! “Just use a for loop.” You only see the payoff of the philosophy in a large team setting, where you have many devs of varying experience levels working over years on something. The “Go way” isn’t so crazy there.

                                                              2. 3

                                                                Java included exceptions in the function signature and everyone hated those, even Kotlin made them optional. Just like how this Python developer has grown to enjoy types, I also enjoy the explicit throws declarations.

                                                                1. 3

                                                                  you have to explicitly deal with any error-producing code you use.

                                                                  Except if you forget to deal with it, forget to check for the error, or just drop it.

                                                                1. 1

                                                                  I’m finishing up and merging some work I did over the weekend on the car app:

                                                                  I converted the remaining parts of the phone UI to proper Android Data Binding, and only had to bash through two tricky bugs. It’s still sitting on a branch in case I think of any extra UI data binding to tweak before merging.

                                                                  I started work on a Content Provider to provide car data for other phone apps to easily query without them needing to talk the custom car protocol directly, and started an example app showing how to use it. I plan on adding more example gauges to specifically show the marginal effort for each consumed data point. This is still on a branch because of trepidation about committing to a public URI name for the data!

                                                                  1. 1

                                                                    I highly recommend checking out the rest of this series!