Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
17 views

Correctness of iterative DFS for cycle detection

I'm attempting the Graph Algorithms section in CLRS right now. Here's an iterative DFS using a stack called nodes. ...
0
votes
0answers
26 views

Error-Handling Class and Logging

I am relatively new to C# and would like to see if what I have been using for my exception handling, message and logging is along industry standards. I have created a simple class for the Error ...
2
votes
1answer
44 views

C++ class for a flag register in a Chip8 emulator

In order to learn C++ I decided to code a Chip8 emulator following a tutorial. When I came across the idea of a flag register and decided it would be fun to implement in order to get familiar with ...
-4
votes
0answers
15 views

I have a Python Program which gets Candidate data and tells the user whether or not each person could run for president [on hold]

I have my program task and a picture of the code I’m working on. This is super beginner stuff and I’m kinda having trouble. Please let me know what I should change. Thanks!!.
3
votes
2answers
37 views

K&R Exercise 1-13. Printing histogram of word lengths (horizontal variant)

I'm going through the K&R book and want to get the most from it. How does the following solution look to you? Note that, for the sake of exercise, I don't want to use techniques not introduced yet ...
0
votes
0answers
15 views

Creating text game with JavaFX Interface

It's only my third day with Java and I already got a recommendation to check out JavaFX and build a simple text game. I do like text games, but I had no idea how to implement the features that I ...
1
vote
1answer
51 views

Integer to Roman Numerals (1 - 2999)

This is a homework assignment. Convert an integer (1 - 2999) to roman numerals. I was wondering if I could make my code more efficient. The way I have it set up is that I take the digits of the input (...
4
votes
1answer
31 views

JavaScript Snake: First app

I just finished my first full app in JavaScript and I'm hoping to get some feedback. I guess I'm looking for overall design advice, use of classes and functions etc. but anything is fair game so keen ...
3
votes
0answers
54 views

Nibbles/Snake game in Python

I am a total beginner at Python, so I wrote a very simple snake game using pygame to get some practice with it. I also don't have too much experience with object-oriented design. Does the code ...
1
vote
1answer
41 views

First Python game of Tic-Tac-Toe

I'm just getting started with Python and was hoping for some feedback on a simple Tic-Tac-Toe game I wrote. Specifically, is there a simpler way to check the win conditions for the game, and to break ...
-3
votes
0answers
27 views

First solo python project, text based game. After 'fight' method the game doesn't return to main [on hold]

So I've been learning python myself from online course and wanted to practice everything I had learnt so far in a fun way, so started a text based game. Now I've gone through quite a few iterations of ...
4
votes
2answers
82 views

Tic Tac Toe with images

This is my first 'real' project in C# , i looked up some tutorials on the Internet for Tic Tac Toe. But they were not how i wanted it to be, so i came up with some own ideas and wanted some tips on ...
7
votes
3answers
2k views

Add multiples of 3 or 5 below 1000, Can this code be optimised. Project Euler #1

I have seen some solution here for the same problem, this and this I have found better ways to solve this problem. I just want to know how good or bad my code and way of approaching this problem is. <...
2
votes
2answers
32 views

Number-guessing game using functions

First time writing a "game" in a sense. Used a functions approach, it's simple, looking for a review of the way it's written and of course looking for how should it be written. Also using random for ...
1
vote
0answers
19 views

Nodemailer class

I created the following class for sending mail in my node.js API : ...
0
votes
1answer
20 views

Invocable callout(Post) from processbuilder

I am relatively new in making (invocable)callouts. My main concern is if I should be using smaller parts for example for the body and using a query only once in this case. Any suggestions would be ...
-3
votes
1answer
26 views

SFTP a file to remote server, and if successful, also SFTP second file [on hold]

This code has an objective of sending a file1 to a remote server and sends file2 if and only if file1 sftp is successful. //Initiate Class ...
1
vote
1answer
59 views

Stack using Linked List in Swift

I made this implementation of a stack in Swift that stores its elements as a linked list. It seems to work perfectly well, but I’m wondering how I can improve it to follow the best practices of the ...
1
vote
2answers
98 views

Luhn Algorithm “modulus 10” checksum

I wanted to challenge myself in a new language that I am learning (C#) by doing a simple exercise: check if a "modulus 10" Luhn number is valid or not. In this case the common application if verifying ...
0
votes
0answers
13 views

Checking UML class diagram, somebody with experience? [closed]

Hello everybody. I need to design an UML class diagram and I am uncertain if my solution is right or not. There is two main requirement: you need to stick to the UML standard, and it must be OOP ...
-3
votes
0answers
14 views

Error in implementing graph through STL in c++ [closed]

I am unable to find the error in the code below, which stores graph using STL. The graph is getting incorrectly stored. sample input 1 => no. of test case 2 2 => no. of nodes, no. of edges ...
1
vote
1answer
50 views

IP Scanning program Python 3

This is the code I made to scan IP addresses. I am new to python and just want to learn how I can optimize it. I know the subprocess is slower than others to IP scanning but if there is a way to make ...
0
votes
4answers
107 views

Simple OOP Blackjack game in Java

I've created a relatively simple Blackjack game in java. The reason why I decided to do this specific project was to improve my object orientated programming in java. I will post my code so feel ...
2
votes
2answers
46 views

Finite State Machine in C++

I made a state machine. You can press 0 and 1 to switch between the hypothetical menu and playing state. I hope you can help me improve it further. StateManager.h ...
3
votes
1answer
93 views

Simple application to look up items in a list

I'm very new to the programming world and have been working exclusively with console window applications in C# thus far. I've created a program which took me way too long to produce but I'm very proud ...
-4
votes
0answers
13 views

My code won't recognize my identifiers [closed]

I'm working on making a simple flash game for my coding class, but my code refuses to accept 0,1 and 2 as identifiers. I even tried rewriting the entire code, and even that didn't work. I can't ...
-3
votes
0answers
35 views

making a “terminal” in visual studio [closed]

I'm new to c++ programming and I am trying to make a basic "text-based RPG". I wanted to make this so I could show my teacher (sophomore in high school). I'm pretty confident in my ability to code the ...
3
votes
1answer
43 views

Maze solver BFS in Haskell

I am really excited that I just wrote my Haskell maze solution in bfs. This is my very first haskell (and I still haven't tried to build a maze in haskell so that maze is hard coded xD) ANY ...
0
votes
1answer
61 views

Euler #7 - 10001st prime [closed]

Here is my code of project Euler #7: ...
5
votes
2answers
126 views

Beginner Rust text adventure

I've been trying to pick up some Rust experience and decided to try and make a text adventure game. I'd like some feedback on potential bad practice and non-Rust-style code I may have used. I'm moving ...
7
votes
5answers
1k views

RockPaperScissor Game

I have been studying C#, and I am trying to model the "Rock / Paper / Scissors" game. Is my program reasonable or is there anything I need to improve? user input a round. user input RockPaper or ...
3
votes
1answer
81 views

Battleship Model - follow-up

This is the revised code from my prior question. Same requests as before! Something I'm doing new here is using the XmlEncoder extension methods to handle ...
1
vote
0answers
19 views

React multi-select-like component with filter

I am new to react (and javascript in general) but am enjoying learning it. I have decided to make a little multiselect component which should work as follows: I start with my data in one list, when ...
4
votes
2answers
107 views

Space Invader Style Game - Model / Presenter Decoupled From View - Functional Again Too

Thank you for your patience. The game is fully functional again! I have tried to incorporate all the advice I have received so far. Thank you for taking the time to review and comment. I have now ...
3
votes
1answer
87 views

Battleship Model

The following is some code for a Battleship game I'm working on. The plan is to create a multiplayer game using Xamarin Forms. This is just the model code, i.e. what the GUI will be interacting with ...
3
votes
0answers
39 views

OLED display application for Raspberry Pi

Python script to output status information to a small OLED screen connected to a Raspberry Pi. I'm relatively new at writing python so although the app works and outputs correct information it is far ...
0
votes
1answer
65 views

Drawing concentric circles to console

This prints out a triple layer circle with 12 points per circle and finds the points across a grid. I had a really hard time with this and I'm planning to implement a lot more code but I don't want ...
3
votes
1answer
68 views

Caesar Cipher in Haskell, on every other character

I'm learning Haskell, and I tried to do an exercise which it is an implementation of the Caesar Cipher method. The problem asks for cipher a text which it is in lower case and can contain characters ...
1
vote
0answers
34 views

Scraping symfonycasts.com using BeautifulSoup

I'm learning python 3.x and I'm still feeling like a newbie. The program below scrape a given course in https://symfonycasts.com/ and creates a file containing all the dynamics download links to all ...
2
votes
0answers
29 views

Function that plots data frames, supporting several variants

I defined a function that generates tables and creates countplots and barplots based on the arguments that it receives. But the snippets of code inside the function are repeated several times, which ...
4
votes
1answer
109 views

Hangman Game in C++

This is my version of Hangman Game, written in C++. How could it be improved? what should I avoid using/doing in future projects? ...
3
votes
3answers
181 views

Binomial coefficient in Java

Find nCr for given n and r. Input: First line contains no of test cases T, for every test case 2 integers as inputs (n,r). Output: Compute and print the value in separate line. ...
1
vote
1answer
50 views

Space Invader game written In VBA, 3rd iteration [closed]

Here is a link to the workbook, classes, modules and forms: https://github.com/Evanml2030/SpaceInvader/tree/master Positive: I have decoupled the view from the control / presenter. I have ...
2
votes
2answers
87 views

LinkedList Stack Implementation

I'm new to the programming and I want to ask a question about my linkedlist stack implementation if it's correct and if it meets the requirements of the linkedlist stack implementation. If there is ...
10
votes
2answers
371 views

Generating a musical scale from a root note

I'm looking to improve my coding skills. I am new to programming, and after weeks of research and trial and error - I have successfully wrote this basic program to find a music scale by inputting a ...
5
votes
2answers
101 views

Currency converter - CLI and API

First time asking a question here. I made a simple application as a task for a position of a junior programmer, but it did not work out the way I hoped. Nevertheless, I would definitely be interested ...
2
votes
3answers
60 views

Stacks using Linked Lists in C

I tried to implement a stack using Linked Lists. How could I make it more efficient? Any other suggestions will be greatly appreciated. I am a beginner C programmer. Any other tips to clean up my ...
2
votes
1answer
82 views

Hotel booking system help on how to book nights and memberships

I am doing a GCSE NEA project for practice. Customer Loyalty Scheme The managers of Crawdale Hotel Group have decided to update their customer loyalty scheme. Customers joining the scheme ...
2
votes
2answers
55 views

Initializing a tile-like map such that the edges are marked with an 'X'

I've been messing around with arrays as I'm learning them currently in my book and they gave the idea of a chess board using for loops alongside multidimensional arrays to give them individual values ...
4
votes
0answers
71 views

Python 3 calculator with tkinter

I have been programming for a long time. Only recently have I decided to take a stab at Python (I should be working with C# as I am in school for it, but I don't care for Windows, long story). I was ...