Stan

186 posts

Stan

Stan

@Ilnytskyi_sv2

Support Ukraine: https://t.co/KOW79Xoekm

Kraków Katılım Temmuz 2023
565 Takip Edilen53 Takipçiler
Stan
Stan@Ilnytskyi_sv2·
Можно по різному, але +- простий безпечний піхід для звичайної бази може бути такий. 1. Просто але з повним даунтаймом, тобто не приймаємо нові інсерти від юзерів. - Міграція створює нову колонку і одразу робить її бекфіл через insert from select. - Знімаємо даунтайм після деплой нової версії 2. Без дауннтайму трохи складніше але не неможливо - така сама міграція з бекфілом - далі обслуговуєте на рівні коду запис в дві колоники, з читанням з нової з фаллбеком на стару, аж переконаємось що все ок - в наступній версії - робимо повний перехід на нову + потрібні дропи Наголовніше не забувати про можливий роллбек, бо це 90% відвовідей на всі кейси. сам підхід і краще розумення BC варто трохи запозичити від Stripe API, які можна теж поширити на схему бази. - docs.stripe.com/upgrades - youtube.com/watch?v=tgDAFu… - теж цікаво в контексті ролбеків "no down migration" freek.dev/2900-why-i-don…
YouTube video
YouTube
Українська
0
0
0
20
жирафєндєр
жирафєндєр@giraffender·
@Ilnytskyi_sv2 @DrizzleORM Тут я справді не шарю. Але як заповнити нову, коли вже реальні дані є? Тобто заповнити false, тільки де є null, все інше не чіпати. Я думав, це тільки скриптом міграції вийде
Українська
1
0
0
28
жирафєндєр
жирафєндєр@giraffender·
Вперше за всю карʼєру я дропнув базу даних на проді. Ще й в пʼятницю ввечері. Ще й з Claude. Мінорно вирішив додати .default(false) до drizzle схеми існуючої таблиці users.
жирафєндєр tweet media
Українська
25
4
289
49.2K
Stan
Stan@Ilnytskyi_sv2·
Працюючи з базами в проекти додав статичний тест які взагалі забороняє всі деструктивні операції на базі в міграціях, особливо ті що ламають backward compatibility. Наприклад не можна робити дроп колонок взагалі. Не можна змінити тип а ні назву. Якщо така операція дуже потрібна то робити її можна принаймні в дві міграції, а ще краще в два послідовні деплої, якщо зміна в базі руйнує компатибільність з кодом. Збільшення з varchar(64) до 225 умовно безпечне, в вашому typescript це всеодно string, коли rust чи go можуть інакше обробляти типи АЛЕ зміну типу з varchar - json теж так просто вже не відкатити, перехідний етап у дві колонки, бекфіл, BC повинні зберігатися принаймні протягом двох послідовних версій додатку. Від третьої версії можна пробувати робити деструкви на колонках, таблицях які не використовуються або перевірені і позначені як deprecated або до повного видалення.
Українська
1
0
0
14
жирафєндєр
жирафєндєр@giraffender·
Воно то в принципі логічно, але в умовному Postgres або Mysql цього не сталося б, бо він вміє в ALTER COLUMN і файл міграції виглядав би по іншому. І щоб це довести, я створив окремий репозиторій з minimal required reproduction: github.com/serhii-chernen…
Українська
2
0
27
4.5K
Stan
Stan@Ilnytskyi_sv2·
@giraffender @DrizzleORM реально генеруєте такі деструктивні міграції? Це б могли бути дві міграції, додаєм нову колонку, робимо бекфілл, потім свап назви.
Українська
2
0
0
48
жирафєндєр
жирафєндєр@giraffender·
Коли я додав цей код до схеми та згенерив файли міграції, отримав такий файл: PRAGMA foreign_keys=OFF; CREATE TABLE __new_users (...); INSERT INTO __new_users SELECT ... FROM users; DROP TABLE users; ALTER TABLE __new_users RENAME TO users; PRAGMA foreign_keys=ON;
2
0
25
6.5K
Stan retweetledi
siggy bilstein
siggy bilstein@sbilstein·
@thdxr those who don’t squash are forced to explain every commit to the devil in the afterlife
English
0
1
13
605
Stan
Stan@Ilnytskyi_sv2·
@levelsio still faster than doing the same thing yourself
English
0
0
0
4
@levelsio
@levelsio@levelsio·
If Claude Code keeps being slow like this while I pay $200/mo (and they don't let me pay more) They will essentially force me to leave to Codex and I don't want to But it's soooooo slooooooooooooowwwww
@levelsio tweet media
English
636
46
2.6K
261.8K
El Programador Senior
El Programador Senior@5eniorDeveloper·
Trabajé en una startup donde dejaban que el ORM gestionara la base de datos. Si un dev necesitaba una columna, la agregaba al modelo y dejaba que la 'magia' ocurriera. Cada dev hacía lo que quería; cuando supe esto, generé el diagrama de la base de datos y era algo como esto:
El Programador Senior tweet media
Español
175
161
3.5K
332.9K
Stan
Stan@Ilnytskyi_sv2·
@DanielLockyer That was tough time hunting mammoths. Now food delivery a few clicks away.
Stan tweet media
English
0
0
0
123
Daniel Lockyer
Daniel Lockyer@DanielLockyer·
Can anyone remember just how much time we all spent manually writing little helper scripts to parse logs etc before AI Now I just dump .csv files in and ask it to produce a html page with all the graphs/analysis it can Honestly saving so much time from 5 years ago
English
9
1
102
4.1K
Stan
Stan@Ilnytskyi_sv2·
@ctatedev Can it still play well with @traefik if node app is directly running on host machine not docker?
English
0
0
0
154
Chris Tate
Chris Tate@ctatedev·
Portless killed :3000 Dev servers got stable names like myapp.localhost Agents could use worktrees in parallel without stepping on each other Now it's easier than ever in v0.11 Just run: portless Zero config. Zero args. Zero code changes.
Chris Tate tweet media
English
106
191
3.5K
511.1K
Stan
Stan@Ilnytskyi_sv2·
@BenjDicken @BrockHerion Unfortunately it's one of the things devs need to know about how React's reactivity works through full component re-renders. They recently tried to improve it with a new useEffectEvent hook and earlier with React compiler. Vue.js might feel more intuitive.
English
1
0
2
371
Ben Dicken
Ben Dicken@BenjDicken·
I don't know how to use a useEffect and at this point I'm too afraid to ask.
English
53
3
414
36.9K
Stan
Stan@Ilnytskyi_sv2·
@heyandras Now it's more about making decisions, codding is just delegated work
English
0
0
0
156
Andras Bacsai
Andras Bacsai@heyandras·
Same here. I don't feel myself as a developer. The last 2-3 days I have been making a very complex thing (for v5) without even writing a single line of code. I review and iterate, but do no coding. It is satisfying to be able to achieve more in less time, but it does not satisfy me the same way as coding. But I am still okay with this as the final product would be useful for a lot of people.
Brad Traversy@traversymedia

I’m creating a lot of cool shit lately, but it feels like I’m becoming more of a project manager than a developer 😐

English
21
4
236
35.2K
Branko
Branko@brankopetric00·
Every deployment is a success until someone checks the logs.
English
13
27
314
8K
Marcin Krzyzanowski
Marcin Krzyzanowski@krzyzanowskim·
Polish is the ultimate AI token language because the grammar is in favor of tokenization: - single word convey tense, genre, direction, grammatical role, number, case. 1 token, where you need a few in english. - Polish has strong presence online so models can handle it pretty well you can sell me "caveman" style and whatever, and I simply overtake tour benchmarks with a single word that doesn't sound like shit and is 3x more efficient ah, there's study to support that. 🫳🎤
English
51
49
911
67.3K
Stan
Stan@Ilnytskyi_sv2·
Windows 11 in Europe be like
Stan tweet media
English
0
0
0
19
Stan retweetledi
Ben Dicken
Ben Dicken@BenjDicken·
Flamegraphs are a great way to narrow in on performance issues + broadly to explore program execution. I built a custom viewer for Postgres queries, inspired Jan Nidzwetzki's excellent blog on the subject. Highly recommend analysis tools like this for learning query execution.
English
15
50
876
47.7K
Stan
Stan@Ilnytskyi_sv2·
@NASA @grok is it true we didn't have the atmosphere back in 1972?
English
1
0
0
2.6K
NASA
NASA@NASA·
1972 ➡️2026 Apollo 17 ➡️ Artemis II
NASA tweet mediaNASA tweet media
Indonesia
7.5K
106.7K
681.4K
38.6M
Stan
Stan@Ilnytskyi_sv2·
F*** around and find out. I learned the hard way to always back up my WSL.
Stan tweet media
English
0
0
0
10
Stan retweetledi
Ben Dicken
Ben Dicken@BenjDicken·
90% of building fast applications is holding the database correctly. The other 10% is killing N+1s.
English
25
35
828
58.8K
Stan
Stan@Ilnytskyi_sv2·
@mattpocockuk When one shooted simple prototype platformer game and improved it in a few iterations with expected results. Realized we can experiment much faster.
English
0
0
1
68
Matt Pocock
Matt Pocock@mattpocockuk·
I'm collecting stories from folks who've had a genuine 'this changes everything' moment with AI coding. What was yours?
English
267
13
265
70.9K
Stan
Stan@Ilnytskyi_sv2·
@peterfox Moved too. A lot easier to deal with one container + worker mode available oob if needed. The only thing many apps and frameworks' nginx rules must be ported to caddy but it's not a big problem, especially with llms
English
0
0
0
497
Peter Fox
Peter Fox@peterfox·
How many people have actually made the switch from PHP-FPM to FrakenPHP? And if not, why not?
English
46
4
88
17.9K
Stan
Stan@Ilnytskyi_sv2·
@DmytroKrasun AI should technically help to produce more value in the same amount of time so the difference can lead to lower prices, more distribution, new taxes or other effects. Also some government services would be better run by AI.
English
0
0
0
27
Dmytro Krasun
Dmytro Krasun@DmytroKrasun·
Any interesting AI takes recently? Everything was discussed a few times. And people (me too) are repeating themselves again. Except, maybe I haven’t seen any discussions about governments potentially taxing AI agents to compensate for people losing jobs.
English
10
0
13
2.2K