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
Q&A: Successful Developer Career Strategies πŸ’Ž

The field of computer science is huge, far too wide for anyone to master in all areas. 🌍

We all need to make difficult choices about how and where we spend our time. ⏰

It’s often said that in order to be successful in this industry you need to specialize. πŸ€“

But it’s also often said that you need a wide range of experience. βœ…

So what is more important : breadth or depth ⁉️

This is a very difficult question, and is why I asked for the advice of some of the very brightest minds in our industry. πŸ‘‘

Our expert panel is comprised of the following seven developers πŸ‘₯ :

β€’ Scott Allen
β€’ Mark Seemann
β€’ Julie Lerman
β€’ Kyle Simpson
β€’ Troy Hunt
β€’ Oren Eini
β€’ Cory House

https://t.me/pgimg/99

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

γ€°γ€°γ€°γ€°γ€°γ€°
#QA #Strategy
@ProgrammingTip
ASP.NET Core Interview Questions πŸ’Ό

This post is about ASP.NET Core Interview Questions. ⁉️

These questions are directly tied to ASP.NET Core. βœ…

They are not meant to serve as only questions that you would ask a candidate during an interview. ❌

Use these to assess if the candidate has any knowledge about ASP.NET Core. πŸ‘“

The questions should serve as guidelines for core ASP.NET Core concepts that candidate should be familiar with. πŸ‘ͺ

https://t.me/pgimg/100

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

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #AspCore #Core #Interview
@ProgrammingTip
Generating Friendly URLs in ASP.NET MVC πŸ¦„

Have a look at the following URL πŸ‘€ :

http://www.amazon.com/gp/product/1617292397/ref=s9_psimh_gw_p14_d4_i1?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=desktop-1&pf_rd_r=0TFM5Q6WM6KD9NPNG9G7&pf_rd_t=36701&pf_rd_p=2079475242&pf_rd_i=desktop


Do you have any idea what the URL is pointing to by just looking at it❓Most likely not.

Now look at this one πŸ’Ž :

http://www.dpreview.com/articles/9485436827/the-big-beast-hands-on-with-the-panasonic-lumix-dmc-gx8


Any idea❓Well it would seem that it is an article about a hands-on with the Panasonic Lumix DMX-GX8. πŸ–₯

In today’s blog post I would like to demonstrate how to generate β€œfriendly URLs” in your ASP.NET applications. βœ…

Friendly not just in the sense that someone can look at it and figure out what the URL is pointing to, but more importantly friendly for search engines. 🌐

https://t.me/pgimg/101

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

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #SEO
@ProgrammingTip
Fasify.io ⚑️

An efficient server implies a lower cost of the infrastructure, a better responsiveness under load and happy users. πŸ€“

How can you efficiently handle the resources of your server, knowing that you are serving the highest number of requests as possible, without sacrificing security validations and handy development ⁉️

Enter Fastify. Fastify is a web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture. It is inspired by Hapi and Express and as far as we know, it is one of the fastest web frameworks in town. πŸ”₯

Install πŸ“₯
npm install fastify --save


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


[ Example ]

// Require the framework and instantiate it
const fastify = require("fastify") ()

// Declare a route
fastify.get("/", function (request, reply) {
reply.send({ hello: "world" })
})

fastify.listen(3000, function (err) {
if (err) throw err
console.log(`server listening on ${fastify.server.address().port}`)
})


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


[ Async-Example ]

const fastify = require('fastify')()

fastify.get('/', async (request, reply) => {
reply.type('application/json').code(200)
return { hello: 'world' }
})

fastify.listen(3000, function (err) {
if (err) throw err
console.log(`server listening on ${fastify.server.address().port}`)
})


https://t.me/pgimg/102


[ Website ] : https://www.fastify.io

γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #NPM #Fastify
@ProgrammingTip
Anatomy of an ASP.NET Identity PasswordHash πŸ”

Have you ever looked at a user record in an ASP.NET Identity’s users table and wondered just what is being saved on the PasswordHash column❓

It looks like this (it’s in base64) :
AQAAAAEAACcQAAAAEJSPbbFM1aeXB8fGRV7RRamLpjzktAF7FjwDWtFx35eol4AxN6vm4zWR9EApc7WPsQ


Apart from maybe satisfying your curiosity, what could you benefit from knowing exactly what’s on that seemingly random sequence of characters❓

Well, you could confidently update from different versions of ASP.NET Identity. πŸŒ€

Also, if you ever get tired of ASP.NET Identity for whatever reason, you could move your user accounts to whatever alternative you found that might be better. βœ…

Or, you just want to have a simple users’ table and not have to deal with all of what you need to know to make ASP.NET Identity work. πŸ‘₯

All of this while still being able to move your user accounts to ASP.NET Identity some day if you choose to do so. ♻️

https://t.me/pgimg/103

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

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #Identity
@ProgrammingTip
The Clean Coder.pdf
2.8 MB
The Clean Coder : A Code of Conduct for Professional ProgrammersπŸ“•

Author : Robert C. Martin πŸ–Š

Level : Advanced πŸ’Ž

γ€°γ€°γ€°γ€°γ€°γ€°
#Book #CleanCode
@ProgrammingTip
Mocky πŸ€–

Mock your HTTP responses to test your REST API. πŸ‘Ύ

Mocky is a simple app which allows to generate custom HTTP responses. 🌐

It's helpful when you have to request a build-in-progress WS, when you want to mock the backend response in a singleapp, or when you want to test your WS client. βœ…

Is Mocky online❓
Yes, Mocky is online, free and unlimited. πŸ’Έ

https://t.me/pgimg/104

[ Website ] : mocky.io

γ€°γ€°γ€°γ€°γ€°γ€°
#Mock #Rest
@ProgrammingTip
NopCommerce ID-Less URL Structure Demystified πŸ’Ž

The link for my NopLite - nopCommerce Responsive Theme is ✨ :
http://www.pronopcommerce.com/noplite-nopcommerce-responsive-theme


You don't see ANY integer in the URL, but nopCommerce somehow knows how to map from the URL to the appropriate ID. βœ…

On the other hand, the nopCommerce 2.65 URL for my NopLite theme would have been πŸ‘ŽπŸ» :
http://www.pronopcommerce.com/p/7/noplite-nopcommerce-responsive-theme


Note the '7' somewhere in between the URL, that's the Integer Product ID. πŸ—ƒ

So the question is, how does nopCommerce 2.70 and 2.80 know the ID without looking the ID❓

https://t.me/pgimg/105

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

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #Routing #NopCommerce
@ProgrammingTip
Pretty Checkbox 🌈

A pure CSS library to beautify checkbox and radio buttons. ✨

Framework Compatability πŸ”₯ :
β€’ Angular
β€’ Bootstrap
β€’ React
β€’ Vue

https://t.me/pgimg/106

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

γ€°γ€°γ€°γ€°γ€°γ€°
#CSS #Library
@ProgrammingTip
HTTP codes as Valentine’s Day comics πŸ’™

With Valentine’s Day around the corner, it is a time for romantic hopefuls to ask out the object of their affection, and await an answer. 🀠

It could be a simple β€œyes,” a sad β€œno,” or a cryptic β€œI don’t think about you that way, but maybe we can grab a coffee tomorrow❓”

Which brings us to HTTP (Hypertext Transfer Protocol) codes. 🌐

When a URL is typed in a browser, a request is sent out to the server and the browser awaits an answer, just like in our scenario. ♻️

These answers come in the form of an HTTP code, which is a three-digit number that maps to an answer. 2️⃣0️⃣0️⃣

With the image of Valentine’s Day in mind, here are a few likely scenarios. πŸ˜†β€οΈ

https://t.me/pgimg/107

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

γ€°γ€°γ€°γ€°γ€°γ€°
#HTTP #Valentine #Fun
@ProgrammingTip
Pug 🐢

Pug is a high-performance template engine heavily influenced by Haml and implemented with JavaScript for Node.js and browsers. βœ…

Pug is a clean, whitespace sensitive syntax for writing html. 🌐

Here is a simple example πŸ’Ž :
doctype html
html(lang="en")
head
title= pageTitle
script(type='text/javascript').
if (foo) bar(1 + 5)
body
h1 Pug - node template engine
#container.col
if youAreUsingPug
p You are amazing
else
p Get on it!
p.
Pug is a terse and simple templating language with a
strong focus on performance and powerful features.


Becomes :
<!DOCTYPE html>
<html lang="en">
<head>
<title>Pug</title>
<script type="text/javascript">
if (foo) bar(1 + 5)
</script>
</head>
<body>
<h1>Pug - node template engine</h1>
<div id="container" class="col">
<p>You are amazing</p>
<p>Pug is a terse and simple templating language with a strong focus on performance and powerful features.</p>
</div>
</body>
</html>


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

βž– Implementations in other languages πŸ‘Ύ
Ports with very close syntax, adapted to other languages :
β€’ PHP
β€’ Java
β€’ Python
β€’ Ruby
β€’ C# (ASP.NET Core)

https://t.me/pgimg/108

[ Github ] : http://bit.do/pugv

γ€°γ€°γ€°γ€°γ€°γ€°
#ViewEngine #TemplateEngine
@ProgrammingTip
Using Google reCAPTCHA in ASP.NET MVC πŸ‘Ύ

reCAPTCHA is a free service that protects your website from spam and abuse. βœ…

reCAPTCHA uses an advanced risk analysis engine and adaptive Captchas to keep automated software from engaging in abusive activities on your site. 🚫

It does this while letting your valid users pass through with ease. πŸ’Ž

This article shows how to integrate reCAPTCHA version 2.0 into an ASP.NET MVC website in clean way. ⚑️


Article Author : @MoienTJ

https://t.me/pgimg/109

[ Article ] : bit.do/recaptcha

γ€°γ€°γ€°γ€°γ€°γ€°
#reCaptcha #AspMvc
@ProgrammingTip
Securing ASP.NET Core 2.0 Applications with JWTs + Auth0 πŸ”‘

JSON Web Tokens, often shortened with JWTs, are gathering more and more popularity in the Web environment. 🌐

It is an open standard that allows transmitting data between parties as a JSON object in a compact and secure way. πŸ”

They are usually used in authentication and information exchange scenarios, since the data transmitted between a source and a target are digitally signed so that they can be easily verified and trusted. βœ…

Let's take a look at how to set up a ASP.NET Core 2 application with JWT support by creating a Web API application. ✨

https://t.me/pgimg/110

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

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #Core #JWT
@ProgrammingTip
A Pattern is a solution to a problem in a context. βœ…

We're going to step throught each of these parts, context, problem and solution ✨ :

The context is the situation in which the pattern applies. This should be a recurring situation. πŸ‘¨πŸ»β€πŸ”§

The problem refers to the goal you are trying acheive in this context, but it also refers to any constraints that occur in the context. πŸ†

The solution is what you're after : a general design that anyone can apply which resolves the goal and set of constraints. πŸ…

βž– Example
Problem: How do I get to work on time❓

Context: I've locked my keys in the car. πŸ—

Solution: Break the window, get in the car, start the engine and drive to work. πŸš—


"If you find yourself in a context with a problem that has a goal that is affected by a set of constraints, then you can apply a design that resolves the goal and constraints and leads to a solution."


γ€°γ€°γ€°γ€°γ€°γ€°
#DesignPatterns #Tips
@ProgrammingTip
If you don't need it now, don't do it now❗️

Design Patterns are powerful, and it's easy to see all kinds of ways they can be used in your current designs.⚑️

Developers naturally love to create beautiful architectures that are ready to take on change from any direction.πŸ’™

If you have a practical need to support change in a design today, go ahead and employ a pattern it handle that change. βœ…

However, if the reason is only hypothetical, don't add the pattern, it is only going to add complexity to your system, and you might never need it. ❌

γ€°γ€°γ€°γ€°γ€°γ€°
#DesignPatterns #Tips
@ProgrammingTip
14 Latest and Best 404 Error Page Designs for Webs/Mobile Apps ✨

A 404 error page, which often serves to alert web/app visitors that the page they are trying to reach does not exist, is often regarded as one of the most possible elements to lose users/visitors with boring and dull logging-in/out/loading/leading pages in a web/app. πŸ™„

However, that does not mean such error pages will be a nightmare in all cases. ❌

Actually, a creative, cool, interesting or informative 404 error page can not only lead customers to other parts of your websites/apps smoothly, but also reduce customer frustration and let them stay on the site/app much longer. πŸ’Ž

Let’s keep reading this article and enjoy 14 latest and best 404 error page designs to get inspiration and learn how to make a beautiful, interesting and attractive 404 error not found page design. ⚑️

https://t.me/pgimg/111

[ Article ] : https://goo.gl/A5mJjx

γ€°γ€°γ€°γ€°γ€°γ€°
#Design #UI #UX
@ProgrammingTip
ASP.NET Core 2 – Global Model Validation ⚠️

We use a lot of repetitive code in our actions. ♻️

Inside of our controller actions we usually check if the model is valid by using ModelState property available on MVC’s base controller class :

if (!ModelState.IsValid)  
return BadRequest(ModelState);


The bad thing about is that we repeat this piece of code throughout a lot of our actions. ❌

How we can make it better❓

This article shows you how to validate ModelState with a global filter. πŸ’Ž

https://t.me/pgimg/112

[ Article ] : bit.do/mval

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #Core #Validation
@ProgrammingTip
Controller Lookup & Default Controller Factory 🏭

As the name, the Controller factory is the component responsible for searching and creating controllers.πŸ‘·

Like many other components, ASP.NET MVC has a built-in factory named DefaultControllerFactory that's pretty much sufficient in most cases. πŸ’Ž

Searching a controller is a perform intensive job and the DefaultControllerFactory does some efficient caching mechanism to avoid looking for controllers every time when there is a need. βœ…

In this article we are going to explore how the DefaultControllerFactory searches for a controller and what kind of strategies it uses to do the process efficiently. ⚑️

https://t.me/pgimg/113

[ Article ] : bit.do/cfac

γ€°γ€°γ€°γ€°γ€°γ€°
#AspMvc #Controller #Depth
@ProgrammingTip
Render Action & Render Partial.png
1 MB
Nancy wants to display the logged-in users in a partial view. πŸ‘€

She got confused whether to use RenderAction or RenderPartial.🧐

Mark clarifies her when to use what. βœ…

γ€°γ€°γ€°γ€°γ€°
#AspMvc
@ProgrammingTip