|
I've been upgrading Windows in-place on a weekly basis for several years, as my dev PC gets Windows Insiders builds (I started so I'd get the latest WSL builds as early as possible). In that time, I've had zero problems with the upgrade process and the problems I have had (a few BSODs) have been rare (for example, there was something about upgrading packages on my WSL Ubuntu install that caused a BSOD) and fixed in the next build.
Anyway - my PC has seen Windows 10 versions from around when WSL was introduced in 2016 through to now when I'm running Windows 11 build 25276, which'll likely result in Windows 11 23H2.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I am lucky in this regard...
I mostly work on my Dell Precision Laptop and it cannot be upgraded to Windows 11.
Problem solved...
Steve Naidamast
Sr. Software Engineer
Black Falcon Software, Inc.
blackfalconsoftware@outlook.com
|
|
|
|
|
I've tried it twice so far and have gone back to Win 10. I don't remember what the problem was with the first attempt, but on the second try, things seem to work OK for about a week. Then a problem arose. I had been playing a game for about 3 days and on the 4th day Windows 11 decided that my game could no longer write save files to it's save file directory. All the fixes I could find on the web didn't fix the problem so I just restored Win 10 from my backup. I'm just going to wait to EOS before making the jump to Win 11. Hopefully, they'll have fixed their problems by then.
|
|
|
|
|
this: "My Win10 dev box "
YOU SHALL NOT PASS!!!!! insert memes, I allow the forum to rape and pillage.
I work for myself. When my laptop or machine dies, it is financially painful (I'm IT, HR, CEO, and the guy paddling like heck). You never, ever, never risk your dev laptop.
Years ago, my children learned, you touch my laptop, I will adjust your attitude. My beloved wife would go to my laptop, and I'd ask her, "what are you doing?". I don't care what the answer was - mine was, "go do it on yours."
No touchie <--- that's french.
I love my wife - after 44 years, yeah I do. But Microsoft? Nah, don't think so. See another post I made - MS will delete your retreat path.
Ask yourself - do you feel lucky?
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.
|
|
|
|
|
Ha ha! I hear you, but I've always owned only one machine (my dev + personal PC). Noone else has access to it (I live alone) and there are very few apps installed on it aside from VS. My non-code data is ruthlessly backed up and my source code lives at MS.
/ravi
|
|
|
|
|
11th gen Intel is ok with Win11. But Win10 is a better OS for anything under 12th IMO.
|
|
|
|
|
Wordle 575 5/6
π©β¬β¬β¬π©
π©β¬π©β¬π©
π©π©π©β¬π©
π©π©π©β¬π©
π©π©π©π©π©
I thought I was going to run out of rows again! Phew!
|
|
|
|
|
Wordle 575 3/6
β¬π¨β¬β¬π©
π©π©β¬π©π©
π©π©π©π©π©
Missed 2/6 in hurry...
|
|
|
|
|
Wordle 575 3/6*
β¬π¨β¬π¨π©
π©β¬π©π©π©
π©π©π©π©π©
Went for the "archaic" word instead of the obvious one ...
"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!
|
|
|
|
|
β¬π¨β¬β¬π©
π©β¬π©π©π©
π©π©π©π©π©
Very lucky second guess.
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming βWow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 575 5/6
β¬β¬π©π¨β¬
π©β¬π©β¬π©
π©β¬π©β¬π©
π©β¬π©β¬π©
π©π©π©π©π©
|
|
|
|
|
Wordle 575 3/6
β¬β¬β¬β¬π©
π©β¬π©β¬π©
π©π©π©π©π©
Get me coffee and no one gets hurt!
|
|
|
|
|
Wordle 575 3/6*
β¬π¨π©π¨π¨
π¨β¬π©π¨π©
π©π©π©π©π©
Happiness will never come to those who fail to appreciate what they already have. -Anon
|
|
|
|
|
Wordle 575 3/6
β¬β¬π¨β¬π©
π©β¬β¬π©π©
π©π©π©π©π©
Yes
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
I don't do TDD, but maybe you do?
If you do, do you include a test to ensure that calling a function with the same input a second time returns the same result, e.g. f(x) == f(x) ?
Doing so would have saved me a bunch of time and anxiety this morning when I found that last summer I had introduced a bug into a function which I very rarely call a second time in any of my utilities.
As it turns out, the function uses a static buffer area for temporary storage and I had forgotten to clear it.
And it remained undetected until today, when I rebuilt probably the only utility I have which calls the function twice.
modified 14-Jan-23 20:13pm.
|
|
|
|
|
I don't.
What's the purpose of the static buffer, if you have to clear it on exit?
BTW: go functional!
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
Not having to reallocate it on each call. Depending on the input, it can get large. And I clear it on enter (unless I forget to).
The use of the buffer is to improve the performance of worst-case data.
|
|
|
|
|
PIEBALDconsult wrote: Not having to reallocate it on each call. This begs the question, why would that matter since you call the function only once in most of your utilities?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Because it may also get called millions of times in other applications.
|
|
|
|
|
Agree with CPallini on functional style where possible.
If you know the method you are unit testing has static storage or side effects, then I think you are on the right path to invoke it multiple times in the same test.
For true TDD, you should not know if there are statics,etc.
So use the βSeparationβ (per Apple TV) process when switching from Dev role to tester role.
|
|
|
|
|
englebart wrote: you should not know if there are statics
While that is probably true, it still remains that I had a bug in the function which would have been caught by calling the function twice with the same input and comparing the results. A test of the function would have caught it so that higher-level callers don't need to know.
|
|
|
|
|
PIEBALDconsult wrote: I don't do TDD, but maybe you do?
No but I still use unit tests. I did that before unit test frameworks existed and before TDD existed.
PIEBALDconsult wrote: calling a function with the same input a second time
No.
PIEBALDconsult wrote: As it turns out, the function uses a static buffer area for temporary storage and I had forgotten to clear
Except of course if I wrote a method like that then yes I would write appropriate unit tests to test that.
|
|
|
|
|
Just so you know, I'm not hardcore TDD or BDD evangelist. I think it's ok to not write your tests first as you figure stuff out and get a feel for the app. But, make no mistake... I 100% believe there should be at least unit tests in a project. You wanna make the argument that a functional test may or may not be required... cool ok. But, nowhere under the sun should a project not be covered with unit tests.
Ahem, now with that out the way. To actually address your question...
It depends. Is your function a pure function? If it's using temp storage or an external dependency (resource, not lib), it's not. Typically, I design my unit tests to say f(x) == f(x) for pure functions. In your case I would not. I'd still make sure the tests always pass and are about to allocate resources (mocked or otherwise), but I wouldn't assume X in always equals X out. I would make sure the unit tests around that function handle all error scenarios however.
If you have "pure" logic that you must test inside that routine, then and only then would I mock the external resource inside the routine and test just the logic itself with f(x) == f(x) in mind. For the rest of the test coverage on that routine you can do it the non-pure way.
It's dancing around it though since technically it's not a pure function, but at may at least give you the best of both worlds in this instance.
Jeremy Falcon
modified 15-Jan-23 15:25pm.
|
|
|
|
|
Hmm, well, as to "purity"... not technically, but in the spirit of it.
I could write the function so that it allocates a new local buffer on each call -- then it would be pure.
The issue I have with that is when a large buffer is required many times. I'd rather use a static buffer so that repeated calls (if any) don't have to keep allocating large buffers; they can re-use a buffer which has already been allocated for the largest value so far encountered.
Although my original post involves a scenario in which this function gets called once (or twice, rarely) with small values (short strings), the function might get called millions of times with strings of thousands of characters in the worst-case scenario.
So I have the buffer static. And I clear it upon entering the function (unless I forget to) rather than at the end.
If I clear it at the end, that might be seen as "more pure", in that it leaves the buffer the way it found it.
But I see no point in clearing it before the end of the function; clearing it at the beginning makes more sense to me.
Clearing the buffer takes hardly any effort, so it's not like there is a performance difference in when it gets cleared.
Having said that, in some other situations, clearing a full buffer may require more effort than clearing an empty buffer, so maybe needlessly clearing an empty buffer on the first call is better than needlessly clearing a full buffer on the last. :shrug:
At any rate, I'm not about to change the function just so that it fully qualifies as a pure function; there are bigger fish to fry.
|
|
|
|
|
PIEBALDconsult wrote: The issue I have with that is when a large buffer is required many times. I'd rather use a static buffer so that repeated calls (if any) don't have to keep allocating large buffers; they can re-use a buffer which has already been allocated for the largest value so far encountered. Oh, my point wasn't so much about not using a static buffer. There are plenty of use cases where a static buffer on the heap and/or local static variable on the heap make total sense. Just saying what I do in each circumstance.
PIEBALDconsult wrote: Although my original post involves a scenario in which this function gets called once (or twice, rarely) with small values (short strings), the function might get called millions of times with strings of thousands of characters in the worst-case scenario. Sure, so in this case the routine wouldn't be pure as you can't guarantee that memory will be allocated initially... especially if it's a large chunk. I mean, we could get pedantic and say the same thing about the stack too, but you get the idea. Usually if the stack is corrupt that program is gonna crash anyway. Not saying don't do it... saying I would test it as a non-pure function.
PIEBALDconsult wrote: At any rate, I'm not about to change the function just so that it fully qualifies as a pure function; there are bigger fish to fry. Yeah dude, you completely misread my entire post. Try again.
Jeremy Falcon
|
|
|
|