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
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
#Fun stackoverflow✌️🏻✊🏽
@ProgrammingTip
Programming Entity Framework- DbContext.pdf
7.8 MB
Programming Entity Framework : DbContext πŸ“•

Author: Julia Lerman, Rowan Miller πŸ–Š

Publisher: O'Reilly πŸ“š
γ€°γ€°γ€°γ€°γ€°γ€°
#Book #EF
@ProgrammingTip
Awesome Vue.js πŸ”°

A curated list of awesome Vue.js things πŸ•Ά

[ Website ] :
https://github.com/vuejs/awesome-vue

γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #Vue
@ProgrammingTip
Particles.js ✨

A lightweight JavaScript library for creating particles.

[ Website ] :
http://vincentgarreau.com/particles.js/

γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #Library
@ProgrammingTip
No Need for Temporary Collections, Yield Might Help βœ…

Normally when we need to fetch the items from a collection we might create a Temporary List to hold the retrieved items and return. πŸŒ€

Following is the C# code using the temporary list :

public List<int> GetValuesGreaterThan100 
(List<int> masterCollection)
{
List<int> tempResult = new List<int>();
foreach (var value in masterCollection)
{
if (value > 100)
tempResult.Add(value);
}
return tempResult;
}


βž–βž–βž–βž–βž–βž–βž–

To avoid the usage of this temporary collection you could choose to use the yield. πŸ”₯

It will yield the result as and when the result set is enumerated.

Below is the code using the yield keyword :

public IEnumerable<int> GetValuesGreaterThan100(List<int> masterCollection)
{
foreach (var value in masterCollection)
{
if (value > 100)
yield return value;
}
}

γ€°γ€°γ€°γ€°γ€°γ€°
#CSharp #Collections
@ProgrammingTip
6 Simple Tips on How to Start Writing Clean Code πŸ‘Ύ

1️⃣ Make code readable for people.

2️⃣ Use meaningful names for variables, functions and methods.

3️⃣ Let every function or method perform only one task.

4️⃣ Use comments for clarification ( if really needed )

5️⃣ Be consistent

6️⃣ Review your code regularly

γ€°γ€°γ€°γ€°γ€°γ€°
#CleanCode
@ProgrammingTip
Debug JavaScript with Chrome DevTools 🐞

This tutorial shows you how to debug one specific issue, but the general workflow you learn is helpful for debugging all types of JavaScript bugs.

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

γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #Debug
@ProgrammingTip
Diffrences Between Abstract & InterfaceπŸ’‘

γ€°γ€°γ€°γ€°γ€°γ€°
#Abstraction #Interface
@ProgrammingTip
MultiScroll.js πŸ”ƒ

A simple plugin to create multi scrolling websites with two vertical scrolling panels.

[ Website ] : https://alvarotrigo.com/multiScroll

γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #Library
@ProgrammingTip
Dagger 2

Dagger 2 is a dependency injection (DI) framework. It's based on the javax.inject annotations standard.

[GitHub] : http://bit.ly/2gY3BND

γ€°γ€°γ€°γ€°γ€°γ€°
#Dagger #Java #Android
@ProgrammingTip
Selectize.js πŸ’Ž

Selectize is the hybrid of a textbox and <select> box.
It's jQuery-based and it's useful for tagging, contact lists, country selectors, and so on.

[ Website ] : http://selectize.github.io/selectize.js/

γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #Library
@ProgrammingTip
Waypoints.js ⚑️

Waypoints is the easiest way to trigger a function when you scroll to an element.

[ Website ] : http://imakewebthings.com/waypoints/

γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #Library
@ProgrammingTip