codingaddict_lv Profile Banner
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine Profile
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine

@codingaddict_lv

Followers
9K
Following
3K
Media
128
Statuses
1K

Web Developer β€’ πŸš€ Creator of https://t.co/ksVm1jofjS β€’ Tweets about my dev journey

Joined March 2018
Don't wanna be here? Send us removal request.
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
1 month
🚨 New Course Alert! 🚨. Practical Git and GitHub: From Basics to Pro Workflows.βœ… Real-world Git commands.βœ… VSCode + Terminal workflows.βœ… Interactive rebase, cherry-pick & more. 🎯 🎟 Code: GIT-GITHUB-COURSE.⏳ Offer ends June 11, 2025.
5
2
20
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
1 month
🚨 New Course Alert! 🚨. Practical Git and GitHub: From Basics to Pro Workflows.βœ… Hands-on Git commands.βœ… Real-world workflows (merge, rebase, cherry-pick).βœ… Terminal + VSCode examples. Perfect for devs who want to master Git without the fluff.
3
4
44
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
3 months
The limits of AI in programming | Tim Sweeney and Lex Fridman via @YouTube.
0
0
6
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
3 months
The more time I spend in production code, the more I realize how out of touch many YouTube coding influencers are. Their takes on β€œclean code,” β€œbest practices,” and what it means to be a senior dev often crumble in the face of real-world constraints, and legacy systems πŸ˜‚.
6
2
43
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
3 months
πŸš€ New Course Alert!. Master Jest Testing with TypeScript & Node.js.Learn how to write clean, reliable tests with real-world examples. Unit tests, mocks, spies, error handling & more!. 🎯 Enroll now β†’ .
2
1
23
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
4 months
Just installed webpack-bundle-analyzer β€” love the πŸ”₯ graphical breakdown of my bundle! Makes spotting bloat so much easier πŸ“ŠπŸ•΅οΈβ€β™‚οΈ.Not using Webpack? Check out source-map-explorer or vite-plugin-visualizer πŸ’‘.#webpack #webperf #javascript.
1
0
12
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
4 months
Spicy take 🌢️: For all the talk about TypeScript "overcomplicating" things, it’s actually saving your team from chaos πŸ˜….
1
0
21
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
4 months
πŸ” Want to see where a dependency is used in your project?.Run this command:.πŸ‘‰ npm ls package-name.It shows the full dependency tree 🌳.Super useful for tracking down nested dependencies πŸ•΅οΈβ€β™‚οΈ.#npm #javascript #nodejs #webdev.
1
2
13
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
4 months
Hot take πŸ”₯ : in production, SourceTree ⏩ Git CLI. Look, I ❀️ terminal too, but when it’s time to rebase, merge, and cherry-pick in prod - most times clicking πŸ–±οΈ is faster than rewriting the same conflict 3 timesβ€”or summoning the Git gods with a ritual sacrifice. πŸ”₯.
0
0
13
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
4 months
Using a this hack in tests:.πŸ” const resetSingleton = () => (HashingService as any).instance = undefined;.πŸ”§ Calling this in beforeEach() to reset singleton state. πŸ•΅οΈβ€β™‚οΈ In general, (SomeClass as any) helps "cheat" TypeScript when tests need to bypass strict typing. #TypeScript#Jest.
0
0
10
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
4 months
Spent an hour debugging a mysterious TypeScript error πŸ˜΅β€πŸ’«.Turns out. webpackCache was the culprit 🧨.Deleted it, and everything worked like magic ✨.#webpack #devlife #typescript πŸ› οΈ.
0
0
21
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
5 months
🧠 TypeScript fun fact! 🧠. The declare keyword only provides type information but NO runtime values!. declare enum Colors { RED, BLUE }.console.log( // πŸ’₯ Crash!. Remove declare if you need actual values at runtime πŸ˜€.
1
0
5
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
5 months
πŸ” Dev Tip: Lookup Tables FTW! πŸ“š. Ditch long if/switch statementsβ€”use object mapping instead!. πŸš€ Examples:.βœ… Convert status codes to messages.βœ… Map country codes to names.βœ… Translate enums.πŸ’‘ const result = lookupTable[input] || defaultValue;.Fast, and easy to maintain! ⚑
Tweet media one
Tweet media two
Tweet media three
2
6
31
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
5 months
πŸš€ Generate minimal .d.ts files with dts-bundle-generator. πŸ“¦ npm install --save-dev dts-bundle-generator.πŸ“‚ mkdir -p types (if missing).⚑ npx dts-bundle-generator -o types/utils.d.ts src/utils.ts.πŸ” Extracts only needed types & dependencies!.
0
0
21
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
5 months
πŸ§ͺ Jest Mocking Gotcha!. πŸ”₯ Issue:.πŸ‘‰ jest.mock('./myModule');.🚨 Returns undefined for EVERYTHING! πŸ«₯. ⚑ Your code:.πŸ‘‰ myModule.doStuff().πŸ’₯ Cannot read property 'doStuff' of undefined. πŸ›  Fix:.jest.mock('./myModule', () => ({ doStuff: jest.fn() }));. #JavaScript #Testing #Jest.
1
1
11
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
5 months
πŸ” Git tip: Deleted files not showing up in staging?. git add -A. The -A flag is your friend! It stages ALL changes:.β€’ New files ✨.β€’ Modified files πŸ“.β€’ Deleted files πŸ—‘οΈ.β€’ Renamed files πŸ”„. No more ghost files in your staging area! 🎯. #Git #DevTips #CodingTips.
0
0
13
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
5 months
πŸ§ͺ Jest Testing Tip:. Run single test file:.πŸ‘‰ "npm test -- yourFileName.spec.ts". OR directly with Jest:.πŸ‘‰ "jest -- yourFileName.spec.ts". Pro tip: Arrow ⬆️ key is your friend for finding recent commands!. No config changes needed πŸš€. #JavaScript #Testing.
0
0
14
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
5 months
πŸ”§ NVM #DevTip: VS Code terminal showing a different Node version than your system terminal?. Add this to your .zshrc:. πŸ‘‰ "nvm use default".🎯 Boom! Now both terminals stay in sync with your default Node version. No more version mismatches!.
0
1
26
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
6 months
Need to search only in a specific folder in VS Code? . - Press `Ctrl + Shift + F` (`Cmd + Shift + F` on Mac) . - In **'files to include'**, type `src/components/**` .- To exclude folders, use **'files to exclude'**, e.g., `node_modules/**` . - Get focused search results! πŸš€
Tweet media one
1
4
35
@codingaddict_lv
Jānis Smilga πŸ‡±πŸ‡» πŸ‡ΊπŸ‡¦ #StandWithUkraine
6 months
Check out this Git tip for smoother workflows! πŸŽ‰. Run this:. git config --global url.'git@github.com:'.insteadOf '. Git will automatically use SSH instead of HTTPS for GitHub. Seamless coding! πŸš€.
3
1
33