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
-3 votes
0 answers
31 views

Printing more than one string variable with print in python [closed]

I am new to python and I having a hard time with a simple print of two strings. I am following some examples and I don't understand why it is giving me an error ...
some_math_guy's user avatar
1 vote
1 answer
51 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
1 vote
0 answers
56 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
  • 103
4 votes
3 answers
546 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
29 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
86 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
54 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
52 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 ...
atlvd's user avatar
  • 101
2 votes
1 answer
90 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
274 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
180 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
180 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
  • 167
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
2 votes
1 answer
51 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
  • 21
9 votes
3 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
134 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
43 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
103 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
29 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
238 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,302
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
203 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
88 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
115 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
  • 103
2 votes
1 answer
63 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
131 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
2 votes
1 answer
50 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
  • 21
2 votes
0 answers
66 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
60 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
100 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
609 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
108 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
85 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
240 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
121 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
66 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
8 votes
3 answers
2k views

Sieve of Eratosthenes in C++ with wheel factorization

I have written a completely working C++ program for the first time, and I have managed to compile it. I have decided to learn C++ and I have written a C++ program to familiarize myself with C++, this ...
Ξένη Γήινος's user avatar
3 votes
2 answers
89 views

Functions to simplify printing strings and numbers in amd64 Assembly

I'm new to Assembly, and this is my very first "project" in Assembly. I wanted to store data (numbers) on the stack, then access and display them. Eventually, this "experiment" of ...
ghost's user avatar
  • 31
8 votes
2 answers
1k views

Number guessing game for x86

I'm new to assembly and I've just finished this guessing game that I wanted to make to improve my skills in this language. It runs in a Unix environment and does the following: generates a random ...
Abel Gérard's user avatar
3 votes
1 answer
57 views

JavaScript front-end 'Library App' implementation from the Odin project

I am currently working through the Javascript portion of the Odin Project curriculum and have completed the library app project. As far as I can see everything is working as expected and I have ...
Daria's user avatar
  • 33
0 votes
0 answers
48 views

Forecast the turnover with a prophet model in R

I am a student who is interested in data analytics and currently figuring out how to write forecast models for several scenarios in R. I'm working on a fictitious project in which I want to forecast ...
LearnHoney's user avatar
3 votes
0 answers
170 views

A vehicle database in Excel

I'm looking for some help. I'm new to coding and have started creating this Vehicle database program in Excel for a friend to use. He is wanting to be able to see all vehicles he owns, when ...
Kendall Briggs's user avatar
0 votes
1 answer
35 views

Re-write of PDF invoices from user input, decoupling of Invoice from FPDF class

Following on from this post and taking on board some of the suggestions, what follows is a re-write of the original python code. It's also just a rewrite of some of the functionality, this code only ...
Lozminda's user avatar
1 vote
2 answers
92 views

This is a product manager that add products, sorts, lists and makes the list searchable

I have finished with my product but I am not that trained in refactoring, cleaning up my code and spot redundancy so I would really appreciate some help. ...
Dennis Mariegaard Jensen's user avatar
1 vote
1 answer
73 views

CS50 Week 2: Converting vowels to numbers and outputting new string

Problem: User inputs a word or phrase as command-line argument and a new word is printed with some vowels replaced by numbers. Question: How do I improve my code design and style? Is it possible to ...
LearningALidl's user avatar
1 vote
1 answer
96 views

Print Hadamard matrix of order N

Problem statement: The \$n\$-by-\$n\$ Hadamard matrix \$H(n)\$ is a boolean matrix with the remarkable property that any two rows differ in exactly \$\frac{\text{n}}{\text{2}}\$ bits. \$H(1)\$ is a \$...
x27ca61a's user avatar
  • 307
5 votes
4 answers
224 views

Pairs of elements whose sum is even

In an array of integers find all the pairs of elements whose sum is even and form a new array consisting of these sums. Could you tell me whether my code is ok or not? ...
Kifsif's user avatar
  • 163
2 votes
1 answer
122 views

Simulate number of children until parents have at least one of either sex

Problem statement: A couple beginning a family decides to keep having children until they have at least one of either sex. Estimate the average number of children they will have via simulation. Also ...
x27ca61a's user avatar
  • 307

1
2 3 4 5
150