for-coder
430 subscribers
110 photos
57 videos
25 files
145 links
@FORCODERR

@firaflash ๐Ÿ‘จโ€๐Ÿ’ป
Download Telegram
๐Ÿ“ Top 10 Clean Code Rules


๐Ÿ• 2m read time
๐Ÿšซ No Code Comments โ€“ Strive for self-explanatory code; let the code speak for itself.
๐Ÿ—‘ Delete Dead Code โ€“ Remove unused or unnecessary code to keep things tidy.
๐Ÿ”ฌ Unit Test Boundaries โ€“ Ensure each unit is well-tested and behaves as expected.
๐Ÿ‘ Use Positive Conditionals โ€“ Write conditions that are easy to understand and avoid negatives.
๐Ÿ“š Adhere to Standard Guidelines โ€“ Follow industry conventions and best practices.
๐Ÿ”  Consistent Naming โ€“ Use meaningful and consistent names for variables, methods, etc.
โš–๏ธ Avoid Complexity โ€“ Keep things simple and easy to understand.
๐Ÿšจ Use Exceptions Instead of Return Codes โ€“ Rely on exceptions for handling errors rather than return codes.
โœ‚๏ธ Keep Methods Small โ€“ Each method should do one thing and do it well.
๐Ÿ‘ฎ Apply the Boy Scout Rule โ€“ Always leave the code cleaner than you found it.
These principles will help you write clean, maintainable code! ๐Ÿ’ป๐Ÿ’ก

ยปยปยปยปFor More ยซยซยซยซ
#แˆ˜แˆแŠซแˆ_แ‹จแ†แˆ_แŒŠแ‹œ

let fasting = false;

const startDate = new Date();
startDate.setHours(0, 0, 0, 0); //(12:00 AM)

const endDate = new Date("2025-04-20T03:00:00");

const durationInMilliseconds = endDate - startDate;


fasting = true;
console.log("แ†แˆ/fasting started.");

// setTimeout to handle the end of the fasting period
setTimeout(() => {
fasting = false; // Set fasting to false after 55 days
console.log("แˆตแˆˆแแ‰…แˆฉ แˆฒแˆ แŠจแˆ™แ‰ณแŠ• แ‰ฐแˆˆแ‹ญแ‰ถ แ‰ฐแАแˆตแ‰ทแˆ"); // Log the message
console.log("แ†แˆ/fasting ended.");
}, durationInMilliseconds);


If you don't understand this code แ‰ แ‹ฐแŠ•แ‰ฅ แแˆ™ #แˆŽแˆ_lol
๐Ÿ˜6๐Ÿ‘2
Anybody else's IG feed going nuts? ๐Ÿ”ซโ˜ ๏ธ๐Ÿ’ฅ
๐Ÿ‘1๐Ÿฅด1
Ramadan Mubarak๐Ÿฅณ๐Ÿฅณ๐ŸŽ‰๐ŸŽ‰

แ‹จ1446 แ‹“.แˆ‚ แ‹จแˆจแˆ˜แ‹ณแŠ• แ‹ˆแˆญ แŒจแˆจแ‰ƒ แ‰ แˆ˜แ‰ณแ‹จแ‰ทแค แАแŒˆ แ‰…แ‹ณแˆœ แ‹จแŠซแ‰ฒแ‰ต 22/2017 แ‹จแ‹ˆแˆฉ แ‹จแˆ˜แŒ€แˆ˜แˆชแ‹ซ แ‰€แŠ• แŠฅแŠ•แ‹ฐแˆšแˆ†แŠ• แ‰ณแ‹แ‰‹แˆแกแก ๐ŸŒ™โœจ

Wishing you a wonderful Ramadan!
โค2
const obj1 = { id: 1 };
const obj2 = { id: 1 };
const obj3 = obj1;

console.log(obj1 === obj2);
console.log(obj1 === obj3);
What is the output of the above code
Anonymous Quiz
26%
false true
11%
true false
46%
true true
13%
false false
4%
error
โค1
แŠฅแŠ•แŠณแŠ• แˆˆ129แŠ›แ‹ ๐Ÿ† แ‹จแ‹“แ‹ตแ‹‹ แ‹ตแˆ แ‰ แ‹“แˆ แŠ แ‹ฐแˆจแˆณแ‰ฝแˆ! ๐Ÿ‡ช๐Ÿ‡น๐ŸŽ‰

Congratulations on the 129th anniversary of the Victory of Adwa! โœŠ๐Ÿพ๐Ÿ”ฅ

โš”๏ธ Battle of Adwa ๐Ÿน๐Ÿ›๏ธ
#W's in the chat
๐Ÿ”ฅ3
Check out this guy lol
Learning C++ the right way ๐Ÿ˜ญ๐Ÿ˜๐Ÿฆ
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿคฃ9๐Ÿ˜2
๐Ÿ”ฅ Lynx: A React Native Killer? ๐Ÿ”ฅ

๐Ÿ• 1 min read time
ByteDance just dropped Lynx, a Rust-powered, multi-platform framework that could shake up mobile dev. It ditches React Nativeโ€™s JavaScript bridge bottlenecks for a dual-threaded UI engine, promising faster load times, smoother UI, and true CSS support.

โœ… Pros: Blazing fast, framework-agnostic (React, Vue, Svelte), real CSS, Rust-powered.
โŒ Cons: New & unpolished, small ecosystem, Windows issues.

Lynx looks promising but isnโ€™t quite there yet. Will it replace React Native? Maybe. Are you trying it? ๐Ÿš€

read_more
โœจTo all the incredible women coders lighting up the world like moonlight on a northern streetโ€”keep shining, keep rising, and keep owning your path. ๐ŸŒ™๐Ÿ’ช Happy Women's Day!
๐Ÿ’œ๐ŸŽ‰
๐Ÿ‘2
var a = 10;
function foo() {
console.log(a);
var a = 20;
}
foo();
What is the output of the above code
Anonymous Quiz
43%
10
16%
Reference error
31%
20
10%
Undefined
This media is not supported in your browser
VIEW IN TELEGRAM
Been off latelyโ€ฆ had to train my finger to hit Tab professionally ๐Ÿ‹๏ธโ€โ™‚๏ธโŒจ๏ธ
#coding_meme@forcoder #codingmeme
 
function yapp(){
console.log(typeof null );
}

yapp();
What is the output of the above code
Anonymous Quiz
21%
undefined
38%
null
17%
error
25%
object
for-coder
What is the output of the above code
Hint:

It is still a bug ๐Ÿ›, hasn't been fixed
I'll talk about it later
๐Ÿ‘1
๐Ÿšจ JAVASCRIPT HAS A REAL BUG! ๐Ÿšจ


Open your console and type:
typeof null


You'll get:
'object'


That's wrongโ€”null is not an object!

๐Ÿ” How did this happen?

When JavaScript was first implemented, values were stored in a tagged format, where the lower bits determined the type:
- Objects had a type tag of 0.
- null was stored as 0 in memory.

Since null had 0 in its type tag, typeof mistakenly classified it as an "object".

๐Ÿ”ง Why isn't it fixed?
One word: Backward compatibility.
Fixing it would break too many apps, so it's here to stay!

๐Ÿ’ฌ Share this with JavaScript haters new (Lovers)... Lmao

#JavaScript #Bug #Programming
๐Ÿ‘จโ€๐Ÿ’ป1
Two different users of cursor๐Ÿ˜ญ
๐Ÿ‘2๐Ÿ˜ข2
This media is not supported in your browser
VIEW IN TELEGRAM
Difference between programmers and @astonhall
๐Ÿ˜1