Threads for benjaminmaccini

    1. 1

      All this is a conglomerate of various productivity blogs that I’ve lost entirely and personal trial and error. For me, Apple Notes with a logical folder structure (loosely based on the Dewey Decimal System) has yielded the highest reward vs effort for me. It syncs across most my devices and the ones it doesn’t, I can access my account via the browser. It has okay code support, but most importantly, support images (screenshots).

      You can mirror your bookmarks/local file system to the notes structure too which is nice, plus having codified notes makes recall simple in shared conversations. (e.g. call notes with a certain integration partner at a certain place of work could be coded something like 311.56. Slap that in an email and never loose it)

      Anything that requires hard thinking and is short of writing actual code, I use pencil and paper in a dated composite notebooks. You can think of the notebook as append only with no organization other than the dates. Once a notebook fills up, get another one.

      Between these I feel like I can write and find most things pretty quickly without bothering with the Sisyphean tasks of finding the optimal productivity workflow.

      Another philosophy that is pretty central to my workflow is that most things don’t need to be stored. I lose bookmarks all the time, and if a thought doesn’t come up at an opportune time and I fail to log it, that’s okay too.

      Hopefully this helps, productivity systems can quickly stop being productive, so my advise is keep it really simple :)

    2. 4

      they have broken code currently in production

      starts sweating nervously

      But seriously, why are timezones so difficult? Out of all the things that I would expect to “just work,” this one would be near the top of the list. Python is great, but it’s definitely not batteries-included and I find myself still frequently navigating an ecosystem of broken, stale or “incorrect” external libraries. I attribute this to the horrible state that Python online learning is in, probably because it is one of the most popular languages out there, there are so many misleading resources. It was a pleasure learning other languages, like Go or Perl, where I can turn to vetted and single sources of information for the “right way” to do things.

      Thanks for posting this, literally just helped solve a ghost bug that we’ve been sporadically encountering for months now.

      1. 10

        This article was written in 2018. As of Python 3.9, there is now the “zoneinfo” standard library which I believe should be considered best practice when working with time zones. https://docs.python.org/3/library/zoneinfo.html#module-zoneinfo

      2. 5

        But seriously, why are timezones so difficult?

        Alice wants to schedule a meeting with Bob. Alice proposes “1:30 Tuesday”.

        Level 1: What actual point in time does that mean? What point in time is “1:30 Tuesday” in Alice’s time zone? What is it in Bob’s time zone? What is it in UTC (which is presumably what the meeting server will store? How are you collecting the time zone information from both Alice and Bob in order to display the correct point in time to both of them? What about when Bob decides Carol (who is potentially in a third time zone) should also be on the meeting?

        Level 2: What actual point in time does that mean? What if Alice is scheduling the meeting from the time zone she normally lives in, but will be traveling and in a different time zone on the date of the meeting?

        Level 3: What actual point in time does that mean? What if Bob’s jurisdiction will switch to some sort of “summer” or “winter” time around that date? What if Carol’s jurisdiction is changing their timezone rules this year? Or: the meeting has already happened, but now an auditor is making sure Alice and Bob and Carol all stuck to their legal working hours. What if the time-zone rules for their jurisdictions have changed in the intervening period?

        And these are just the most basic top-of-mind things that can come up with time zones. The full reality is almost unbelievably complex, and it is that way largely because time zones are designed for messy humans who want their local time to vaguely match perceived solar time, rather than for computers which don’t care about that but do want consistent precise rules to follow.

        And the difficulty and complexity are reflected in the fact that every programming language I’m aware of has warts and complexity and difficulty and “oh, don’t use that” around dates and times. It’s not that Python is somehow uniquely unable to get it right where everyone else did – it’s that lots of people have gotten it wrong, but Python’s popularity amplifies your awareness of the Python-specific incidence of wrongness.

        1. 1

          It’s not that Python is somehow uniquely unable to get it right where everyone else did – it’s that lots of people have gotten it wrong

          I have exactly once attempted to tackle time information in detail (not in Python) and this is completely the right take. The amount of footguns surrounding our concept of time, irrespective of the language involved, is immense. I will never attempt this again, merely make it clear that my code does X to attempt to handle time information and everything else is an assumption waiting to fail. i.e. this note on Apple Cloud Notes Parser’s date feature:

          Note: This feature is not intended to be robust. It does not smartly handle differences in timezones, nor convert to UTC.

    3. 5

      I’ve been learning more about food recently and humans’ interaction with it. The most recent book being Food Politics by Marion Nestle (no, not that Nestle). The central thesis is that diet is a political issue, thus our relationship with food is tainted by the involvement of agribusinesses. It’s pretty US-centric, but since food systems are largely a global affair, it touches on the involvement of companies like Nestle (yes, that Nestle) in things like the predatory marketing tactics of food products (read: infant formula) across the globe.

      Makes me feel full of… rage? If anyone else knows any other food books like that, I am looking for recommendations.

        1. 1

          I have, but in sections it reads more like an op-ed piece. Still a good book and decent dietary advice, just have skim over the parts when he talks about Yeoman farmers and Jeffersonian ideals.

          Would love to talk more in private DMs

    4. 5

      A while ago I joined a team working on a mid-size web backend implemented in fully type-annotated Python. For me, the main benefits of type annotations comes from having type info that I can trust at hand when writing the code - for example, when you hover over a function in VS Code, there’s a popup that shows the function signature. This makes composing correct code much easier.

      Thus my experience hasn’t really been that “mypy catches so many bugs” - sure, sometimes running Mypy on command-line finds something and of course you should have a CI job running it to ensure that the annotations stay correct - but really the main productivity benefit for me has been that the type info allows me to avoid writing bugs in the first place.

      1. 2

        I agree, mypy really shines in a team setting for web applications. It is just one of many mechanisms that allows for quality code to make it into production without slowing down the review process. As a reviewer, I can have a lot of confidence in a PR, without even diving into the code, when I see tests passing and mypy’s approval. Also like you said, it helps leverage my IDE to the point that my IDE is teaching me how to code, all I have to do is focus on type signatures and doc strings, the rest follows.

        I will say, that there is a tradeoff after a point. Collectively, as a team, has mypy saved developer time? Yes. Individually, there have been instances where I need to implement complex types with Protocols or Generic signatures and I end up sinking an hour+ into making mypy pass when the code already works. That can shake the faith, for sure, but in those instances it’s also easy enough to just spot-ignore/relax the signature on trouble lines and move on.

    5. 8

      Just because no one here has mentioned Safari (that I’ve spotted):

      I use Firefox on MacOS because I want it to continue to exist and, selfishly, it does work really well for me. I have no complaints at all. I don’t notice speed differences when I try other browsers, and I like the small selection of add-ons I use, most of which are probably available on other browsers.

      I don’t like Google’s tracking or their near monopoly on browser engines (ironic as I did some work on the foundations of konqueror once, though not khtml itself) so I avoid Chrom(ium) unless I can’t get something to work in Firefox, which has happened once in the past five years or so.

      Anyone use Safari and swear by it? I have an ad blocker for it which seems to work, and also the 1Password extension, so I could use it, but thanks to M1 and the ability to fully charge my Air from a portable external battery when needed, I’m not concerned about saving battery as much as I was. Is there a reason to use Safari once you know that Firefox exists and don’t mind installing it on each new machine?

      1. 3

        Safari has always had the smoothest performance for me. It’s the only browser I use. Pedantic complaint, but simply resizing a window has visible lag on Firefox and Chrome whereas I can resize a window at 120 fps under Safari with no visible lag in page layout, etc. I use AdGuard for blocking ads and have had no issues.

        Been meaning to check out Orion as well, but haven’t been compelled enough to switch just yet.

      2. 2

        I’m fairly satisfied with Safari, but I really wish I could have straight up uBlock Origin.

      3. 1

        I try to follow the “When in Rome” approach for most native apps, browsers and tools. On my work laptop (Mac), use Safari. At home, use Firefox. On a Windows machine, use Edge or whatever. Same approach goes with (most) tooling configurations, use the defaults as much as possible. As someone who constantly reconfigures Vim, a lot (really… a lot) of time can get sinked into the customization my digital experience. Some things, like security, are uncompromising, but if my goal is to generally get things done efficiently, then reducing my setup overhead, app/tooling ecosystem, and number of cloud services is step number one.

        I always think back to an old coworker of mine who’s laptop shit-the-bed one morning and by that afternoon, he was back to working, on all channels, on a brand new machine. Of course, cloud backups are a thing, but sometimes it’s easier to be like water

    6. 1

      We just hired another developer (!!!), so this week and last are a bit slower while they get up to speed. Other than that, we had a semi-successful launch that yielded even more work to do. Anyone else that has done startups notice that tipping point where it goes from making your work to having the work made for you? Exciting, stressful, and different all at the same time.

      1. 1

        That’s a dangerous period as a dev at a startup. You really start to risk losing sight of the actual project/product goals in favor of chasing down features that your clients mentioned in a sales pitch meeting.. Pushing back as engineering can become one of the most important parts of your job.

        1. 2

          I can second that. I’ve worked in a tech company that was hired by a startup to build their product, and at some point they started asking us to implement every feature that ever got mentioned by potential customers. This caused them to lose sight of the strengths of the product and re-target to a new niche market every week. In the end their product was a watered-down mess and good at nothing in particular, causing their original niches to abandon the product too.

          Since we were “just the implementers” we never really provided a lot of pushback, but the constant massive changes required for these new features (which went pretty deep) were not good for the code quality and turnaround time, either.

        2. 2

          Yep agreed, a healthy back and forth between the devs and business needs to exist since day one.

          I suppose my comment was more referring to the “critical mass” that an organization reaches after a certain point. Now, based on the size of the team and customer requirements, work is being driven extrinsically rather than intrinsically. Not mutually exclusive by any means, but now work just… is?

          1. 1

            Oh yeah, that definitely happens. That part, in and of itself, is actually a very good feeling I think. You no longer have to convince anyone that your work is needed, it’s self-perpetuating.

    7. 1

      Well, at work we are approaching the soft launch of our product. So… speeding to get certain features done, clean some things up in our Terraform code and really trying to focus on those breathing exercises lol. So it goes.

    8. 7

      Staring into the gaping void of an empty “New Post” form for my blog until it stares back or I pass out from exhaustion.

      1. 2

        If you need inspiration: I’d love to read something from you about how to safely use the Argon2 family to derive a range of keys for different uses from a password. Reading some of the docs, it’s difficult to tell if it’s fine to just use a different salt, if the salt needs to be non-guessable, or if I should generate a single key and then use a KDF for deriving separate keys (and, if so, are there any other things that I should worry about when using a KDF with the output from a password hash function).

      2. 2

        The okta hack might be a nice topic for inspiration ;)

      3. 1

        Hope it stares back with intent! Love reading your stuff.

    9. 4

      Just moved to Chicago for work. So, I’m trying not to work too much, meet some people and settle in for my first real winter (speaking as someone from a city closer to the equator)

      1. 1

        Welcome to the windy city, you picked a cold time of the year to move out here! Happy to meet up and grab drinks if you’d like :)

    10. 3

      Kinda interesting “please stop ignoring basic Internet netiquette about crawlers”. Seems like there are very few regulations surrounding the use of crawlers. So what would even compel someone to adhere to general etiquette in the first place? Especially if you are Facebook

      1. 4

        Isn’t causing a denial of service against the law in many countries? If it gets out of hand, they are going to get sued. But I think this was simply a bug that is going to end up fixed soon.

        1. 4

          But I think this was simply a bug that is going to end up fixed soon.

          If so, that’s probably only because this person had a blog, took the time to write about it, and made it to Hacker News. I find that pretty depressing TBH. There should be some way to report abuse.

        2. 3

          Not sure, if you read the HN thread there are stories and similar reports that go back years (e.g. this or this). Perhaps it’s a bug, but they’ve been extremely lax in fixing it.

      2. 2

        Especially if you are Facebook

        When profits are on the line and shareholders to answer to, netiquette goes out the window.