- 0 Posts
- 106 Comments
kryptonianCodeMonkey@lemmy.worldto
Programming@programming.dev•Are there any examples of 'perfect' software?
4·18 days agoDepends on your definition of “perfect” and “improved”. Is it perfect because it does one fundamental thing really well? Is it improved by adding new features?
I think what you’re meaning is, is there a program that is ubiquitous (or at least works anywhere), will basically remain used forever because it does a fundamental job that will always need to be done, and it does that job in the most straightforward way possible that can’t be made any algorithmically simpler, faster, etc. Probably plenty, honestly. Bitwise operations, arithmetic, fetch/store, etc. Though ubiquity/working anywhere gets rarer the higher you go from hardware. Even your suggestion of cd, for example, has to interface with an OS’s file system, of which there are several common types. What it’s doing is simple in concept, but will always be dependent on other programs for the file system.
kryptonianCodeMonkey@lemmy.worldto
Not The Onion@lemmy.world•House Republicans call to investigate Bad Bunny Super Bowl halftime show over 'widespread twerking, grinding, pelvic thrusts'English
21·20 days agoThey need to investigate if there is any laws from 1842 that they can use to selectively punish brown people that angered them for the audacity of existing in front of their eyes during their precious football game and being flipping the bird to Trump and his ilk in doing so. They need to investigate if there is an incredibly narrow line they can draw after the fact to punish “vulgarity” that does not allow their opponents to easily throw that back in their faces for their absolute blatant hypocrisy. I imagine that will take considerable investigation for this particular brand of stupid bullshit to complain about.
kryptonianCodeMonkey@lemmy.worldto
Not The Onion@lemmy.world•An AI startup founder says he's planning a 'March for Billionaires' in protest of California's wealth taxEnglish
16·26 days agoIs this guy dumb or secretly anti-billionaire? Gathering a bunch of billionaires in a small area, walking slowly in public streets, specifically to rally in favor of billionaire in this political climate. I would be more surprised if a shooter DIDNT take the opportunity.
kryptonianCodeMonkey@lemmy.worldto
Map Enthusiasts@sopuli.xyz•This is the true size of Africa
4·28 days agoThat’s why I always carry around my pocket globe and compass to scale and compare distances accurately.
kryptonianCodeMonkey@lemmy.worldto
Technology@piefed.social•You are being misled about renewable energy technology.
10·1 month agoI’m all fairness, he’s drawing direct apples to apples comparisons between electrical generation to gasoline production, fuel energy per acreage for corn ethanol vs solar vs wind, cost benefits for investment now and the long term sustainability of stable materials vs consumables. His audience is probably not the people that generally need to be told that electric over fossil fuels is just better, but it’s still cool to be able to fully understand the context by giving direct conversions, and useful for having that discussion with others. Honestly, my wife and I started looking at trade in values to possibly switch one of our vehicles to an EV soon, basically entirely because of the points he made about the financial viability now. So, he inspired me, for what that’s worth.
kryptonianCodeMonkey@lemmy.worldto
Technology@piefed.social•You are being misled about renewable energy technology.
14·1 month agoI mean… he has like 4 videos about led Christmas lights, but… this is definitely in the top 5.
kryptonianCodeMonkey@lemmy.worldto
FoodPorn@lemmy.world•Homemade chicken and noodles with mashed potatosEnglish
1·1 month agodeleted by creator
I mean… that is just good design. The main function should be the initializer and orchestrator of the logic. You should be able to look at the main function and tell, at a high level, what the program is doing. It should be usually pretty basic and procedural. Other functions handle the details and complexity.
kryptonianCodeMonkey@lemmy.worldto
Programmer Humor@programming.dev•Op doesn't have time for interviews
12·2 months agoIt’s a silly riddle that, for some reason, has stuck around in my head for decades, I think from an old tv show (anyone else remember Crashbox?). I remembered the answer immediately. So, this would be less of a test of my reasoning/problem solving skills, and more of a test of my ability to find and store vast amounts of useless trivia and instantly recall it decades after the fact. If that’s what you’re hiring for, I’m your guy!
Propogation of Errors by Bleak Knowledge About Coding
kryptonianCodeMonkey@lemmy.worldto
Not The Onion@lemmy.world•Thieves dressed as Santa and his elves bust into grocery store and steal $3,000 worth of foodEnglish
4·2 months agoTake it up with the Employers under paying, the Landlords over charging, and the Goverment Officials that prioritize anyone but the poor. They got my money. Ask them for yours.
kryptonianCodeMonkey@lemmy.worldto
Not The Onion@lemmy.world•Thieves dressed as Santa and his elves bust into grocery store and steal $3,000 worth of foodEnglish
2·2 months agoDamn, Santa has so many Elf mouths to feed. And don’t act like we don’t owe him one. Didn’t see a damn thing.
kryptonianCodeMonkey@lemmy.worldto
Programming@programming.dev•what's the coolest thing you have ever programmed?
4·3 months agoMines nothing amazing, really, but i find it handy.
I 🏴☠️ movies. The downloads often come with excess files, images, text, sample videos, etc. The only files I want beside the movie file are subtitle files if they came with the download. And the video files often have obnoxiously long file names with coding info in it, the uploader’s name, etc. And sometimes they get nested weirdly.
Most of the time, the file name and nesting is not really a big deal since I use plex and does good at ignoring nesting and it typically matches the title to imdb entries even if the file name is full of garbage. But sometimes it doesn’t match correctly and has to be manually fixed. And I just want my files to be clean, readable, and get rid of the bloat.
So I made a script that walks through my movie libraries, deletes all unneeded files, generates a directory structure dependent on whether or not there are subtitles, and renames the files (and directories) by removing all of the junk words and coding and leaving only the title and release year. Like I said, it’s nothing amazing, but it’s the only utility I ever wrote in it’s entirety for myself that I actually use on the regular.
kryptonianCodeMonkey@lemmy.worldto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?
4·3 months agoSure. There were worse problems to. SQL injection vulnerabilities, dense functions with hundreds of lines of spaghetti code, absolutely zero test coverage on any project, etc. That’s just the easiest to show an example of and it’s also the one that made me flinch every time I saw it.
"".equals()😨
kryptonianCodeMonkey@lemmy.worldto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?
61·3 months agoJoined a new team and one of my first tasks was a refactor on a shared code file (Java) that was littered with data validations like
if ("".equals(id) || id == null) { throw new IllegalArgumentException() }The dev who wrote it clearly was trying to make sure the string values were populated but they apparently A) didn’t think to just put the null check first so they didnt have to write their string comparison so terribly or else didnt understand short circuiting and B) didn’t know any other null-safe way to check for an empty string, like, say StringUtils.isEmpty()
kryptonianCodeMonkey@lemmy.worldto
movies@piefed.social•Project Hail Mary | Official Trailer 2
9·4 months agoI don’t agree about the movie being better, mostly because I think getting Mark’s inner monologue made much of the humor land so much better than the vocalized stuff in the movie. And they had to handwave a bunch of the more technical sciences and engineering that I found genuinely interesting in the book. But it was very cinematic and a pretty solid adaptation.
I expect PHM will have to do some more handwaving on the science, which will be unfortunate, but I also think Ryan can deliver on the humor a bit better than Matt did, so I am anticipating that to work quite well. I feel like Ryan’s personality will be a good foil for both the ultra series nature of the threat and the characters dealing with it and the more out there sci-fi elements in PHM (compared to The Martian).


If the pattern fits for all cases, you’ve found the pattern (or one of multiple if there’s more than one solution). I figured it out and I’m certain of it.