PhilipTheBucket
- 0 Posts
- 24 Comments
PhilipTheBucket@piefed.socialto No Stupid Questions@lemmy.world•If I stood on a precision scale and farted, would I get lighter or heavier?English854·1 day agoFart gas is warmer than the surrounding atmosphere, therefore less dense. Your digestive system is under very slight compression (10-20 mmHg gauge pressure according to the internet), which I would guess does not equate to enough pressure to be more significant than the temperature gradient. Fart gas is also less dense than air at a given pressure by a pretty significant margin (1.06 g/L compared with 1.20 g/L).
When you fart, you’re releasing gas that is less dense than the atmosphere, which means you get slightly heavier. Think of yourself as a hot air balloon with a very tiny chamber, and when you release a 90 milliliter fart, you lose a little buoyancy and sink a little. You get heavier when you fart.
I haven’t done the math, but I looked around on the internet at some numbers, and that’s what I think. I also ignored this because it is clearly AI slop, which is a little upsetting.
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English1·3 days agoDude you were the one that asked the fucking question lol
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English1·3 days agoYou define it in exactly the same way you just did. Completely fine, you have to do it for lots of things. It’s nice that Python can do that too.
Now, I’ll grab a random snippet of code from some random file from my source dir:
existing_bookmarks = db.session.execute( text('SELECT post_reply_id FROM "post_reply_bookmark" WHERE user_id = :user_id'), {"user_id": user_id}).scalars() reply = PostReply.query.filter(PostReply.id.in_(existing_bookmarks), PostReply.deleted == False).first() if reply: data = {"comment_id": reply.id, "save": True} with pytest.raises(Exception) as ex: put_reply_save(auth, data) assert str(ex.value) == 'This comment has already been bookmarked.'
You can see some classes in use, which again is fine. But you also see inline instantiation of some reply JSON, a database returning a list of post_reply_id values without needing a special interface definition for returning multiple values, lots and lots of cognitive and computational load per line of code that’s being saved because the language features are saving people the heavy lifting of depending on user-defined classes for everything. It means you don’t have as many adventures through the code where you’re trying to modify a user-defined interface class, you don’t need as much strong typing, that kind of thing.
I would bet heavily that a lot of the things that are happening in that short little space of code, would need specific classes to get them done if the same project were getting implemented in some C+±derived language. Maybe not, I just grabbed a random segment of code instead of trying especially hard to find my perfect example to prove my point.
It is fine, there are significant weaknesses to Python too, I’m not trying to say “yay python it’s better for everything,” anything like that. I’m just saying that if you don’t get familiar with at least some language that does things more that way, and instead get solely accustomed to just user-defined classes or templates for every information exchange or functional definition, then you’ll be missing out on a good paradigm for thinking about programming. That’s all.
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English1·3 days agoComplex data structures are not “more of a C++ type of program structure”.
Oh, they are not at all. Equating complex data structures with user-defined data structures (in the form of classes and fields and whatnot), and using the latter as the primary method of storing and working with data (so that you’re constantly having to bring into your mental scope a bunch of different classes and how they need to interact), is 100% a C++ type of program structure. It’s pretty unusual in my experience in Python. Or, I mean, it’s perfectly common, but it’s not primary in the same universal way that it is in C++ and derivatives. It gets to exist as its own useful thing without being the only way. That’s what I am trying to say.
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English0·3 days agoIDK, I just have never really had this become a serious issue for me. I get what you mean, some actions are a little bit of a pain in the neck because people are often sloppy about typing, but literally the only time I can remember it being an issue at all has been when numpy is involved and so I have to figure out if something is a native Python thing or a numpy-fied custom structure.
I mean there’s just not that many types. Generally something is a list, a number, a map, or a string, and it’s pretty obvious which. Maybe there are OOP domain things where a lot of variables are objects of some kind of class (sort of more of a C++ type of program structure), and so it starts to become really critical to have strong type tools, I’m just saying I haven’t really encountered too much trouble with it. I’m not saying it’s imaginary, you may be right in your experience, I’m just saying I’ve worked on projects way bigger than a few hundred lines and never really had too much of an issue with it in practice in my experience.
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English61·3 days agoPlus I felt python was too new and would skip a lot of core programming skills id just like to know. Im not super interested in doing it the new way with all the helpers, or I wont feel like I learned anything.
Okay, you definitely want to learn C then. C# and C++ both add a ton of helpers. C# has a massive runtime environment that’s opaque and a little bit weird, and C++ has a massive compile-time environment that’s opaque and very weird. It’s sort of pick your poison. If you learn C and get skilled with it, you’ll be well set up for understanding what is actually going on and having strong fundamentals that will set you up well for whatever higher-level language you want to learn in the future.
Put another way: C# will hide just as many of the fundamentals and hardcore details from you as python will, it’ll just do it in a weird and counterintuitive fashion that will make it more confusing and with more weird C#-specific details.
I’d eventually like to learn unity as well so i decided on c#
I would actually just cut out the middleman and start with the Unity editor then. It actually might be a really good introduction to the nature of programming in general without throwing a bunch of extra nonsense at you, and in a really motivating format.
I do have the .net sdk and it seems to try to compile a simple program, it just throws errors even on an example program that shouldn’t have any. Im sure its something dumb.
What’s the program and what’s the error? I’m happy to help if something jumps out at me. I’m voicing my opinion otherwise on what might be better ways to attack this all in general, but I’m sure me or people here can help sort out the issues if you really want to take this approach and you’re just getting stuck on something simple.
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English210·3 days agoC# represents about 12% of the jobs out there.
https://www.devjobsscanner.com/blog/top-8-most-demanded-programming-languages/
It’s not unpopular, but it’s definitely not “massively” popular anymore. Different languages have different strengths and weaknesses, but C# has a few more weaknesses than most. In my opinion. Yes, there’s nothing wrong with learning any particular language you want to learn (and I’m a little surprised to see C++ has fallen significantly lower than C#, sure, fair enough). I’m just struggling to see an upside for learning it in the modern day (and now knowing more about what this person’s goal is I feel even more strongly that C# is the wrong answer for them. In my opinion.)
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English3·3 days agoYou can do strict typing in python if you want it, it’s very highly recommended if you’re doing a big project.
PhilipTheBucket@piefed.socialto Programming@programming.dev•Best C# IDE/Compiler for Linux?English316·3 days agoI really would not recommend specializing in C# at this point in computing history. You can do what you want obviously, but Python is much more likely to be what you want. C++ or Java might be okay if you want a job and are okay with a little bit dated / not ideal languages, or you could learn one of the proliferation of niche backend Linuxy languages, but C# has most of the drawbacks of C++ and Java without having even their relative level of popularity.
IDK what issue you’re having with VSCode, but I think installing the .NET SDK and then using
dotnet
by hand from the command line, to test the install, might be a good precursor to getting it working in VSCode. But IDK why you would endeavor to do this in the first place.
PhilipTheBucket@piefed.socialto Ask Lemmy@lemmy.world•What bottles/containers should I use for shipping from sea level to places at higher altitudes?English5·3 days agoWhy not just replace it with a cap that isn’t a flip-top? Screw it on tight, squeeze the bottle slightly before putting the cap on so there’s a slight negative pressure. That would be my first thing to try.
PhilipTheBucket@piefed.socialto Ask Lemmy@lemmy.world•What bottles/containers should I use for shipping from sea level to places at higher altitudes?English7·4 days agoSo the bottle doesn’t break, it just pops open? This still sounds like a packaging issue. Maybe unstopper / squeeze / stopper the bottle, so it’s got negative pressure. Maybe replace the cap with some other more permanent type of cap (one that doesn’t have a little flip-top, if the ones they’re including do, just a solid cap and then ship the flip-top one alongside it)? IDK. How is it coming apart in transit? It’s not literally the plastic bottle breaking, is it?
PhilipTheBucket@piefed.socialto Ask Lemmy@lemmy.world•What bottles/containers should I use for shipping from sea level to places at higher altitudes?English9·4 days agoThis has got to be the packing, not the bottle. I have never heard of a bottle being shipped that suddenly broke on its own, without impact with its environment being the issue.
PhilipTheBucket@piefed.socialto Programmer Humor@programming.dev•Please spare me from having to get in touch with that shit I wrote back thenEnglish7·6 days agoI thought I had it worked out, how to sort of strike a balance so I can keep my focus intact and let it be helpful without wasting time constantly correcting its stuff or shying away from actually paying attention to the code. But I think my strategy of “let the LLM generate a bunch of vomit to get things started and then take on the correct and augmentation from a human standpoint” has let the overall designs at a high level get a lot sloppier than they used to be.
Yeah, you might be right, it might be time to just set the stuff aside except for very specialized uses.
PhilipTheBucket@piefed.socialto Programmer Humor@programming.dev•Please spare me from having to get in touch with that shit I wrote back thenEnglish4·6 days agoCertainly possible
I’m also genuinely a little bit alarmed looking back now at my pre-LLM code and seeing the quality vs. the with-LLM code.
PhilipTheBucket@piefed.socialto Programmer Humor@programming.dev•Please spare me from having to get in touch with that shit I wrote back thenEnglish11·6 days agoIDK, I just popped open a project from 10 years ago and it’s perfectly clean, it’s actually better than some of my modern code because it’s not LLM-ified to save time.
I think it has a lot more to do with whether it was made in that “kind of crappy IDK what I’m doing” phase of programming. Some of your old stuff is going to be in that category sure. As long as you’re out of that, however long it took you to get there or however far away it was in time, your code should be good.
PhilipTheBucket@piefed.socialto Programmer Humor@programming.dev•Please spare me from having to get in touch with that shit I wrote back thenEnglish6·6 days agoYeah, that sounds about right lol. All my python projects for years were basically writing C in python. It actually took me all the way up until I got to look at the code ChatGPT likes to generate that I learned idiomatic python. My first database project was based on the Unix philosophy, where everything was strings (no ID keys, no normalization), because Unix is good.
The client wasn’t happy when they looked at the DB code lmao. Whatever, it worked, they still paid us and I didn’t do it again.
PhilipTheBucket@piefed.socialto Ask Lemmy@lemmy.world•How accurate are your predictions of the future?English8·6 days agoI won’t say 100%, but they’re generally pretty good. Big ones I can think of:
- They’re going to apply every attack against Kamala Harris that they did against Biden
- Trump is going to be infinitely worse for the Palestinians even than Biden was
The first is a little bit qualified I guess. I was somewhat against replacing Biden for that reason (definitely before the debate), which was absolutely a mistake. But I think in retrospect, the way that they were able to blame Kamala Harris for Gaza and inflation and make it work was pretty spot-on to what I predicted.
The second one, people were furiously telling me how wrong I was, how impossible it would be for anyone to be worse than Biden, and in early days saying that Trump had achieved a cease-fire and it was just proof of how easy it would have been if only Biden had put some slight effort to it.
PhilipTheBucket@piefed.socialto Programmer Humor@programming.dev•Please spare me from having to get in touch with that shit I wrote back thenEnglish35·6 days agoAm I the only one who likes looking at my old code? Generally I feel like it’s alright.
Usually the first project when I’m learning how to use some new language or environment is super-shitty. I can tell it’s very bad, usually I don’t like interacting with it if I have to make changes, but it’s still not overly painful. It’s just bad code. And that one exception aside I generally like looking at my code.
No, I was assuming your volume decreases. I don’t actually know that to be the case, but my assumption is that there isn’t “extra” space inside a person, and so if you lose material from a part of your body that isn’t encased in anything rigid your volume decreases slightly.
So maybe I did have my terminology wrong. When a hot air balloon deflates, it falls. The density went up, but that’s not what’s directly relevant. The weight went down, I guess, but the “number on the scale”, weight minus buoyant force, went way way up, because it lost some lower-density volume that was making the whole thing float. The weight (in a strict physics sense) went down, sure. But the number on the scale (which I was incorrectly calling “weight”) went up. Same thing for a farting person.