• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. Anyone wanna play a TTRPG?

      My old TTRPG group hasn’t met in months now, and listening to actual play podcasts only scratches the itch. Probably a long shot given the size of the site, but anyone interested in playing a...

      My old TTRPG group hasn’t met in months now, and listening to actual play podcasts only scratches the itch.

      Probably a long shot given the size of the site, but anyone interested in playing a TTRPG sometime soon?

      I’m thinking something easy and low pressure, like Stewpot, or Fiasco or maybe a world builder like the Quiet Year/Microscope/Anomaly/The Ground Itself; I have the PDF for most of those.

      But hey, if you have something you’ve been waiting forever to play: I’m here for it.

      I have literally nothing to do tomorrow so drop a message if you’re interested! I’m in CST

      13 votes
    2. What do I need to know switching phones from Blackberry 10 to Android?

      Inspired by a similar thread @kfwyre posted a while ago. I've been given an Android phone for a work contract and I don't want to carry two devices, so I will likely migrate from my Blackberry Z10...

      Inspired by a similar thread @kfwyre posted a while ago.

      I've been given an Android phone for a work contract and I don't want to carry two devices, so I will likely migrate from my Blackberry Z10 soon. The BB10 OS (not to be confused with BBOS, which ran the Bolds, etc. of BB's heyday) was intuitive, useful, and wayyyyy better than most people who never used it would have expected, only being doomed by the app gap. I'd have considered buying another Blackberry this year if I hadn't been given this other phone. I have long been wary of Android due to both privacy concerns and UI/UX gripes. Having tooled around for a couple days already, I'm struck by how many simple things I apparently can't do out of the box, and the fact that there are so. many. ads. Even in the apps! I know I will root and de-Google the device as much as I can once I get a hang of the OS.

      So, I'm mainly looking for app recommendations, but general advice is appreciated as well. My use case is very functional - email, scheduling, messaging, browsing, navigation, weather, and calls. Preference given to FOSS and/or ad-free apps, but I'll pay up if it's really worth it. So far I've uninstalled a bunch of bloatware, installed Firefox, found SwiftKey to be the only half-decent replacement for Blackberry's terrific keyboard software, and the best free no-ad weather app looks to be a Norwegian one called Yr.

      9 votes
    3. Help with Google accounts authentication on iOS/iPadOS

      Edit: This was resolved by @tomf (cf. this comment). Google’s account authentication appears to broken for me for some reason. I have several devices and several Google accounts accumulated over...

      Edit:

      This was resolved by @tomf (cf. this comment).


      Google’s account authentication appears to broken for me for some reason.

      I have several devices and several Google accounts accumulated over the years.

      Accounts:

      1. Work Google account (this was set up by IT staff at the company where I work as they are a paying enterprise Google services customer)
      2. Undergraduate University account (this was set up when I attended undergrad, where the University is a paying Google services customer)
      3. Graduate University account (this was set up when I attended for grad school, where the University is a paying Google services customer)
      4. Personal Google account (this was set up a long time ago, it’s just a non-paid, consumer Google account)

      Under iOS and iPad OS, Google apparently asks you to download the official Google app in order to sign in and “trust” devices, so that they can send you prompts to acknowledge when you sign in on other devices. There is also the Google Authenticator app that lets you do traditional 2FA.

      Further background, I got an iPhone 12 Pro circa October 2020. I gave my old iPhone handset to my dad (after signing out of everything and resetting it according to Apple’s instructions). Ever since, I’ve been having issues with logging into my Google accounts from the new iPhone, my iPad, and my Mac (provided by work). I’m actually afraid to log out of my work Google account on my work Mac, because I’m afraid I won’t be able to log in again, and that would prevent me from being able to get work done.

      For example, let me walk through the steps I would normally take to log in to my Undergraduate University Google account on my iPad:

      1. Open the Google app
      2. Tap user icon in top right corner
      3. From the modal menu, tap the downward chevron (circled in red)
      4. Tap “Add another account” (circled in red)
      5. Tap “Continue” on the confirmation widget when prompted
      6. Enter the Gmail address for the account in the provided “Email or phone” input box and tap “Next”
      7. At this point, I wait for the progress indicator (the blue bar with the red arrow pointing to it) to indefinitely traverse from left to right over and over again and I cannot progress further.

      Virtually the same steps can be reproduced from my iPhone by going to accounts.google.com from any browser (I’ve tried Safari and Chrome).

      The same sort of authentication redirect from accounts.google.com happens when trying to add my associated Gmail accounts to my iOS devices from the Settings > Mail > Accounts > Add Account, and similarly stalls at the same point.

      I’ve tried logging out of my accounts from my personal Mac where I can still log in from google.com, and also tried going into the security settings for the accounts and disabling, then re-enabling 2FA (I can receive the text message with the code to associate my iPhone as a second factor authenticator, so Google knows my phone number).

      Google’s support documents don’t provide any guidance on this situation where the accounts.google.com authentication hangs, and there seems to be no way to contact a human being at Google to provide technical support. I’ve searched their help portal/forums, and found nothing similar to my issue. They point me down a tree that ends here, which is not useful to me.

      If Google’s services don’t work for you, it seems to be your problem, not theirs. I get that I’m not paying for their services, so it is totally unreasonable for me to expect any sort of technical support from Google. But, at the same time, it seems very strange that I am alone in my use case of simply trying to log into my accounts that have worked for years in the past without issue.

      Anyone have advice on next steps?

      5 votes
    4. How to deal with a stupid email situation?

      My spouse and I own a condo. The property management company that the home owners' association hired is generally mediocre (which is a huge step up from the usual scenario where most are actively...

      My spouse and I own a condo. The property management company that the home owners' association hired is generally mediocre (which is a huge step up from the usual scenario where most are actively awful). They do a reasonably good job of keeping us informed, but they way they do it is hilariously bad. Every email they send is sent as a .jpg and a .docx file with no actual text in the message. My email client renders it and I can read it, but it makes all of their emails unsearchable, and it makes filtering beyond the basic "emails containing address x" impossible.

      I've asked them personally several times both electronically and in writing to please stop sending such correspondence and just send a regular email. (I honestly don't care whether it's plain text or HTML, just so long as it's searchable and filterable.) But it's so far been to no avail. I brought it up at the last HOA meeting and they agreed to also include their messages as text in the body of the email, but they don't. If I'm really lucky they'll have one or two sentences in text, but the rest is a .jpg and a .docx (or .pdf) of the actual body of the message. I've tried to explain that this is bad for people with disabilities and may even run afoul of the Americans with Disabilities Act, but they didn't seem to care.

      It's not clear to me how one ends up sending emails in this form. I don't use any Microsoft products, which they probably can't comprehend, but I suspect this is some sort of Windows thing. Does anyone know how this happens and why? And more importantly, does anyone have suggestions for getting them to stop?

      14 votes
    5. Does reformatting an ext4 partition fix bad sectors, and what are they anyway?

      My Linux desktop is having a bit of difficulty with bad sectors. Lately I've had to boot into recovery and run an fsck a few times to try to fix a problem where the OS drops into read-only mode at...

      My Linux desktop is having a bit of difficulty with bad sectors. Lately I've had to boot into recovery and run an fsck a few times to try to fix a problem where the OS drops into read-only mode at the drop of a hat. Today I tried copying some files from one directory to another and got the following error message:
      cp: error reading "foo/bar": Input/output error

      I've just booted into a live USB and run fsck /dev/sda1 -c and it fixed a load of bad sectors, but the above error message is still happening.

      A bit of googling tells me that this is down to bad sectors on the SSD, and I'm not really sure what that means. Is anybody able to enlighten me? And as a follow-up question, would reformatting the hard drive resolve the problem, or are there any other things I can try to fix it?

      9 votes
    6. Day 19: Monster Messages

      Today's problem description: https://adventofcode.com/2020/day/19 Join the Tildes private leaderboard! You can do that on this page, by entering join code 730956-de85ce0c. Please post your...

      Today's problem description: https://adventofcode.com/2020/day/19


      Join the Tildes private leaderboard! You can do that on this page, by entering join code 730956-de85ce0c.

      Please post your solutions in your own top-level comment. Here's a template you can copy-paste into your comment to format it nicely, with the code collapsed by default inside an expandable section with syntax highlighting (you can replace python with any of the "short names" listed in this page of supported languages):

      <details>
      <summary>Part 1</summary>
      
      ```python
      Your code here.
      ```
      
      </details>
      
      10 votes
    7. Vimeo is not very good

      (This is kind of a rant about Vimeo's website. It might be better in ~tech, or ~comp. Feel free to move it.) I've always preferred using Vimeo to YouTube for finding interesting videos because...

      (This is kind of a rant about Vimeo's website. It might be better in ~tech, or ~comp. Feel free to move it.)

      I've always preferred using Vimeo to YouTube for finding interesting videos because it's more oriented towards artists than people just uploading random stuff. As mentioned in the recent What Creative Projects Have You Been Working On? thread, I had some nature videos I shot of hummingbirds and wanted to upload them somewhere. My spouse had uploaded videos to Vimeo before, so I thought I'd put them there rather than YouTube because I don't like dealing with Google.

      The site is a hot mess. I've hit the following problems after lightly using it for 2 days. I uploaded a single video and set it to be public:

      • No way to enter keywords or tags. Searching will only find your video if you mention the search terms in your title (and maybe your description).
      • Some of their own pages are broken or missing. If I go to "categories" and click on "documentary" it shows me an error message saying the page doesn't exist. If I click on "arts" or "music" I go to that category and see videos available.
      • No information on how to add your video to a given category. Is it done automatically? Is it done by someone on the staff noticing and adding it? I have no idea!
      • My video has gotten a few views from people here, so it is uploaded and available for anyone to see. But if I search for "hummingbird" and limit the search to videos uploaded in the last 7 days, my video is not displayed. Why not? Who knows?
      • I ran the iOS app without logging in and it showed my account but said I had no videos, even though others were able to see them. Logging in shows the videos and confirms that they are set to allow anyone to view them. WTF?
      • I attempted to send them a message telling them about the broken links. When you go to the help section and click on "Contact Us," you get a fake chat window that's just a bot that will pick keywords out of your question and reply with articles that don't answer your question. In fact, they even ask below each one, "Does this answer your question?" with a button for yes and nothing else. There's no way to say, "No, this was unhelpful." If you scroll to the bottom of the list of articles they recommend, there's a button to send a message to their tech support.
      • I'm on the free tier, so I wasn't expecting any sort of answer to my help question, but still wanted to let them know so they could fix it. But that didn't work either. They have enough sense to copy your question from the chat bot into the tech support form (nice!) but it strips out any URLs. (Thanks! Very useful since I was trying to report a broken URL!) But it doesn't matter anyway because after you choose a category (none of which are correct) and attempt to submit your form, nothing happens. You press "Next" and the button turns into a spinner for a few seconds, and then stops and turns back into the "Next" button. Nothing appears to have been submitted, but no error is presented.
      • The site is full of dark patterns. I get that they want upgrade revenue coming in, and I have no problem with that. But they do things like have a blinking icon in your video's settings for "interaction tools." These are things you can do to monetize your video, or whatever. Stuff I will never need. All the options in this section require a paid upgrade and there's no way to turn off the blinking beacon (except, I assume, by upgrading).

      I was considering upgrading to their bottom-tier paid account, but after seeing how much is broken, I have to wonder if they're circling the drain? I get using chat bots and forms to make it easier for their support people, and making sure users know about ways to upgrade, but this is ridiculous. Anyone else run into this?

      26 votes
    8. I can't make it any clearer. Any advice?

      Last Thursday, at my workplace, we rolled out a software upgrade across the company. The server side was upgraded overnight to ensure there was minimal downtime, and we had instructions for users...

      Last Thursday, at my workplace, we rolled out a software upgrade across the company. The server side was upgraded overnight to ensure there was minimal downtime, and we had instructions for users posted on our Intranet (pinned to the top for the next 4 days), on exactly what they needed to do to run the upgrade on their PCs and ensure everything was working correctly.

      The instructions were written with the help of my 4-year-old to ensure it was clear enough for anyone to read and follow along.

      I still received at least 40 messages and emails from people complaining the upgrade didn't work or that certain Outlook plugins are now missing (which was covered in the instructions).

      My question is, has anyone found a good way to ensure people follow instructions, or the best way to ensure that your instructions are easy to understand and follow along with?

      It is very frustrating to take the time to ensure things go smoothly and write what even my 4-year-old thought was clear instruction, and still have a third of the company not be able to figure it out?

      This is not meant to be mean hearted in any way, I genuinely would like some advice or tips on how I can improve on this the next time around.

      Thanks.

      16 votes
    9. Tildes Census Deep Dive - What do you dislike about Tildes?

      What do you dislike about tildes? Overview I read through the 'what do you dislike about tildes?' responses and attempted to classify them. A link to the excel document containing one row for each...

      What do you dislike about tildes?


      Overview

      I read through the 'what do you dislike about tildes?' responses and attempted to classify them. A link to the excel document containing one row for each comment, a classification, and totals is provided. I figured a deep dive into this question (I am considering doing a deep dive on the other end of the spectrum - what do you like about tildes) may provide some insight on how we, as a community, can strive to be better.

      Here's what I found:

      Total number of free-text comments: 181
      No comment, N/A, "nothing", etc.: 14

      Category Count
      Too small 74
      Diversity 39
      Intolerance 14
      Tech-centric 14
      Website Functionality 14
      Elitism 12
      Federation 2
      Too serious Not serious enough
      12 1
      Politics - too left Politics - too right
      4 2

      Tildes is too small

      44% of the user-base indicated that they felt that Tildes was currently too small. There's really not a lot to be said here, other than a large number of those who filled out the survey wanted to express that they felt Tildes should still continue to grow.

      I think a major point of discussion here should be around how best to grow. What do you like about tildes is not covered in this post, but some common themes are around enjoying the discussion and the community. Many individuals also seem to like the small community, showing an interesting division between a like and dislike of the size. From my own perspective, I enjoy how I recognize and see many of the same users on this website, but I also don't enjoy how the size leads to a lack of diversity and content.


      Diversity, Tech-centric

      Both of these topics are hitting on the same fundamental problem, which could be seen as an extension of the size of Tildes, but really refers more to who is using Tildes, rather than how many users. There is a lot of overlap between these two classifications, but sometimes people mention the tech centrism as a problem of content (too many tech/computing discussions) and not a problem of culture. In these cases there's not complete overlap.

      Many individuals commented both on the size of the community and the diversity. Overall, roughly 23% of individuals who responded commented in some fashion on the lack of diversity on the website. The general sentiment from people who commented on the need for diversity was that Tildes was white, male, and working in tech. Given that the survey found 86% of us are male, the majority work in STEM and are primarily based in the US, this is not a very surprising finding.

      An important point of reflection comes out in some of the longer form comments here and I think is also captured in many people who felt that tildes was "too serious" - discourse is firmly rooted in STEM interests. Several comments discussed a desire to see more artistic/creative discussions. There was also a strong sentiment for more non-US centric discussion. Interestingly (and perhaps described by our rather large LGBTQ+ contingent), diversity mostly focused on the dominance of male opinions (sometimes I wonder how people know what gender is behind a username unless they specifically state so) and the only comment on LGBTQ+ diversity was that there was a "lack of posts about anything other than tech or lgbt+ politics".


      Intolerance

      Intolerance is the unwillingness to accept views, beliefs, or behavior that differs from one's own. Many comments talked about users 'talking past' each other, getting into long bickering arguments that went nowhere, or targeted harassment of some sort. Several people mentioned specific users or powerusers not operating under good faith, and users which annoy or are hostile towards them.

      If a user is being hostile to you, please report their comments.

      While only 8.4% of us reported intolerance as being something they actively disliked, it is troublesome to see. I don't have a good frame of reference of what an 'acceptable' level is, because you're bound to have some people who are more emotionally sensitive than others and confrontations that don't always end the way you want them to. I hope we can discuss this in a broader context, however, because I have personally seen what I believe is an increasing number of intolerant posts often masquerading as 'honest discourse'. Whether this is me jumping to conclusions about potential alt-right trolls (which I do not discount) or an actual increase in not-so-good-faith arguments, I don't know, and would like to hear how you all feel.

      As an aside, I wonder if I'm included in any of these lists of annoying powerusers, or if I was the one who 'picked a fight' with someone and got their 'comments deleted and that REALLY annoyed me'. If I am, please send me a message. I greatly enjoy most of you but I also know that I'm human and make mistakes and whether I agree with you or not, it's not cool to forget the human on the other side of the computer.


      Elitism

      Generally speaking any comments around power-users or some users believing their opinion, culture, or viewpoint is more important or more correct landed the comment in the category of elitism. Certain users being 'combative', 'bickering', and 'pedantic' came up several times. With regards to powerusers, they were generally mentioned alongside some form of narcissism or a 'holier-than-thou' attitude. Reddit hivemind or a lack of diversity was also sometimes cited alongside complaints of elitism.

      I used to be much worse when it comes to this, and the constant back and forth with people who will not have their viewpoint changed. I believe I've learned to tailor this and cut off conversations sooner, but I know that some individuals can at times get under my skin, particularly when they are being actively harmful to minorities or other groups with limited power, speech, or representation. With that being said, I wonder how best we can provide a culture to teach others to limit their responses when they go nowhere. There was at least one mention of how limiting the response rate between individuals had cut off two users who were always bickering over politics, so perhaps a more aggressive form of this?

      But I also wonder what we can't do as a community together to actively recognize and point out when two people are not able to reach an agreement and to jump in and mediate or otherwise help them to stop a pointless argument.


      Website Functionality

      Several people commented on a lack of a mobile app, a want for embedded images and videos, and the voting system. Other suggestions - comment threading, user blocking, differentiation between reasons why a post was bumped in the activity feed (?), mobile design (easier to click links), a desire for a more robust topic log, and that the website is too minimalist/sterile.


      Tildes is too serious

      Only a single person complained that tildes was not serious enough (or perhaps not, you decide... they said, "increasing creep of low effort posts"). The majority of posts complaining about tildes being too serious were often also complaints about people bickering. When it wasn't about how users interacted, it was about the form of dicussion available - people often brought up the "meaningful conversation" portion of the tildes documentation and culture, but often had a desire to have memes, shitposts, humor, or some outlet for conversation that isn't as effort based. Perhaps they like the culture and just want to do more with the people here? Perhaps they simply want to get to know their fellow users in a way they can't currently.

      From my own perspective, I'd love to see more memes and humor. I tend to shitpost a lot on the unofficial discord. I've seen quite a few of you all on there as well, and would highly recommend it to anyone who feels like they want to get to know other users better.


      Politics

      More people complained about Tildes being too left than too right, which makes sense given the aggregated political compass from the survey. I think more people complained about there being too much politics than commented on politics whatsoever. I'm leaving this section relatively small because I'm not sure this is something that needs significant discussion at this point. But if you feel strongly, please help to direct a discussion in this thread.


      Post-script

      I hope you all found this analysis useful and a good starting point for discussions. I really do love this platform and have found it to be quite literally life changing. If you found it useful and want to return the favor, check out my soundcloud

      50 votes
    10. Ubisoft Forward - September 2020

      Ubisoft's event today just finished up. Here's the full video if you want to watch (there's a pre-show of an hour that I skipped past), but here are all the individual videos/trailers from the...

      Ubisoft's event today just finished up. Here's the full video if you want to watch (there's a pre-show of an hour that I skipped past), but here are all the individual videos/trailers from the event:

      Yeah, the titles are a mess, but I'm just using the video titles from YouTube.

      5 votes
    11. Tele-health privacy concerns are a barrier to therapy

      Here in the States, you hear about your insurance company waiving co-pays for tele-health therapy visits in these “uncertain times,” but searching for providers confronts you with even more...

      Here in the States, you hear about your insurance company waiving co-pays for tele-health therapy visits in these “uncertain times,” but searching for providers confronts you with even more uncertainty. How do you evaluate their practices for safety and privacy? Every other practitioner subscribes to a different platform. Some, to my horror, use Zoom. Others have adopted a software suite to manage their entire practice. These therapists rely on the same company for scheduling appointment reminders, recording session notes, billing insurance, and running a video chat. When I have requested to connect via Signal, they express a preference for their platform, usually citing HIPAA compliance. One recommended a finding a provider who uses paper records as the only avenue open to me. But wasn’t there a time before companies like Spruce, SimplePractice, and TheraNest, where sensitive session notes were somehow distinct, less “networked” than today? How are therapists determining the privacy and security protections of their platform? How do I? Does anyone have experience with these companies?

      13 votes
    12. A brief look at programming paradigms

      Overview If you've spent any significant amount of time programming, then you've probably heard discussions about imperative, functional, and declarative programming. These discussions are often...

      Overview

      If you've spent any significant amount of time programming, then you've probably heard discussions about imperative, functional, and declarative programming. These discussions are often mired in technical knowledge and require a fair amount of intuition when trying to grasp the differences between the examples placed in front of us. These different programming styles, usually called programming "paradigms", are discussed as if they exist within a vacuum with complete and total isolation from one another. This only furthers the confusion and frustration among newer programmers especially, which runs counter to the goal of instructing them.

      In this post I'll be taking a look at the oft-neglected intersections where these paradigms meet with the hope that the differences between them will be better understood by reframing our existing knowledge of programming basics.

      Note: I'll be using PHP for my code examples and will try to provide comments when necessary to point out language quirks.


      Understanding Fundamentals is Imperative

      Let's start by first reviewing the most basic, fundamental programming paradigm: imperative programming. The term is a bit strange, but the important thing to understand about it is that imperative programming refers to writing software as a series of instructions where you tell the computer how to solve a specific task. For example, if we need to add together a bunch of numbers inside of an array, we might write code that looks like this:

      $numbers = [ 8, 31, 5, 4, 20, 78, 52, 18, 96, 27 ];
      $sum = 0;
      foreach($numbers as $number) {
          $sum += $number;
      }
      

      This is a pretty typical example that you've probably encountered in some form or another at some point in your programming studies or career--iterate over an array one element at a time from the first element to the last and add the current element to some accumulating variable that starts at 0. The kind of loop you use may differ, but the general format of the solution looks the same. This is very similar to the way the computer itself performs the task, so the code here is just a relatively human-friendly version of the actual steps the computer performs. This is the essence of imperative programming, the basic building blocks of everything you learn early on.


      Abstract Concepts

      As the software we write gets larger and more complex, we then tend to rely on "abstractions" to simplify our code and make it easier to understand, reuse, and maintain. For example, if we've written a program that adds arrays of numbers together, then we probably aren't doing that in only one place. Maybe we've written a tool that generates reports on large data sets, such as calculating the total number of sales for a particular quarter, gross profit, net profit, remaining inventory, and any number of other important business-related metrics. Summing numbers could be so common that you use it in 30 different places, so to avoid having to maintain 30 separate instances of our number adding code from above, we define a function:

      function sum($numbers) {
          $sum = 0;
          foreach($numbers as $number) {
              $sum += $number;
          }
      
          return $sum;
      }
      

      We do this so frequently in our code that it becomes second nature. We attach so many names and terms to it, too: DRY, abstraction layers, code reuse, separation of concerns, etc. But one thing experienced programmers learn is to write their functions and object and interface methods in such a way that anyone who uses them doesn't need to care about the underlying implementation details, and instead only need to worry about the method name, expected arguments (if any), expected return type (if any), and expected behavior. In other words, they don't need to understand how the function or method completes the intended action, they only need to declare what action they want performed.


      A Declaration of Understanding

      Anyone who has looked into the concept of the declarative programming paradigm should find those last words familiar: "they don't need to understand how the function or method completes the intended action, they only need to declare what action they want performed". This is the oft-touted explanation of what declarative programming is, the difference between detailing "how" and declaring "what", and I believe that it's this great similarity that causes imperative and declarative programming to become heavily entwined in a programmer's mind and makes it difficult to understand. Take this common example that authors tend to use to try to detail the difference between declarative and imperative programming:

      // imperative
      function sum($numbers) {
          $sum = 0;
          foreach($numbers as $number) {
              $sum += 0;
          }
      
          return $sum;
      }
      
      // declarative
      function sum($numbers) {
          return array_reduce($numbers, fn($x, $y) => $x + $y, 0);
      }
      

      The authors will go on to state that in the imperative example, you tell the computer how to sum the numbers, whereas in the declarative example you don't tell the computer how to do it since you don't know anything about the reduce implementation, but intuitively it still feels as if you're telling the computer how to perform its task--you're still defining a function and deciding what its underlying implementation details are, i.e. the steps it needs to take to perform the task, even if its details are abstracted away behind function or method calls that could have varying implementation details of their own. So how the hell is this any different from defining functions like we do in imperative programming?

      The answer is simple: it isn't. We've used so many names and terms to describe functions and methods in our ordinary imperative programming, but the truth is that a well-defined function or method serves as a declarative interface to an imperative implementation. Put differently, declarative programming is defining and utilizing simple interfaces that describe what you want accomplished while the underlying implementation details are inevitably written using imperative code.


      Functional Differences

      Now we can finally tackle one of the biggest trends in programming right now: the functional programming paradigm. But to understand this paradigm, it's important to understand what a "function" is... from a mathematical perspective.

      Yes, I know, math tends to be a enthusiasm sink for many, but don't worry, we're not actually going to be doing math. We only need to understand how math treats functions. Specifically, math functions usually look something like f(x) = {insert expression here}, which is loosely equivalent to the following code:

      function f($x) {
          return {insert expression here};
      }
      

      The important thing to note about functions in math is that you can run them a theoretically infinite number of times on the same input x and still get the same return result. Unlike in a lot of the programs we can write, math functions don't produce side effects. Files aren't written to or destroyed, database entries aren't deleted, some global counter somewhere isn't incremented, and your x doesn't suddenly change. The idea behind functional programming is to embody some of that nature of mathematical functions because they're predictable and always reproducible, and therefore simple to test as well. For example, take the following:

      // not functional
      function increment(&$x) { // pass by reference--$x will be modified outside of this function!
          $x++;
      }
      
      $x = 1;
      increment($x);
      increment($x);
      increment($x);
      
      // functional
      function increment($x) { // pass by value--$x will NOT be modified outside of this function!
          return $x + 1;
      }
      
      $x = 1;
      $y = increment($x);
      $y = increment($x);
      $y = increment($x);
      

      Note that the first example will change the value of $x on each call, meaning each subsequent call of increment($x) produces a different result. Meanwhile the second example doesn't change $x and so the return value of increment($x) is always the same. This may seem like a silly example, but in larger, more complex software this can be significant. So now that we have an understanding of functions from a mathematical perspective, we have everything we need to actually understand what functional programming is.

      Functional programming is a subset of declarative programming. Just like in declarative programming, you use simple interfaces to tell the program what you want to do rather than how to do it. But unlike declarative programming as a whole, functional programming imposes some additional restrictions on what you should and shouldn't do:

      • You should encapsulate behavior in pure functions, which always give a consistent output for a given input and don't have side effects.

      • You should write functions in such a way that you can compose them together, allowing you to combine and chain behavior to produce new functions or use the output of one as the input for another.

      • You should avoid side effects as much as possible.

      • You should avoid mutable state (e.g. changing the values in a variable).

      • You should avoid sharing state between components.

      These restrictions would require an entirely separate post on their own to properly cover and have been covered so many times in so many ways by others elsewhere that it would be superfluous for me to try to add anything more. It's important to note, however, that these restrictions are imposed because they provide some key benefits. By avoiding side effects and by avoiding mutable and shared states, the code you write becomes more predictable and tracing the behavior of an algorithm becomes far simpler. By writing pure, composable functions, you create reusable building blocks that can be strung together in virtually any configuration with predictable results. This makes writing, reading, maintaining, and debugging code easier and less error-prone.

      That said, I feel that it's important to note that in the real world when writing practical software that users can interact with, it's simply not possible to completely avoid side effects or mutable state. The very act of creating and updating database entries is itself an act of mutating state, which runs contrary to functional programming principles and is essential for many important software projects. But even if you can't adhere strictly to functional programming principles, it's possible to benefit significantly from being aware of them and integrating them into your own software development strategies.

      Let's consider a more practical example to illustrate this. Imagine that you've built a social media website and you're trying to test a push notification system that will be triggered when your user receives a new message. Now imagine your code and unit tests look something like this:

      function sendNotification(&$message) { // pass by reference--$message will be modified outside of this function!
          $notification_system = new NotificationSystem();
          if(!$message['sent_push_notification']) {
              $notification_system->sendPushNotification($message);
              $message['sent_push_notification'] = true;
          }
      }
      
      function testSendNotification() {
          $message = [
              'user_id'=>'{some_id}',
              'contents'=>'Hi!',
              'sent_push_notification'=>false
          ];
      
          sendNotification($message);
          sendNotification($message);
      }
      

      At a quick glance you probably wouldn't be aware of why the second message didn't send, but the fact that our sendNotification() function mutates the state of the data provided to it is the culprit. This is code that doesn't adhere to functional programming principles since the data provided to it is mutated. As a result, running the function multiple times on the same variable doesn't result in the same behavior as the first call. If we wanted to work around this without adhering to functional programming principles then we would need to manually set $message['sent_push_notification'] = false; between function calls, which makes our unit tests potentially more error-prone. Alternatively we can make a simple change to adhere better to those functional principles:

      function sendNotification($message) { // pass by value--$message will NOT be modified outside of this function!
          $notification_system = new NotificationSystem();
          if(!$message['sent_push_notification']) {
              $notification_system->sendPushNotification($message);
              $message['sent_push_notification'] = true;
          }
      
          return $message;
      }
      
      function testSendNotification() {
          $message = [
              'user_id'=>'{some_id}',
              'contents'=>'Hi!',
              'sent_push_notification'=>false
          ];
      
          sendNotification($message);
          sendNotification($message);
      }
      

      Now both notifications will be sent out, which is what we would intuitively expect. You should also notice that the above is also a blend of imperative, declarative, and functional programming. Our function definitions have imperative code, our sendNotification() function adheres to the functional programming principle of avoiding mutable state (well, mostly), and our NotificationSystem object provides a declarative interface for sending a push notification for a message.


      Final Thoughts

      By viewing these three paradigms not as completely separate concepts but as layers on top of one another, where functional programming is a type of declarative programming which is implemented using imperative programming, we can stop being confused by their similarities and instead find clarification in them. By understanding that imperative programming is the backbone of everything, that declarative programming is just simplifying that backbone with simple interfaces, and that functional programming is simply adding some additional guidelines and restrictions to the way you write code to make it more consistent, reusable, and predictable, we can start to see that we're not choosing one programming paradigm over another, but instead choosing how much consideration we place on the design of the programs we write. Except in purely functional languages, functional programming isn't some alien concept distinct from imperative or declarative programming, but is instead a natural evolution of the two.

      There are a lot of details I've glossed over here. Each of these programming paradigms is far too detailed to include a proper analysis in an already lengthy post that tries to separate them from each other and clarify their differences. Blog articles exist in a thousand different places that can do each one far more justice than I can, and programming languages exist that completely cut imperative programming out of the picture. But for your average programmer slinging JavaScript, C, Rust, PHP, or what have you, I hope that this serves as a crucial starting pointing to understanding just what in the hell these functional programming enthusiasts are on about.

      25 votes
    13. I can't invite anyone

      I never invited anyone, but the message says You aren't able to generate more invite links right now.. I've been on Tildes for about a month now. Please advise.

      8 votes
    14. What has/have your government/school/college/teachers done to keep education flowing during this pandemic?

      Admittedly keep education flowing is some corporate language. The only people who care about education are left-wing politicians and the actual teachers, neither of which matter now. Anyway, my...

      Admittedly keep education flowing is some corporate language. The only people who care about education are left-wing politicians and the actual teachers, neither of which matter now.

      Anyway, my state government is broadcasting classes with 3 subjects from around 2PM to 4-4:20PM. The last subject of the day (3:30PM until the end) is only broadcast on the app they made and their YouTube channel unfortunately. All the classes are uploaded onto YouTube for posterity.

      The app they made is mainly a chat, later limited to 15 messages as an attempt to stop copy-pasting from flooding the few meaningful/serious answers (it is a live chat with 20k people in it simultaneously so good riddance), to little avail IIRC. (IIRC because I watch by TV because my battery is limited and the screen is too small to actually copy to a textbook)

      The quality is kinda mediocre but nothing bad enough usually. One time it was a 4:3 480p clip with interlacing, which is based until you start caring.

      They are also sending us "handouts" (apostilas, PT-BR to English) and the normal state tests every bimester.

      As for the teachers, they have sent us pretty much the full student workload via Google PDFs on WhatsApp, which is the opposite of private, but privacy is hardly possible when you're Brazilian and likely don't even have an up-to-date (defined as less than 5 years old LMAO ) PC. They haven't done any zoom/meet chats to teach us stuff however, since that's kind of the purpose of the TV/YouTube broadcast.

      8 votes
    15. Reduction of screentime leading to positive changes in daily life

      Hi, I think I have mentioned it here a few times, but I (used to) spend A LOT of time on my phone. I’ve tried to reduce it in the past with more or less success, and recently without any...

      Hi,
      I think I have mentioned it here a few times, but I (used to) spend A LOT of time on my phone. I’ve tried to reduce it in the past with more or less success, and recently without any university work (I finished all exams half a year ago) and varying amounts of work as a freelancer, it crept up to 6+ hours of screen time per day. (this is excluding watching stuff to fall asleep, which I want to reduce but I am taking one step at a time) - So it’s a lot.

      I tried a lot of stuff, reducing the hours, by setting limits for apps, turning off notifications, but that just leads to me extending the time by entering the password myself, or checking my phone more often because I am curious about whether someone texted.
      So last week Wednesday some stuff changed. I took my first long bike ride in a long time, and that day I felt really good, I still had 5 h screen on time that day though. The next day I turned off notifications for Whatsapp, but I left the indicator next to the app on, so I could see that I have messages quickly, I also decided to just force myself to wait a bit until replying to people. Also my girlfriend is the only one that knows my screentime passcode now, so I can't sneakily extend my app time

      That Thursday my screentime was 3h 16 minutes. I was hooked, I wanted to keep my time as low as possible. Since that Thursday, I have not hit the 4h screen on time once. Yesterday I was at 3h 59 min... it was an exhausting day though (Spending 1.5h at the waiting room at the doc) and I wouldn’t have blamed myself, but I still didn’t want to hit the 4h mark. Last Thursday my daily rhythm has changed quite a bit. I got Ring Fit Adventure this week, and I have done sports 4 times this week, I started to pick up playing guitar (literally got one yesterday) and ukulele again, and I just try to find stuff to do that does not involve my phone. I also played Persona 5 Royal on my ps5, I know it’s screen time but I feel less bad about it because I don’t take my PS everywhere with me, and these were the first days I have taken off in a long time… Next, I am trying to maybe work through my books that are on my backlog, finally finishing some more again. (my girlfriend gave me the book "South Sea Vagabonde, and I am meaning to read it, and I am also listening to the Audiobook "The Shallows")
      One change just caused so many good changes. I am stoked and looking forward to how low I can bring my average, I know 4h per day is still a lot for most people. I am aiming at sub 3h next ( I had that once this week).

      This scene from Bojack has been my mantra since then: https://www.youtube.com/watch?v=R2_Mn-qRKjA

      It really does get easier, too. Today I went biking and I managed to go much longer without breaks and I feel way less exhausted.

      I just wanted to share my experience somewhere, maybe someone else is on the same path and this helps.

      22 votes
    16. What are the most iconic video game sound effects you can think of?

      I heard someone with the Sonic "ring loss" chime as their text message alert today and it instantly brought a smile to my face. Just wondered what other sound effects would be most nostalgic for...

      I heard someone with the Sonic "ring loss" chime as their text message alert today and it instantly brought a smile to my face. Just wondered what other sound effects would be most nostalgic for you if you were to hear it in a similar situation, as there are many games/franchises/systems I have little to no experience with.

      19 votes
    17. Fuck you, COVID. I'm in love!

      My virtual relationship is slowly becoming part of Tilde's lore. We met on Tinder shortly before the pandemic and almost met, but I got a little paranoid after dropping my sister at the airport....

      My virtual relationship is slowly becoming part of Tilde's lore. We met on Tinder shortly before the pandemic and almost met, but I got a little paranoid after dropping my sister at the airport. Maybe that was a good thing, Tinder dates are fleeting and we tend to pass judgment too quickly. This way, we were forced to get to know each other. I had other WhatsApp courtships going on, but they all faded out. We had little in common and nothing to talk about. But Lucy (let's call her that) is special! Smart, funny, and extremely curious about every part of my little nerdy universe. She also has interests of her own and is a simple soul -- we don't need to talk about deep stuff all the time. Lucy is deceivingly shy and her emotional world is deep, requiring some incantation to access. From my point of view, it's like deciphering an adorable puzzle. I love her, oh oh god, I love her so much it hurts in my bones. I told her that, and the response was a bit concerning. She felt pressured to say the same (she wasn't). Days later, she reciprocated without any coercion whatsoever. What a relief! hahaha

      We are now in a relationship. We speak every day. We "fight" (or the cute version of fighting new couples have). We do sexy stuff online.

      Because I was in a trauma center last Friday (I was freaking hit by car hahaha), we cannot see each other for about a week. After that, we decided I'll spend 14 days at her house (and possibly more if everything goes okay).

      Today I was at the mall (I know I shouldn't, it was a necessity!) and sent her the message: "I was just walking at the mall and were hit with the realization of how much I love you".

      So that's where I am.

      Anyone wanna share more COVID love stories?

      28 votes
    18. I'm on a mass social media detox (Twitter, Instagram, etc.) - What blogs that you read regularly should I check out?

      I limited the intake of high volume news and I'm currently taking a break from social media. I've been enjoying to occasionally visit blogs directly as my source of online reading. I tend to enjoy...

      I limited the intake of high volume news and I'm currently taking a break from social media. I've been enjoying to occasionally visit blogs directly as my source of online reading. I tend to enjoy short essays, opinions, and honest observations. What blogs have you been following lately that you think are worth taking a look at?

      P.s.
      If it's your own, please shoot me a direct message: I'd love to check it out.

      25 votes
    19. My hot take on internet "Privacy"

      Internet privacy it is a farce and companies are using the fear for profit. In reality the only thing you can do is decide in which company do you trust. First thing you choose is the ISP, we all...

      Internet privacy it is a farce and companies are using the fear for profit. In reality the only thing you can do is decide in which company do you trust.
      First thing you choose is the ISP, we all know that they are all scummy and get caught every year selling information, throttling services, lying, etc.
      Then, if you want to be safe from your ISP you have to get a VPN and it is the same old story again. Even if you manage to never send or receive a bit outside the VPN you have to trust they are not loging everything and selling it.
      It is a never ending story, because after that you have to trust the OS, the hardware manufacturers of each piece of your phone/pc, the modem, the router, the apps, and if you are talking with someone make it double because you have to trust all the same things from the one receiving the message.
      People talks about huawei spying for the CPP like if things like PRISM doesn't exist. Every country has some kind of mass surveillance program and there is nothing we can do about it. If I were american I would prefer being spy by the Chinese that can't get me extradited.

      13 votes
    20. Is there a way to disable autocollapse of single line comment?

      I get the value prop of the default setting being to collapse the message, since it saves space and the whole message can be displayed, but my brain is at this point wired to ignore collapsed...

      I get the value prop of the default setting being to collapse the message, since it saves space and the whole message can be displayed, but my brain is at this point wired to ignore collapsed comments, so I find myself missing this one liners on tildes. I didn't see an option to have single single comments be expanded by default, does such a a feature exist?

      5 votes
    21. Can't invite someone new

      I am trying to invite a friend to Tildes, and on my invite page I see the message "You aren't able to generate more invite links right now." Is this a default setting for new users?

      9 votes
    22. What are secure alternatives to slack, and what are your experiences with them?

      First, some context. The latest from the US justice department saying that they will be focusing on finding "ANTIFA leaders" is incredibly troubling for anyone involved in leftist groups. I...

      First, some context. The latest from the US justice department saying that they will be focusing on finding "ANTIFA leaders" is incredibly troubling for anyone involved in leftist groups. I foresee a lot of good activists, regardless of how far left they actually are, arrested on trumped up charges in order to squash opposition.

      Organizing is essential to resist fascism. This is made more difficult by the pandemic, as in person meetings bring a huge, almost unacceptable risk. As such, many orgs have been turning to platforms like Slack instead. Trouble is, Slack logs are not encrypted and I am certain that as a business based in the US Slack will not put up a fight to keep user data safe if the feds come calling.

      I'd like to collect a decent list of alternatives. Important factors include encryption, ownership, open source status, ease of use, federation, scalability, hosting, cross platform, and anything else you can think of.

      23 votes