1.  

    Thanks, but I don’t use Firefox anymore, nor install it, except for occasional testing.

    The only time I get dumped back into new reddit, at this time, is when I’m on mobile, and then “Request Desktop site” fixes it.

    However, this happens despite me requesting that it doesn’t in the preferences, so I think it’s going to keep happening more and more often.

    1.  

      I do, and I do.

      There’s a setting in the global preferences that works almost always, except on unmasked mobile.

      1.  

        Wat? Did you read the article? Your fears are addressed in the 3rd paragraph. It’s even above the fold.

        A few quick opening remarks: The whole point of this piece is to spark discussion and awareness in the industry and among users. Personally, I would never advocate for employing these tracking practices and I am glad to be working for an analytics vendor, that has always put privacy, transparency, and integrity first. Besides, from a legal perspective, this technique does not circumvent the GDPR or similar privacy laws. Just because ETags are technically not cookies, does not mean they are not covered within such guidelines and require no user consent.

        Emphasis, mine.

        1.  

          I have no idea where you’ve seen that particular error message.

          I just took it as an example.

          We usually add annotations to error messages

          Usually. But the default for go is just return err. Which leaves you with the problematic one.

          which is way more descriptive

          I don’t know how about you, but in a project with >10k LOC I’d like to see, in which exact file do you have to open for an error. I won’t always know the project by heart, and to find it normally would take a good couple of minutes.

          if there are multiple similar error paths along the call stack

          Uhhh, you just look into the first function along the call stack and go along in such case. It’s not that difficult. I know it can look scary, but stack traces usually have all the information that you need, and then some. Just learning their syntax will allow you to efficiently find causes of bugs. That cannot be said for Go, as different projects can use different styles of error annotations.

          With exceptions you’d have to carefully follow the stack trace line-by-line to find the cause of an error.

          I usually read less than half of it before realizing where the error lies. There is a ton of information in a call stack, and you don’t always need all of it.

          Also, in many languages discovering that a particular function throws an exception without code analyzers is pretty hard.

          In a simple case, looking for raise/throw/etc. is enough. But yes, this is a problem. Some languages do have a solution, e.g. Java, but those aren’t that common yet. I’d like improvement here.

          1.  

            The servers are using the information sent by the kernel module. This part is just the API the game itself calls.

            1.  

              I’m interested. I use Linux as my primary desktop computing environment, but some things I do some of the time (e.g. building games for Unity) go better on Windows. And every time I try to adopt Windows for a few days, I’m a bit stymied. I feel like so many people use this, there must be something wrong with my workflow that’s making it feel so wrong to me.

              This article is helpful and kind of sniffs around the edges. But I’d really be interested to learn more about what a really “Windows Native” workflow looks like and what people who use that all the time consider appealing about it. So if you post it, I hope it gets some attention here. Because even if I won’t ever be a “Windows person” I think I’m making myself suffer needlessly when I do use it, and I’d like to be educated about how to be more effective on it.

              1.  

                I also recommend the the old reddit redirect addon: https://addons.mozilla.org/en-US/firefox/addon/old-reddit-redirect/

                IDK if it still happens, but there was a time when you would suddenly be dumped onto the new reddit while browsing old reddit, and this solves that issue.

                1.  

                  Fair enough :-)

                  I will say that the right tool for the job is often the one that is the most well known for the language and domain you’re working in. Inventing a bespoke test harness and trying to force it on the 20 other developers who are already intimately familiar with the “clever” framework isn’t going to help.

                  I kind of agree because there’s good value in standard tooling, but on the other hand I’ve seen rspec (the “standard tool” for Ruby/Rails testing) create more problems than solve IMHO.

                  1.  

                    Lobste.rs is a great community and part of being in a community is listening. Thanks again for helping me.

                    1.  

                      I don’t disagree, and I wasn’t trying to suggest using a “clever” testing framework will somehow make your tests less painful. Fwiw I even suggested the copy / paste method in my OP and use it all the time myself :p. My main point was using the right tool / methods for the job.

                      I will say that the right tool for the job is often the one that is the most well known for the language and domain you’re working in. Inventing a bespoke test harness and trying to force it on the 20 other developers who are already intimately familiar with the “clever” framework isn’t going to help.

                      1.  

                        Thank you for taking it so graciously! Gave me more credit than I probably deserved for that snark.

                        1.  

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

                          1. 6

                            If you absolutely have to use reddit, for the love of all that’s good, use old.reddit.com.

                            1.  

                              It’s the old “beating down the exception strawman” – that no one is even interested in defending.

                              It’s not a straw man when a large percentage of competing languages actually do use exceptions. There are very few mainstream languages that use Option/Result types. Actually, I think Swift might be the only one? And maybe Rust, but I’d argue that’s probably not a mainstream language, not yet anyway.

                              1.  

                                I don’t think Go’s error handling is awesome necessarily, but rather a good trade-off based on my personal preferences and interests. I think this is subtle yet important distinction.

                                1.  

                                  One thing I wanted to call out - you no longer need to use an external package (github.com/pkg/errors) to get error wrapping.

                                  If you want to read more about this they discussed it here: https://blog.golang.org/go1.13-errors

                                  Was happy to see the stdlib introduce error wrapping. I continue to be impressed with the slow evolution of the language and introduction of features like this.

                                  1.  

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

                                    1.  

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

                                      1.  

                                        I’ve done similar embedding, but with perldoc rather than sed. The shell doesn’t natively ignore POD directives but you can use : (no-op) and a heredoc:

                                        #!/bin/sh
                                        set -eu
                                        
                                        case ${1:-} in *help|-h)
                                          exec perldoc -T $0;;
                                        esac
                                        
                                        usual script body
                                        
                                        :<<=cut
                                        =head1 NAME
                                        
                                        some script
                                        
                                        =head1 SYNOPSIS
                                        
                                        ...
                                        
                                        =cut
                                        
                                        1.  

                                          line numbers assume a few things:

                                          • you have the same version of the code everywhere. in a production environment, you can easily have multiple versions of the same thing during deployments, upgrades, etc. Those situations are the most common situations in which you would encounter an error for the first time since, as we just said, you’re deploying potentially new code.
                                          • you’re only talking about comprehending the error data as it happens, and not historically, in a log file somewhere. What if you’re looking at log data from a few days ago? Now you have to cross-reference your stack trace with what version of the app was running at the time that stack trace was generated. Ok, now check out the code at that time. Now step through the line numbers and run the program in your head to try to understand the story of how the error happened. -OR- just … read the error’s story of how it happened in a Go program.
                                          • a stack trace is generally not going to capture local variables. Even if you know what line you’re on, you might not know what parameters that function was called with. With explicit wrapping of error values, you append to the error value the necessary contextual information, as decided by a human author, for a human to understand the cause of the error.

                                          I don’t miss exceptions and stack traces after using Go for a few years. Both are, in my experience, actively worse than handling errors at the call site and wrapping errors with descriptive contextual information.