Software Development forces you to become a pessimist..
-
I wrote an Arduino program last night that worked first time. No unit tests required. Just keep writing perfect code and you'll never need to do another unit test, ever! :-D
Unit testing for Arduino? That would take all the fun out of tinkering ;p
-
I have worked enough years as a software developer to know that what can go wrong usually does go wrong. This usually compels me to unit test each small component as I develop. Today, I felt a bit reckless and wrote a stored procedure, data class, other business logic and the UI without testing. Ran it, expecting to find logical errors, and voila! Everything runs as expected! I become highly suspicious - "This was not supposed to happen! How and why did it work? Surely there is still something not quite right." I think that was a bit too optimistic (and adventurous) for my comfort. Now I am back to tediously testing each small component..
A Pessimist
It's been observed that developers need a weird psychological build: pessimistic as in expecting the worst, and most unlikely outcomes, yet with the strength to withstand a permanent stream of tiny frustrations beyond their control. That strength usually requires optimism.
FILETIME to time_t
| FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy -
leppie wrote:
I think you found out that it is unit testing that makes you pessimistic
And User Acceptance Testing makes you either homicidal or suicidal, or a mixture of both.
Every man can tell how many goats or sheep he possesses, but not how many friends. Shed Petition[^]
Do you remember the scene at the end of Serenity[^], where River says "My turn!" and leaps through the closing hatch, http://www.youtube.com/watch?v=nAzZoU9tOeY[^]? That's what happens when I get involved with User Acceptance Testing.
Software Zen:
delete this;
-
Unit testing for Arduino? That would take all the fun out of tinkering ;p
Indeed. :)
-
I'm always astonished when a medium sized SP works the first time, simple ones I expect but the more complex ones I expect to have to work on. I use a custom code generator and am continually surprised when I paste the code into the DAL and it works right off.
Never underestimate the power of human stupidity RAH
-
Mycroft Holmes wrote:
I use a custom code generator and am continually surprised when I paste the code into the DAL and it works right off.
Why not generate the DAL? Why not generate the unit tests for the DAL?
jschell wrote:
Why not generate the DAL
I do, but there are always additional methods to be added in after the initial generation and these need to C&P in from the generator.
Never underestimate the power of human stupidity RAH
-
Indeed. :)
Which is the only reason for the Adrino
-
I have worked enough years as a software developer to know that what can go wrong usually does go wrong. This usually compels me to unit test each small component as I develop. Today, I felt a bit reckless and wrote a stored procedure, data class, other business logic and the UI without testing. Ran it, expecting to find logical errors, and voila! Everything runs as expected! I become highly suspicious - "This was not supposed to happen! How and why did it work? Surely there is still something not quite right." I think that was a bit too optimistic (and adventurous) for my comfort. Now I am back to tediously testing each small component..
A Pessimist
I'm not sure it's pessimism, exactly. I think pessimism is, "we're screwed and we'll never find a way out." I think what you're describing sounds like thorough development. "Hmm, the standard case works the first time. Now, what about non-standard cases?" Nice job on keeping after it.
-
I have worked enough years as a software developer to know that what can go wrong usually does go wrong. This usually compels me to unit test each small component as I develop. Today, I felt a bit reckless and wrote a stored procedure, data class, other business logic and the UI without testing. Ran it, expecting to find logical errors, and voila! Everything runs as expected! I become highly suspicious - "This was not supposed to happen! How and why did it work? Surely there is still something not quite right." I think that was a bit too optimistic (and adventurous) for my comfort. Now I am back to tediously testing each small component..
A Pessimist
Not pessimism; experience. You're seeing all the rocks and shoals, but it's for the purpose of steering a safe course to your goal. I too am mildly superstitious when a big chunk of code works (or even compiles) first time. Perhaps the discipline involved in writing testable code improves the odds of untested code working. Yeah, that's it.
-
I wrote an Arduino program last night that worked first time. No unit tests required. Just keep writing perfect code and you'll never need to do another unit test, ever! :-D
I haven't used it yet, but a friend pointed me to arduinounit[^].
-
I have worked enough years as a software developer to know that what can go wrong usually does go wrong. This usually compels me to unit test each small component as I develop. Today, I felt a bit reckless and wrote a stored procedure, data class, other business logic and the UI without testing. Ran it, expecting to find logical errors, and voila! Everything runs as expected! I become highly suspicious - "This was not supposed to happen! How and why did it work? Surely there is still something not quite right." I think that was a bit too optimistic (and adventurous) for my comfort. Now I am back to tediously testing each small component..
A Pessimist
Finally you have earned a degree of mastery that will let you throw your old clumsy tools and be one with your code, don't deny what you have won and deliver yourself to this moment... :laugh:
CEO at: - Rafaga Systems - Para Facturas - Modern Components for the moment...
-
I have worked enough years as a software developer to know that what can go wrong usually does go wrong. This usually compels me to unit test each small component as I develop. Today, I felt a bit reckless and wrote a stored procedure, data class, other business logic and the UI without testing. Ran it, expecting to find logical errors, and voila! Everything runs as expected! I become highly suspicious - "This was not supposed to happen! How and why did it work? Surely there is still something not quite right." I think that was a bit too optimistic (and adventurous) for my comfort. Now I am back to tediously testing each small component..
A Pessimist
Unit tests are great, especially for important logic, but we all coded for years before unit tests were en vogue and not all of the code was bad. If you are a competent developer working within your area of expertise on something of moderate scale the logic _should_ work the first time you write it, or with minimal fiddling. Unit tests don't add much to this scenario in the short term. The value of the unit tests in this scenario would be for other developers or yourself making changes to this logic or logic that integrates with it later on, doing refactors, ensuring any invariants / requirements are met / enforced, and so forth. For me, while unit tests have some value all the time, they offer the most value when I'm doing something exploratory, working out API's for libraries, writing low level logic that other logic will depend on, when working on teams, when I fully intend to write the initial logic and throw it over the wall to others, and so forth.
-
jschell wrote:
Why not generate the DAL
I do, but there are always additional methods to be added in after the initial generation and these need to C&P in from the generator.
Never underestimate the power of human stupidity RAH
Mycroft Holmes wrote:
I do, but there are always additional methods to be added in after the initial generation and these need to C&P in from the generator.
Sounds like the generator could use some additional work then. Perhaps it should generate helper classes. Or perhaps use a two layer DAL via partial classes. (Should note that I have been creating custom code generators for more than 15 years and most of the time those are DALs and associated code.