Hacker News

Way to Use AI for Coding

Hacker News - 1 hour 1 min ago

A mistake I see many beginner developers make with AI coding tools is this:

They ask the AI to build the entire project.

Something like:

“Build me a full SaaS app that does this”

The result?

A messy codebase.

AI tries to generate everything at once, and the architecture usually falls apart.

After experimenting with AI coding tools, I’ve found a workflow that works much better.

Think Like an Architect, Not a Prompt Engineer

The key idea is simple:

You design the system. AI helps implement pieces of it.

Instead of asking AI to generate the whole project, break it down.

You decide:

architecture

folder structure

data models

API design

Then AI helps implement one piece at a time.

A Better Workflow

Here’s the process that works well for me.

Design the architecture first Before asking AI for code, define:

project structure

database schema

API routes

major components

Example:

/api auth.ts users.ts

/services userService.ts

/components Dashboard.tsx

This prevents AI from inventing random structures.

Ask AI to build one file at a time Instead of:

“Build the backend”

Ask:

“Create an Express API route for user registration with email and password validation.”

Or:

“Create a React component for a dashboard that displays a list of projects.”

Small tasks = much better results.

Review and refine Never paste AI code blindly.

Check for:

unnecessary complexity

security issues

inconsistent patterns

AI is great at generating code, but developers are still better at judging it.

Use AI for boring work Where AI really shines:

boilerplate

tests

simple CRUD endpoints

documentation

refactoring suggestions

Let AI do the repetitive work.

Focus your time on system design and product decisions.

The Real Shift

AI doesn’t replace developers.

It changes the role of developers.

Instead of spending most of our time writing code, we spend more time:

designing systems

reviewing generated code

thinking about architecture

Which, honestly, is where the interesting problems are anyway.

Comments URL: https://news.ycombinator.com/item?id=47285319

Points: 3

# Comments: 0

Categories: Hacker News

Show HN: ImmutableBase – Strict immutable data objects for PHP

Hacker News - 1 hour 11 min ago

Hi HN, I built this because PHP's `readonly` keyword isn't enough. It prevents reassignment but doesn't enforce type-safe construction, nested object validation, or consistent null handling across your data layer.

ImmutableBase takes a different approach: you extend one of three base classes (DTO, VO, or SVO — each with different strictness guarantees) and all validation happens at construction time. Your objects are either valid or they don't exist.

A few things that might be interesting to this crowd: - Behavioral attributes (`#[Strict]`, `#[Lax]`, `#[SkipOnNull]`, `#[KeepOnNull]`) let you control null/missing value handling per property rather than per class - SVO (Single Value Object) supports type narrowing with automatic validation chaining — think of it as a value object that enforces its own invariants through the type hierarchy - CLI tools: `ib-cacher` for pre-warming validation cache, `ib-writer` for auto-generating Markdown docs of your entire object hierarchy - No magic methods, no naming conventions — everything is explicit and IDE-visible

Requires PHP 8.4+. I'm the sole author and maintainer. Used in production at enterprise scale in Taiwan. Happy to discuss any design decisions — there are some deliberately controversial ones in there.

Feedback welcome.

Comments URL: https://news.ycombinator.com/item?id=47285253

Points: 1

# Comments: 0

Categories: Hacker News

Show HN: Clickly – visual dev tool for mobile apps with real-time preview

Hacker News - 1 hour 14 min ago

3min demo: https://youtu.be/4wms16vXrCY

Give it a try and let me know what you think. All opinions are welcome.

Comments URL: https://news.ycombinator.com/item?id=47285236

Points: 2

# Comments: 0

Categories: Hacker News

Show HN: Viral.ad – Turn any product URL into a UGC video ad in minutes

Hacker News - 1 hour 44 min ago

I kept paying $150-350 per UGC video, waiting a week, and still getting mediocre hooks. So I built an alternative.

Paste a product URL -- AI scrapes it, writes the script, generates a UGC-style video with actor, voiceover and subtitles. Under 5 minutes. Stack: Next.js, TypeScript, ElevenLabs (voiceover), Vercel, Stripe, Resend.

$1 trial.

Would love feedback on output quality and the pricing model.

Happy to answer technical questions about the pipeline.

Comments URL: https://news.ycombinator.com/item?id=47285091

Points: 1

# Comments: 0

Categories: Hacker News

Show HN: I built a tool to manage work and personal Git repos

Hacker News - 1 hour 46 min ago

I finally got fed up with making work + personal Git repos work on my machine.

Ever clone a work repository and accidentally make commits using your personal email? Or forget how to make your work repos use your work SSH key? Yeah... same.

So I built the tool I've always wanted. GitPersona - a CLI tool for managing many git profiles on a single machine.

Shoutout to my boy Codex for helping me finally ship this.

Comments URL: https://news.ycombinator.com/item?id=47285084

Points: 3

# Comments: 0

Categories: Hacker News

Show HN: Stopping OpenClaw from breaking your mails

Hacker News - 1 hour 51 min ago

This project puts a lightweight layer in between your gmail-account and OpenClaw. When OpenClaw sends an e-mail, it can only send drafts. You can then in your e-mail program either send the mail or adjust the draft and send it back to OpenClaw. This makes OpenClaw much more usable.

Comments URL: https://news.ycombinator.com/item?id=47285062

Points: 3

# Comments: 0

Categories: Hacker News

Girl Scout Cookies

Hacker News - 1 hour 52 min ago
Categories: Hacker News

Codex for Open Source

Hacker News - 2 hours 2 min ago
Categories: Hacker News

Pages