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
1answer
87 views

Google pubsub client in golang

I've been working on a Google Pub/Sub client library for golang. Fairly new to golang and my intention is to learn the language. Not really sure what are the best practices, aiming to learn them over ...
3
votes
2answers
83 views

Registration form using procedural MySQLi

I'm relatively new to coding with PHP and mySQLi. I want to learn more but I'm really limited in resources. Most of my research went into W3Schools, PHP.net, and of course whatever I could find on ...
6
votes
2answers
93 views

Duplicate File Finder in python

I just started learning python yesterday, I have prior experience of C++. So I think I am able to get most of it pretty fast. I wrote a duplicate file finder for testing and practicing. Can you guys ...
4
votes
3answers
119 views

Number Guessing Game in Java

This is my implementation of the famous Number Guessing Game. It is not object oriented, but the goal was to create a simple to read, procedural program. Have I accomplished this goal? ...
6
votes
3answers
141 views

Taking out number of subarrays from an array which contains all the distinct elements of that array

I am a beginner in C. My teacher gave me a homework problem in which a user would provide an array with its size. What we have to do is:- 1) Take out all the distinct elements from that array. ...
1
vote
1answer
46 views

Javascript calculation function

I use this function to to do some calculations based on 4 select inputs and one number input, I don't have experience in Js, I did some research in w3schools then I ended up with the function below. ...
2
votes
1answer
83 views

PHP User class usability,maintainability,secure

I'm new in oop programming pattern. I created this simple User Class and i'm wondering if it : Is following oop rules and logic ? Is maintaibable ? Is can be tested without any problems ? Can be ...
1
vote
1answer
63 views

Simple Connect Four Game With GUI added

I am trying to improve my coding skills in Java by taking existing code, studying it, and adding on to it. In this code example, I took code from Connect Four game in Java and edited it. The most ...
4
votes
0answers
67 views

React - pomodoro clock

I'm looking for some feedback on a pomodoro clock that I recently wrote with React. I'm pretty new to React and coding in general. I followed a couple of online courses, but I'm mostly self-taught. ...
6
votes
2answers
117 views

Fast Food Order Simulator

I have been trying learn OOP lately, and have made a simple program that simulates some sort of drive thru experience using a 9 digit keypad to add, delete, and pay for items ordered from the menu. ...
0
votes
1answer
64 views

How to find the common factors of 2 numbers [closed]

Print the number of common factors of a and b. input > 10, 15 Output > 2 The common factors of 10, 15 are 1 and 5 My code ...
4
votes
3answers
112 views

Find the first missing positive integer in an array of integers

The problem is the one explained in Given an unsorted integer array, find the first missing positive integer Given an unsorted integer array, find the first missing positive integer. For ...
3
votes
2answers
78 views

Snake game using graphics.py

I am a self taught python beginner for about 3 months and recently I finished my own snake game project. As seen from the code, it is not very efficient nor tidy to look at so I want to know if there ...
2
votes
1answer
46 views

Simple Go REST API that returns dummy messages

I am a learner in Go and wrote example below in a day so I would like to get some suggestions to improve it. It is a simple rest api that currently just accepts request and returns a dummy message. My ...
2
votes
1answer
39 views

Comparing web-scraped data from several sports betting APIs

I have written a python script that requests information from several Sports Betting API's, processes and standardises the results into a dictionary, Matches items between dictionaries and then ...
7
votes
1answer
208 views

Letting unbanned users comment

I am a beginner in python and I was wondering if the code for this program is nice and clean. The program works I was wondering how could i improve it. So this program asks for your 'username' and ...
4
votes
2answers
83 views

Convert light-years to other representations

the code is very messy, long and I am looking how to shorten it and/or simplify it. There are a lot of repeated variables, for example; 'hourToDay' and then 'hourToDay1', 'hourToDay2' and so forth. ...
5
votes
2answers
115 views

Chip8 Emulator in C++

I wrote this chip8 emulator as practice recently since my coursework is mostly console programs. I've tested it with roms off Zophar's Domain and it appears to work with my limited testing. I'm hoping ...
2
votes
3answers
62 views

Beginner user registration and login program

I'm new to coding and C++, this is one of my first pieces of "software". Could anyone give me some constructive criticism? ...
6
votes
1answer
78 views

Custom HttpClient implementation for third part usage with sync/async calls

I'm doing an implementation of HttpClient that is built in a NET Standard project, which will be used as a base to build and process JSON requests/responses for a third part REST API. Client is built ...
3
votes
1answer
74 views

Apply a sepia filter to an image

I'm writing a simple function that applies a Sepia filter to an image. My function works, but I'm a beginner gopher. So I would like to know if there is a way to improve the code. I usually code in ...
1
vote
2answers
77 views

Reposition vertices at the origin of a coordinate system

This method repositions vertices of an object in such a way that the center of the object is at the origin of the coordinate system. The task is the commented part. While my code does the job I feel ...
3
votes
2answers
59 views

Fixed Content Necklace Generator

I wrote a class that generates combinatorial necklaces with fixed content as per Sawada: A fast algorithm to generate necklaces with fixed content. The class is instantiated with an input list that ...
5
votes
1answer
56 views

Implementing d-ary heap

I'm trying to Implement a d-ary heap. A d-ary heap is just like a regular heap but instead of two childrens to each element, there are d childrens! d is given when building a heap, either by giving an ...
1
vote
1answer
58 views

Adding a number to an array of digits

I'm a student in my first semester and in my free time and holidays, I do some java training to keep my mind from rusting...so I downloaded this amazing Digital Algorithms practice app and came across ...
4
votes
2answers
121 views

Reading Data from XML and storing them into SQL Database

I am developing a C# Windows forms application. In that, I am reading data from XML which is coming from a web API and storing that XML data into SQL database. I am able to achieve this. But my only ...
3
votes
1answer
71 views

Very simple Hangman game, with a Swing GUI added

I have just started learning basic Java. I would like to know what I can do to improve my coding habits in Java and how to code more efficiently. In this code example, I took code from Very simple ...
4
votes
3answers
390 views

Project Euler # 15 Lattice paths in Python

Starting in the top left corner of a 2×2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner. How many such routes are there through a 20×20 ...
1
vote
1answer
58 views

Project Euler # 11 largest product in a grid in Python

In the 20×20 grid below, four numbers along a diagonal line have been marked in red. The product of these numbers is 26 × 63 × 78 × 14 = 1788696. What is the greatest product of four adjacent numbers ...
2
votes
1answer
83 views

Simple console application that changes text color based on user input

I am learning C# like 1 or 2 months and I wanted to know if there is any possibility to shorten this code. It is simple. It only changes color of the console text with ...
6
votes
2answers
74 views

Basic console calculator with four operations

I'm an absolute beginner in programming, and Today I decided to put my knowledge to the test and create a basic c# calculator. I've Done it, but now I'm looking for ways to Make it more shorter and ...
4
votes
2answers
78 views

Draw an outline of an upward-pointing triangle

I am beginner in C++ and I was given this assignment by my teacher. The assignment is to print the following shape: ...
4
votes
1answer
130 views

A Basic Hash Map in Python

A hash map is a data structure that implements an associative array abstract data type using keys and values and has a hash function to compute an index into an array, from which the desired value can ...
2
votes
0answers
32 views

Code to configure “particle generator” from valid configurations options

My C++ code accomplishes the following: It consists of a class called ParticleGenerator which has three important configuration options: ...
6
votes
1answer
65 views

Haskell PitchClass Algebra, in which notes have various names

I am an OOP programmer by trade (Java) who is extremely new to Haskell and the world of purely functional languages. To get my feet wet, I decided to try and write a little musical interval translator/...
19
votes
6answers
4k views

Premier League simulation

I've created a simulator for the Premier League, which takes in all of the 20 teams and plays them against each other, recording the results and outputting a table at the end. The skill levels are ...
6
votes
2answers
513 views

Javascript - Find a deepest node in a binary tree

Problem Statement Given the root of a binary tree, return a deepest node. For example, in the following tree, return d. a / \ b c / d My ...
0
votes
0answers
41 views

Treehouse's “out_of_this_word” (modified)

A code where the goal is to get as many words as possible from one string. The rules are strict but users can cheat easily because this is not an English dictionary. ...
2
votes
1answer
59 views

Bubble Sort: Time and Space Complexities

Algorithm Bubble sort, also known as sinking sort, is a sorting algorithm that repeatedly steps through a list, compares adjacent pairs and swaps them if they are not in the right order. The pass ...
2
votes
2answers
71 views

Implementation of a Singularly LinkedList

I'm new to C++ and trying to learn by implementing data structures in it. Is the code below the most efficient way of implementing the data structure in C++? Does it conform to C++ standards, and how ...
3
votes
2answers
109 views

Tkinter program to teach Arabic

I am writing a lesson-based program to help teach friends and family the basics of Arabic. The program consists of different sections (letters, numbers, personnel pronouns, etc.) and each of those ...
11
votes
3answers
3k views

C# TCP server/client class

Goal My goal is to create a TCP server/client class that can be universally reused in various private projects. It should work stable and does not need to be super fast, but rather light-weight to ...
4
votes
3answers
182 views

Course Statistics Using Arrays and Files

I wanted to get some feedback here on my solution, because the course I am using is not allowing me to submit any answers. Objectives: Write a Java program that: Create a grades.txt ...
4
votes
1answer
87 views

Create HTML structure dynamically

We had a long HTML string with information about the makers of our software. However, for i18n this was unwieldy. So I started to refactor, so only each person's description is translateable, not all ...
4
votes
2answers
91 views

Project Euler # 74 Digit factorial chains in Python

The number 145 is well known for the property that the sum of the factorial of its digits is equal to 145: 1! + 4! + 5! = 1 + 24 + 120 = 145 Perhaps less ...
2
votes
1answer
51 views

Simple landing page with a countdown timer and automatic slideshow with HTML,CSS,JS

Does this code follow common best practices? I tried to keep the code simple and straight forward adding comments and spacing everything to be readable. My main concern is there a common practice ...
3
votes
1answer
63 views

Project Euler - Problem No.5 - Smallest multiple

Here's the problem at hand: 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly ...
4
votes
1answer
47 views

Find the total number of emails in a folder (with all of the subfolders)

The Folder struct definition below is given: type Folder struct { ID int emailCount int childFolderIDs []int } Description of the fields are: ...
2
votes
0answers
70 views

OpenGL C++ snake game clone

I've been learning OpenGL and C++ recently and thought I'd attempt to make a snake game. It would be amazing if you could take your time to read my code and give advice please. Please prepare yourself ...
4
votes
1answer
233 views

The Enigma Machine (CLI) in Java

A few days ago I began to work on my first project that's bigger than any others that I've attempted before. The purpose of this was to learn how to better code using OOP techniques. The code is all ...