|
1. The lounge is for the CodeProject community to discuss things of interest to the community, and as a place for the whole community to participate. It is, first and foremost, a respectful meeting and discussion area for those wishing to discuss the life of a Software developer.
The #1 rule is: Be respectful of others, of the site, and of the community as a whole.
2. Technical discussions are welcome, but if you need specific programming question answered please use Quick Answers[^], or to discussion your programming problem in depth use the programming forums[^]. We encourage technical discussion, but this is a general discussion forum, not a programming Q&A forum. Posts will be moved or deleted if they fit better elsewhere.
3. No sys-admin, networking, "how do I setup XYZ" questions. For those use the SysAdmin[^] or Hardware and Devices[^] forums.
4. No politics (including enviro-politics[^]), no sex, no religion. This is a community for software development. There are plenty of other sites that are far more appropriate for these discussions.
5. Nothing Not Safe For Work, nothing you would not want your wife/husband, your girlfriend/boyfriend, your mother or your kid sister seeing on your screen.
6. Any personal attacks, any spam, any advertising, any trolling, or any abuse of the rules will result in your account being removed.
7. Not everyone's first language is English. Be understanding.
Please respect the community and respect each other. We are of many cultures so remember that. Don't assume others understand you are joking, don't belittle anyone for taking offense or being thin skinned.
We are a community for software developers. Leave the egos at the door.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
modified 16-Sep-19 9:31am.
|
|
|
|
|
- I just can stand it when someone doesn't use braces in IF statements:
static void Main(string[] args)
{
bool isTrue = false;
if (isTrue)
Console.WriteLine("line1") ;
Console.WriteLine("line2");
Console.WriteLine("line3");
Console.ReadLine();
} - XAML where the code is all on one line! (This is all on one line!)
<Button x:Name="cmd5" Style="{StaticResource MetroButton}" Content="Remove" RenderTransformOrigin="0.438,2.667" IsDefault="True" Click="cmdRemove_Click" DockPanel.Dock="Right" Margin="0" Width="66" VerticalAlignment="Center" Visibility="Collapsed"/> - First brace not on a new line:
static void Main(string[] args)
{
bool isTrue = false;
if (isTrue) {
Console.WriteLine("line1");
}
Console.WriteLine("line2");
Console.WriteLine("line3");
Console.ReadLine();
}
What bugs you when you see someone else's code?
In theory, theory and practice are the same. But in practice, they never are.”
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
|
|
|
|
|
|
Funny enough, for JavaScript it's the exact opposite for #3. My peeve would be not using 1TBS for JavaScript/Typescript. There's actually a technical reason why, but now it's just so ingrained. And it's easy to spot a JavaScript rookie vs a pro if they try and format it like C#.
Totally agree about the empty catch blocks though. Even in JS.
Jeremy Falcon
|
|
|
|
|
Agreed with the opening brace placement in JS/TS vs C#. I've done very little JS, but this is something I've quickly adopted, despite doing the opposite in C#. If I see an opening brace on a line on its own in JS, it just looks wrong to me.
Somehow I can manage do the context switch in C# as if it was second nature, which is just as well, otherwise I'd really get stuck on this sort of thing.
Coding standards are weird. It's just as well there's so many of them.............
|
|
|
|
|
dandy72 wrote: Somehow I can manage do the context switch in C# as if it was second nature That's a sign of a good coder actually. Like with JS, there's a technical reason. Being able to let go of things (if there's a good reason) is a good thing. Like for instance, I love camel case. But, I doubt that would fly in Rust.
dandy72 wrote: Coding standards are weird. It's just as well there's so many of them............. Preach.
Jeremy Falcon
|
|
|
|
|
Kevin Marois wrote: What bugs you when you see someone else's code?
1. "Hungarian" variable names
2. TAB instead of spaces
3. TAB instead of spaces
...
100. Did I mention "TAB instead of spaces"?
Mircea
|
|
|
|
|
Item 1 is just evil.
Item 2 - it's xaml. It's not code
Item 3 - I prefer braces to be on the line below, but it's just habit. damned if I know where I picked up on that. I just don't think the opening brace on the same line is clear. But that is my preference. I know other folks that go BSC if the brace is under the if...
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
charlieg wrote: Item 3 - I prefer braces to be on the line below, but it's just habit. damned if I know where I picked up on that. I just don't think the opening brace on the same line is clear. But that is my preference. I know other folks that go BSC if the brace is under the if... Except in JavaScript (I realize the OP is C#... just saying) there's a legit reason to not use a new line for the brace.
Jeremy Falcon
|
|
|
|
|
Clicked on the link, read what was said there and pondered for a minute.
I've decided that is one of the dumber language decisions I've ever seen.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
I’m begging you for the benefit of everyone, don’t be STUPID.
|
|
|
|
|
1.2.3.YES
Give me coffee to change the things I can and wine for those I can not!
PartsBin an Electronics Part Organizer - An updated version available! JaxCoder.com
Latest Article: Simon Says, A Child's Game
|
|
|
|
|
Use of literal values annoys me a lot. Especially when that hard-coded value needs to be changed.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
That's a good one. Especially if that literal is used more than once...
Jeremy Falcon
|
|
|
|
|
Kevin Marois wrote: I just can stand it when someone doesn't use braces in IF statements: For me, that's acceptable... as long as the rest of the code is formatted well. Especially for stuff that's terse in nature like if (!blah) return; at the start of a routine. But it would have to be something short and simple.
Kevin Marois wrote: What bugs you when you see someone else's code? If we harken back to the first point... when folks don't use spacing properly. Code should read like text. And in English we have paragraphs. When I see large code files with no blank lines... I mean... what?
function checkout(goodsPrice, shipmentPrice, taxes) {
const total = goodsPrice + shipmentPrice + taxes;
const para = document.createElement("p");
para.textContent = `Total price is ${total}`;
document.body.appendChild(para);
}
function checkout(goodsPrice, shipmentPrice, taxes) {
const total = goodsPrice + shipmentPrice + taxes;
const para = document.createElement("p");
para.textContent = `Total price is ${total}`;
document.body.appendChild(para);
}
Jeremy Falcon
|
|
|
|
|
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
|
|
|
|
|
#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.
|
|
|
|
|
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. 
|
|
|
|