Comment on
Cyclomatic caps: the limit is the lever, not the warning
Thanks for your opinion, Claude.
Comment on
Cyclomatic caps: the limit is the lever, not the warning
Thanks for your opinion, Claude.
Comment on
Cyclomatic caps: the limit is the lever, not the warning
Reply in thread
Humans are very good at pattern recognition. Cyclomatic complexity ignores that, so code that is easy for a human to read can get a bad score. E.g. handling Win API messages:
switch (msg)
{
case WM_CREATE: return OnCreate(hwnd, lParam);
case WM_PAINT: return OnPaint(hwnd);
case WM_SIZE: return OnSize(hwnd, wParam, lParam);
case WM_COMMAND: return OnCommand(hwnd, wParam, lParam);
case WM_TIMER: return OnTimer(hwnd, wParam);
case WM_KEYDOWN: return OnKeyDown(hwnd, wParam);
case WM_CHAR: return OnChar(hwnd, wParam);
case WM_MOUSEMOVE: return OnMouseMove(hwnd, lParam);
case WM_LBUTTONDOWN:return OnLeftButtonDown(hwnd, lParam);
case WM_LBUTTONUP: return OnLeftButtonUp(hwnd, lParam);
case WM_RBUTTONDOWN:return OnRightButtonDown(hwnd, lParam);
case WM_RBUTTONUP: return OnRightButtonUp(hwnd, lParam);
case WM_SETFOCUS: return OnFocus(hwnd, TRUE);
case WM_KILLFOCUS: return OnFocus(hwnd, FALSE);
case WM_CLOSE: return OnClose(hwnd);
case WM_DESTROY: return OnDestroy(hwnd);
}
Complexity score: 17. Easy to read and verify? Yes.
LRESULT OnMouseMove(HWND hwnd, LPARAM pos)
{
if (tracking == dragging != selecting &&
(!cancelled == (buttons & MK_LBUTTON)))
return UpdateInteraction(hwnd, pos);
return 0;
}
Complexity score: 3. Easy to read and verify? No.
Comment on
ChatGPT is changing the way we write. Here’s how – and why it’s a problem.
Reply in thread
And in reality: https://chatgpt.com/share/66f519a6-1348-8002-96eb-bb61fb25287b
Comment on
Israeli agricultural exports face looming ‘collapse’ as world rejects products over Gaza genocide
Good. I remember my parents boycotting South Africa over apartheid. Israel is acting much worse than they were.
Comment on
ChatGPT is changing the way we write. Here’s how – and why it’s a problem.
Reply in thread
Do you even know what regex is? Your neural network needs more training.
Comment on
'Embarrassing faux pas': Trump confuses male singer for a 'hot' woman at his rally
Reply in thread
"Latin music superstar Nicky Jam. You know Nicky? She's HOT!"
Comment on
How screwed am I?
Reply in thread
Yeah. Everything depends on the complexity of the product, but it's just as likely that it's the new CTO and his team that gets canned when they get bogged down in the details and the costs start racking up.
Comment on
Missouri Rejects Rape Exceptions, Senator Says Forced Birth Can Be ‘the Greatest Healing Agent’
Reply in thread
Don't worry, the good bible has the answer.
28 If a man happens to meet a virgin who is not pledged to be married and rapes her and they are discovered,
29 he shall pay her father fifty shekels of silver. He must marry the young woman, for he has violated her. He can never divorce her as long as he lives.
Comment on
What is something the previous owner of your house did that you're grateful for?
They installed some sort of sound isolating suspended/floating (?) ceiling in my apartment. I absolutely love it. In my neighbors apartment I could constantly hear people above, but in mine it's almost always silent.
Comment on
Windows 11 now shows a full-screen pop-up to use OneDrive and protect your PC
The 5GB free space of my OneDrive is filled with game saves in the documents folder. You can't exclude directories there from being backed up. Good job.
Comment on
Bill Gates, Jeff Bezos and Sam Altman among billionaires investing in 'Freedom City' to be built on Greenland
Reply in thread
As far as I can tell, his involvement is investing in a rare earth mineral company as part of a green energy initiative. I don't see anything connecting him to some "freedom city". That's Peter Thiel: https://www.insidehook.com/internet/peter-thiel-praxis-next-great-city-greenland
Comment on
We all know of the subs like "You Should Know," but what something you SHOULDN'T know?
I just learned that people who are allergic to shrimp are also allergic to cockroaches.
Comment on
Trump Will Make South Korea Pay for His Iran Humiliation | His rage is driving him to make irrational policy choices.
Reply in thread
Didn't his net worth increase by something like 2.2 billion dollars as president? (..so_far.gif..)
Must be really good at predicting the markets, somehow. He's perhaps not that irrational when you consider his actual priorities (himself and his family), not whatever he is saying (MAGA).
Comment on
While reviewing a PR, you find some piece of code that seems to work perfectly well, but some functions are written in a style that you don't particularly favor. What do you do?
Not enough information.
New team member? Show them the style guide and where it doesn't match.
Is the style guidelines consistently followed elsewhere? If not, I'd just approve it.
Do I have a good relationship with the other developer, and can they handle criticism? If not, I probably would not want to be the one reviewing it, but if I did I would likely let it go and fix it later. Fight more important battles.
Otherwise, how important is that piece of code? I'd immediately approve a one-off script, but if it's an core piece of code, I assume the dev missed it and point it out. Happens to everyone.
etc. etc.
Comment on
Backdoor slips into popular code library, drains ~$155k from digital wallets
Reply in thread
Earlier today, a publish-access account was compromised for @solana/web3.js, a JavaScript library that is commonly used by Solana dapps. This allowed an attacker to publish unauthorized and malicious packages that were modified, allowing them to steal private key material and drain funds from dapps, like bots, that handle private keys directly. This issue should not affect non-custodial wallets, as they generally do not expose private keys during transactions. This is not an issue with the Solana protocol itself, but with a specific JavaScript client library and only appears to affect projects that directly handle private keys and that updated within the window of 3:20pm UTC and 8:25pm UTC on Tuesday, December 2, 2024.
These two unauthorized versions (1.95.6 and 1.95.7) were caught within hours and have since been unpublished.
We are asking all Solana app developers to upgrade to version 1.95.8. Developers pinned to latest should also upgrade to 1.95.8.
Developers that suspect they might be compromised should rotate any suspect authority keys, including multisigs, program authorities, server keypairs, and so on.
https://github.com/solana-labs/solana-web3.js/releases/tag/v1.95.8
Comment on
Florida set to become second state to ban fluoride in public water
Reply in thread
The mean IQ level was more in the region with medium fluoride concentration in drinking water (56.68) compared to areas with low fluoride concentration (41.03) and high fluoride concentration (31.59).
So according to that study, having "medium levels" (1.2-2ppm) of fluoride is much better. I checked three random water reports in Florida which had 0.5, 0.7 and 0.9 ppm.
Comment on
Bcachefs creator claims his custom LLM is 'fully conscious'
Reply in thread
Depends on the setup and what you call learning. If you let them, bots can write down things to remember in future prompts, and edit those "memories".
Comment on
Why Senior Engineers Let Bad Projects Fail
Reply in thread
What? That is true in small companies too.
Comment on
Circumcision at NYC hospital almost made baby bleed to death, parents say
Reply in thread
"It depends on the day whether more pleasure would be a good or bad thing for me"
That's a more precise version of your statement, I think.
Comment on
What's an aspect of life that's currently done privately that you think should be communalized?
The US started using mailboxes 14 years after the UK
In 1849, the Royal Mail first encouraged people to install letterboxes to facilitate the delivery of mail. Before then, letterboxes of a similar design had been installed in the doors and walls of post offices for people to drop off outgoing mail.
In 1863, with the creation of Free City Delivery, the US Post Office Department began delivering mail to home addresses.