|
Pfft, no. The debugger is more like a programmer's mother-in-law.
|
|
|
|
|
Member 3983331 wrote: If (mike =jerk) In many popular programming languages that if statement will always resolve as true and you will be mutating mike to be a jerk.
So in effect, generalising for many popular programming languages, mike is always a jerk based on the code above.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
GuyThiebaut wrote: ...mike is always a jerk based on the code above.
Still better than mike = Karen;
(No offense meant to those Karen's who haven't appeared on the numerous YouTube vids now prelevant.)
|
|
|
|
|
I am so tempted to make a comment on that, but given the current climate, anything I said would get me into trouble...
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
"There be sharks in them waters!"
|
|
|
|
|
Is this a commentary against IDEs not picking up the mistakes before compilation? Or about developers who simply don't have the skills to code being offered jobs, without adequate on the job training, making life hard for others in the team? Or are you simply bashing the 80% of the Earth's population that don't speak English?
cheers
Chris Maunder
|
|
|
|
|
It just seems trollish to me.
|
|
|
|
|
I think he's bashing the people who do speak English, but never paid attention in school.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
It might be a rant typed into an interpreter after a bad day at the office.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
I'm gonna guess a spoonful of #3 with a drizzle of #2 to really bring out the flavor.
|
|
|
|
|
I understood what you are saying.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
A situation where I was dead certain it cannot happen but ...
Rings a bell?
|
|
|
|
|
I always place assert(false) or its equivalent in places where I am sure that it "can't happen". I've caught many nasty bugs this way.
A usage example would be the 'default' clause in a switch statement (when there is no reasonable default).
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
I throw an exception:
switch (unit)
{
default: throw new ArgumentException($"Unknown Unit type: {unit.ToString()}");
case Unit.Mm: mult = 1.0f; break;
case Unit.Cm: mult = 10.0f; break;
case Unit.Imperial: mult = 25.4f; break;
}
"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 C++, C#, or Java, I agree that's what you should do. In C, the best you can do is something like I outlined.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Interesting, I always thought you needed to have the default clause last.
Well that adds readability.
I think.
Wrong is evil and must be defeated. - Jeff Ello
Never stop dreaming - Freddie Kruger
|
|
|
|
|
I like all my validations at the top of a method, so it's just an extension of that: since cases can get quite long when there a few of them it's just more obvious to me that there is a "default fail".
If it's off the bottom of the screen it's harder to see and associate with the switch.
"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!
|
|
|
|
|
I made the experience that logging "this shouldnt not happen" is more cool, because in such situation I am to angry and nervous to mess with an exception stack.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
I see two problems with this approach:
- You may not notice the entry in the log (is happens even to the best of us, sometimes )
- Executing the "can't happen" code may cause the output to be corrupted. In many cases, it is better to get truncated output than wrong output.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
But an assert means the program is crashing and this is extrem bad when I want to debug that issue.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Put a breakpoint on the assert() statement.
The debugger is your friend.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
and so it explodes one step later.
Maybe I should tell you that I work with XCode in which moving the next call with the mouse doesnt work
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Despite having \\SGNAS in my Hosts file, my desktop is fine, but my Surface keeps losing SMB1 devices completely, via IP or domain name.
This was getting frustrating ...
Then I found this - ProviderFlags ([Samba] Re: msdfs root problems even after a reboot?[^]) and it seems to be working so far:
1) Open Regedit and accept UAC.
2) Navigate to HKEY_CURRENT_USER\Network
You should see a list of mapped drives as individual keys:
A
B
M
P
S
V
W
X
3) Open each drive twig and add a new DWORD32 Key named "ProviderFlags".
3) Set the value to 1 (you can just press ENTER to open the edit box once it's highlighted)
4) Reboot.
With the domain / IP mapped in Hosts*, all seems fine and indeed considerably faster than it was before the 2004 upgrade!
* Easy to do:
1) WINKEY, then type "notepad" - right click and select "Run as Administrator"
2) Accept UAC
3) Open the file "%systemRoot%\System32\Drivers\etc\hosts"
4) Add your mapping: "192.168.0.11 \\SGNAS #Seagate BlackArmour 16TB" is mine
IP first, then at least one space
Domain next, I use the \\ prefix but I'm not sure it's needed. (If it ain't broke ...)
Anything after "#" is a comment.
[edit]
I've written this up as a tip: Finding my network shares on SMB1 drives after the Windows 10 2004 update.[^] so it survives a little longer than this thread will!
[/edit]
"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!
modified 23-Aug-20 8:12am.
|
|
|
|
|
Given that SMB2 has been around since 2006, there is no excuse for NAS providers not to support it. Given the known security flaws, supporting only SMB1 is IMO criminally irresponsible.
For that matter, even SMB3 has been out for over 8 years.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
While it is true for new devices - let say after 2008-2010, MS has no excuse to drop them just like that...
(We gave 20 years of support, so we still have some Novel-area servers from the 2nd century... In case...)
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|