The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
4
votes
1answer
44 views

JavaScript HTML DatePicker

I'm still new in javascript and learning. I want to create a date picker using html and javascript. Below is what I have tried and it's working, so my question is "how can I do it better?" My idea is ...
2
votes
2answers
177 views

Codeigniter 3 Registration and Login System

I am working on a basic blog application in Codeigniter 3.1.8 and Bootstrap 4. The application allows Registration and Login. I have concerns about the security level of the Registration system I ...
26
votes
5answers
5k views

A first “Hangman” game in Python

I am new to Python (it's my first language), been coding for a couple of weeks now. I have already made a couple of simple scripts to download and manipulate some financial data, but lately I thought ...
6
votes
2answers
110 views

JavaRPN calculator

I have found that there is a distinct lack of an RPN calculator available to me, so I decided to make my own. I am still adding new functions to it, but as of now, I would like to refactor my code. ...
2
votes
2answers
127 views

Lottery Game in Java

In the last days I've written a number guessing game that I've posted on this site. I have now written a lottery simulation in which I tried to acknowledge the criticisms of the project mentioned ...
1
vote
1answer
43 views

Train reservation system in Rust as my practice

Abstract I am a beginner of Rust language. As my practice I want to create simple train reservation system. I know little about the "best practice" in Rust, so I want some advises in my code. In ...
3
votes
1answer
96 views

Introduction to Haskell: Validating credit card numbers

I have implemented the introductory challenge of University of Pennsylvania's CIS 194: Introduction to Haskell (Spring 2013) course. I have added the most important information of the problem ...
4
votes
1answer
73 views

Regex XML validator

I have written a Regex to validate XML/HTML, along with any attributes. It aims to: Match any XML-like text Not match any unclosed tags Adapt for any spacing, newlines, etc. Be as generous as ...
2
votes
2answers
89 views

RPG Map Initialization

I am working on an RPG in Java and I am using a tile-based map. The characters will not be building, so I will not need to store the maps outside of the game, but I feel as if there is a more ...
4
votes
1answer
77 views

Most idiomatic way of declaring a deck in Rust

I'm new at Rust and I'm trying to implement a cards' deck on Rust, I'm trying to use most idiomatic code I can, but since I'm new at this language, I'd like to hear advice from more experienced ...
3
votes
1answer
66 views

Forming words that start with consonants and vowels

I am just starting to learn programming. I had already coded some functions and stuff in other languages, and whilst trying to complete this Python challenge Kevin and Stuart want to play the 'The ...
3
votes
1answer
90 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
85 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
121 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
68 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
79 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
116 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
62 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
122 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
74 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
393 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
136 views

A Basic HashMap (Python)

A hashmap 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 ...