Threads for ediril

    1. 3

      I’m quite excited about mojo. It seems like it will make python the language even more powerful by making it possible to create binaries. I’m curious to see how Modular is going to cultivate the community and choose to monetize it in the long run

      1. 6

        I’m sure you can create binaries of Mojo code, but how would it work with Python code? Is that being claimed?

        I think there’s been a great deal of confusion over the technical relationship between Mojo and Python.

        As stated in their launch docs, Mojo doesn’t even support Python classes. So uh all NumPy objects are instances of classes.

        What I saw shown was that you create vectors and matrices with Mojo struct , and then you copy them into NumPy objects to use matplotlib and so forth.

        That seems like a good strategy for a fast low level language interacting with a slower dynamic high level one.

        But I don’t see a real path to creating binaries from code of the typical stack: Python + NumPy + SciPy + matplotlib, etc.

        I think there is going to be the “long tail” issue

        1. With significant effort, you can create a version of Python that looks compatible enough to users writing new code. See Jython, IronPython, PyPy. I’m sure they can do this.
        2. With great effort, write a Python interpreter that can run any pure Python code out there. MicroPython is an example of a useful project that falls short of this (e.g. its Unicode is different AFAIK), but I also think they can do this.
        3. With even greater effort, your interpreter can run some C extensions. See PyPy’s long history with this. Note that Python is only recently getting a stable ABI – in the past you actually would have to emulate CPython 2.6, 2.7, 3.0, 3.1 APIs to run code !! PyPy has parallel releases to match different version of Python.
        4. I think it’s basically an unsolved problem to run even 50% of the important C extensions out there. Is CPython is the only implementation that can run NumPy and Pandas? I think so. And if you add matplotlib and few others, I’m pretty sure it is.

        I think you can get to #2 in a few years (although don’t underestimate how hard it is to implement Python classes compatibly !! It is a very big language semantically; the syntax is misleading)

        I don’t want to be too negative since Lattner basically achieved the impossible with LLVM / Clang, improving all of open source … but I think 3 and 4 will take a lot longer than people think (if they are even goals, and I think they are).

        Higher level can sometimes be harder, because you have more stuff that you sit on top of. Python sits on shakier foundation of things that have more versions than say x86 and ARM, which LLVM sits on.

        Also I think doing things within a company could discourage outside contribution and knowledge, which I think is needed. It seems to me like LLVM succeeded in a large part because it was open source and also sponsored by Apple, Google, etc.

        One concern I had is that I didn’t hear much mention of them hiring people in the Python community … like NumPy creator Travis Oliphant has his own company and projects around fast Python compilers. I think it would go a lot faster to approach things from both sides – i.e. basically fork NumPy for Mojo and then merge things upstream. But maybe that’s already happening and I don’t know, or they will quickly change strategies to something like that.

        1. 2

          Their current solution to run Python code (from my understanding) is exactly like how Julia / Swift bridging to Python: running Python code in CPython interpreter and then bridging through CPython API. It works (I maintain my own fork of PythonKit for Swift, which owes it’s origin from S4TF project), but to go deeper, 1. you cannot make Python go faster; 2. the bridging of custom types such as numpy ND-array, PyTorch’s tensor would still take effort and not automatic; 3. it restricts the host language choices such as refcount over garbage collect (this is easier since Mojo is a new language and aim to have familiar syntax as Python).

          1. 4

            Right, this is basically exactly what I was trying to say

            I don’t know the details, since the project isn’t public

            But everyone is thinking they ALREADY wrote a superset of Python. But what they appear to have done is

            • Wrote a small, fast, static language with Python syntax, and with a runtime bridge to CPython
            • SAID they would make it a superset in the future

            There’s a huge difference between those 2 things. I’m not saying they can’t do that, or won’t do that – I just want to know what it is, without being clouded by marketing. I have huge respect for accomplishments of the Modular team, but the way it was presented was pretty confusing.

            (And this substack post certainly didn’t help with that!)

        2. 1

          They have their own standard library implantation and their own compiler. It basically supports python language features plus some new syntax for new capabilities like static types

          1. 2

            Yes, but the compiler and stdlib are not for Python – they’re for Mojo

            Right now Mojo is a language that links with and talks to Python, and maybe some day will become something like a superset of Python

            As mentioned, it doesn’t support classes. Think about how much of the Python standard library you can run without classes – basically zero.

            1. 1

              it doesn’t support classes

              it doesn’t support them yet

              Mojo still doesn’t support classes, the primary thing Python programmers use pervasively! This isn’t because we hate dynamism - quite the opposite. It is because we need to get the core language semantics nailed down before adding them. We expect to provide full support for all the dynamic features in Python classes, and want the right framework to hang that off of.


              The goal is explicitly to become a superset of Python

            2. 1

              Adding support for classes is on their roadmap

              Having a Python compatible standard lib means you can run your Python code as is via mojo without changing it.

              Some python libs would need to be ported over to mojo. If it becomes popular, I’m sure that all happen. If they keep the language and the tools open source, i think it would help become popular. We’ll see..

        3. 1

          Btw I don’t think they will ever do #3 or #4. Mojo isn’t trying to be a better Python. It’s using python as a stepping stone because it’s a popular language, especially for ai/ml.

      2. 1

        Yes, they have definitely got the attention. It seems promising, although in order to get the max performance we do need to step outside of the Python syntax and use Mojo’s extended syntax but that is the case in Python as well – you would write C/C++ or Cython code. The advantage here is that the same Mojo code will run on every hardware without any changes.

        As far as monitization is concerned, I think Modular might leverage their platform such as the AI inference engine and other offerings. Mojo, they are going to opensource at some point.

    2. 3

      I used to try to just use the laptop screen because I enjoy working from different locations and every time I switched from the monitor to the laptop, it was a bad experience.

      Then I had to switch to Mac for work and now it’s not an issue any more. Both the laptop screen and its monitor feel similar enough that I can work on both with no degradation. OSX is not the best but the visual experience is well beyond windows (not that OP is using windows but that was the issue in my case)

    3. 2

      The models were able to get large enough which is due to enough compute resources being available to build such large models.

      We are in the “computers are the size of an entire room” phase of AI models at the moment. The focus now should be to shrink them while keeping and improving the functionality.

      1. 1

        Yep. Giant models start looking like information retrieval algorithms.

    4. 7

      But your stack is unlikely to ever be the “main character” your customers rave about

      Weeeell… In the early days, whatever you can put together and sell is fine. Later on though, if the company can manage to stick around, the tech stack will matter because it will determine how easy/hard it is to scale your engineering org. Tech stack also affects things like how easy/hard it is to accrue tech debt.

      So, of course it does matter, but in most cases the company either doesn’t make it that far or get large enough for it to matter.

      1. 4

        Tech stack also affects things like how easy/hard it is to accrue tech debt.

        Does it, really? I would imagine this to be one of those things that might be hypothetically true in a vacuum, but in reality the effect is overwhelmed by more important factors such as engineering skill, communication, culture, economics, management style, etc.

        What sort of evidence are you looking at to support the assertion that tech stack matters for tech debt?

        1. 1

          Yes it does. Some languages protect you against shooting yourself in the foot, or encourage the right mindset, while others require more seasoned coders which are harder to hire (both in terms of numbers and also salary), so you’ll be letting less experienced programmers handle it in the earlier days. They will likely make it work but that’s only half the story. How they make it work also matters in the long run.

          Bottomline is, to say that tech stack doesn’t matter is very naive. The statement lacks context at best.

    5. 5

      Wouldn’t it be simpler not to even talk about energy and spinning etc? Here is a simpler one sentence:

      FT is an operation for calculating which frequencies your signal contains and how much.

      1. 7

        You are explaining what it is but not how it works.

        1. 6

          I can’t quite picture “spinning a signal around a circle” in my mind’s eye, can you? It is just stating in English what e^(i*2*pi) is, which is a circle.

          How about this:

          “Probing your signal with a unit vector spinning at all angles between 0 and 2π to calculate how much of it lies along each angle”

          This I can picture..

          1. 5

            Maybe just “wrap” might be better than “spin”.

          2. 3

            Sure I can. It’s like an oscilloscope where the horizontal sweep is a polar sweep instead.

      2. 1

        I think that you’re half-right. Your approach is “simpler” in the sense that it’s more specific to signals, and that’s the context that we’ll usually care about. I wonder whether we could also be “simpler” in the sense that we would talk about conjugates instead of signals in particular. Maybe we could adapt the article’s sentence to something like:

        To find the conjugate variable for a particular measurement, differentiate that variable with respect to its conjugate at that measurement, and average the values that the variable can take.

        Let’s try it for position and (linear) momentum:

        To find the momentum of a particle given our ability to measure its position, take the finite differences between each measured position, and average them.

        Technically correct! The missing ingredient is time; we normally don’t want to talk about time because we are using time as one of our two domains for signal analysis, and this is a blind spot for the original one-sentence approach.

    6. 5

      I’ve been questioning the incentives behind writing any free content online ever since internet became primarily an advertising platform.

      So what could be the motives behind this post? Why would David take time from his busy/fun life and care to share their decision to leave the cloud?

      I think they are trying to push buttons by announcing a decision that is against the current grain, hoping people would get so outraged, stumped, curious that they would stop and pontificate on the topic. That will increase mind share of Basecamp and is an insidious form of marketing. This company is a grandmaster st this.

      That’s the lesson here in my opinion. Forget about the technical merits of their decision. Think about how much this “controversial” announcement is going to increase their mindshare. And think about how you could use the same playbook for your own app, business’s, life..

    7. 4

      I was on-board until I got to the Javascript bit. It’s a shame they don’t regenerate the served-page as partof the NOTIFY step, then you wouldn’t have a javascript requirement to view comments.

      1. 5

        There’s an alternative approach further down which eliminates the need for javascript that involves writing the comments directly into the HTML file

        1. 4

          This is really what I was expecting when I saw “static comments”. In theory, you could POST data to an endpoint, and code a server to write that data to HTML. But this is just an implementation detail, the fact remains that most of the content is HTML.

          It’s a shame they don’t regenerate the served-page as part of the NOTIFY step

          Without something to protect you from serving a 404 in the moment of time that the file is being rewritten, it’s definitely possible to encounter weird temporary errors by doing things this way. It happens to me a lot when I’m writing documentation and watching files in my app directory for changes…you’re pretty much guaranteed to hit an error every once in a while because it just hasn’t gotten around to generating that file yet. I think solutions like Next.js may handle this at the app server level, because they can block the request until the new file is done generating, but that of course requires a server and edges on the JAMstack side of things rather than fully static “web 1.0” :D

          1. 5

            Without something to protect you from serving a 404 in the moment of time that the file is being rewritten

            Sounds like an issue with the site-generator tool. Ideally it would build the site into a new directory and then atomically replace the old directory with the new one, instead of deleting the directory first and then rebuilding it.

            1. 2

              This was a documentation generator (typedoc --watch), so technically not designed for that purpose…but the fact that I was experiencing made me realize that it’s not quite as easy as just rewriting an existing file in place. What you describe definitely sounds like it will work better, especially for most static generation use cases.

          2. 3

            In theory, you could

            so you can in practice:

        2. 2

          Yes, it’s not a fully static site with this little bit. But in this case I totally don’t mind. Derek’s site is really, really minimal, and even the use of Javascript is minimal. So how his comments work is they’re NOT loaded initially. And only if you scroll down to bottom, it’ll trigger a load - both comments and the new comment form. It’s quite neat, old school use of JavaScript.

          1. 2

            Thanks. My other comment here - - explains why I did that, even though I’m generally averse to JavaScript: it stopped spam-bots.

      2. 3

        I agree. (I’m the author.) I posted this as a response to someone asking by email how I do comments.

        As I was writing it up, though, I thought, “Huh. There’s actually a much simpler way.” — the way you describe.

        But for now I just posted how I do it now, and in the future if I change it I’ll write it up again.

        1. 1

          sorry for the very-late reply, I’ve just seen my inbox after a hiatus but I wanted to add (lest my original comment seem too negative/snarky) that this was a very interesting article, it solves a problem I still have and so I’m likely to come back to it. Thanks!

    8. 1

      This isn’t quite the setup I picture regarding a “static html website” (since it requires a backend and a database running on the web server), but it’s an interesting approach to turn a normally database backed feature into a static one

      1. 1

        static =/= files. Static means not dynamic, i.e., no content is generated on-the-fly.

    9. 5

      Also Magnusviri, the original author of the SD M1 repo credited in this article, has merged his fork into the Lstein Stable Diffusion fork. You can now run the Lstein fork with M1 as of a few hours ago.

      This adds a ton of functionality - GUI, Upscaling & Facial improvements, weighted subprompts etc.

      1. 1

        I tried the magnusviri repo a week ago on my M1 13” and it was fairly slow. I switched to my PC with a 12GB 3060 which is much speedier. Still pretty great that it works on the M1 easily. I’m sure the performance will improve if it hasn’t already in the past week. Thanks for the fork link!

    10. 2

      Source code available here: No npm, no build system. Uses just a handful of libraries

    11. 10

      I use it with regex like the example they provide in the article (if-s and while-s in general), where it is great in my opinion. The other usecases do indeed seem a bit contrived

      1. 2

        this ☝💯, with one addition: the variable being assigned to should only be used inside that if/while block. (anything used afterwards deserves a normal assignment.)

        1. 1

          It’s unfortunate that this isn’t enforced because of Python’s weird scoping rules.

    12. 5

      Building and debugging and testing a service worker is still so hard. Working out why this page is cached, or why it isn’t cached, or why it isn’t loading, is incredibly baffling and infuriating

      I just spent the last two days at work updating an internal chrome extension that uses a service worker. I spent at least 3 hours one day repeatedly refreshing the page and updating the worker, only to realize there was a syntax error that was reported with a less than helpful message. It took a lot of fiddling to get it right. Service workers are cool, but very frustrating to debug!

      1. 4

        Desktop app development gets a lot of flak but at least the tools are much nicer to work with. In comparison, browser development is still the wild wild west

        1. 2

          Desktop app development gets a lot of flak but at least the tools are much nicer to work with.

          And there’s a hierarchy of nice there too. I’ve had a few “oh wow” moments from experienced Java engineers watching SLIME-based Lisp development where you jump from macros down into disassembled functions and back up again, all over an SSH tunnel into a running test server.

        2. 1

          Agreed. On one hand it’s cool to see the constant innovation and creation in the web/browser space, but on the other it’s just so hard to keep up!

      2. 2

        It’s extremely infuriating, especially because it’s hard to tell whether one is doing something actually wrong, or if one’s doing exactly the right thing and the problem is that Cloudflare is caching the page or the web server is or… something. Somewhere in my head there is a conversation I want to have with someone who knows exactly what they’re doing on this front where I can say “look, here is the situation, I keep hitting refresh and I never get the new version, please tell me why” and then when they investigate and find out why, I can say “cool, how can we make the devtools be clearer in this situation so I won’t have to ask you next time”…

    13. 22

      That’s a pretty good question, I’ll have to keep this in mind!

      My own go-to questions (mostly to weed out the real red flags):

      • What kind of version control do you use?
      • How do you track tickets?
      • How do you test?
      • Do you contribute back to open source software?
      • What are the typical working hours?
      1. 15

        Do you contribute back to open source software?

        That’s a pretty good one.

        1. 3

          This is great to catch imposers. I’ve used it to filter out academic job offers from incompetent groups. When they said yes, of course, I asked to see the code. It was always a mess or no code at all just cloned repos.

          Other favorites of mine:

          • Is your process push or pull-based?
          • How busy is my manager (ideally check how many hours he is not in meetings)?
          • Are offices open plan?
          • How many people would I share my office with?
          • How do you support healthy habits, especially ergonomics?
          • How much of my dev setup can I manage?

          The last one sounds weird, but some organizations insist on denying me the permissions to do anything useful on my own machine. They want me to call an admin for everything. It’s an immediate no-go.

        2. 2

          Why does it matter whether they contribute back to open source or not? Do you mean to ask do they contribute fixes when they find bugs back to open source libraries they are using? Or that they spend a portion of their time working on open source libraries/projects?

          1. 27

            Let’s put it this way, if they have culture of taking and not contributing in any way or form… that culture won’t stop at source code.

          2. 11

            If they are not willing to contribute back fixes to open source software, they are either willing to maintain their own private forks of it (waste of time, poor security culture), or are more likely to work around it than to fix the source of the problem, which is indicative of poor engineering culture.

      2. 3

        IMO whether they do these things or not is the most important. How they do them is not terribly critical. (If you are hung up on how they should be done, that’s a different issue you’ll need to work on yourself)

        1. 5

          Which version control or unit test framework isn’t the issue, it’s the whether it’s there and how heavyweight it is.

          Sure, in fact a complete set of cowboys may be hiring someone to fix the problems of the lack of process. (Hint: If the role doesn’t come with the authority to make it happen, say thank you, but no thank you. Really good way to burn out.)

          I have heard of shops where the answer is the on other end… the process is so heavyweight the answer is “If no one is yelling, don’t fix”. Again if they aren’t hiring to fix that and the role lacks the matching authority to make it happen… Run away, don’t walk.

        2. 3

          I interpreted @sjamaan’s questions in two categories, culture and practice. I think this is especially important for small / startups. My realization is that, you really want to work in a place that both culture / practice aligned with yours. Some of these I won’t call it “red-flags” so much as “preferences”. But preferences alignment is great if one thing you work to optimize for is happiness. In that spirit, how they do them is important as well.

          I would also add (of course, these are really about QoL questions, not about the profitability prospects of the said companies):

          • What’s your CI / CD process?
          • How do you manage your infrastructure and who is responsible for deploying updated infrastructure (If they do IaC)?
          • What’s your build system? How many repos you have and how do you separate them (if at all)?
          • Do you have a performance / goal management process? How that run?

          Again, none of these have the “right answer” or “red flags”. It is about alignment and make you happy when these process were aligned to what makes you productive.

          BTW, if you are not the first 5 people hired, or hired as VP and above, don’t think about that you can change the culture / practice. May be you can, but that will make your life miserable in the process.

          1. 3

            BTW, if you are not the first 5 people hired, or hired as VP and above, don’t think about that you can change the culture / practice. May be you can, but that will make your life miserable in the process.

            At one stage I was transferred to a role to implement good practices in a team. By being “helpful” and being good at scripting (A ruby-ist in a world of C programmers has super powers. ;-)) I made a fair amount of progress.

            By taking control of the build system I made a lot more. (You can slowly ratchet up the code quality and pin it, and get a CI system started.)

            Hiring two excellent like minded programmers helped a lot leading to a fairly good CI setup.

            But ultimately short termism by project managers stifled all further progress and I gave up the role. I would not take on such a role again unless it included authority block serial cowboys. It’s the pig wrestling rule, if you trying to pull a pig out of the mud and you find the pig enjoys both the mud and wrestling… Stop.

            I do what I can to notch quality slowly upward, but I try hard to avoid pig wrestling.

        3. 2

          I agree with that. Asking how they do it allows them to expand on their answer and allows me to get a better feeling for how sophisticated their thinking is about the topic. For instance, if they’re telling me they’re doing only manual testing or that they’re using CVS for example, that could be cause for concern.

          The specific tooling they’re using matters in the sense that you have to deal with that stuff on a daily basis, so if it’s truly arcane and painful I’d like need to know what I’m getting into in advance.

        4. 2

          Wouldn’t most employees in other professions dislike a job/employer if they required that employees use terrible tools to do their work? There’s obviously some “process” questions implied in what was asked above, but I think considering what the company mandates employees use to do their job is also 100% valid. You, as a new employee, are not going to be in a position to get anyone to change any of that, so you better be happy with what they force you to use to do your job.

    14. 4

      do a coding question Let’s say your algorithm is finding whether a given word is a palindrome.

      The author criticizes asking the candidate to write a to-do app and the alternative he proposes is the above. I don’t think that’s any better unless they ask their devs to solve problems like this on the job 😅

      1. 1

        Yea, I’ve asked, “so are you working on a new product that does this?” In interviews like this. Kinda contradicts themselves there huh.

    15. 2

      Python doesn’t have a compile/build step where normally a statically typed language would enforce types.

      Enforcing types at runtime is only slightly better than not having any type hints since the result will be the same: an exception getting thrown (due to misusing an untyped variable VS type hints finding a mismatch)

      This basically leaves what we have today, smart tools (VS code, PyCharm etc) highlighting issues at coding time.. I know many devs out in the wild abhor the idea of using an IDE to write python code though. Plus discovering issues this way requires being physically on the file where the problem is.

      The alternative is to introduce an optional pseudo-compile step, just like statically typed languages, where all type related problems (and perhaps others) would be discovered. And that’s Mypy :)

      OP highlights all these, doesn’t offer an alternative so it is what it is 🤷‍♂️

      1. 5

        The CPython interpreter — which for many people is “Python” — does have a compile step, because it’s implemented as a stack-based VM, and must first compile Python source code to bytecode for that VM. And the process of parsing Python is well-specified enough that there are static analysis tools for Python which produce and work with the abstract syntax tree rather than the source code.

        It’s just that none of these currently read the annotations that are used for type hinting, or perform any type of enforcement of them.

        And to be perfectly honest, I don’t understand why “it only counts if you have a tool of this exact name running at this exact time in this exact way” seems to be the argument here — people who work in, say, Java don’t just ignore all the stuff their IDE flags and say “eh, the compiler will catch it, and fixing it before I run the compiler is incompatible with my theory of what static typing is”. They try to clear that stuff before they invoke the compiler.

        1. 1

          The CPython interpreter — which for many people is “Python” — does have a compile step, because it’s implemented as a stack-based VM, and must first compile Python source code to bytecode for that VM

          Very true but that build step doesn’t get exposed to the python dev in the same way it gets exposed to say a c++ dev. It also doesn’t quite have the same usefulness in uncovering errors before runtime.

          If there is an error in my C++ code, I’ll know about it before I’m able to run my code. OTOH, I can “build” and run my python code with errors as long as I don’t hit the parts of the code with the errors.

          1. 2

            If there is an error in my C++ code, I’ll know about it before I’m able to run my code. OTOH, I can “build” and run my python code with errors as long as I don’t hit the parts of the code with the errors.

            If your code is not syntactically valid Python, you find out at “compile time”. You can force this with the compileall module, and I recommend doing it at, for example, container build time so that you don’t have to have things compiling to bytecode later.

            On the other hand, if your C++ contains a fatal logic bug or something that will segfault or so on, the compiler does not tell you and you won’t find out unless/until you hit the critical code path.

    16. 4

      I don’t quite understand why people are interested in learning a language using spaced repetition and/or memorizing.

      When you start working with a new language, you naturally adopt a spaced repetition-like approach to learn the constructs as you try to write code to accomplish tasks. Memorizing is never effective anyway, you won’t know where and how to use what you memorized.

      I dunno maybe I’m the odd duck 🤷‍♂️

      1. 9

        I initially did this mainly for the less-used functions.

        I used to pair-program alongside — one of the inital contributors to Rails — an absolute master of Ruby, and a really inspiring programmer to watch.

        I was blown away by how he seemed to know the entire Ruby standard library, and have it all in his head, and at his fingertips. Knowing it was there to use, and already knowing how to use it, kept him in the flow and working so quickly and easily.

        So that’s why I started doing flashcards for learning programming things. It’s worked out well.

        Then when learning a new language I find it helps it get into my head quicker and deeper than if I were to just let it happen slowly and naturally. Similar reasons. Deliberately putting things into my memory that might not have worked their way there otherwise.

        1. 2

          and have it all in his head, and at his fingertips

          This level of fluency really does make a big difference. It’s one of the reasons I think the modern trend of piling on tools is so damaging. With a large toolset, it is impossible to reach that kind of mastery with all your tools. And what you lose is usually not compensated by the “right tool for the job” benefit.

        2. 1

          Thank you Derek.

          Actually, I think I end up doing something similar but without the help of an app. I keep track of links for how to do various things. It’s much slower to work off of links of course. I could try using a dedicated app instead, both as a search engine and also spaced repetition learning

      2. 1

        I’ll admit that I’ve never used flash cards for computer code. As an educator, I have a slight bias against them. I’ve seen too many physics students use flash cards to memorize every problem from every assignment over the semester, only to bomb the final due to the questions not being exact copies of earlier problems.

        That said, I could also see two places where this would have helped me. I’m writing some Emacs scripts that talk to libpurple over DBus. I’ve been working on this off and on for a couple of months and doing quite a bit of debugging to figure out why the signals I get don’t match my expectations. Yesterday, learned that there has been a dbus-monitor command that would have told me everything I wanted to know. Had I done a set of flash cards of the dbus commands before setting out, this wouldn’t have been surprising information.

        Similarly, I’ve been maintaining two code paths to update the chat log, both on the signal of a message being sent and on a signal of a message being received. A journey into the documentation today found that there was a signal that triggered on both of these events that cut everything down to watching a single signal. A little time with flash cards of the available signals would have told me to look there before wasting time writing a bunch of duplicate code.

        1. 2

          Yesterday, learned that there has been a dbus-monitor command that would have told me everything I wanted to know. Had I done a set of flash cards of the dbus commands before setting out, this wouldn’t have been surprising information.

          Why not just read (or skim) the documentation?

          1. 1

            I did skim the documentation, but I quickly forgot 90% of it by the time I started writing. When I was in the middle of the code was when I needed this information and I didn’t remember it. It was on a second skim that I found the issue.

            That said, I’m not particularly advocating for flash cards. Just trying to provide for a possible example.

    17. 19

      I’ve recently started a fantastic new job – the only wrinkle was that it came with a Windows 10 laptop.

      Honestly I think I would probably pass on a job if it involved being forced to use Windows (at the exclusion of all else). I don’t dictate the tools a plumber uses when I employ them and as a technologist my computer and the tools upon it are my professional tools so I expect to be able to use them.

      1. 5

        If something like that is forced that would be a red flag for me too. But most of the time they’re just not that familiar with Linux. My current job was the third in a row where I casually asked about it in the interviews and each time the response was: Well, we don’t know Linux, but you can be the first if you want. Just be aware that you must install it yourself and we cannot help you if something doesn’t work.

        Always worked out fine.

        1. 1

          It’s not just unfamiliar with linux. It’s that they aren’t allowed to use anything else, to work with clients or partners. I’m guessing a lot of that we have to thank Microsoft for, but e.g. you can’t work on projects for a lot of German car manufacturers if you’re on Linux (or Mac for that matter), because you can’t run the mandated security, audit and other tools, or at least ensure of the same. Yes, I know you can, at least to the same manner that you do with windows, but you just don’t have a licence to do that. So we all run windows :(

      2. 3

        That’s fair, for a consultant or someone who works alone like a plumber. Not quite applicable for a company who employs dozens or hundreds of devs. There is benefit to standardizing the tooling.

        However, I agree I don’t like Windows and would hate to work in it all day every day 😬

        1. 3

          Exactly, a multitude of OSes adds friction.

          I’d like to provide CLIs to all devs in my small company and it’s a lot of pain. Mac OS Arm/i86, Linux, Windows.

          Windows is hardest to support, mostly because every dev seems to use a different shell and symlinks behave differently depending on…

    18. 4

      How Wave uses SQLAlchemy exactly is not mentioned in the article, but what is described (global session) is certainly not SQLAlchemy’s fault.

      SQLAlchemy makes it easy to shuttle database elements in and out of Python objects. Is it absolutely necessary? Of course not. Is the alternative simpler? Well, it depends on how you look at it. Shuttling data in and out of Python objects can be PITA.

      SQLAlchemy has two interfaces, core and ORM. Although not explicitly mentioned, I imagine the author is refering to the ORM interface, which does abstract away the raw sql but it is quite intutive. There is also a way to run raw sql queries if you like so using python code to string together sql queries is not the only option.

      Btw it is certainly possible to manage your connection lifecycle anyway you like with SQLAlchemy. Global request session is not unavoidable.

      The actual issue behind the visible issue in the article might be that it takes a certain level of experience with SQLAlchemy (or any library, tool, language for that matter) to use it appropriately and productively. It’s easier to find devs with less experience than more, so keeping the design simple also makes it easier to resource the engineering department with cheaper, more general purpose devs.

      1. 2

        How Wave uses SQLAlchemy exactly is not mentioned in the article, but what is described (global session) is certainly not SQLAlchemy’s fault.

        I don’t think that’s what they’re trying to say. The article states (emphasis mine):

        In Wave’s codebase, the SQLAlchemy database session is a request-global variable

        The reason they don’t seem to like SQLAlchemy is because it obscures the queries that are being emitted. And I think you’re right in that regard, it sounds like he’s talking about the ORM part.