|
Agree with r_hyde post and others that this is unit testing.
If you break each test into a separate, well-named method and add the right annotations in the right project type then it will be “testing framework ready” . It would eliminate your counter necessity and replace it with the method name.
Is it worth it? Not until you need to make another major enhancement on the subject class. Unless you want to do it as a learning exercise.
Before you start work on your next enhancement, clone your test class and refactor into a unit test.
Both tests should pass.
In the new unit test write the new tests for your enhancement. Run the tests and the new ones would fail until you implement the upgrades.
Depending on which version of IDE you have, you can use the unit tests to verify 100% code coverage in the subject. This is very powerful and has helped me in the past with a utility class similar to your range class.
I had written code for a range like [3,1] that treats it like [1,3] but did not have test cases for it. The coverage report caught my miss.
|
|
|
|
|
I'm curious: while working at the keyboard, do you listen to something? White noise, music, nature sounds? Dish.
|
|
|
|
|
At the moment, I'm enjoying the last of my precious silence: in under an hour, Herself will be home, and all I will hear is her oxygen machine, the TV on loud (as she's partly deaf), and herself screaming abuse at whatever show is on 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!
|
|
|
|
|
Silence is golden for sure. I very often reset mental noise with forced silence.
|
|
|
|
|
|
Well, there is a single out already: 4'33" by John Cage[^]
"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: the TV on loud (as she's partly deaf)
That would annoy me to no end. I know it's not politically correct, and I understand it might be downright horrible for me to say this, but my position is that if you're the one with the affliction, then it's only respectful to try not to let that affect others. My solution in that scenario would be to wear headphones. I'm not just saying that when it applies to others. I'd be the first to do it if I was in that position.
But the world is built backwards. That's why I'm a single guy.
|
|
|
|
|
It's less annoying than her oxygen machine, which sounds like someone digging up the road outside with a Kango.
Fortunately she doesn't use it when we go to bed. Probably because she'd strangle herself with the piping when she "sausage rolled" herself with the entire duvet ...
"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!
|
|
|
|
|
|
Hawaiian Eye TV Show 1969-70's
|
|
|
|
|
Music, mostly electronic music of any genre.
With some old prog rock mixed in and some Qube Franco (Coeur de Pirate, Klo Pelgag, Pierre Lapointe...)
If it interests you, my top pick of last year.
Om Unit - Acid Dub Studies
Billie Eilish - Happier Than Ever .
The Black Dogs - Music For Photographers.
Coeur de Pirate - Perséides
For Those I Love - For Those I Love.
Loscil - Lux:Refractions
Plastikman - Narkosis/Spektre
Compilation Tresor - 30 years
A State Of Trance - 1000 (Celebration Mix)
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
Thanks! I will check these out. My son loves electronic music and shares with me sometimes.
|
|
|
|
|
I normally don't listen to music while coding. If I do, I listen to classical music; Vivaldi being my favorite for some reason.
I also cannot talk on the phone and code at the same time.
|
|
|
|
|
The Four Seasons? Very nice.
|
|
|
|
|
Nope. Silence works best for me.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Yes, most of the time that works well for me, but occasionally I need the (slight) energy of some sounds
|
|
|
|
|
Mostly Zoom meetings. I don't get enough time to code anymore
Hogan
|
|
|
|
|
Ugh. So tough. I really thrive best when I'm creating. Do you have another creative outlet?
|
|
|
|
|
Several, but not at work
Hogan
|
|
|
|
|
Only if I'm in VS writing code, which seems to only be about 40% of my time these days. I can't listen to music while researching or designing or in a Teams meeting.
But when I code, I'm listening to prog (classic and new), 60s/70s rock, the occasional Celtic rock LP, a classical/choral work, new age/ambient, or my own works.
Mostly Pink Floyd, Yes, Led Zeppelin, Porcupine Tree, Zappa, Joe Walsh, Peter Gabriel, Frost, Wolfstone, Bach, Mozart, Eno, and hundreds of others.
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
Wow. I'm so impressed by this. Words while crafting in words! I have known folks who could study with rock, but I'm not among them I do wonder though if the viking anthems would be okay - you know, the ones with foreign words.
|
|
|
|
|
I can rarely understand the words when I even pay attention to them, so the language doesn't matter. Can't say I've listened to many Viking anthems, though it sounds intriguing.
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
TNCaver wrote: I can't listen to music while researching or designing or in a Teams meeting
That got me wondering...how would that even work? If you're playing music on external speakers, your mic would pick it up, and make a mess for the other participants. I haven't tried this, but can you pipe music to your headphones that would not be broadcast to everybody else?
|
|
|
|
|
I have my much of my favorite music on my phone, so I'd listen to that using earbuds. Plus I keep my laptop mic muted most of the time in Teams so people don't hear my dog going berserk at the UPS, FedEx and USPS trucks, or my wife chattering at me.
If you think 'goto' is evil, try writing an Assembly program without JMP.
|
|
|
|
|
TNCaver wrote: prog (classic and new)
I just found 3 new prog albums I will be ordering today!
0: Dream Theater - A View from the Top of the World
1: Neil Morse Band - Innocence and Danger
2: Spock's Beard - Noise Floor
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|