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
0
votes
1answer
37 views

Python: Bubble Sort

After implementing suggestions from an earlier, related question (Python: Selection sort), I have written this code. Could you help me to improve this code? ...
3
votes
2answers
83 views

codekata: Binary search on an int array

I'm following Karate Chop kata for a binary search. I really wanted to avoid built in functionality within the language. I'm pretty new to C# so any recommendations is greatly appreciated. Spec: ...
1
vote
1answer
38 views

Remap ls to honor .hidden files

I wrote this code in my .bashrc to remap ls to honor .hidden files. I'm pretty new to shell/bash scripting, so I feel like this is not the most performant way to handle this, and it has some ...
3
votes
2answers
99 views

Easy-Medium Sudoku solver written in Python - No recursion/ brute force

I'm very new to software developing, I wrote this Sudoku solver in Python, it's not the best approach ever I know and that is I guess because I started taking courses in Python and programming a month ...
2
votes
0answers
33 views

Python Script that sends emails to a list of people and their emails and attaches specific documents (w/ tkinter menu)

This is my first Python project. Any tips on making it more efficient, less cluttered, and could you think of some cases that I haven't in which my code will break. For clarification the vendor list ...
0
votes
1answer
39 views

Is my code fine in the areas of read and write?

What: This is a code that when executed simply writes packet to certain file types. Packet is very simple and contains things like: ...
1
vote
1answer
46 views

Temperature and currency converters in OOP JS

I just started learning OOP from Mosh on YouTube and I looked for easiest exercises to practice. Can I get a feedback on my code please? What I did wrong and what I should change? In the code there ...
1
vote
1answer
61 views

Python: Selection sort

After implementing suggestions from an earlier, related question (Python: Insertion Sort), I have written this code. Could you help me to improve this code? ...
2
votes
1answer
29 views

dput() concatenated vector with no quotes, separated by commas in R

An oddly specific task - I have a dataframe with columns with values I need to concatenate in order to prepare a query for a website that requires very specific inputs: unquoted strings, separated by ...
4
votes
0answers
36 views

URL builder in Python

I created a code that will create, or rather build a URL based on the configuration. Everything works, however with the expansion of my project I added multiple languages etc. every section only ...
2
votes
1answer
55 views

An adventure game

So as you will soon be able to tell, I am very new to this programming. But I thought that the best way to learn would be to just jump on in and create my own game. Was wondering what things I should ...
4
votes
1answer
93 views

Factorial calculation UI freezes on loading many items in ListBox

I've been experiencing this performance issue for about 3 days and really need your help. I'm a novice at c# and cannot understand what I can do to optimize my application. The problem is that the UI ...
3
votes
2answers
46 views

Python: Insertion Sort

I am a beginner in python and to learn python I have written this program. How can this code be improved? Should I use main method in this program? Python ...
9
votes
2answers
2k views

Balanced parentheses using standard C++

Here is a small program for checking if the parentheses are balanced or not. I am new to the standard library, and this is my first program. How can I improve it? Any kind of modifications or ...
6
votes
1answer
791 views

Avoid using C Strings on C++ code to trim leading whitespace

I'm learning C++ and wrote a function to remove all the spaces and tabs at the beginning of the input string. It removes them until it find a character different of space and tabs. In the first ...
5
votes
2answers
116 views

A betting game using a dice class in C#

This is my first project over 100 lines and I would like some feedback on it. If anyone has any ideas for things to add or ways to make the code more efficient they would be very much appreciated. <...
1
vote
0answers
17 views

Propagating data in React

I'm learning React recently, but I've been having some issues regarding propagating data from component to component. My general situation is: I have a textarea ...
5
votes
2answers
271 views

Fetch and print all properties of an object graph as string

Below I have setup an extension method that takes any object, cycles through its properties, and prints each out to a Console window in the format Name: Value. ...
8
votes
3answers
368 views

Story-based adventure with functions and relationships

This is a story-based adventure program I coded by myself (forgive the length). It took a long time but it was fun. It includes loading times, changes in relationships, relationship levels, storyline ...
2
votes
0answers
21 views

Add events on same class multiple times

I'm not sure how to title this post as I'm a bit confuse here. My code updates a field in line. It's done in two separate functions. It works well but I wonder if it's possible to handle it in only ...
0
votes
0answers
17 views

Getting redis sentinel info in Rust

I've cobbled together some Rust code to display Redis master/slave information. As a Rust newbie, I'd appreciate some review feedback. ...
3
votes
1answer
41 views

Hangman program in Python

I am fairly new to coding and decided to test my skills and make a program from scratch on my own. I chose to make a Hangman game, it's pretty straight forward. The code reads a file consisting of ~40,...
5
votes
2answers
677 views

Printing a multiplication table in C [closed]

I'm a complete beginner, but I'd like to learn how to program. I really started 2 weeks ago. So I tried the common exercise, aka the multiplication table, but I tried to add little things I learnt ...
2
votes
1answer
83 views

Rock Paper Scissors C# game with rounds input

I have a Rock Paper Scissors project in C# and I was wondering if I could get some feedback on how to improve my code. I ask the user how many rounds the user wants to play. The maximum number of ...
2
votes
0answers
35 views

Web app that triggers sirens on cameras in remote locations

Web-app summary: I'm a complete beginner in web development and I made a sample web application that can trigger sirens on security cameras located in remote locations. Here's the functionality seen ...
1
vote
1answer
51 views

python : Collatz Sequence

I am a beginner in python. I found this problem in the book Automate the Boring Stuff with Python. How can I improve this program using latest version of python. ...
4
votes
1answer
92 views

Program to check an item's price against available credit

This is a working program to check an item's price against available credit. I'm trying to simplify this program to the bare minimum. It would require to run so I'll be better able to understand each ...
2
votes
2answers
98 views

Beginner text adventure game

I am new to Python and I have not yet done any OOP. I wrote this text adventure as a first project and I would like to know if there is a better and more efficient way to write my code within its ...
3
votes
2answers
137 views

Cat Scoring app

Can you please review my code and suggest why it may or may not be a professional looking code? I am just starting out as a programmer I am able to write code but I don't really know where I am right ...
4
votes
2answers
71 views

Find 4 points which form a square with the biggest area

I have set of points on the coordinate plane. I need to find the 4 points which form a square with the biggest area. I'm new in JavaScript so I'd like to get any suggestions about code style, ...
4
votes
1answer
75 views

Iterable hashtable implementation in C

I'm just finished my version of iterable hashtable. I want to review code in general (code style, data structures, remarks about the algorithms) and I have some questions: I don't know how to ...
0
votes
0answers
21 views

App growing ugly with multiple state components

A couple of weeks ago I started a little project, I was learning node/express/mongo and I though it was a good idea to start building some app so at least I could refresh my basic React knowledge. ...
1
vote
0answers
15 views

ASP.Net Core Web API Basic App

I searched online for how to make a web API in ASP.Net Core 3, but only found one small tutorial. Based off that I wrote the following code but I was wondering if I missed any best practices. Are ...
0
votes
0answers
21 views

Create a template literal tag to remove whitespace from a string

I'm just getting into functional programming (as in, just started reading the book) and as practice I'm trying to refactor a past answer I wrote to fit in line with the functional style. The ...
1
vote
1answer
218 views

Create a csv of file attributes recursively from a directory parameter in PowerShell

I'm a bit new to PowerShell (version 5) and was wondering if there are any improvements I could make to the following script. Any suggestions for style, code, etc. are all welcome. The script creates ...
2
votes
1answer
42 views

HTML & CSS Minifier

I am new to Javascript and Node.js but wanted to create a minifier in order to minify and escape double quotes in the HTML file. Could you let me know what I could improve in the code and how I can ...
2
votes
0answers
37 views

Sampling and Reconstructing a signal in Julia

I am a newcomer to the Julia world, so I started trying to implement a very simple program: Sample a signal Reconstruct it (various ways, just rectangular for now) Plot it Everything is fine and '...
6
votes
1answer
104 views

Python3 OOP Tic-Tac-Toe

I'm studying Object-oriented Programming and decided to apply some things doing an Object-oriented Tic-Tac-Toe. I wanted to know if you have some hints of what to improve and why! ...
3
votes
0answers
51 views

Console Snake Game

I am beginning to learn rust and I created this snake game for practice. I am looking for some feedback on my code. main.rs ...
2
votes
0answers
32 views

Spiral printing elements of a matrix

As I'm learning elixir, I wrote some code for printing elements in the spiral of a matrix(2D array). I was wondering if there is any room for improvements with regards to its performance or ...
1
vote
2answers
91 views

github page/ DHH Score Challenge in ruby

I wrote the following code which when executed prints the score of https://github.com/dhh. ...
2
votes
1answer
86 views

First attempt at making linkedlist in c

I started learning c and wanted to challenge myself by making a linked list. I am stil new to the concept of pointers and pointers to pointers, so there might be something in my code that I could have ...
11
votes
2answers
1k views

Implementation of the Jacobi Symbol in C

I am new to C programming and wrote the following algorithm for the calculation of the Jacobi Symbol. Though there are some faster versions of this algorithm available I am only looking for some ...
2
votes
1answer
67 views

Fetching configuration or default value

I have two code snippets, doing exactly the same thing and both get the job done: use defaults use from config Which is cleaner to use in golang and why? first option: ...
3
votes
1answer
132 views

A simple TCP command executer

In https://github.com/pc-magas/tcp_command as an attempt to learn C++ I made a simplistic TCP server in GNU/Linux that will receives simple "commands" in ASCII form. Each command ends with '\n' and a ...
2
votes
2answers
62 views

Simple calculator in Object-oriented JavaScript

There is a simple form which takes two numbers num1, num2 and an operation op. After ...
10
votes
1answer
305 views

Credit card validation in C

I am relatively new to C programming and I am currently working through the CS50 EDX course. The problem I have solved below is for week 1 (credit). Any suggestions on how to improve this code to ...
4
votes
2answers
204 views

Object-oriented design implementation of an Elevator

I am a newbie when it comes to Object Oriented Programming and I have read a lot of online articles and lessons so I want to try it out on my own. I've written a console app in C# and tried ...
6
votes
0answers
59 views

Console arkanoid in C

On an Internet forum a person came with their homework, to write Arkanoid in a console - it seemed they wanted someone to do their homework for them so I did not respond. However, I found the task ...
6
votes
1answer
61 views

Max function with variable number of arguments

I find it irritating that in standard C++ I can't do std::max(a, b) = x when it's possible and that it can't handle more than 2 arguments. For the second concern I ...