SShortSingh.
Back to feed

GPT, Claude, and DeepSeek tested on regex, refactoring, and SQL: who won?

0
·5 views

A developer ran a structured comparison of GPT, Claude, and DeepSeek using identical prompts across three real-world coding tasks: CSV regex parsing, JavaScript refactoring, and a PostgreSQL consecutive-months query. On the regex task, GPT and Claude both produced working solutions, with Claude earning a slight edge for flagging a quadratic performance risk; DeepSeek initially refused and proposed an alternative approach instead. In the refactoring round, Claude delivered the cleanest result with no behavior changes, while GPT silently altered a boundary condition from greater-than to greater-than-or-equal, and DeepSeek played it safe but changed less than needed. The SQL gaps-and-islands problem flipped the standings, with DeepSeek producing the most concise and correct solution on the first attempt, while Claude's multi-step approach was valid but more verbose. Overall, no single model dominated all three tasks, suggesting each has distinct strengths depending on the type of problem.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

How to Build Centralized Auth for Internal Tools Using Caddy and Azure AD

A developer at a company using Azure AD set out to eliminate repeated authentication setup across internal tools by routing everything through a single login system. The solution combines Caddy, a modern reverse proxy with automatic HTTPS, and the caddy-security plugin (AuthCrunch), which adds OAuth2/OIDC support directly within Caddy. The setup involves compiling a custom Caddy binary with the plugin, configuring a dedicated system user, and running the server as a systemd service. An authentication portal hosted on a subdomain handles logins, session cookies, and OAuth2 callbacks against the existing Microsoft tenant. The approach means adding new internal tools requires only minimal config changes, with no separate user databases or password reset flows to manage.

0
ProgrammingDEV Community ·

Wrong Keepalive Interval Crashed a Trading Bot's WebSocket Every 5 Minutes

A developer running an algorithmic crypto trading engine discovered that their WebSocket connection to market data provider MMT was silently dropping every five to six minutes, causing gaps in live trading data. The root cause was a mismatch between the provider's idle session timeout of approximately 300 seconds and the engine's keepalive interval, which was set to fire every 10 minutes — well after the server had already closed the connection. The fix involved changing a single constant in the code, reducing the keepalive interval from 10 minutes to 4 minutes so it fires before the server's timeout threshold. The silent failure — logged only as a 1011 read_error — had initially led the developer to suspect rate limiting, memory leaks, or network instability. The incident highlights the importance of knowing a provider's idle timeout and ensuring keepalive intervals are set with a safe margin below that limit.

0
ProgrammingDEV Community ·

Five Docker vulnerabilities in serverless environments and how to fix them

Developers using Docker in serverless platforms like AWS Lambda and Google Cloud Run face security risks that are often underestimated, particularly among Latin American startups and SMEs. A common misconception is that cloud providers handle all container security, when in fact developers remain responsible for securing their Docker images and application code. Key vulnerabilities include oversized base images, running containers as root, hardcoded credentials, and the absence of automated vulnerability scanning in CI/CD pipelines. Security best practices recommended include using minimal base images such as Alpine variants, applying the principle of least privilege in Dockerfiles, and integrating scanning tools like Trivy or Snyk. Proper secrets management through dedicated vaults or cloud-native services is also highlighted as critical to preventing unauthorized access and potential financial losses.

0
ProgrammingDEV Community ·

Solo dev pauses Duckmon demo release to rebuild game depth from scratch

A solo developer working on Duckmon, a card-collecting game built in Unity, halted a near-complete demo release after deciding the core battle loop felt too shallow despite being fully functional. The game had over 300 cards, a server-authoritative backend, achievements, leveling systems, and a full soundtrack before the pause. The developer cited a loss of motivation and a six-week break from the project, during which the backend went inactive and community channels were left unattended. Returning with renewed focus, they concluded the game needed greater strategic depth to be genuinely replayable rather than a one-time experience. The first major change involved expanding the battle system with a team-based Squad Battle Mode inspired by RPG titles like Pokémon.