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
2answers
138 views

Beginner learner: Python 3.9.6 tic-tac-toe code and questions about optimization

I am just beginning to learn Python, and thought I would give myself a challenge using the lessons I have learned so far. I am following the Udemy course, Automate the Boring Stuff with Python. The ...
2
votes
1answer
42 views

A renderer; JavaScript game beginnings

I recently started making a game in JavaScript, but I've only really built the renderer. This is the first 'real' game I started working on and I don't know if I'm doing any major things wrong and if ...
15
votes
3answers
2k views

OOP Hangman Game

My daughter and I are trying to teach ourselves Python and OOP. We wrote a hangman game, and we'd really appreciate some feedback. Are we heading in the right direction? How could we improve it? ...
4
votes
2answers
67 views

Mode and standard deviation for Math Library

Taking forward the code written for the math library previously mentioned here. link. Wrote templatized functions for mode and standard deviations. (Some of the changes to the previous reviews were ...
2
votes
2answers
111 views

Program that encrypts and decrypts messages and texts

Overview This is a program that encrypts and decrypts messages and texts using two simple algorithms. Please note, the algorithms used in this project are not suitable for production use. I used them ...
3
votes
0answers
20 views

Othello game in Tk

I've recently reached a milestone for my Othello clone. This is my first python project and the farthest I've come to a full program beyond small scripts and little automations. I'd love for those ...
3
votes
1answer
260 views

Reducing the amount of duplicated code (python) - cricket matches [closed]

I'm a beginner and self taught and just want to see if there are neater ways of doing what I am doing, or whether there are bits of code that are poorly written. I think Lines 100-204 are the most ...
0
votes
2answers
62 views

Portfolio Website Responsive Design

I'm a new developer just starting out learning HTML5, CSS3 and JavaScript. Below is my attempt at building a portfolio website. I am finding it difficult getting my site to respond better when ...
2
votes
0answers
43 views

Giffler Thompson Algorithm for decoding individuals of a Genetic Algorithm

First of all: Hi, my name is Henrik and I am a mechanical engineer, who loves to code in his free time. To get better in programming I wrote a genetic algorithm compined with a list planning algorithm ...
6
votes
5answers
628 views

Mean and Variance for Math Library

Taking forward the code written for the math library I'm developing. I wrote templatized functions for mean and variance. std::accumulate() (or summation in ...
2
votes
1answer
31 views

developer portfolio website

I'm a new developer just starting out learning HTML, css and JavaScript. Below is my attempt at building a portfolio website. I am finding it difficult positioning elements the way I want to and ...
3
votes
1answer
159 views

Permutation function for a math library in C++

Continuing the code for combinatorics library, adding the definition of ⁿPᵣ. This is an extract from a larger codebase. Is there any way to limit the code of gcd()...
4
votes
1answer
172 views

Tkinter Sticky Notes

Currently I am creating an app in Tkinter that creates, displays, and saves sticky notes. I am new to python so I keep trying to rewrite my classes so I have my code more organized but every time I ...
3
votes
2answers
164 views

Combination function for a math library in C++

Taking forward the combinatorial library link, I have tried to implement the nCr function. Please mention if this is prone to failing somewhere Any other test code that needs to be added. Any more ...
10
votes
2answers
2k views

Factorial function for a math library in C++

I am trying to code up a basic combinatorial math library for C++. Started with the implementation of the factorial function. Here I include the code and the test code. Please review. Is the way of ...
0
votes
1answer
50 views

Cardinal to ordinal numbers in F# code reuse

I've been experimenting with the F# Bolero environment to learn F# a bit and I was trying to get the hang of pattern matching by generating ordinal numbers (1st, 2nd, 3rd, ...) from cardinal numbers (...
2
votes
1answer
47 views

Generate Multiple Instances of Canvas-based UI Object

Background I'm interested in implementing a small script to display multiple independent instances of a Canvas-based control on one page. The ultimate intention is to add many similar controls to the ...
4
votes
1answer
52 views

Preprocessing invalid xml before feeding it to a parser

As part of a larger project I'm writing to learn C++, I'm trying to read through some almost-XML files generated by another program. Unfortunately this program uses its own custom escaping logic, so ...
3
votes
1answer
150 views

Data API with Influx-DB and FastAPI

I'm fairly new to time series databases in general and Influx in particular. My objective is to build a simple and general-use API that will allow me to write and read data from an Influx Database. I ...
0
votes
1answer
750 views

Python case insensitive dictionary [closed]

This is a Python case insensitive dictionary that is ordered and has integer indexes for the keys and values. I just wrote it today. It is ordered because I am using Python 3.9.6 and plain ...
1
vote
0answers
88 views

Python case insensitive three level nested dictionary

This is a custom case insensitive nested dictionary class created by me, its main usage is to populate QTreeWidget and keep track of said QTreeWidget, the main incentive behind this class is to ...
1
vote
2answers
58 views

Extracting items from comma/semicolon-delimited strings, discarding parts after a hyphen

New Scala dev here. Is there a more idiomatic or efficient way to accomplish this in Scala? Given a list of the following strings, I need to obtain the unique 'main parts' once any parts including ...
3
votes
2answers
144 views

Single user Electron application allowing basic CRUD operation on a table (stored in JSON)

I am completely new to JavaScript and I will be grateful for your comments on my Electron app (electron is a JS framework allowing to create of desktop apps). I needed to create an application that ...
4
votes
2answers
59 views

Simple enemy movement simulation on Tkinter

Kind of a noob at Python here, and this is one of my first "big"(big for a beginner like me) project that I undertook with Tkinter and Pynput. Basically, this code will simulate an enemy's ...
1
vote
1answer
67 views

StringModifier - Reverses a string and returns information about it

I have been coding in Java for about a month now and I'm seeking advice for my program on things I can improve. This project was mainly made for me to incorporate all the new things I learned and ...
1
vote
3answers
103 views

Generating a number of students and assigning them

...
2
votes
1answer
190 views

Yahoo finance option chain scraper

This is my 1st Python program I've actually written and I have little to no background in the language. I just figured I could learn and do something that interested me at the same time. I'm not a ...
3
votes
1answer
84 views

Converting python code to async calls

I'm going to start out by saying this is the 1st python program I have ever written and have no real background in the language so my code is probably pretty rough. Take it easy on me! When I wrote ...
2
votes
1answer
111 views

Daily Fantasy (DFS) Lineup Generator in Excel VBA

I have a macro I have been using to generate daily fantasy (dfs) lineups for soccer matches. I would like to know where I can speed up my code so I can run more simulations. Briefly, I have a ...
5
votes
1answer
169 views

Python text game. combat system with enemies in the same position

I recently started programming and ran into a problem in the battle algorithm. This piece of code checks if there is someone in the position of the main character. If there is, then the battle begins (...
0
votes
1answer
74 views

script to recover browser passwords

basically i am new to python lookin for any bad practices done down there in my script, any ways to shrink the code and increase efficiency ...
3
votes
1answer
98 views

Compiling and running a program to generate fractal images

I'm making images. My steps are: create PGM files using a C program convert/resize PGM to PNG using Image Magic remove (big) PGM files To do it I use Make and a Bash script. The Makefile is very ...
3
votes
2answers
145 views

Hangman game with only one word

This is a hangman game. The only word is 'word' and I am not planning on changing this since I am not going to publish this game or anything. If there is any unnecessary/bad code I need to get rid of, ...
1
vote
1answer
64 views

AgeCalculator - Calculates your current age using your birth date

I have been learning Java for approximately 3 weeks now and made 2 posts on code review. Learned quite a lot from people and learned a lot of Java at the same time as well. I made this Age Calculator ...
1
vote
1answer
105 views

Google Foobar challenge optimization

I am trying to solve Google Foobar challenge prepare-the-bunnies-escape using my own approach, instead of BFS. I attempt to solve two ends of the maze and try to ...
4
votes
3answers
215 views

Generating a bill of materials in Excel VBA

I am not an advanced user of Excel and am VERY new to VBA. My only programming experience is 2 C# classes in college. That being said, go easy on me ;) I am working on a team that audits military ...
4
votes
1answer
99 views

Haskell - Convert an Image to Ascii Art

I'm currently learning haskell, and I wanted a simple project to get started. This project uses the JuicyPixels package to handle image reading. The logic of the image to ascii art algorithm is quite ...
4
votes
1answer
90 views

Basic ToDoList - Create a simple to do list and print it whenever you are done

this is my second program that I have made as a Java beginner (started out like two weeks ago). The program utilizes scanner and arraylist to create a to do list which the user can add to and print it ...
6
votes
1answer
134 views

Weather Suggester - A simple program to suggest clothes depending on the weather condition and temperature

I have started learning Java last week and made this simple program to practice making conditional statements and using scanners. The program, as the name suggests, takes the input of a temperature ...
1
vote
2answers
428 views

Account signup/login program in Python

This is my first program that I wrote on my own. Is there something I can improve upon? There are a few things that still need to be added, such as: Confirm password while registering Adding a way to ...
2
votes
1answer
112 views

Terminal python tic-tac-toe game

As someone that started to learn basic python programming, I decided to make a Python tic-tac-toe game for the terminal, to develop my OOP skills. I would like to know if my code has a lot of ...
1
vote
0answers
151 views

Python script to compress and encrypt a list of files/directories (tar + gpg)

I've tried, as practise, to write a Python 3 script which takes a list of paths to files/directories and compresses them with tar, before encrypting the resultant ...
1
vote
1answer
50 views

PureScript breadth-first search implementation

For context, I wrote a function, get_servers, for the game Bitburner which is usually played by writing JavaScript code. Instead, I used PureScript to write the ...
4
votes
4answers
460 views

HackerRank Sales by Match

This is my first post. I'm switching from Python to Java and I've been practicing on HackerRank for some time. Today I solved this problem in which you have to ...
2
votes
1answer
39 views

ReactJS link with conditional CSS classes

I'm starting to learn React/NextJS and find the way to write conditional CSS very ugly compared to VueJS. I'm curious if someone could look over this code snippet and guide me in the right direction ...
4
votes
1answer
125 views

Calculator for basic arithmetic operations

Second day coding so I'm new to this. I have made this simple calculator but I repeat the code in order to use the previous answer in the next calculation. I've been trying to simplify it but I can't ...
4
votes
1answer
98 views

Rust Persistent Red Black Tree Implementation

Below is my implementation of a persistent red black tree in Rust. I have a few questions about potential improvements. Currently the data and nodes are stored in referenced counted pointers. Is this ...
5
votes
2answers
109 views

Text Based Minesweeper in C

This is my first C program. The code works, however I'm not yet familiar with how to write idiomatic C. How should I improve this? ...
5
votes
3answers
255 views

My little C++ library for comfortable programming

I've tried to make a little library in C++, to gather all useful and necessary functions. I wrote the code(in one file, to make it more portable). Unfortunately, it works on Windows only. ...
4
votes
1answer
82 views

Python scripts that generate valid ngrams for use in pseudoword generation

These are the scripts I wrote to generate valid ngrams, the output will be filtered manually then used in Markov chain style pseudoword generation. You will need PowerShell 7 and gcide_xml to make ...