Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

Using Codex & Claude Code in a Real Task: A Practical Coding Example (2026)

A hands-on comparison with real output snippets. If you read the previous post, you already have a general view of how Codex and Claude Code differ in approach. Now it's time to put them into a real scenario, same problem, two…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

A hands-on comparison with real output snippets.



If you read the previous post, you already have a general view of how Codex and Claude Code differ in approach. Now it's time to put them into a real scenario, same problem, two solutions.



We asked both models to solve a simple but layered task:




Given a JSON list of users, return only the ones with "active": true

Then generate a formatted report with name + email.




This is what happened.




## Codex Output — Fast, Direct, Minimal Structure

Codex responded quickly and generated a working implementation:

import json

def get_active_users(data):
users = json.loads(data)
active = [u for u in users if u.get("active")]
result = ""
for u in active:
result += f"{u['name']} - {u['email']}\n"
return result

# Example usage
data = '[{"name": "Ana","email": "[email protected]","active": true},{"name": "Luis","email":"[email protected]","active": false}]'
print(get_active_users(data))






✔ Works and runs immediately

✔ Minimal and efficient

— Slightly less readable as logic scales

— No extra validation or pattern enforcement



Codex is perfect if you want fast output and you’ll refine later.





Claude Code Output — Structured, Clear, Built to Scale



Claude Code approached the task differently.

Less concise, but better organized for future growth:




import json
from typing import List, Dict

def parse_users(data: str) -> List[Dict]:
"""Safely parse JSON input into Python objects."""
return json.loads(data)

def filter_active(users: List[Dict]) -> List[Dict]:
"""Return only active users."""
return [u for u in users if u.get("active") is True]

def format_report(users: List[Dict]) -> str:
"""Generate a readable name + email report."""
lines = [f"{u['name']} <{u['email']}>" for u in users]
return "\n".join(lines)

def build_user_report(data: str) -> str:
users = parse_users(data)
active = filter_active(users)
return format_report(active)






✔ Maintainable, commented, modular

✔ Easier to extend if logic grows

— Slower to write manually

— Verbose for quick prototyping



Claude thinks like someone who shares this repo with a future team.






When to Use Each One in This Task



Use Codex if you need:




  • A fast function for a script or hackathon

  • To test logic quickly and move on

  • A starting point to optimize later



Use Claude Code when:




  • You know the file will grow

  • Multiple people will maintain the repo

  • You plan to add validation, testing, or roles later



Same problem, different philosophies.



🎥 Quick visual version available!

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Using Codex & Claude Code in a Real Task: A Practical Coding Example (2026)

Thematisch verwandte Begriffe: Using, Codex, Claude, Code · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-101003 | A weakness has been identified in Cesanta Mongoose up to 7.21. Affected…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag