Junior developers are toast

@JonL
How have you uploaded your code base to claude?

Using the new project feature with Claude 3.5. It allows 200K context.

Then you used something like this GitHub - mufeedvh/code2prompt: A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting. to get everything in 1 file?

Or are there fancier things out there, like a way to literally sync your codebase so you also don't need to upload new stuff after writing more code?

I didn't bother to look for tools that do that, but I will take a look at the CLI.

Claude wrote this. Feel free to ask him to adapt.

import os

def export_src_folder(project_path, output_file, project_summary, tech_stack, folder_descriptions):
    src_path = os.path.join(project_path, 'src')
    
    if not os.path.exists(src_path):
        print(f"Error: src folder not found in {project_path}")
        return

    with open(output_file, 'w', encoding='utf-8') as f:
        # Write project summary and tech stack
        f.write("Project Summary:\n")
        f.write("="*50 + "\n")
        f.write(project_summary + "\n\n")
        
        f.write("Tech Stack:\n")
        f.write("="*50 + "\n")
        for tech, description in tech_stack.items():
            f.write(f"{tech}: {description}\n")
        f.write("\n" + "="*50 + "\n\n")

        # Write src folder structure with descriptions
        f.write("src Folder Structure:\n")
        for root, dirs, files in os.walk(src_path):
            level = root.replace(src_path, '').count(os.sep)
            indent = ' ' * 4 * level
            folder_path = os.path.relpath(root, project_path)
            f.write(f"{indent}{os.path.basename(root)}/\n")
            if folder_path in folder_descriptions:
                f.write(f"{indent}    Description: {folder_descriptions[folder_path]}\n")
            sub_indent = ' ' * 4 * (level + 1)
            for file in files:
                f.write(f"{sub_indent}{file}\n")
        
        f.write("\n" + "="*50 + "\n\n")
        
        # Write file contents
        for root, dirs, files in os.walk(src_path):
            for file in files:
                if file.endswith(('.svelte', '.js', '.ts', '.css', '.postcss', '.html')):
                    file_path = os.path.join(root, file)
                    relative_path = os.path.relpath(file_path, src_path)
                    f.write(f"File: {relative_path}\n")
                    f.write("="*50 + "\n")
                    try:
                        with open(file_path, 'r', encoding='utf-8') as source_file:
                            f.write(source_file.read())
                    except Exception as e:
                        f.write(f"Error reading file: {str(e)}")
                    f.write("\n\n" + "="*50 + "\n\n")

# Usage
project_path = "***absolute path for your src***"
output_file = "***filename.txt***"

project_summary = """
***What's your project about***
"""

tech_stack = {
    "Frontend": "",    
    "UI Library": "",
    "Styling": "",
    "Backend": "",
    "Authentication": "",
    "Deployment": ""
}

folder_descriptions = {
    "src": "Contains the main application logic, layout, css styling, and client and server hooks.",
    "src/lib": "Contains reusable utility functions, custom hooks, and shared components.",
    "src/lib/components": "Houses all custom-built components used across the application.",
    "src/lib/components/ui": "Contains the components currentl in use for this project from shadcn-svelte UI library. New components from the library can be installed via terminal.",
    "src/static": "Contains static assets like images, fonts, and favicon.",
    "src/routes": "Defines the application's routing structure and page components.",
    "src/routes/(app)": "Contains the main application logic and layout.",
    "src/api": "Includes custom server-side API routes for backend functionality."
}

export_src_folder(project_path, output_file, project_summary, tech_stack, folder_descriptions)
1 Like

Marcus Hutchins has an interesting opinion on AI...

2 Likes

To be honest I have no clue how it’s going to end. Augmenting, replacing, destroying…one of those I guess :rofl:

1 Like

The term Marcus used 'prompt engineer' made me laugh! And the way he stated not even the worst employee could be replaced with A.I also cracked me up! Don't get me wrong we use A.I but we don't trust/rely upon it to do anything we ask of it, and by the time you do double check anything it spurts out (any of them, Claude, ChatGPT etc) you may as well have sat an exam on the subject you are asking it to interpret and wrote the source yourself (simple things yeah alright but the complex 90% of the time it throws out utter garbage). Still does give some hints I suppose... Which saves searching Stack hahaha, which can be just as painful!

:smiley:

The fact he is having difficulty in keeping a straight face is also rather amusing too...

:slight_smile:

1 Like

I guess the IT specialty is also important. It’s not the same to replace a junior that will just code simple stuff all day long than a NOC engineer, a devops or a security analyst. You wouldn’t trust your infrastructure or security to a LLM. At least not in their current state. But…are we just an iteration away of…who knows? Things have got quite unpredictable.

1 Like

This is very true. But for now I believe what Marcus is saying is the current 'professional' consensus. Personally I quite like his attitude and sense of humour. Plus the fact he keeps things short and to the point. No doubt in his ability as an Engineer. Very clever young man.

1 Like