• 0 Posts
  • 730 Comments
Joined 1 year ago
cake
Cake day: June 17th, 2023

help-circle

  • Anyway, yeah why would I watch someone else play a game when I can just play it myself?

    I think some of it is watching people do things you cannot do. Competitive play, in both sports and gaming, is quite a different thing to watch people with skill vs what you could do yourself. Plus I suspect there is a lot of the psychology that goes with routing for a team and the feeling of being part of something bigger or something.

    Personally I don’t really get it myself but I can see why people would. IMO it is not much different from why so many people like watching sporting events rather than going out and playing themselves.

    For games I haven’t played yet, I would spoiler it for myself. Games I’ve already played… well, don’t need to watch that anymore, right?

    That is true for single player games, but not for match making/competitive ones. I suspect that people are more so watching competitive ones than single player story driven games.






  • “We still think the best experience comes from logging in,” they add

    Don’t forget the best data as well!

    However, Warp says it plans to ‘tweak’ —restrict, in other words— which features are available to users who don’t log in over the coming months.

    This whole thing is just screaming to me that they are in the first stages of enshitfication - make a nice product that people want to use but with enough control that they can later squeeze you for all you are worth.

    NO I do NOT want to login to my termial, have things locked behind a paywall, have things I come to rely on be taken away with a future update and all my data be sold off to anyone that wants it.




  • You could also print 2 layer circles/rectangles to cap the hole. Then melt/glue/weld the edges. Could use a soldering iron, hot knife, any glue or the 3dpen to do that and I would think it would give you a more consistent surface than the pen alone (and may not requite it at all). Worth trying at least.

    Might even be worth creating a stepped hole to give better gluing surface like:


  • I designed a part that has compartments for small neodymium magnets.

    If the magnets are orientated with the layers you can always pause the print at the top of where the magnet needs to be embedded, just before the final bridging layer and insert the magnets mid print. Then resume the print and it should seal them in with a clean layer above it. Should be much cleaner then using a 3d pen to cover it up after the fact.

    As for sticking parts together I can see it being useful for smaller or thinner parts, but for larger areas there are glues out there like gloop that can essentially melt and weld parts together more effectively with larger open times then you have with rapidly cooling pla.

    I can see it being useful for spot repairs or filling holes or tacking parts together while you wait for glues to set.



  • The premise of this article if false. C is not the Go-To language for programmers. Pick any random programmer in the world and C will likely not be their main language and chances are they will never have even touched it before. There are a lot of languages in a lot of domains and a lot of programmers working in a lot of different places. Just look at the vast amount of web developers out there most of which have never even looked at C code before. Sure C underpins a lot of technology these days, but that does not make it the go to language for most people in anyway.

    In today’s world, where languages like Perl, PHP, Java, and others dominate, you may wonder why ‘C‘ is still widely used.

    I am sorry, what year was this written? Listing those languages in 2024? How out of touch is this author. Also that statement alone undermines the point of C being the go to language if others are more dominate languages.

    Why Do Most Programming Courses Start with ‘C’?

    … Because they don’t? There are a vast number more courses out there all the different languages out there. Python, java etc tend to be very popular with people new to programming as well and are very often the first languages taught even in Universities. C is often a single module given out eventually, but is rarely the first thing taught unless you are going for something like an embedded engineering degree.

    ‘C’ in the Real World

    Did you know that 90% of the world’s supercomputers run Linux? Linux, which forms the backbone of many servers, smartphones, and even space exploration systems, is primarily written in C. The Linux 3.2 kernel alone had over 15 million lines of code, showcasing the power and relevance of C in modern software.

    Ok? Umm I think I am lost now. I don’t get where this trail of thought is going. Why do we care about supercomputers at all? Why is Linux relevant here? Most developers are not Linux kernel developers by any stretch of the imagination and most C developers are not Linux kernel developers either. And super computers are not really relevant to anyone but some very niche people. And 3.2? I think the author is showing their age again.

    Remember, learning ‘C‘ is a stepping stone to understanding many other programming languages, and its influence on the software we use every day is undeniable.

    Learning any language is a stepping stone to understanding many other programming languages. C is not that much more special than python or java or anything else here really.



  • But is Rust merely a new face on Ada?

    They share some features. But what language does not share any features with any other language? Any new language these days will be heavily inspired by and take features from other languages while making changes to or pulling in features from other places to create a mix that is unique to that new language. Rust is far more than just its GCless memory safety features and I am not even sure if they are inspired by ada or were just arrived at a similar solution to ada - they are not exactly a one to one matching with how ada does anything. If anything I believe that rust is much more heavily inspired by ocaml than ada.





  • But it applies to features, not coding practices

    I disagree. It applies to everything. I would argue it applies to SOLID most of all. I do not find SOLID principals to be good ones to follow most of the time. Situational they can be useful but I have seen so many projects that strictly follow SOLID that becomes an unmaintainable mess.

    If you struggle to understand the SOLID principles or think they are too general, then I would suggest you follow my SOLID Training Wheels until you understand them better.

    I hate this excuse. If the answer to the problem is you are just not doing it right then it is a terrible answer. But lets look at some of this advice:

    Summary: 1 piece of code has 1 responsibility. The inverse: 1 responsibility of code has 1 piece of code

    Training Wheels:
    Follow the 10/100 Principle
    Do not write methods over 10 lines
    Do not write classes over 100 lines

    No. Just no. Making everything as small as possible is exactly what is wrong with the single responsibility principal. I agree that everything should have one responsibility, but that responsibility might be complex and require a lot of code. Hiding the code behind other functions does not make it easier to read, only means you need to jump around a lot in order to understand what it is doing which IMO makes things harder to read. Every time I jump location it gets harder to remember where you came from or what the wider context is. Keeping related code together is more important then creating small function.

    Just take a look at the stdlib of almost any mainstream language. Like the ArrayList in Java, or Vec in rust. These classes are thousands of lines long with many methods being 10-20 lines of code with some even longer then that. Is this code bad or hard to read? Not for what it is doing. And code like this is not atypical in stdlibs, you can jump to almost any class/struct in a language of your choice and see similarly structured code. And in all cases the classes represent one thing and its methods do one thing on that object regardless of how many lines of code they contain.

    If you have to change a class that already breaks the 10/100 Principle:
    take your code out of that class and put it in a new class first so the original class is smaller
    Check-in this refactor without your new code
    make your changes in the new class
    Check-in your new code

    IMO this breaks the single responsibility rule. If new code is mostly related to a single class then it should be added to that class as that is what the class is responsible for. Adding a new class for every bit of logic just splits up the responsibility and makes it far harder to find what is responsible for something.

    I could go on about the rest of that training guide - which this whole post seems to be an advert for.

    YAGNI, will ruin your code base if you apply it to how you code.

    It applies just as much to how you code as to what you are coding. If you added every programming paradigm and principal to your code base it would be a unreadable mess. Not to mention impossible to do as loads of these conflict with each other.

    Pick the right tools for the right job. Don’t blindly apply anything to every situation. There are times when the SOLID principals can help but there are also times where they make code worst. Instead always ask yourself if there is a simpler way you could be doing something and if when applying a principal if it actually made the code easier to read (ask someone else as well as it can be hard to tell yourself). Don’t be afraid to break a principal if it is not helping.


  • It’s a zero cost bool!

    It really is not. Dynamic dispatch has a cost on every access due to it being a pointer. Instead if doing a bool check you are needing to read a pointer to figure out which function to call. I doubt this is any faster than just having the bool check and I doubt that the bool check is slowing anything down by a noticeable amount. All of this is probably not worth the complexity, especially without benchmark results as I can see this actually slowing down the code overall.

    There is also a increased binary size due to there needing to be two versions of the code block - if you have that in every function that would be a dramatic increase in the binary size. This means more data needs to be loaded into memory at startup and I don’t know if the branch prediction in your CPU worth with vtables?

    Maybe if you already need dynamic dispatch for something it might be worth it. But most of the time I would avoid it if possible which means this pattern has a very limited usecase that you cannot use over the whole program? What is wrong with the standard logging crates in rust? I would expect them to be good enough even for game dev.