Patterns and practices – How can I prepare my platform to expand dramatically for the future?

foreword

Currently I am building a very small platform that I would like to put into a test production phase here in the next few months.

From now on it is just a simple web application. It contains things like:

  • Users / profiles
  • commenting systems
  • User-created posts

Nothing too amazing or complicated. However, I have more features in the works. Such as:

  • Subscriptions / Payment
  • Two-factor authentication
  • Automated e-mails and text messages
  • Mobile application

My setup

I have three main servers.

  1. Database: Isolated SQL Server that only the API server can access. Contains all persistent data relevant to the platform.

  2. API: Go server that provides indirect access to the database server and manages authentication and tokens.

  3. HTTPS: Nginx for static content delivery and another go server for dynamic content management. Communicates strongly with the API server.

I also use CloudFlare for DNS management, SSL certificates, and DDoS protection.

An API server is intended to simplify the integration of a mobile app into the system.


analysis

I do not focus much on the features of my project, but more on the practices that I should focus on as I expand it. I expect that higher traffic will be the main problem that could paralyze my current setup.

Given the fact that I only have one server providing static and dynamic content, I worry that I get problems as I get more and more requests (and maybe even requests from other places in the world).

I know things like load balancing, but the question I'm asking here is what I should ask myself to make an informed and intelligent decision about how I'm going to implement it.

Summary

The main goal here is to prepare this platform for some of the issues facing larger platforms (like SE) and what things I should consider along the way. For example, how should I build my application in earlier phases to support the bigger things that come later.

What are best practices for storing ensemble run output? [on hold]

I'm writing a Python program that takes multiple inputs and runs a model of all combinations of these inputs. At first there will be almost 200 runs. I'm trying to structure the intermediate and output files so that I can refer back which inputs produced which outputs. I would like to do this without creating a file structure that gets overly bloated and without creating extremely long file names.

Are there any designs that exist in practice to handle this, and I imagine monte carlo like runs? Would it make sense to create a folder for each output and save a configuration file of the input used for this output?

The model generates output in a binary format that represents large compressed multidimensional number fields.

Programming Practices – word order for names

I work with a team of non-native speakers and have trouble finding a rule that explains why a method should be called getFilePath and not getPathFile,

There are examples of this bad term every day, and apart from the fact that I only point to the better name, I can not explain well why words should be in a certain order, except for "It's the way it's written in English is ". Especially for variable names like this, because none of its components are adjectives.

I realize that this is very simple and probably a matter of course for everyone here, but I think that's why I have trouble explaining to people who do not understand how to explain it.

How would you explain it?

Design – Are bad programming practices typical of the software industry?

How common is this in the software industry?

Very ordinary. In much the same way as when a plumber destroys your plumbing work, a carpenter supplies garbage, or a cheap tailor makes a badly fitting suit. That is, it is all human.

There is a good reason why this happens: People who are not really trained (or not enthusiastic) need to put pressure on them.

This is not primarily a problem for these people, but usually the structures that affect software development in this company. For example, in a company, some interns develop their internal software. Even if these interns are smart and knowledgeable, they will only be there for a few weeks or months, and the owner will change frequently.

Or a person who is great in the domain, but not a programmer, can hack a VBA application, etc., because it seems to be quite simple in the beginning.

Or a well-done application ends up in the maintenance phase, all the good developers move on, and then it's evolved by a few people (at worst one of them) who know little about it, no documentation, and so on.

How can I make sure that I have an overview of OOP and its associated principles? I practice in my free time and I feel like I really have to work under an experienced developer to get better at OOP.

There are two possible answers:

  • Either: Discuss this with your boss and make sure you're involved in clean projects. If not possible, find a new boss.
  • Or: take responsibility for it yourself. That means you can do it alone – at your leisure or, if you can, in the company, but controlled by yourself (unlikely).

If the second answer sounds too cynical for you, you can assure me that this is not the case. A carpenter, who has a wood workshop at home, becomes most certainly a better carpenter than one who does not.

For example, it is absolutely possible and a amount For example, it's fun for some people to immerse themselves in a new language like Ruby, not only to learn the syntax, but also to deepen special OO aspects of that language and really immerse themselves deeply. Everything in your free time, without any connection to your work. It's just going to be a hobby, but as a trained professional, sitting next to a senior developer and trying to follow what he's doing can be just as effective (or even more effective). This then serves exclusively for your personal development and your own fun. If you do not have fun or find that you just can not understand it, scratch it and return to the first answer.

The lead developer that trains you has quite the stuff probably just learned this way …

Usability – What are the best error message symbols for each type of error in .NET? Best Practices

I am currently working on a project in .net … I have treated error messages with user-friendly instructions, but I am trying to find the best error messages to use. I've just left it blank before, but I think that icons are more helpful.

What is the recommended way to view the MessageBox.Icon, depending on the severity of an error message, and in which situations should the following be applied?

MessageBoxIcon.Asterisk
MessageBoxIcon.Error
MessageBoxIcon.Exclamation
MessageBoxIcon.Hand
MessageBoxIcon.Information
MessageBoxIcon.None
MessageBoxIcon.Question
MessageBoxIcon.Stop
MessageBoxIcon.Warning

For example, From the above options, what would you use in a message box where …

  • A file was not found
  • A critical error has occurred
  • A non-critical error has occurred
  • An unexpected value was returned
  • An invalid value was entered
  • could not do something
  • Or other common exceptions that users might encounter?

Some of them may seem obvious, but please say them anyway so everyone benefits.

Javascript – Best Practices for React Project

I'm working on one interview test where to rate my skills on the basis of Quality of the code. data structures and Time complexity of algorithms,

Although I'm done with functionality, I'm not sure how I can improve the following code more productively.

Github Link is –
https://github.com/ananddeepsingh/React-emp-directory

import React, { Component } from 'react';
import Results from './Results';
import './App.css';


class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      searchUser: '',
      data: (),
      showResult: false,
      urlTraffic: false
    }

    this.invitedUser = false;

    let params = new URLSearchParams(window.location.search);
    this.dataFromQueryString = params.get('name');

    if (this.dataFromQueryString !== '') {
      this.invitedUser = true;
      this.handleSubmit(null);
    }
  }

  handleSubmit(e) {

    if (e) {
      e.preventDefault();
    }

    let userName;

    if (this.invitedUser) {
      userName = this.dataFromQueryString;
      this.invitedUser = false;
    } else {
      userName = this.input.value;
    }

    fetch("http://api.additivasia.io/api/v1/assignment/employees/" + userName)
      .then((response) => {
        return response.json();
      })
      .then((jsonObj) => {

        if (jsonObj.length > 0) {
          this.setState({
            searchUser: userName,
            data: jsonObj,
            showResult: true
          });
        } else {
          this.setState({
            searchUser: '',
            data: (),
            showResult: false
          });
        }
        this.input.value = '';
      });
  }


  render() {

    return (
      
        
{ this.handleSubmit(e) }} type="post">
{this.state.showResult ? : null}
); } } export default App;

I would be very happy if you could suggest me how to improve the following code.

Design Patterns – Best Practices: Saving or Returning Between Results?

Provided IO is not a problem. Is saving intermediate results considered best practice? What are the pros and cons and situations that justify it or not?

Suppose I have two components along a long pipeline,
others--> Component_1 --> Component_2 --> others,

I can either save the output from Component_1, pass the path Component_2, and have Component_2 read and process from there. Or I can return output from Component_1and pass it on output to Component_2,

Context:
This is for data processing tasks where the server process itself can be executed continuously, but all user input data causes a single pass through the pipeline and is completed before the next item is retrieved from the input queue.

Advantages of saving:
1. Does testing and debugging make things easier? I do not have to save the output from Component_1 in my test / debug code, before I do anything with it, if I do not want to do it again Component_1, Of course, a debugger that stores all the intermediate data may do so, but storing everything can take a while to complete.
2. Facilitates debugging when actual runs fail. Same point as before.

Disadvantage:
1. Performance losses, but we assume that this is negligible.
2. Need move all intermediate files trash somewhere during / at the end of the runs.
3. With a separate one debug Folder with unique ID tag for each run, but this is usually required anyway if you only want to save the output that gets and presents the UI.

Design Patterns – Best Practices for Using the Third-Party API with a Different API?

I'm building a tool for my school to communicate with the Canvas API, and as of now, the repo is built as a MVC app with the main folders Models /. Controller /, and routes /, What are some best practices regarding directory structure when you integrate other APIs into your own? Inserts services / canvas.rb the right idea?

Design Patterns – Best Practices: Keyboard unloading and button display in mobile apps

We have both iOS and Android apps with forms in multiple places and are looking for an appropriate UX pattern to continue when the form is completed.

For example, on the logon screen, the user must enter both a user name and a password and then trigger the logon action.

1) Should the login button "hover" over the keyboard? Only if the last field is active?
2) Should the keyboard be hidden when typing outside of it?
3) Should the "Return" button on the keyboard say "Continue" when the first field is active and "Login" when the last field is active?

This seems to be a standard use case where behavior should be defined and standardized for both iOS and Android platforms, but I'm having trouble finding it documented anywhere!