1. 19

    I will produce, with each release, a quick, sure, and repeatable proof that every element of the code works as it should.

    “I will never work on an already extant and widely used piece of software, or produce any work using most actually-existing tools or ecosystems.”

    The code that I produce will always be my best work. I will not knowingly allow code that is defective either in behavior or structure to accumulate.

    ::bitter laughter::

    I will do all that I can to keep the productivity of myself, and others, as high as possible. I will do nothing that decreases that productivity.

    This ideal is actively harmful.

    1. 1

      This ideal is actively harmful.

      If I understand the intention correctly it includes “do not work too much”, “don’t do things that are actively harmful”. I think productivity and balance, especially if you think about it in a long run, go well together. Did I get right your objection?

      1. 3

        Did I get right your objection?

        Mostly yes. Overwork, burnout, etc., decrease what you can accomplish in the long run, and “keep productivity high” often gets reduced to mandates about volume of output in one way or another.

        On thinking about it, I guess I also have another layer of objection, which is that I often wish programmers would just do less. So much software should just never get written in the first place. So much of our industry (of industry in general) is engaged in active evils that would be impossible without the collusion of programmers. So many of the things that make it hard (or impossible) to maintain systems over the long term come from that class of highly productive programmer who churns out code too fast and at too great a volume for it to really be understood by anyone, let alone cleanly integrated into the existing structure. In order to avoid harm, it’s very often necessary to impede the productivity of others, so that the damage can be contained and channeled.

        Enshrining productivity as a top-level bullet point in an oath, even one that says do no harm elsewhere, runs contrary to how I want people to think about these things.

    1. 2

      The reMarkable is such a unique little device, I’ve had a lot of fun using my rM2 for reading and notes. I really appreciate the minimalism of the built-in software, and the open source community that’s developed around it is incredible. Look, other companies, at the kind of community you can have if you tuck root passwords into your devices’ settings app!

      1. 4

        well they were forced to via the license (GPLv3 by not paying QT) - support for rM2 OSS from the dev angle seems to be more of a polite gesture as long as the main ‘own’ display control is via binary hacks (LD_PRELOAD on their display server). I love my Rm2 hardware wise, a few thousand notepages in, but I also want their software out of it and run my own.

        1. 2

          Strong concur. As sold, the device is usable (with the very latest firmware) as an e-reader, a minimalist drawing/notepad setup, and a device specifically for reading and making marks on PDFs. That’s enough to be usable in certain workflows, since the display and the stylus input are really impressive, but it could be useful for so much more.

      1. 3

        I wasn’t aware the reMarkable’s display refresh is fast enough to support these sorts of interactive apps, as opposed to writing/sketching, which only updates small numbers of pixels at a time. Do they work well?

        1. 7

          There’s still a noticable lag if you’re use to using other touch display technologies, but it’s actually pretty good.

          1. 1

            yeah works pretty smooth, the only thing I don’t like is that the best offline method of importing stuff is an ethernet-over-usb bridge where you drop stuff in a local browser window. And you can’t get the SVG from the tablet without mailing it, at least without things like this repo (or SSHing into the device). Guess it’s the easiest way for most people that don’t care where their data runs through.

            1. 3

              I was fairly appalled when I realized you couldn’t just plug the thing in and have it enumerate as a filesystem, and their whole storage mechanism seems pretty grotesque under the hood from poking around over SSH. At least you can SSH into the thing, and I’m glad it’s hackable, but I do really wish it had been built from scratch with basic interoperability in mind.

          2. 4

            For eink it’s incredible. I don’t use scratch paper anymore and scribble throwaway notes and diagrams on my reMarkable instead.

          1. 8

            I am desperate for someone to tell me what makes a font “cute”. This isn’t a joke, I’m not making fun, I’m being entirely sincere. I have been baffled by emotional reactions to fonts for a long time and I really want to understand.

            1. 17

              I’m not a typesetting expert by any means, but it’s the feeling evoked by looking at the font.

              If a font has sharp, jagged edges, it looks industrial like some sort of equipment.

              A font with thin strokes and wide serifs has a formal feeling to it like old style text in an old newspaper.

              A cute font is generally going to be rounded, without serif, and with uniform thickness across each stroke with some optional flourishing. These fonts remind the viewer of a small cute animal with it’s rounded edges.

              Aside from the lettering looking like some sort of small animal, the lettering is a much cleaner version of the type you would expect a child to make while writing with a marker, crayon, simple paintbrush or some other wide tipped implement and may remind the viewer of their childhood.

              These are the things I see. Maybe someone else can offer some more enlightenment.

              1. 2

                I don’t know that I would have put anything this way, before reading your comment, and “cuteness” isn’t really a thing I generally experience from fonts (unless we’re talking about emoji), but I want to voice my support for letters that look like some sort of small animal.

              2. 8
                1. Babies are the baseline standard for adorability. They have big round eyes. They have big heads relative to their bodies. Adorable babies are also a bit chubby with gentle curves that have a large radius of curvature.
                2. To make a font more adorable, you need visual cues which trigger the adorability reflex. If you don’t have that reflex, I can still describe some analytical measures that work (okay, they work for me). Give it a large x-height relative to the caps height. That triggers the “babies have big heads” pattern. The lower case letters should contain big round circles, when there is a choice of letter form, which evokes the “babies have big round eyes” pattern. For the lower case ‘a’, you want the “single story” version, often associated with italic and san-serif fonts (but not exclusively), as opposed to the “two-story” version. Similarly for lower case “g”, you want the simpler version that has the bigger “head”. Also, san-serif is more adorable than serif.
                1. 14

                  Babies are the baseline standard for adorability. They have big round eyes. They have big heads relative to their bodies. Adorable babies are also a bit chubby with gentle curves that have a large radius of curvature.

                  Not gonna lie, I had to giggle because this is the first time I’ve seen someone attempt to come up with an objective measure of cuteness. How about we give it a unit of measure? I propose it be named an uwu. “The font was at least 30 centiuwus.”

                  1. 1

                    Hmm, I know babies are the cuteness standard but I never thought about that removed from the features themselves. Thanks!

                  2. 2

                    A few things make me think Fantasque Sans Mono is cute. It’s got relatively chunky strokes (the “m” has lots of “ink” to it). I put a sample up at https://m.bonzoesc.net/@bonzoesc/106105499791357051

                    There’s enough ornamentation to not be austerely geometric like Futura or Avenir, but there’s an imprecision and lack of uniformity to it. The top of the “k” is looped, and the loop is more tadpole-shaped than it is round, just like the void in the bottom of the two-story “a”. The middle of the “e” is gradually sloped, although that’s really subtle. The “g” is a fun two-story thing, with a bigger void in the basement than the ground floor. The leg on the “R” is at a funky angle. The “3” is bottom-heavy.

                    I guess to an extent it might be a feeling of irregularity, lots of things that are purposefully at conflicting angles, terminals on strokes being a bit suggestive of the hypothetical pen starting at an angle before aligning with the grid. Stuff that really only works on retina screens and in a way that an OS vendor wouldn’t pay for.

                    1. 1

                      Thanks! That makes a lot of sense. I guess I’ve never really carefully looked at individual glyphs.

                    2. 2

                      for me it’s how it’s rounded with a wide radius. kind of like those fridge magnets kids play with.

                    1. 3

                      I have so far not been motivated enough to learn Rust, despite some messing about, but if yeet gets actively adopted into the language, I’m more likely to do so by some small but real amount.

                      1. 8

                        I don’t really have a say into what the Rust community decides, but I’m predicting that “yeet” as a term will age spectacularly badly. It would be like naming a keyword “groovy” in the 1970s and still have to live with it today.

                        1. 31

                          If it’s anything like Groovy, we’ll have a mildly successful programming language named ‘yeet’, running on the JVM in about 30 years.

                          1. 2

                            The JVM will be around in 30 years?!… wait, it probably will.

                          2. 9

                            Yeah, it’s a good thing the field of computer programming avoided becoming saturated with neologisms from the 1970s.

                            :)

                          1. 12

                            For a few years now, my response to this question is a counter-question:

                            Is reading/writing/arithmetic a science or an art?

                            Of course they’re neither. So it is with programming. You can use programming to do either science or art. But it’s just a tool.


                            There’s a cool question in the middle of the post. As I understand “ontological status”:

                            Where does the essence of a program reside?

                            Following Peter Naur, the unsatisfactory answer for most programs is, “in the programmers’ heads,” with the increasing implication of incoherence for large teams of programmers. Very large programs stop being comprehensible in humanistic terms, and start to rather resemble egregores. Like gods, or bureaucracies.

                            But I think we can do better, retain more control. A better answer, for well-written programs, is “in the space of inputs accepted, as categorized into different regimes with relatively linear processing logic.” Personally I like to visualize this input space as tests. Haskell/OCaml and APL propose alternative approaches that also seem plausible.

                            1. 3

                              But I think we can do better, retain more control. A better answer, for well-written programs, is “in the space of inputs accepted, as categorized into different regimes with relatively linear processing logic.” Personally I like to visualize this input space as tests. Haskell/OCaml and APL propose alternative approaches that also seem plausible.

                              I think I’d say you were somewhere near the mark with “egregore”, a cool word I just learned from your comment, but that the space of what a program “really is” extends not just to the minds of the people who write / maintain / administer it, but to the entire substrate it operates on, including physical hardware and the minds of its users and the shadowy, informal conceptual footprint it has therein. Much like the way that, say, a fictional / mythological / historical narrative exists in the often vast and highly ramified space between authors and readers and cultural context.

                              Not that there’s anything wrong with trying to delineate space-of-inputs-accepted and the like - just that we’re probably kidding ourselves if we think that we’re going to get to comprehensibility at all, for large things. Creating bounded spaces within which to reason and exercising extreme humility about the big pictures seems like as good as it’s ever really going to get, most days.

                              1. 2

                                Very valid considerations. My answer to that is: if making it large gives up control over it, perhaps we shouldn’t make it large.

                                As a concrete example, one project I work on explores maintaining control over a full computing stack with the following limitations:

                                • single instruction set (32-bit x86)
                                • single video mode (1024x768 with 256 colors)
                                • single fixed-width font (8x16px)
                                • mostly text mode
                                • only ATA (IDE) disk drives, running in a slow non-DMA mode

                                It’ll add features over time, but only so fast as I can figure out how to track – and communicate to others! – the input space. For example, it doesn’t have a mouse yet, because I don’t understand it and because I don’t want to just pull in a mouse driver without understanding it and having thorough unit tests (in machine code!) for it.

                                Basically I want to consider the possibility that humanity has been adopting computers way too aggressively and introducing lots of risks to all of society at large. I don’t want software to go from explosive adoption to another hamstrung and stiflingly regulated field, bureaucracy by other means. There’s too much promise here for that, even if we take a hundred years to slowly develop it.

                                1. 2

                                  Very valid considerations. My answer to that is: if making it large gives up control over it, perhaps we shouldn’t make it large. … Basically I want to consider the possibility that humanity has been adopting computers way too aggressively and introducing lots of risks to all of society at large.

                                  Well said, even if I’m personally pretty sure the genie is out of the bottle at this point.

                                  I don’t think I can really draw a clear line in my own mind between what bureaucracy is and what software is, but I welcome efforts to ameliorate and rate-limit the poisoning of things that seems to come with scaling software.

                              2. 0

                                Uh, writing is definitely an art?

                                1. 12

                                  Not if I’m writing a grocery list.

                                  1. 1

                                    hmm. I was initially unsure reading this, but I think I agree writing a grocery list is probably not an art. I’m not shocked there’s an edge case here, but it’s interesting to think about. I guess the programming equivalent would be code ls or similar trivial cases

                                    1. 5

                                      It is by no means a rare edge case. If you assume all writing is art, that implies science is also art. Which is a reasonable and internally consistent interpretation of the terms, but not the frame of reference of the original question.

                                      1. 2

                                        Scientific writing (such as journal articles) is certainly an art. Many good scientists are bad at the writing.

                                        1. 2

                                          It sounds like you aren’t bothered by the original question. Which is great; it’s not a very interesting question. I’m personally more curious what you think about the second half of my first comment :)

                                          1. 2

                                            It’s a skill for sure, but that doesn’t necessarily make it an art. If I look at my own writing (which isn’t scientific but is technical) then the amount of creativity that’s involved isn’t much more than, say, fixing my bike: it requires a bit at times, but mostly it’s just working at it.

                                    2. 6

                                      It’s definitely a craft.

                                      1. 3

                                        That’s been my opinion for a long time now. Like other crafts it isn’t automatically included or excluded from other human activities - art, science, commerce, hobbies …

                                        If you accept that then the question posed isn’t very interesting.

                                        1. 1

                                          I think the interesting question is whether it’s a craft or an engineering discipline.

                                        2. 2

                                          Not necessarily. Designing a building can an art, a science, or a combination of both. A friend of mine does ghost writing for non-fiction. Most of it follows a formula and neither of us would consider it art.

                                          Words are a tool used to communicate the same way verbal speech is.

                                          1. 1

                                            But surely in ghostwriting non-fiction you still have choice in what words you use to convey the concepts?

                                            1. 1

                                              I’ve done a fair amount of technical writing for hire. Art enters the picture somewhere, to be sure, but where you’re writing to strict house standards and pre-set outlines it does have a way of driving most of the feeling of creative expression out of things. And I suppose that gets at how I understand “art” - a feeling as much as anything.

                                      1. 23

                                        my sort of default argument for this nostalgia is that you can just do what you were doing 20 years ago. You can spin up php and run it. You can ship hand-crafted HTML. You can do all that stuff and get the same experience.

                                        Except, yeah, people expect higher quality stuff than what you might be able to offer with those tools and your skillset. Or maybe they don’t and you are fine!

                                        You can keep on doing whatever you want. You can. of course, complain about tools etc but I feel like there’s an implicit “none of this is needed”. But I mean…. the author is the one trying to use webfonts! You can just use sans-serif! You can still use PNGs! You can just target desktop! Especially given that this person is running their own studio, I feel like they could just do whatever they want.

                                        I dislike a lot of this stuff but I’m at least willing to admit that most of it serves a purpose, just not in a great way.

                                        1. 14

                                          Except, yeah, people expect higher quality stuff than what you might be able to offer with those tools

                                          “Quality” is not really how I would describe my expectations of the contemporary web.

                                        1. 7

                                          I wholeheartedly support the use of more interesting–and perhaps even strongly biased political–examples in educational texts. SQL tutorials for example are super dry.

                                          That said…let’s not pretend for a second that anything right of center-left wouldn’t get slammed in the popular tech discourse.

                                          1. 5

                                            I was thinking something similar. When he brought up topics in his examples, I tried to imagine an example but mirrored about the mythical political center. I tried to imagine if those examples would be taken as just spicier examples, or would be interpreted as excluding those left of political center.

                                            Imagine for example:

                                            • calculations to determine exactly the income a Walmart greeter brings to a store
                                            • unions as negative forces on job mobility in a workforce
                                            • positive role of capitalists in society
                                            • police effects on lowering violence
                                            • NATO preventing worldwide war (I imagine this to be the direct mirror of the example given)
                                            • insurance shopping across state lines
                                            • idiocies espoused by gun control groups
                                            • management problems in public prisons
                                            • the positive result of tax cuts on disposable income

                                            All of these mirror the examples cited. I can’t imagine a book with these examples being published in 2021.

                                            More importantly, given two books on similar technologies, would the choice between them be made after considering the examples?

                                            Can there be examples which still manage to be apolitical and not dry?

                                            1. 6

                                              Can there be examples which still manage to be apolitical and not dry?

                                              Certainly.

                                              • Calculations of how big a 1700’s town would have to be to produce enough rags to support a papermill
                                              • Historical secret societies
                                              • Role of firefighters in society
                                              • Regulations on clowns and street performers
                                              • Tracking tagged wildlife migrations
                                              • Sports and other hobbies
                                              • Stalking a D-list celebrity, but written so extreme it becomes funny
                                              • Museum registries
                                              • Pseudoscience scholarship
                                              • Underground music genres

                                              Free riffing at 2 AM. Political examples aren’t primarily about being engaging, they’re about making a point. Note the problem with his war criminal example wasn’t that he was making a war crime database, it was calling Henry Kissinger a war criminal.

                                              1. 1

                                                Can there be examples which still manage to be apolitical and not dry?

                                                Maybe? I mean, you could argue that space exploration is in some measure political, but support/opposition doesn’t seem to be concentrated on one partisan side, at least in the US.

                                                But I just worked through this book and the examples were a both a lot of fun and, IMO, not political in the same sense as “Kissinger is a war criminal” or “The NRA is harmful to society” is political.

                                              2. 4

                                                “You are a director of state security tasked with the internment of dissidents and their eventual disposal…”

                                                1. 2

                                                  That said…let’s not pretend for a second that anything right of center-left wouldn’t get slammed in the popular tech discourse.

                                                  You’re not exactly wrong; I mostly just lack any real sympathy for this point because I think your politics are obviously bad.

                                                  That said, as long as it’s couched in standard-issue managerial technocracy, consumers of technical books tend to pass over implicitly rightwing ideological content without batting an eye. I’m not going to advocate for overtly politicizing every technical text, but let’s not kid ourselves about where nearly the entire practice of technology is situated in relation to the management and the owning classes. Surface-level culture war positioning and affiliations with political parties are one thing, economic and structural reality another. Mostly, we serve power, and the documentation reflects it.

                                                  1. 3

                                                    I think your politics are obviously bad.

                                                    I’d love to hear, in PM, what exactly you think my politics are, and why you think they’re bad.

                                                    1. 2

                                                      (I should probably just have upvoted this one instead of basically rewriting it.)

                                                  1. 1

                                                    The proposed solution sounds vaguely nightmarish as a default way of working, though I’ve had a lot of good experiences where everybody was focused on some aspect of the same problem. That aside, just framing the question is pretty interesting. We are constantly agonizing over how to get more people to do code review, and code review is kind of an awful experience in a lot of contexts. This is going to be on my mind for a while.

                                                    1. 1

                                                      The trackpads for years were mediocre

                                                      Well, at least starting with the 40 series they’ve had perfectly decent Synaptics models that track multiple fingers just as well as anything else. But I would say that its surface was not the most pleasant to the touch, glass is way better.

                                                      The longevity of ThinkPad batteries is also terrible

                                                      Hmm, can’t say I’ve noticed much degradation on the one I’ve had for about 5 years.


                                                      I went with a Pixelbook after the ThinkPad because the bulky build wasn’t appealing anymore. If you aren’t trying to use a laptop as a desktop (I’m not), compactness is the number one priority, so I’m not even considering anything thick enough for a full Ethernet port anymore.

                                                      1. 1

                                                        I wonder if Synaptics touchpad would be as good if Apple hadn’t paved their way first. If Apple uses translucent plastic, the PC industry will too, one or two years later. If Apple uses widescreen displays, two years later, you will have a hard time finding a PC with a 4:3 screen. If Apple’s keyboard quality deteriorates, the entire industry will have worse keyboards.

                                                        Apple is the unpaid R&D unit of the entire PC industry, for better or worse.

                                                        1. 2

                                                          unpaid

                                                          I mean.

                                                      1. 8

                                                        Oh, and fn belongs to the left of control. Apple and Lenovo get this right, why can’t anyone else?

                                                        I know some people have strong opinions the other way; ThinkPads allow configuring this in the BIOS – a little quality of life detail that matters a lot to some people.

                                                        I never use the TrackPoint, but I like that it’s there as it means I have discrete buttons (I don’t care that they’re on the top). I really dislike the integrated buttons that almost all other laptop ship with. I know a lot of people like the trackpad on macs, but personally I hate it. “Right click” with two fingers fails often enough (or is triggered accidentally!) to be highly annoying, and other gestures are even worse. And the cursor often moves while clicking.

                                                        I mostly just use ThinkPads because it’s easy; I know they will work on Linux most of the time, the design doesn’t change that fast or from iteration to iteration. I know what to expect, which is boring and the way I like it. Researching other laptops is a lot of work and I have more important and/or fun stuff to do.

                                                        When my x270 broke last year (slipped with laptop in backpack, fell on my back) I ended up getting a E585, just because someone had it on sale nearby for a good price. It’s not my most favourite model (battery life and size of the x270 was much better), but it works well enough.

                                                        When I had a Dell XPS 15 for work I started having annoying screen flickering problems; not the only one with those problems on that specific model it turned out, which seemed to be some sort of BIOS issue(?) Of course, Dell will spend no effort on fixing this, no matter if it’s a BIOS bug or not. I ended up just returning the laptop to work and buying the x270 myself.

                                                        The job before that I had the XPS 13 “developer edition” which came pre-installed with Ubuntu, and had some issues with that too. Curiously, I had fewer issues after I reinstalled the machine to Arch Linux; it actually worked pretty well after that 🤷 I think the pre-installed Dell drivers on the Ubuntu LTS didn’t quite work correctly or something, I tried removing those to just use the mainline Linux ones, but the kernel was too old or whatnot and it left me without WiFi (and no Ethernet port…) It was ridiculously time-consuming to get that fixed.

                                                        tl;dr: ThinkPads are the most boring predictable laptops I know; which I consider a good thing.

                                                        I agree with the sometimes ridiculous amount of ThinkPad wankery on /r/ThinkPad and the like btw. Peter Bright at Ars Technica was also a big ThinkPad fanboy and every move Lenovo made on ThinkPads made was extensively reported (whereas little reporting was done on other laptops, unless it was proper big news like the M1) until he left.

                                                        1. 2

                                                          Thank you, that’s better than the annoyed response I was going to write. Thinkpads are just decent predictable linux laptops that work well. With an external battery, my x270 has excellent battery life, and 16GB of RAM, I’m happier with it than with something that would force me to use mac OS.

                                                          1. 1

                                                            I had that too with a work laptop. Then I replaced it with Manjaro and everything worked as expected.

                                                            Seems like it’s Ubuntu having those issues on the XPS (15).

                                                            1. 1

                                                              Take Peter Bright’s reporting with a grain of salt. I also enjoyed his journalistic interests… until one day I saw that ArsTechnica had yanked all of his articles off their site. You should just search duckduckgo for his name. I’m not sure that he has made the best choices in life.

                                                              1. 2

                                                                They’re not yanked. The articles are still there, but his author page is gone and the primary author is now listed as “ars staff”. It’s not hard to find them, though; they’re still up.

                                                                I’m very glad he’s not free to do what he was convicted of doing any longer. Not sure I’d call it relevant to a discussion of whether or not Thinkpads are overrated.

                                                              2. 1

                                                                The job before that I had the XPS 13 “developer edition” which came pre-installed with Ubuntu, and had some issues with that too.

                                                                Running Linux on the one I had (a 9360 from 2017, so it’s been a bit) was ultimately just kind of a bad experience. Weirdly terrible performance, display glitches, network weirdness. Which feels like a risk I take every time I burn money on a laptop that’s not a ThinkPad. It might be ok, but it’s a lot of money to spend not to be sure that it’s going to be ok.

                                                                ThinkPads have been, in truth, kind of a mixed bag for most of the time Lenovo’s owned the brand, and they’ve made some bad design decisions along the way - the keyboard is ok now, it used to be a lot better, for example. But they remain a known quantity for my purposes in a way that I’m not sure anything else really does. This is in no small way because laptops generally are a really sad and infuriating class of product, where the priorities and interests of the manufacturers pretty much only align with mine by accident.

                                                              1. 10

                                                                I don’t think any other single cli tool has ever had such a big and positive impact on my workflow than fzf has, it’s really a great piece of work.

                                                                1. 6

                                                                  Your comment prompted me to buy fzf’s author a coffee or two https://twitter.com/qmacro/status/1377225451995852802

                                                                  I need to do this sort of thing more often.

                                                                  1. 2

                                                                    Thanks for the prompt, I did similar.

                                                                    1. 2

                                                                      I think that’s a good idea and I will do so also :)

                                                                  1. 4

                                                                    A handful from my setup:

                                                                    • h: navigate through directory history
                                                                    • b: bookmark directory paths, jump to bookmarks
                                                                    • git-sel-changed and git-edit-changed: use fzf to select from changed files in a git repo. git-edit-changed just wraps git-sel-changed.
                                                                    • VimwikiMakeLink: use fzf to select a page / tag to link to in my vimwiki setup.
                                                                    • ,f: a vim keybinding to quickly open files by way of fzf
                                                                    • ,F bound to FragmentMenu: include output from a fzf menu of scripts starting with fragment-. Date formats, brief markup templates, text decorations, etc.

                                                                    Of these, I use h and the vim stuff by far the most, but it’s a great general pattern and I should extend it to other things.

                                                                    Relatedly, rofi works pretty well for doing similar tasks under X. More or less a nicer replacement for dmenu.

                                                                    1. 1

                                                                      mind sharing how you set up h and b?

                                                                      1. 2

                                                                        First, in .zshrc, keep a log of directory history:

                                                                        # Record directory history to a simple text file:
                                                                        function chpwd {
                                                                          echo "$PWD" >> ~/.directory_history
                                                                        }
                                                                        

                                                                        I haven’t solved keeping the history for Bash, since I rarely use it on my desktop machine, but SO has Is there a hook in Bash to find out when the cwd changes? which suggests that wrapping cd in a function could work well enough:

                                                                        function cd() {
                                                                            builtin cd $@
                                                                            chpwd
                                                                        }
                                                                        

                                                                        Next, define h and b themselves. In a file that’s sourced by both Bash or ZSH, so should work fine in .zshrc or .bashrc:

                                                                        # Jump around in recent directory history - takes an optional query string: 
                                                                        function h {
                                                                          if [ ! -z "$@" ]; then
                                                                            cd "$(tail -2500 ~/.directory_history | tac | awk '!x[$0]++' | fzf --no-sort --height=50% -q $@)"
                                                                          else
                                                                            cd "$(tail -2500 ~/.directory_history | tac | awk '!x[$0]++' | fzf --no-sort --height=50%)"
                                                                          fi
                                                                        }
                                                                        
                                                                        # Bookmark list - if given a parameter, treats it as a path to add to the list:
                                                                        function b {
                                                                          if [ ! -z "$@" ]; then
                                                                            echo "$(realpath "$@")" >> ~/.directory_bookmarks
                                                                          else
                                                                            cd "$(sort ~/.directory_bookmarks | uniq | fzf --no-sort --height=50%)"
                                                                          fi
                                                                        }
                                                                        

                                                                        The awk '!x[$0]++' bit is handy for a bunch of stuff - I actually keep it in ~/bin/unsorted-unique. Just filters out duplicates from the list.

                                                                        Edits: Noticed I could use some extra quoting around directory names in h() and b().

                                                                      1. 2

                                                                        My ambitions have receded dramatically, as both my own limitations and the general badness of software as an undertaking have become clearer. Still, there’re a handful of things that come to mind.

                                                                        Somewhere around maybe 2006-07, I started sketching out ideas with some friends in the social sciences for a platform built around structured historical datasets. We were inspired by a few experiments with things like volunteer-transcribed US Census data. I’m not sure I regret not going down that path, but it might have redirected me to a history PhD and a research career and a very different life overall, so it’s interesting to reflect on what might have been.

                                                                        These days, the project that I have perpetually backburnered and occasionally pick at the edges of is a mechanism for unifying shell history, my written notes, bookmarks, and a tagging system. I want a way to slice and correlate things by time and subject matter across:

                                                                        • Documents I read and write
                                                                        • Commands I run
                                                                        • Things on the filesystem
                                                                        • Version control
                                                                        • Mail, photos, etc.
                                                                        • Financial transactions
                                                                        • External data sources - weather records and so forth, production logs from work

                                                                        I’d also like this all to feed into a process for gradually accumulating scripts and possible menus of actions by topic or path.

                                                                        1. 48

                                                                          I learned how to balance a red-black tree in college, 20+ years ago, and that’s the last time I ever balanced a red-black tree. Unless the job is writing data structures libraries, why would you ask me that?

                                                                          I’ve built large, production systems used in the most secure environments in the world. My code is secure, performant, accurate, and safe…but no, I don’t remember how to find all palindromes in a string off the top of my head.

                                                                          I remember interviewing at one of the Big Companies. I said I knew C. They asked me which format specifier in printf would do some obscure thing. I didn’t remember. Guess what? I’ve been writing C for…26? years now and I still sometimes look at man pages. I’d be more worried about a developer who didn’t, honestly.

                                                                          1. 19

                                                                            Unless the job is writing data structures libraries, why would you ask me that?

                                                                            Additionally, if I asked an engineer to build a data structures library with red-black trees and they started coding without immediately reaching for a description of the operations, invariants to maintain, etc, for a proper red-black tree, I’d be really nervous. It’s like when a waiter doesn’t write down your order.

                                                                            1. 5

                                                                              To be fair, an experienced waiter can probably keep your order in their head…

                                                                              1. 22

                                                                                I know that in some places it’s considered a badge of honour to be able to take everyone’s order without writing it down, but for many customers it just makes the service worse. I literally do not care how my order gets to the chef. All I care about is that it is correct. Writing it down increases my confidence that it will be correct, meaning that in the wait between ordering and getting my food, I can relax, confident that in due time they will bring me the right things, instead of worrying that I’m going to have to spend my evening negotiating with the waiter and waiting for the chef to get my order right by trial and error.

                                                                                In a similar fashion, remembering how to implement a selection of obscure algorithms is really low on the list of priorities for a software engineer. You could almost argue that for interview purposes, you want a problem the interviewee hasn’t met before, so you can actually observe how they go about solving it.

                                                                                1. 9

                                                                                  instead of worrying that I’m going to have to spend my evening negotiating with the waiter and waiting for the chef to get my order right by trial and error

                                                                                  Everybody’s got their own thing going on, but I can’t help thinking you might be optimizing for the wrong kind of restaurant experience.

                                                                                  1. 5

                                                                                    At risk of breaking the metaphor, we should optimize for safety first: Don’t serve allergens to patrons who indicate food allergies. This suggests that orders should be written down or tabulated in point-of-sale systems, rather than memorized, and that orders should be systematically assembled rather than designated by petnames.

                                                                                2. 13

                                                                                  Whether the waiter can or not, I trust the process less if they don’t write it down.

                                                                                  1. 2

                                                                                    I think this might be a “restaurant as status experience” thing? The waiter shows off their memory, this demonstrates that they’re a good waiter, which makes this a good restaurant, which makes you a person who eats at a good restaurant.

                                                                                    1. 9

                                                                                      I don’t know if it is an US thing but having been waiter/bartender/manager in multiple bars and restaurants in Europe, I think a lot of folks here seems to have had a bad experience with waiters or hold a grudge on how to optimize the certainty of having exactly what they said done. And for siblings comments comparing taking notes as a SE and waiters, I would love to see how SE making minimal wage and living on tips would learn to optimize their workflow.

                                                                                      I have been trained to not write down for any table under five people. I insist on trained, first we were allowed to take note for anything and after a few days/a week, you stop taking notes for any table under four etc. It began to be a challenge between colleagues. Bref, all in all you develop a kind of memory palace of your restaurant and their table and make weird association between guest and their commands, your optimize also your work and your are faster and more precise at the end of the day because you will remember longer. Heck, I still have in my memory the set up of tables of all the place I worked in and the orders of regulars and from random people that I happen to see in the city I was living burned in my head years later.

                                                                                      As a manager, my rule to train my team was to be able to take order for table of X where X was our average table. It was speeding up the process, making waiter more aware of the flow of his tables, better balance the workload to the bar and the kitchen by timing when to take some orders, reshuffle orders order to let a two people table bypass the ten people table before it reaches the kitchen or later with kitchen. And bartenders and cooks have to learn and do the same. A restaurant is never a FIFO sequential process, you have to manage a concurrent/parallel environment when everybody needs to be served at the right timing, within a known acceptable lag. Having waiters able to memorize your order but also remember it as long as you are in the restaurant, it is similar to the cookie session in your browser.

                                                                                  2. 0

                                                                                    Zeigarnik effect. Waiters don’t have to analyze, break down, reshuffle and regroup their orders. Software developers do that all the time. I don’t trust those who don’t take notes. All software developers take notes. Good and bad ones. Those who don’t - are not software developers, at best, they are code-monkeys.

                                                                                3. 9

                                                                                  Also, red-black trees suck. Keeping the colour in every tree node bloats the data – quite probably by 8 bytes for the struct size on a modern machine, and many malloc libraries round up to the next multiple or 16 or 32 bytes. And both red-black and AVL algorithms are complex.

                                                                                  Hash tables are generally more useful now, and b-tree like structures make more sense given cache line sizes (or VM pages), but if I do require a balanced binary tree then my go-to now is the scapegoat tree. The code is much simpler and smaller, there is nothing extra in each node, and it requires only a few bytes of extra global storage (for powers of your acceptable unbalance factor) for all trees, plus one integer per tree if you will be allowing nodes to be deleted. I can and have written complete bug-free code for scapegoat tree in 5 minutes in programming contests/exams where standard libraries were not allowed to be used.

                                                                                  But, yes, the main point here is that if I need to write code for a data structure or algorithm for my actual job then I research the literature, find the best thing, implement it very carefully (possibly with modifications), put it into production, AND THEN FORGET THE DETAILS to make room in my brain for the next task.

                                                                                1. 4

                                                                                  This seems like a pretty cool idea and I think I might experiment with some variant of it. I’m already sort of quasi-namespacing stuff in ~/bin, with prefixes like fragment- or filter-. There’s probably a good way to piggyback on that.

                                                                                  1. 3

                                                                                    I made phase.city recently, which is about the level of non-employment technical accomplishment I work up the ambition for these days: An HTML template and a cron job.

                                                                                    I maintain a few small things on the side. There’s a tiny blog engine I make substantial changes to every year or two. Sometimes I push mildly useful stuff to a dotfile repo. Mostly of late I find myself slowly iterating on a collection of notes and the hacky scaffolding around them.

                                                                                    Sometimes I remember a time when I thought my software work might be a way to build some form of lasting value, and daydream about the sort of world in which it might be. Generally though, I try not to kid myself.

                                                                                    1. 3

                                                                                      An HTML template and a cron job.

                                                                                      I feel this, so much.

                                                                                      I have a little script that shows the current moonphase too - I show it in the status line of my tmux.

                                                                                      Latest web “project” was inspired by Eternal March: http://gerikson.com/cgi-bin/eternal.cgi

                                                                                      1. 1

                                                                                        I have a little script that shows the current moonphase too - I show it in the status line of my tmux.

                                                                                        I set out to put it in my xmobar and got sidetracked - thanks for the reminder. :)

                                                                                        Latest web “project” was inspired by Eternal March: http://gerikson.com/cgi-bin/eternal.cgi

                                                                                        This is lovely.

                                                                                        1. 2

                                                                                          Thanks! You’ve inspired me to try to get a live clock working, using JavaScript, a language of which I have cargo-cult levels of knowledge in.

                                                                                    1. 3

                                                                                      Very interested if others have successfully lobbied against Google Analytics in their own companies and if so what strategies worked.

                                                                                      The small web design company I work for has long been in the habit of plonking it on every little thing we make, in most cases the only one ever to consume the data being Google as a lot of clients don’t care. But it’s hard to break the inertia and the “collect everything now just in case” mindset.

                                                                                      1. 2

                                                                                        I’ve tried pretty hard a few times.

                                                                                        So far, the only way I’ve discovered to work at a company that doesn’t put Google Analytics on stuff has been quitting and going to work for a nonprofit with a strict community-driven policy against giving user data to third parties. Since there are only a handful of those, and getting hired at most of them requires a perfect alignment of the stars and/or just the right lucky social connections at just the right time, I guess I can’t recommend it as a general approach.

                                                                                        1. 2

                                                                                          That sounds bang on sadly! If it doesn’t a) save money or b) make our lives significantly easier then it’s hard to sell an idea. I could certainly try with (b) though – Google Analytics for all its popularity is a complicated beast to use especially when you only want a few basic stats visualised.