Threads for scoates

  1. 2

    I can identify with the author’s mute button woes. I used a Logitech AK5370 for years, and the part I liked best was the lighted mute button at the base of the microphone. When I went to look for an upgrade, I was surprised to find that microphones used by streamers often lack a hardware mute button, or if they do have one, it is located on the body of the mic, making it impossible to use the mute button without making a racket. Some entry-level condenser mics have lighted software mute buttons, but default to unmuted and reset on reboot. Others have a mute switch similar to what you would find on a stage mic that makes a familiar popping sound when used.

    It seems like there should be a market for one – if I had a nickel for every time someone couldn’t find the unmute button on a video call, I would have a lot of nickels. Quite a few dedicated mute buttons popped up for sale since 2020; I would think an all-in-one device like my old mic would be desirable.

    Using the mic case as a capacitive sensor is an interesting idea, and I bet this was a fun project. If that were what I wanted, I think I’d opt for one of the mics that has a capacitive mute button built-in, though personally I would prefer the sense of security of knowing the mic is physically muted.

    1. 2

      One thing that I didn’t cover in my post was indeed that the mic defaults to unmuted when it’s first plugged in. My taking the pulse line low on start of the microcontroller effectively presses the button once, so it now defaults to flashing/muted. Bonus feature. (-:

    1. 1

      This seems pretty unnecessary (you could use the mute button in the conferencing app, or use the same touch controller thingy as a HID device plugged into the computer that would mute/unmute the mic’s capture device, which I think even changes the color of the light on it), but it’s nicely done nonetheless.

      1. 2

        I’d argue that a hardware mute button beats both of those options for usability, especially given how much some of us use it.

        For the first - what if you’re working in another app?

        For the second, you’d need a helper app running on the PC to manage the mute status, which adds complexity and a point of failure. It’s been a while since I last looked at the USB audio class spec, but I’m pretty confident mute status doesn’t go out on the wire, so you’d need another indicator on your button. (Not a bad thing, IMO.)

        Personally I went out of my way to add a hardware mute button to my desk mic, with a nice big red tally light to help me keep track of the mute status. It’s nice to have something that just works and always will.

        1. 1

          For stuff like this, dedicated buttons beat kludged-together software every time, for me. Yep.

          1. 1

            For the second, you’d need a helper app running on the PC to manage the mute status, which adds complexity and a point of failure.

            Sure, but not too much of one. It should be possible to make it stupid enough that it never breaks, and set it to always run if the controller is plugged in.

            It’s been a while since I last looked at the USB audio class spec, but I’m pretty confident mute status doesn’t go out on the wire, so you’d need another indicator on your button.

            It is (or it can be anyhow), USB Audio calls out mute and volume as supported kind of “controls”. Of course you don’t need to have any controls for a USB mic, you can let everything be done in software, but the Yeti does expose mixer controls, and I believe (I don’t have access to mine right now, so I’m going on memory) that the mute button on the device itself just sets the gain control to -∞dB and then restores it, and that doing the same thing from the host side will make the light on the mute button turn red.

            I’m not arguing too seriously here, I’m just saying… you could probably get by without opening the thing up, and given my hardware skills, it’s the way I would have gone.

            1. 2

              It should be possible to make it stupid enough that it never breaks

              Call me a stupid hardware engineer, but in my experience getting stuff like this to be completely bulletproof (eg over suspend/resume etc) can be non-trivial!

              USB Audio calls out mute and volume

              Thanks for teaching me something new today (:

          2. 1

            Yep.

            I have the same mic. I have a dedicated button on my keyboard bound to mute all mics via pulseaudio. The Blue notices this… somehow and changes the light on the hardware button. I was surprised the first time I noticed.

            It also changes an indicator on my status bar so I know whether it’s hot or muted without looking away from my screen. It mutes every mic attached to the computer, so just in case something has bound to the webcam mic by accident I’m still safe.

          1. 7

            Wear as jewelry: On one hand, rubies are pretty popular in jewelry. On the other, a sneklace would be hella sweet. Advantage: Tie

            Incidentally, Python would be better as a tie.

            1. 5

              The point of this section was to choose a winner, not a tie.

              1. 1

                hehe, I have to admit, that thought occurred to me too ;)

              1. 5

                I guess it’s assumed that no one has access to the web server logs anymore? Is what why JS based analytics is so popular?

                1. 6

                  That, and there’s additional information available to JS that isn’t in server logs, such as the viewport size, and whether or not the user is currently still “on” a page.

                  I’m allergic to heavy-handed JavaScript analytics, but we ended up settling on something simple, lightweight, and asynchronous, even though we’re more than capable of handling these things on the server side.

                  To your point: yes, normal httpd logs are indeed more difficult to process in highly-distributed systems. My personal site is mostly statically-generated and served through a very thin layer in Lambda. It’s much easier to integrate JS here than to process the logs from Cloudwatch.

                  1. 2

                    I think it’s really good for people to prefer log analysis as a first choice, but to @scoates point that doesn’t nearly cover all the angles and deep analytics that GOOG does.

                    That said, I think more people should be aware that they may not NEED real time deep analytics. I’m likely going with log analysis in my blog refactor from Wordpress.com back to Pelican/Kubernetes.

                  1. 2

                    Another (newish) alternative I don’t see mentioned here: Umami. (Note: alternative, not replacement. It’s much simpler than what GA/GTM does).

                    1. 2

                      I liked reading this article and makes me wonder how well-intentioned developers reliance on dependencies can shoot yourself in the foot. The other day I remember reading on a non-intentional reliance on Cloudflare’s services. While this makes developing complicated apps easier by increasing composability, it gets a little scary especially when it comes to data residency and privacy. Hopefully, more and more such entities come forth and publish their apps as open or at least engage with the community via bug bounties and the like.

                      1. 3

                        I agree with you, but to be clear: I knew the app was contacting Google before I knew it was open source. I even knew what library was (probably) doing this thanks to the jailbreak on my old phone.

                        The app being open source allowed me to patch it, it being on GitHub made submitting the PR easy. Both of those things make the app better for everyone.

                      1. 7

                        Thank you for your service. It’s not glamorous, but it’s really important to do this kind of audit.

                        1. 5

                          By the end of it, I had one of their developers showing me what they saw in mitmproxy, so I’ll call that a win, and I hope they’ll do their own audit (first) in the future: https://github.com/cds-snc/covid-alert-app/pull/1008#issuecomment-670030430

                        1. 4

                          I’m a bit uncomfortable about how this article keeps making it sound like the app does surveillance on you, when the explicit design purpose of the app and protocol is to make that not happen.

                          1. 4

                            I’m willing to update that. Where do you mean? The app definitely sends Bluetooth sightings to .canada.ca. It doesn’t know who you are or your actual location (though it could be correlated). Maybe that should be made more clear, though that’s not really the point of the article.

                            1. 5

                              Statements like:

                              it seems to me that the benefits outweigh the “government can track me” risks

                              and

                              an app, designed for tracking people

                              seem a bit heavy-handed for an app that doesn’t know who you are or where you are or really anything except for what other app was near you (and it doesn’t know who those are or where they are either).

                              I would say, rather than “designed for tracking people” the app is almost the opposite: designed to do a job we would normally do by tracking people, but without tracking people.

                              1. 7

                                Okay; that’s fair. I’ll reword. It’s definitely designed to track your physical interactions with other people. I’ll probably go with something closer to that.

                          1. 9

                            My pet peeve is when people write blog posts and the use “fake” IP addresses such as 123.XXX.XXX.XXX in this blog post. There is a defined documentation IP address block, please stick to these IPs when writing up results. You wouldn’t want your own IP ending up there and getting targeted by scrapers/bots, would you?

                            That aside this is a very interesting write-up!

                            1. 13

                              For a long time, an (inane) Tweet of mine got replies and retweets from people I didn’t know, for no apparent reason. I could never figure it out.

                              Years later, I found out that the URL was somehow included in Twitter’s official documentation, and people were replying to it when they couldn’t figure out API stuff.

                              Use the defined examples (or at least your own targets), indeed, please. (-:

                              1. 2

                                Feeding any such bots random IPs sounds like a public service. After all they are perfectly capable of generating random IPs themselves so you can’t be helping them, and they are going out of their way way to not just use random IPs so you are probably hurting them.

                                1. 3

                                  Wouldn’t it be even better if the IP didn’t actually exist? I see absolutely no reason to choose a random IP over the documentation IP.

                                  1. 1

                                    It’s easy to filter for the official documentation IP, especially if everyone uses it. Same with any other private range/loopback/whatever.

                              1. 3

                                FWIW, if you have a freshly inited repository, but you don’t yet have a git version that supports init.defaultBranch, you can cleanly change your local default branch with git symbolic-ref HEAD refs/heads/main (to change it to main).

                                1. 1

                                  I have been using lorri. It is really nice. Setting it up with home-manager is trivial. I haven’t used it at work, sadly, where I am forced to use OS X.

                                  YMMV, but for javascript tools I use yarn2nix. First, I use yarn to manage a package.json and yarn.lock. In the same directory I put the following default.nix:

                                  { pkgs ? import <nixpkgs> { } }:
                                  let
                                    name = "javascript-tools";
                                    src = ./.;
                                    yarn2nix = (pkgs.callPackage (pkgs.fetchFromGitHub {
                                      owner = "moretea";
                                      repo = "yarn2nix";
                                      rev = "2b29eafedd3822095187ba20a472c2b01642b09d";
                                      sha256 = "0cvjb3n988643i7kk2fq313cfd2dbnnm5948fbh7r56fn3l5ridv";
                                    }) { });
                                    yarnModules = yarn2nix.mkYarnPackage {
                                      inherit src;
                                      name = "${name}-yarn-modules";
                                      packageJSON = ./package.json;
                                      yarnLock = ./yarn.lock;
                                    };
                                  in pkgs.stdenv.mkDerivation rec {
                                    inherit name src;
                                    buildCommand = ''
                                      mkdir -p $out
                                      ln -s ${yarnModules}/libexec/node-packages/node_modules/.bin $out/bin
                                    '';
                                  }
                                  
                                  1. 3

                                    What is the advantage of using nix, to manage NPM dependencies, instead of say NPM (or Yarn, or …)?

                                    1. 1

                                      The main reason is that home-manager can keep my work and home machines synchronized. I use it for managing python packages and haskell packages too… I just have to jump through an extra hoop for javascript.

                                      1. 1

                                        Ok thanks for explaining.

                                        In my experience, those packages are usually managed and pinned by lockfiles, and synced with a VCS, so the appeal of adding another layer on top of them isn’t immediately clear.

                                    2. 2

                                      FWIW, I use lorri and nix (not NixOS) on MacOS, and other than the install-time mess they (Apple) made of / mounts in Catalina, it’s pretty smooth.

                                      1. 1

                                        I’m really curious about the steps you took.

                                        Right now in my home.nix I have:

                                        services = if pkgs.stdenv.isLinux then { lorri.enable = true; } else { };
                                        

                                        Can I really change this to services.lorri.enable = true; and it will just work?

                                      2. 1

                                        I might go ahead and give it a try soon then!

                                      1. 2

                                        Not an answer, but FWIW I had to switch away from VSCode/VSCodium because it got to be unbearably slow on my 2015 MBPs. I switched to PyCharm, so that doesn’t really help you, but just a confirmation in case you were tempted to jump full into VSCode on the advice of commenters.

                                        1. 1

                                          Y2K is fascinating to me as someone born afterward. Such a silly thing looking back, but I’m curious as to why many people found the mythical bug a serious issue. Perhaps it was that knowledge of computers was not yet ‘mainstream,’ and people just didn’t understand computer systems in general?

                                          1. 27

                                            It was a serious issue, and we fixed it.

                                            A lot of folks look at the fact pattern as: people said Y2K was a problem; we took them seriously and spent a lot of money addressing it; nothing happened — and therefore there was no problem to begin with. That’s just not the case: there was a problem, and those sums of money solved it.

                                            It’s though a bit cried ‘wolf!’ and the villagers banded together and drove it off, successfully defending their flocks — and then got angry at him, because the wolf didn’t eat any sheep.

                                            What really worries me is that the next Y2K issue won’t be fixed, and will result in death and destruction, precisely because folks think that the first one was a hoax.

                                            1. 6

                                              This, exactly. A couple weeks ago, my daughter was raving about the cleanliness of the floors in our house, as if this sort of thing happened naturally. I had to remind her that she’s just absent when I spend a lot of time taking care of home things like cleaning the floors. Not so different.

                                              1. 4

                                                What really worries me is that the next Y2K issue won’t be fixed, and will result in death and destruction, precisely because folks think that the first one was a hoax.

                                                I’m not really that worried about that; anyone who knows how computers work would find an argument like “These old machines count time as a 32-it number of seconds which overflows in a few years” convincing. When the entire IT department takes the issue seriously, I can only assume the people above that would let them so what they deem necessary to keep the critical systems running. This isn’t really something the general public needs to believe in to fix.

                                                Or maybe I’m just naive and people in charge don’t trust their IT staff to know what’s best for IT infrastructure.

                                                I’m worried about sporadic failures going forward due to the hacks intended to fix y2k though. If some people’s solution to y2k was to read all numbers below 20 as 20xx and all numbers above it as 19xx, because those 20 years ought to be enough to fix the issue properly…

                                                1. 3

                                                  This is why good(and public) history sources are something I will always champion. A post this week comparing these attitudes on Y2K to the 1987 treaty banning CFCs really resonated with me, having grown up witnessing both events first-hand.

                                                  Even here in Seattle where newcomers love the views: Metro didn’t start as a bus service and many of our beaches were unsafe for swimming until the 80s.

                                                  1. 2

                                                    I had no idea it wasn’t a hoax. Thanks for filling me in; I’ll go research it more for myself.

                                                  2. 6

                                                    There were some people who were scared that old computers running deep down in cold war nuclear silos might go haywire and launch missiles (I kid you not). I guess it’s the unpredictability of the whole thing that scared people, mostly. Nobody was able to tell exactly what would happen when these date counters would overflow, which kind of makes sense because overflow bugs can cause really strange effects.

                                                  1. 3

                                                    I can’t believe that this song about IPv6 is from 2007. We should be well-and-truly off IPv4 by now, or it’s going to become even more like digital land than it already is.

                                                    1. 2

                                                      Internet’s a pile of hacks, so we’ll probably just add one more: many ISPs are already sharing v4 IPs between different customers, and I don’t see any rush toward v6… Also, what will we do with all those non-upgradable devices that only work with ipv4? ¯_(ツ)_/¯

                                                      1. 5

                                                        They’ll go into the pile (which is hopefully at a recycler) with our old Macbooks that can’t be fixed/upgraded, our DVD burners, and our 10 base 2 network cards.

                                                        We’ve kicked this can down the road for a long time, and now the mixed-metaphor can-kicking-debt collectors are coming.

                                                    1. 3

                                                      I really like ubiquiti’s hardware and admin features. It’s the best range and speed I’ve had in a home WiFi system and a single node provides coverage for about a 100 foot radius hemisphere. It’s great.

                                                      However, I don’t like how it is “cloud connected” and there’s no way to admin except for an app that goes through their site. They’ve been promising a browser based ui that goes directly to the router for since I bought my AMPLIFI.

                                                      They just added features to vpn home and have no way to disable internet access to my home router.

                                                      I will leave them because of this. I don’t want the security risk of zero day exploits to my home network. I want a local only router with the range and ability to block and time box devices and groups of devices.

                                                      1. 4

                                                        Mine’s administered through a local controller (that runs in Docker on my Synology DSM), not through anything on their side. Am I missing something?

                                                      1. 2

                                                        This is a huge letdown. I love my Ubiquiti gear. Really hoping they recover by doing the right thing here. )-:

                                                        1. 2

                                                          Working on PHP documentation was a great way for me to meet people and help me grow my career, way back then (a decade before this article was written). I take a small amount of credit for making/keeping the docs great during that time.

                                                          I eventually moved on from PHP for the most part, but I still have friendships formed, and colleagues I aligned with, during that time.

                                                          1. 1
                                                            >>> from math import pi
                                                            >>> pi
                                                            3.141592653589793
                                                            

                                                            Something doesn’t seem quite right when variables are evaluated as-is without any sigil prefix (e.g. $pi). Seems like you would often accidentally reference variables and methods. If I have an executable in my $PATH at /usr/bin/pi, what happens (or unexpectedly doesn’t happen)?

                                                            1. 3

                                                              Well, you just monkeypatched your pi (-:

                                                              >>> from math import pi as ls
                                                              >>> ls
                                                              3.141592653589793
                                                              >>>
                                                              
                                                              1. 6

                                                                To take it a step further, we see what gives me an uneasy feelings about these kinds of shells:

                                                                >>> which ls
                                                                /nix/store/x6a3r9rsazlildaxzqay73scy6nv1inz-coreutils-8.31/bin/ls
                                                                >>> ls
                                                                3.141592653589793
                                                                

                                                                (Not disparaging the idea; it’s interesting—I can just never keep myself using these things because “I need which to not lie to me”, etc.)

                                                                1. 2

                                                                  For what it’s worth, the ambiguity isn’t necessarily an inherent problem with shells as DSLs in a general-purpose language. In Rash (my shell in Racket) there are different pipeline operators that are explicit about taking shell commands or functions – eg. the | operator takes on its right-hand-side a shell command (or user-defined alias), while |> and |>> take Racket functions. Of course they’re all just macros, so you can define custom ones with any behavior, including convenient but ambiguous versions.

                                                                  1. 2

                                                                    Yes :-) I guess this to some extent is a matter of taste. In the case of daudin it’s just inheriting the behaviour of Python and I wanted to keep as close to the language as possible (the %cd etc commands make me cringe a bit, but they’re all easily accessible via Python). You can do all sorts of alarming things in Python if you want or need to, or unintentionally (e.g., if you use id as a variable name you lose access to the built-in function of that name). Strictly speaking it’s a potential minefield, but in practice (at least for me, and I think that goes for many/most professional Python programmers) it’s not an issue. I guess one could replace things like sys with versions that raise exceptions if you try to modify their attributes, but AFAIK no one does. BTW, I have a similar feeling about Python’s numpy package. It feels totally cryptic and magic because it hides a lot of functionality behind what looks like regular Python operators. In general I like Python’s approach to “magic” methods, but it always feels to me like numpy has pushed it too far (but I’m an irregular user of numpy and suppose I would quickly have a different feeling if I used it more).

                                                                    Sorry for so many words!

                                                              1. 2

                                                                An interesting comment from the PHP bug tracker:

                                                                This looks like it requires specially crafted code, therefore not a security issue.

                                                                https://bugs.php.net/bug.php?id=77843

                                                                1. 3

                                                                  This is covered in the security guidelines, so it’s a matter of classification. I don’t think I necessarily agree with this exemption from the criteria, since it’s privilege escalation, but at least I think Stas is acting in good faith here.

                                                                1. 1

                                                                  Looks like it was deleted.

                                                                  1. 1

                                                                    the “cached” version still works

                                                                    1. 1

                                                                      Google

                                                                      1. That’s an error.

                                                                      The requested URL /search?q=cache:VmhUzso1ghQJ:https://twitter.com/DroidAlexandra/status/1119207230782550017+&cd=1&hl=en&ct=clnk&gl=us was not found on this server. That’s all we know.

                                                                      :(