|
I can't be the only one that occasionally runs into a situation where I need to produce an awful lot of code before I can test any of it, because it's all interdependent. This often happens when I'm integrating something to an external API that itself is rather complicated, but it can come up in other situations as well. My SVG renderer for example - there are just so many moving interlocking parts that you're standing on a mountain of code before you even get to proof of life.
So if you've ever been in that situation, I imagine you hate it as much as I do.
It's stressful to me. I do not like coding a house of cards, and then having to go back and verify it after the fact. It feels shady. How do you deal with it?
Some kind of process management?
Some clever form of testing I'm not familiar with?
Tai chi?
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
honey the codewitch wrote: I can't be the only one that occasionally runs into a situation where I need to produce an awful lot of code before I can test any of it
Rarely, but it's a PITA and I get pretty stressed. Usually for nothing but occasionally it proves to be a can of worms and I have to go back and try to debug the code, which causes more frustration until I get to the point where I post a stupid question here on CP that makes no sense to anyone but me then I get away from it for a while and behold I figure it out.
If you can't find time to do it right the first time, how are you going to find time to do it again?
PartsBin an Electronics Part Organizer - Release Version 1.4.0 (Many new features) JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
Okay, so basically same as me.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Completely abstract and perhaps not appropriate for your context: The first thought I have is to abstract with immutable objects. But maybe I'm only simply crazy
|
|
|
|
|
I'm trying to wrap my head around how that would work in my present situation, and nope. I am not clever enough to figure out how that would help me.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
I'm pretty sure you are clever enough to solve it finally
|
|
|
|
|
It's my usual way of working, whether coding something big from scratch or making a large change. The benefit is not having to plan stable waypoints that can be tested, which typically involves developing some code that will later disappear. The drawback is anticipating [blecch] several lengthy debug sessions when the code is done.
|
|
|
|
|
I don't have a debugger, so the debug sessions are .. interesting.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
honey the codewitch wrote: Some kind of process management? Yes, with time you get used to it. The stress I mean not the situation itself
If you've ever been mountaineering, it's a bit like descending on unstable pebble stones: you need concentration, speed and skill. When you do it right and you descend in one piece it's very rewarding. If not, it's very painful.
Personally, having done it quite a few times, I don't mind it that much. What I find more annoying is having to tie up all the loose ends that remain behind. After all the high jinks, the mundane cleanup seems dreary but I'm a professional and I know it has to be done.
Mircea
|
|
|
|
|
Preamble
I want to discuss this with you, but I feel like my sentences are going to come out judgy at first since it may sound as if I'm saying that "oh, why don't you just do this?" kind of thing.
So, before I begin discussing this:
1. I want to submit that I too have experienced the kind of thing you are talking about.
2. I'm very interested in solutions that would resolve "producing a mountain of code before you can see it run".
2a. Is there actually a way to resolve the issue of "producing a mountain of code before being able to see it run"? Or, is it just impossible in some cases?
3. I see that you often work "down at the metal" and it may just not be possible to do things in certain languages (assembly). I don't know.
The Discussion
Now, allow me to say some things as I imagine someone saying them to me when I say I'm producing a pile of code that cannot be run until it is all complete.
1. Isn't this exactly what OOP was supposed to do? My phrasing -> Create blackboxes which have a small(est possible) interface (not ui & not Interface (pure abstract class) which is made up of the smallest set of public functions that can provide the behaviors of the Thing (object).
2. This idea is that the complex (mountain of code) is hidden in a black box that very few need to know about. The only way to get to the black box is to use its behaviors via public functions.
Example
I need to draw a rectangle on the screen.
All I need to know is one method
DrawRectangle(Point startPoint, int width, int height)
3. Now, as a developer who is creating the DrawRectangle I can just tell the Users of the DrawRectangle "you will pass in a Point and two integers and it will draw the rectangle.
4. Instead of immediately giving them the working code (mount of code) I tell them, call it with that and it'll simply print to a log file ("I drew your square at point, with width x and height y")
5. Now imagine if you Modeled all of the things in your system and you knew all of their behaviors and you only stubbed out their behaviors? If you really did this, then you could build and run the entire system to see the interactions between the things and see behaviors running at the appropriate times but all it would be doing is logging to a file.
This could mean -- and I'm not sure it is entirely possible -- that you could have the interface & interactions complete and then work on the algorithmic code one piece at a time turning it into "real code" and meanwhile your "mountain of code" kind of runs (mostly writing to log files) and slowly does real functionality in each piece separately.
Is that possible at all? I mean, that's the dream, right?
Is it possible with the technologies (languages, tools, etc.) you are using?
Is it possible in OOP?
This was very long.
|
|
|
|
|
Entered the living room this morning and I immediately noticed the giant splash of water near the back door.
The rain is seeping through the ceiling through a leakage that seems to be about a meter wide
It's been raining for about a month, but never had this problem until last night.
This sucks big time! (not quite the expletives I uttered this morning, but let's keep it civil)
|
|
|
|
|
I know it is not the best answer, but if water only drops from the upper side, be happy.
It could come as a wave through the doors, bringing mood, oil from the crashed cars and many other things (like fecals, dead animals or similars).
We have had the strongest rain week of the last years, the basements of most houses got full of water, a colleague lost his car, another one had to be evacuated... luckily I wasn't directly affected
Damned extreme weather
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Yeah, could be worse, although floods like that don't really happen where I live (well, not since "the disaster" of '53).
We've had the wettest May ever, so it's kind of weird it only started leaking now.
|
|
|
|
|
Luckily no floodings at the Mosel river where we are on holiday at the moment near Traben-Trarbach, also the weather is fine since our arrival last friday.
|
|
|
|
|
Could be worse - if we notice a puddle on the floor somewhere, it's usually one of our cats.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
That was my first thought too.
Not sure how cat going pee pee is worse than a structural defect in your house though
|
|
|
|
|
Cat pee has a really strong smell, and it's very hard to get rid of. I bought a new set of motorcycle waterproofs, and before I got a chance to use them one of our cats managed to pee on the inside. Even jetwashering didn't help - I binned the set and got a new 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!
|
|
|
|
|
Sheesh, I thought you were talking about a memory leak in a program!😳
|
|
|
|
|
i'm sure there's an ointment to help with leakage.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
Oh! You're talking about the roof. Sorry, I thought it was something ... medical. Yeah, we'll go with that.
|
|
|
|
|
Had something similar happen due to a faulty vent on our roof, and near sidewise rain - I live in a really rainy region.
It flooded the INSIDE of our walls and was running through the doorframe of our coat closet. So that was fun.
I don't envy you, because I've been there. I do wish you the best of luck, and I hope it's an easy fix. It was in our case, relatively because we caught it before it did any expensive damage.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
I woke up this morning with lots of water just outside my bedroom window. Then I remembered we are on a cruise ship.
Within you lies the power for good - Use it!
|
|
|
|
|
Why do people go out of their way to answer questions that we know should be in a different forum with people we know abuse the system? Like, what's the impulse to be the sucker? Not really referring to peeps we know who don't do nothing but abuse the system over and over, but to those who blatantly do not care and 100% of their posts is nothing but questions in the lounge.
And sure, we've all done it at times (myself included). And at times I'll attempt to help if there's no forum suited for the query in question that I know of at the time of replying and it's someone I know. Like for instance, Sander just had a networking question and only now do I realize there's a hosting and servers forum. Oops. So, I guess I'm a hypocrite.
But, we know Sander and know he's not intentionally breaking the rules. Can't say that for some in the lounge (won't mention his name). So, why? Surely, doing nothing but answering tech questions to people exploiting this fact is not a dev's idea of being "social"?
Jeremy Falcon
modified 10hrs 20mins ago.
|
|
|
|
|
Not to mention there is still someone trying to answer his questions in appropriate forums...
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
I think it's partly because folks know their post will be seen pretty much immediately in The Lounge.
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
|
|
|
|