Programming Tips πŸ’‘
51.6K subscribers
67 photos
10 videos
30 files
354 links
Programming & AI:
Tips πŸ’‘
Articles πŸ“•
Resources πŸ‘Ύ
Design Patterns πŸ’Ž
Software Principles βœ…

πŸ‡³πŸ‡± Contact: @MoienTajik

🎯 Buy ads: https://telega.io/c/ProgrammingTip
Download Telegram
How to think like a programmer ⁉️

β€œI don’t get JavaScript. I can’t make components from scratch. My mind goes blank when I stare at a blank JavaScript file. I guess I can’t do it because I don’t know how to think like a programmer”.


Sounds familiar❔ You’re not alone, my friend.
Many people who tried to pick up JavaScript as their first programming language faced the same problem.

Let today be the day where you learn to think like a programmer.

[ Website ] : https://zellwk.com/blog/think/

γ€°γ€°γ€°γ€°γ€°γ€°
#FreeTime #Think
@ProgrammingTip
Zeplin ✨

Zeplin is the ultimate collaboration tool between designers and developers.

It cuts meetings in half and ensures that designs are implemented perfectly, however complex. πŸ”¨

[Website] : https://zeplin.io

#Tool #FrontEnd
@ProgrammingTip
ASP.NET Core – ConfigureServices vs Configure πŸ› 

In this post, we will see what exactly ConfigureServices and Configure methods are for and how they differ. πŸ€·πŸ»β€β™‚οΈ

[ Website ] : https://codingblast.com/asp-net-core-configureservices-vs-configure/

γ€°γ€°γ€°γ€°γ€°γ€°
#Aspnet #Core
@ProgrammingTip
Today in WTF math of JS 🀣

#Fun #JavaScript
@ProgrammingTip
Git - Differences Between Commits πŸ™‡πŸ»

To see the changes of the last commit, you can use:

 $ git log β€”stat 


This command will show the files and the number of lines added and removed by file in each commit. πŸ’Ž

To see what exactly was changed in a commit, use git diff. πŸ’₯

To see the difference between two commits using sha s of commits in hand (0da94be and 59ff30c), use:

$ git diff 0da94be 59ff30c


#git #commit
@ProgrammingTip
Authentication In ASP.NET Core API πŸ”

β€’ Part 1 - Identity, Access Denied :
https://goo.gl/F4YYKs

β€’ Part 2 - Identity, Access Granted :
https://goo.gl/vmrUY2

β€’ Part 3 - JSON Web Token ( JWT ) :
https://goo.gl/5JVEVt

γ€°γ€°γ€°γ€°γ€°γ€°
#Aspnet #Core #Authentication
@ProgrammingTip
Thinking JavaScript πŸ’‘

The question posed to me was this :
Why does this first line "work" (compiles/runs) but the second line gives an error ⁉️

[[]][0]++;

[]++;


Not that I expect you'll ever intentionally write (or read, hopefully!) code like this, but being able to think more like JavaScript does always help you write better code. βœ…

In this topic, we're gonna answer this question.

[ Website ] : https://davidwalsh.name/thinking-javascript

γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #Compiler #Deep
@ProgrammingTip
Cleave.js πŸ’Ž

Format your <input/> content when you are typing. πŸ“

Supported Formats :
β€’ Credit Card
β€’ Phone Number ( All Countries )
β€’ Date
β€’ Numeral
β€’ Custom Formatting
β€’ ReactJS Component πŸŒ€
β€’ AngularJS Directive πŸ…°οΈ

[ Website ] : http://nosir.github.io/cleave.js/

γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #Library
@ProgrammingTip
Nameof Expression, Avoid Magic Strings 🚢🏻

This is one of many goodnesses that came with C# 6.0 Back in July 2015.

A moment to think about some wild magic string that we could replace with nameof.

[ Website ] : https://codingblast.com/nameof-expression/

γ€°γ€°γ€°γ€°γ€°γ€°
#CSharp #NameOf
@ProgrammingTip
Log Rocket πŸš€

Logging and Session Replay for JavaScript Apps.

Stop guessing why bugs happen,
LogRocket records everything users do on your site, helping you reproduce bugs and fix issues faster.

Provide SDKs for :
β€’ React
β€’ Angular
β€’ Vue
β€’ Redux
β€’ Ember
β€’ Plain JS

[ Website ] : https://logrocket.com/

γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #Logging
@ProgrammingTip
Repl.it πŸ‘Ύ

Repl.it is a cloud coding environment for :
β€’ Kotlin
β€’ C++
β€’ Python
β€’ JavaScript
β€’ Haskell
β€’ Go
β€’ Swift
...

[ Website ] : https://repl.it/

γ€°γ€°γ€°γ€°γ€°γ€°
#Environment #Playground
@ProgrammingTip
β€ŒBootbox.js : Bootstrap modals made easy πŸ”₯

Bootbox.js is a small JavaScript library which allows you to create programmatic dialog boxes using Bootstrap modals, without having to worry about creating, managing or removing any of the required DOM elements or JS event handlers. πŸ’Ž

Here’s the simplest possible example:

bootbox.alert("Hello world!");


or

bootbox.alert("Your message here…",
function(){ /* callback */ })


[ Website ] : http://bootboxjs.com/

γ€°γ€°γ€°γ€°γ€°γ€°
#Bootstrap #Bootbox #JavaScript
@ProgrammingTip
Baffle.js β›“

A tiny (~1.8kb) javascript library for obfuscating and revealing text in DOM elements.

[ Website ] : https://camwiegert.github.io/baffle/

γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #Obfuscate
@ProgrammingTip
Invoking Delegate in an interpolated Verbatim String C# πŸ‘¨πŸ»β€πŸ’»

Try this short program, it has lots of topics to learn.

Console.WriteLine($@"Hello {( (Func<string>) ( () =>
{
Console.Write("What's your name ? ");
return Console.ReadLine();
})).Invoke()}");


γ€°γ€°γ€°γ€°γ€°γ€°
#CSharp #Deep
@ProgrammingTip
True story ...? πŸ˜…

#Fun
@ProgrammingTip
Esprima ✨

Esprima is a high performance, standard-compliant ECMAScript parser written in ECMAScript.

⭕️nline Features :
β€’ Parser
β€’ Syntax Validator
β€’ Regex Collector
β€’ Minify & Obfuscate
β€’ Identifier Highlight
β€’ Rename Refactoring
β€’ AutoComplete

[ Website ] : http://esprima.org/index.html

[ Parser - Produce the syntax tree ] :
http://esprima.org/demo/parse.html

γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #ES
@ProgrammingTip
Do I need to dispose of Tasks ⁉️

β€œ Task implements IDisposable and exposes a Dispose method.
Does that mean I should dispose of all of my tasks ? ”


Short answer to this question πŸ™…πŸ»β€β™‚οΈ :
No. Don't bother disposing of your tasks. 


And for those of you looking for a coffee-break read, here’s long answer :

[ Website ] : http://bit.do/DisposeTasks

γ€°γ€°γ€°γ€°γ€°γ€°
#Dotnet #Parallel #Dispose
@ProgrammingTip
You don’t have to memorize everything when it comes to Programming πŸ™…πŸ»β€β™‚οΈ

Good programmers do not waste their time memorizing everything, every documentation, every piece of information.

But they are good at knowing the concepts and reading the documentation, googling and solving problems.

[ Website ] : http://bit.do/DontWasteTime

γ€°γ€°γ€°γ€°γ€°γ€°
#Tips
@ProgrammingTip
Compare two string by equals() instead == in java πŸ’‘

Use equals() because this method internally checks == plus content equality check. β˜‘οΈ

[ CODE ]
public class Test {

public static void main(String[] args) {
String s1 = "string";
String s2 = "string";
String s3 = new String("string");
String s4 = s3;
String s5 = "str"+"ing";

System.out.println("s1==s2 :"+(s1==s2));
System.out.println("s1==s3 :"+(s1==s3));
System.out.println(
"s1.equals(s3) :"+s1.equals(s3)
);
System.out.println("s3==s4 :"+(s3==s4));
System.out.println(
"s3.equals(s4) :"+s3.equals(s4)
);
System.out.println("s1==s5 :"+(s1==s5));
System.out.println(
"s1.equals(s5) :"+s1.equals(s5)
);
}
}


[ RESULT ]

s1==s2 :true
s1==s3 :false
s1.equals(s3) :true
s3==s4 :true
s3.equals(s4) :true
s1==s5 :true
s1.equals(s5) :true


γ€°γ€°γ€°γ€°γ€°γ€°γ€°γ€°γ€°γ€°

#java
@PorgrammingTip