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
MVC TempData – Peek vs Keep 🤙🏻

Most of the MVC developer knows that TempData is used to preserve data for a single request but reality is that TempData can pass data for next request also. 🤷🏻‍♂️

In this article we will discuss how to persist data with TempData using Keep and Peek method.

As well we will also see the difference between Keep and Peek method. 🤔

https://t.me/pgimg/23

[ Article ] : http://bit.do/tmpkp


#AspMvc #TempData
@ProgrammingTip
What is Unit Testing & Why You Need to Lean It ⁉️

Unit testing is the practice of writing code to test your code and then run those tests in an automated fashion.

🔹🔸🔹🔸

Here is an example. 👨🏻‍💻

Imagine you have this function somewhere in your code.
It’s a basic calculate function that takes an input and depending on some conditions, it returns different values.

public float CalculateTax(int input) 
{
if (x) return ...;
if (y) return ...;
return ...;
}


If you want to test this function manually :

1️⃣ You have to run your application
2️⃣ Perhaps you have to login
3️⃣ Maybe do a few clicks here
4️⃣ There to get to a page where this function is used.
5️⃣ You have to fill out a form
6️⃣ Submit it
7️⃣ Verify if this function returned the right result.

And then you have to repeat all these steps, each time using different values in your form. 🤦🏻‍♂️

🔸🔹🔸🔹

Manual testing is expensive 💸

As you can see, this is very time-consuming. ⌛️

This workflow to test this function may take several minutes every time❗️

Now to make matters worse, this is not the only function in your application. 🌍

In a real application, you have tens or hundreds of functions like this ❗️

As your application grows in size and complexity, the time required to manually test all the different bits and pieces increases exponentially.

So, that’s why we use Automated Testing. ♻️

🔺🔹🔺🔹

https://t.me/pgimg/24

[ Full Article ] : http://bit.do/utdd


#CleanCode #UnitTest #TDD
@ProgrammingTip
Why you should join .NET Core and ASP.NET Core train 🚀

.NET Core is a cross-platform version of .NET, that supports almost all that .NET supported. 🖥

🔸🔹🔸

.NET Core and ASP.NET Core are FREE and Open Source but also they are supported by Microsoft. 💸

🔹🔸🔹

ASP.NET Core is cross-platform web framework built on top of .NET Core.

It is built from scratch, however, a lot of old concepts and patterns are still the same.

🔸🔹🔸

• Both, ASP.NET Core and .NET Core are faster and easier to work with, than their predecessors. 💨

🔹🔸🔹

Node. is fast – over 400 000 requests per second.

ASP.NET Core is blazing fast❗️ASP.NET Core (on Linux ! ) itself can handle over 2 Million requests per second.

ASP.NET Core MVC can handle over 1 million requests per second

🔸🔹🔸

https://t.me/pgimg/25

[ Full Article ] : http://bit.do/aspcore


#AspMvc #DotNet #Core
@ProgrammingTip
🤖 Robo 3T : GUI MongoDB Manager 🤖

Robo 3T (formerly Robomongo) is the free lightweight GUI for MongoDB enthusiasts.

3T will continue development of Robo 3T in parallel with its own MongoDB GUI and the good news is that it will be making Robo 3T free for all users from now on. 💰

This is an exciting new step for Robo 3T and its community, which will benefit users and the wider MongoDB ecosystem. 👨‍💻


Native and cross-platform MongoDB manager
Whatever platform you use today - Robo 3T is available for you. Distributed as a native application, fast and snappy Robo 3T uses very little of your machine resources. ♻️

Windows users : 52%
Mac OS X users : 32%
Linux users : 16%

[Website] : http://robomongo.org/


#mongo #robomongo #robo3t
@ProgrammingTip
https://t.me/pgimg/26
Awesome .NET Core 🕶

A collection of awesome .NET Core frameworks, libraries, tools, resources and software. 💎

Contents ⚡️ :
General
Framework, Libraries & Tools
Starter Kits
Sample Projects
Articles
Books
• Videos
• Podcasts
• Community

https://t.me/pgimg/27

[ GitHub ] : http://bit.do/aspres

#AspMvc #Core #Resource
@ProgrammingTip
Angular 4 in 20 minutes 🅰️

So, do you want to learn the fundamentals of Angular 4 in a quick and easy way

You don’t need familiarity with any previous versions of Angular. 🙅🏻‍♂️

In this tutorial, We're going to take you from the ground up and show you Angular 4 in action.

You only need a basic familiarity with HTML, CSS, and JavaScript. 📍

https://t.me/pgimg/28

[ Tutorial ] : http://bit.do/angtut


#Angular #SPA
@ProgrammingTip
Moment.js 📅

Parse, validate, manipulate, and display dates and times in JavaScript. 👌🏻

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

#JavaScript #MomentJs
@ProgrammingTip
Programming Tips 💡
Photo
Head First Design Patterns.pdf
40.1 MB
Head First Design Patterns 📕

Authors : Bert Bates, Kathy Sierra, Eric Freeman, Elisabeth Robson 🖊

Publisher : O'Reilly 💎

Level : Advanced 🔝


#Book #DesignPatterns
@ProgrammingTip
Sympli

Design handoff, implementation,
and collaboration for web and mobile
product teams. ✏️

Sympli works with 😲 :
Photoshop
Sketch
Android Studio
XCode

https://t.me/pgimg/29

[ Website ] : https://sympli.io/


#Tools #FrontEnd
@ProgrammingTip
Firefox Quantum: Developer Edition

Firefox has been rebuilt from the ground up to be faster and more powerful than ever. 💪🏻

This includes a new CSS engine that has state-of-the-art innovations and is blazingly fast. 💨

DevTools 💎 :
Inspector
Console
Debugger
Network
Storage Panel
Responsive Design Mode
Visual Editing
Performance
Memory
Web Audio
ScratchPad
Style Editor

https://t.me/pgimg/30

[ Download ] : http://bit.do/fquan


#FireFox #Quantum #Tools
@ProgrammingTip
Entity Framework Plus ⚡️

Extend and Overcome Entity Framework Limitations with Must-Have Features 💎

100% Free and Open Source 💸

Features 🔥 :
Auditing
Batch Delete
Batch Update
LINQ Dynamic
Query Cache
Query Deferred
Query Filter
Query Future
Query IncludeFilter
Query IncludeOptimized

🔹🔸🔹🔸

Support :
EF Core
EF6
EF5

https://t.me/pgimg/31

[ Website ] : http://entityframework-plus.net/


#EF #ZZZProjects
@ProgrammingTip
GIGO ♻️

GIGO is a computer science acronym that implies bad input will result in bad output, which stands for :

Garbage in 🗑
Garbage Out 🚮

🔸🔹🔸🔹

Because computers operate using strict logic, invalid input may produce unrecognizable output, or "garbage."

For example, if a program asks for an integer and you enter a string, you may get an unexpected result.

Good programming practice dictates that :
"Functions should check for valid input before processing it."


A well-written program will avoid producing garbage by not accepting it in the first place.☝🏻

Requiring valid input also helps programs avoid errors that can cause crashes and other erratic behavior. ⚡️

https://t.me/pgimg/33


#Principle
@ProgrammingTip
Mocking objects with Moq and XUnit in .NET Core 👾

This article explains the step by step process that needed to Moq an object in .NET Core ⚜️

Mocking objects comes in handy when unit testing data store, where a Database can be mocked so that no data is added or modified in Database while unit testing source code. ♻️

https://t.me/pgimg/32

[ Tutorial ] : http://bit.do/moqx


#UnitTest #Mocking #XUnit #Moq
@ProgrammingTip
Yeah, Good job‼️😂

#Fun #SoC
@ProgrammingTip
Webpack 🌀

Webpack is a module bundler. 🗂

Its main purpose is to bundle JavaScript files for usage in a browser, it is also capable of transforming, bundling, or packaging. 💎

[ Website ] : https://webpack.js.org/

https://t.me/pgimg/34


#Webpack #Bundler
@ProgrammingTip
Explicit Dependencies Principle

Classes should be honest about what they need to be created. 🗣

Methods and classes should explicitly require any collaborating objects they need { typically through method parameters or constructor parameters } in order to function correctly.

[ Article ] : http://bit.do/expp

https://t.me/pgimg/35

#Principle
@ProgrammingTip
CSS Variables — What You Need to Know 🎨

CSS variables are more accurately described as custom properties.

They are useful in preventing DRY — Don’t Repeat Yourself code.

With the ability to change a property once and have that change made all over your style sheet is magical ❗️

[ Article ] : http://bit.do/cvar


#CSS #Variable
@ProgrammingTip
Hashids 👾

Hashids is a small open-source library that generates short, unique, non-sequential ids from numbers. 💎

It converts numbers like 347 into strings like “yr8”, or array of numbers like [27, 986] into “3kTMd”. 🌀

You can also decode those ids back. 🔙

Available in 🔥 :
JavaScript
.NET
Java
PHP
Ruby
Python
Swift
...

🔸🔹🔸🔹

Usage example in JavaScript 🤙🏻 :

var hashids = new Hashids("this is my salt", 8, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");

var id = hashids.encode(1, 2, 3);
// Output : GlaHquq0

var numbers = hashids.decode(id);
// Output : [1, 2, 3]



https://t.me/pgimg/36

[ Website ] : http://hashids.org/


#Encode #Hash
@ProgrammingTip
The Art of Comments 🎨

[ Article ] : https://css-tricks.com/the-art-of-comments/


#CleanCode #Comments
@ProgrammingTip