|
MikeTheFid wrote: I think a bunch of the style quirks like #3 came from a time where the number of lines in the file made navigation arduous. I'm looking at you ed.
Not sure if it's true or just an internet legend, but I've read that the opening brace on the previous line style first gained popularity when the layout person at the publisher for what became a very influential book made the change to reduce the page count.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
|
|
|
|
|
MikeTheFid wrote: It's even worse when they run a reformatter that changes the entire file to their preferred style.
Yes that is a very bad thing. Makes reviewing code much harder.
|
|
|
|
|
First example would have different meanings in most languages because they aren't white space significant. The rest are just preferences and I set my IDE to allow me to quickly reformat the code to my preference.
|
|
|
|
|
return func_0(func_1(func_2(func_3()))); i may have lost a job because during interview the coder showing me his code showed me code like this and i told him i thought it was terrible . probably a good thing i didn't get it . there was a lit cigarette dangling from his mouth and i hate cigarettes .
|
|
|
|
|
Kevin Marois wrote: What bugs you when you see someone else's code?
What bugs me is when someone insists their coding style is 'better' and thus makes it a formal coding standard for the company.
Having spent more than than a decade neck deep in formal process standards including studying actual formal research I know that coding style guides have zero measurable impact on any objective quality metric.
The most common refrain is that it is more 'readable'. I spent quite a bit of time trying to find any research at all that actually objectively measured that. I found one single study which was based on marketing material (not code) which only showed that more than 4 type faces was not a good idea.
|
|
|
|
|
I also used to think like this, but my current job has taught me why one should have and follow a corporate style guide: versioning. If everyone uses linting to format code to their style after changing a single line on a file, version systems will register thousands of changes on a file and hide what has really been altered on the code. I never question this anymore but follow my own standards for my personal projects.
- Leonardo
|
|
|
|
|
Leonardo Pessoa wrote: If everyone uses linting to format code to their style after changing a single line on a file
Correct. And I agree that is a problem for exactly the same reason (even posted that in this thread on another message.)
But a formal style guide doesn't really have anything to do with that practice.
|
|
|
|
|
Took me a while to figure out the first one was legal C.
It's also a pet peeve of mine. But after years of seeing and understanding the most elegant hacks and algorithms (and then a lot of the asm keyword)...you resign yourself to knowing K&R syntax is optional.
Readability being a pipe dream (since in my field, thinking like the computer is the highest form of enlightenment for an engineer)
|
|
|
|
|
I shall disagree on #3 because I prefer exactly the opposite. Apart from that, pretty much only poorly written code annoys me. I clearly remember the time I've been maintaining someone else's code just to read the following statement (methods and variable names have been changed to preserve the code, although kept the language):
class TReport1 : TReport
private
shouldPrint: boolean;
end;
procedure TReport1.Label1Print(var print: boolean);
begin
if shouldPrint = true then
print = true;
else
print = false;
end;
I swear that it was exactly like this. All over the code, repeated a thousand time for each element on the report (yes, the person didn't even reuse the same method). And there was nothing else, nothing to control or change the value of shouldPrint . I was tempted to rewrite it all but time and the rule of not messing with what is working prevented me. I still have nightmares with this code...
- Leonardo
|
|
|
|
|
Quote: The Party controls everything in Oceania, even the people’s history and language. Currently, the Party is forcing the implementation of an invented language called Newspeak, which attempts to prevent political rebellion by eliminating all words related to it. Even thinking rebellious thoughts is illegal. Such thoughtcrime is, in fact, the worst of all crimes.
1984.
1984: Full Book Summary | SparkNotes
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
It's likely to quietly steal your talent (11)
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
It's likely to
quietly P
steal ROB
your talent ABILITY
PROBABILITY
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Can you explain or confirm the “quietly”?
I am guessing it is related to a silent “p” like Pneumonia.
Thanks
|
|
|
|
|
Dynamics (music) - Wikipedia[^]
Quote: The two basic dynamic indications in music are:
- p or piano, meaning "soft or quiet".[3][4]
- f or forte, meaning "loud or strong".[3][5]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Thanks. Less cryptic than my WAG! 😊
I could see “very loudly” being used to cover “ff” with this pattern.
|
|
|
|
|
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
#Worldle #494 2/6 (100%)
🟩🟩🟩🟩🟨↗️
🟩🟩🟩🟩🟩🎉
https://worldle.teuteuf.fr
little easy
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
My PC is getting old and starting to behave strangely - Windows 10 updates don't, can't get stuff from Microsoft Store, preview panel in File Explorer not showing images, and a raft of other issues which make me (after weeks of trying to solve it) think about an upgrade. The hardware isn't up to Windows 11 and I'd like to move to it.
Problem - I don't want to reinstall all my apps - probably can't for many of them, old software I still use from time to time but can't remember how I installed it. Besides I have memories of when I built this machine and the many, many months it took before it was just how I like it.
Also, my very large HDDs are just fine, I have no reason to change the GPU, and most other components are fine.
The plan, which I suspect I will rue, is to buy a case, MB, 32GB RAM, CPU, 2TB M2 SSD and power supply plus a copy of Windows 11. Then clone my Win 10 SSD to the new one and see if I can navigate my way through the hardware changes after boot. Then upgrade to Win 11 using the new licence.
Has anyone ever tried this? If it won't work I think I will keep using the machine as it is, I'm in my seventies and probably deteriorating faster than it is.
All help appreciated.
Update. Thanks for all the feedback. I hear what is being said about a fresh install, and have decided to continue the process of fixing my installation for a bit longer. Next step, try to reinstall Windows using media, it appears I can keep my apps.
modified 30-May-23 19:06pm.
|
|
|
|
|
Macrium Reflect has a free option to clone drives.
|
|
|
|
|
I'm pretty sure that will work - but why not ask MS? Thier tech support isn't too bad, and it's got to be a problem they have seen before!
But ... what you describe sounds like software issues, not hardware - so migrating your apps into an upgrade OS may not cure it. Indeed, an upgrade is likely to keep all the odd settings which are annoying you! I'd be tempted to just do a clean instal then add the old SSD to the new machine and migrate all the data. Means reinstalling all the apps, but provided you log in with the same MS ID you should have fall access to the drive and your data.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Thanks, you are probably right, but reinstalling all the apps is a daunting task. As an example, I still use some software which was originally installed using floppies. At the time I had a floppy drive on a spare machine so I was able to create a CD which I managed to get to work as install media. I no longer have anything with a floppy drive, have probably lost the discs anyway and the CD will have vanished.
|
|
|
|
|
You can still buy USB floppy drives on FleaBay, and they are pretty cheap. May not last long, but could be enough if you have the originals and they haven't degraded too badly.
If you do, you could probably create a mountable image of each disk in Macrium / AOMEI which could let you swap them as if the actual floppy disk was installed. Haven't tried it - I haven't even looked at a floppy in several decades!
What software was it?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: I haven't even looked at a floppy in several decades! Just the opposite for me.
|
|
|
|
|
Little blue pill time?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|