Skip to main content
8 votes

a not-so optimized, not-so simple brainfuck source-to-source compiler to assembly (fasm) written in python that automatically compile using fasm

I tested the interpreter on different programs and it seemed to work correctly. So good job on that. But it was terribly slow for "Towers of Hanoi by Clifford Wolf", I waited a minute or two ...
Harith's user avatar
  • 8,844
7 votes

Battleship vs. computer with Python

Use more vertical whitespace: It seems as if the code was manually formatted. Consider using black or ruff to format the code ...
Harith's user avatar
  • 8,844
5 votes

Simple Bank Management System

Do not use using namespace std: I have to emulate namespaces in C by prefixing each function name with libname_, which looks ...
Harith's user avatar
  • 8,844
3 votes

Python - Text-based game about an escape room

The answer provided by @toolic is already very good. I would add two comments. Cyclomatic code complexity In your main while loop you have a lot of nested ...
Attack68's user avatar
  • 351
2 votes

Python - Text-based game about an escape room

File name This line implies that you named a file classes.py: from classes import * The file name is too generic. Give it a ...
toolic's user avatar
  • 3,626
2 votes

Javascript Syntax-Highlighter for Java

Have a look at HighlightJS, which Stack Exchange sites like this one use. For self-hosted scripts download the needed language (Java) and put them into the languages sub-directory (as in downloaded ...
Grigory Kislin's user avatar
2 votes
Accepted

Sensored BLDC Commutation Controller code

Overview It is good that you did the following: Chose a meaningful name for the module Used ANSI-style module ports instead of the older style Declared one port per line for better readability Added ...
toolic's user avatar
  • 3,626
2 votes

A game where the player guesses the computer's number

Style typing_speed is a constant (that is, a variable that is set and you never plan to change the value of while running the code), so most style guides recommend ...
Arcanist Lupus's user avatar
1 vote
Accepted

A game where the player guesses the computer's number

Possible bug When I run the code, and it executes this line: slow_print('You\'ll have ', str(guesses - 1), ' guesses to get it.') the code exits with an error. My ...
toolic's user avatar
  • 3,626

Only top scored, non community-wiki answers of a minimum length are eligible