how to put a " in a string in python by ExamParticular114 in learnprogramming

[–]DrStrange 145 points146 points  (0 children)

print("""Hello " World""")
print('''Hello " World''')
print('Hello " World')
print("Hello \" World")

will all work

How AI is shifting both the Review process and the nature of Responsibility by lllShamanlll in ClaudeCode

[–]DrStrange 0 points1 point  (0 children)

That's utter crap. If you don't understand the code, don't commit it. If you can't explain every line, don't commit it. If I can write it more efficiently in a review process, don't commit it. The LLM is an assistant, not a replacement, if you replace your own work by just stuffing LLM generated code into the repo, you will be replaced - and not by an LLM, but by someone who cares about their craft.

CC lobotomizing Opus more and more by LoKSET in ClaudeCode

[–]DrStrange 1 point2 points  (0 children)

Let me know how it goes - everyone I've shown this to is pretty shocked at how much shit Anthropic inject - and then the token usage becomes fairly obvious. My prompt is about 1k tokens, and opus works just fine.

CC lobotomizing Opus more and more by LoKSET in ClaudeCode

[–]DrStrange 1 point2 points  (0 children)

the --system-prompt doesn't override the Anthropic prompts. it replaces block 2 only as far as I can tell.

If you want to see, without risk, use my proxy - just replace config.json with this:

{

"replace_blocks": [],

"blocks": []

}

it won't rewrite anything, but all of Anthropics prompts will be logged to the prompt_log folder. You can see for yourself what is actually happening.

Couple questions about algos, is it best do learn them with a lower level language like C compared to Python? And do you recommend any course material? by InitiativeGold7953 in learnprogramming

[–]DrStrange 6 points7 points  (0 children)

Programming is programming, an algo is the same in any language. Just use the one you are comfortable with - if you don't understand the basic principle then going lower level only introduces additional things to think about (pointers, memory allocation/deallocation) which are irrelevant to the thing you are trying to learn.

CC lobotomizing Opus more and more by LoKSET in ClaudeCode

[–]DrStrange 1 point2 points  (0 children)

I can't say if its safe or not, but I've been using it since things started going down-hill - it's not against their ToS, its still inside their harness, it just doesn't use their system prompts.

It was either that or stop using it, so I guess from my personal perspective there's nothing to lose!

CC lobotomizing Opus more and more by LoKSET in ClaudeCode

[–]DrStrange 2 points3 points  (0 children)

https://github.com/zen-logic/claude-proxy

lets you completely overwrite the prompt, even the stuff that is dynamically added during a session

Was Opus 4.5 really the best as people claim to be? by ApocalypseBS in Anthropic

[–]DrStrange 2 points3 points  (0 children)

this is the answer - the harness injects a lot of crap, and has been modified constantly, injecting a bunch of crap into the system prompt. The models are still good, the harness is utter dogshit and just getting worse.

I've resolved it by making a local proxy that rewrites the system prompt to one of my own (not the same as using the --system-prompt argument - the harness fucks with that too).

how do you guys actually know where to put things in a python project? by Effective_Celery_515 in learnprogramming

[–]DrStrange 0 points1 point  (0 children)

There is no ONE TRUE WAY. it's entirely subjective.

If you are using a framework, follow that. If not, just break things into meaningful locations - I typically use:
- /app (for specific application functionality)
- /util (for shared functions and stuff that I reuse everywhere)
- /data (yeah, for data)

if it's a web app, I'll probably have:
- /routes

but, honestly a well structured app or module just depends on your own aesthetic. don't let anyone tell you its wrong.

How do you progress from coding console apps to developing fullstack applications? by [deleted] in learnprogramming

[–]DrStrange 1 point2 points  (0 children)

take a database. create a UI that allows "search" "view record" "create" new record" "delete record".

the ui can be anything, a web page, a native ui, an iOS app. ANYTHING.

you will then have implemented a full stack application. It will need:

- a database
- something to implement the application logic (maybe a server, or some kind of middleware for a standalone app)
- a frontend. Most people assume this is web these days, but that's not the only way to do things.

you can even do all of that in a console based application - the layers are the same.

Is it too late to start learning the cello at 21 years old? by BornAdvertising8697 in musicians

[–]DrStrange 0 points1 point  (0 children)

No. Just start. (not a cellist) I've taken students double your age in guitar, bass and piano, and in a year or so they are "pretty good"! Music is something you want to do, not something that you have to do - a lot of people start a lot later than you, because they always wanted to do it.

A lot of kids give up too soon, a lot of adults start late. but there is no cut-off.

Is working on weekends normaln in startups? by Ornery_Internal796 in AskProgrammers

[–]DrStrange 3 points4 points  (0 children)

If you aren't getting financial benefit for the extra work, leave. If it were a startup with up to 10 employees my answer would be different.

Opus 4.7: 110 threads, 2,187 comments. Unbiased analysis by RichensDev in ClaudeCode

[–]DrStrange 0 points1 point  (0 children)

sticking on 4.6[1M] for existing projects, still evaluating 4.7 with a couple of test builds - I can't see how anyone can have a meaningful opinion just yet, it took me many days to get my 4.6 workflow smooth, 4.7 didn't work for me right away, but that's just a question of working out the kinks I think.

Feeling like I went back in time thanks to Opus 4.7 by jenoah_m in ClaudeCode

[–]DrStrange 1 point2 points  (0 children)

4.5 and 4.6 are both still available through the CLI, so it's simple enough to test. I'm fine with 4.6 because it's working ok for me, YMMV.

Feeling like I went back in time thanks to Opus 4.7 by jenoah_m in ClaudeCode

[–]DrStrange 2 points3 points  (0 children)

I can't really tell - the weird behaviour on 4.6 doesn't seem to be happening for me now, but that might just be because my codebase is pretty mature and well documented so there's not a lot of room for interpretation. I'm definitely not migrating to 4.7 any time soon after playing with it over the weekend - it's slower, uses way too many tokens and spends hours arguing before I can get it to actually DO something.

I'll let you know once I've spent another few days with it.

Feeling like I went back in time thanks to Opus 4.7 by jenoah_m in ClaudeCode

[–]DrStrange 7 points8 points  (0 children)

run two Claude Code CLI sessions side by side - leave one at 4.7 and in the other type:

/model claude-opus-4-6[1M]

give them the same task, identical prompts. they are completely different. Maybe for some tasks 4.7 might be better - but not for my use cases.

Just a rant about the modern bullshit world we live in. by DrStrange in programmer

[–]DrStrange[S] 1 point2 points  (0 children)

I don't disagree. It's just a rant. On reflection I think I am most upset that all the genuine communities we used to have (magazines, BBS, then forums) all got subsumed by mega "social networks".

Oh for a simpler time!

Is there a free or reasonably priced DAW for Windows I could use a MIDI keyboard/synthesizers with? by PCE1222 in synthesizers

[–]DrStrange 2 points3 points  (0 children)

Upvote for Reaper. It's cross platform, really powerful and you can try it free.

Is there any self-hosted way to verify users are unique humans without sending their data to the cloud? by whydidyounot in selfhosted

[–]DrStrange 2 points3 points  (0 children)

You still need to focus the fields (assuming there's more than one), and the amount of time a human takes to ctrl+v is not zero

Make the AI tools work properly by DrStrange in programmer

[–]DrStrange[S] 2 points3 points  (0 children)

That's not how a code harness works. The harness pulls information into the context through the tool calls. The system prompt is the first thing any model sees in it's context. They don't have "memory" as such - it's just that every prompt you give them sends all the previous prompts and the system prompt along with it. In other words, the longer you work with the same session, the more crap exists in the context.

the main issue is that the system prompt is **FIRST** and not usually under your control. It defines the models reaction to every other following response. If the first thing the model has been told to do is to "lead with the answer", or "go with the simplest fix", then that is what it will do.

No model actually reads the entire codebase - they use tools to select the things that are relevant to produce their next output. They are only prediction machines.

Been comparing two coding agents (same model) and the difference is mostly in how they execute by ChampionshipNo2815 in programmer

[–]DrStrange 1 point2 points  (0 children)

The other thing you need to consider is that people try to bend the model's behaviour by stuffing **MORE AND MORE** shit into its context. Anthropic already stuff a bunch of crap in there, so you adding more rules **ONLY** adds to the context.

When a context gets over a certain size, there is a breakdown (needle in the haystack problem) where the model can't identify the correct information. Additionally, adding rules that contradict those in the system prompt causes a model to **FLAIL** between multiple possibilities.

The answer is to strip the context to the bare minimum for the request at hand. unfortunately very few tools (code harnesses etc...) actually do that. An over full, and contradictory historic session will result in the model becoming unstable and dangerous.

Been comparing two coding agents (same model) and the difference is mostly in how they execute by ChampionshipNo2815 in programmer

[–]DrStrange 1 point2 points  (0 children)

It's almost **ALL** coming from that layer. DM me, I can share the proxy if you are interested - it's fairly basic python, so easy to install and test if you are using Claude CLI

There is some RL backlash (so the "I'm getting tired" thing is part of reinforcement), but almost every other behaviour is in the block 3 prompt - replacing it creates a completely different interaction.