korean lover | fullstack developer | angular js | react js | react native | nodejs | nextjs | nestjs | AWS S3 | AWS EC2

Joined September 2020
96 Photos and videos
Taniya malviya retweeted
10 VS Code extensions that will 10x your productivity:
30
238
2,091
216,542
Taniya malviya retweeted
9 Aug 2025
peak dev happiness: everyone looking at the same bug and pretending they understand.
5
9
97
3,161
Taniya malviya retweeted
thisIsWhyILoveLinux redd.it/1mhyao6
13
59
623
31,105
Can't add a method to a class you don't own? Use a Foreign Method! - Create the method in YOUR code - Pass the utility object as parameter Example (JS):
function formatWithTimezone(date) { return StringUtils.format(date) " UTC"; } #ProgrammingTips #CodeRefactoring
1
16
🫶🏻
1
20
Remove Middle Man: When a class just delegates calls (adding no value): - Delete the delegating methods - Make clients call directly Before: manager.getEmployee().getName() After: employee.getName() Cut the pointless proxy! #CleanCode #Refactoring
1
19
Hide Delegate:
If clients access object B through object A, make A handle the call instead. Before:
a.getB().doSomething() After:
a.doSomething() Reduces coupling! #CleanCode #OOP Example:
user.getAddress().format() → user.formatAddress()
1
31
Taniya malviya retweeted
Fixing Pain as a Typescript Dev
91
235
2,626
99,840
Extract Class:
When one class tries to do two jobs:
- Split into two classes
- Connect via reference Before:
class User { saveToDB() {...} sendEmail() {...} } After:
class User {} class EmailService {} #SOLID #Refactoring
1
20
Move Field Refactoring:
- Add field to new class
- Redirect all old field access - Delete old field Keeps data where it’s used most! #CleanCode #Refactoring Example:
user.address → profile.address
15
Move Method:
When a method is used more by another class than its own:
- Cut from source class
- Paste into target class - Update references Keeps behavior near its data! #OOP #Refactoring Example:
user.getAddress() → address.format()
2
32
Taniya malviya retweeted
27 Jul 2025
you joined twitter. ↓ you didn’t understand. ↓ forgot about it for years. ↓ came back randomly one day. ↓ you got addicted.
252
285
3,409
125,965
Swapping algorithms? Do it! Old: for-loop summation New: arr.reduce() #CodeQuality #WebDev #DesignPattern #Javascript
2
17
Taniya malviya retweeted
20 Jul 2025
real
41
56
483
13,087
Replace Method with Method Object:
When: A method is too complex (dozens of lines, many vars). Before:
function calc() { /* 50 lines */ } After:
class Calculator { execute() { /* split logic */ } } #Refactoring #CleanCode
1
18
Never reassign parameters! Use a local var instead. Before: function foo(x) { x = 2; }
After: function foo(x) { const y = 2; } #JavaScript #CodeSmells
1
18
I have two kinds of problems, the urgent and the important. The urgent are not important, and the important are never urgent. (By Eisenhower)
1
11
Split temps = One job per variable. Before: let t = x(); t = y();
After: const a = x(); const b = y(); #CodeQuality #JavaScript
13
Replace Temp with Query (JS): Before:
const discount = basePrice * 0.1;
return total - discount; After:
function getDiscount() { return basePrice * 0.1; }
return total - getDiscount(); #JavaScript #CodeQuality
1
15
Inline Temp Refactoring:
Replace a variable with its expression. Before:
const discount = basePrice * 0.1;
return total - discount; After:
return total - (basePrice * 0.1); Make simple code!! #CleanCode #Refactoring
1
14