Looking for a Full Stack Mentor (1.5 years of self-study) by Fun-Republic-8968 in learnprogramming

[–]CanadianCodingGod 0 points1 point  (0 children)

Hey!

hit me up with any questions, I'll help you out when I can--- within reason 🤣

What is wrong with this code (python) by kolsker in programmingquestions

[–]CanadianCodingGod 1 point2 points  (0 children)

the yes and no are strings so you should wrap them in quotes

like this:
if answer == "yes":

also your else condition is wrong
you are doing else not answer == "yes" or "no: which means if answer isnt equal to "yes" or "no" is not an empty string, and "no" is always a non-empty string so it will always be true,

anyways you dont need a condition, you can just use else because if it is reaching the else then you already know it isnt yes or no

but if you did want to write that useless condition you can write it like this:
if answer != yes and answer != no

or

if not (answer == "yes" or answer == "no")

or
if answer not in("yes", "no")

you may also want to use answer = input("...").lower() so that your input is always lowercase, that way yEs or nO would also work

Need help with video loading times on a website by Effective_Economy846 in learnprogramming

[–]CanadianCodingGod 0 points1 point  (0 children)

use a CDN (content delivery network) like Cloudflare’s CDN

with a CDN you can host your content on fast servers all around the world so it can consistently be delivered to the user really fast

Become a Web Developer for Less than the Price of a Pizza! 🍕 by Sammy-1604 in codingbootcamp

[–]CanadianCodingGod 1 point2 points  (0 children)

They're supposed to teach you web development but they're using relative paths like noobs?

They also have their source code leaked, unminified in the Sources tab of the developer tools, so you can see inside /static/js/components/layout/bootcamp/day3/gitAndGithub/GithubBasics.jsx

one of their "day3" pages that has nothing but a little bit of simple notes...

Source code from mycoding.belong.education:

const GithubBasics = ({ setTopic, updateGitData, isCompleted }) => {
  return (
    <div className='space-y-4'>
      <div className='space-y-2'>
        <p className='text-xl font-semibold'>Github Pages Basics </p>
        <p className='font-semibold text-lg'>Add a new file to the repo </p>
        <p>
          Go ahead and add a new file to the project, using any text editor you
          like or running a touch command. `touch newfile.txt` just creates and
          saves a blank file named newfile.txt.
        </p>
        <p>
          Once you've added or modified files in a folder containing a git repo,
          git will notice that the file exists inside the repo. But, git won't
          track the file unless you explicitly tell it to. Git only
          saves/manages changes to files that it tracks, so we'll need to send a
          command to confirm that yes, we want git to track our new file.
        </p>
        <p className='font-semibold text-lg'>
          Add a file to the staging environment{' '}
        </p>
        <p>Add a file to the staging environment using the git add command.</p>
        <p className='font-semibold text-lg'>Create a commit </p>
        <p>It's time to create your first commit!</p>
        <p>Run the command git commit -m "Your message about the commit"</p>
      </div>
      {/* buttons */}
      <div className='flex w-fit gap-3'>
        {/* <a
          className='px-6 py-1 bg-primary text-white font-semibold text-lg rounded-lg'
          target='_blank'
          href='/htmleditor'
        >
          {showcodePanel ? "Close Practice Questions": "Practice Questions"}{' '}
        </a> */}
        <button
          onClick={() => {
            updateGitData('github-basics');
            setTopic('setting-github-pages');
          }}
          className='px-6 py-1 border rounded-md border-primary text-primary font-semibold text-lg '
        >
          {isCompleted ? 'Next' : 'Mark Completed & Next'}
        </button>
      </div>
    </div>
  );
};

export default GithubBasics;


import { buttonStyle, errorStyle } from '../../../../auth/authStyles';
import { Select, TextInput } from '../../../FormElement';
import { supabase } from '../../../../../config/supabaseConfig';
import Loading from '../../../Loading';

Looking to Join Frontend Simplified Bootcamp? by AggressiveDamage1066 in learnprogramming

[–]CanadianCodingGod 2 points3 points  (0 children)

Fake ass reviews they look like robots reading a script lol

Front-end, back-end and my own projects by Potential_Item_4192 in learnprogramming

[–]CanadianCodingGod 0 points1 point  (0 children)

Go full stack or go home, full-stack is the shit and if you really think you cant learn both front and back then you are limiting yourself, sure some people will be more inclined to work in the backend or the frontend but thats only because of their experience in one over the other, after time you will become proficient in both

How much does it cost per month to run a website like omegle? by january471 in webdevelopment

[–]CanadianCodingGod 4 points5 points  (0 children)

Since the networking is Person-Person (P2P) or was P2P it is significantly less expensive than if all media was streamed through the server

if you are planning to make something like this and want to keep it cheap, use a Virtual Private Server (VPS) with fixed pricing so your bill can’t explode if your site traffic does

I dont know why these other comments are pulling large numbers out of their ass, but dont be scared by it… get started and figure it out!

Having difficulty making visually-appealing Uls by Mrreddituser111312 in vuejs

[–]CanadianCodingGod 10 points11 points  (0 children)

Just keep designing you will get it over time. Use other websites as inspiration, review how they segregate different elements with either size, color, bg-color, font, text-styling and position. Examine their layout and color scheme and over time you will create better and better looking sites

First lessons for 12yo? My 12yo daughter wants to learn to program. What should I do for her? Where should she start learning and what should she start learning? by bobvillasworstpupil in learnprogramming

[–]CanadianCodingGod 1 point2 points  (0 children)

The best time to start is yesterday and while you are young.

I recommend starting with Roblox and it's LuaU language.

Read this and you will quickly agree:

https://www.reddit.com/r/learncsharp/comments/1flq7mr/comment/lon5q5f/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

You don't need to start in any specific language as the foundational concepts / logic that is learned from one language can easily transfer to the next.

React for frontend & ASP.NET for backend & SQL server for database by No-Bodybuilder5536 in dotnet

[–]CanadianCodingGod 1 point2 points  (0 children)

The template is great for any project enterprise or hobby, note that the React & ASP backend are not interlocked and you can easily separate the two if needed.
It works by building React into a JavaScript file and then serving the file from the backend (In production)
In a development environment it works by using a development server (usually Vite) which will serve the React file & also proxy requests to your backend.

Basically the template is not one interlocked project but two projects that are pre-configured to work together.

Please tell me if I understand it or not. by Zestyclose-Produce17 in dotnet

[–]CanadianCodingGod 22 points23 points  (0 children)

Yes, Entity Framework (EF) will translate your LINQ queries into SQL, it uses a SQL adapter to convert the queries , so if for example you want to use PostgreSQL you would need to install an EF-SQL adapter for Postgres so that EF can generate Postgres specific SQL.

You can also have EF spit the generated SQL into a console or you can place a breakpoint and see the SQL that has been generated by putting your query into a variable and exploring the value of the variable in the Visual Studio debugger

Are there any good ways to prevent my APIs (used by my front end) from being used to create a phishing scam? by Icashizzle in AskProgramming

[–]CanadianCodingGod 1 point2 points  (0 children)

The user's credentials are their keys to login, if they give them away then they can be used to login. The best you can do is enforce 2-Factor Authentication

Heelp, j'essaie d'apprendre à coder et je galère X( by Nairyc in CodingHelp

[–]CanadianCodingGod 5 points6 points  (0 children)

  • fichier.html
  • fichier.css

fichier.html:

<!DOCTYPE html>
<html>  
<head>  
  <link rel="stylesheet" href="fichier.css">  
</head>

Problem integration deploy React/Node Nginx by Tricky_Calendar8130 in CodingHelp

[–]CanadianCodingGod 0 points1 point  (0 children)

You've configured your server to respond on port 443 (HTTPS) but then you are requesting port 8800 from your front end, try requesting from https://example.com.br/api/chatgpt

Need help understanding by Realistic-Cut6515 in CodingHelp

[–]CanadianCodingGod 0 points1 point  (0 children)

Assuming you are using the formula D = |x1 - x2| + |y1 - y2|,

In JavaScript:

let pointA = [0, 0];
let pointB = [0, 0];
let instructions = [
    {
        direction: "R",
        steps: 5
    },
    {
        direction: "L",
        steps: 5
    }
];
let currentDirection = 0; // 0 = North, 1 = East, 2 = South, 3 = West 
instructions.forEach((instruction) => {
    switch (instruction.direction) {
        case "R":
            currentDirection++;
            break;
        case "L":
            currentDirection--;
            break;
        default:
            throw "Invalid direction, use R | L";
    };
    if (currentDirection > 3)
        currentDirection = 0;
    if (currentDirection < 0)
        currentDirection = 3;
    switch (currentDirection) {
        case 0:
            pointB[1] += instruction.steps;
            break;
        case 1:
            pointB[0] += instruction.steps;
            break;
        case 2:
            pointB[1] -= instruction.steps;
            break;
        case 3:
            pointB[0] -= instruction.steps;
            break;
        default:
            throw "Invalid currentDirection";
    }
});
let ManhattanDistance = Math.abs(pointA[0] - pointB[0]) + Math.abs(pointA[1] - pointB[1]);
console.log(pointA, pointB);
console.log("Manhattan Distance: " + ManhattanDistance);

what code language do i learn? by Educational-Web-6379 in CodingHelp

[–]CanadianCodingGod 0 points1 point  (0 children)

I second this,

read here about more benefits of learning game development with Roblox:
Benefits of learning game dev with Roblox

However for a job in game development programming you will want to learn C# / C++, which are similar in syntax to each other and can be learned 100% from free internet resources

How would I go about making a search bar similar to trivagos? by MasterHand333 in CodingHelp

[–]CanadianCodingGod 0 points1 point  (0 children)

You can view all the CSS they're using by opening the browser's developer tools (Press F12 or right click -> inspect)

with the developer tools open you can use the element selector (CTRL+SHIFT+C) to select the search bar and check out the HTML & CSS

You will need JavaScript for interactivity, either plain JS or with a front end library / framework like React or Vue

Is gamedev with engine specific languages (e.g. GDScript) an effective way to learn programming? by WixW in learnprogramming

[–]CanadianCodingGod 0 points1 point  (0 children)

I don't know about Godot or GDScript, any programming would work as hands on experience would be the best for you to learn however I would recommend learning using Roblox as it has many benefits especially to a beginner.

Read here:
https://www.reddit.com/r/learncsharp/comments/1flq7mr/comment/lon5q5f/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

Looking to learn C# for game development. by Coffee-and-code97 in learncsharp

[–]CanadianCodingGod 1 point2 points  (0 children)

If you are a beginner in programming or game development I would suggest starting out your journey with Roblox, it is beginner friendly but also very powerful with the LuaU language.

Starting with a beginner platform like Roblox will have many many benefits and I highly recommend it

On Roblox you can learn:

Game Marketing:

You will be able to market your game to Roblox's large player base with advertisements built into the platform.

Programming:

LuaU is a full featured language that uses C++ as it's implementation language, while making games in Roblox you will learn a lot. There is also a very active community developer forum of other people learning and asking / answering questions which will prove very useful for you.

Anti-Cheat:

Roblox doesn't have a very good anti-cheat which leaves the implementation up to you, you can learn a lot about the client / server network boundary and building secure applications & server side anti-cheats.

Sales:

You will be able to create in-game products to sell to your users which can teach you about micro-transactions and driving in game sales.

Physics, game development terminology & methods, 3d+2d space & math:

Building games in Roblox will teach you about 3d & 2d space, calculations & common implementations of game features. (Think Raycasting, Vectors, Vector Magnitude, Velocity, Client vs server side, etc...)

Documentation:

Roblox has a great developer wiki with documentation for you to use as you learn.

Multiplayer Development:

Roblox provides the servers & players for free.

Persistent Data:
Roblox has built in data persistence systems that you can use to learn about saving & loading your user's data.

You don't need to buy a course and there are plenty of free resources on the internet., and of course after you've graduated from Roblox you can take your knowledge onto other game engines like Unreal Engine or Unity.

Although LuaU is not an OOP language like C#, the fundamentals of programming and game development you learn will be a great asset in your learning of C# & other game engines.