Questions tagged [beginner]

Add this tag to your question to indicate that you are new to the language of your code. This will often be taken into consideration by reviewers when assessing your code.

Filter by
Sorted by
Tagged with
2 votes
2 answers
39 views

Beginner Rock-Paper-Scissors game

as a beginner this is my second game in C++, it is a very simple rock-paper-scissors game. User or computer wins the game after a given number of rock,paper or scissors matches. I'd appreciate any ...
Gizem's user avatar
  • 83
2 votes
0 answers
52 views

Print all printable ASCII characters

Code: ...
Harith's user avatar
  • 2,929
0 votes
0 answers
42 views

Function to update a cell for game of life [closed]

I am learning to program using Rust. Currently I'm trying to implement 'Game of Life'. I wonder how to write this function so that it is more like a 'typical Rust function' (i.e. not such a C-style). ...
Xander's user avatar
  • 9
3 votes
1 answer
103 views

Python - beginner - GUI

I have been learning python for 1.5 month now I am learning in my free time between job and other life commitments so my progress may be slow. It may take time for me to reply but I am interested in ...
sean's user avatar
  • 41
3 votes
0 answers
96 views

Tic-tac-toe with JS

I am a beginner and was hoping for some honest feedback on my js code. I struggled quite a bit on this, I did ask gpt to explain some concepts which I find it’s good for but wrote it all myself. <...
FeDev's user avatar
  • 41
3 votes
2 answers
91 views

Learn.cpp chapter 8 exercise add error handling to the high low game

I did the exercise of LearnCpp.com's Chapter 8 summary and quiz and I'm still learning… Question #3 Implement a game of hi-lo. First, your program should pick a random integer between 1 and 100. The ...
Maria David's user avatar
2 votes
3 answers
640 views

Find median value of two Sorted Arrays

To improve my coding knowledge can you please give me suggested changes on my code? ...
Subha Rajagopal's user avatar
0 votes
0 answers
60 views

Why is my scraping code so slow?

I'm a beginner with scraping with Selenium. And I wrote a couple of scrips. And when the script is used for a website with 10-15 pages, it works as it should. However, when I use it on a larger ...
hemoglobin's user avatar
10 votes
3 answers
2k views

SHA-256 Implementation

I've been working on a byte-oriented SHA-256 implementation for educational purposes. I then tested it using the NIST CAVP tests found here. All tests pass but I would appreciate some feedback from a ...
dRevan25's user avatar
  • 103
3 votes
1 answer
86 views

Simple blackjack program in Java

I wrote this blackjack game for my APCSA class (already submitted) and was wondering if anyone had feedback on what parts of it are improperly written. My main concern is the fact that I am printing ...
nohgo's user avatar
  • 31
3 votes
2 answers
38 views

Start script for several Spring Boot services

I have several Spring Boot and Angular applications/microservices that form together a whole application. As it is tedious to start them via the terminal, I've written the following script to perform ...
jmizv's user avatar
  • 135
1 vote
2 answers
173 views

Best Practices For A Console Menu App

I am quite fresh to c# and creating programs. I wrote a very basic program which allows you to go through menu selections via up and down arrowkeys and select your selection along with sending you to ...
FloorSign's user avatar
0 votes
1 answer
53 views

DB Layer of a project management CLI

I am (re)writing a project management CLI and want to put it on a solid foundation concerning the database connections and testing. My focus was to build a DB class which is easy to test and could be ...
Koala's user avatar
  • 103
1 vote
1 answer
105 views

Simple text file encryption and decryption

Short introduction; recently I've completed a basic course on C but other than that I have no programming experience and I am a total beginner. As a practice project and to practice reading from and ...
Reslashd's user avatar
3 votes
1 answer
109 views

Simple Tic-tac-toe in Python

I am a beginner programmer who coded a simple Tic-tac-toe in Python for practice. Any feedback, especially regarding best practices and tidying up the code, is appreciated. ...
smwt's user avatar
  • 123
4 votes
3 answers
570 views

char* to integer implementation (atoi with saturation to INT_MIN or INT_MAX on overflow)

I am learning C. As a task, I need to write a get_int function that will convert a char* to ...
aliheym's user avatar
  • 51
2 votes
0 answers
41 views

Assign unique identifiers to binary matrices using a binary tree

Context I want to build a transposition table where the game states are binary square matrices which size MATRIX_SIZE is known at compile time. Rather than storing ...
Tristan Nemoz's user avatar
3 votes
0 answers
99 views

Mandelbrot Set image generator in Rust

I'm learning Rust, and as-is tradition, I'm starting out with a Mandelbrot Set explorer as my first project (although, it just produces images so far). When run, it just creates and writes an image to ...
Carcigenicate's user avatar
3 votes
1 answer
62 views

Hashing a fixed size binary stream with a tree structure in Rust

For a research project, I want to assign a unique identifier to a stream of bits. I can assume that all the streams will always have the same size. Because of this nice property, my idea has been to ...
Tristan Nemoz's user avatar
1 vote
1 answer
54 views

Extending die roll simulations for complex data science tasks

I've developed a Python script that simulates die rolls and analyses the results. I'm now looking to extend and modify this code for more complex data science tasks and simulations. Is this code ...
Attila Vajda's user avatar
2 votes
1 answer
96 views

Codeforces: Dasha & Nightmares

so I got started with competitive programming about a day ago and I got stuck on the first random question I tried on codeforces. It's called Dasha and Nightmares. Problem Description: The problem ...
st0n3r's user avatar
  • 73
2 votes
1 answer
282 views

Printing the elements of a forward linked list

I'm a sophomore in computer science who's working on a linked list class for his DSA class. I believe this code can be improved, but I'm not sure how because everything got really messy really fast. ...
o_22's user avatar
  • 23
0 votes
0 answers
188 views

Value at Risk forecast generator

I am developing a code to compute Value at Risk (VaR) using various models (see below). Currently, I am looking to implement a rolling window approach over a dataset spanning 4,000 days, with each ...
Oscar's user avatar
  • 1
1 vote
1 answer
186 views

Python3 currency abstract class (without the permission to be instantiated directly)

I'm a newbie python developer who accidentally studied the concept of Abstract classes and I found it pretty much helpful to implement due to the SOLID principles. At the very moment of testing and ...
KhodeNima's user avatar
  • 317
4 votes
2 answers
2k views

Linked list and array list performance comparison in C

After watching Stroustrup's presentation on performance comparison between vectors and linked lists (https://youtu.be/YQs6IC-vgmo?si=9r5wXqnwkmN29xqn), I've decided it would be a good problem to get a ...
low-altitude's user avatar
3 votes
1 answer
61 views

"2048" game in JavaFX

I wrote my first code in Java and I need constructive criticism and code review. This is an implementation of the well-known "2048" sliding-blocks game. ...
hathor's user avatar
  • 31
9 votes
4 answers
3k views

Recreating Minesweeper

First, I have to say that this game lacks 5 features that I don't care: Flags Chording Timer Actual mouse movement Good graphics When starting the program, the player is meeted with a "Choose ...
Le_Square's user avatar
6 votes
1 answer
199 views

Exponentiation in Scratch

This was back when I was new to coding on Scratch (as in the case of coding projects entirely from scratch) around 7-8 months ago with my Cookie Clicker in Scratch project that I made pretty much ...
CrSb0001's user avatar
  • 183
0 votes
0 answers
47 views

Trying to learn C++20 composable code with CRTP mixins as implementations of interfaces that are checked with concepts

I am trying to teach myself some composability using CRTP and concepts. I came up with this simple example and wondered, what I could/should do better there or, if it is a reasonable starting point? ...
Chris's user avatar
  • 1
1 vote
0 answers
107 views

Simple Table With Collaborative Editing

The following is my React code to create a simple app containing a table which can be edited by multiple people at the same time. Each client connects to a WebSocket via a custom hook. The WebSocket ...
muell's user avatar
  • 11
2 votes
0 answers
30 views

Efficient code to move a node under another while keeping all HierarchyId's as integers and sequential

I'm playing around with an app that will need to read Hierarchy trees quickly but will seldom modify them once created. I've chosen to use HierarchyIds with Entity Framework to model the hierarchy. I ...
Luke's user avatar
  • 21
4 votes
2 answers
243 views

Time Format Conversion Utility

The code defines a Python script for converting time between 12-hour and 24-hour formats. Review Goals: Is the code idiomatic? (Am I using any outdated practices or functions?) Is there a simpler way ...
Harith's user avatar
  • 2,929
8 votes
8 answers
3k views

Can I lessen the use of boolean flag variables in this snippet?

Below snippet is part of a game application's logic and the Update function is called every frame (about 60 times a second). ...
Mukul Kumar's user avatar
2 votes
1 answer
263 views

A very basic calculator in C#

I'm trying to learn C#, I made this calculator with my current knowledge. It works as I intended, but I'd appreciate some input on my code. ...
Adalwolf's user avatar
2 votes
1 answer
96 views

Project Euler Problem 1: Multiples of 3 or 5

The following is my solution to Project Euler Problem 1: Multiples of 3 or 5. ...
hexpev's user avatar
  • 23
9 votes
2 answers
144 views

Hangman game in C

I am a beginner who wrote this simple Hangman game in C for fun and to practice programming. I am looking for advice on optimizing this code and making it adhere to best practices. Are there too many ...
smwt's user avatar
  • 123
2 votes
1 answer
68 views

Reorganice (and style) form's output in HTML using JQuery: how to do it better?

To clarify: The code in "What I achieved" is working. I'm looking for suggestions so I can improve. I'm quite new with JQuery (and javascript) and I've been learning while styling a forum. ...
Lucas's user avatar
  • 21
4 votes
1 answer
149 views

Cellular Automata Python Class

I've been working on creating a simple Class for a Cellular Automata. It generates a grid of NxM dimensions populated by Cell objects - Pretty straightforward class to save the state of the cell-. It ...
Athansya's user avatar
3 votes
1 answer
53 views

Finance Manager with Embedded Database

I made an CRUD application in Java with JavaFX, H2 Embedded Database and Maven. Can you review my code quickly? Is it well written? What should I improve on it? I don't know if my code is written ...
Damian's user avatar
  • 31
2 votes
0 answers
69 views

Javascript basic search engine recipes

I have made a search engine for recipes. Requirements for this JS Project are as follow: Create a function called searchRecipes that takes all recipes and an ...
Yass's user avatar
  • 21
2 votes
1 answer
62 views

K&R excercise 1-21 Write a program entab that replaces strings of blanks by the minimum number of tabs and blanks to achieve the same spacing

Exercise 1-21. Write a program entab that replaces strings of blanks by the minimum number of tabs and blanks to achieve the same spacing. Use the same tab stops as for detab. When either a tab or a ...
Hansoko's user avatar
  • 143
6 votes
2 answers
1k views

Another pig latinize rust implementation

Yes, I know this exercise has been posted before, but I'm posting it again because I want feedback on why certain parts of my code aren't idiomatic. I'm new to rust, and my code works, but as I said, ...
lukstru's user avatar
  • 958
2 votes
1 answer
116 views

SystemVerilog implementation of an N-bit prefix adder logic design

I want some feedback about my code (anything is welcome). It is working, but it feels like a clumsy implementation. Because I am self-learning from a book without an answers section, it becomes ...
Miguel Ortega's user avatar
3 votes
1 answer
84 views

Simulate M random walkers N times and visualize relationship between walker number and grid size

Problem statement: Suppose that n random walkers, starting in the center of an n-by-n grid, move one step at a time, choosing to go left, right, up, or down with equal probability at each step. Write ...
x27ca61a's user avatar
  • 307
4 votes
2 answers
617 views

Rust Elo rating

I have just started learning Rust and wanted some feedback on a simple program for calculating Elo ratings. All of the following code was in a single file, but I imagine that this is the part that ...
Blaire's user avatar
  • 43
4 votes
1 answer
111 views

Packet generation and consumption

I have the following simplification of a program which consists of 2 threads. One thread pushes packets to the back of a deque while another waits for user input before performing a "heavy" ...
Bula's user avatar
  • 379
2 votes
1 answer
96 views

Count the Streaks in a coin flip and display the number of Head vs Tail Streaks

Like title says programs shows you the number of streaks and how many of each. Is there anyway to break this down. Feels like it's too many variables. ...
Big_Port's user avatar
1 vote
2 answers
344 views

Multi-Client Socket Communication with Thread Pool in C++

I've been working on implementing a multi-client socket communication system with a thread pool in C++. The system comprises three main components: logger.h, socket.h, and thread.h, which handle ...
user avatar
1 vote
1 answer
149 views

C++ arbitrary base convertor

This is my second C++ program. Again, I wrote it all by myself. I only started learning C++ yesterday. The concept of the program is simple; it should read input from ...
Ξένη Γήινος's user avatar
2 votes
1 answer
89 views

It acts as a booking system allowing user to create an account, create bookings and cancel bookings

As the title says, it manages to create accounts, create bookings and cancel them. I am relatively new to coding, so i was wondering how did i do? What are some improvements that i could do? Any ...
Benxsu's user avatar
  • 21

1
2 3 4 5
150