1. 2

    Does namecheap offer email with the domain? Have you considered using that or moving to a registrar that does offer email with domain registration? If so, why have you decided against that? I ask this because I have some domains at Gandi and are considering moving my gmail over to one of those, but so far I’ve seen everyone going for Fastmail/Protonmail or self hosting and none use their registrar, so I’m wondering whether I’m overlooking something

    1. 2

      Namecheap offer email, but that’s something you have to pay for additionally https://www.namecheap.com/hosting/email/ I guess most hosting companies are good option for email (especially if you mostly use an external client for it), but I prefer the companies who specialize in email, as they typically provide a better service.

      1. 1

        The benefit of having an email address on your own domain is that you can switch to another hosted email provider relatively easily.

        1. 1

          Indeed.

    1. 2

      Croatia has its homepage at http://www.hr/ A friend of mine had a name@hr email address which was very cool until you try to get past form input validation.

      1. 1

        I couldn’t upvote this more (besides that I literally can’t). Also, this article has made finally understand the Elixir design decision of not having a return statement.

        1. 3

          Elixir has features which cover the early return use case mentioned by other comments.

          For example, author’s example could be written as:

          def signup(username) do
            with :ok <- validate_username(username) do
              # Work goes here
            end
          end
          
          defp validate_username(username) 
            when is_binary(username) and length(username) > 3, 
            do: :ok
          
          defp validate_username(_), do: {:error, :invalid_username}
          

          Nice thing here is that you can add more validations without additional indentation.

          1. 2

            Isn’t this equivalent to just:

               if (validateUsername) {
                   # Work goes here
               }
            

            ?

        1. 3

          Like many others I made a script to manipulate the GitHub timeline chart. https://github.com/ihabunek/github-vanity

          1. 4

            Text is very large and it doesn’t let me resize it. Makes it very hard for me to read. :/

            1. 2

              I haven’t had that problem but there’s a GitHub repo where you can log an issue about it.

              1. 2

                Oof, sorry. We’ve some new fancy CSS sizing things and clearly this isn’t working properly. Would you mind submitting a bug with a screenshot?

                1. 1
              1. 9

                On a related note, I’m also now the owner of the shithub.us domain – I’m thinking of offering semi-public git hosting on it. The name came up, and the comparison is obvious.

                1. 3

                  How about a webshop for toilets and accessories? I think it could work :-)

                  1. 1

                    Having both would be amazing.

                    1. 1

                      Or sell it to a Septic Tank draining service

                  1. 2

                    I’ve worked on projects which mandated use of various code formatters and linters, and without fail they’ve all had, in my opinion, a negative impact on code readability.

                    1. 19

                      My experience has been the exact opposite. In fact, I currently hold that collaborative development without mandated formatting will be filled with pointless arguments about silly details that an automatic formatter would just fix permanently. It’s like yet another thing no human (except for the few who decide the standard and author the tooling) should have to ever think about again.

                      I think Go perfected this approach from the beginning, and most others have followed suit, more or less. The longer a language has existed without de facto formatters, the worse the situation is. Of course, languages like python are a bit of a problem, since formatting a piece of python code is not exactly a deterministic problem. Black does a pretty good job though.

                      1. 5

                        I’m okay with all code formatters, as long as they don’t put record separators on the start of the following line. :D

                        1. 3

                          collaborative development without mandated formatting will be filled with pointless arguments about silly details that an automatic formatter would just fix permanently.

                          I used to think this too, but then I realised it depends on what the composition of your team is like. I’m currently in a team with very experienced engineers who basically always run issues through a mental cost/benefits model. We don’t have pointless arguments about silly details.

                          We tried using a linter and auto-formatter for a while, but we found that it only increased the time we spent on silly details. Sure, we got a great feeling of progress by fixing lint issues, but from a bigger perspective, it was just a game of chasing a lower lint count, and not providing any actual value.

                        2. 4

                          I feel link linters pull you towards a certain level of readability. Whether they pull you up or pull you down depends on where you started at.

                          After using a linter for a while, learning from the feedback it’s giving you, you end up writing code that already satisfies the linter before it gets linted. At that point, the linter only ever gives you false positives: when you’ve broken the rules deliberately because it makes the code better.

                          1. 2

                            I agree with your assessment. The problem arises when linters are run on the CI or a pre push hook and you can’t ignore them.

                            Currently fighting jsPrettier which is made to be as unconfigurable as possible. They call it opinionated. Not a fan.

                          2. 3

                            while I do think this is true of the RuboCop defaults and the AirBnB eslint config, I don’t think this is true of all code formatters/linters (I like PEP8 and gofmt, for example). Code formatters help to identify and keep consistent the values and styles of a community. The end result of this is that those communities, by nature of preserving their own values and styles, wind up excluding divergent values and styles, which … is the entire point. The entire point is to exclude differing styles. If you really don’t like a code formatter or linter on a project, that’s a hint that you either need to learn to adjust your practices to work in harmony with the people already on the project, -or- that the people working on the project don’t share your values and you might be better off working on different projects with people who have values more similar to your own.

                            1. 2

                              I’d love to use good formatters/linters, but most languages simply lack them.

                              So I rather use none than a bad one.

                              1. 1

                                I ageee that readiblilty is worse than for “ideal formatted stuff” but coworkers like it (being a team player = free brownie points for later) and it is nice to not have to futz about with layout cuz it will get mangled anyways.

                                Acceptance leads to piece of mind (for me anyways)

                              1. 7

                                How do I know if this is designed for Netscape or IE?

                                1. 1

                                  More readable for you perhaps, but someone else might be confused by the new macro they don’t recognise.

                                  1. 2

                                    Threading macros are widely used in clojure. If a beginner hasn’t seen them yet they will learn.

                                  1. 13

                                    For anyone wanting to learn how to send a patch via email, here’s a nice tutorial: https://git-send-email.io/

                                    1. 3

                                      Nice breakdown of your desktop. I used rofi for a long time but it bugged me that my launcher was running under XWayland, so switched to bemenu. I find this to be better suited to my needs (I don’t need all the features of rofi), more aesthetically pleasing, and best of all, it’s Wayland native :-)

                                      1. 3

                                        There is a pull request that adds wayland support to rofi, but its unlike to get merged. That being said you can either compile it yourself or if you have access to the AUR install it from there.

                                        1. 2
                                          1. 2

                                            I use wofi too, but it launches multiple instances if I press the same keycombo multple times. I wish it didn’t

                                            1. 2

                                              You can probably fix this by preceding the command to run the launcher with a killall command in your config.

                                        1. 1

                                          I wish all SPA-s were like this one.

                                          1. 6

                                            That’s a great writeup. Although I grew up in Yu, I was too young to participate. I do however remember recording ZX spectrum games which a radio station broadcast late at night and playing them at a friend’s computer. I had an Amstrad CPC 664 which used diskettes for storage, which were a step up from tapes in all ways except this one. :)

                                            1. 5

                                              I’ve heard good things about Cursive, but I can never get used to IntelliJ IDEs, they take forever to boot and are sluggish even on smallish projects.

                                              1. 3

                                                Agreed. That said:

                                                will be available in the future as a standalone Clojure-focused IDE

                                                So cursive may be more viable later.

                                                1. 1

                                                  Oh nice. I will definitely give it another whirl then.

                                                2. 3

                                                  I use both PyCharm and Goland on a daily basis, and I’ve used CLion with the Rust plugin for a couple of smallish projects. Before that I used IntelliJ for a few years for Java projects and IntelliJ + Scala plugin for some big projects. Two things I’ve noticed: increasing the default memory available to the IDE by tweaking your VM parameters makes a huge difference in performance. There’s plenty of information about that online. Also, so far my experience on Linux is much smoother than MacOS. All in all I feel the functionality gains greatly offset the initial slowness of the first 30s after I open a project once every few days.

                                                  1. 2

                                                    I did run it on Linux but have not tweaked JVM params. With LSP getting somewhat decent support in Sublime and other editors like vim and emacs, the gap between these editors and IDEs is getting narrower.

                                                    1. 1

                                                      Yep, LSP has finally brought actual cross-language and cross-editor functionality closer to what IDEs that cost hundreds of dollars would do 5 years ago. I’m excited to see more languages and editors adopt the standard. There’s still enough of a gap that I’m happy to pay for the IDEs, but the experience for developing Go and Python projects on VSCode is very acceptable.

                                                1. 0

                                                  I agree with the feeling, but there’s nothing really new here. Google Analytics is still the most convenient solution, as any alternative means either maintaining your own server or pay yet another monthly fee for a SaaS.

                                                  I have GA on my site mostly because I want to see the referrals so that if there’s a post somewhere about my app I can contribute to the discussion. I consider that for users who don’t like GA, they have the option to disable it via various extensions. It’s not an opt-in but at least it’s possible to opt-out.

                                                  1. 11

                                                    Seeing referrals from server logs is simple, especially with tools like goaccess. GA has many functions which are not covered by simpler tools like goaccess, but this is not one of them.

                                                    1. 3

                                                      Yes and installing Plausible and running your own server is simple too, but all this takes time. The day it’s down because your logs are full or because an update broke the Nginx server you still need to spend a few hours fixing all this. With GA, you copy some JS and you never have to do anything more. I won’t deny there are problem with GA, but currently no solution is as simple as this.

                                                      1. 8

                                                        I think you’re rather overstating the likelihood of Nginx breaking due to an update (especially if you’re running a stable distribution) and how long it would take to fix it in the very rare case that it did. According to this article, log rotation is enabled automatically for Nginx in at least Ubuntu.

                                                        The way I see it is that if you decide that you require analytics then you can either:

                                                        1. Make the small amount of effort required to self host
                                                        2. Pay someone to host it for you
                                                        3. Be lazy and decide that your users should pay with their data and go with GA

                                                        If you choose the latter then that’s entirely on you.

                                                        1. 1

                                                          Yep, would do the latter

                                                          1. 2

                                                            Since you are not motivated by the advantages of not using GA, your objection to plausible is not very relevant.

                                                    2. 1

                                                      It’s not an opt-in but at least it’s possible to opt-out.

                                                      This is really important, and I really don’t understand how almost all of these new wave minimal analytics tool we are currently seeing do not even offer an opt-out mechanism of any kind (let alone opt-in) other than (maybe) telling people to install an Adblocker in their documentation. This situation is something people will need to fix before they want to consider themselves a Google Analytics alternative.

                                                      1. 2

                                                        Is it really important? Does every analytics tool require its own opt out browser extension when a single, more generic blocker extension can do the same thing, without requiring that you trust the company that made the tracking tool in the first place? Is this really more important in your view than the simple fact that by using GA, you’re giving Google of all companies free access to even more data? How many people do you think know about or use that opt out extension? I certainly didn’t until it was mentioned here, and I’m not going to start using it.

                                                        1. 2

                                                          There’s this thing that was designed for opting out of everything, it’s called Do-Not-Track…

                                                          (But if something just collects statistics about browsers and screen sizes and doesn’t track, is it even appropriate to respect DNT?)

                                                    1. 40

                                                      Wanna quickly figure out how you got to a particular point in a foreign codebase? Throw an exception there.

                                                      1. 15

                                                        I use import ipdb; ipdb.set_trace() in python almost pathologically. It’s 1 step up from an exception cause it drops you to a REPL, which is super convenient.

                                                        1. 11

                                                          With 3.7 we now have breakpoint() as a built-in.

                                                          1. 2

                                                            I’ve found the interactivity of the IPython debugger to be slightly better than the built-in one, but nearly all of my codebase is pinned to Python 3.5 for now.

                                                            1. 6

                                                              Use export PYTHONBREAKPOINT=ipdb.set_trace where ipdb is available and you don’t have to change your code for different environments. (at least once you’re on 3.7)

                                                          2. 5

                                                            I like to use IPython’s embed to achieve a similar goal.

                                                            Add in a call to embed() as a breakpoint and find yourself in a full-blown IPython session with your objects in scope.

                                                            1. 2

                                                              also, ptpython

                                                            2. 5

                                                              I use binding.pry the same way in Ruby. Requires the pry gem, but it’s well worth it.

                                                              1. 4

                                                                I’ve been using pudb in the same manner. It’s got a TUI and it’s simple to jump into the REPL from there.

                                                                1. 1

                                                                  Ooh, pudb looks really cool! Might switch to using that

                                                              2. 4

                                                                Yeah, unless there’s a try catch higher in the callstack consuming everything.

                                                                1. 3

                                                                  Or unless you are in a minified React component with no source map.

                                                                2. 2

                                                                  Long time before I learned the debugger; statement in JavaScript. Still seems unusual.

                                                                  1. 1

                                                                    I use this all the time but always feel a little dirty and imposterish. I’m glad my method has been validated by a stranger on an internet board!

                                                                    1. 1

                                                                      For big monolithic web apps: if finding the backend code for an operation is less obvious than it should be, find some method that will almost always be called (in our app it’s a particular method that gets the user context for a request, but it could be various things) and breakpoint it.

                                                                    1. 28

                                                                      Proposed tag: ‘classic’

                                                                      1. 9

                                                                        From the submission guidelines:

                                                                        When the story being submitted is more than a year or so old, please add the year the story was written to the post title in parentheses.

                                                                        1. 8

                                                                          Ah, thanks for pointing that out. This particular story is from 2002. I still love reading it every time.

                                                                          1. 7

                                                                            “historical” might apply. I had no idea this was published that long ago, and I had never seen it before!

                                                                        2. 1

                                                                          The very word in my mind as I clicked comments.

                                                                        1. 3

                                                                          I will add some features to my current side project https://github.com/rmpr/atbswp and compose two posts for my newly created blog https://rmpr/xyz

                                                                          1. 2

                                                                            You mistyped the link: https://rmpr.xyz/

                                                                            1. 1

                                                                              Thanks for pointing this 😅

                                                                          1. 3

                                                                            Nice, I’ll be sure to check it out. I’ve been hooked on tig so it will be nice to see how gitui compares.

                                                                            1. 16

                                                                              I can’t work out what this is for from the README alone. It makes a lot of references to another piece of software, onefetch, without linking to it. And when I looked up onefetch directly… I can’t tell what it’s for from the README either. I think they both show some information about a local git repository, though I’m not sure what that has to do with fetching.

                                                                              1. 11

                                                                                Agreed, it’s a bit bizarre. Apparently this has nothing to do with git fetch; instead it’s the git version of certain command line tools that appear to be meant for screenshots: https://www.omgubuntu.co.uk/2016/11/neofetch-terminal-system-info-app Except the screenshot thing doesn’t make much sense with git repositories…

                                                                                1. 5

                                                                                  Huh. I didn’t realize the README wasn’t that clear, I’ll update it.

                                                                                  Essentially, gfetch runs a bunch of git commands (e.g., git rev-list --count --all to show number of commits), and shows it all together (with an optional ASCII art). It’s just a little convenience utility to see all at once say, how many commits there are, what branch I’m on, when was the last change, etc.

                                                                                  1. 6

                                                                                    I’d consider renaming the utility, especially given the conflict with the git fetch command… my first thought was… “Why would someone write a tool as an alternative for a builtin command? Is the builtin not fast enough?”

                                                                                    Something like git-stat or git-summary, etc, seems more appropriate based on your description.

                                                                                    1. 1

                                                                                      Thanks - it’s clearer now :)

                                                                                    2. 2

                                                                                      The names are taken from similar tools used to display OS info like screenfetch and neofetch.

                                                                                      I agree that the README is pretty useless at describing what the script actually does.