Skip to content

Debug msgs - #299

Draft
andrewbird wants to merge 6 commits into
dosemu2:masterfrom
andrewbird:debug-msgs
Draft

Debug msgs#299
andrewbird wants to merge 6 commits into
dosemu2:masterfrom
andrewbird:debug-msgs

Conversation

@andrewbird

@andrewbird andrewbird commented Jul 5, 2026

Copy link
Copy Markdown
Member

1/ Some changes to make the debugging to dosemu logging compile after enabling lots of DEBUG_* defines.
2/ Tidy up some of the messages now that the logging function prefixes every write.
3/ Tweak the CI to collect and archive any failure logs that may occur.

Comment thread kernel/nls.c Outdated
Comment thread kernel/nls.c Outdated
Comment thread kernel/newstuff.c
Comment thread fdpp/thunks.cc Outdated
{
fdpp->print(FDPP_PRINT_LOG, format, vl);
if (format[0] == '@')
fdpp->print(FDPP_PRINT_LOG_NOPREFIX, format + 1, vl);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just add flag, shift it to
16 to not clash with the value.

f_node's f_count field was removed back in 2009 (bfdad2a),
so remove its use from debug message and the corresponding text.
1/ Fix up the FAR string printing.
   Need to use standard format specifiers and convert args to be
   compatible.
2/ Fix up type width format specifiers.
Now that DebugPrintf are prefixed with "fdpp: " we need to prefix those
that should be appended.

Was:
=====
fdpp: SUBSTing from: C:\
fdpp: NLS: DosUpFMem(): len=11, f997:03c0="fdpp: \fdpp: Tfdpp: Efdpp: Sfdpp: Tfdpp: Ifdpp: Tfdpp: .fdpp: Bfdpp: Afdpp: Tfdpp: "
fdpp: NLS: nlsFUpMem()
fdpp: NLS: upMMem(): len=11, f997:03c0="fdpp: \fdpp: Tfdpp: Efdpp: Sfdpp: Tfdpp: Ifdpp: Tfdpp: .fdpp: Bfdpp: Afdpp: Tfdpp: "
fdpp: NLS: upMMem(): result="fdpp: \fdpp: Tfdpp: Efdpp: Sfdpp: Tfdpp: Ifdpp: Tfdpp: .fdpp: Bfdpp: Afdpp: Tfdpp: "

Now:
=====
fdpp: SUBSTing from: C:\
fdpp: NLS: DosUpFMem(): len=11, f997:03c0="\TESTIT.BAT"
fdpp: NLS: nlsFUpMem()
fdpp: NLS: upMMem(): len=11, f997:03c0="\TESTIT.BAT"
fdpp: NLS: upMMem(): result="\TESTIT.BAT"
@andrewbird

Copy link
Copy Markdown
Member Author

I have a crash in truename at adjust_far() once I enable the debugging. The trigger is a super long argument (128 chars) which actually was unnecessary so I have removed it in my dosemu branch. Not sure whether it's important, after all it's a ridiculous size, but I thought I'd mention it.

Comment thread fdpp/thunks.cc
va_list vl;
int prio = FDPP_PRINT_LOG;

if (strcmp("%s", format) == 0) { // The string has been preformatted and we

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be reasonable
to demand @ in a format string
itself. I'd like to avoid va_arg() here.

@stsp

stsp commented Jul 7, 2026

Copy link
Copy Markdown
Member

*** stack smashing detected ***: terminated
Wow! Can you provide a minimal
reproducer? I suppose maybe some
buffer overflow on vsprintf(), so maybe
you can also find it yourself. :)

@andrewbird

Copy link
Copy Markdown
Member Author

I suppose maybe some
buffer overflow on vsprintf(), so maybe
you can also find it yourself. :)

I already looked for a couple of hours, but my lack of C++ knowledge stops me from finding anything other than it occurs in the call adjust_far() in truename.

Wow! Can you provide a minimal
reproducer?

1/ Yes, use dosemu devel (still has the excessively long and unnecessary argument in the batch file testit.bat), with fdpp of this branch at c71328b (which is compilation fixes, and turning on of all DEBUG options, but none of my '@' shenanigans).
2/ Setup test as
env NO_TESTRUN=1 test/test_dosemu.py PPDOSGITTestCase.test_mfs_sfn_file_read.
3/ Run dosemu as
Start dosemu as whatever the above printed, but in my case I renamed the log file
bin/dosemu -f /tmp/test-imagedir/dosemu.conf -n -q -o crash.log -td --Fimagedir /tmp/test-imagedir
4/ Run test batchfile as is, but note the crash only occurs with set LFN=n
C:\>testit

Here's mine.

ajb@calypso:/clients/common/dosemu2.git$ bin/dosemu -f /tmp/test-imagedir/dosemu.conf -n -q -o crash.log -td --Fimagedir /tmp/test-imagedir
FDPP kernel 1.7 [GIT: 1.10-66-gc71328b8]
Kernel compatibility 7.10 - clang - FAT32 support

Written by @stsp, FDPP project.
Based on FreeDOS sources (C) Pasquale J. Villani and The FreeDOS Project.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

C: HD1, Pri[ 1], CHS=    0-1-1, start=     0 MB, size=    10 MB
D: HD2, Pri[ 1], CHS=    0-1-1, start=     0 MB, size=    10 MB
E: HD3, Pri[ 1], CHS=    0-1-1, start=     0 MB, size=  2000 MB
F: HD4, Pri[ 1], CHS=    0-1-1, start=     0 MB, size=  2000 MB
G: HD5, Pri[ 1], CHS=    0-1-1, start=     0 MB, size=  2000 MB
EMUFS host file and print access, non-resident driver mode                     
dosemu XMS 3.0 & UMB support enabled
dosemu EMS driver rev 0.9 installed.
dosemu CDROM driver installed (V0.2)
Process 0 starting: F:\command.com /e:384 /p /k %FDPP_AUTOEXEC% /M2
"Warning: USERDRV not set"

FreeDOS userspace tools can be installed with: insfdusr

BLASTER=A220 I5 D1 H5 P300 T6
MIDI=SYNTH:2 MAP:E MODE:0
Welcome to dosemu2!
    Build 2.0pre9-dev-20260706-4798-g5811247aa
Interactive Prompt!
C:\>testit
testit
C:\>set LFN=n
C:\>d:
D:\>c:\mfsread shrtname.txt FfaaE90dDC39F9C30Db4Ea75EbA420B1cB1DaEaedB89Cf51E3FA4B461878290EeCC0f42cd6e96fCBD6c66350edCc3054e04eB177eF1CDF7bf2D4e45D36225D28
Segmentation fault (Address not mapped to object [0x727e000a293a])
Terminated with signal 11

@stsp

stsp commented Jul 7, 2026

Copy link
Copy Markdown
Member
This commit does not belong to any branch on this repository, and may belong to a fork outside
of the repository.

to start with.

Why is this a minimal reproducer?
Minimal reproducer is:

  • change this file this way
  • run dosemu as usual
  • observe its crashing

@stsp

stsp commented Jul 7, 2026

Copy link
Copy Markdown
Member

I suppose you meant this link:
andrewbird@c71328b

@stsp

stsp commented Jul 7, 2026

Copy link
Copy Markdown
Member
$ bin/dosemu -f /tmp/test-imagedir/dosemu.conf -n -q -o crash.log -td --Fimagedir /tmp/test-imagedir
ERROR: --Fimagedir: /tmp/test-imagedir does not exist
ERROR: /tmp/test-imagedir/dosemu.conf is missing

@andrewbird

Copy link
Copy Markdown
Member Author

You didn't set up the like the instructions said
env NO_TESTRUN=1 test/test_dosemu.py PPDOSGITTestCase.test_mfs_sfn_file_read

@andrewbird

Copy link
Copy Markdown
Member Author

or more likely you did but didn't use the command it printed (what you posted looks like mine)

@stsp

stsp commented Jul 7, 2026

Copy link
Copy Markdown
Member

The problem is that _vsnprintf()
applies size to fmt argument,
i.e. it counts chars consumed,
not chars outputted. So %s is
counted like 1 char, which results
in overflow. Given that this code
is a pure crap, it uses a lot of global
vars and small buffers like
BYTE s[11], I don't see a quick fix.
Maybe the only reasonable thing
to do is to port from musl, but
you'll need to add a few things
there, like %P.
So will you work on that?

@andrewbird

Copy link
Copy Markdown
Member Author

Are you set on musl it looked quite complicated to extract the salient part? I looked for an alternative, this popped up https://github.com/nothings/stb/blob/master/stb_sprintf.h license is MIT or Public Domain.

@stsp

stsp commented Jul 7, 2026

Copy link
Copy Markdown
Member

I am not set for musl by
any means, but public domain?
I simply don't know.
If you show me some document
which says its fine for gpl projects -
then likely ok...

@andrewbird

Copy link
Copy Markdown
Member Author

No, it's Public Domain OR MIT, the user gets to choose which he wants to follow.

@stsp

stsp commented Jul 7, 2026

Copy link
Copy Markdown
Member

That is written in the end, and
not in the beginning...
Anyway, I haven't heard anything.
I'll just see MIT in your patch
(at the beginning!), and fare well.

@andrewbird

Copy link
Copy Markdown
Member Author

@stsp

stsp commented Jul 7, 2026

Copy link
Copy Markdown
Member

Ok, choose MIT and remove
the rest then.

@andrewbird

Copy link
Copy Markdown
Member Author

Will the new vsnprintf need to be in the kernel C code or in the C++ part?

@stsp

stsp commented Jul 7, 2026

Copy link
Copy Markdown
Member

Just replace the buggy prf.c.

@andrewbird

Copy link
Copy Markdown
Member Author

Can you tell me what implementation of put_console() is used for fdpp, it's all ordered and not obvious which was built in the old pdf.?. also do I need to implement hexd, there's only one use of it outside of per.c?

@stsp

stsp commented Jul 8, 2026

Copy link
Copy Markdown
Member

As surprising as it may seem,
not the one under #ifdef DOSEMU. :)

  iregs r = {};
  r.a.b.l = c;
  call_intr(0x29, MK_FAR_SCP(r));

I am pretty sure this one: MK_FAR_SCP()
is what only fdpp does.

hexd() - just copy/paste it?
It doesn't need in the same file
with printf's.

@andrewbird

Copy link
Copy Markdown
Member Author

I made a draft PR that seems to work #300, but I wonder if there's some way that _sprintf() could do the GET_PTR/GET_FP32 translation instead of them being splattered all over the source?

@stsp

stsp commented Jul 9, 2026 via email

Copy link
Copy Markdown
Member

@stsp

stsp commented Jul 9, 2026 via email

Copy link
Copy Markdown
Member

@andrewbird

Copy link
Copy Markdown
Member Author

Google gave me some hints on what to experiment with to implement GET_PTR() / GET_FP32() conversions outside of the kernel (for a later PR if successful). If I want to implement _sprintf() etc as C++ using templates and concepts I guess I'll need to put it in a separate .cpp file somewhere. Would that live in fdpp directory alongside farptr.*?

@andrewbird
andrewbird marked this pull request as draft July 9, 2026 16:49
@stsp

stsp commented Jul 9, 2026

Copy link
Copy Markdown
Member

Yes, you can put it into fdpp,
but I don't think this strategy
(unpacking automatically, then
pass) will ever work. Try it, but
I am very sceptical.

@andrewbird

Copy link
Copy Markdown
Member Author

I don't think it will work either, certainly not in a portable fashion.

@stsp

stsp commented Jul 9, 2026

Copy link
Copy Markdown
Member

Hmm... Actually there is a way.
You just need to extend the mkfar.sh
script with this:
https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-std-print.html

@stsp

stsp commented Jul 9, 2026

Copy link
Copy Markdown
Member

And I really think that's worth doing,
as that will get us closer to the better
gcc port. gcc is weak on formats, so
we can use that helper.

@andrewbird

Copy link
Copy Markdown
Member Author

My clang-tidy (v18) on Noble doesn't seem to have that option, so I guess it can't be part of the build yet.

@stsp

stsp commented Jul 9, 2026

Copy link
Copy Markdown
Member

Are you sure?
AI says it needs clang-17, and
is available in Noble.

@andrewbird

Copy link
Copy Markdown
Member Author

I was expecting to see the option when the usage as displayed. However doing clang-tidy --list-checks -checks=\* does show it.

@andrewbird

Copy link
Copy Markdown
Member Author

I woke up this morning and wondered if we could process the Dos C files with coccinelle to do the replacements. But to be honest I don't really understand the syntax and was pretty sure it couldn't handle variadic replacements. Any way Google's suggestion was to process it with python using tree sitter. That turned out to be non starter, but plain python seems to work okay. How do you feel about AI generated stuff? I have it converting a file dosfns.c lifted straight from FreeDOS kernel to something that looks like it did the right thing. I have a deep feeling of dissatisfaction, while the tool does what I asked, I don't feel like I wrote it, only guided the AI. So where's the fun in that?

Anyway, here's a sample of its output

$ python3 fix_printf10.py mytest.c mytest.cpp


$ diff -surN mytest.c mytest.cpp 
--- mytest.c	2026-07-10 10:18:51.408344281 +0100
+++ mytest.cpp	2026-07-10 10:41:53.024348288 +0100
@@ -539,19 +539,19 @@
   sftp->sft_attrib = attrib = attrib | D_ARCHIVE;
 
   /* check for a (local) device */
-  DebugPrintf(("result for %Fs is %s%s%s%s",fname,(result & IS_DEVICE)?"device ":"X",(result & IS_NETWORK)?"network ":"N",(dhp = IsDevice(fname)) != NULL?"IsDevice!=NULL ":"="));
+  DebugPrintf(("result for %s is %s%s%s%s",GET_PTR(fname),(result & IS_DEVICE)?"device ":"X",(result & IS_NETWORK)?"network ":"N",(dhp = IsDevice(fname)) != NULL?"IsDevice!=NULL ":"="));
 
   /* same line just different formatting */
-  DebugPrintf(("result for %Fs is %s%s%s%s",
-        fname,
+  DebugPrintf(("result for %s is %s%s%s%s",
+        GET_PTR(fname),
         (result & IS_DEVICE)?"device ":"X",
         (result & IS_NETWORK)?"network ":"N",
         (dhp = IsDevice(fname)) != NULL?"IsDevice!=NULL ":"="));
 
   /* another line with %P */
-  DebugPrintf(("result for %Fs is %P\n",
-        fname,
-        fname));
+  DebugPrintf(("result for %s is %P\n",
+        GET_PTR(fname),
+        GET_FP32(fname)));
 
   if ((result & IS_DEVICE) && !(result & IS_NETWORK) && (dhp = IsDevice(fname)) != NULL)
   {
@@ -1004,7 +1004,7 @@
   COUNT result;
 
 #if defined(CHDIR_DEBUG)
-  DebugPrintf(("DosChangeDir: %Fs\n", s));
+  DebugPrintf(("DosChangeDir: %s\n", GET_PTR(s)));
 #endif
   result = truename(s, PriPathName, CDS_MODE_CHECK_DEV_PATH);
   if (result < SUCCESS)
@@ -1022,14 +1022,14 @@
     return DE_PATHNOTFND;
 
 #if defined(CHDIR_DEBUG)
-  DebugPrintf(("Remote Chdir: n='%Fs' p='%s\n", s, PriPathName));
+  DebugPrintf(("Remote Chdir: n='%s' p='%s\n", GET_PTR(s), PriPathName));
 #endif
   /* now get fs to change to new          */
   /* directory                            */
   result = (result & IS_NETWORK ? network_redirector(REM_CHDIR) :
             dos_cd(PriPathName));
 #if defined(CHDIR_DEBUG)
-  DebugPrintf(("status = %04x, new_path='%Fs'\n", result, current_ldt->cdsCurrentPath));
+  DebugPrintf(("status = %04x, new_path='%s'\n", result, GET_PTR(current_ldt->cdsCurrentPath)));
 #endif
   /* on error result should be negative, on success for network call value
      should be ignored as some redirectors e.g. Lantastic return count on success */
@@ -1071,7 +1071,7 @@
   int rc;
   register dmatch FAR *dmp = dta;
 
-  DebugPrintf(("DosFindFirst(%Fs, 0x%04x)\n", name, attr));
+  DebugPrintf(("DosFindFirst(%s, 0x%04x)\n", GET_PTR(name), attr));
   rc = truename(name, PriPathName,
                 CDS_MODE_CHECK_DEV_PATH | CDS_MODE_ALLOW_WILDCARDS);
   if (rc < SUCCESS)
@@ -1090,7 +1090,7 @@
   SAttr = (BYTE) attr;
 
 #if defined(FIND_DEBUG)
-  DebugPrintf(("Remote Find: n='%Fs\n", PriPathName));
+  DebugPrintf(("Remote Find: n='%s\n", GET_PTR(PriPathName)));
 #endif
 
   dta = &sda_tmp_dm;

And the python

import sys
import re

# Combined transformation configuration map
TRANSFORMS_MAP = {
    'Fs': {
        'wrapper': 'GET_PTR',
        'replacement': 's'
    },
    'P': {
        'wrapper': 'GET_FP32',
        'replacement': None  # Change to a string if you need to mutate %P -> %p
    }
}

# Borland + Standard Function Index Map
FORMAT_INDEX_MAP = {
    'printf': 0, 'fprintf': 1, 'sprintf': 1, 'snprintf': 2,
    'cprintf': 0, 'wprintf': 0, 'fwprintf': 1, 'swprintf': 1,
    'DebugPrintf': 0
}

FUNC_PATTERN = re.compile(rf"\b({'|'.join(FORMAT_INDEX_MAP.keys())})\s*\(", re.MULTILINE)

def extract_balanced_args_with_positions(text, start_pos):
    """
    Steps through characters starting at an open parenthesis.
    Returns a list of tuples containing: (arg_text, global_start_idx, global_end_idx).
    Preserves all internal whitespace, tabs, and newlines exactly.
    """
    args = []
    current_arg = []
    paren_depth = 0
    in_string = False
    escape = False
    
    arg_start = start_pos + 1
    i = start_pos
    
    while i < len(text):
        char = text[i]
        
        if in_string:
            current_arg.append(char)
            if escape:
                escape = False
            elif char == '\\':
                escape = True
            elif char == '"':
                in_string = False
        else:
            if char == '"':
                in_string = True
                current_arg.append(char)
            elif char == '(':
                paren_depth += 1
                if paren_depth > 1:
                    current_arg.append(char)
            elif char == ')':
                paren_depth -= 1
                if paren_depth == 0:
                    if current_arg or len(args) > 0:
                        args.append(("".join(current_arg), arg_start, i))
                    return i + 1, args
                current_arg.append(char)
            elif char == ',' and paren_depth == 1:
                args.append(("".join(current_arg), arg_start, i))
                current_arg = []
                arg_start = i + 1
            else:
                current_arg.append(char)
        i += 1
    return -1, []

def process_file(input_path, output_path):
    with open(input_path, 'r', encoding='utf-8', errors='ignore') as f:
        source_code = f.read()

    has_errors = False
    modifications = []
    pos = 0
    
    while True:
        match = FUNC_PATTERN.search(source_code, pos)
        if not match:
            break
            
        func_name = match.group(1)
        func_start = match.start()
        open_paren_pos = match.end() - 1
        
        end_pos, args = extract_balanced_args_with_positions(source_code, open_paren_pos)
        
        if end_pos == -1 or not args:
            pos = match.end()
            continue

        # Double-parentheses macro unpacking layer
        if len(args) == 1 and args[0][0].strip().startswith('(') and args[0][0].strip().endswith(')'):
            inner_text_raw, inner_start, inner_end = args[0]
            first_paren = inner_text_raw.find('(')
            _, inner_args = extract_balanced_args_with_positions(inner_text_raw, first_paren)
            if inner_args:
                args = [(txt, inner_start + s, inner_start + e) for txt, s, e in inner_args]

        fmt_index = FORMAT_INDEX_MAP[func_name]
        if fmt_index >= len(args):
            pos = end_pos
            continue

        fmt_arg_text, fmt_start, fmt_end = args[fmt_index]
        fmt_arg_stripped = fmt_arg_text.strip()
        
        if not (fmt_arg_stripped.startswith('"') and fmt_arg_stripped.endswith('"')):
            pos = end_pos
            continue

        fmt_str = fmt_arg_stripped[1:-1]
        
        specifier_pattern = re.compile(r'%(?:%|[0-9.+\-*#lhzj]*[a-zA-Z]+)')
        specifiers = [t for t in specifier_pattern.findall(fmt_str) if t != '%%']
        vargs = args[fmt_index + 1:]

        updated_fmt_str = fmt_str
        format_string_modified = False

        for i, spec in enumerate(specifiers):
            if i >= len(vargs):
                break
                
            arg_text, arg_start, arg_end = vargs[i]
            arg_stripped = arg_text.strip()
            
            # Identify if this specifier matches any configured token keys
            target_token = next((token for token in TRANSFORMS_MAP if token in spec), None)
            
            if target_token:
                # ENFORCED POLICY ERROR: Fail build if un-casted macros or functions sit in the target area
                if '(' in arg_stripped and not re.match(r'^\s*\([^)]+\)\s*[a-zA-Z_]', arg_stripped):
                    line_no = source_code.count('\n', 0, func_start) + 1
                    print(f"Error: [{input_path}:{line_no}] Found restricted macro/function call '{arg_stripped}' inside {func_name}.", file=sys.stderr)
                    has_errors = True
                    continue

                transform_config = TRANSFORMS_MAP[target_token]
                wrapper = transform_config['wrapper']
                replacement = transform_config['replacement']

                # Wrap the text chunk while safely preserving leading and trailing spaces
                leading_spaces = arg_text[:len(arg_text)-len(arg_text.lstrip())]
                trailing_spaces = arg_text[len(arg_text.rstrip()):]
                
                wrapped_arg_text = f"{leading_spaces}{wrapper}({arg_stripped}){trailing_spaces}"
                modifications.append((arg_start, arg_end, wrapped_arg_text))
                
                # Check if the string literal specifier itself needs editing
                if replacement is not None:
                    replaced_spec = spec.replace(target_token, replacement)
                    updated_fmt_str = updated_fmt_str.replace(spec, replaced_spec, 1)
                    format_string_modified = True

        if format_string_modified and not has_errors:
            leading_fmt_spaces = fmt_arg_text[:len(fmt_arg_text)-len(fmt_arg_text.lstrip())]
            trailing_fmt_spaces = fmt_arg_text[len(fmt_arg_text.rstrip()):]
            
            new_fmt_arg_text = f'{leading_fmt_spaces}"{updated_fmt_str}"{trailing_fmt_spaces}'
            modifications.append((fmt_start, fmt_end, new_fmt_arg_text))
            
        pos = end_pos

    if has_errors:
        sys.exit(1)

    modifications.sort(key=lambda x: x[0], reverse=True)
    
    mutable_source = list(source_code)
    for start, end, new_text in modifications:
        mutable_source[start:end] = list(new_text)

    with open(output_path, 'w', encoding='utf-8') as f:
        f.write("".join(mutable_source))

if __name__ == "__main__":
    if len(sys.argv) < 3:
        print("Usage: python fix_printf.py <input.c> <output.cpp>")
        sys.exit(1)
    process_file(sys.argv[1], sys.argv[2])

@stsp

stsp commented Jul 10, 2026

Copy link
Copy Markdown
Member

So why not to use clang-tidy, why
something else was needed? Anyway,
if you can review your AI code, then
I don't know why it can't be applied.

@stsp

stsp commented Jul 10, 2026

Copy link
Copy Markdown
Member

... why it can't be applied, correction.

@andrewbird

Copy link
Copy Markdown
Member Author

Sure, it doesn't look particularly frightening to review, and it looks like it will achieve the goal. I know I don't write the toolchain tools, so I shouldn't be bothered, but AI gifted code is unsatisfying especially now it's getting better. I guess I should stop asking it questions...

I'll investigate clang-tidy though first.

@stsp

stsp commented Jul 10, 2026

Copy link
Copy Markdown
Member

but AI gifted code is unsatisfying especially now it's getting better. I guess I should stop asking it
questions...

I don't understand what you say.
If AI helps solving the task quickly
(you of course need to add the time
needed to review its code), then
you need to use it. For me, it helps
a lot to just discuss things with AI.
So instead of asking it "how", you
can try asking "why not this way".
This is similar to code review. When
you open some PR, you basically also
asking the reviewer "why not this way".

@andrewbird

Copy link
Copy Markdown
Member Author

Yes, asking AI questions is how these things get started for me. If I were talking to a human reviewer I wouldn't expect or desire for an initial code snippet to get fleshed out into a working solution. I need to learn to stop asking follow up questions, and if that code snippet doesn't compile, just accept it, figure out what and fix it myself.

I think it can be laziness on my part, what the AI doesn't understand is that for me the goal is not the fix but the process. Handing me a turnkey solution may solve the task at hand, but is not enjoyable for me and in the end the goal was not met.

I know this is coming across as an ungrateful rant, I'm sorry that's the case, and I'm sure it's a 'me' problem.

@stsp

stsp commented Jul 10, 2026

Copy link
Copy Markdown
Member

Handing me a turnkey solution may solve the task at hand, but is not enjoyable for me and in the
end the goal was not met.

The problem with software development,
is that this is a resource-hungry process.
Aim to do everything yourself - doesn't
work. If you think it did something for
you and you have nothing to do - is wrong.
Quite the opposite, you can do 100 times
more by off-loading things to AI. I tried
to off-load some coding to AI, but so far
the results were unsatisfactory, so I ended
up doing that myself, which is slow. If you
see it already suits your needs - use it!
And you won't get out of business, quite
the opposite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants