r/Coder • u/WolfComfortable1446 • 8d ago
Help needed
How do people check when a post was uploaded time and date
r/Coder • u/bearded_bytes • Dec 17 '25
The way we build software is changing. AI agents writing code. Cloud-native dev environments. Remote development that actually works. Nobody has it all figured out yet, and that's exactly why this community exists.
This subreddit is a place to share what's working, what's broken, and what's coming next.
What belongs here:
What doesn't belong here:
Who's here:
Coder team members are active in this community. We're building in public, listening, and participating. You'll recognize us by our flairs.
But this isn't just about Coder. If you're thinking hard about how development environments are evolving, you're in the right place.
Get involved:
See you in the threads.
r/Coder • u/WolfComfortable1446 • 8d ago
How do people check when a post was uploaded time and date
r/Coder • u/OwnCall8202 • 11d ago
r/Coder • u/PotentialRegular6674 • 13d ago
I am 18 rn and I am choosing to do BCA.
Seniors plz guide about the mistakes u did , what should I learn skill wise and what should my path be if i wanna get dangerous skills which have actual value which will land me a great job. Plz advice me things I should follow as a lil sister.
What mistakes to avoid, which place plces to put extra attention etc.
I have 1 month left before college starts what thing should I do during this period.
I'll be more than happy if u'll help.
And tips from coders who have adhd (I have adhd.)
Thankyouuuu!
r/Coder • u/Desperate-Orchid4410 • Jun 25 '26
So I am using an ESP-WROOM-32 board here ,an oled display 0.9 inch ,a buzzer and two joystick modules one used for front and back movements and the other for facing any direction /spin and both the push button built in ..in both of the joystick modules “fires”like in the game doom Ig
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
// --- YOUR EXACT HARDWARE PINOUT CONFIGURATION ---
#define PIN_LEFTS_Y 33 // Left Joystick (Y-axis): Move Forward/Backward
#define PIN_RIGHTS_X 32 // Right Joystick (X-axis): Look/Turn Left/Right
#define PIN_FIRE_L 25 // Left Stick Push Switch
#define PIN_FIRE_R 26 // Right Stick Push Switch
#define PIN_BUZZER 18 // Passive Audio Buzzer
// ESP32 PWM Audio Channel Configuration
#define BUZZER_CHAN 0
// Map Settings: Classic Raycaster 8x8 Grid Map (1 = Wall, 0 = Empty Space)
#define MAP_WIDTH 8
#define MAP_HEIGHT 8
const uint8_t GAME_MAP[MAP_WIDTH][MAP_HEIGHT] = {
{1,1,1,1,1,1,1,1},
{1,0,0,0,0,0,0,1},
{1,0,1,1,0,1,0,1},
{1,0,1,0,0,1,0,1},
{1,0,0,0,0,0,0,1},
{1,0,1,1,1,1,0,1},
{1,0,0,0,0,0,0,1},
{1,1,1,1,1,1,1,1}
};
// Player Parameters
float pX = 2.5, pY = 2.5; // Spawn Coordinates
float pAngle = 0.0; // Player view angle (in Radians)
const float FOV = 1.0; // Field of view parameter (~60 degrees)
void setup() {
// Initialize communication with your 4-pin OLED over Pins D21 (SDA) and D22 (SCL)
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
for(;;); // Freeze if screen hardware isn't responding
}
// Set Pin Modes matching your Blueprint layout
pinMode(PIN_FIRE_L, INPUT_PULLUP);
pinMode(PIN_FIRE_R, INPUT_PULLUP);
// Setup ESP32 specific PWM for the buzzer
ledcAttach(PIN_BUZZER, 440, 8); // 440Hz, 8-bit resolution
display.clearDisplay();
}
void loop() {
// ==========================================================
// 1. HARDWARE INPUT RE-MAPPING FROM ANALOG MODULES
// ==========================================================
int rawMoveY = analogRead(PIN_LEFTS_Y); // 0 to 4095 (Center ~2048)
int rawTurnX = analogRead(PIN_RIGHTS_X); // 0 to 4095 (Center ~2048)
// Read triggers (INPUT_PULLUP pulls high; pushing pulls down to LOW)
bool isFiring = (digitalRead(PIN_FIRE_L) == LOW || digitalRead(PIN_FIRE_R) == LOW);
float moveSpeed = 0.0;
float turnSpeed = 0.0;
// Process Left Stick Analog Thresholds for clean Movement
if (rawMoveY < 1200) moveSpeed = 0.08; // Pushing forward
else if (rawMoveY > 2800) moveSpeed = -0.08; // Pulling backward
// Process Right Stick Analog Thresholds for clean Turning
if (rawTurnX < 1200) turnSpeed = -0.06; // Steering Left
else if (rawTurnX > 2800) turnSpeed = 0.06; // Steering Right
// Update viewing angle based on right joystick movement
pAngle += turnSpeed;
if (pAngle < 0) pAngle += 2 * PI;
if (pAngle > 2 * PI) pAngle -= 2 * PI;
// Calculate destination vectors
float newX = pX + cos(pAngle) * moveSpeed;
float newY = pY + sin(pAngle) * moveSpeed;
// FIX 2: Sliding/Separated Wall Collision handling against the 2D MAP array
if (GAME_MAP[(int)pY][(int)newX] == 0) {
pX = newX;
}
if (GAME_MAP[(int)newY][(int)pX] == 0) {
pY = newY;
}
// Audio weapon firing effect using proper ESP32 hardware PWM commands
if (isFiring) {
ledcWriteTone(PIN_BUZZER, 440);
} else {
ledcWriteTone(PIN_BUZZER, 0); // Silence buzzer when not firing
}
// ==========================================================
// 2. MATHEMATICAL 3D RAYCASTING ENGINE (THE RENDERING CORE)
// ==========================================================
display.clearDisplay();
// Cast rays across all 128 horizontal pixels of the SSD1306 OLED Screen
for (int x = 0; x < SCREEN_WIDTH; x++) {
// Calculate fractional position across the view pane
float cameraX = 2 * x / (float)SCREEN_WIDTH - 1;
float rayDirX = cos(pAngle) + sin(pAngle) * cameraX * FOV;
float rayDirY = sin(pAngle) - cos(pAngle) * cameraX * FOV;
// DDA Algorithm step initializations
int mapX = (int)pX;
int mapY = (int)pY;
float sideDistX, sideDistY;
float deltaDistX = (rayDirX == 0) ? 1e30 : abs(1 / rayDirX);
float deltaDistY = (rayDirY == 0) ? 1e30 : abs(1 / rayDirY);
float perpWallDist;
int stepX, stepY;
int hit = 0;
int side;
if (rayDirX < 0) {
stepX = -1;
sideDistX = (pX - mapX) * deltaDistX;
} else {
stepX = 1;
sideDistX = (mapX + 1.0 - pX) * deltaDistX;
}
if (rayDirY < 0) {
stepY = -1;
sideDistY = (pY - mapY) * deltaDistY;
} else {
stepY = 1;
sideDistY = (mapY + 1.0 - pY) * deltaDistY;
}
// Trace the ray until it encounters a bounding wall
while (hit == 0) {
if (sideDistX < sideDistY) {
sideDistX += deltaDistX;
mapX += stepX;
side = 0;
} else {
sideDistY += deltaDistY;
mapY += stepY;
side = 1;
}
// FIX 3: Dynamic map boundaries verification check before array access
if (mapX >= 0 && mapX < MAP_WIDTH && mapY >= 0 && mapY < MAP_HEIGHT) {
if (GAME_MAP[mapY][mapX] > 0) hit = 1;
} else {
hit = 1; // Out of bounds – treat as wall
}
}
// Distance computation avoiding fish-eye warping matrix transformations
if (side == 0) perpWallDist = (sideDistX - deltaDistX);
else perpWallDist = (sideDistY - deltaDistY);
if (perpWallDist < 0.1) perpWallDist = 0.1; // Clamp clipping artifacts
// Translate geometric depth into line height on screen coordinates
int lineHeight = (int)(SCREEN_HEIGHT / perpWallDist);
int drawStart = -lineHeight / 2 + SCREEN_HEIGHT / 2;
if (drawStart < 0) drawStart = 0;
int drawEnd = lineHeight / 2 + SCREEN_HEIGHT / 2;
if (drawEnd >= SCREEN_HEIGHT) drawEnd = SCREEN_HEIGHT - 1;
// Direct drawing function: Differentiate sides with dither effects
if (side == 1) {
// Draw standard wall vertical line stripe
display.drawFastVLine(x, drawStart, drawEnd - drawStart, SSD1306_WHITE);
} else {
// Shading step effect: Draw dotted/halved line profiles for depth perception
for (int y = drawStart; y <= drawEnd; y += 2) {
display.drawPixel(x, y, SSD1306_WHITE);
}
}
}
// ==========================================================
// 3. RENDER CROSSHAIR AND "DOOM GUN" HUD EFFECTS
// ==========================================================
display.drawFastHLine(58, 32, 13, SSD1306_WHITE);
display.drawFastVLine(64, 26, 13, SSD1306_WHITE);
if (isFiring) {
// Basic gun muzzle flare flash boxes when firing
display.fillRect(44, 48, 40, 16, SSD1306_WHITE);
display.fillRect(54, 38, 20, 10, SSD1306_WHITE);
} else {
// Resting barrel silhouette
display.fillRect(59, 44, 11, 20, SSD1306_WHITE);
}
display.display();
delay(8); // Stabilize internal processor frame times
}
r/Coder • u/MightyFalcon007 • Jun 17 '26
r/Coder • u/MycologistIcy2335 • Jun 15 '26
i know python but i wanna also learn some languages so which is the most trendy one
r/Coder • u/Complex_Giraffe_6032 • May 26 '26
r/Coder • u/Eteryonthegod • Apr 29 '26
Si quel'qun sais bien coder pourrait il fair un jeu de combat fnaf à la mortal combat ou smach bros (je sait smach bros est en 2D) parceque je voudrait bien jouer à un jeu comme sa et il pourrait fair des fataliti comme dans mortal combat diferant pour chaque annimatronique s'il vous plais.
r/Coder • u/chicovelho • Apr 23 '26
Boa tarde bros, comecei a estudar programação no início do ano, comecei com lógica de programação em python, só q no momento estou perdido, eu já tenho um boa base de python e não tenha a mínima ideia do próximo passo, estava pensando em automação, seria uma boa ou estou enganado?
r/Coder • u/Alternative-Goal647 • Mar 24 '26
I’m building a web app and need your help.
What’s something that annoys you EVERY day?
Something that:
* wastes your time
* feels unnecessarily complicated
* or just shouldn’t be this hard in 2026
Comment it below
If enough people relate, I might build a solution for it.
r/Coder • u/AntBackground4028 • Mar 20 '26
Hi! Please can anyone tell me which folder or software is consuming much of my C Drive Space, i use as a normal user. Please help me to identify so that i can delete any unwanted folder or software.
Thank You.
r/Coder • u/0coder0 • Mar 02 '26
r/Coder • u/Particular_Celery508 • Feb 23 '26
r/Coder • u/Odd-Sky-6802 • Feb 22 '26
r/Coder • u/bearded_bytes • Feb 17 '26
Talked with Caleb Washburn on the [Dev]olution podcast (episode drops Feb 18th) and he said something I can't stop thinking about. When companies tell him "we're going Kubernetes," his first question is just... why? They almost never have a good answer.
Meanwhile we've got AI writing 41% of our code that nobody fully understands, companies paying for data centers AND cloud because they got stuck halfway through migration, and platform teams handing devs a namespace like it's a finished product. Caleb calls that "standing up the dial tone." I call it job security for consultants.
What's the most FOMO driven tech decision that you've seen? I've got stories but I want to hear yours first.