/dpt/ - Daily Programming Thread

My workplace keeps hiring people who can't program as programmers. They've been paying massive amounts of money to hire expensive consultants to teach us agile methodologies and team building exercises and other stuff. They don't seem to understand that while methodologies can help, they won't fix bad programmers. It's not just bad code that's causing problems. Some of the ideas here are god awful. We had one project that was a 5 year rewrite that recently completed. It failed to meet several extremely important requirements. The lead developer in charge of the project kept dismissing the user complaints saying "You don't really need that" and their ego was so invested in backing up that statement, that the application was written in such a way that trying to add that functionality later was almost impossible without another rewrite. It was almost designed to be a middle finger to the users.

The two most toxic kinds of people you'll ever have on a project are people who cannot code at all and people who can code a little but think of themselves as the next Linus Torvalds and invest their entire ego into it. That describes 80% of the developers at work and it's killing us.

What kind of people would you like to work with?

1. Read the fucking error message. See how it's complaining about a missing semicolon? That means you should...
2. Put a fucking semicolon on line 26 after the closing brace, idiot.
3. You also misspelled default, by the way.

Competent people. I'm not under any delusions that I'm some genius who deserves a job at Google or something. I'm just tired of half my coworkers being pity hires and the other half working on baby's first CRUD web app and strutting around the office like they shit gold and name drop Martin Fowler every other sentence. Not that they even follow Fowler's advice since most of our code has no tests and some of the few projects that do are so bad at it, that I've seen people create mocks and then test the god damn mock object itself. They've effectively written a bunch of "tests" but still manage to have zero percent code coverage.

sorry i have dyslexia, but thanks

I feel you user. Truthfully it's very unlikely that any of this will ever change. If you want to work with more competent people, you're gonna have to go elsewhere.

I've had many programming jobs and the one thing that always made my coworkers smarter was switching to a better job.

So i want to port Minecraft algorithm for checking if Slime's can spawn in given chunk, from Java to C/C++. My problem is, its using Java Random() method, which works differently than the stdlib rand(). What can i do to make pseudorandom generator from Java in C/C++?

Attached: 2019-03-15-124805_1358x311_scrot.png (1358x311, 46K)

Ok guys, sorry to bother but something that started as trying to change a simple config setting in some cfg file or something ended up trying to quickly learn (or at least understand) java bytecode and i am truly lost.

so whats happening is i found the jar file that has the code of what i want to change, and i have found the most simple change i need to make for my goals: have this (numFalse) be zero, or as low as possible.
Problem is, i cant get a modified, or even the "original" jar file to work: i unpacked it, and even if i repack it unmodified as .zip then rename it .jar (as i have red) it wont work and is about 100kB larger than the original

So my second attempt was to directly change either the numFalse (after the random has been assigned), or change the random generations limit to be lower, directly in the jar file so i wouldn't have to un-/repack it; but pic related is about as far as i got, and have no idea where to actually find it, let alone if i could even change it.

Any advice on how to proceed? either if i should loop back to my first attempts to make the jar file, if so: how? Or i can actually edit something in pic related, if so, what and how can i find it?

Attached: wot.png (3296x836, 158K)

pcg-random.org/

could this be it?
the index, constant and the bytcode matches (i think) but the linenumbers and start_pc (whatever that is) and stuff have zero relations as far as i can tell

Attached: maybe.png (599x114, 4K)