1. 5

    There are browsers for which !("a" == "a"[0]) evaluates to true ? How ? Which ones ?

    1. 13

      To answer how:

      Accessing characters like "a"[0] was only added in ES5, originally you had to use "a".charAt(0).

      If a browser does not support this way of accessing characters "a"[0] will be interpreted as trying to access a property with the name ‘0’ which does not exist on a string so it will evaluate to undefined.

      To answer which ones:

      Mostly older browsers that do not fully support ES5, I think IE took a really long time to support it.

      1. 2

        Thanks, I didn’t remember about the bracket access being added in ES5.

    1. 2

      My only real complaint with Hugo is the difficulty in making your own themes. I did not find their documentation for theme-makers to be very helpful at all.

      I understand the concepts of partials and that they piece the page together into different “puzzles” by using variants of a partial, but I don’t understand how to change which page gets which assembled “puzzle”.

      1. 5

        The first comment on the lwn post has a reference to a themeless setup for Hugo. The themeless theme sets up a barebones Hugo site. It might be helpful in learning theming because there is very little in the templates and css files to it is easier to work with them than more established themes.

        1. 2

          I actually found creating my own theme pretty straightforward, especially after trying to do it in Pelican. In a simple case you need only two templates (“list” and “single”), as opposed to a dozen in Pelican. Because of this it’s also easier to create a non-blog in Hugo, as many templates required by Pelican stop making any sense when you don’t create a typical blog.

          1. 2

            I think I just need to start fresh as I think I went about it wrong after looking at what @eb commented. I did some very dirty solutions to get things working early on and I think that is contributing to the current issues.

            1. 1

              That’s not true at all, in Pelican you only need index and page templates, everything else can be empty. Explicit is better than implicit so if empty files bother you then you can hide them on your system file browser or something.

            2. 2

              My current site is built using Gatsby, which, while cool, is a nightmare to keep updated. I’d heard of Hugo, and figured porting my site would be fairly easy since it’s a single-digit number of blog posts and a super basic stylesheet.

              After fighting with Hugo and their docs for at least three hours, I gave up and just wrote my own site generator. I’m sure Hugo is great for complex scenarios, as most static site generators probably are, but I wanted a home page, list of posts, a post page, and nice syntax highlighting. I couldn’t manage to get that with Hugo as easily as I thought it could be.

              On the plus side, my site generator is the only one I’m aware of that uses the same syntax highlighting engine as VS Code, so all my code snippets are now super colorful!

              1. 1

                I’m using Hugo for several projects and have a similar experience. I still cannot confidently say I know how to solve the simplest tasks like list posts with some conditions or create an archive page. This is mostly my fault, but Hugo’s documentation does not help.

                1. 1

                  Would you mind sharing a link to your generator if it is open source?

                  1. 2

                    I still need to get inlining of small assets working, but maybe I can use this as motivation to finish it soon! I’ll reply again once I’ve published it.

                2. 2

                  Check out Pelican. It’s using Jinja2 for better templating and it’s a really nice templating engine also used by Django.

                  1. 3

                    Django doesn’t actually use Jinja2 (at least not by default, you can configure it to do so) but it’s own templating engine. They are however very similar since Jinja2 is actually modelled after the Django templating engine.

                1. 24
                  1. All modern conveniences work in major IDEs: syntax highlighting, code completion, jump-to-symbol and debugger.
                  2. I can run the entire thing I’m working on locally, or in a non-production environment without affecting others.
                  3. I can attach performance tools and debuggers manually (e.g. run with gdb attached) with configurations at least optionally loaded from file or command line.
                  4. Tools (editors, etc.) take a reasonable amount of time to load–no more than 15, definitely no more than 30 seconds.
                  1. 9

                    I would add a CI setup that gives you feedback reasonably fast to that list. Other than that 100% agree.

                    1. 4

                      I’d add a qualification to that: a CI setup should only run integration tests. If unit testing (or worse: compilation) is dependent on a central environment, it lengthens the feedback loop, instead of shortening it.

                      1. 1

                        Preach it.

                        Ideally unit tests should just be precommit hooks–letting us make progress by skipping them if need be. If the unit tests fail but the integration/acceptance tests pass, that’s okay in the short run.

                        1. 2

                          I’m interested in the sorts of unit tests you’d be okay with skipping. To me unit tests are for more mathematical properties of functions and units of code where if they failed I’d be really concerned about correctness. Perhaps you’re unit testing too much? Or maybe I’ve misunderstood.

                          1. 2

                            So, say a big customer comes in and specifically asks for 1000 units for an order. The pricing code is complicated, and because reasons (tight deadline, excited salespeople, whatever) the order is given to circumvent the code for orders of 1000 and just always return a certain value. This change breaks unit tests, but the thing’s on fire right now so it’s worth it to punt it along until the crisis is past.

                            Another example would be some midway refactor point where the code works and needs to go live to fix some other bug but the unit tests haven’t been fixed yet to reflect the new dependencies that need to be injected or the new APIs or whatever.

                            Tests are important, but they’re usually not deliverables to the business and it is important to be wise when deciding how much to let them guide us.

                            I’ve worked on a codebase where somebody diligently made hundreds of unit tests that a) failed to catch major, basic regressions in the money funnel (checkout) and b) only meant we had things to fight against during refactors.

                            In my own work, especially numerical stuff I’ve done, I still do 100% test coverage before shipping 1.0, and view it as negligent to ship libraries intended for external use with anything less than that. But, for a business application, needs must when the devil drives.

                            1. 2

                              Ah that’s interesting, yeah I wasn’t thinking about it in terms of unit testing for business requirements at all. I was thinking entirely in terms of numerical/relational properties.

                              1. 1

                                breaks unit tests, but the thing’s on fire right now

                                So remove/disable the unit test, instead of skipping it? It reflects historical requirements, not current ones.

                                1. 1

                                  The test isn’t wrong, it’s just in the way. Committing while skipping precommit hooks is less of a sin than removing the test and forgetting to put it back later.

                                  Having lots of disabled flappy tests, or even worse removing tests which coworkers assume are present, is an anti-pattern to me.

                            2. 1

                              What? No. This is wild.

                              1. 1

                                Sorry, I don’t follow. Say again?

                                1. 2

                                  If the unit tests fail but the integration/acceptance tests pass, that’s okay in the short run.

                                  This is bonkers. If your system is built in such a way where this is possible, or even (as your later example kind of suggests) even sometimes necessary, your system is built incorrectly.

                                  Or,

                                  The test isn’t wrong, it’s just in the way.

                                  This is a category error: there is no such thing as a failing unit test which isn’t wrong but merely in the way. Unit tests and the code they cover are inextricably interwoven. And there is no such thing as a change so urgent that there isn’t enough time to update failing unit tests. If your code base and processes have you believing either of these things are sometimes or even frequently true, you’ve dug yourself into a really bad hole.

                                  In my own work, especially numerical stuff I’ve done, I still do 100% test coverage before shipping 1.0, and view it as negligent to ship libraries intended for external use with anything less than that.

                                  This is also bonkers.

                              2. 1

                                unit tests should just be precommit hooks–letting us make progress by skipping them if need be

                                I’d go the other direction: unit tests are an integral part of every class (insert unit of choice here) and run on every build without any additional overhead. Failing test means failing build.

                                Yes, this means tests must be fast.

                                I just wrote about this a few weeks ago: MPWTest: Reducing Test Friction by Going Beyond the xUnit Model

                                I’d also add:

                                Contrary to what you may have read in the Agile literature, the key to agility is the ability to change code quickly and safely. And the key to that is the ability to re-test code quickly and effectively. Fast-running automated tests (“unit tests”) are the key to agility.

                                Jason Gorman

                          2. 3

                            Fully agree with your list.

                            I’ll just add automatic code formatting to the list of modern IDE conveniences.

                            After having used Prettier, gofmt and similar there is no going back.

                            1. 1

                              That’s interesting to me because autoformatting code is really nothing new, it’s been around for decades. indent is 44 years old and GNU indent is 31 years old.

                              Is it autoformatting you like or is it more about having a fixed set of rules that applies to all code written in a language?

                              1. 1

                                What I love about autoformatting, specifically when integrated in the editor and adopted by the majority of the community of that language, is that it removes the need to have discussions around where to put brackets, spaces, etc.

                                All you do is type code the way you like, hit save and have the tool ensure your code respects a consistent style. I don’t have to waste time reading a style guide or think about where I need to put spaces inside the brackets or not.

                                Even better, my code looks just like the code written by somebody else, which makes it easier to read.

                          1. 1

                            Struggling to see what makes this Rails specific, aside from that a nice clear comparison.

                            1. 1

                              Yeah it’s not clear on the gotchas on this with Rails. At my work we have over 9k schemas across multiple Postgres databases. This is a 10 year old rails app that was setup for multitenancy from the start. But I don’t think any of the points listed in the post are exclusive to Rails.

                              The only thing I could think of is the new support for multiple databases that was added in Rails 6. While we haven’t started reviewing that feature I’m not sure that’s going to give us any real advantages unless we moved away from multitenancy.

                              To address the slower setup times we keep a number of empty schemas with all of the necessary tables on the databases. This allows the app to just rename the schema to match how it would be named if it had just added the tenant.

                              We have found have so many schemas requires we keep a closer eye on how frequently the tables are getting vacuumed and analyzed. We have jobs that can be triggered to kick off a vacuum analyze for a set of tables that tend to be a sore spot for our more time sensitive customer work loads. We’re also reviewing tuning the vacuum settings for specific tables.

                              You do need to be careful when working on things that involve the search_path. Think background jobs that will iterate across all of your tenants or features that may facilitate some type of connection between specific tenants.

                              And database migrations take a long time. As long as the migrations you’re making is safe with current version of the app it’s safe. It just blocks either deploying or enabling any new features that depend on the migration.

                              1. 1

                                Do you have security concerns because you have to run online with a user capable of creating new schemas? Do you use a separate db user? Some separate service that uses a separate user?

                                1. 1

                                  I’m less concerned with the database user the app and background workers are configured to use. I would be thinking more on how to remove the manual access that could happen from a rails console.

                                  Your questions did give me some ideas on where we can improve our monitoring. Thank you for that!

                                2. 1

                                  Author here.

                                  But I don’t think any of the points listed in the post are exclusive to Rails.

                                  Fair, I should’ve name the post differently. There’s one point about Rails though - conventions. Some of Rails assumptions can be annoying with schema-level approach.

                                  To address the slower setup times we keep a number of empty schemas with all of the necessary tables on the databases. This allows the app to just rename the schema to match how it would be named if it had just added the tenant.

                                  That’s a neat idea, thanks for sharing.

                                3. 1

                                  Right, I should’ve changed the title. My first idea for the post was a little different.

                                  There’s 1 point about Rails - “conventionality”. Rails relies a lot on conventions, and some of can be a little annoying with schema-level.

                                1. 4

                                  I find it funny that in the intro to the article promises a minimal and modern setup, and immediately after the table of contents lists three external dependencies (pyenv, poetry and click).

                                  I believe experienced developers can probably recognize when they don’t need an extra dependency, but new developers might actually think they need all of this stuff (they don’t, venv, requirements.txt and argparse are good enough 99% of the time).

                                  1. 2

                                    I don’t think this is entirely fair, click is only a dependency of the example project not of the workflow and probably is mainly used instead of argparse to show how to use external dependencies with this workflow.

                                    Also pyenv is just used to lock the python version used in the project, if you omit it the rest of the post would still work just fine.

                                    1. 2

                                      I don’t criticize the author’s choice of external dependencies. I was just commenting on his choice of words, specifically calling such setup “minimal”…

                                  1. 3

                                    I’ve seen several things lately where people advertise “classless CSS”. I’m not really into web development at all. My CSS and javascript skills are, at best, subpar.

                                    So what’s so bad about classes in CSS? Why does it seem like it’s cool right now to not use them?

                                    1. 1

                                      I do some light web development, and I think the benefit of ‘classless CSS’ is that you don’t have to go around adding the ‘class’ attribute to elements in html (and forgetting, or adding the wrong one, etc). It provides a ‘website theme’ without having to modify the existing html.

                                      That said, I don’t use ‘classless CSS’ framework things because I want more control over which styles are applied to what.

                                      1. 1

                                        I think a big part of the rise in popularity of ‘classless CSS’ is because of the rise in popularity of all the semantic elements introduced in HTML5. These semantic elements introduce a kind of structure to your html that is probably enough to do simple styling whereas before when everything was a div this was a lot harder to do.

                                      1. 1

                                        I don’t really agree with a person’s “preferred name” is their name, their “legal name” is something else.

                                        1. 24

                                          I tend to assume the best decisions are made close to where the most information is available, and vice versa.

                                          Why would a state bureaucracy, none of whose members have necessarily met the person in question, have a better idea than the human living with it?

                                          1. 17

                                            I disagree with your disagreement. I’ll take the example of my mother. She dislikes her legal name, and in 99% of circumstances drops her first name entirely and goes by her second name. Everybody knows her by her second name and she only uses her birth name where she legally needs to. She could change it so that her legal name and actual name lined up, but she has sentimental reasons for not doing so owing to who she was named after.

                                            Her “preferred name” is her name as far as everybody is concerned, and her “legal name” is something else.

                                            You also have the case of actors, who, for various reasons, need to avoid sharing stage names. Through use, their stage name often ends up becoming simply their name, as that’s what everybody addresses them as outside of a legal context.

                                            1. 4

                                              I feel like both of our viewpoints are valid to some extent — I could argue that her name is still her name, she just goes by another name, and most people are simply unaware of her real name?

                                              And yes, the case with the actors is quite a common one, such that here in Germany you can register your artist name (Künstlername) easily and it will be put on both the ID card and passport, so that you can use it and identify yourself with it just like you can with your normal name.

                                              1. 7

                                                What makes the name a few bureaucratic entities have in their system her “real name”, one that she herself quite possibly rarely sees, over the name(s) that she and everyone in her day-to-day life refer to her as? Is it because it’s on her birth certificate? Is it because it’s the name some of these entities use? What if any of those were different from one another? What if she had two or more legal names in different countries?

                                                In my country, your legal name is whatever you say it is, and you can change that whenever you want (provided you’re not trying to commit fraud or something). You may have some minor difficulty with certain institutions (passport office, banks, etc.) who want proof of this, but they generally just want to see that you’ve used the name elsewhere already (power bill, etc.) and your declaration that it is, in fact, your name. When would you define a name as a person’s “real name” in this situation? As soon as they start using it? Once the commonly-interacted-with entities have been notified of it? The majority of them? All of them?

                                                For example, someone I worked with at one point used to have a double-barrel surname. They got fed up of systems mangling it in various ways, so they dropped the hyphen, taking the first part as a middle name and the second part as a new surname. There’s probably various systems they don’t interact with anymore that still have the old name in their systems, but it’s been changed in most places they deal with regularly. What’s their “real name” to you?

                                                As the main article, the linked-to Falsehoods list, and other commenters have said, people have different names in different contexts, and you can’t just assume you can take a name from one context and use it in another. Really, you should ask for a name for whatever you’re using it for, and state as much. Most systems (or websites, at least) already understand this when it comes to payment - people just need to realise “billing” and “rest of the world” aren’t the only two contexts.

                                                1. 2

                                                  people just need to realise “billing” and “rest of the world” aren’t the only two contexts.

                                                  My favorite thing is when an e-commerce site has apparently separate names associated with your account as a whole, your billing address, and your shipping address, but they turn out to be not actually separate.

                                                  For example: I purchased a gift for my mom recently from a dealer that specializes in that particular thing, and gave my name for both the account name and the billing address, but used her name and address as the shipping address. The initial “we’ve received your order but not begun processing it yet” email had my name in it, but subsequent emails have all had hers.

                                                2. 5

                                                  in Germany you can register your artist name (Künstlername) easily and it will be put on both the ID card and passport, so that you can use it and identify yourself with it just like you can with your normal name.

                                                  That’s pretty damn awesome.

                                                  In Sweden changing your given names is a matter of an (online) form and a small fee.

                                                  Your last name is a bit more expensive to change, as it has to be checked against “known names” (such as ancient noble names) but is still a matter of a e-id submission and payment of a fee.

                                                  1. 2

                                                    In Sweden changing your given names is a matter of an (online) form and a small fee.

                                                    That’s pretty awesome, I wish the government here would embrace online forms more. I don’t know how it works here but it should be fairly easy and inexpensive for people to change their names if they have a good reason for it (and it’s not done for fraud).

                                                    Your last name is a bit more expensive to change, as it has to be checked against “known names” (such as ancient noble names) but is still a matter of a e-id submission and payment of a fee.

                                                    I figure they also do checks to make sure you don’t name yourself anything weird (Hitler, Stalin, Mao?). Also, I know that some countries (France?) have white lists for names that are allowed, and I wonder if that still applies if you’re the one choosing it? Because it would kind of suck if your preferred name wasn’t “allowed” for some reason.

                                                    1. 2

                                                      The rules are here (in Swedish): https://www.skatteverket.se/privat/folkbokforing/namn/bytaefternamn.4.76a43be412206334b89800020669.html

                                                      It’s been liberalized these last years. Double surnames used to be verboten. Some stuff is new, such as the possibility to change surnames to a more gender-preferred form (in the case of languages where that’s an option).

                                                      Note that there’s quite a long wait time however.

                                                      Regarding “offensive” names, that’s definitely a rule. A famous case involved parents wanting to give their daughter the names “Adolfina Stalina”. They were denied.[1] But there’s a famous example of basic free-form poetry with first names (although the person seems to have tired of being the butt of internet jokes and changed it to Salkert): https://twitter.com/inalvsmat/status/414156476849340417

                                                      [1] it’s possible the person could choose those names as an adult. The case hinged on wether these names could cause the person difficulties while she was a child.

                                                  2. 5

                                                    No, plenty of people are aware of her legal name, but even for them, that’s not her name in any meaningful sense and it would be weird to refer to her by it. The only people who refer to her by her legal name are bank officials, healthcare professionals, and civil servants, all of whom are quickly corrected.

                                                    Take a look at it from this perspective: if you were given a name at birth, but practically everybody knows and refers you by another name, even those who know your birth name, which one is in practical terms more your actual name? Arguably, it would be the name people actually use to refer to you regardless of what your birth certificate might say.

                                                    The idea of people having a fixed legal name is quite a modern one.

                                                    Quick addendum. Here’s another interesting case, and I fall into this. I have what might appear to be two legal names, or rather I have one legal name, which has two forms in two different languages. I make active use of both forms depending on the circumstances. I used the Irish form of my name in personal circumstances and the English form in professional circumstances, not least because of there being a preponderance in the world of people who don’t understand that not every language is English.

                                                    1. 1

                                                      Just to chime in on that addendum, since I originally omitted this from my comment: I also have two written forms of my name, in Gaelic and English. It’s just easier to use the English one in contexts where you’re going to be meeting new people more often than not and they’re unlikely to know the language. Both are my name though.

                                                      (It’s also my experience that people are happy to, and pretty good at, trying to guess the pronunciation of words, except when it comes to names, in which case they jump straight for the most incomprehensible one.)

                                                    2. 2

                                                      Last I checked it was absolutely not easy.

                                                      cf https://www.anwalt.de/rechtstipps/der-weg-zum-kuenstlernamen_040484.html - in German

                                                      Gegenüber der Behörde sind die Angaben über den Künstlernamen glaubhaft zu machen. Das bedeutet, dass man gegenüber der Behörde glaubhaft machen muss, dass man überregional unter diesem Künstlernamen bekannt ist.

                                                      Which basically means you should be “well-known by that name and not only locally” and the internet didn’t really count. Maybe today it’s different if you can prove you have a million of followers on any social media thing.

                                                      I’m not ruling out that a few nerds did that with their online nicknames, but I never heard anyone following through.

                                                  3. 8

                                                    For a transgender person, their preferred name is absolutely their name, and given the serious obstacles in many places to name changes (cost, requirements to post in newspapers, requiring approval from a judge, or even just having not done so yet) their legal name is likely to not be their name.

                                                    1. 5

                                                      Any chance you can elaborate as to why?

                                                      1. 3

                                                        To me, a person’s legal name is their name, any other names someone or the people around them come up with (nick names, abbreviations, pseudonyms, affectionate names) are just aliases for the real name. I do agree, however, that more websites could skip asking for real name information and just ask for an alias (nickname), both for data protection reasons, and for convenience — there might be a lot of Patricks, but nobody else is going to pick a weird nickname like xfbs.

                                                        1. 12

                                                          To me, a person’s legal name is their name

                                                          And what of people whose name a legal system can’t or won’t represent?

                                                          And which legal name? Ones legal name can easily differ between regimes. Or even during time in a regime. Or have multiple legal names, in a single regime.

                                                          1. 3

                                                            And what of people whose name a legal system can’t or won’t represent?

                                                            What do you mean by that? I can think of two cases: either at birth, the name is rejected (for example, Adolf Hitler is a banned name in many jurisdictions) or someone has a name written in another writing system (then you’d have to write it phonetically?).

                                                            And which legal name? Ones legal name can easily differ between regimes. Or even during time in a regime. Or have multiple legal names, in a single regime.

                                                            What does the regime have to do with your name?

                                                            1. 9

                                                              What does the regime have to do with your name?

                                                              Ideally, nothing. In practice, it is your regime that sets up the laws for allowing or disallowing certain names.

                                                              For example, in France, breton names are routinely rejected by the current “regime” because they are not written according to the orthographic rules of the french language. Yet, breton is the language of people that have been living in the territory of the French state since before this state even existed. Heck, if I was born four years sooner my current name would be illegal (a Catalan name in fascist Spain). I would be extremely offended of being forced to use my legal, completely artificial, name.

                                                              The fact that something is “legal” does not make it legitimate. Some laws suck; and enforcing a “legal name” policy may suck as a result. Let us not increase the suckiness of the world by adopting this policy.

                                                              Another clear example is transgender people who live in countries where changing their name accordingly is illegal.

                                                              1. 7

                                                                And what of people whose name a legal system can’t or won’t represent?

                                                                What do you mean by that?

                                                                Those are two good cases. Here are some more:

                                                                • Names that don’t fit your language’s phonetics and cannot be transliterated accurately
                                                                • Names that aren’t phonetic (logograms, sign)
                                                                • Names with accents or “invalid” punctuation marks
                                                                • Names from a persecuted group or language

                                                                What does the regime have to do with your name?

                                                                In an ideal world, very little.

                                                                However, legal names are one way a regime makes their populace legible. As an example, my legal name is different in China (李毅) than it is in Taiwan (李逵) than it is in Australia (David Ryland Scott Robinson) than it is in the United States (Scott D Robinson and David Ryland Scott Robinson).

                                                            2. 10

                                                              I get the impression that your particular legal name is probably not markedly dissimilar from the name you are most commonly known by in real life – that is, you probably go by your legal first name or a shortened form of it – because I think it’s easy for someone who has no real problems with their legal name to view it as the one unequivocally “real” name that everyone has.

                                                              I, on the other hand, not entirely uncommonly for someone from my region, have three names: two given names and a surname, and (this is the not entirely uncommon part) I have never gone by my first name in any capacity except official/formal ones, and then only grudgingly or until I was able to state my preferred name. I introduce myself to people as Secondname Lastname. My immediate and extended family, friends, and lovers have all called me by my second name (or a common shortened form of it, in the case of friends and lovers). Even as a child when my parents were upset with me and would scoldingly call me by my “full” name, they never included the first name. Many people who I’ve known since becoming an adult (and whom I thus got to introduce myself to, instead of them learning my name from an instructor calling roll and me informing them of my preferred name) are surprised when they find out, such as by seeing my debit card when we’re paying at a restaurant, that the name they know me by isn’t my first name. On top of all this, lately I’ve even come to identify more with the nickname form of my second name than the name itself.

                                                              So at least in my case, my legal name is basically just an identifier that is starting to feel increasingly arbitrary, that I was saddled with at birth, and that doesn’t reflect the name by/with which I actually identify. And I’m not even trans or a member of some other group for whom the burden of their legal name is even more onerous; in that case it probably would actually be worth all the heartburn to change my legal name instead of just being mildly annoyed at all the things in my life that have my full legal name on them, and websites that address me as Firstname (or even better, the ol’ all-caps-because-it-passed-through-a-mainframe-on-the-way-to-the-frontend FIRSTNAME) instead of Secondname or Sec.

                                                              At least Amazon lets me bill things to Firstname Lastname but ship them to Sec Lastname…

                                                              1. 6

                                                                All of these comments are really amazing, I think I learned a lot. You have a good point there, I know of two similar cases, one is that I rarely bother to fill out my middle name anywhere even though it is technically part of my legal name, for brevity and because I don’t use it much. Also, I have a relative who, similar to you I suppose, has always been known by his second name.

                                                                I guess someone’s legal name still is their name, and that is important for a number of reasons, such as accountability, but the heuristic that people want to be addressed by their first name does not always hold. It doesn’t hold in Russia or the Netherlands (where people have diminutive forms of their names that they might want to use), not all countries might have a concept of first or last names, as we learned some people might not have names after all (one person mentioned Ashkenazi-jewish boys, who traditionally don’t get one until they are 8). Some people might have legal names that are not easily pronounceable (because they might use a different writing system). And, obviously, some people might have issues with their legal name for other reasons (such as a Spanish or French regime not allowing them to use the name they want, or if they are trans or something like that and their country doesn’t let them pick a name of the gender they prefer).

                                                              2. 8

                                                                I often mention this tweet in discussions like this one. For those who don’t want to read a tweet, it’s a lawyer complaining that a person with a Hispanic-style name like “Miguel Fernando Lopez Ortiz”, who goes by “Mike”, can be disadvantaged in the legal system because the governmant’s own “legal name” systems can’t handle this type of name well and may turn it into a huge number of aliases (“Miguel Ortiz ALIAS Miguel Lopez ALIAS Miguel Fernandez ALIAS Mike Ortiz ALIAS Mike Lopez…”), and the existence of a large number of aliases in records for a person is often treated as evidence of criminal intent (“why does he go by all these different names, if not to hide what he’s doing”).

                                                                What’s your solution to that?

                                                                Or to the fact that my “legal name” is one that’s hard for many systems to represent correctly, even though it’s a fairly common case? I was given the same name as my father, so I legally have a “Junior” in my name; I’ve been listed in various systems, including quite official ones, under FIRST LASTJR (wrong), FIRSTJR LAST (wrong), FIRST MIDDLEJR LAST (wrong), etc.

                                                                1. 3

                                                                  Oh, wait. It took me a while to understand that. So, in the US, it is common to have multiple given names (middle names) but hispanic people have multiple last names, so his first name is Miguel and his last names are “Fernando Lopez Ortiz”, and so the system has to create aliases because any one of those last names are technically valid, and that looks suspicious because it looks like he’s known under multiple, different names when actually they are all his one, regular, legal name?

                                                                  What’s your solution to that?

                                                                  I’ve no idea, perhaps fix the system? Legal systems should be able to deal with people from other cultures properly anyways, so they should be able to represent “alien” names (especially in the US I suppose, where everyone is “alien” unless they are natives).

                                                                  Also, I did not know that the “junior” thing is actually part of a legal name! I thought people in the US just named themselves after their father (something that I don’t think is very common here in Germany, or Europe, but I might be wrong) and then used “junior” and “senior” to disambiguate.

                                                                  1. 3

                                                                    In naming traditions descended from Spanish culture, it’s common to have a composite first part to the name (so “Miguel Fernando” would be the given name, and should not be split into “Miguel” and “Fernando”). And it is common to have two family/surnames, one taken from each parent. Traditionally the first surname is taken from the father’s first surname, and the second is taken from the mother’s first surname; when sorting, the first surname is used first (so “Miguel Fernandez Lopez Ortiz” sorts under “L” by surname, not “O”).

                                                                    And that’s without getting into more complex situations like a saint’s name.

                                                                2. 3

                                                                  that’s very cool and not at all reductive to say especially considering you live in a country that has a proven track record of denying representation to people whose real name isn’t their legal name and who want to set the record straight

                                                                  1. 1

                                                                    that’s very cool and not at all reductive to say especially considering you live in a country […]

                                                                    Be nice.

                                                                3. 1

                                                                  Is @twee both your “preferred name” and name?

                                                                  1. 4

                                                                    It’s my preferred name for internet accounts, a point that I believe was addressed in the article:

                                                                    It almost certainly doesn’t identify them uniquely, and importantly, it need not bear any relation to their “legal name”. As software engineers, we are descendents of a proud heritage of hackers who often take great pleasure in assigning and using names, called “handles”, which are completely unrelated to their given or legal names.

                                                                    In real life people don’t refer to me as “twee”. But I’m not sure how that relates to @xfbs’s statement, which was what I don’t quite understand. Apologies if that’s just confusion on my part.

                                                                    1. 2

                                                                      @xfbs followed up with their perspective. I don’t agree with it.

                                                                      But, to my response, I was drawing the difference between “preferred name” and “name.”

                                                                4. 4

                                                                  In UK law, “legal name” isn’t really something that exists - insomuch as it does, it’s the same thing as a “preferred name. You might have a name registered with specific legal entities (the DVLA, the Home Office, the HMRC), and those are often more strictly regulated - for instance, the homeoffice will deny passport applications where the name is a swearword. Quoting Home Office guidelines: “The name by which a person wishes to be known is a matter for the individual.”

                                                                  1. 4

                                                                    This is actually quite common in the Netherlands. For example, my name is Martin, but this is not my legal name, which is different and has two middle names. I don’t really publish this name on the internet (as a small barrier for potential identity theft), but usually it’s fancy names given to you during your baptism. It’s perhaps a bit less common for kids born today, but the majority of people over 30 have it.

                                                                    Most Dutch forms distinguish between your colloquial every-day name and full legal name when this matters.

                                                                    I actually got in to some problems with this after I moved abroad, I introduced myself as Martin (which is what everyone calls me, including my mother) but then later it turned out I wasn’t “Martin” at all; for example my ISP refused to help me as I said “Hi, this is Martin speaking, [..]” on the phone (English pedanticness, sigh). My (English) girlfriend at the time also filled in some council tax forms etc. with my colloquial name, and had some problems using this as a “proof of address”.

                                                                    Now I just fill in my legal name everywhere, which is hard to pronounce for most non-Dutch people and I have to tell them to just call me Martin; it would be helpful everyone if I could just fill in both 🤷‍♂️ When I went to the A&E after I broke my arm a few years ago I could see it was my turn just by the look of of puzzlement and horror every time the staff called me out for triage, x-rays, and doctor consultancy, heh.

                                                                    Granted, all of this is probably a pretty rare thing if you’re working on a system somewhere in the US, but generally speaking names are hard (“falsehoods people believe about names”) with many different edge cases and while I don’t really care how you call me, some people place a high value on this kind of thing.

                                                                    1. 3

                                                                      off topic, but i do get a kick out of the way most native english speakers recoil at dutch names like rutger, martijn, thijs etc.

                                                                      1. 2

                                                                        That’s actually really fascinating! I’ve never heard about that here in Germany. So where do these colloquial names originate, also from your parents or do they develop during childhood?

                                                                        1. 3

                                                                          That’s actually really fascinating! I’ve never heard about that here in Germany.

                                                                          It does exist in German(y) as well. As has been pointed out in another reply to you, it’s usually a shortened version of your full first name. In German it’s called the “Rufname”. To give a traditional German example, my neighbor (who has passed the 70 since quite a while) has “Wilhelm” as his first name. His wife, just as everybody else, calls him by “Willi”. Anywhere he needs to give an official address, he of course uses the full form of the name, and it’s what is placed on his mailbox.

                                                                          1. 3

                                                                            (Not the person you responded to but also from the Netherlands.)

                                                                            The colloquial name is the name your parents give you, usually the ‘official’ name is just a longer/more traditional name that that name was derived from.

                                                                            So for example my name is Daan but my ‘official’ name is Daniël, for someone called Tom it would be Thomas etc.

                                                                            1. 3

                                                                              From the parents. In @daanvdk’s examples the names are somewhat similar and the initials match, but note that differences can be larger. E.g. my sister’s official first name is Catharina, but her colloquial name is Karin.

                                                                              1. 2

                                                                                Usually it’s just a shorter less fancy version of the full name. e.g. Johannus is John, Johan, Sjonnie, etc.

                                                                              2. 2

                                                                                Yeah, that’s about how I would imagine it, with the problems you mentioned.

                                                                                I’m not a big fan of not being able to choose anything, but looking at the possible problems until there’s a global shift or unification in how people use names I guess some of us have to live with using the legal name for all paperwork anyway.

                                                                                Again, I’ve heard stories of people getting problems when airline tickets didn’t have their full legal names. so where do you draw the line? Is it worth having your non-legal name on the power bill and credit card, but airline tickets must be legal name again? Isn’t this a bit like having different online identities and not trying to leak information so they can’t be correlated? I guess people will just have to try if it works, and in your case, give up at some point.

                                                                              3. 4

                                                                                The name I use day-to-day is not my legal name. In fact, the name on my email, my book, and all my published articles is not my legal name, either. Most people don’t even know I have a different legal name. The only time I use my legal name is for government correspondence.

                                                                                1. 3

                                                                                  so what about the case where one person has multiple different legal names in different legal systems? which one is their “name”?

                                                                                  i downvoted this as troll since this comment is low-effort, doesn’t offer any useful insight (why do you disagree with this?), and i honestly don’t see how it’s possible to come to this conclusion after having thought about this even a little bit.

                                                                                1. 3

                                                                                  Django is uncool now ? Guess I’m getting old…

                                                                                  1. 1

                                                                                    I guess the author is mainly referring to doing server side rendering with Django. At least to me there is no reason why the mentioned API cannot be using Django while still adhering to the ‘cool’ SPA pattern.

                                                                                  1. 1

                                                                                    Small Remark: Personally I would move the chaining of Transforms to within the data type (so add | Chain [Transform] to Transform). I think this would improve composability of transformations and also remove the need for the transform-function since in toMatrix and toCodeWorld you could then just directly pattern match on the Transform-type.

                                                                                    Other than that a very nice article showing a nice use case of why to prefer data over functions.

                                                                                    1. 1

                                                                                      I’m unsure exactly what you’re suggesting. Can you please elaborate, perhaps by providing a full definition of the Transform type that you had in mind?

                                                                                      1. 2

                                                                                        Something like:

                                                                                        data Transform
                                                                                          = Scale Double Double
                                                                                          | Translate Double Double
                                                                                          | Chain [Transform]
                                                                                        

                                                                                        Then the function toMatrix would for example become:

                                                                                        toMatrix :: Transform -> M33 Double
                                                                                        toMatrix (Scale x y) = V3
                                                                                          (V3 x 0 0)
                                                                                          (V3 0 y 0)
                                                                                          (V3 0 0 1)
                                                                                        toMatrix (Translate x y) = V3
                                                                                          (V3 1 0 x)
                                                                                          (V3 0 1 y)
                                                                                          (V3 0 0 1)
                                                                                        toMatrix (Chain ts) =
                                                                                          foldr ((!*!) . toMatrix) identity ts
                                                                                        
                                                                                        1. 1

                                                                                          Thanks, but I disagree with this, for a couple of reasons: first, it makes Transform into an N-ary tree with leaves of Scale and Translate, but a tree doesn’t match the thinking we’re trying to capture: a linear sequence of transformations that can be applied to something later. Second, you lose the nice connection to the free monoid, which means that concerns about structuring multiple transformations are now intermingled with the specification of a single transformation.

                                                                                          If the calls to transform are too much syntactic noise, then I’d rather write this:

                                                                                          toMatrix :: [Transform] -> M33 Double
                                                                                          toMatrix = foldr ((!*!) . toMatrix') identity
                                                                                            where
                                                                                              toMatrix' (Scale x y) = V3
                                                                                                (V3 x 0 0)
                                                                                                (V3 0 y 0)
                                                                                                (V3 0 0 1)
                                                                                              toMatrix' (Translate x y) = V3
                                                                                                (V3 1 0 x)
                                                                                                (V3 0 1 y)
                                                                                                (V3 0 0 1)
                                                                                          
                                                                                    1. 7

                                                                                      Pretty poorly informed piece. Hilarious that it ends with “Go also seems to suffer from ignorance towards well established patterns that are proven to work” and then fails to provide a single example.

                                                                                      1. 4

                                                                                        The datetime parsing and command line flag handling mentioned in the articles are the examples.

                                                                                        1. 5

                                                                                          They’re not examples of ignorance. The Go team was well aware of how date parsing has been done historically but decided to try something more intuitive. The way they wrote the example was carefully chosen to make it look confusing. See https://golangcode.com/parsing-dates/ for how this is usually used.

                                                                                          1. 4

                                                                                            I don’t have enough experience with Go to have an opinion about the specifics I just wanted to clarify what seemed like the intentions of the author to me. I get that you don’t agree with the examples but I think that’s something entirely different from claiming that they aren’t there.

                                                                                            1. 2

                                                                                              Yes, datetime parsing and flag handling is what I was refering to.

                                                                                              Go is developed by smart people, I never assumed they are not aware of how timestamp formats look like in other languages. I assumed they did it differently anyway ignoring the established practices, that’s why i wrote ‘ignorance’. Maybe not the most fortunate wording, didn’t mean to offend.

                                                                                              1. 0

                                                                                                That’s, uh, not what “ignorance” means…

                                                                                      1. 7

                                                                                        I’m returning to a go project at work and feel a little more sensitive to these comments (so take with a grain of salt).

                                                                                        • Timestamp parsing - I never do timestamp parsing without looking at the documentation (Oracle’s vs Java’s vs C#‘s vs SQL Server vs Javascript), so i feel that Go’s formatting being based on a magical date is “quirky”, but you can easily do date formatting/parsing just by referring to the one magical date ( 01/02 03:04:05PM ’06 -0700 ) which seems pretty cheap for the large amount of flexibility.

                                                                                        • XML - I’ve dealt with more of this than I’d like and ran into awkward parts when dealing with multiple namespaces (canonicalization is a pain) but for straightforward xml, Go is pretty delightful to deal with. I haven’t needed anything faster or more complicated.

                                                                                        • Flags - Again, Go is fairly idiomatic (based upon very old-school Unix command line sensibilities), but the Flags package gets so much stuff absolutely correct (built in help, connects to custom object parsing, default values). I’ve never used it but I believe the Go community really likes Steve Francia’s cobra, if you want/need more complicated stuff.

                                                                                        • The compiler is one of the things that has gotten more complicated (dealing with multiple modes for dynamic objects, etc), but everyone appreciates it being:

                                                                                          • cross platform
                                                                                          • fast
                                                                                          • produces fairly fast code
                                                                                          • debuggable

                                                                                          and the Go team spends lots of time keeping those in mind.

                                                                                        • Modules - My last usage of Go is actually before modules landed so I need to get caught up on them. I never really liked some of the awkwardness of GOPATH (especially since there were multiple tools that handled pinning versions).

                                                                                        • The last comment is… interesting. I’m pretty confident that the Go team isn’t ignorant of “well established patterns that are proven to work”, but have strong (idiomatic) design opinions. I happen to like the design aesthetic of the language, but realize it’s not for everyone.

                                                                                        1. 3

                                                                                          I’m a bit curious about the magical date you mentioned, how does go deduce from that whether it is the 1st of february or the 2nd of january?

                                                                                          1. 6

                                                                                            It’s not that magical. It’s basically just the same as “classic” string parsing with strptime() and %Y and whatnot, but instead of %Y you use 2006, and instead of %d you use 01, etc.

                                                                                            The idea is that instead of %Y-%m-%d you have a more human-readable 2006-01-02. It’s quite easy to memorize too, since 2006 is the year, and after that it just increases from high to low. Also see some examples from the docs.

                                                                                            In other words, it’s a lot less magical than strptime(), IMHO. For example for this comment I looked up if it was %m or %M for day-of-month, and then it turns out it’s actually %d.

                                                                                            1. 1

                                                                                              The idea is that instead of %Y-%m-%d you have a more human-readable 2006-01-02.

                                                                                              One can only imagine the ease-of-use if they had picked an order that was used in more than one country on this planet. Feels a bit like the usual jingoism.

                                                                                              It’s quite easy to memorize too, since 2006 is the year, and after that it just increases from high to low.

                                                                                              It’s timezone > year > second > minute > hour > day > month. There is nothing logical about it, except that it looks the way some American’s prefer to write their date.

                                                                                              1. 1

                                                                                                I think the other part is that each portion has a different number (the month is always 01, the day is always 02, etc).

                                                                                                1. 1

                                                                                                  Yes and that is ordered (“intuitively”) timezone > year > second > minute > hour > day > month.

                                                                                            2. 4

                                                                                              If you work with go dates regularly you end up memorizing the order pretty quickly.

                                                                                              That said, I think it’d have been nice if they’d used the 13th December instead since 2006-12-13 is less ambiguous.

                                                                                              Unfortunately, that would’ve meant not having a nice way to make _2 indicate no leading zero. No easy tradeoffs.

                                                                                              1. 2

                                                                                                You have a better memory than me. I’ve been with Go since 1.3 and I still have to look up the documentation every time. I think that if they wanted to do dates like this, they should have gone with the ISO format 2000-01-02 03:04:05. That would have been way more intuitive to way more people.

                                                                                                1. 1

                                                                                                  It’s less the quality of my memory, and more that I was working with date parsing on a regular basis for a couple of weeks. If you don’t do it often there’s no way you would memorize it.

                                                                                              2. 2

                                                                                                It is a bit American centric, but the date in documentation is also written

                                                                                                Mon Jan 2 15:04:05 MST 2006

                                                                                              3. 3

                                                                                                Thank you for the feedback!

                                                                                                Timestamp parsing - I never do timestamp parsing without looking at the documentation.

                                                                                                To me %m just seems more intuitive than 01 for referencing the month, because ‘m’ is a mnemonic for month, but ‘01’ doesn’t tell me much. One thing it does tell me though, is that the number to be formatted is 0-padded, which is admittedly a nice touch.

                                                                                                […] the Flags package gets so much stuff absolutely correct […]

                                                                                                Yes, agreed. I think the API is great, I just criticized the perceived quirkiness of the resulting command interface.

                                                                                                Go is not a bad language (far from it), I just believe some of the bold design decisions to not be the best choice.

                                                                                              1. 2

                                                                                                In contrast, in Rust, calling an async function does not do any scheduling in and of itself, which means that we can compose a complex nest of futures without incurring a per-future cost. As an end-user, though, the main thing you’ll notice is that futures feel “lazy”: they don’t do anything until you await them.

                                                                                                If I have 3 futures that I’d like to run in parallel, how do I actually “start” them running before I block on any of their results coming back?

                                                                                                For example:

                                                                                                  a = async1()
                                                                                                  b = async2()
                                                                                                  c = async3()
                                                                                                  // ideally a/b/c are all running "in the background" at this point
                                                                                                  a.await
                                                                                                  b.await
                                                                                                  c.await
                                                                                                

                                                                                                Or am I misreading what they’re saying there?

                                                                                                1. 3

                                                                                                  For this use case you can join multiple Futures into one, for more info: https://rust-lang.github.io/async-book/06_multiple_futures/02_join.html

                                                                                                  1. 1

                                                                                                    That looks like exactly the solution for this. Thanks!

                                                                                                1. 4

                                                                                                  Alternatively, just use a language with a native code formatter. Examples: zig fmt, go fmt, etc. Then you can use whatever your muscle memory dictates while typing in code, and still have a consistent format applied on saving.

                                                                                                  1. 3

                                                                                                    Then you can use whatever your muscle memory dictates while typing in code

                                                                                                    Are you suggesting people sit there hitting space 4 times to align their code?

                                                                                                    1. 2

                                                                                                      People do. (I do, when I’m using a language like renpy where it doesn’t support tabs for indentation at all.)

                                                                                                      If you’re not, then what exactly is the point of using spaces to indent? If you’re just autoexpanding tabs, then your tab expansion is controlled by your tabstop setting, and so you don’t experience any difference when editing code (except that you may need to press backspace four to eight times instead of one when de-indenting & you will find that your source files will be a few hundred bytes longer).

                                                                                                      1. 1

                                                                                                        I think most programmers who prefer spaces (including myself) autoexpand tabs, at least in my environment.

                                                                                                        Main reasons I have for using spaces:

                                                                                                        • Consistency between different environments
                                                                                                        • Consistent visual width for characters
                                                                                                        • Possibility to set guides/constraints for line length
                                                                                                        1. 1

                                                                                                          Consistency between different environments

                                                                                                          As the author of a piece of text, I don’t think I have any right to impose my indentation-width preferences on other readers or editors. If code I have written becomes less readable when the tabstop is set differently, then I have failed to write clean code, and no changes to spacing will fix that underlying problem.

                                                                                                          Consistent visual width for characters

                                                                                                          We already have all sorts of characters that have widths other than 1 (even in monospace fonts, where characters have widths that are integer multiples of the glyph width). Even within ASCII, CR ought to be zero glyphs wide, while LF is sqrt(-1) wide, and backspace is -1 glyphs wide.

                                                                                                          Possibility to set guides/constraints for line length

                                                                                                          Line length constraints are typically with respect to number of characters. In other words, it’s line length rather than line width.

                                                                                                          1. 1

                                                                                                            We already have all sorts of characters that have widths other than 1 (even in monospace fonts, where characters have widths that are integer multiples of the glyph width). Even within ASCII, CR ought to be zero glyphs wide, while LF is sqrt(-1) wide, and backspace is -1 glyphs wide.

                                                                                                            So yes ofcourse LF and CR are exceptions to this rule, however when I think of code I think in lines and columns and not one long string of characters, so to me the characters that represent these columns are the ones that matter when thinking about character width. Regarding backspace and non-ascii characters my strong belief is that those do not belong in source code altogether.

                                                                                                            Line length constraints are typically with respect to number of characters. In other words, it’s line length rather than line width.

                                                                                                            Not entirely true, indeed linters/formatters tend to look at line length, however every text editor I have used tends to visualize these kinds of constraints with a line at a certain line width. Not having to worry about this distinction however is exactly my point about why I think spaces work better for this purpose than tabs. Also although most constraints are indeed implemented to look at line length, I think the motivation behind why that constraint was put in place is usually because of line width which further emphasizes why it is nice to not have a distinction between these two.

                                                                                                  1. 10

                                                                                                    My reactions are:

                                                                                                    • Are the spaces people just now figuring this out? If that is the case, get out of your bubble and into the real world where you can encounter, for example, blind people, whom perceive the digital world through a Braille-display of usually only 1x40 character displays or 2x80 character displays if they are lucky. Taking up 3 tab symbols is way better than taking up 12 or 24 symbols on their displays. Tabs are simply a blessing for accessibility in most cases.
                                                                                                    • Ever looked at a hex/deximal-dump of your source files? I definitely prefer code written with tabs in that case. You just look for the 09 bytes and count them to figure out your level of indentation. Counting to 3 0x09 or 09 bytes is better than counting 12 0x20 or 32 bytes.
                                                                                                    • When writing code, I usually use tabs in an editor which I can configure to output whatever is desired, but I’m hitting that tab-button instead of the space bar. Even in languages where the number of prefix-spaces can be any random number, I still hit tab most of the time and trust my editor to convert tabs to spaces where needed.
                                                                                                    • In the end I really just don’t care and I think this is kind of a non-discussion, because we have plenty of tools that can fix this for us. So if the language you are using is not depended on whitespace (python and Haskell are, but Java, C/C++ etc are not), then just use tabs and let the individual coder do whatever he or she prefers.

                                                                                                    However in defence of spaces:

                                                                                                    • Everything always looks the same way and as intended without any effort on just about every machine.

                                                                                                    I just don’t see why this should still be a problem or even a discussion in 2019.

                                                                                                    1. 16

                                                                                                      If that is the case, get out of your bubble and into the real world where you can encounter

                                                                                                      That’s going too far. I’ve met tons of programmers in lots of spaces. This site was the first site I learned stuff about blind or visually impaired programmers. This is the first time I’ve heard about this issue. My favorite use of the a11y tag so far. A charitable position is to just assume others might have not run into the same people or read the same articles as you.

                                                                                                      1. 5

                                                                                                        Fair enough….

                                                                                                        However, I ran into visually impaired CS students immediately in my freshman year of university. And there was at least one visually impaired student in each year. In fact: There were cohorts in which we had more visually impaired programmers CS students than we had female CS students. So I’ve been thoroughly aware of these issues, right from the start of my career.

                                                                                                        1. 4

                                                                                                          While I had met a few Deaf students during my studies at my university, I never met any blind person. My university also had an active Deaf culture, and I am familiar with their accessibility requirements. Perhaps people with different accessibility requirements choose the university more well known to have catered to people with similar requirements.

                                                                                                          1. 3

                                                                                                            That’s really interesting. I’d have not expected that.

                                                                                                            1. 5

                                                                                                              Maybe that is because my university had the facilities to accommodate visually impaired students at the science department. It’s something only the bigger ones can afford. And then they have to be willing to go the extra mile as well.

                                                                                                              Anyway: All I can say is that there seem to be more visually impaired programmers then one would expect if one were just to take a random sample of people from the general population.

                                                                                                              1. 9

                                                                                                                This, this, this. People often think disabled people don’t exist or are very uncommon in a space or discipline, not because it’s inherently so, but rather because the spaces those people have been in aren’t accommodating to disabled people, and so those disabled people went elsewhere! (Grumble grumble something about my school saying we didn’t need elevators because no disabled students attended anyway.)

                                                                                                                1. 2

                                                                                                                  Sometimes the issue is just plain and simple economics.

                                                                                                                  The costs of retrofitting an old building, if possible at all, with elevators are often prohibitively high. Even more so if the building is constructed from concrete. That probably plays a role as well when a statement like that is issued, but is left out by the speaker. This is because the speaker often assumes that the listener has the same background information as the speaker has, which is often not the case. This idea probably has a name already, but I am not aware of it. This is why empathy and the ability to read between the lines correctly, without making unnecessary assumptions are vital skills.

                                                                                                                  1. 3

                                                                                                                    Believe me, as the former treasurer of the student disability advocacy organization at Beloit College, I’m well aware of these economic factors. I was merely using that as another example of the effect you mentioned.

                                                                                                        2. 11

                                                                                                          blind people, whom perceive the digital world through a Braille-display

                                                                                                          Side tangent: I’ve never known a blind person in tech with a Braille display. Everyone I know uses Jaws, ZoomText or some other screen reader and headphones. One of my friends said he never liked Braille displays; how they were super expensive and didn’t work well with a lot of the software he used.

                                                                                                          The only place I’ve actually seen one of these was in the movie Sneakers.

                                                                                                          1. 1

                                                                                                            I have a (fully) blind relative which uses one for all interaction with a computer in combination with headphones and screen readers. It is apparently nearly impossible to type a regular letter or e-mail without a Braille display. The smartphones are the exclusive domain of just screen readers and voice typing though.

                                                                                                            1. 1

                                                                                                              Wait a minute, can’t blind people just touch type on a regular keyboard? I mean, I’m not blind, but that’s what I do. I arguably correct my errors faster, because I can see them on screen, but they could be nearly as fast by hearing their typos. Couldn’t they?

                                                                                                              1. 2

                                                                                                                That doesn’t work in a lot of cases, like coding or excel spreadsheets for example. Then there is also the fact that a moderately skilled reader, can read about 2 to 3 times as fast as they can process the text by hearing. Truly skilled readers can read about 5 times as fast. Screenreaders are capped at what our human auditory systems can process and visually impaired people can stretch the capabilities of their hearing to about 1,5 to 2 times the regular speed by setting the screen reader to a faster setting, but that still means they are capped at what the average person can achieve.

                                                                                                                If you provide them with a fast Braille display, that bottleneck disappears and then they can become as fast as regular people, provided that they did put up the required practice.

                                                                                                                1. 1

                                                                                                                  There’s the thing I don’t understand: how does a Braille display helps you type? You don’t need insane reading speed to process the 120+ words per minute you’re typing. Which would be a very high typing speed, but nevertheless slower than normal speech speed. And screen readers generally are even faster. The only way audio feedback could be too slow to keep up with your typing would be if you’re steno typing.

                                                                                                                  If you’re using a Braille display, you need to move your hands to the keyboard to type, and move them again to read what you just typed. And you can’t do them at the same time. If you’re using an audio feedback, you could hear what you’re typing, without any switching.

                                                                                                                  But I’m speculating here. How does your relative actually write text?

                                                                                                                  1. 4

                                                                                                                    First you’ll need to know that these devices usually provide multiple functions and that some of these Braille displays double as a Braille typewriter while others purely function as displays for computers, which are to be used in combination with a regular keyboard. Take a look at those links, you can get a general idea of what the workflow looks like by just looking at the pictures.

                                                                                                                    If you have a display that also lets you type in Braille, you can simply type out your characters that way and the corresponding characters will appear on the display and in the text file of the document. In this case the thumbs serve as the fingers that can be used for “reading”, just like you would use them to press the space bar, but some people also move their index fingers back an forth.

                                                                                                                    The display-only versions are basically used in a similar fashion and take the place of an RSI palm-rest below the keyboard.

                                                                                                                    The small buttons below the Braille cells are shortcuts which can position your text cursor immediately at that place of the specific character of the cell above so you can edit it. The other buttons are directional d-pads which are used to move the cursor around much like the regular arrow keys on a regular keyboard do, while the other buttons can be used to move through the lines of text on screen in four dimensions like next line, previous line, move contents of display 1 character left/right or move contents of display 40 characters left or right etc.

                                                                                                                    Visually impaired people can obviously touch-type, but that does not mean that they magically make less mistakes than we do. Then there is also the fact that screen-readers often mess up on pronunciation, or are downright incapable of dealing with a lot of edge cases.

                                                                                                                    And there is also the “reading” aspect that these devices enable. A lot of content is available in some form of digital text, but not in audio-book format (although this has gotten a lot better in de last 20 years). With a display like this, you can give a visually impaired person access to the entire internet and just about every webpage (as long as it’s low on JavaScript), text-file, epub or pdf out there.

                                                                                                                    The only real downside to these displays is that that are very expensive (about $3000 - $5000 depending on the version you are using) and that they are simply inaccessible to everyone without proper healthcare insurance.

                                                                                                                    1. 2

                                                                                                                      Okay, looks like the dual keyboard/Braille display is actually a chording keyboard. That kinda changes everything. Thanks for the lesson.

                                                                                                                      1. 1

                                                                                                                        Okay, looks like the dual keyboard/Braille display is actually a chording keyboard. That kinda changes everything.

                                                                                                                        That’s just one of the possible setup you can combine though.

                                                                                                                        Thanks for the lesson.

                                                                                                                        You’re welcome.

                                                                                                            2. 1

                                                                                                              From what I understand, Braille displays are much more common in Europa than the United States.

                                                                                                              1. 2

                                                                                                                Ah yes, all those braille displays on europa.

                                                                                                                1. 1

                                                                                                                  I know your reply has a sarcastic undertone, but ironically, you may be right on this one due to the difference in healthcare insurance between Europe and the United States. See my remark above. Funny enough it are American companies that usually produce these displays.

                                                                                                                  1. 4

                                                                                                                    I suspect his reply was a sarcastic way of pointing out that in English, Europa is a moon of Jupiter (and is, as far as we know, not colonized).

                                                                                                            3. 4

                                                                                                              Are the spaces people just now figuring this out?

                                                                                                              Some of us, yes. But that’s privilege for you: you don’t know you’re blinkered until you do.

                                                                                                              1. 4

                                                                                                                Don’t take this personally. A few hours ago the post was accompanied by a request from the poster which said something along the lines of: “I found this on hacker news, I want to know what reactions this community will provide.”

                                                                                                                I wrote my reply with that in mind.

                                                                                                                1. 4

                                                                                                                  Oh, I didn’t, but thanks for clarifying! :)

                                                                                                                  1. 4

                                                                                                                    The text was edited by the moderators; It was not my intention to mislead.

                                                                                                                    1. 2

                                                                                                                      I suspected that much. No offence taken…

                                                                                                                2. 1

                                                                                                                  Just out of curiousity, in what situations would it be advantageous to look at a hex dump of your source files instead of your source files in textual representation?

                                                                                                                  1. 1

                                                                                                                    I encountered this situation once when I was providing support for a server with a bunch of php scripts on it, where one of the files would not execute properly. It turned out that the file contained an UTF-8 byte order mark that was causing the problem. I discovered this by pushing the file through xxd and I noticed that the sections with spaces were less easy to interpret than the sections with tabs.

                                                                                                                    But I’ll admit, that this is not a situation you will run into often and that I just threw it in because it randomly popped up in my mind.

                                                                                                                1. 4

                                                                                                                  What I’m left wondering after this post is why it is that editors only support this with tabs. I get that with tabs its easier to implement but in a file that is consistenly indented with 4 spaces it shouldn’t be hard to render that with any amount of spaces you want per indent either right?

                                                                                                                  1. 2

                                                                                                                    The value zero (0) is a special case. It is not just an integer value, but can also be used to mean “no value” for all the types, and not just integers. If you create a variable and don’t put a value in it, it starts with the value 0.

                                                                                                                    I refuse to believe that the language is not an elaborate joke like INTERCAL but more subtle.

                                                                                                                    1. 5

                                                                                                                      If I remember correctly, Pike was used to write and extend the Roxen web server. Back in the 90s the choices if you did not want Apache, but needed a programmable web server (without CGI / FastCGI) were not that many.

                                                                                                                      1. 4

                                                                                                                        Roxen! That takes me back…

                                                                                                                        FWIW that company/product is named for the lake.

                                                                                                                        The lake is home to pike fish too :)

                                                                                                                      2. 4

                                                                                                                        I refuse to believe that the language is not an elaborate joke like INTERCAL but more subtle.

                                                                                                                        Read about Perl and its “zero but true” concept.

                                                                                                                        Normally in Perl, nonempty strings are boolean true, unless they’re parseable as numbers, in which case they’re parsed as numbers and that value is used. Boolean true and false are numbers, with 0 being false and everything else being true:

                                                                                                                        "" false (and numeric zero in numeric contexts)
                                                                                                                        "false" true
                                                                                                                        "true" true
                                                                                                                        0 false
                                                                                                                        

                                                                                                                        But Perl, oh Perl, has a magic string is that is not empty, not really parseable as a number, equal to numeric zero, and boolean true. The magic string

                                                                                                                        "0 but true"
                                                                                                                        

                                                                                                                        will get parsed as the number zero, but as boolean true. This is what’s returned from, e.g. system calls that return zero on success.

                                                                                                                        Other strings of this form may work, I can’t remember, but this form is hardcoded into the interpreter such that it does not cause warnings.

                                                                                                                        1. 3

                                                                                                                          To defend Perl here a bit I think it’s to accommodate the “return 0 for success” paradigm of the shell.

                                                                                                                          1. 2

                                                                                                                            I’m leading a deperlification project right now in fact. ;) The problem with Perl is that it went far beyond its intended scope of “AWK on steroids”. C’s NULL can be seen as a compromise since it’s a very old design after all and was meant to work on hardware that was slow even for its day. Pike is much newer and still seem to be intentionally designed to bring all the old classes of bugs into a new era.

                                                                                                                          2. 2

                                                                                                                            Is that that much worse than null?

                                                                                                                            1. 3

                                                                                                                              Well for one value types are all nullable now. So it is the same problem but also more so.

                                                                                                                              1. 1

                                                                                                                                Imo it’s a big difference that with null you at least know that it always means that there is no value where in this case it can get confusing for integer types.

                                                                                                                                1. 2

                                                                                                                                  I guess it just means integers have no “no value” value, and the null for other types is equal to a literal zero. Not saying I agree with the decision, but I don’t think it’s “elaborate joke” levels of bad.