Claim 35 Post Templates from the 7 best LinkedIn Influencers

Get Free Post Templates
Mayank Ahuja

Mayank Ahuja

These are the best posts from Mayank Ahuja.

9 viral posts with 16,775 likes, 378 comments, and 1,044 shares.
8 image posts, 0 carousel posts, 0 video posts, 1 text posts.

๐Ÿ‘‰ Go deeper on Mayank Ahuja's LinkedIn with the ContentIn Chrome extension ๐Ÿ‘ˆ

Best Posts by Mayank Ahuja on LinkedIn

[ Python Basics - Dynamic Typing ]

( To follow - https://lnkd.in/d62YuzpW )

In Python, variables have a 'What's in a type?' philosophy.


- variables are dynamic
- which means you don't have to declare their type explicitly.

The type of a variable is determined by the value it holds, and it can change during the execution of your program.

Here's a breakdown:

๐Ÿ”ธDynamic Typing

x = 5 # x is an integer
x = โ€œhelloโ€œ # x is now a string

x initially holds an integer value (5) and later is assigned a string value (โ€œhelloโ€œ).

Python allows this kind of flexibility.


๐Ÿ”ธType Inference

- The interpreter keeps track of the types during runtime.


๐Ÿ”ธVariable Reassignment

- You can reassign a variable to a value of a different type.

y = 3.14 # y is a float
y = โ€œworldโ€œ # y is now a string


๐Ÿ”ธType Checking

- Python doesn't require explicit type declarations, but it is still important to understand and be aware of the types.
- You can use functions like type() to check the type of a variable.

z = 42
print(type(z)) # Output:


- This dynamic nature provides flexibility but also requires careful handling to avoid unexpected errors.


_________________

You can connect or follow - Mayank Ahuja


image - reddit

#python #basics #technology
Post image by Mayank Ahuja
#softwaredevelopment
Post image by Mayank Ahuja
Give me 2 minutes, and Iโ€™ll break down ๐‰๐–๐“ (JSON Web Tokens) for you.

โ—พ JSON Web Token (JWT) => open standard (RFC 7519) for securely transmitting information between parties as a JSON object.

โ—พ a compact and self-contained way to represent a set of claims securely between two parties.

๐Ÿ“Œ ๐’๐ญ๐ซ๐ฎ๐œ๐ญ๐ฎ๐ซ๐ž ๐จ๐Ÿ ๐š ๐‰๐–๐“
A JWT consists of three parts => separated by dots (.)

[1.] ๐‡๐ž๐š๐๐ž๐ซ
โ—พ Specifies the algorithm used to sign the token (e.g., HS256, RS256) and the type of the token, which is always JWT.

[2.] ๐๐š๐ฒ๐ฅ๐จ๐š๐ (Claims)
โ—พ Contains the claims (statements) about an entity (typically, the user) and additional data.

There are three types of claims -
โ—พ Registered claims (standardized): iss (issuer), exp (expiration time), sub (subject), aud (audience) etc.
โ—พ Public claims (customizable by your application).
โ—พ Private claims (application-specific agreements).

[3.] ๐’๐ข๐ ๐ง๐š๐ญ๐ฎ๐ซ๐ž
โ—พ Created by taking -
a. the encoded header
b. the encoded payload
c. a secret
d. signing it with the algorithm specified in the header

โ—พ Used to verify the token's authenticity and integrity.

๐Ÿ“Œ ๐๐ž๐ง๐ž๐Ÿ๐ข๐ญ๐ฌ ๐จ๐Ÿ ๐”๐ฌ๐ข๐ง๐  ๐‰๐–๐“๐ฌ
โ—พ Auth
โ—พ Statelessness => server doesn't need to store session information.
โ—พ Security =>can be signed using various algorithms
โ—พ Decentralization => ideal for single sign-on (SSO).

๐Ÿ“Œ ๐‰๐–๐“ ๐๐ž๐ฌ๐ญ ๐๐ซ๐š๐œ๐ญ๐ข๐œ๐ž๐ฌ

JWTs are a tool, not a complete security solution.

Their security hinges on proper implementation and usage. ๐Ÿ‘

[1.] Algorithm Selection
โ—พ Prioritize Asymmetry - Use RS256 (RSA) or ES256 (Elliptic Curve) for stronger security.

โ—พ Avoid HS256 - HMAC-based signing (HS256) requires careful key management.

โ—พ Never Use 'none' - This disables signing, rendering JWTs completely insecure.

[2.] Key Management
โ—พ Generate robust, cryptographically secure keys (256-bit or higher).
โ—พ Regularly rotate keys.

[3.] Secure Storage
โ—พ Store keys securely, never in source code or version control.

[4.] Claim Usage
โ—พ Avoid storing sensitive or personally identifiable information (PII) directly in JWT claims.
โ—พ Utilize standard claims (iss, exp, aud, sub) consistently.
โ—พ For sensitive data, encrypt the JWT payload.

[5.] Token Handling
โ—พ Transmit JWTs exclusively over HTTPS to prevent interception.
โ—พ Store JWTs in HttpOnly cookies to protect against cross-site scripting (XSS) attacks.
โ—พ Set short expiration times and consider refresh tokens for longer sessions.
โ—พ Implement mechanisms for revoking compromised tokens =>blacklists, short-lived tokens.

[6.] Validation and Verification
โ—พ ALWAYS verify the JWT signature using the appropriate algorithm and key before processing the claims.
โ—พ Check all relevant claims (exp, iss, aud) for validity and relevance to your application.

=> Implement rate limiting to protect against brute-force attacks.
=>Use security-focused HTTP headers to enhance protection.

--------------

๐Ÿ‘ Follow - Mayank Ahuja
๐Ÿ—’๏ธ Newsletter - https://lnkd.in/dJByxEYY

#softwaredevelopment
Post image by Mayank Ahuja
What is your definition of a Senior Developer?

#softwaredevelopment
Post image by Mayank Ahuja
Sharing with you a quick walkthrough of the Java versions. Give it a read.๐Ÿ‘‡


Is it Java 1.8 or Java 8? I've been asked this question multiple times.

๐Ÿš€ Follow Mayank Ahuja, for regular software development insights.

โญ Subscribe to my blog; I will soon be posting new content - https://lnkd.in/gqQ8vT7x

Let's understand.

๐Ÿ“Œ [ Java Versioning : Java 8 & Prior ]
โ—พ Java's versioning convention has been somewhat unconventional in comparison to other software versioning systems.
โ—พ In the past, Java versions had a major version number followed by a minor version number, like โ€œ1.5โ€œ or โ€œ1.6.โ€œ This was reflective of the language's initial development and its early version history.
โ—พ The original naming convention for Java versions was to use the โ€œJava SE x.yโ€œ format, where x was the major version number and y was the minor version number.

So, Java SE 5.0 was actually Java 1.5, Java SE 6.0 was Java 1.6, and so on. This naming convention was used up to Java SE 8.


This naming convention caused some confusion, as people often thought that Java was still on version 1.x, even though there had been many new releases.

๐Ÿ“Œ [ Java Versioning : Java 9 & Later ]
โ—พ The distinction between the โ€œ1.โ€œ prefix and the major version number (e.g., โ€œ1.5โ€œ) was, indeed, dropped starting from Java 9.
โ—พ With Java 9 and later, the version numbers are simply referred to by their major version numbers, without the โ€œ1.โ€œ prefix. So, Java 9 is just โ€œ9,โ€œ Java 10 is โ€œ10,โ€œ and so on.

โ—พ This change was partly made to reduce confusion and align the version numbering with more conventional practices in the software industry.
โ—พ It also reflects the significant changes and improvements that were introduced in Java 9 and subsequent versions.


If you like my effort, please like and repost. It might help someone.


*** Java 23 is set to release this year(Sept).



#javaย #versionsย #programmingย #technology #softwaredevelopment
Post image by Mayank Ahuja
Are you a Leetcode Warrior? ๐Ÿ˜ฌ
#leetcode #coding #technology #softwaredevelopment
Post image by Mayank Ahuja
If you are a software developer, you should understand ๐‰๐–๐“ (JSON Web Tokens). ๐Ÿ‘‡

โ—พ JSON Web Token (JWT) => open standard (RFC 7519) for securely transmitting information between parties as a JSON object.

โ—พ a compact and self-contained way to represent a set of claims securely between two parties.

๐Ÿ“Œ ๐’๐ญ๐ซ๐ฎ๐œ๐ญ๐ฎ๐ซ๐ž ๐จ๐Ÿ ๐š ๐‰๐–๐“
A JWT consists of three parts => separated by dots (.)

[1.] ๐‡๐ž๐š๐๐ž๐ซ
โ—พ Specifies the algorithm used to sign the token (e.g., HS256, RS256) and the type of the token, which is always JWT.

[2.] ๐๐š๐ฒ๐ฅ๐จ๐š๐ (Claims)
โ—พ Contains the claims (statements) about an entity (typically, the user) and additional data.

There are three types of claims -
โ—พ Registered claims (standardized): iss (issuer), exp (expiration time), sub (subject), aud (audience) etc.
โ—พ Public claims (customizable by your application).
โ—พ Private claims (application-specific agreements).

[3.] ๐’๐ข๐ ๐ง๐š๐ญ๐ฎ๐ซ๐ž
โ—พ Created by taking -
a. the encoded header
b. the encoded payload
c. a secret
d. signing it with the algorithm specified in the header

โ—พ Used to verify the token's authenticity and integrity.

๐Ÿ“Œ ๐๐ž๐ง๐ž๐Ÿ๐ข๐ญ๐ฌ ๐จ๐Ÿ ๐”๐ฌ๐ข๐ง๐  ๐‰๐–๐“๐ฌ
โ—พ Auth
โ—พ Statelessness => server doesn't need to store session information.
โ—พ Security =>can be signed using various algorithms
โ—พ Decentralization => ideal for single sign-on (SSO).

๐Ÿ“Œ ๐‰๐–๐“ ๐๐ž๐ฌ๐ญ ๐๐ซ๐š๐œ๐ญ๐ข๐œ๐ž๐ฌ

JWTs are a tool, not a complete security solution.

Their security hinges on proper implementation and usage. ๐Ÿ‘

[1.] Algorithm Selection
โ—พ Prioritize Asymmetry - Use RS256 (RSA) or ES256 (Elliptic Curve) for stronger security.

โ—พ Avoid HS256 - HMAC-based signing (HS256) requires careful key management.

โ—พ Never Use 'none' - This disables signing, rendering JWTs completely insecure.

[2.] Key Management
โ—พ Generate robust, cryptographically secure keys (256-bit or higher).
โ—พ Regularly rotate keys.

[3.] Secure Storage
โ—พ Store keys securely, never in source code or version control.

[4.] Claim Usage
โ—พ Avoid storing sensitive or personally identifiable information (PII) directly in JWT claims.
โ—พ Utilize standard claims (iss, exp, aud, sub) consistently.
โ—พ For sensitive data, encrypt the JWT payload.

[5.] Token Handling
โ—พ Transmit JWTs exclusively over HTTPS to prevent interception.
โ—พ Store JWTs in HttpOnly cookies to protect against cross-site scripting (XSS) attacks.
โ—พ Set short expiration times and consider refresh tokens for longer sessions.
โ—พ Implement mechanisms for revoking compromised tokens =>blacklists, short-lived tokens.

[6.] Validation and Verification
โ—พ ALWAYS verify the JWT signature using the appropriate algorithm and key before processing the claims.
โ—พ Check all relevant claims (exp, iss, aud) for validity and relevance to your application.

=> Implement rate limiting to protect against brute-force attacks.
=>Use security-focused HTTP headers (e.g. Content Security Policy, X-Frame-Options) to enhance protection.


#softwaredevelopment
Post image by Mayank Ahuja
[ Test-driven Development (TDD) ]

(You can follow, if you like such content -ย https://lnkd.in/d62YuzpWย )

Love to build, Hate to Test?

- Writing tests can be seen as less enjoyable as it requires additional effort, and some developers may find it less immediately gratifying compared to the creative process of coding.

- Deadlines and pressure to deliver quickly might lead to prioritizing coding over testing.

However, writing tests is crucial for maintaining code quality, preventing bugs, and ensuring long-term project success.

Let's learn.

First let's see, how do you do the development without TDD?

A typical way of programming without TDD could be -
[1.] Write a piece of code that has a specific task
[2.] Write some tests to check if the code actually does what it is supposed to be doing

So, what's wrong with this?

Nothing !!

But,

Writing tests after development is mostly done, is almost never a task that a developer enjoys working on. Also, it is easy to forget to test specific scenarios or simply not write any tests for them because of time constraints or other reasons.

Then, What's TDD?

With Test-driven development a developer would -
[1.] First write a single test, that tests a task or requirement for a piece of software. (This test would fail, as the code doesn't exist to do the specified task).
[2.] After the test is created, the code is written that actually performs the task that the test requires the software to do. [3.] Once the code is written, run the test again. It should pass.
[4.] If not, fix any test that might fail at this point until all tests pass.
[5.] Refactor the code.


How do you test your code? Or you don't? ๐Ÿ˜œ


Well, TDD is always debatable, but when developers actually practice the test-driven development approach, they definitely build a safety foundation to find all the bugs before damaging the whole system.

I agree that the most challenging part is building the mindset to follow this approach. It's actually difficult to learn and adjust to its principles if you have never done it before.

It definitely requires some kind of discipline.

Initially, you would feel that it has slowed down your overall development, and it does. But once you master it, it becomes your regular thing to do, it won't be that difficult.


Thanks for reading till the end.

Love talking all things software? Me too! Let's connect. -ย Mayank A.

Image - Reddit

#tddย #javaย #technology #softwaredevelopment #design
Post image by Mayank Ahuja
For Windows problems - Reboot
For Linux problems - Be Root



#windows #linux #meme #humor #linkedin #softwaredevelopment

Related Influencers