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
2 answers
88 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
  • 1,231
0 votes
0 answers
34 views

React calculator..!

I'm a beginner programmer and I need your help, please. I built a simple calculator using React and I have doubts about my calculation functionality. So the idea is to let the user type all the ...
Gal Shimoni's user avatar
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
122 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
74 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
6 votes
2 answers
84 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
  • 63
2 votes
1 answer
55 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
96 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
48 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
1 vote
0 answers
43 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
  • 11
2 votes
1 answer
55 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
  • 133
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
1 vote
1 answer
66 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
79 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
592 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
96 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
  • 369
2 votes
1 answer
65 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
86 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
79 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
61 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
75 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
46 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
41 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
145 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
28 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
89 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
69 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
94 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
199 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
119 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
3 votes
2 answers
270 views

Disprove Euler's sum-of-powers conjecture

Problem statement: In 1769 Leonhard Euler formulated a generalized version of Fermat's Last Theorem, conjecturing that at least \$n\$ \$\text{n}_{\text{th}}\$ powers are needed to obtain a sum that is ...
x27ca61a's user avatar
  • 307
2 votes
1 answer
92 views

Simulate Monty Hall

Problem statement: A contestant is presented with three doors. Behind one door is a valuable prize, behind the other two are gag gifts. After the contestant chooses a door, the host opens up one of ...
x27ca61a's user avatar
  • 307
3 votes
2 answers
136 views

Convert 9-digit integers to ISBNs

Problem statement: The International Standard Book Number (ISBN) is a 10 digit code that uniquely specifies a book. The rightmost digit is a checksum digit which can be uniquely determined from the ...
x27ca61a's user avatar
  • 307
3 votes
3 answers
141 views

Find Ramanujan-Hardy numbers smaller than N

Problem statement: Write a program that takes a command-line argument n and prints all integers less than n that can be ...
x27ca61a's user avatar
  • 307
2 votes
1 answer
86 views

Password recognition with cryptography

Since I only just learnt about this, I wanted some advice on better practices I can use when it comes to cryptography. Still learning python and hoping I can get this 'hashing' and 'salting' thing in ...
Beginner's user avatar
  • 189
2 votes
1 answer
117 views

Convert decimal to base K

Problem statement: Write a program that takes two command-line arguments number and k. The program should convert ...
x27ca61a's user avatar
  • 307
2 votes
1 answer
86 views

Pomodoro Work Timer with GUI

My first actual code using GUI. Based off a class I took. Code criticism much appreciated. (I was all over the place with this one) Resources Picture: Sound: https://www.freesoundslibrary.com/success-...
Beginner's user avatar
  • 189
1 vote
0 answers
46 views

Memory game code quality

I am making an incremental-memory-game similar to this https://www.crazygames.com/game/incremental-memory I am not very satisfied of how spaghetti this code is. I am trying to learn to improve my code ...
jerma lover1's user avatar
3 votes
1 answer
63 views

Follow-up Q: Protein databank file chain, segment and residue number modifier

I asked a question yesterday (Protein databank file chain, segment and residue number modifier) and received a very informative answer by J_H whose feedback I have taken onboard. Some of the feedback ...
JamesT's user avatar
  • 74
4 votes
1 answer
101 views

Protein databank file chain, segment and residue number modifier

My first non-trivial bash script after fully moving to Linux Mint last week is attached (modify_cccp_bundles.in). The script ...
JamesT's user avatar
  • 74
0 votes
1 answer
87 views

MakeFile for C++ small project

I decided to implement a Makefile for a personal project I'm working on (I've never created Makefile before) but I need to learn for an upcoming work assignment. The Makefile it's supposed to build ...
Simon's user avatar
  • 209
3 votes
2 answers
81 views

Write a method which computes the first twenty Fibonacci numbers

It's a task from a C#-course I'm currently taking. The task is to write a method, which returns the first twenty Fibonacci-numbers. I have done it the following way. ...
thwagner2's user avatar
0 votes
0 answers
102 views

Gacha Nox Webgame Bot

So there is this gachanox. You can play Gacha Nox in full screen. I wrote a python script which "plays" the game on the website by clicking the arrow keys. I would like to know what can be ...
devid's user avatar
  • 1
1 vote
1 answer
54 views

Is there a more concise way to write this query in SQL Server?

I'm playing with data from a Time Use survey as a beginner SQL user. Gender is represented as 1's (Male) and 2's (Female), and the age of each participant is listed. I would like to divide them into ...
Erik's user avatar
  • 303
4 votes
3 answers
431 views

Python, loop trought in txt and print future login data

I would like my program to check what account I am currently logged in to (it works, I entered it (login4) in a variable for testing) and when it reaches the end of txt I want it to go back to the ...
Owneds's user avatar
  • 43
1 vote
1 answer
138 views

Python 3 script that draws animals using basic functions

I'm new to Python and only started learning a couple months ago. I get that this is a really unsophisticated code and I'm a newbie, but are there any blatant issues with it that I can improve upon? I ...
CommercialGrape's user avatar
1 vote
1 answer
55 views

Revised C Doubly-Linked List

I have revised the implementation I originally posted here. Thank you all who responded; I took your comments to heart. Please let me know if you have any additional feedback. Here are some notes to ...
user129393192's user avatar
5 votes
4 answers
2k views

Automate the boring stuff with python - Character picture grid

Character Picture Grid Say you have a list of lists where each value in the inner lists is a one-character string, like this: ...
Jarne Vercruysse's user avatar

1
2 3 4 5
150