Moon
@stackdcoder
ship, learn, repeat (skill issue edition)
The biggest turn off with Google login is when you use it for a third party app, you cannot share that access with anyone. They will need to log in with Google too, which means giving Google access to all their data. There is no way to just share the app itself.
A better UI and improved search functionality would be a great start for making GitHub better. @jaredpalmer
ChatGPT just launched Atlas, a browser with AI built in. It reads pages, cites sources, remembers context, and can even act using agent mode to book, research, and organize. Rolling out on macOS now with Windows, iOS, Android coming soon. #ChatGPT #Atlas
🚀 PostgreSQL pro tip: You can make columns auto-compute themselves 👇 CREATE TABLE users ( first_name text, last_name text, full_name text GENERATED ALWAYS AS (first_name || ' ' || last_name) STORED ); 💡 Auto-updates when data changes ⚡ Indexable 🧠 No triggers
API design is 70% planning and structuring the database, 20% implementing the routes, and 10% testing to make sure everything actually works. #APIs
App idea: A simple notes app that fits your lifestyle, summarizes your thoughts, reminds you when needed, and helps you learn in your own way. No matter if you're a programmer, student, designer, or just trying to stay organized, it's made for you. #ai #startupcommunity
0.1 + 0.2 in JavaScript 👀 console.log(0.1 + 0.2) // 0.30000000000000004 ⚠️ Binary floats can't store 0.1 exactly ⚠️ Happens in most languages, not just JS ✅ For money: use integers (cents) ✅ For comparisons: check if difference < 0.00001
PostgreSQL MONEY type 👀 ⚠️ Formatting depends on locale settings ⚠️ Only handles one currency per database ⚠️ Limited math operations NUMERIC(19,4) is more common now: ✅ Precision control ✅ Works with any currency ✅ Better for calculations
EXCLUDED in PostgreSQL 👀 References the row you tried to insert during conflicts: INSERT INTO stats (id, views) VALUES (1, 5) ON CONFLICT (id) DO UPDATE SET views = stats.views + EXCLUDED.views; ✅ Increment instead of replace ✅ Cleaner upserts ✅ Access attempted values
satisfies in TypeScript 👀 Checks types but keeps literal values: const routes = { home: '/', user: '/user' } satisfies Record<string, string> ✅ Type validation ✅ routes.home stays '/' not string ✅ Better than 'as' casting
Gapless IDs 👀 ✅ Ticket table with SELECT ... FOR UPDATE Example: UPDATE tickets SET id = id + 1 RETURNING id; ✅ Manage sequencing in application logic with proper locking (e.g. Redis INCR or a mutex) ⚠️ Keep in mind: gapless IDs = higher contention + slower writes
PostgreSQL SERIAL creates gaps when transactions fail 😵 If you need gapless IDs, don't use SERIAL 🚫 Only use it when gaps are fine 👍 Next: better ways to handle sequential IDs 👀
PostgreSQL SERIAL creates gaps when transactions fail 😵 If you need gapless IDs, don't use SERIAL 🚫 Only use it when gaps are fine 👍 Next: better ways to handle sequential IDs 👀
if you vibe with typescript + backend + postgresql, hit follow 👀 posting dev stuff from tomorrow, let’s ship 🚀 #typescript #OpenSource
United States Tendencias
- 1. Bama 49.5K posts
- 2. Georgia 61.3K posts
- 3. Ty Simpson 7,418 posts
- 4. Miami 226K posts
- 5. #NXTDeadline 14.6K posts
- 6. #UFC323 24.7K posts
- 7. #GoDawgs 14.8K posts
- 8. #SECChampionship 5,412 posts
- 9. Ryan Williams 2,796 posts
- 10. DeBoer 4,443 posts
- 11. Frank Martin 2,284 posts
- 12. Kirby 15.2K posts
- 13. Vettori 1,729 posts
- 14. Texas Tech 32.3K posts
- 15. Jalin Turner 1,474 posts
- 16. Grubb 2,410 posts
- 17. #RollTide 3,069 posts
- 18. Oba Femi 7,605 posts
- 19. Messi 318K posts
- 20. Fowler 1,946 posts
Something went wrong.
Something went wrong.