What are some black hat SEO practices to avoid? – SEO Help (General Chat)

There is so many common black hat techniques which people try to do and in the end, their sites get penalized. Let me aware you from few of them.

Don’t try to create low-quality fake backlinks to get rank higher.
Don’t try to copy the content of other websites for your site.
Never copy the graphics of another website.
Never try to mislead your audience to bring them to your website.
Note:- Basically, be honest with your content and site quality. Google’s artificial intelligence is much stronger than your imagination. So, never try to cheat people or other search engines.

authentication – Best practices for generating and storing authorization codes and access tokens in OAuth server

I’ve recently implemented an OAuth server functionality to our service. I’ve consulted OAuth 2.0 Threat Model and Security Considerations and addressed most of the concerns. I am curious about any best practices for generating authorization code and access_token.

Our backend is written in Node.js, so I am using uuid v4 for both codes and access tokens. Historically, I’ve seen code’s to be shorter than uuid v4, around 6-8 characters long. And recently, I’ve seen tokens in Slack API be likely something else.

Now, I know uuid is considered to be unguessable, we also use a code only one time, and the code is short-lived. Is there anything else that can improve the quality (or unguessability) of the codes and access tokens?

Additionally, does it make sense to hash the codes and access tokens inside database? What is the optimal hash function for it? Right now we use sha256 in similar places.

pagefile – Windows Server VM page file best practices

What is in 2020 the best practices concerning page file configuration for a VM (2012 R2, 2016, 2019) using SAN/NAS SAS or SSD storage?

Is it to let it System managed?

Is it to locate it on a secondary drive but still size managed by the System?

Is it to set a custom size, let say 1.5x of the RAM as found a few old threads

As the VM have higher memory size (32-64GB), is there a point to use something else than System Managed page file if RAM could be added instead?

Trying to fit in a lot within a data table cell-Best practices

I am designing a grid which has lengthy data values. My challenge is that I cannot afford to accommodate these values into a second line because there are a lot of rows, and I don’t have enough real estate. Is there a best practice for such a scenario. I would greatly appreciate any help on this. Thanks in advance.

enter image description here

mysql – What are best practices in designing tables for dynamic mathematical inputs?

I am taking a first stab in designing a system that gives ratings to our assets based on various criteria.

So to simplify what I am doing – it will be this times 10…

I have an asset tables (docs/video/webpage) and we will give it a rating based on:

  1. Last date it was updated.
  2. Number of hits/downloads.
  3. The number of tags associated with it.

All three of these criteria are stored in that table (well tags are stored as comma seperated associates).

We want to have tiers of weighting based on the values above.

An example is:

  1. Date – Between 0-30 days 10 points, between 30-90 days 5 points, over 90 0 points.
  2. Hits – Between 0-5000 hits 0 points, between 5k-10k hits 5 points, over 10k 10 points.
  3. Tags – Between 0-5 tags 0 points, between 6-10 tags 5 points, over 10 tags is 10 points.

Then we add up the points for each asset and give it a number.

I have already started doing this just using a simple mysql view and a TON of if/then statements. It works but it is really sloppy and it does not anyone else to edit the criteria or values.

Since I have never designed anything with a dynamic amount of criteria – so for instance changing the number of hits for the various tiers or changing the points for each tier or even changing the number of tiers – I figured I would ask what are the best practices in setting up tables and relationships to do this most efficiently.

programming practices – Which statements can be considered as exit points?

There are many discussions related to whether it is better to have only one or multiple exit points per function, but it is not clear to me which statements can be considered as exit points: only return or some other ones as well?

For example, should we consider throw and break as exit points?

Are there 2 or 3 exit points?

func(x, y) {
  // guard
  if (!x)
    throw "You have an error here!"

  if (y)
    return "foo"
  else
    return "bar"
}

Are there 1 or zero exit points?

func() {
  i = 1
  loop {
    if (i = 5)
      break
    
    show_message(i)
    i = i + 1
  }
}

8 – Drupal entity save on cron best practices

I have created a custom entity and I have a method where I insert my custom entity values into the user field based on the user activities. The user activities can be a flagging or node creation. Now, I’m not quite sure the best practice to follow. Should I upload the data, then save the user entity on hook_insert or via cron task? I have a few conditions before I insert values.

Here’s a sample:

if (condition) {
    $this->user->set($field, $values);
    $this->user->save();
}

If ever that this has to be done in cron, where should the task be created? Should I create the task if the conditions met or should I create the task on each user flag/post, then add the conditions in the queue worker?

Task 1:

src/example.php

if (condition) {
    $this->queue->createItem($task);
}

Task 2:

src/example.php

$this->queue->createItem($task);

src/PluginQueueWorkerExampleWorker.php

if (condition) {
    $this->user->set($field, $values);
    $this->user->save();
}

The user registration of the platform that I’m trying to build is open to the public and there’s a possibility that this platform could have hundreds of active users, which I’m worried that the user activities might affect the server optimization.

Thank you in advance!

programming practices – How to scale code reviews

My boss say we should find a way to scale code reviews at our company. As it is right now, we have about 16 software developers spread across 4 different teams/squads, but soon the company will close a deal which will double the company size. With that, eventually we’ll have dozens of developers. He recommend me checking out automated tools such as this one: https://www.freecodecamp.org/news/how-to-automate-code-reviews-on-github-41be46250712/ but I’m particularly not a fan of automated tools due to:

  • They don’t understand the context to check if variable/method names are good, bad or even counter-intuitive
  • They can’t judge if the chosen architecture is being followed
  • Developers can decide to ignore the machine comments (for example PyLint, even though we have it, everybody just ignores it)
  • Some of them have costs
  • Some of them (like the one I mentioned) require special access to the repository/github organization, which I don’t have

We work with Python (mostly), Lua and Go, and among the developers (generally speaking at the company), even though everybody sees values in code review, most just perform a “quick view” and say LGTM, while 2 or 3 (me included) like to nag about possible bugs and improvements. So how would you guys recommend to scale code reviews? How large companies like Microsoft, Google, Amazon, Oracle, etc, perform code reviews with dozens/hundreds of developers, making people actually care about code review? Is it worth to create something like a gamefication platform/leadership board (maybe with rewards)?

programming practices – Guards: Isn’t it true the we can replace them if “if” – “else if” – “else” without any significant drawbacks?

And it makes me wonder whether guards are really so useful as authors trying to convince me. Could you show the case where guards are really make the code much better?

Your example is biased because it uses return inside the if bodies, forcing the method to end when it enters an if. This pretty much excludes the relevance of any code after the else of any if statement that evaluates to true.

If you don’t use return, then if .. if .. and if .. else if .. else behave very differently.

public double getPayAmount() {
  var result = 0;

  if (isDead){
    result += 100;
  }
  else if (isSeparated){
    result += 50;
  }
  else if (isRetired){
    result + = 25;
  }

  return result;
}

Assuming all booleans are true, without the else it’d return 175, with the else it’d return 100.


But the author (all of the authors) ignores the fact that the first version can be changed to

Sure, you could use it, but that doesn’t mean that it must be mentioned. When you use returning if bodies, the else is irrelevant. There’s no point to having it.

Using simple step through debugging is going to explain it much better than a written answer will.

The short answer here is that for any if which returns in its body, the else can be removed without changing the flow of the code, therefore makking it irrelevant to write an else.

What Should You Do For The Best Seo Practices?

What should you do for the best SEO Practices?