r/CodingHelp • • 1d ago

[Help with getting started] need help with getting started with coding

1 Upvotes

i want to get started with coding and you know its about the journey not the destination so frick vibe coding, but i want to make a 3d game, i suck at coding but i want to learn, ive been looking for engines but they all seem to sketch or annoying, i was tempted on using source since i got into source modding for a bit but i discovered it aint open source, so what engine do i use and what tutorials (only experience i have with games in scratch and 3d is a raycasting game i made in scratch)


r/CodingHelp • • 1d ago

Which one? I am interested in game developing and want to become a game dev.

0 Upvotes

Hi coders. I am 18. I will be going to university next year. I am interested in game developing, i want to make indie games and roblox games. The problem is that I am completely beginner to coding. which language should I learn first ?


r/CodingHelp • • 1d ago

[C] what is/are the best resources for learning web assembly?

3 Upvotes

yes, i already know C, although im at least aware that there are some special functions when applying it to web assembly

i'm going to school in a bit so i won't be able to read/answer your comments just yet sry


r/CodingHelp • • 2d ago

[HTML] How can I make my web app stop asking permissions everytime it is opened?

6 Upvotes

I don't know if the flair is correct.

I have this web app made in angular (hosted on firebase) for mobile use which, amongst other stuff, utilizes a custom made camera in order to take photos.

It works but everytime the app gets closed and re-opened, it keeps asking for authorizations to use GPS (used to print coordinates on the photos) and camera (these are only asked once while using the app ofc, but it gets re-asked when the app is closed and re-opened).
Many users complain about this, saying that "when I use other apps, it just asks me permissions once". I currently still haven't found a way to make the browser remember permissions permanently. Is it possible for a web app to do so, or is it something tied to non-web based applications?


r/CodingHelp • • 2d ago

[How to] Anyone remember this on blogs in the past?

1 Upvotes

Years ago, in the early days of blogs, I remember adding a bit of code to the bottom of my blog homepage (or maybe it was in the footer)…this code told people they could explore the next blog or website…

This was not a blogspot (blogger) thing, as I recall…it was something I think I got from another blog that linked a list of pre-approved blogs together to create a group. And everyone that put their blog on this was given some extra traffic through the code that created the little links at the bottom of our sites.

There was a name for it even but I’ve forgotten the name and googling isn’t getting me anything…a circle? That doesn’t seem right but maybe…it worked like a circle since once you clicked through all (I believe it was randomly generated every time, not a sequential list), it would take you back to the original…

My memory is fuzzy but with all the garbage on the net these days and it seeming like only the sites that have lots of money seeming to be the only things turning up in search engine results, I was thinking I’d like to start something like this again…

Even if you don’t know what I’m referring to, it seems like it wouldn’t be too hard to create. Any ideas for me?

I’m no coder (though want to learn) and I use Wordpress for my websites.


r/CodingHelp • • 3d ago

Which one? Weird request but I would like to request a meeting with someone

4 Upvotes

I’m a student doing a project for my school I have little knowledge on coding and for the project I would really like to sit down and have a meeting with anyone on zoom, google meets or anything even for a minute, just show I can complete one of the criterion’s and get a higher grade or would like you guys to leave me tips on coding using “ Xodot” also known as “Godot” any help is most appreciated!


r/CodingHelp • • 3d ago

[Javascript] i wanted help in my coading problem

0 Upvotes

Here is my code from the Detail.jsx page:

const Detail = () => {
  const { name } = useParams();
  console.log("name", name);
};

I get the game ID from the URL. The console shows:

Detail.jsx:19 name 3498

In my Apigame.jsx Context API, I have this function:

const [gamedetail, setgamedetail] = useState([]);

const detailpage = async ({ name }) => {
  console.log("Received name:", name);

  try {
    const response = await axios.get(`games/${name}`);
    console.log("Game ID:", name);
    setgamedetail(response.data);
  } catch (error) {
    console.log("API Error:", error);
  }
};

But I get this error:

TypeError: Cannot destructure property 'name' of 'undefined' as it is undefined.

Everything else is working fine. I only want to pass the name value (3498) from Detail.jsx to my detailpage function in the Context API.

if anyone wanted to understandthese problem i share my whole codeok
detail.jsx

How can I pass this parameter value to my Context API function? Please explain using my existing code.

detail.jsx
import { GamepadDirectional } from 'lucide-react';
import { Tag } from 'lucide-react';
import { Globe, MessageCircle } from "lucide-react";
import { CalendarRange } from 'lucide-react';
import Youtubevideo from '../components/Youtubevideo';
import { Trophy } from 'lucide-react';
import { UsersRound } from 'lucide-react';
import { useContext, useEffect, useState } from "react";
import Axios from "../utility/Axios";
import { useParams } from "react-router-dom";
import { Star } from 'lucide-react';
import Footer from '../components/Footer'
import "./Detail.scss"
import {Detailinformation} from '../Context/Apigame'
import Detailbox from '../components/Detailbox'
const Detail = () => {
  // const [gamedetail, setgamedetail] = useState([]);
  const { name } = useParams();
  console.log("name",name);
  
 const [videos, setVideos] = useState([]);
 const getyoutubevideo = async (gameName) => {
  if (!gameName) return;


  const options = {
    method: "GET",
    url: "https://youtube138.p.rapidapi.com/search/",
    params: {
      q: `${gameName} official trailer`,
      page_size: 1,
      hl: "en",
      gl: "US",
    },
    headers: {
      "x-rapidapi-key": import.meta.env.VITE_YOUTUBE_API_KEY,
      "x-rapidapi-host": "youtube138.p.rapidapi.com",
    },
  };


  try {
    const response = await Axios.request(options);
    // response.data?.contents ue log mai dekhna ek sath 19 video aaya ok tho ye path use kiay 
     const id = response.data?.contents?.[0]?.video?.videoId;
    setVideos(id)
    console.log("ye youtube video",id
);
  } catch (error) {
    console.log("API error:", error.response?.data || error.message);
  }
};
 
 const {gamedetail} = useContext(Detailinformation)
  
//  useEffect(() => {
//     const detailpage = async () => {
//       try {
//         const response = await Axios.get(`games/${name}`);
//         setgamedetail(response.data);
//         console.log("resposnsedata ye game ka detail jho param sa lerahau mai ok ",response.data);
//         // ye waieted karna ka leya tab api aaajya gamedetail ka tab ye chala 
//         // await getyoutubevideo(response.data.name_original);
//          console.log("youtube ki videoid");
         
//       } catch (error) {
//         console.log("API Error:", error);
//       }
//     };


//     detailpage();
    
//   }, [name]);
  
// console.log(gamedetail);


  return (
<div className="detailpage">
      <div className="page-layout" style={{backgroundImage : `URL(${gamedetail?.background_image
})` }}>     
 
 
 <div className="smallimage">
  <div className="game-top">
    <img
      className="cover-image"
      src={gamedetail?.background_image_additional}
      alt={gamedetail?.name}
    />


    <div className="information">
      <h1>{gamedetail?.name}</h1>


      <p className="release">
        {gamedetail?.publishers?.map((item) => item.name).join(", ")}
        {" · "}
        {gamedetail?.released}
      </p>


      <div className="ratings">
        <h2>
          <Star />
          {gamedetail?.rating}
        </h2>


        <h2 className="metacritic">
          {gamedetail?.metacritic ?? "N/A"}
          <span>Metacritic</span>
        </h2>
      </div>


      <div className="genres">
        {gamedetail?.genres?.map((item) => (
          <span key={item.id}>{item.name}</span>
        ))}
      </div>
    </div>
  </div>


  {/* <div className="extra-information">
    
<div className="developers">
  {gamedetail?.developers?.map((item) => (
    <div className="developer-item" key={item.id}>
      <img
        src={item.image_background}
        alt={item.name}
      />
      <span>{item.name}</span>
      <p>{gamedetail?.esrb_rating?.name}</p>
    </div>
  ))}
</div>
  </div> */}
</div>



      </div>
      <div className="gameachiplay">
        <Detailbox icone={< GamepadDirectional/>} titile={gamedetail?.playtime+" hour"} />
        <Detailbox icone={<Trophy/>} titile={gamedetail?.suggestions_count+" Achievement"
} />
<Detailbox icone={<UsersRound/>} titile={gamedetail?.
added+" Added"}/>
       
      </div>
      <div className="about">
        <h1 style={{padding : `0.7rem  1.5rem`,color : `#87CEEB`  }} >About</h1>
       <p>
         {gamedetail?.description_raw?.slice(0,500)}
        </p>
      </div>
      <div className="developer">
        <h1>Developer & Publisher</h1>
        <div className="extra-information">
    
<div className="developers">
  {gamedetail?.developers?.map((item) => (
    <div className="developer-item" key={item.id}>
      <img
        src={item.image_background}
        alt={item.name}
      />
      <span>{item.name}</span>
      <p>{gamedetail?.esrb_rating?.name}</p>
    </div>
  ))}
</div>
  </div>
      </div>
     <div className="video">
  <Youtubevideo  titile={videos}  />
     </div>
          <div className="section">
            <h2>Details</h2>
            <div className="details-table">
              <div className="row"><span><CalendarRange/> Release Date</span><span>{gamedetail?.released}</span></div>
              <div className="row"><span>< Trophy/> Achievements</span><span>{gamedetail?.achievements_count || 0}</span></div>
              <div className="row"><span><UsersRound/> Players Added</span><span>{gamedetail?.added}</span></div>
              <div className="row"><span> <GamepadDirectional />Average Playtime</span><span>{gamedetail?.playtime} hours</span></div>
              <div className="row"><span> <Tag/> Game Tags</span>
                <div className="tags">
                  {gamedetail?.tags?.slice(0,3).map(tag => <span key={tag?.id} className="tag">{tag?.name}</span>)}
                </div>
              </div>
            </div>
    </div>
  
<div className="game-links">
  
    <a
      href={gamedetail?.website}
      target="_blank"
      rel="noopener noreferrer"
      className="game-link"
    >
      <Globe />
      Official Website
    </a>



  <a
    href={gamedetail?.reddit_url}
    target="_blank"
    rel="noopener noreferrer"
    className="game-link"
  >
    <MessageCircle />
    Reddit Community
  </a>
</div>
<div className="footer">
  <Footer/>
</div>
    </div>
  );
};


export default Detail;

ye contexapi

import { createContext,  useEffect,  useState } from "react"


export const gameapi =  createContext()


export const Detailinformation =  createContext()
import axios from '../utility/Axios'
const Apigame = ({children}) => {
  
  const getgame = async () => {
    try {
      // const nextPageNum = page + 1;
      const request = await axios.get("games",{
        params: {
          // page : nextPageNum,
           page_size: 12,
        }
        
      });
      // setpage(nextPageNum);
     console.log("ye request jho mai abhi likha hu ",request);
     
      
      setapidatastore(request.data.results)
    } catch (error) {
      console.log(error);
      
    }
  } 
  const [page, setPage] = useState(1);


const nextpage = async () => {
  try {
    const nextPageNum = page + 1;
    const response = await axios.get("games", {
      params: {
        page: nextPageNum,
        page_size: 12,
      },
    });
    setPage(nextPageNum); // state update
    console.log("Fetched page:", nextPageNum, response.data);
    setapidatastore(response.data.results);
  } catch (error) {
    console.log(error);
  }
};
const [gamedetail, setgamedetail] = useState([]);
 const detailpage = async ({name}) => {
  console.log("yeee aara hai ",name);
  
      try {
        const response = await axios.get(`games/${name}`);
        console.log("API ke liye game ID:", name);
        setgamedetail(response.data);
      } catch (error) {
        console.log("API Error:", error);
      }
    }
  





  useEffect(() => {
  getgame();
  detailpage();
}, []);
const [apidatastore, setapidatastore] = useState([]);
  // const [ videodata , setvideodata ] = useState([]);
  console.log(apidatastore);
 
return (
    
    <Detailinformation.Provider value={gamedetail}>
        <gameapi.Provider value={{apidatastore,nextpage}} >
      
        {children}
      
        </gameapi.Provider>
   </Detailinformation.Provider>
      
  )
}


export default Apigame

plz share your solution i use chatgtp 3 day but unable to slove  these 
because i have to write  same code on other page to called api 
i hope you can understand my problem 

r/CodingHelp • • 3d ago

[C] I fail to comperhend what eglSwapBuffers does

1 Upvotes

Using OpenglES I made a simple piece of code:

``` // Source - https://stackoverflow.com/q/80012457 // Posted by Dimitrios Desyllas // Retrieved 2026-10-25, License - CC BY-SA 4.0

include <stdlib.h>

include <fcntl.h>

include <unistd.h>

include <stdio.h>

define GLFW_INCLUDE_ES2

include <drm.h>

include <drm_mode.h>

include <gbm.h>

include <xf86drm.h>

include "square.h"

include "egl_init.h"

include "drm_init.h"

int main(void) { int drm_fd = open("/dev/dri/card0", O_RDWR);
struct gbm_device *gbm_dev = gbm_create_device(drm_fd);
struct gbm_surface *gbm_surf=NULL;

puts("Get Connector \n");
drmModeConnector *connector = getDRMConnector(drm_fd);
if (!connector) {
    fprintf(stderr, "No connected DRM connector found\n");
    close(drm_fd);
    return 1;
}

drmModeModeInfo mode = connector->modes[0];

unsigned int mode_w = mode.hdisplay;
unsigned int mode_h = mode.vdisplay;

puts("Get CRTC\n");

drmModeCrtc *crtc = getDRMCrtc(drm_fd, connector);
if (!crtc) {
    fprintf(stderr, "No compatible CRTC found\n");
    drmModeFreeConnector(connector);
    close(drm_fd);
    return 1;
}

puts("Initiaslize GBM display");

EGLDisplay egl_display = initEGLDisplay(gbm_dev);
if(egl_display == EGL_NO_DISPLAY){
    fprintf(stderr,"Unable to Initialize EGL display");
    return 1;
}

EGLConfig config;  
EGLint num_configs;

static const EGLint config_attribs[] = {  
    EGL_SURFACE_TYPE, EGL_WINDOW_BIT,  
    EGL_RED_SIZE, 8,
    EGL_GREEN_SIZE, 8, 
    EGL_BLUE_SIZE, 8, 
    EGL_ALPHA_SIZE, 8, 
    EGL_NONE
};

eglChooseConfig(egl_display, config_attribs, &config, 1, &num_configs);  

puts("Initiaslize surface \n");
EGLSurface egl_surface = initEGLSurface(gbm_dev,egl_display,config,mode_w,mode_h, &gbm_surf);

if (egl_surface == EGL_NO_SURFACE) {
    fprintf(stderr, "Failed to create EGL surface\n");
    return 1;
}

if (!gbm_surf) {
    fprintf(stderr, "Failed to create GBM surface\n");
    return 1;
}

puts("Initiaslize context \n");
EGLContext egl_context = initEGLContext(egl_display,config);
eglMakeCurrent(egl_display, egl_surface, egl_surface, egl_context);  

puts("Init program\n");
GLuint program = createProgram();
if (!program) {
    return 1;
}

uint32_t conn_id = connector->connector_id;
uint32_t crtc_id = crtc->crtc_id;     
DisplayFrame current = {0};

puts("Draw Square\n");

drawSquare(program, mode_w,mode_h);
eglSwapBuffers(egl_display, egl_surface);

if (displayRefresh( drm_fd, gbm_surf, crtc_id, conn_id, &mode, &current) != 0) {
    fprintf(stderr, "Display refresh failed\n");
    return 1;
}

puts("Framebuffer displayed");
sleep(10);

puts("Cleanup\n");

eglDestroySurface(egl_display, egl_surface);  
eglDestroyContext(egl_display, egl_context);  
eglTerminate(egl_display);  
gbm_device_destroy(gbm_dev);  
close(drm_fd);

return 0;

}

```

As I ask upon on stackoverflow as well I cannot understand rthe relationship between:

  • gbm_surface
  • EGLSurface
  • EGLDisplay

In my example I seperated the initialization of each egl component into a seprrate library egl_init.c:

```

include "egl_init.h"

EGLDisplay initEGLDisplay(struct gbm_device *gbm_dev) { PFNEGLGETPLATFORMDISPLAYEXTPROC getPlatformDisplay =(PFNEGLGETPLATFORMDISPLAYEXTPROC)eglGetProcAddress("eglGetPlatformDisplayEXT");

if (!getPlatformDisplay) {
    return EGL_NO_DISPLAY;
}

EGLDisplay egl_display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR,gbm_dev,NULL);

if (egl_display == EGL_NO_DISPLAY) {
    return EGL_NO_DISPLAY;
}

if (!eglInitialize(egl_display, NULL, NULL)) {
    return EGL_NO_DISPLAY;
}

return egl_display;

}

EGLSurface initEGLSurface(struct gbm_device gbm_dev,EGLDisplay display, EGLConfig config, unsigned int width, unsigned int height, struct gbm_surface *gbm_surf ){ gbm_surf = gbm_surface_create(gbm_dev, width, height, GBM_FORMAT_XRGB8888, GBM_BO_USE_RENDERING|GBM_BO_USE_SCANOUT);
return eglCreateWindowSurface(display, config, (EGLNativeWindowType)
gbm_surf, NULL); }

EGLContext initEGLContext(EGLDisplay display, EGLConfig config){ return eglCreateContext(display, config, EGL_NO_CONTEXT, (const EGLint[]){EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE});
}

```

And same I do for gbm:

```

include "drm_init.h"

drmModeConnector *getDRMConnector(int drm_fd) { drmModeRes *resources = drmModeGetResources(drm_fd);

if (!resources){
    return NULL;
}

drmModeConnector *connector = NULL;

for (int i = 0; i < resources->count_connectors; i++) {
    drmModeConnector *candidate = drmModeGetConnector(drm_fd,resources->connectors[i]);

    if (!candidate){
        continue;
    }

    if (candidate->connection == DRM_MODE_CONNECTED && candidate->count_modes > 0) {
        connector = candidate;
        break;
    }

    drmModeFreeConnector(candidate);
}

drmModeFreeResources(resources);

return connector;

}

drmModeCrtc *getDRMCrtc( int drm_fd, drmModeConnector *connector ) { if (!connector) return NULL;

drmModeRes *resources = drmModeGetResources(drm_fd);

if (!resources)
    return NULL;

drmModeCrtc *crtc = NULL;

for (int i = 0; i < connector->count_encoders && !crtc; i++) {
    drmModeEncoder *encoder = drmModeGetEncoder(
        drm_fd,
        connector->encoders[i]
    );

    if (!encoder)
        continue;

    for (int j = 0; j < resources->count_crtcs; j++) {
        if (encoder->possible_crtcs & (1u << j)) {
            crtc = drmModeGetCrtc(
                drm_fd,
                resources->crtcs[j]
            );

            if (crtc)
                break;
        }
    }

    drmModeFreeEncoder(encoder);
}

drmModeFreeResources(resources);

return crtc;

}

int displayRefresh(int drm_fd, struct gbm_surface *gbm_surf, uint32_t crtc_id, uint32_t conn_id,drmModeModeInfo *mode, DisplayFrame *current) {

// 1. Lock the new front buffer
struct gbm_bo *bo = gbm_surface_lock_front_buffer(gbm_surf);

if (!bo) {
    return -1;
}

// 2. Get buffer information
uint32_t handle = gbm_bo_get_handle(bo).u32;
uint32_t pitch = gbm_bo_get_stride(bo);
uint32_t width = gbm_bo_get_width(bo);
uint32_t height = gbm_bo_get_height(bo);

uint32_t fb_id = 0;

// 3. Create DRM framebuffer
int ret = drmModeAddFB(drm_fd,width,height,24,32,pitch,handle,&fb_id);

if (ret != 0) {
    perror("drmModeAddFB");
    gbm_surface_release_buffer(gbm_surf, bo);
    return -1;
}

// 4. Display the framebuffer
ret = drmModeSetCrtc(drm_fd,crtc_id,fb_id,0,0,&conn_id,1,mode);

if (ret != 0) {
    perror("drmModeSetCrtc");
    drmModeRmFB(drm_fd, fb_id);
    gbm_surface_release_buffer(gbm_surf, bo);
    return -1;
}

// 5. Release the previous framebuffer
if (current->bo) {
    drmModeRmFB(drm_fd, current->fb_id);
    gbm_surface_release_buffer(gbm_surf,current->bo);
}

// 6. Remember the currently displayed buffer
current->bo = bo;
current->fb_id = fb_id;

return 0;

}

```

But int confuses me why I need to swap buffers via eglSwapBuffers. And once swapped buffers why I need to manually refresh the screen via locking the buffer and manually associating into crtc?

```c int displayRefresh(int drm_fd, struct gbm_surface *gbm_surf, uint32_t crtc_id, uint32_t conn_id,drmModeModeInfo *mode, DisplayFrame *current) {

// 1. Lock the new front buffer
struct gbm_bo *bo = gbm_surface_lock_front_buffer(gbm_surf);

if (!bo) {
    return -1;
}

// 2. Get buffer information
uint32_t handle = gbm_bo_get_handle(bo).u32;
uint32_t pitch = gbm_bo_get_stride(bo);
uint32_t width = gbm_bo_get_width(bo);
uint32_t height = gbm_bo_get_height(bo);

uint32_t fb_id = 0;

// 3. Create DRM framebuffer
int ret = drmModeAddFB(drm_fd,width,height,24,32,pitch,handle,&fb_id);

if (ret != 0) {
    perror("drmModeAddFB");
    gbm_surface_release_buffer(gbm_surf, bo);
    return -1;
}

// 4. Display the framebuffer
ret = drmModeSetCrtc(drm_fd,crtc_id,fb_id,0,0,&conn_id,1,mode);

if (ret != 0) {
    perror("drmModeSetCrtc");
    drmModeRmFB(drm_fd, fb_id);
    gbm_surface_release_buffer(gbm_surf, bo);
    return -1;
}

// 5. Release the previous framebuffer
if (current->bo) {
    drmModeRmFB(drm_fd, current->fb_id);
    gbm_surface_release_buffer(gbm_surf,current->bo);
}

// 6. Remember the currently displayed buffer
current->bo = bo;
current->fb_id = fb_id;

return 0;

} ```

A googling let me into this website: https://registry.khronos.org/EGL/sdk/docs/man/html/eglSwapBuffers.xhtml

That confuses me even more on how wexplains the eglSwapBuffers on it:

If surface is a back-buffered window surface, then the color buffer is copied (posted) to the native window associated with that surface. If surface is a single-buffered window, pixmap, or pixel buffer surface, eglSwapBuffers has no effect.

The contents of ancillary buffers are always undefined after calling eglSwapBuffers. The contents of the color buffer are undefined if the value of the EGL_SWAP_BEHAVIOR attribute of surface is not EGL_BUFFER_PRESERVED. The value of EGL_SWAP_BEHAVIOR can be set for some surfaces using eglSurfaceAttrib. EGL_SWAP_BEHAVIOR applies only to the color buffer. EGL has no way to specify or query whether or not ancillary buffers are preserved, and applications should not rely on this behavior.

eglSwapBuffers performs an implicit flush operation on the context (glFlush for an OpenGL ES or OpenGL context, vgFlush for an OpenVG context) bound to surface before swapping. Subsequent client API commands may be issued on that context immediately after calling eglSwapBuffers, but are not executed until the buffer exchange is completed.


r/CodingHelp • • 5d ago

[Javascript] Script executes before the HTML elements have been rendered in the DOM Even though I used `defer`

Thumbnail
1 Upvotes

r/CodingHelp • • 5d ago

[Java] Installed Java and trying to use it in VS code, why isn't it working?

Thumbnail
2 Upvotes

So basically I have been trying to use Java following a beginner tutorial, I followed the steps to make the path variable and it said to make a Hello World file and use javac to compile it but I encounter the problem in pic related, what can I try? I restarted vs code and power shell, tried solving it with slop but nothing helps


r/CodingHelp • • 6d ago

[How to] How do I stop loosing motivation to code?

6 Upvotes

I am not sure if this fits this subreddit. But I have big problem and I hate it.

I love coding. It's fun. Creating and showing stuff you have made, being able to use it instead of relying on Big tech or similar to make something that always ends in the same 2 ways (either gets stuffed with Artifical "Intelligence". or gets monetized in every way possible usually with annoying ads or having to pay for a feature that should be included).

That's only one of the few reasons I love coding. The thing is now, I have ZERO motivation and don't know how to properly create a project and then continue developing it.

I have started about 50 projects and finished probably 2 of them. (Like literally, only 2 projects out of what feels like thousands)

Now when I choose a project it's either WAY too big (like whole games including making Art, Sounds etc. Myself because I don't wanna pay for stuff and also can't since I'm under 18)

or way too hard to code, requiring crazy knowledge I just don't have. Which is usually when I just get so bored/annoyed of my project that I just either scrap it and code something else or just copy paste from whatever I can find (including generated slop) and then stop because it got too boring or I just have a mental fucking break down because I am too stupid for anything.

I want and need to get away from this ASAP. How do I do this?! Plz help...


r/CodingHelp • • 6d ago

[Other Code] Need help finding a free API or affordable solution for Instagram influencer analytics

0 Upvotes

I’m building an influencer data management system for my work, and I’m trying to automate how I collect and update analytics for celebrities and influencers.

My goal is simple: I want to enter a list of Instagram usernames, click a button, and have my application automatically retrieve their latest data, update my database, and sync the updated information to Google Sheets.

I don’t want to manually search every influencer, copy metrics, download reports, or upload screenshots.

The 7 metrics I need

For every influencer, I need these exact fields:

  1. Average engagement rate
  2. Average likes
  3. Average comments
  4. Audience age distribution
  5. Top audience cities and their percentages
  6. Audience gender split (male/female)
  7. Following count

The audience demographics are the most important part. Public likes, comments, and follower counts are relatively easy to find, but I need the age, city, and gender breakdowns too.

My current setup

I already have an application built using Java 21, Spring Boot, and PostgreSQL. It supports Excel ingestion, influencer searches, and exporting results. I also use Google Sheets to maintain and share data.

I want to extend this existing system rather than build another separate dashboard.

What I’ve already tried or considered

  • Wednesday: It provides the analytics I need, but I haven’t found a suitable API that I can use to integrate the data directly into my application.
  • Instagram Graph API: I understand that a Business or Creator account does not automatically grant access to other influencers’ audience demographics.
  • Free analytics websites: I’ve looked into various free tools, but I haven’t found one that reliably provides all seven fields through an API.
  • Open-source projects: I explored an Instagram audience analytics project, but it was designed for an account I own or have authorized, rather than arbitrary public influencer profiles.
  • Screenshot/OCR automation: This is possible in principle, but I want to avoid manually opening profiles, taking screenshots, and uploading them every time.

The feature I want to build

Ideally, I want a Refresh All Data button that does the following:

  1. Reads the influencer names and profile links already stored in my application.
  2. Retrieves the latest available analytics for each influencer.
  3. Updates the existing database records rather than creating duplicates.
  4. Updates the corresponding records in Google Sheets automatically.
  5. Records when each influencer’s data was last refreshed.
  6. Identifies accounts for which some metrics are unavailable, instead of silently filling in made-up numbers.

For example, if I have five celebrities in my database and their analytics are six months old, I want to click Refresh All Data and have the system retrieve fresh data for all five, update PostgreSQL and Google Sheets, and preserve the existing records and fields.

I’d also like to be able to refresh selected influencers individually.

My questions

1. Is there a genuinely free way to achieve this?

I’m looking for a free API, open-source project, or combination of services that can retrieve all seven metrics for arbitrary public Instagram profiles. I understand that rate limits may apply, but I’d like to avoid paying if possible.

2. If a completely free solution isn’t realistic, what is the most affordable reliable option?

I’m willing to pay for a service if necessary, but I need API access that supports programmatic retrieval and integration into my existing application. I don’t want to pay for a platform that only allows me to view reports manually.

3. Which services should I evaluate?

I’d appreciate recommendations based on actual API capabilities, especially audience age distribution, city-level audience breakdowns, gender split, and the ability to refresh data programmatically.

4. Has anyone implemented this successfully?

If you’ve built something similar, I’d like to know which data provider you used, what it costs, how reliable the data is, and whether the API supports refreshing existing records.

I’m primarily working with Indian celebrities and influencers, so useful audience data for Indian creators is particularly important.

I’m happy to build the integration myself. The main challenge is finding the right data source.

Thanks in advance for any practical recommendations, API documentation, or implementation advice.


r/CodingHelp • • 7d ago

[Java] why is this returning read only once i get to the enter name stage

3 Upvotes
import java.util.Scanner;

public class main
{

    public static void main(String[] args) {

        Scanner kboard = new Scanner(System.
in
);

        System.
out
.println("Press 1 to enter lottery numbers or 2 to enter name: ");


        if (kboard.nextInt() == 1) {

            System.
out
.println("Enter your lottery numbers");

            int lotteryNumbers = kboard.nextInt();
        } else {
            System.
out
.println("Please enter your name: ");

            String name = kboard.nextLine();
        }


    }}

r/CodingHelp • • 7d ago

[Javascript] как переписывать автоматически код с одного ЯП на другой ЯП?

Thumbnail
1 Upvotes

r/CodingHelp • • 7d ago

[Other Code] How do I get Antigravity to match a reference UI instead of repeatedly generating a completely different design?

0 Upvotes
AI genrated UI
this UI i wanna atchive

I'm building a dashboard using Google Antigravity and AI-assisted coding, but I'm struggling to get the UI to look the way I want.

The blue UI is my AI-generated design, while the other screenshot is the design I actually want to achieve.

I've tried multiple approaches:

  • Asking ChatGPT and other AI tools to improve my prompts.
  • Giving Antigravity detailed UI/UX instructions.
  • Using the reference screenshot and asking it to recreate the design.
  • Refining the prompts repeatedly to get a more professional, polished result.

Unfortunately, the results still don't match the reference. Sometimes the AI makes unnecessary changes, changes the overall layout, or produces something that looks worse than the original.

My goal isn't to redesign the entire dashboard from scratch. I want to preserve my existing functionality and make the UI closely match the reference, including its layout, spacing, typography, colors, component sizing, alignment, and overall visual hierarchy.

I'm looking for advice from developers who have successfully used Antigravity or similar AI coding agents for this kind of work.

My questions:

  1. What's the most effective workflow for recreating a UI from a reference screenshot using an AI coding agent?
  2. Should I use a different prompting strategy, provide multiple screenshots, or break the work into smaller components?
  3. How can I make the AI follow the reference closely instead of inventing its own design decisions?
  4. Are there any tools, workflows, or techniques that consistently produce better results than simply writing longer prompts?

I'd especially appreciate practical advice from people who have actually solved this problem, rather than generic advice to write more detailed prompts.

Thanks!


r/CodingHelp • • 8d ago

[Request Coders] making buttons lead to other websites

4 Upvotes

I have no experience in coding so apologies if this is a very simple task. i have a chrome extension that makes my landing page fallout themed and the "fast travel" section has dedicated buttons already assigned to websites. I wanted to know how to make it so that i can change these websites to others because I dont use them. any help is appreciated thanks!


r/CodingHelp • • 8d ago

[How to] How can I achieve this scrolling effect in react?

1 Upvotes

I want to achieve an effect like this - https://genshin.hoyoverse.com/en/

Basically, I have multiple sections in my site, and I want to make sure a user scrolls exactly where I want them to. Right now, I use this -

.snapContainer {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    overflow-x: hidden;
}


.section {
    height: 100vh;
    width: 100vw;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}.snapContainer {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    overflow-x: hidden;
}


.section {
    height: 100vh;
    width: 100vw;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

This works, but I want to know how they did it (The proper, non-buggy way). Thanks!


r/CodingHelp • • 12d ago

[Random] Need help deciding a website to use

0 Upvotes

What is the best site to use to build full stack website codes of my own. What website is best to be able to build and test all my code in one place


r/CodingHelp • • 13d ago

[CSS] I can’t figure out what I’ve done wrong

1 Upvotes

So I recently made a website for a buddy’s streaming career. It’s a basic linktree more or less. My issue is that when I run a test I cannot see the links. I tap the area they should be and they work but they don’t appear. What could I have done wrong


r/CodingHelp • • 14d ago

[Random] Need brutal and honest feedback for my website

2 Upvotes

I made a personal website - kalerkaler and I'm looking to find freelance work with it, could you please tell me what needs to changed in order to make the best user experience. I already know it doesn't work on mobile landscape. Edit - fixed the link, its not a flashbang no more


r/CodingHelp • • 17d ago

[How to] Is it possible to connect a blind box style twitch widget to an external website or app

2 Upvotes

I’m streaming on twitch and have recently seen blind box widgets on other peoples streams where chatters can “open blind boxes” to collect key ring charms or trading cards. I was wondering if it were possible to create a twitch widget where the results of the blind box pull could be kept in a library externally on an app or website for individual chatters.

I don’t personally code- but my friends in comp sci are really enthused by the idea as a group passion project where they code and I produce the art and animations. Their skill level is that of 3rd yr comp sci students.

Before I get everyone’s hopes up- is it doable at all??


r/CodingHelp • • 17d ago

[Javascript] Learn Javascript from scratch | Code With Kislay

Thumbnail
1 Upvotes

r/CodingHelp • • 20d ago

[Random] Should I try to learn coding again?

6 Upvotes

Hello everyone. I used to learn Python/C#/Java at superficial level build some little apps that made simple things.

But after a while I start to struggle while doing slightly more difficult things like making a sudoku generator it take me months to built it but after I couldn't made it so I kinda grew cold and drop it.

Should I start again with ai mostly taking over job possibilities felt like less? Any advice?


r/CodingHelp • • 20d ago

[Javascript] I don’t understand the use of immutable variable

3 Upvotes

I’m learning react right now for a web design project and immutable variables are being brought up. I don’t understand why you would want a variable that can’t vary, how do things like a counter work if variables can’t change?


r/CodingHelp • • 21d ago

[Python] How should an LLM represent and edit long-form video? Trying to understand how Cardboard does it

1 Upvotes

i've been experimenting with agentic video editing and trying to understand where the engineering bottlenecks actually are.

i started looking into this after experimenting with cardboard's desktop app, where different ai models can be used for editing. rather than trying to understand the product itself, i wanted to work backwards and think about how i'd architect something similar.

what makes this interesting to me is that video seems fundamentally different from the normal llm workflow that produces text or code.

with code, the model works with a relatively discrete representation. a prompt becomes code, the code goes through a compiler, and you get an output.

with video, the model has to reason over a continuous, multimodal and temporal medium. raw footage has to be understood visually and aurally, relevant parts retrieved, the model has to reason over time and make editing decisions, and those decisions become a timeline that gets rendered.

for example, imagine giving an agent 30 minutes of raw footage and asking:

"make a 30-second product ad. find the strongest hook, remove dead time, use the best product shots, keep the pacing fast, add captions and end with a cta."

before making a single edit, the system needs to determine what's actually happening in the footage, what is being said, where specific actions occur, which shots are useful, which are redundant, and how different moments relate temporally.

i've been looking at this from the implementation side and i'm currently thinking about the following architecture.

  1. video representation

you can't realistically send an entire 30-minute video to an llm every time it needs to make an editing decision.

my initial assumption is that the footage needs to be indexed first using some combination of:

transcripts with timestamps scene and shot boundaries sampled keyframes visual embeddings audio features detected objects and actions shot descriptions semantic metadata

then the reasoning model retrieves the relevant sections.

for example, "find the shot where the person picks up the black headphones and looks at the camera" could work like this: the text query goes through semantic retrieval, which returns candidate timestamps, those candidates get verified visually, and one clip is selected.

i've looked at video embeddings and multimodal models for this, but i'm not sure where the optimal boundary is between preprocessing and model reasoning.

2.timeline representation

once the model finds the relevant footage, it still needs to construct an actual edit.

for example: "use 00:14 to 00:18 as the opening shot, cut to 00:32 to 00:35, then return to 00:19 to 00:22."

that requires maintaining a representation of the current timeline and applying operations against it.

the obvious approach is to expose low-level operations such as insert, trim, split, move, crop, change speed and add text.

but i'm wondering if a higher-level abstraction makes more sense:

find_best_hook remove_dead_air create_intro build_product_sequence add_captions

the second approach seems more suitable for an agent, but it also means the editor has to handle a lot more complexity behind each operation.

evaluation is probably the hardest part

this is where video seems particularly different from coding.

code can usually be tested against objective criteria.

video can be completely valid technically and still be a terrible edit.

a timeline can render successfully, have perfect synchronization and valid captions, but still have poor pacing, a weak hook or a confusing narrative.

so i'm currently thinking that a serious system might need an iterative loop. the agent generates an edit, renders a preview, evaluates it with a multimodal model, identifies the weak sections, modifies the timeline, and renders again.

i've been looking at ffmpeg, remotion, moviepy, opentimelineio, video embeddings, multimodal models and mcp or tool calling as potential building blocks, but i haven't settled on what the cleanest architecture would be.

the pipeline i'm currently considering starts with video indexing, then retrieval, then a reasoning model that issues editing actions onto a timeline, followed by rendering, evaluation and iteration. that is different from a setup where a prompt goes to a video generation model and a video comes out.

i'm interested in whether this mental model is fundamentally wrong.

questions for people who've worked on this"

if you had to represent hours of raw video for an llm, what would you choose: sampled frames with embeddings, structured scene and shot metadata, transcript, or some combination? where would you draw the boundary between preprocessing and model reasoning?

would you expose low-level timeline operations to the model, or build a higher-level video-editing abstraction? how would you prevent the abstraction from becoming too restrictive while still keeping the model from making brittle timeline operations?

how would you design the evaluation loop for subjective quality? what information would you give a model so it can distinguish a technically valid edit from an actually good edit and identify which part of the timeline needs to change?

i've already spent some time researching and prototyping around the components above, so i'm mainly looking for architectural criticism from people who've worked with video processing, nles, multimodal models or agent systems.

tldr: i'm trying to understand how systems like cardboard let llms reason over real footage and turn that into actual edits. the hard part seems to be video representation, retrieval, timeline operations and evaluating whether an edit is actually good. looking for architectural perspectives on how you'd build this from scratch.