Lurker News
I've been working on a personal project recently, rewriting an old jQuery + Django project into SvelteKit. The main work is translating the UI templates into idiomatic SvelteKit while maintaining the original styling. This includes things like using semantic HTML instead of div-spamming, not wrapping divs in divs in divs, and replacing bootstrap with minimal tailwind. It also includes some logic refactors, to maintain the original functionality but rewritten to avoid years of code debt. Things like replacing templates using boolean flags for multiple views with composable Svelte components.

I've had a fairly steady process for doing this: look at each route defined in Django, build out my `+page.server.ts`, and then split each major section of the page into a Svelte component with a matching Storybook story. It takes a lot of time to do this, since I have to ensure I'm not just copying the template but rather recreating it in a more idiomatic style.
This kind of work seems like a great use case for AI assisted programming, but I've failed to use it effectively. At most, I can only get Claude Code to recreate some slightly less spaghetti code in Svelte. Simple prompting just isn't able to get AI's code quality within 90% of what I'd write by hand. Ideally, AI could get it's code to something I could review manually in 15-20 minutes, which would massively speed up the time spent on this project (right now it takes me 1-2 hours to properly translate a route).
Do you guys have tips or suggestions on how to improve my efficiency and code quality with AI?

Comments (469) 111 threads

Show all comments

Showing thread 68 of 111

rr8081 reply#
Its super frustrating there is no official guide. I hear lots of suggestions all the time and who knows if they help or not. The best one recently is tell the LLM to "act like a senior dev", surely that is expected by default? Crazy times.
xpe1 reply#
When the world is complicated, entangled, and rapidly changing, would you expect there to be one centralized official guide?*

At the risk of sounding glib or paternalistic -- but I'm going to say it anyway, because once you "see it" it won't feel like a foreign idea being imposed on you -- there are ways that help to lower and even drop expectations.
How? To mention just one: good reading. Read "Be a new homunculus" [1]. To summarize, visualize yourself like you are the "thing that lives in your brain". Yes, this is non-sense but try it anyway.
If you find various ways to accept "the world is changing faster than ever before" and it feels like too much. Maybe you are pissed off or anxious about AI. Maybe AI is being "heavily encouraged" for you (on you?) at work. Maybe you feel like we're living in an unsustainable state of affairs -- don't deny it. Dig into that feeling, talk about it. See where it leads you. Burying these things isn't a viable long-term strategy.**
* There is an "awesome-*" GitHub repository for collecting recommended resources to help with Claude Code: [2] But still requires a lot of curation and end-user experimentation: [2] There are few easy answers in a dynamic uncertain world.
** Yes I'm intentionally cracking the door open to "Job loss is scary. It is time to get real on this, including political activism."
[1]: https://mindingourway.com/be-a-new-homunculus/
[2]: https://github.com/hesreallyhim/awesome-claude-code

rr8081 reply#
Thanks yes of course you're right, still frustrating. I'm nearing retirement so not really worried about job loss, just want to make use of the tools.
xpe#
I get that. I probably could have been much more succinct by saying this: We can consciously act in ways that reduce the frustration level even if the environment itself doesn't change. It usually takes time and patience, but not always. Sometimes a particular mindset shift is sufficient to make a frustration completely vanish almost immediately.

Some examples from my experience: (1) Many particular frustrations with LLMs vanish the more I learn about their internals. (2) Frustration with the cacophony of various RAG/graph-database tooling vanishes once I realize that there is an entire slice of VC money chasing these problems precisely because it is uncertain: the victors are not pre-ordained and ... [insert bad joke about vectors here]