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
Authentication in ASP.​NET Core for your Web API and Angular2+ using JWT πŸ”‘

Authentication in a single page application is a bit more special, if you just know the traditional ASP.NET way.

To imagine that the app is a completely independent app like a mobile app helps.

Token based authentication is the best solution for this kind of apps.

https://t.me/pgimg/11

[ Website ] : http://bit.do/jwtasp
γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #WebApi #Authentication #JWT
@ProgrammingTip
🌈 WebGradients

WebGradients is a free collection of 180 linear gradients that you can use as content backdrops in any part of your website. πŸ–₯

Easy copy CSS3 Crossbrowser code and use it in a moment! They Have also prepared a .PNG version of each gradient. As a bonus, there are packs for Sketch & Photoshop. πŸ”₯

https://t.me/pgimg/12
[ Website ] : https://webgradients.com/

γ€°γ€°γ€°γ€°γ€°γ€°
#css #color #gradient
@ProgrammingTip
Yagni : You Arent Gonna Need It πŸ‘Ύ

Never Add Functionality Early πŸ’‘

"Always implement things when you actually need them, never when you just foresee that you need them."


Even if you're totally, totally, totally sure that you'll need a feature later on, don't implement it now. ⏳

Usually, what you actually need is quite different from what you foresaw needing earlier. πŸ™…πŸ»β€β™‚οΈ

This doesn't mean you should avoid building flexibility into your code. βœ…

It means you shouldn't overengineer something based on what you think you might need later on. ❌

πŸ”ΉπŸ”ΈπŸ”ΉπŸ”ΈπŸ”ΉπŸ”Έ

There are two main reasons to practise YagNi :

1️⃣ You save time, because you avoid writing code that you turn out not to need.

2️⃣ Your code is better, because you avoid polluting it with 'guesses' that turn out to be more or less wrong but stick around anyway.

This also follows the KISS theorem:
Keep it simple, stupid!


https://t.me/pgimg/13
γ€°γ€°γ€°γ€°γ€°γ€°
#CleanCode #Principles #Tips
@ProgrammingTip
CLion : A cross-platform IDE for C and C++ 🦁

Thanks to native C and C++ support, including C++11 and C++14, libc++ and Boost, CLion knows your code through and through and takes care of the routine while you focus on the important things.

https://t.me/pgimg/14
[ Website ]: https://www.jetbrains.com/clion

γ€°γ€°γ€°γ€°γ€°γ€°
#ide #c #cpp
@ProgrammingTip
LiteDB πŸ“¦

Embedded NoSQL database for .NET βœ…

An open source MongoDB-like database with zero configuration - mobile ready πŸ“±

πŸ”ΉπŸ”ΈπŸ”ΉπŸ”ΈπŸ”Ή

Features πŸ’Ž :

β€’ Standalone database - LiteDB is serverless database delivered in a single DLL ( Less than 250KB )

β€’ Fast & Lightweight - LiteDB is a simple and fast NoSQL database solution. πŸ’¨

β€’ LINQ Support

β€’ Fluent API for custom mapping

β€’ Free πŸ’Έ

πŸ”ΉπŸ”ΈπŸ”ΉπŸ”ΈπŸ”Ή

Ideal for :
β€’ Mobile Apps
β€’ Desktop/local small applications
β€’ Application file format
β€’ Small web applications
β€’ One database per account/user data store

https://t.me/pgimg/15

[ Website ] : http://www.litedb.org/
γ€°γ€°γ€°γ€°γ€°γ€°
#Database #LiteDB
@ProgrammingTip
Difference between \n and \r πŸ‘€

In Unix and all Unix-like systems, \n is the code for end-of-line, \r means nothing special. πŸ€·πŸ»β€β™‚οΈ

As a consequence, in C and most languages that somehow copy it (even remotely), \n is the standard escape sequence for end of line (translated to/from OS-specific sequences as needed)

in old Mac systems (pre-OS X), \r was the code for end-of-line instead. πŸ–₯

As a (surprising) consequence (harking back to OSs much older than Windows), \r\n is the standard line-termination for text formats on the Internet. 🌏

For electromechanical teletype-like "terminals", \r commands the carriage to go back leftwards until it hits the leftmost stop (a slow operation), \n commands the roller to roll up one line (a much faster operation) β€” that's the reason you always have \r before \n, so that the roller can move while the carriage is still going leftwards!.

For character-mode terminals (typically emulating even-older printing ones as above), in raw mode, \r and \n act similarly (except both in terms of the cursor, as there is no carriage or roller) πŸ˜‰

γ€°γ€°γ€°γ€°γ€°γ€°
#scape_secuence
@ProgrammingTip
14 Hot Chrome Extensions for Geeks πŸ”₯

β€’ Similar Web
β€’ Vimium
β€’ Grammarly
β€’ Image Size Info
β€’ Google Analytics Debugger
β€’ Tabstop
β€’ Session Buddy
β€’ Octotree
β€’ Ratings Preview for YouTubeβ„’
β€’ The Greate Suspender
β€’ Papier
β€’ Fontface Ninja
β€’ Marmoset
β€’ Lighthouse

https://t.me/pgimg/16

[ Website ] : http://bit.do/cext
γ€°γ€°γ€°γ€°γ€°γ€°
#Chrome #Extension
@ProgrammingTip
C# 7.1 - Everything You Need To Know ✨

Visual Studio 2017.3 brought with it the first minor update to the C# language, C# 7.1 πŸ’Ž

This update adds 4 new features to C# :
1️⃣ Async Main Method
2️⃣ Default Literal Expressions
3️⃣ Inferred Tuple Element Names
4️⃣ Generic Support For Pattern-Matching

πŸ”ΈπŸ”ΉπŸ”ΈπŸ”Ή

In this post, you'll learn :

β€’ How to enable the new C# 7.1 language features in your projects

β€’ Everything you need to know to start using all four of the new features

β€’ Some gotchas with using C# 7.1 in razor views.

https://t.me/pgimg/17

[ Website ] : http://bit.do/csnfe
γ€°γ€°γ€°γ€°γ€°γ€°
#CSharp
@ProgrammingTip
C# 7.1 - What's New Quick Start eBook.pdf
544.7 KB
C# 7.1 - What's New Quick Start eBook πŸ“•

Author : Jason Robert πŸ–Š
γ€°γ€°γ€°γ€°γ€°γ€°
#Book #CSharp
@ProgrammingTip
Modern JavaScript Cheatsheet 🍭

This document is a cheatsheet for JavaScript you will frequently encounter in modern projects and most contemporary sample code. πŸ‘¨πŸ»β€πŸ’»

https://t.me/pgimg/18

[ Github ] : http://bit.do/mosc
γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #CheatSheet
@ProgrammingTip
DRY - Dont Repeat Yourself πŸ™…πŸ»β€β™‚οΈ

Duplication can lead to maintenance nightmares, poor factoring, and logical contradictions. ❌

The DRY Principle states :

"Every piece of knowledge must have a single, unambiguous, authoritative representation within a system."


πŸ”ΉπŸ”ΈπŸ”ΉπŸ”Έ

Duplication, and the strong possibility of eventual contradiction, can arise anywhere in :

β€’ Architecture
β€’ Requirements
β€’ Code
β€’ Documentation

The effects can range from mis-implemented code and developer confusion to complete system failure.

πŸ”ΊπŸ”ΉπŸ”ΊπŸ”Ή

Advantages of DRY πŸ’Ž :

β€’ Maintainability
β€’ Readability
β€’ Reuse
β€’ Testing

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

https://t.me/pgimg/19
γ€°γ€°γ€°γ€°γ€°γ€°
#DRY #Principle
@ProgrammingTip
Flat Icons πŸ’«

The largest database of free icons available in PNG, SVG, EPS, PSD and BASE 64 formats and change color of them before download in Flat Icon. 🏞

[ Website ] : https://flaticon.com
γ€°γ€°γ€°γ€°γ€°γ€°γ€°
#Icon #Tools
@ProgrammingTip
Do You Know Where Your TempData is ❓

TempData is a bucket where you can dump data that is only needed for the following request. πŸ“¦

That is, anything you put into TempData is discarded after the next request completes. ❎

This is useful for one-time messages, such as form validation errors❗️

If you need something more persistent, Session is likely what you’re looking for. πŸ“₯

By default, TempData is stored in the session.

πŸ”ΉπŸ”ΈπŸ”ΉπŸ”Έ

In this article you see how TempData works and how you can use another provider instead of Session to store the data. πŸŒ€

https://t.me/pgimg/20

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

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #TempData #Deep
@ProgrammingTip
Programming Tips πŸ’‘
Photo
Design Patterns - Explained Simply.pdf
1.2 MB
Design Patterns - Explained Simply πŸ’Ž
Author : Alexander Shvets πŸ–Š
γ€°γ€°γ€°γ€°γ€°γ€°
#Book #DesignPatterns
@ProgrammingTip
SOLID Principles : Simply Explained ✨

β€’ Single Responsibility
β€’ Open / Closed
β€’ Liskov Subsitution
β€’ Interface Segregation
β€’ Dependency Inversion

γ€°γ€°γ€°γ€°γ€°γ€°
#OOP #Principle #Solid
@ProgrammingTip
Learn JavaScript: Logical AND / OR / NOT πŸ‘Ύ

JavaScript has 3 logical operators.

They can be used with boolean or non-boolean values.

In this article we’ll be exploring logical operators when they are used with boolean values.

β€’ And &&
β€’ Or ||
β€’ Not !

https://t.me/pgimg/21

[ Article ] : http://bit.do/jsopr
γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #Operators
@ProgrammingTip
Cdnjs πŸ“š

Cdnjs host all popular web related libraries like JavaScript libraries, CSS Frameworks, ... to speed up your website. ✨

Supports :
β€’ HTTP 2.0
β€’ HTTP
β€’ HTTPS
β€’ SPDY

πŸ”ΉπŸ”ΈπŸ”ΉπŸ”Έ

Currently, Cdnjs is one of the most famous free and public web front-end CDN services which is used by ~2,380,000 websites.

[ Website ] : https://cdnjs.com

γ€°γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #Tools #Web
@ProgrammingTip