What is the largest amount of code you added before testing/running anything?
-
@Gąska said in What is the largest amount of code you added before testing/running anything?:
80 proof
You're quoting yourself there. However, lemme see if that accidental strengthening is valid...
Oh, it definitely is. The joke would not have crossed a particular semantic divide towards accessibility without it. It was needed in order to clearly bridge ABV and completeness.
-
@MrL said in What is the largest amount of code you added before testing/running anything?:
Thousands of lines. I do it regularly.
Write all I have to write, whole feature, whole library, etc. Then test.
So . . . you work for Microsoft?
Oh wait. Sorry. That's wrong. Microsoft doesn't test.
-
@Gribnit said in What is the largest amount of code you added before testing/running anything?:
@Gąska said in What is the largest amount of code you added before testing/running anything?:
80 proof
You're quoting yourself there.
Yes, I realize that. I'm confused by your reply to my post, the one quoted here.
However, lemme see if that accidental strengthening is valid...
Oh, it definitely is. The joke would not have crossed a particular semantic divide towards accessibility without it. It was needed in order to clearly bridge ABV and completeness.
And this is exactly why I didn't want to hear an explanation from you.
-
@Zecc said in What is the largest amount of code you added before testing/running anything?:
This has happened to me a couple of times: I write a whole new module. I run. Nothing happens, or it behaves as before.
Oops, forgot to add an actual call to the new code! Add it. Runs perfectly.*Working with a static language and syntax highlighting helps a ton. Reviewing the code before the first run also helps.
*If you look at it , all bugs are a variant of this "you didn't run what you were supposed to".
I've made this bug today...
SomeObject ReturnObjectIfInputParametersAreCorrect(/* lots of arguments */) { try { if (/* fails to pass hairy-yet-straightforward validation logic */) { // Return null as per method's contract return null; } SomeObject result = new SomeObject(); // fill in all appropriate properties of result // forget to return result at the end :facepalm: } catch(Exception e){ // Intentionally ignore invalid input } return null; }
... twice.
-
@PotatoEngineer said in What is the largest amount of code you added before testing/running anything?:
The question is whether the time I spend debugging at the end of a long coding session is bigger or smaller than the sum of the time spent on the smaller debugging sessions if I debugged-as-I-went.
That's not the only question; there's also the question of which approach catches the largest proportion of bugs. There's at least one class of bugs that's almost impossible to detect using your methodology, which is broken error-handling logic in some function that, right now, doesn't ever get called with error-triggering input. Like
try: do_something_that_currently_never_fails_but_might_do_in_future() except SomeExceptionThatWillNotCurrentlyBeRaisedButWillBeWhenIRefactorThisSoon: do_some_obviously_stupid_shit_that_will_crash_my_whole_program()
I always miss that shit.
-
@Cabbage said in What is the largest amount of code you added before testing/running anything?:
I always miss that shit.
You also need to retake your function and object naming class. Ew.
-
@Zecc Another favorite of mine, btw, is doing the right function calls but forgetting to assign the result to the right variables.
-
I just finished writing 967 lines of SQL without testing until just now.
The cursory (i.e. expected, nobody doing shenanigans) testing I just did seems to indicate it's all working correctly (in that, I successfully started a trade between two players, added an item from both player's inventories, had both players mark acceptance, and completed the trade, all without error).Granted, I modeled it after the purchasing transaction functions already existing, but very little code was shared from those procedures in the end...
-
I'm currently at 1,328 lines of C++ code for this Arduino project, I've asked someone who actually has the model we're using to upload and test the first module.
Compiles fine, now let's see where my logic will be denied.And that's just running three modules (Serial, GPIO, and Automation) that does the work equivalent of a hard-coded 148-line code file.
I have a lot of faith in my awesomeness, we'll see what happens tomorrow.
-
Quite a bit actually, don't have a line count (mid-hundreds to thousand+) but it was many days of work..... Of course this was back in the days of punch cards, long waits to get a job run, cost back charges that could run into the thousands (when I netted under $100/wk).....
-
@TheCPUWizard said in What is the largest amount of code you added before testing/running anything?:
(when I netted under $100/wk)
Due to inflation conversion that's basically $500/wk in today's money, right?
-
@Tsaukpaetra said in What is the largest amount of code you added before testing/running anything?:
@TheCPUWizard said in What is the largest amount of code you added before testing/running anything?:
(when I netted under $100/wk)
Due to inflation conversion that's basically $500/wk in today's money, right?
That would be a reasonable ballpark, but largely irrelevant. The point was "Back in the day" a single hour at the computer was considered more valuable than a week of manual calculations in many cases. Now, time at the computer (in most cases) is free. The means of developing software under these diverse circumstances is naturally very different.
-
Having continued to receive no direction, I decided to pick up a task in the "would be nice to have" pile and see about implementing it.
The task is to create a utility which reads the content of an S3 bucket (filtering on a prefix for some relevant sub-portion of the objects stored therein), then determine the first order of sub-objects categories ("folders"), and for each of these categories find the highest-numbered "sub folder", then inside that drill down the (hopefully singular) path to the (hopefully single) object in the psuedo sub-folder. Then download and extract them into their respective category folders.
I.e. given a folder structure like:
Bucket/
- category A
-- 2
---- A
------ published 2.zip
-- 29
---- A
------ published 29.zip
-- 192
---- A
------ published 192.zip
... ... - category B
-- 41
---- B
------ published 41.zip
... ... etc
download the published 192.zip from category A and extract into the A folder, and published 41.zip from category B and extract into the B folder.
I haven't gotten very far into the coding, just included the S3 nugget package and two classes that count to about 150 lines. Thus far said code should (in theory) handle the bucket listing and sifting into the top-level subcategories into a list of objects that hold that information for presentation in the UI.
- category A
-
@Tsaukpaetra said in What is the largest amount of code you added before testing/running anything?:
Thus far said code should (in theory) handle the bucket listing and sifting into the top-level subcategories into a list of objects that hold that information for presentation in the UI.
Okay, I couldn't help myself and pushed the Run button.
It... works? Except the dropdown boxes aren't showing the correct value for some reason. They do if you enter the row, but not on first present.
And asking the DataGridView to
.Refresh()
itself doesn't work either.
-
@Tsaukpaetra gonna assume nothing shows up in the unit tests
-
@Gribnit said in What is the largest amount of code you added before testing/running anything?:
@Tsaukpaetra gonna assume nothing shows up in the unit tests
What's a you-nit test?
-
@Tsaukpaetra like my tests except you write them
-
@Tsaukpaetra said in What is the largest amount of code you added before testing/running anything?:
What's a you-nit test?
A test was run and it found that I don't knit.