854 karma · joined Dec 10, 2018 (7y ago) · 159 submissions
comment 12mo ago · link · parent
comment 1y ago · link · parent
I do not think it is the only reason. The world is complex, but I do think it factors into why software is not treated like other engineering fields.
comment 1y ago · link · parent
I rather liked the old post "Object Oriented Programming is an Expensive Disaster that Must End" written over 10 years ago.
https://medium.com/@jacobfriedman/object-oriented-programmin...
Many complained the post was too long, and then debated all kinds of things brought up in the article (such is the way of the internet).
But the one thing I really liked is how it laid out that everyone has a different definition of what OOP is and so it is difficult to talk about.
comment 1y ago · link · parent
https://news.ycombinator.com/item?id=45771794
I made a little function to do deep copies but am still experimenting with it.
function deepCopy(value) {
if (typeof structuredClone === 'function') {
try { return structuredClone(value); } catch (_) {}
}
try {
return JSON.parse(JSON.stringify(value));
} catch (_) {
// Last fallback: return original (shallow)
return value;
}
}comment 1y ago · link · parent
I did not usually see a free roaming cart though. Maybe times have changed. Usually, people would prop them up against a curb, or ditch them into a grassy spot, or they would put them by a low spot in the parking lot next to a drain, or put them next to a column on the sidewalk.
Just my anecdotal experience, it seemed like people would put their cart back if there was a cart corral in the center of every parking row.
comment 1y ago · link · parent
One thing I want to point out is that everyone I worked with at a grocery store loved going out and getting the carts. The employees saw it as a mini-break from the drudgery of the day.
From having to go get carts many times, I will say, that if someone leaves their cart in a parking spot... well that is bad behavior. But if they just push it into the grass, or out of the way, who cares if it is tucked away there, or tucked away at cart corral. Someone has to go out and get the carts anyway, and it broke up the day, got you outside.
99.
The US Is Rebuilding the Airfields That Staged the Hiroshima Nuclear Strike(rferl.org ↗)
5 points · by hackthemack · 1y ago · 3 comments
100.
DeepSeek may have found a new way to improve AI's ability to remember(technologyreview.com ↗)
3 points · by hackthemack · 1y ago · discuss
comment 1y ago · link · parent
I wish all arguments were copies unless I put some symbol that says, alright, go ahead and give me the original to mutate?
It seems like this way, you reduce side effects, and if you want the speed of just using the originals, you could still do that by using special notation.
comment 1y ago · link · parent
I want everything that passes through a function to be a copy unless I put in a symbol or keyword that it suppose to be passed by reference.
I made a little function to do deep copies but am still experimenting with it.
function deepCopy(value) {
if (typeof structuredClone === 'function') {
try { return structuredClone(value); } catch (_) {}
}
try {
return JSON.parse(JSON.stringify(value));
} catch (_) {
// Last fallback: return original (shallow)
return value;
}
}105.
Trump orders immediate resumption of US nuclear weapons testing(france24.com ↗)
30 points · by hackthemack · 1y ago · 38 comments
comment 1y ago · link · parent
It differentiates between mods and games. A game changes the core game to be much more different, but sometimes a game is just a collection of some other mods.
https://content.luanti.org/packages/?type=game
Personally, I find it more fun to just go and click on about 6 to 8 mods that are interesting and see how the game goes.
https://content.luanti.org/packages/?type=mod
Some of my picks are...
https://content.luanti.org/packages/ElCeejo/animalia/
https://content.luanti.org/packages/random-wizard/gear_up/
comment 1y ago · link · parent
You can, pretty much, get the Minecraft experience by downloading mods. Or just use the VoxeLibre game mod.
https://content.luanti.org/packages/Wuzzy/mineclone2/
The mods are written in lua and you can find the source code for most of them.
One I like is Zoonami which turns the experience into a Pokemon like game.
comment 1y ago · link · parent
Still, to my eye, ai generated images still feel a bit off when doing with real world photographs.
George's hair, for example, looks over the top, or brushed on.
The tree added to the sleeping person on the ground photo... the tree looks plastic or too homogenized.
comment 1y ago · link · parent
Question. If you want to do one email for expired users and another for non expired users and another email for users that somehow have a date problem in their data....
Do you just do the const emails =
three different times?
In my coding world it looks a lot like doing a SELECT * ON users WHERE isExpired < Date.now
but in some cases you just grab it all, loop through it all, and do little switches to do different things based on different isExpired.
comment 1y ago · link · parent
I vaguely remember the problem was one function returned a very structured array dealing with regex matches. But there was something wrong with the regex where once in a blue moon, it returned something odd.
So, the chained functions did not error. It just did something weird.
Whenever weird problems would pop up, it was always passed to me. And when I looked at it, I said, well...
I am going to rewrite this chain into steps and debug each return. Then run through many different scenarios and that was how I figured out the regex was not quite correct.
comment 1y ago · link · parent
email.bulkSend(generateExpiryEmails(getExpiredUsers(db.getUsers(), Date.now())));
Many times, it has confused my co-workers when an error creeps in in regards to where is the error happening and why? Of course, this could just be because I have always worked with low effort co-workers, hard to say.
I have to wonder if programming should have kept pascals distinction between functions that only return one thing and procedures that go off and manipulate other things and do not give a return value.
113.
Casey Muratori interview, math education failures and switching away from OOP [video](youtube.com ↗)
2 points · by hackthemack · 1y ago · discuss
comment 1y ago · link · parent
https://www.geeksforgeeks.org/c/bresenhams-circle-drawing-al...
The secret is to draw 1 arc of a 45 degree angle and the reflect it (redraw it with different coordinates).
comment 1y ago · link · parent
https://www.wired.com/story/bots-online-advertising/
And before that, in the 2010s, an employee of ebay discovered the perverse incentives of online advertising. Freakonomics did a podcast on the subject. It is a two parter, but really worth your time if you want to get some of the behind the scenes thoughts and machinations of the advertising industry.
https://freakonomics.com/podcast/does-advertising-actually-w...
comment 1y ago · link · parent
Someone took QuickJS and put it in wasm so you can run QuickJS in the browser or in node.
https://github.com/justjake/quickjs-emscripten
Fabrice Bellard is on another planet when it comes to programming. He also wrote FFmpeg and QEMU (among other things).
comment 1y ago · link · parent
Today's hiring process feels like you have to go memorize algorithms instead of valuing things an employee actually has done in the past. And if the thing that was done in the past is something older, like Ruby on Rails, or an old PHP project it actually has a negative connotations in respect to hire-ability.