Human

Sylhet, Bangladesh
Joined February 2016
Indexes are tricky when your database is sharded โšก A database needs to be partitioned and sharded when the data goes big or the load surges. So, how would indexes work in such situations? I just published a video explaining how indexes work in a distributed database like DynamoDB, along with the trade-offs they make, and the pros and cons of picking one over another. give it a watch - youtu.be/eQ3eNd5WbH8 Note: this fundamental concept holds for any distributed database in the world and is an essential building block for you to understand and use them better. โšก I keep writing and sharing my practical experience and learnings every day, so if you resonate then follow along. I keep it no fluff. #AsliEngineering #DatabaseFundamentals #SystemDesign
2
17
1
195
13,804
๐Ÿ“ Curious about the React Compiler? I wrote about one of the core compiler transformations: recompiled.dev/blog/ssa/
2
37
4
173
37,958
Hi @hnasr you specified in your db course that the postgres db doesnโ€™t have a cluster index so secondary index points to row_id. Is row_id or the specific column?
1
2,287
In TypeScript, I often prefer to use a Record over a switch statement. โœ… It's easy to read. โœ… It's typically less code. โœ… It's safer. With a switch, I have to do extra work to assure it's exhaustive. With a Record, if I forget to handle a case, it won't compile.
64
128
9
1,575
149,265
Todayโ€™s learning: Cloudflare can break React hydration in the most funny way possible :D 1. Make a React site that renders `<p>My email: [email protected]</p>` 2. Put it behind Cloudflare 3. Hydration mismatch!
7
9
146
34,672
I think the most scary thing about this is that it obfuscates the distinction between FE and BE devs.
Server actions ๐Ÿ”ฅ
17
3
3
42
28,830
Problem: TypeScript can't validate runtime data. Solution: Use Zod to validate runtime data. 6 things I validate at runtime via Zod: โœ… URL โœ… Cookie โœ… Form inputs โœ… Environment variables โœ… localStorage/sessionStorage โœ… JSON in REST API responses Examples:
40
96
5
977
174,363
One of my most favourite person. I learned so many things from him. I hope I will continue learn from him more and more.
This Post is from an account that no longer exists. Learn more
205
React: The Most Common Mistakes in 2023 I'm presenting this talk at @kc_dc in July! The list: State: Needless state Global state overuse Syncing state via useEffect Reading state after setting it Multiple setState calls in a row Putting state in the wrong spot Storing related data in separate pieces of state Http: Not caching Fetching in useEffect Not using modern libraries Workflow: Not using a framework Not using Tailwind Not using TypeScript Not mocking Ineffective testing Not using custom dev tools Poor folder structure Few/poor reusable components Weak ESLint rules Weak error handling What else would you put on this list?
39
48
3
425
79,246
Learn CIDR notation and subnetting in context of AWS VPC. codemacaw.com/2023/05/13/cidโ€ฆ #aws #SoftwareEngineering
2
109
๐—ช๐—ต๐˜† ๐—”๐—บ๐—ฎ๐˜‡๐—ผ๐—ป ๐—”๐—ฏ๐—ฎ๐—ป๐—ฑ๐—ผ๐—ป๐—ฒ๐—ฑ ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฐ๐—ฒ๐˜€ ๐—”๐—ฟ๐—ฐ๐—ต๐—ถ๐˜๐—ฒ๐—ฐ๐˜๐˜‚๐—ฟ๐—ฒ ๐—ถ๐—ป ๐—™๐—ฎ๐˜ƒ๐—ผ๐—ฟ ๐—ข๐—ณ ๐— ๐—ผ๐—ป๐—ผ๐—น๐—ถ๐˜๐—ต? In the latest post (check in the comments), a team that works on Prime Video explained their approach to ensuring that customers receive high-quality content. They use a tool to monitor every stream viewed by customers and use it to identify quality issues. The tool was intended to run on a small scale, so they noticed that ๐—ผ๐—ป๐—ฏ๐—ผ๐—ฎ๐—ฟ๐—ฑ๐—ถ๐—ป๐—ด ๐—บ๐—ผ๐—ฟ๐—ฒ ๐˜€๐˜๐—ฟ๐—ฒ๐—ฎ๐—บ๐˜€ ๐˜๐—ผ ๐˜๐—ต๐—ฒ ๐˜€๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฐ๐—ฒ ๐˜„๐—ฎ๐˜€ ๐˜ƒ๐—ฒ๐—ฟ๐˜† ๐—ฒ๐˜…๐—ฝ๐—ฒ๐—ป๐˜€๐—ถ๐˜ƒ๐—ฒ. So, they decided to revise the architecture. The initial architecture consisted of ๐˜€๐—ฒ๐—ฟ๐˜ƒ๐—ฒ๐—ฟ๐—น๐—ฒ๐˜€๐˜€ ๐—ฐ๐—ผ๐—บ๐—ฝ๐—ผ๐—ป๐—ฒ๐—ป๐˜๐˜€ ๐—ผ๐—ฟ๐—ฐ๐—ต๐—ฒ๐˜€๐˜๐—ฟ๐—ฎ๐˜๐—ฒ๐—ฑ ๐—ฏ๐˜† ๐—”๐—ช๐—ฆ ๐—ฆ๐˜๐—ฒ๐—ฝ ๐—™๐˜‚๐—ป๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐˜€. What they did here is to move expensive operations between components into a single process to keep the data more trans within process memory. Building initial solutions with serverless components was a good choice because it enabled it to be done quickly and scale each component, yet such a way of using some components ๐—ฐ๐—ฎ๐˜‚๐˜€๐—ฒ๐—ฑ ๐—ถ๐˜€๐˜€๐˜‚๐—ฒ๐˜€ ๐—ฎ๐˜ ๐Ÿฑ% ๐—ผ๐—ณ ๐˜๐—ต๐—ฒ ๐—ฒ๐˜…๐—ฝ๐—ฒ๐—ฐ๐˜๐—ฒ๐—ฑ ๐—น๐—ผ๐—ฎ๐—ฑ. After the analysis, they concluded that the distributed approach didn't bring many benefits, so they packed all the components into a single process. ๐— ๐—ผ๐˜ƒ๐—ถ๐—ป๐—ด ๐˜๐—ต๐—ฒ๐—ถ๐—ฟ ๐˜€๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฐ๐—ฒ ๐˜๐—ผ ๐—ฎ ๐—บ๐—ผ๐—ป๐—ผ๐—น๐—ถ๐˜๐—ต ๐—ฟ๐—ฒ๐—ฑ๐˜‚๐—ฐ๐—ฒ๐—ฑ ๐˜๐—ต๐—ฒ๐—ถ๐—ฟ ๐—ถ๐—ป๐—ณ๐—ฟ๐—ฎ๐˜€๐˜๐—ฟ๐˜‚๐—ฐ๐˜๐˜‚๐—ฟ๐—ฒ ๐—ฐ๐—ผ๐˜€๐˜ ๐—ฏ๐˜† ๐—ผ๐˜ƒ๐—ฒ๐—ฟ ๐Ÿต๐Ÿฌ% ๐—ฎ๐—ป๐—ฑ ๐—ถ๐—ป๐—ฐ๐—ฟ๐—ฒ๐—ฎ๐˜€๐—ฒ๐—ฑ ๐˜€๐—ฐ๐—ฎ๐—น๐—ถ๐—ป๐—ด ๐—ฐ๐—ฎ๐—ฝ๐—ฎ๐—ฏ๐—ถ๐—น๐—ถ๐˜๐—ถ๐—ฒ๐˜€. Image credits: Amazon. _______ If you like my posts, please follow me, @milan_milanovic, and hit the ๐Ÿ”” on my profile to get a notification for all my new posts. Grow with me ๐Ÿš€! #technology #softwareengineering #cloudcomputing #techworldwithmilan #softwarearchitecture
15
223
15
849
154,517
A sign you may benefit from useReducer: You're making multiple setState calls in a row. With useReducer, multiple pieces of state can be updated via a single dispatch.
17
31
4
437
117,107
Lahin retweeted
Next.js 13.3 - Parallel Routes and Interception by example ๐Ÿ‘‡
23
102
7
784
189,802
Bye-bye Sinon... Hello, Node.js 20 - using mocks, spies, and stubs natively in @Nodejs ๐Ÿคฏ๐Ÿ”ฅ ๐Ÿงต/1 #javascript #community #opensource #nodejs #news #tutorial #node #metaprogramming #testing #100daysofcode #github
8
141
8
703
โ€œI could do code that in 2 hoursโ€ said senior 10x engineer who had no idea what the requirements even were
Youโ€™re unable to view this Post because this account owner limits who can view their Posts. Learn more
11
21
3
453
The Node.js Security Best Practices just landed!๐Ÿ’š Thanks to everybody involved. Especially the @nodejs Security WG. Check it out: nodejs.org/en/docs/guides/seโ€ฆ
1
111
4
333
When using #React Context if the shared state is big then you may find some unnecessary re-renders and this can make negative impact on performance. react-tracked solves this issue without efforts.
1
1
Promise Chaining in JavaScript. #javascript
1
3
TIL: if you create a page, add this HTML code, and open it on a phone: <link rel="preload" href="img.jpg" media="(min-width: 800px)"> <meta name="viewport" content="width=device-width"> the browser will load img.jpg even though the phone is much narrower than 800px! Why? โฌ‡๏ธ
3
6
24