Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)L
Posts
439
Comments
601
Joined
3 yr. ago

  • I'm not sure the author of this blog post is experienced with git rebase. I'm by no means an experienced git user, and to me the single most useful thing about git rebase is reordering commits in a local branch. This means I can commit some code in a local branch, continue working on stuff, and later move commits around to peel off PRs out of a feature branch. However, the author makes zero mentions to this feature in the blog post.

    To illustrate how useful git rebase is, picture yourself working on a feature branch as part of your work on an issue. Suddenly you stumble upon something that you need to fix to unblock your work on that feature, but it's not directly related to your issue. You can stash your changes, create a new feature branch, fix the bug, post a PR, expect it to be merged, and afterwards rebase your feature branch onto mainline.

    That's ok, but very time consuming.

    You can instead use git rebase. Just go straight ahead and commit your code straight away in your feature branch and continue working. After you're done working on your feature, you run git rebase to reorder your commits so that the ad-hoc fix is the first commit in your feature branch, and you post a PR for that fix alone, and once it's merged you already have all your other changes lined up to be pushed as well.

    Another usecase I follow often is posting an ad-hoc commit to simplify working on a issue. This means adding logging, forcing a flag, commenting out code, etc. I commit this message with commit messages that make it clear that this code is not to be pushed, and follow a convention that commit hooks can pickup as guardrail. From that point onward I just work on the feature until I'm done, and when I'm ready to post a PR I simply crack open git rebase, reorder the commits to move the ad-hoc commit to feature as the very last one, drop it, and done.

  • Github for organizations becomes rather expensive rather quickly (...)

    I'm not sure if that's relevant. GitHub's free plan also supports GitHub organizations, and GitHub's Team plan costs only around $4/(developer*month). You can do the math to check how many developers you'd have to register in a GitHub Team plan to match the operational expense of hiring a person to manage a self-hosted instance from 9-to-5.

  • A less confusing title would be “Mozilla drops support for Mercurial (...)

    It's not even about GitHub at all. Taken straight out of the announcement:

    “For a long time Firefox Desktop development has supported both Mercurial and Git users. This dual SCM requirement places a significant burden on teams which are already stretched thin in parts. We have made the decision to move Firefox development to Git.”

  • Well generally speaking, read up on solid principles. Learn how to organize your code, write code that balances efficiency and manageability.

    To me, that reads as "learn software design patterns", specially the balancing part.

  • What really helped me get better as a software engineer was going out of my way to progressively learn as many software design patterns as I could and iterate over pet projects to refactor them to apply them in practice. It helped me write cleaner code that's far easier to maintain and extend, it helped me be far more efficient at onboarding onto projects, it helped me greatly improve my skills as a software architect.

  • These chatbots just make shit up.

    As someone who interacts with "these chatbots", the "shit" that they "make up" is very useful to onboard onto topics and find paths forward. They are the closest there is to expert systems, and currently there is no alternative that comes close to the value they provide.

    You can’t learn anything from them.

    Those who can't learn in general also won't learn in specifics.

  • So, from a decentralised solution to the world’s biggest repository

    You need to check your notes. Git is decentralized, even if you host a repository somewhere.

    Decisions like these (...)

    As a Firefox user, these initiatives matter nothing in my decision to use Firefox. In fact, I'm glad they went this way. They need to focus on working on code instead of wasting their time with irrelevant details.

  • but I don’t understand why they don’t self-host

    Why would anyone self-host a FLOSS project? Trade secrets is not a concern, nor is it barring access to the source code repository. Why would anyone waste their resources managing a service that adds no value beyond a third-party service like GitHub?

  • Use unsafe and write like you’re a C/C++ programmer. You can do it.

    Onboard the C/C++ project to any C++ static code analysis tool and check back with me later.

    This is a nothingburger.

  • Probably a little of both, but I really don’t think there are very many practical applications for current AI technology.

    I don't think that's true at all.

    A couple of days ago I read a post about someone using ChatGPT to generate commit messages from the diff. That's pretty cool.

    Chatbots are also surprisingly helpful. Today's technology is already good enough to put together working expert systems. I'd love to have something like a chatbot that was fed something like all the papers from one or more academic journals related to a specialized field, and be able to ask it open-ended questions.

    I think that nowadays the limit for actually useful AI is the imagination of those who work on today's cutting edge AI. It would be cool to hear more about those.

  • From the article:

    (...) but recently, another type of criticism seems to be on the rise.

    The code that I suggest is too verbose. It involves too much typing.

    This reads like a one-sentence strawman. Describing code as "too verbose" is really not about the risk of carpal tunnel syndrome. It's about readability and cognitive load.

    The blogger seems to almost get the point when he writes the following:

    In short, the purpose of source code is to communicate the workings of a piece of software to the next programmer who comes along. This could easily include your future self.

    The purpose of source code is to communicate (...) to the next programmer who comes along.

    If you make the mistake of going the "enterprise quality java code" meme approach, you're making the next programmer's life needlessly harder.

    The blogger then tries to make his case with verbose code, and makes the following statement:

    Which alternative is better? The short version is eight lines of code, including the curly brackets. The longer version is 78 lines of code. That's ten times as much.

    I prefer the longer version. While it takes longer to type, it comes with several benefits. (...)

    This is yet another strawman. The longer version is awful code, not because it's longer but because it's needlessly jam-packed of boilerplate code. Ignorign basic things like interfaces and contracts, It's been proven already that bugs in code are directly proportional to the number of lines of code, and thus the code the author prefers is likely to pack ten times more bugs.

    The shorter code in this case would not be the 78-loc mess that the author picked as the thing he prefers. The shorter code in this case would be something like onboarding the project onto Project Lombok to handle all-args constructors, property methods, and even throw a builder in for free. This requires onboarding Lombok to the project, and add two annotations to the short example. Two lines of code, done.

    After the blogger fails to make his case, he doubles down on the typing non-sequitur:

    Perhaps you're now convinced that typing speed may not be the bottleneck (...)

    This is a blog post that fails to justify a click. It's in the territory of "not even wrong".

  • Kotlin is IMO easier and less error prone

    I'm no Kotlin expert, but I think Kotlin has a far more extensive core language and requires a heavier cognitive load to get up and running than Java.

    It might have better developer experience and be less error-prone, but that comes at a price of admission that newbies have to pay.

  • There’s Tauri.

    ...and now your newbie has to onboard onto not only Rust (?!) but also HTML, CSS, and JavaScript to render "Hello World".

  • Surely you got a bonus and a raise out of it right? Right??

    The only reward I got from it was recognition from my team members, which was already more than what I was expecting to get.

    My manager was praised for the higher team velocity and improvements in the team's burndown chart. The hallmark of having done good work is seeing others trying to take credit for it.

  • The optimization I'm the most proud about was when I worked on a legacy project whose end-to-end builds took around 1 hour. After spending some time working on its architecture, project layout and build system, I managed to get the full end-to-end builds to take 10 minutes, and incremental builds to be almost instant.

    What makes me the most proud about this project is that the technical debt plaguing the legacy project was directly and indirectly the reason why half a dozen of my team members burned out and quit the company. After that point my remaining team members started to be far less stressed and team velocity skyrocketed, just for the fact that the thought of iterating over a bugfix and posting a pull request didn't cost at least one hour, and sometimes two or three.

  • The Rust community is a very diverse group of people with many different opinions. It is not a universal truth that the Rust community believes Rust to be an awful first language.

    You don't need to take my word for it. Google the topic and go through all the discussions. Even the ones in Rust's own forum get mixed responses, and that community is by its very nature very partial towards Rust.

    Also, framing the discussion around newbies learning Rust as a first language is a strawman. The question is not whether if someone without any prior experience in programming can or cannot make and effort and write code in Rust. The question is which language to learn.

    There are many programming languages to pick and choose from, and some are renowned to be very beginner friendly. Rust is not one of them.

    If you want to make a case for Rust, it's up to you to prove that Rust is a better language to take first steps than any other programming language around. In my personal opinion, it is simply not possible to claim that Rust is better for this particular usecase than quite a sizable set of programming languages, including but not limited to Python. If you want to claim Rust is better suited then you need to make a case for it, and that is a challenging thing to pull off.

  • You missed the point

    What point do you think I missed?

  • You’re not making the strong case that you think you are. Quite the opposite. The ease of “shooting yourself in the foot” is precisely what makes it so difficult to learn. Segmentation faults and random memory corruption make it incredibly hard to get started with programming.

    That's not the case, though. Some C and C++ compilers are already resilient and flexible enough to not get C and C++ to blow up in your face when you're doing unmentionable things to memory access. Some memory safety issues are only noticeable when running profilers and memory safety tools.

    Keep in mind you are talking about someone taking their first steps in writing software. They are struggling to get stuff to work, and throwing curve balls at them is not going to help them get on their feet.

    Also, I did not advocated for C or C++ as better options. My point is that Rust is an awful suggestion as a first language, which even the Rust community states. It also speaks volumes to Rust's unsuitability as a beginner programming language if the best attempt to refute that fact is to try to come up with worst alternatives that in the end aren't even worse at all.

    Rust’s constraints are very clear and concise in comparison (...)

    Irrelevant. The point is that Rust enforces constraints that other programming languages don't. If anyone is taking their first steps, not having to deal with them leads to a far more productive and enjoyable experience. It's absurd to talk about memory-safety and performance when the target audience doesn't even understand what memory is.

  • This is very over-exaggerated. A lot of people started with C or C++ as their first language.

    That took place over two decades ago. There were no better alternatives back then. Times have changed.

    Both of which are significantly harder than learning Rust.

    This is simply not true. It's far simpler and less frustrating to work on either C or C++ for the simple reason that you can shoot yourself in the foot anywhere you'd like. In Rust, newbies have to alternative to endure the compiler enforcing its safety constraints anywhere they'd like. Rust is also a far more complex and extensive language that enforces memory safety rules that can and very often are very frustrating to handle by those who don't have a firm grasp on them.

  • Cloud @programming.dev

    Cloud Next 2023 session catalog is live

    cloud.google.com /blog/topics/google-cloud-next/cloud-next-2023-session-catalog-is-live
  • C++ @programming.dev

    Return value optimization (RVO)

    sigcpp.github.io /2020/06/08/return-value-optimization
  • C++ @programming.dev

    Measuring the memory usage of your C++ program

    lemire.me /blog/2022/11/10/measuring-the-memory-usage-of-your-c-program/
  • C++ @programming.dev

    Undefined behavior can result in time travel (among other things, but time travel is the funkiest)

    devblogs.microsoft.com /oldnewthing/20140627-00/
  • C++ @programming.dev

    Return value optimization (RVO)

    sigcpp.github.io /2020/06/08/return-value-optimization
  • C++ @programming.dev

    The move constructor that you have to declare, even though you don't want anyone to actually call it - The Old New Thing

    devblogs.microsoft.com /oldnewthing/20230612-00/
  • Web Development @programming.dev

    Lessons From Linguistics: i18n Best Practices for Front-End Developers

    shopify.engineering /internationalization-i18n-best-practices-front-end-developers
  • Programmer Humor @programming.dev

    Why are you doing me like that, LinkedIn?

  • C++ @programming.dev

    Speed Up C++ Compilation

    devtalk.blender.org /t/speed-up-c-compilation/30508
  • Git @programming.dev

    diff specific to document formats?

  • C++ @programming.dev

    How Qt Signals and Slots Work

    woboq.com /blog/how-qt-signals-slots-work.html
  • Programming @programming.dev

    Command Line Interface Guidelines

    clig.dev
  • Programming @programming.dev

    RFC 9457: Problem Details for HTTP APIs

    www.rfc-editor.org /rfc/rfc9457
  • C++ @programming.dev

    GotW #100: Compilation Firewalls (Difficulty: 6/10)

    herbsutter.com /gotw/_100/
  • C++ @programming.dev

    The Performance Benefits of Final Classes - C++ Team Blog

    devblogs.microsoft.com /cppblog/the-performance-benefits-of-final-classes/
  • C++ @programming.dev

    When can the C++ compiler devirtualize a call? (2021)

    quuxplusone.github.io /blog/2021/02/15/devirtualization/
  • C++ @programming.dev

    Finite State Machine with std::variant

    www.cppstories.com /2023/finite-state-machines-variant-cpp/
  • Kubernetes @programming.dev

    MicroK8s: The lightweight Kubernetes

    microk8s.io