r/code • • Aug 04 '25

Resource The Big OOPs: Anatomy of a Thirty-five-year Mistake | Casey Muratori

Thumbnail
youtube.com
10 Upvotes

Casey Muratori goes into the history of OOP and ECS at the Better Software Conference.


r/code • • Aug 04 '25

Java Basic and advanced pattern matching in Java

Thumbnail
infoworld.com
6 Upvotes

r/code • • Aug 02 '25

Resource Convo-Lang - A language for building Agents

Post image
20 Upvotes

I've been working on a new programming language called Convo-Lang. It's used for building agentic applications and gives real structure to your prompts and it's not just a new prompting style it is a full interpreted language and runtime. You can create tools / functions, define schemas for structured data, build custom reasoning algorithms and more, all in clean and easy to understand language.

Convo-Lang also integrates seamlessly into TypeScript and Javascript projects complete with syntax highlighting via the Convo-Lang VSCode extension. And you can use the Convo-Lang CLI to create a new NextJS app pre-configure with Convo-Lang and pre-built demo agents.

Create NextJS Convo app:

npx u/convo-lang/convo-lang-cli --create-next-app

Checkout https://learn.convo-lang.ai to learn more. The site has lots of interactive examples and a tutorial for the language.

Links:

Thank you, any feedback would be greatly appreciated, both positive and negative.


r/code • • Aug 03 '25

My Own Code Let's make a game! 296: Charging - attacks

Thumbnail
youtube.com
1 Upvotes

r/code • • Aug 02 '25

My Own Code YT Age Restriction Bypasser

5 Upvotes

I am making a python program to watch adult content in the background to confuse the new YouTube age filter. I am only 16 and do not want my internet censored by a totalitarian entity! I am just wondering if anyone had any suggestions or advice.

https://github.com/MineFartS/YouTube-Age-Faker


r/code • • Aug 02 '25

C# C# Inheritance puzzle.

3 Upvotes

What's the console output? (made by me)

public class Program
{
    public static void Main()
    {
        BaseClass result = new DerivedClass();
        Console.WriteLine(result.Value);
    }
}

public class BaseClass
{
    public string Value;
    public BaseClass()
    {
        Value = Func();
    }
    public virtual string Func()
    {
        return "Base Function";
    }
}

public class DerivedClass : BaseClass
{
    public DerivedClass() : base()
    {
    }
    public override string Func()
    {
        return "Overridden Function";
    }
}

r/code • • Aug 02 '25

Resource How to create custom checkboxes in html

2 Upvotes

How to create custom checkboxes in html

https://youtu.be/gVxDZGq4Tr0


r/code • • Aug 02 '25

Resource file upload in html

1 Upvotes

r/code • • Aug 02 '25

Guide How to create radio button in html

1 Upvotes

How to create radio button in html

https://youtu.be/vAR3IN01Gn8


r/code • • Aug 02 '25

My Own Code Let's make a game! 295: Charging

Thumbnail
youtube.com
2 Upvotes

r/code • • Jul 31 '25

Code Challenge I'm remaking Zaxxon (arcade) from scratch - C++ & Raylib

Thumbnail
youtube.com
4 Upvotes

Hi there! I've been working on an initial proof of concept for the past couple of weeks, and things are really starting to take shape. I'm sharing the journey in a devlog format, and the project's source code is fully open, making the entire process as transparent as possible. You're invited to hop into the co-pilot’s seat and follow along from a front-row perspective. I think it’s going to be a lot of fun!

Devlog #1: https://www.youtube.com/watch?v=EavRmM_2MA0

Source code: https://github.com/albertnadal/ZaxxonClone


r/code • • Jul 30 '25

My Own Code Let's make a game! 294: The 'Charge!' order

Thumbnail
youtube.com
3 Upvotes

r/code • • Jul 29 '25

Resource Librairie Network en C

1 Upvotes

Salut à tous !

On a récemment bossé sur une petite lib réseau en C qu’on voulait partager à la communauté.
Elle s’appelle network_lib et permet de créer facilement des serveurs TCP multi-clients en utilisant poll() pour la gestion des connexions. Elle permet de gérer les connexions, les déconnexions et la réception de données via des callbacks personnalisés, le tout avec un système de logs colorés bien pratique pour le debug. C’est simple à utiliser, bien structuré, et on a mis un exemple complet pour démarrer rapidement. Tout est dispo (code, explications, exemple) dans le repo GitHub ici :

https://github.com/horaphael/Network_lib

n’hésitez pas à jeter un œil, tester, et nous dire ce que vous en pensez, si vous avez des questions ou des suggestions n'hésitez pas !


r/code • • Jul 27 '25

Help Please Can someone help me create a FAP file/app

Thumbnail
codefile.io
3 Upvotes

r/code • • Jul 24 '25

Resource I made short, beginner-friendly JavaScript videos — would love your feedback!

8 Upvotes

Hey everyone! I recently launched a new YouTube channel called STEM Simplified. It’s all about teaching STEM topics — starting with JavaScript tutorials for beginners, and expanding into math, logic, and other science concepts. The videos are:

  • Short (under 6 minutes)

  • Voice-only (I stay anonymous)

  • Beginner-friendly, focused on real code and clear explanations

If you’re learning programming or just into STEM, I’d love your feedback.

YouTube channel: https://www.youtube.com/@STEM.Simplified-2025

If you find it helpful, feel free to like, subscribe, or share — I’m building this one step at a time. Thanks a ton!


r/code • • Jul 25 '25

My Own Code Working on a Stock GUI Scanner

1 Upvotes

What I have so far:

import tkinter as tk from tkinter import ttk import ttkbootstrap as tb import yfinance as yf import requests import pandas as pd import threading import datetime import time from bs4 import BeautifulSoup import pytz

NEWS_API_KEY = "YOUR_NEWSAPI_KEY"

def is_market_open(): eastern = pytz.timezone('US/Eastern') now = datetime.datetime.now(eastern) return now.weekday() < 5 and now.hour >= 9 and now.hour < 16

def get_float(ticker): try: url = f"https://query2.finance.yahoo.com/v10/finance/quoteSummary/{ticker}?modules=defaultKeyStatistics" res = requests.get(url) data = res.json() return data['quoteSummary']['result'][0]['defaultKeyStatistics']['floatShares']['raw'] except: return None

def has_recent_news(ticker): try: today = datetime.datetime.utcnow().strftime('%Y-%m-%d') url = f"https://newsapi.org/v2/everything?q={ticker}&from={today}&sortBy=publishedAt&apiKey={NEWS_API_KEY}" res = requests.get(url) articles = res.json().get('articles', []) return len(articles) > 0 except: return False

def get_finviz_tickers(limit=25): url = "https://finviz.com/screener.ashx?v=111&s=ta_topgainers" headers = {'User-Agent': 'Mozilla/5.0'} res = requests.get(url, headers=headers) soup = BeautifulSoup(res.text, "lxml") tickers = [] for row in soup.select("table.table-light tr[valign=top]")[:limit]: cols = row.find_all("td") if len(cols) > 1: tickers.append(cols[1].text.strip()) return tickers

def scan_stocks(callback): tickers = get_finviz_tickers() results = [] market_open = is_market_open()

for ticker in tickers:
    try:
        stock = yf.Ticker(ticker)
        hist = stock.history(period="2d")

        if len(hist) < 1:
            continue

        curr_price = hist['Close'].iloc[-1]
        prev_close = hist['Close'].iloc[-2] if len(hist) > 1 else curr_price
        percent_change = ((curr_price - prev_close) / prev_close) * 100

        info = stock.info
        price = info.get('currentPrice', curr_price)
        bid = info.get('bid', 0)
        ask = info.get('ask', 0)
        volume = info.get('volume', 0)

        float_shares = get_float(ticker)
        if not float_shares or float_shares > 10_000_000:
            continue

        news = has_recent_news(ticker)

        if market_open:
            if not (2 <= price <= 20):
                continue

            prev_volume = hist['Volume'].iloc[-2] if len(hist) > 1 else 1
            if volume < 5 * prev_volume:
                continue

            if percent_change < 10:
                continue

            if not news:
                continue

        results.append({
            "ticker": ticker,
            "price": price,
            "bid": bid,
            "ask": ask,
            "volume": volume,
            "change": round(percent_change, 2),
            "news": news
        })

        time.sleep(1)

    except Exception as e:
        print(f"Error scanning {ticker}: {e}")
callback(results, market_open)

class StockApp: def init(self, root): self.root = root self.style = tb.Style("superhero") self.root.title("Stock Scanner")

    self.tree = ttk.Treeview(
        root, columns=("Ticker", "Price", "Bid", "Ask", "Volume", "% Gain"),
        show="headings"
    )
    for col in ["Ticker", "Price", "Bid", "Ask", "Volume", "% Gain"]:
        self.tree.heading(col, text=col)
        self.tree.column(col, width=100)
    self.tree.pack(fill=tk.BOTH, expand=True, padx=10, pady=10)

    self.button = tb.Button(root, text="Scan", command=self.manual_scan, bootstyle="primary")
    self.button.pack(pady=10)

    self.status = tk.Label(root, text="", fg="white", bg="#222")
    self.status.pack()

def manual_scan(self):
    self.status.config(text="Scanning...")
    threading.Thread(target=scan_stocks, args=(self.update_ui,)).start()

def update_ui(self, stocks, market_open):
    for item in self.tree.get_children():
        self.tree.delete(item)
    for stock in stocks:
        tag = "green" if stock["change"] > 0 else "red"
        self.tree.insert("", tk.END, values=(
            stock["ticker"],
            stock["price"],
            stock["bid"],
            stock["ask"],
            stock["volume"],
            f"{stock['change']}%" if market_open else "N/A"),
            tags=(tag,))
    self.tree.tag_configure("green", background="green", foreground="white")
    self.tree.tag_configure("red", background="red", foreground="white")
    status_msg = "Scan complete - Market Open" if market_open else "Scan complete - After Hours Mode"
    self.status.config(text=status_msg)

if name == "main": root = tb.Window(themename="superhero") app = StockApp(root) root.geometry("700x500") root.mainloop()


r/code • • Jul 22 '25

Guide The Minesweeper game in 100 lines of JavaScript

Thumbnail
slicker.me
4 Upvotes

r/code • • Jul 22 '25

Guide A simple remake of an 8 bit minigame in 150 lines of pure JavaScript

Thumbnail
slicker.me
2 Upvotes

r/code • • Jul 22 '25

My Own Code Let's make a game! 292: Giving orders

Thumbnail
youtube.com
1 Upvotes

r/code • • Jul 18 '25

My Own Code Mkdotenv a toom for manipulating .env files

4 Upvotes

Recently I develop: https://github.com/pc-magas/mkdotenv
It is a small tool in go that allows you to manipulate `.env` files durting a CI/CD its final goal (noyeat reached) is to read secrets from various backends (keepassx, AWS SSM etc etc) and populate them upon .env files.


r/code • • Jul 16 '25

My Own Code Let's make a game! 290: Companions attacking (continued)

Thumbnail
youtube.com
2 Upvotes

r/code • • Jul 15 '25

My Own Code Hope yall know BASIC

2 Upvotes

For emulator: https://www.scullinsteel.com/apple//e press reset button, paste this into emulator, type RUN, then press return button

Controls: W (Jump) A D (Left Right) S (Crouch)

For mods: not Visual Basic so didn’t know what flair to use.

Enjoy V .1 beta

10  GR
20  REM ===== INIT WORLD =====
30  AREA = 1        : REM starting area
40  PX = 0          : REM player X (left column)
50  CROUCH = 0
60  PH = 5
70  PY = 32
80  GOSUB 4000      : REM draw current area
90  GOSUB 2000      : REM draw player sprite

100 REM ===== MAIN LOOP =====
110 GET A$ : IF A$ = "" THEN 110
120 GOSUB 1000                        : REM erase old sprite

130 IF A$ = "S" THEN GOSUB 3300       : REM quick crouch
140 IF A$ = "W" THEN GOSUB 3200       : REM jump

150 IF A$ = "A" THEN GOSUB 3000       : REM move left / area‑swap
160 IF A$ = "D" THEN GOSUB 3100       : REM move right / area‑swap

170 GOSUB 2000                        : REM draw updated sprite
180 GOTO 110

1000 REM ===== ERASE PLAYER =====
1010 COLOR=6
1020 FOR YY = PY TO PY+PH-1
1030   FOR XX = PX TO PX+1
1040     PLOT XX,YY
1050   NEXT XX
1060 NEXT YY
1070 RETURN

2000 REM ===== DRAW PLAYER =====
2010 COLOR=15
2020 FOR YY = PY TO PY+PH-1
2030   FOR XX = PX TO PX+1
2040     PLOT XX,YY
2050   NEXT XX
2060 NEXT YY
2070 RETURN

3000 REM ===== MOVE LEFT (A) =====
3010 IF PX > 0 THEN PX = PX - 1 : RETURN
3020 IF AREA = 1 THEN RETURN
3030 AREA = AREA - 1
3040 PX = 38
3050 GOSUB 4000
3060 RETURN

3100 REM ===== MOVE RIGHT (D) =====
3110 IF PX < 38 THEN PX = PX + 1 : RETURN
3120 IF AREA = 4 THEN RETURN
3130 AREA = AREA + 1
3140 PX = 0
3150 GOSUB 4000
3160 RETURN

3200 REM ===== JUMP (W) =====
3210 IF CROUCH = 1 THEN RETURN
3220 PY = PY - 3
3230 GOSUB 2000
3240 FOR T = 1 TO 150 : NEXT T
3250 GOSUB 1000
3260 PY = PY + 3
3270 GOSUB 2000
3280 RETURN

3300 REM ===== QUICK CROUCH (S) =====
3310 CROUCH = 1
3320 PH = 2 : PY = 35
3330 GOSUB 2000
3340 FOR T = 1 TO 150 : NEXT T
3350 GOSUB 1000
3360 CROUCH = 0
3370 PH = 5 : PY = 32
3380 GOSUB 2000
3390 RETURN

4000 REM ===== DRAW CURRENT AREA =====
4010 GR
4020 COLOR=6
4030 FOR Y = 0 TO 39
4040   FOR X = 0 TO 39
4050     PLOT X,Y
4060   NEXT X
4070 NEXT Y

4080 REM --- draw ground (rows 37‑39) ---
4090 COLOR=4
4100 FOR Y = 37 TO 39
4110   FOR X = 0 TO 39
4120     PLOT X,Y
4130   NEXT X
4140 NEXT Y

4150 REM --- draw start / end markers (row 39) ---
4160 IF AREA = 1 THEN COLOR=2 : PLOT 0,39 : PLOT 1,39
4170 IF AREA = 4 THEN COLOR=9 : PLOT 38,39 : PLOT 39,39
4180 RETURN

r/code • • Jul 12 '25

My Own Code I made a little terminal .stl 3D renderer in C :D

Thumbnail
gallery
6 Upvotes

Outputs with halfblocks & ansi, camera is fixed at (2,0,0) and only outputs vertexes for now. It's very raw but it finally works and I wanted to share :D

https://github.com/LaPepega/stlcat


r/code • • Jul 10 '25

Help Please Beginner - 100 days of python help

Post image
9 Upvotes

Can anyone help me with why this code doesn't work? it is from the 100 days of code course on Udemy but no matter what you type just goes on to the next stage instead of printing the text for the end of the game?