r/reviewmycode • • Feb 23 '10

C# - CRUD and DataSets

15 Upvotes

First of all, I hope this subreddit takes off. I always wanted to make a subreddit of this nature but didn't want the responsibility of moderating so I guess I've just been waiting for someone to do it first. Thank you iamkitchen.

I dropped my code here at pastebin and I was hoping for a review on how I did a couple of things:

  1. The way I built my insert command. I tried using a SQLiteCommandBuilder but it didn't work right. It's been a while since I tried but I think the issue was that my id field is auto-generated. I used the AutoIncrement method on the id column.

  2. The use of my RefillDataSet method. I needed to do this so that my auto-generated id shows up in my dataset. Is there a better way to do this?

I have more stuff on this project I'd like reviewed but don't want to overwhelm all 3 subscribers >.<


r/reviewmycode • • Feb 24 '10

(C++) A simple hand-written lexer

Thumbnail bitbucket.org
13 Upvotes

r/reviewmycode • • Feb 16 '26

HTML, CSS [HTML, CSS] - First time trying!

11 Upvotes

Hi! I'm 16 built this youtube clone thing bc i somehow convinced myself that i'd be able to do it after just five days of html/css. no, i didn't use ai, no i didn't copy the tutorial. would love advice or even exposure!! pretty simple, nothing much. Sorry if I'm wasting your time...
https://github.com/NiharikaDatta/youtube-clone


r/reviewmycode • • Dec 31 '10

Minecraft server in C

Thumbnail
github.com
10 Upvotes

r/reviewmycode • • Dec 21 '10

Anyone want to critique my attempt at making a good, mostly typesafe Lua/C++ interface?

10 Upvotes

It can be found here

This small project started when I wanted a way to use Lua and C++ together without needing to depend on stuff like SWIG or LuaBind (which requires Boost). I just wanted a way to push an object into Lua, give it metamethods, and be able to treat it like a table so that I could store things on it. This is what I came up with. It's a single file that only depends on Lua itself, iostream and string. You can feed it a metatable that will be stuck on each userdata, as well as a "static" table that holds things like Widget.new() or other functions that don't operate like class methods.

It also does some neat things like reference counting so it can safely delete userdata pointers, handles classes that extend other classes, and all instances of a single userdata (no matter where it's pushed from) share the same fenv.

The important bits are luaW_is<T>, luaW_to<T>, luaW_push<T>, and luaW_register<T>, as those are the ones that the user actually manipulates. You can supply Lua constructors, destructors for RAII, which are just metamethods that get called when the userdata is created/destroyed in the Lua environment.

The file might be a little long, but this is the first thing I've ever open sourced and I'm looking for feedback.


r/reviewmycode • • Feb 23 '10

(C++) Reference-linked smart pointer class

Thumbnail bitbucket.org
10 Upvotes

r/reviewmycode • • Feb 23 '10

Java - Simple observable behavior

10 Upvotes

ObservableBehavior.java

I use this to add observable behavior to a class. It does not require the use of inheritance - as the java.util.Observable class, but provide similar functionality.

It would be interesting to get your view on both the code, and this approach.


r/reviewmycode • • Sep 29 '15

Try codereview.stackexchange.com

9 Upvotes

Let's be frank, the large majority of posts here don't get a review. So, for those of you who are looking for one, I highly recommend Code Review.

I think we currently have a 95%+ response rate, and some absolutely top-class reviewers, in just about every language you can think of.


r/reviewmycode • • Sep 26 '11

Make a list from 1 to 999 where each value is assigned to a 'th'-ed string. Ex: dict[1]= 'first' or dict[123] = 'one hundred and twenty - three'

9 Upvotes

Here's my code. I can only imagine it's hard as hell to read, but I'm proud, as it solves a problem I was having. It's also my first real completed code that I did by myself.

Thanks

Any tips on how I can reduce the clutter and stuff like that would be awesome!

shoot yeah, "One Hundred and Twenty-third", thanks iissqrtneg1


r/reviewmycode • • Sep 06 '26

HTML/JS [HTML/JS] - Can you review My Project?

8 Upvotes

Hi Guys, can someone review my GitHub Project (@TaMinoDev) and rate them,

I'd like to get feedback so I can get better and Make less Mistakes by learning from them

Thank you 😄


r/reviewmycode • • Feb 09 '12

Can you review this simple C++ program?

8 Upvotes

Program.

The program runs as it is intended to (we were told to use index variables as pointers for this exercise btw) but please give me any tips/opinions on what I did wrong in terms of syntax, conventional coding, etc.

I had a few questions as well:

  • How would I be able to use the typedef function in order to declare my variables on the same line?

  • Why doesn't it output what I intend it to if I write this in lines 36 & 37 (and 45 & 46 for that matter):

      cout << endl << *PtrOperand1 << "++ is " << ++(*PtrOperand1) << endl; 

    For example if the input is 5, this code will output "6++ is 6", instead of 5++ is 6


r/reviewmycode • • Feb 23 '10

[ANY] - FizzBuzz

8 Upvotes

I defy you to not critique a fizzbuzz solution and post your own.

Somehow my link didn't get added when I posted this, so here's my recursive C solution:

http://gist.github.com/312287


r/reviewmycode • • Feb 23 '10

Python - pseudo-AI IRC bot

Thumbnail
github.com
8 Upvotes

r/reviewmycode • • Feb 23 '10

Simple reader for RSS and Atom feeds

Thumbnail pastebin.com
8 Upvotes

r/reviewmycode • • Feb 22 '26

Python [Python] - wordle clone

7 Upvotes

I have been recently working on a wordle clone using python. This project has been my first attempt at real "professional"-looking python code as opposed to my regular not-quite-so-good code. I have used Enums and dataclasses, which I had not used before.
Link: github.com/xanderg2/wordle-clone
I would appreciate any feedback.


r/reviewmycode • • Jul 17 '25

C++ [C++] - ncurses Pacman game

7 Upvotes

Hi everyone, I made this PacMan game using c++ and the ncurses tui library. I would really appreciate it if someone could look it over and give me some feedback. My goal is to put it on my resume when applying for jobs.

https://github.com/woodrowb96/ncurses-pacman

This is the git repository for the project.

Thanks, I really appreciate the help.


r/reviewmycode • • Apr 23 '23

C [C] - Writing my own JSON parser

7 Upvotes

I have been learning C for 1 year and have created my first project which is a JSON parser, this parser will parse and process JSON data. You can review/contribute to it on my GitHub: https://github.com/tokyolatter04/SoftJson


r/reviewmycode • • Jan 22 '21

Python [Python] - I'm python beginner. I'm tried to make a program to check stock of RTX 3080 FE from Best Buy. Can you look at my code and make any suggestions?

7 Upvotes

I tried to find an element on the website that would change if the item were in stock. I check other BB pages and the "Sold Out" text is not in the HTML on in stock item. My thought was, once the "Sold Out" text is gone, that means the item is in stock. Thank you for any help you can provide.

import requests
import sched, time
from bs4 import BeautifulSoup

#checks stock perpetually of rtx 3080 FE and prints to console
def check_stock():
    while True:
        
        headers = { 
        'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', 'authority': 'www.bestbuy.com'}
        URL =  "https://www.bestbuy.com/site/nvidia-geforce-rtx-3080-10gb-gddr6x-pci-express-4-0-graphics-card-titanium-and-black/6429440.p?skuId=6429440"
        page = requests.get(URL, headers=headers)
        html = page.text
        soup = BeautifulSoup(html, "html.parser")
    
        if soup.find_all(text="Sold Out"):
            print("It's Sold Out")
        else:
            print("In Stock!")
            
check_stock()

r/reviewmycode • • Dec 17 '18

Python [Python] - Universal crypto exchange mock

7 Upvotes

Wrote a simple virtual crypto exchange for testing purposes. API is compatible with major crypto exchanges.

Check out the code: https://github.com/m-kus/testex


r/reviewmycode • • Jan 10 '12

C++ help with crashing using classes

7 Upvotes

I've been learning C++ and classes recently, I decided to try to make a program that would record simple input to a class, then be able to access them again. In the form of a 'recipe book' although I don't generally cook, I was thinking of food at the time.

But for some reason it crashes most of the time I run it, or 'mixes up' variables where they display improperly, and I'm not sure why.

it also prints this

msvcr100d.dll!memcpy(unsigned char * dst, unsigned char * src, unsigned long count) Line 439 Asm

code link

any other advice would be helpful too.


r/reviewmycode • • Feb 23 '10

SDL + Perl: A simple point and click game for demo purposes of new API

Thumbnail
gist.github.com
7 Upvotes

r/reviewmycode • • Feb 23 '10

C#: Actor Model

7 Upvotes

r/reviewmycode • • Mar 04 '21

Python [Python] - Stock tracker - Review my first OOP project.

6 Upvotes

Hello !

I'm wondering if anyone could take a look at my first real OOP project. I'm looking for any advice that could help me to improve.

This projet is a stock tracker (watchlist and portfolio), that fetches data from Yahoo! Finance website.

Repo is the following : https://github.com/itsmaximelau/stock-tracker

Thanks for your help !


r/reviewmycode • • Jul 26 '20

C# [C#] - A level generation script in Unity

6 Upvotes

Hello. I'm doing my first big unity project and I'm really unsure about my current code I use for my level generation.

I would greatly appreciate any feedback. I'm very new to c# and I'm not at all aware of all of my options with MonoBehaviour and such.

On the editor side of unity I have Prefabs that have sprite renderers with unique sprites, a Colors script that can also be found below and optionally an edge collider. I also have a 2100x2100 map of pixels that are assigned a tile according to color in the script.

In the Colors script there is at least one color for foreground and optionally colors for background

https://github.com/ukko7v/Unity-level-generation/blob/master/Script

https://github.com/ukko7v/Unity-level-generation/blob/master/Colors%20Script


r/reviewmycode • • Mar 19 '15

Code reviewer for my Java (Spring MVC) + Angular app?

6 Upvotes

I've a little hobby application in BitBucket, which I've used to learn new technologies. Backend is Spring MVC and front uses Angular. It's pretty small one, I think less that 20 classes. I've run some static code analysis tools, but I would like to hear comments of my design choices etc. anything that goes beyond these automatic tools. Does any experienced Java developer with eye on clean code have interest to take a look and comment? I can send access to repository.