Not sure what you’re trying to say. Are you saying this is a good thing?
- 0 Posts
- 379 Comments
expr@programming.devto
Technology@lemmy.world•F*** You! Co-Creator of Go Language is Rightly Furious Over This Appreciation EmailEnglish
1·1 month agodeleted by creator
expr@programming.devto
Programming@programming.dev•The Compiler Is Your Best Friend, Stop Lying to It - Daniel Beskin's Blog
61·1 month agohttps://en.wikipedia.org/wiki/Algebraic_data_type
Some reading material for you. Sum types allow for proper, compiler-enforced error handling and optionality rather than the unprincipled free for all that is exceptions and nullability.
Tony Hoare, the person that originally introduced nulls to the programming world, is oft-quoted as calling nulls the “billion dollar mistake”. Here’s the talk: https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare/.
Nulls are absolutely pervasive in Java and NPEs are not avoidable. At minimum, most of the ecosystem uses nulls, so most any library will have nulls as part of its interface. Null is an inhabitant of every type in Java (even
Optional, ironically). You cannot escape it. It’s a fundamental flaw in the design of the language.Btw, you also can’t escape it in Typescript, either, due to unsoundness of the type system and the fact that many types for libraries are bolted on to the original JS implementation and may possibly be inaccurate. But still, it’s a lot less likely than Java.
Why are you talking about functional programming? Python sure as hell isn’t FP.
Eh, git is never really that fucked. If you understand how it works, it’s generally not hard to get back to a state you want (assuming everything has been committed at some point, ofc).
I would much rather people try to spend some time trying to understand and solve a problem first. I had a “senior” engineer who would message me literally every morning about whatever issue he was facing and it drove me absolutely nuts. Couldn’t do anything for himself. Unsurprisingly, he was recently laid off.
My time should be respected.
expr@programming.devto
Programmer Humor@programming.dev•When you have to checkout the master branch
19·2 months agoWtf are you talking about? It doesn’t have a fucked up name origin at all. It was named “master” as in “master recording”, like in music production. Proof: https://x.com/xpasky/status/1271477451756056577.
Master/slave concepts were never a thing in git. The whole renaming thing was really fucking stupid. Caused plenty of breakage of scripts and tools for absolutely no good reason whatsoever.
expr@programming.devto
Linux@programming.dev•Libxml2 Becomes Officially Unmaintained After Maintainer Steps Down
7·2 months agoIt’s great for non-HTML markup, like https://hyperview.org/.
A lot of the hate is undeserved. It has had awful paradigms built around it (like SOAP), but that doesn’t make XML inherently bad by any means.
expr@programming.devto
Technology@lemmy.world•Half of the US Now Requires You to Upload Your ID or Scan Your Face to Watch PornEnglish
19·2 months agoParents aren’t doing this. It’s purely a move by the elite to tighten the grip of the surveillance state, using the guise of “protecting the children” to absolve themselves of any scrutiny.
expr@programming.devto
Programmer Humor@programming.dev•Programmers are no longer needed!
242·2 months agoYup. It’s insanity that this is not immediately obvious to every software engineer. I think we have some implicit tendency to assume we can make any tool work for us, no matter how bad.
Sometimes, the tool is simply bad and not worth using.
Naturally, vim is still acceptable.
expr@programming.devto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?
3·3 months agoExcept it’s not seamless, and never has been. ORMs of all kinds routinely end up with N+1 queries littered all over the place, and developers using ORMs do not understand the queries being performed nor what the optimal indexing strategy is. And even if they did know what the performance issue is, they can’t even fix it!
Beyond that, because of the fundamental mismatch between the relational model and the data model of application programming languages, you necessarily induce a lot of unneeded complexity with the ORM trying to overcome this impedance mismatch.
A much better way is to simply write SQL queries (sanitizing inputs, ofc), and for each query you write, deserialize the result into whatever data type you want to use in the programming language. It is not difficult, and greatly reduces complexity by allowing you to write queries suited to the task at hand. But developers seemingly want to do everything in their power to avoid properly learning SQL, resulting in a huge mess as the abstractions of the ORM inevitably fall apart.
expr@programming.devto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?
41·3 months agoAccess modifiers are definitely something I despise about OOP languages, though I understand that OOP’s nature makes them necessary.
expr@programming.devto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?
123·3 months agoThe encryption thing is definitely weird/crazy and storing the SQL in XML is kinda janky, but sending SQL to a DB server is literally how all SQL implementations work (well, except for sqlite, heh).
ORMs are straight trash and shouldn’t be used. Developers should write SQL or something equivalent and learn how to properly use databases. eDSLs in a programming language are fine as long as you still have complete control over the queries and all queries are expressable. ORMs are how you get shit performance and developers who don’t have the first clue how databases work (because of leaky/bad abstractions trying to pretend like databases don’t require a fundamentally different way of thinking from application programming).
I think the point is not that it’s a MacBook, but that the senior is using a single laptop instead of a full multi-monitor setup.
Personally as a senior, I use 4 monitors. My eyes are too shit to stare at a tiny laptop screen all day, and I want slack/browser/terminal windows on their own screens. It’s much more comfortable as well.
expr@programming.devto
Technology@lemmy.world•HP and Dell disable HEVC support built into their laptops’ CPUsEnglish
143·3 months agoRemoved by mod
expr@programming.devto
Programmer Humor@programming.dev•Lucky enough, I am C++ Developer
1·3 months agoHeh yeah that’s pretty straightforward:
SELECT a.*, COALESCE(b.some_col, 'some_default_val') as b_result FROM a LEFT JOIN b ON (a.id = b.id);This will produce at least 1 row for every row in
a, and ifa.iddoesn’t match anyb.id, the value ofb_resultwill be'some_default_val'.Not sure if that’s exactly what you were describing (since it was a little ambiguous), but that’s how I interpreted it.
Ultimately it’s just a matter of investing a little time to learn it. It’s not fundamentally difficult or complex, even though you certainly can write very complex queries.
expr@programming.devto
Programmer Humor@programming.dev•Lucky enough, I am C++ Developer
5·3 months agoTo be honest, it’s remarkably simple for what it’s doing. There’s a ton of details that are abstracted away. Databases are massively complex things, yet we can write simple queries to interact with them, with semantics that are well-understood and documented. I think, like anything else, it requires a bit of effort to learn (not a lot, though). Once you do, it’s pretty easy to use. I’ve seen many non-technical people learn enough to write one-off queries for their own purposes, which I think is a testament to its simplicity.
expr@programming.devto
Programmer Humor@programming.dev•Lucky enough, I am C++ Developer
5·3 months agoIt doesn’t arbitrarily double rows or something. For each row in the relation on the left of the join, it will produce 1 or more rows depending on how many rows in the relation on the right of the join match the join condition. The output relation of the join may have duplicate rows depending on the contents of each joined relation as well as what columns you are projecting from each.
If you want to remove duplicates, that’s what
DISTINCTis for.
Don’t worry, cult membership is flexible.