• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics with the tag "development.software". Back to normal view
    1. Why does it seem that FOSS users don't value user-friendliness very much?

      The vast majority of free and open source software available is well known for being clunky, having very unintuitive UI/UX and being very inaccessible to non-nerds. We can see this in Linux...

      The vast majority of free and open source software available is well known for being clunky, having very unintuitive UI/UX and being very inaccessible to non-nerds.

      We can see this in Linux distros, tools, programs and even fediverse sites.

      I understand that a lot of it is because "it's free", but I also feel like a lot of people who make and use FOSS don't actually value user-friendliness at all. I feel like some of it is in order to gatekeep the less tech savvy out, and some of it is "it's good enough for me".

      What are the best theories for why this is the case?

      EDIT: A lot of replies I've been getting are focusing on the developers. I'm asking more why the users seem okay with it, rather than why the developers make it that way.

      67 votes
    2. Making infinite scrollable lists for web without a constantly expanding DOM

      A common theme in web development, and the crux of the so-called "Web 2.0" is scrolling through dynamic lists of content. Tildes is such an example: you can scroll through about 50 topics on the...

      A common theme in web development, and the crux of the so-called "Web 2.0" is scrolling through dynamic lists of content. Tildes is such an example: you can scroll through about 50 topics on the front page before you reach a "next" button if you want to keep looking.

      There's a certain beauty in the simplicity of the next/previous page. When done right it's fast, it's easy, and fits neatly into a server-side rendered model. However, it does cause that small bit of friction where you need to hit the next button to go forward -- taking you out of the "flow", so-to-speak. It's slick, but it could be slicker. Perhaps more importantly, it's an interesting problem to solve.

      A step up from the next/previous button is to load the next page of content when you reach the end of the list, inserting it below. If the load is pretty fast, this will hardly interrupt your flow at all! The ever-so-popular reddit enhancement suite does precisely that for reddit: instead of a next button, when you reach the bottom, the next page of items simply plops into place. If the loading isn't fast enough, perhaps instead of loading when they reach the last item, you might choose to load when they hit the fifth from last item, etc.

      To try to keep this post more concrete, and more helpful, here's how this type of pagination would work in practice, in typescript and using the Intersection Observer API but otherwise framework agnostic:

      /**
       * Allows the user to scroll forever through the given list by calling the given loadMore()
       * function whenever the bottom element (by default) becomes visible. This assumes that
       * loadMore is the only thing that modifies the list, and that the list is done being modified
       * once the promise returned from loadMore resolves
       *
       * @param list The element which contains the individual items
       * @param loadMore A function which can be called to insert more items into the list. Can return
       *   a rejected promise to indicate that there are no more items to load
       * @param triggerLoadAt The index of the child in the list which triggers the load. Negative numbers
       *   are interpreted as offsets from the end of the list. 
       */
      function handlePagination(list: Element, loadMore: () => Promise<void>, triggerLoadAt: number = -1) {
          manageIntersection();
          return;
      
          function handleIntersection(ele: Element, handler: () => void): () => void {
              let active = true;
              const observer = new IntersectionObserver((entries) => {
                  if (active && entries[0].isIntersecting) {
                      handler()
                  }
              }, { root: null, threshold: 0.5 });
              observer.observe(ele);
              return () => {
                  if (active) {
                      active = false;
                      observer.disconnect();
                  }
              }
          }
      
          function manageIntersection() {
              const index = triggerLoadAt < 0 ? list.children.length + triggerLoadAt : triggerLoadAt;
              if (index < 0 || index >= list.children.length) {
                  throw new Error(`index=${index} is not valid for a list of ${list.children.length} items`);
              }
      
              const child = list.children[index];
              const removeIntersectionHandler = handleIntersection(child, () => {
                  removeIntersectionHandler();
                  loadMore().then(() => {
                      manageIntersection();
                  }).catch((e) => {});
              });
          }
      }
      

      If you're sane, this probably suffices for you. However, there is still one problem: as you scroll,
      the number of elements on the DOM get longer and longer. This means they necessarily take up
      some amount of memory, and browsers probably have to do some amount of work to keep
      track of them. Thus, in theory, if you were to scroll long enough, the page would get slower and
      slower! How long "long enough" is would depend mostly on how complicated each item is: if each one
      is a unique 20k element svg, it'll get slow pretty quickly.

      The trick to avoid this, and to get a constant overhead, is that when adding new items below, remove the same number of items above! Of course, if the user scrolls back up they'll be expecting those items to be there, but no worries, the handlePagination from before works just as well for loading items before the first item.

      However, this simple change is where a key problem arises: inserting elements below doesn't cause any layout shift, but inserting an item above ought to--right?

      The answer is: it depends on the browser! Back in 2017 chrome realized that it's often convenient to be able to insert items into the dom above the viewport, and implemented scroll anchoring, which basically ensures that if you insert an item 50px tall above the viewport, then scroll 50px down so that there's no visual layout shift. Firefox followed suite in 2019, and edge got support in 2020. But alas, safari both on mac and ios does not support scroll anchoring (though they expressed interest in it since 2017)

      Now, there's two responses to this:

      • Surely Safari support is coming soon, they've posted on that bug as recently as April! Just use simpler pagination for now
      • Pshhhh, just implement scroll anchoring ourself!

      Of course, I've gone and done #2, and it almost perfectly works. Here's the idea:

      • Right before loadMore, find the first item in the list which is inside the viewport. This is the item whose position we don't want to move. Use getBoundingClientRect to find it's top position.
      • Perform the DOM manipulation as desired
      • Use getBoundingClientRect again to find the new top of that item.
      • Insert (or remove) the appropriate amount of blank space at the top of the list to offset the change in client rect (note that if there's scroll anchoring support in the browser this should always be zero, which means this effectively works as progressive enhancement)

      Now, the function to do this is a tad too long for this post. I implemented it in React, however, and combined it with some stronger preloading object (we don't need all the items we've fetched from the API on the DOM, so we can use before, onTheDom, after lists to avoid getting a bunch of api requests just from scrolling down and up within the same small number of items).

      What's interesting is that it still works perfectly on chrome even with scroll-anchoring disabled (via overflow-anchor: none), but on Safari there is still, sometimes, 1 frame where it renders the wrong scroll position before immediately adjusting. Because I implemented it in react, however, my current hypothesis is I have a mistake somewhere which causes the javascript to yield to the renderer before all the manipulations are done, and it only shows up on Safari because of the generally higher framerates there

      If it's interesting to people, I could extract the infinite list component outside of this project: I certainly like it, and in my case I do expect people to want to quickly scroll through hundreds to thousands of items, so the lighter DOM feels worth it (though perhaps it wouldn't if I had known, when starting, how painful getting it to work on Safari would be!).

      What do you think of this type of "true" infinite scrolling for web? Good thing, neutral thing, bad thing? Would you use it, if the component were available? Would you remove it, if you saw someone doing this? Are there other questions about how this was accomplished? Is this an appropriate post for Tildes?

      11 votes
    3. Tell me about your early experiences with debugging and software QA

      Are you an “old timer” in the computer industry? I’m writing a story about the things programmers (and QA people) had to do to test their software. It’s meant to be a nostalgic piece that’ll...

      Are you an “old timer” in the computer industry? I’m writing a story about the things programmers (and QA people) had to do to test their software. It’s meant to be a nostalgic piece that’ll remind people about old methods — for good or ill.

      For example, there was a point where the only way to insert a breakpoint in the code was to insert “printfs” that said “I got to this place in the code!” And all testing was manual testing. Nothing was automated. If you wanted a bug tracking system, you built your own.

      So tell me your stories. Tell me what you had to do to test software, way back when, and compare it to today. What tools did you use -- or build? Is there anything you miss? Anything that makes you especially glad that the past is past?

      C’mon, you know you wanted a “remember when”!

      8 votes
    4. Should I give up from programming?

      This is gonna be kinda of a personal mess. My background is in film. In Bahia, Brazil. I understand this is a very personal question with numerous factors to take in, some on which I'll absolutely...

      This is gonna be kinda of a personal mess.

      My background is in film. In Bahia, Brazil.

      I understand this is a very personal question with numerous factors to take in, some on which I'll absolutely not be able to convey.

      I'm not looking for any definitive life advice because I know that's impossible. I just wanna hear perspectives from some smart people that might help me understand my situation. I've recently been through a (kind of a) life and death situation. I'd be dead or with severe neurological trauma without a helmet.

      This made me rethink a lot of stuff about my goals and my life in general. I feel I can confide on Tildes, you people are usually caring and smart and awesome. I'm also a bit emotional, so please be gentle. Spending 24 hours on a hospital bed contemplating death and incapacitation kind does that too with you.

      I won't change many details because fuck it, I don't thank there are a lot of people in the world wanting to dox me. And Google already knows everything about me anyway.

      I have two very serious psychiatric diagnostics that impart my life in serious ways: bipolar disorder (type II, thankfully) and ADHD. I'm also suspected to be on the autism spectrum but I don't have the means to achieve this diagnostic. It would be useful anyway. These conditions seriously impact my ability to sustain a job for long periods and I have a hard time working with teams bigger than three (sometimes not even than).

      I live for free in my mother's conformable apartment, while I she actually spends most of the time on another continent. It's a pretty good deal. But I wanted to be independent.

      About two years ago I decided that work in film (my original major) would never provide me the financial independence I needed. Working in film means traveling a lot, infrequent hours, absurd exploration (its common to sleep 4 hours a day), and rampant drug use. I love film and do have a talent for it, but the environment is simply not conducive to my mental health.

      Of course, now I realize that computer science may also not be conducive to mental health issues at all. The thing is, really like. When I'm lisping, the real illogical world becames more bearable, and I feel in a wonderland of logic, reason, and calming predictabilidade. This doesn't happen as much with other languages such as Python. I also suck at it. So much that's not even funny. I'm addicted to Linux, Emacs, and the command line, but that's kinda it. I became a Vim/Emacs semi specialist. I don't see myself ever doing anything complex. It this my mind, really!

      I've been trying to program for almost 3 years and, beside my super awesome machine, I have nothing to show for myself. I try focusing on using things like Java or Python but I always get sidetracked trying to do some cool shit on Emacs.

      Sometimes I wonder if I should just assume that I won't be able to concentrate on anything else and just learn Emacs Lisp for real. It's frowned upon by a lot of people, but Emacs is a wonderful learning environment and at least I would be doing something. Maybe an interesting package that some people would like to use.

      Right now my choice seems to be between failing to study things that make me miserable (like OOP), but have clear professional possibilities, or focusing on something I actually like that might make a better programmer in the future.

      An important detail: I'm 38 years old and unemployed. My region is not very economically active in that area but I'm afraid to leave it because then I would lose my support network. And the mere notion of being with other people on a daily bases causes me panic attacks.

      And, as a reminder, studying programming with bipolar disorder ADHD is hard as fuck. My ADHD is so severe that I constantly forget what I'm doing withing seconds. That's probably why I like Lisp, which is more regular than other languages and I can get things more easily from context.

      On the other hand, I'm super charming (and not at all modest hahaha) and interesting at parties because my scattered interests make it possible to contribute meaningfully (and sometimes witty) to pretty much any conversation. My success with women is indirectly proportional to may financial troubles.

      Anyway, I know I said this was not about advice, but I kinda lied: what's your advice? Should I keep trying on something I'm not really talented at just because I like it (and it may bring financial rewards in the future).

      Or should I just give up and, try my hand at some shorts and even a novel? (I'm currently on a severe writer's block though, but I do have some talent for it).

      Maybe I could work from home, be some kind of sysadmin (in which case, what would be the quickest and cheapest way to do so?). I absolutely don't wanna create huge complex products, but managing thinks remotely would be awesome.

      I also love philosophy and logic, and, if became suddenly rich, that's what I'd do for the rest of my life. Oh, well.

      12 votes
    5. How do you design a Proof of Concept project for a new dev/test tool?

      Input wanted for an article. Let's say that your company is considering the purchase of an expensive new application to help in the company's software development. The demo looks great, and the...

      Input wanted for an article.

      Let's say that your company is considering the purchase of an expensive new application to help in the company's software development. The demo looks great, and the feature list makes it sound perfect for your needs. So your Management arranges for a proof of concept license to find out if the software is worth the hefty investment. The boss comes to you to ask you to be in charge of the PoC project.

      I'm aiming to write an article to help developers, devops, and testers determine if a given vendor's application meets the company's needs. The only assumption I'm making is that the software is expensive; if it's cheap, the easy answer is, "Buy a copy for a small team and see what they think." And I'm thinking in terms of development software rather than enterprise tools (e.g. cloud-based backup) though I suspect many of the practices are similar.

      Aside: Note that this project is beyond "Decide if we need such a thing." In this scenario, everyone agrees that purchasing a tool is a good idea, and they agree on the baseline requirements. The issue is whether this is the right software for the job.

      So, how do you go about it? I'm sure that it's more than "Get a copy and poke at it randomly." How did (or would) you go about designing a PoC project? If you've been involved in such a project in the past (particularly if the purchase wasn't ideal), what advice could someone have given you to help you make a better choice? I want to create a useful guide that applies to any "enterprise-class" purchase.

      For example: Do you recommend that the PoC period be based on time (N months) or workload (N transactions)? How do you decide who should be on the PoC team? What's involved in putting together a comprehensive list of requirements (e.g. integrates with OurFavoredDatabase, meets performance goals of X), creating a test suite that exercises what the software dev product does, and evaluating the results? ...and what am I not thinking of, that I should?

      7 votes