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
7
votes
3answers
823 views

Math Calculator in C

This code below, was for my school project, first year. I am new to C programming, before which I learned Python. Hence, I do not know the tweaks and tricks in C language. What are the various ways to ...
4
votes
1answer
59 views

Caesar Cipher [The Odin Project-Javascript Exercise]

Very new to coding, so please don't bully me. Implement the legendary caesar cipher: In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, ...
2
votes
1answer
52 views

Beginner Hangman Game

Hey guys I am trying to improve my Python Programming skills, I tried to build a hangman code. I know it is not perfect but I works. I am looking for some hints or advice to improve this script. <...
2
votes
1answer
53 views

Faster way to check if number has factor of different primes than given list of primes

im trying to get the factor prime number(s) for given number if its different than the primes that i have in a list. The number have to: dividable with any of the primes in the list should not have ...
1
vote
1answer
42 views

Basic tic-tac-toe matrix in Haskell

Beginner functional programmer... (but not beginner programmer) Currently, I have the following code: ...
3
votes
2answers
54 views

Web Scraping Newspapers

Wrote a python script to web scrape multiple newspapers and arrange them in their respective directories. I have completed the course Using Python to access web data on coursera and I tried to ...
1
vote
3answers
156 views

First Code, But I Feel It Is So Ugly, Can You Explain Why?

Question:- Why is this code so ugly ?? This is my first code, it is working fine, but I feel it doesn't looks as standard code … I am still studying java through youtube, as I have just completed two ...
2
votes
1answer
42 views

Basic Beginner Unity Project with a bouncing corona

At first I wasn't really proud of this one, but then I decided that I need to know what's so bad about it? Why does it feel unsatisfying? How can I do it better? So yeah here's a unity project that ...
2
votes
2answers
106 views

Verify credit card number with Luhn's algorithm

...
1
vote
0answers
38 views

Tic Tac Toe game logic

I've implemented tic-tac-toe in TypeScript before; now I'm porting it to Elixir. As before, this is pure game logic, no UI involved. I'm very new to Elixir, so any suggestions are appreciated. The ...
3
votes
1answer
95 views

Simple todo list in Javascript [closed]

I'm looking for someone to tell me how I could refactor/change/improve my JS, I'm still learning and really want my code to be the best it can be for when it comes time for me getting a job in the ...
3
votes
3answers
129 views
1
vote
2answers
95 views

Protein Translation - Translate RNA sequences into proteins

RNA can be broken into three nucleotide sequences called codons, and then translated to a polypeptide like so: RNA: "AUGUUUUCU" => translates to Codons: <...
3
votes
2answers
184 views

Caesar-Cipher Implementation

Background I am a total beginner in Haskell, so after reading the Starting out-chapter of "Learn you a Haskell", I wanted to create my first program that actually does something. I decided to do the ...
1
vote
1answer
103 views

arithmetic with numbers and letters

I've started learning JavaScript last week. Today I ran into a JS exercise available at this link codewars exercise and decided to give it a try. I've used very basic JS because I know only a small ...
10
votes
3answers
844 views

Roast my C# birthday code

So this is a pretty simple code, I think it was? It asks for the user's birth day and month, and gives it back with the day a discount reminder email will be sent (the day before their birthday) Now ...
2
votes
2answers
47 views

Simple c# for-loop program for calculating theoretical earnings from investing (beginner)

I am new to programming and "programming thinking" as well. I have created a simple program that calculates future earnings from investing. It seems to be working correctly, but I want to be sure and ...
2
votes
2answers
91 views

List Filtering Code

I am developing applications for android. In my application, the user can add information about his weight and watch the progress of weight change. I decided to add filtering of the elements according ...
2
votes
0answers
45 views

Basic Makefile to create .expected files

I wrote a simple Makefile to build .expected files and compare them. It works as expected and I was wondering it would be great if I could get some feedback. More ...
3
votes
1answer
70 views

Springer book downloader in Kotlin

I'm starting with Kotlin recently and am hoping to improve. I wrote a small app to parse the list of free Springer books and download the books into your chosen local folder. Comments around obvious ...
1
vote
0answers
40 views

One of my first Bash scripts - checking for best practice and error handling

I have a Bash script that resides on Remote Server A and transfers files from Remote Server 1 to Remote Server 2. Remote Server 2 is a Dropbox folder so in this script, I call another script (that's ...
8
votes
4answers
2k views

Simple Stack implementation in C++

I've recently started teaching myself basic C++ and decided to implement a simple stack with pointers. ...
1
vote
1answer
42 views

Large-scale pairwise similarity calculations of vectors

I am a C++ beginner and am working on a bit of code which calculates the pairwise cosine similarities between vectors. The vectors are TF-IDF vectors and the similarities are used to determine ...
0
votes
2answers
129 views

PHP - How can I refactor this store function (which handles different database operation for user types) in order to reduce duplication?

I'm simply using Slim PHP MVC framework in my API project. PDO::FETCH_ASSOC is used in the database calls. So no data objects. The router handles requests and pass to the controller. controller calls ...
5
votes
2answers
65 views

Number Base Conversion Problem Generator

A program that generates questions to train your number base conversion skills. This program is made to ask questions about octet, binary and hexadecimal. No other bases. It first asks a series of ...
3
votes
0answers
59 views

C program to sort files based on information within

I have written a C program to sort files (on Windows) into dynamically created subfolders based on information found in their data headers. I am a newb at C, especially memory management. The code ...
0
votes
1answer
70 views

C++ Beginner. Project Euler 14: Longest Collatz sequence under one million [closed]

Hello, I'm a C++ beginner, learning the language while trying to code Project Euler problems. I'm having trouble coding problem 14, which I'll copy here: The following iterative sequence is defined ...
3
votes
0answers
53 views

kenken solver, python

I have written a series of functions to solve kenkens. The general strategy is to eliminate possibilities until only one remains for each cell. This first function eliminates all possibilities that ...
5
votes
1answer
145 views

Multiplayer card game “Hearts” with OOP in Python

To practice Object-Oriented Python and learning how to write tests, I found an exercise and solved it as below(all classes are put in one block of code to make the question a little bit more readable):...
1
vote
0answers
44 views

Finite State Machine

I'm beginner in rust. I would ask code review of my finite state machine. Main feature : static (event, state and transition) support pushdown It is the first step, second step is to use macro ...
2
votes
1answer
47 views

Small script to update an external HDD every night at 23 in the background

This is a small script to update an external HDD, every night at 23:00, in the background. Can you tell me how I can improve it? What section in this code can be written as a class? Maybe the ...
4
votes
3answers
317 views

Crawl a website and download records

I am new to Python. Amateur, enthusiast and learner. I have developed code which visits one particular website. Crawls through it to reach a certain repository, downloads the records from there to the ...
3
votes
1answer
55 views

Bubble sort visualization: JavaScript

I'm very new to the JavaScript, and hence I would like to get a feel on the language by writing some of the basic programs. One of those is the following visualization of the Bubble Sort: Code: <...
-3
votes
1answer
60 views

how to make 'for loop' short in C? [closed]

I made some code about solar system stimulation in C. It is working, but it looks too long. So, Are there some ways to shorten my code? Also this website told me your code is too full to upload this....
3
votes
2answers
60 views

SPOJ - ADDREV (Adding Reversed Numbers)

https://www.spoj.com/problems/ADDREV/ My answer to ADDREV challenge on SPOJ (link to the problem given above), written in JAVA, was accepted. However, the timing was 1.23 and memory used was 82M, ...
0
votes
1answer
59 views

Run a timer while waiting for user input [closed]

I am making a C# console maths test where the user answers maths questions. I am trying to add a timer to the test, I have managed to make a timer but when I run my code it becomes a mess! Here is ...
1
vote
0answers
28 views

Slow updates with updating rows in database with preparedStatement [closed]

I have been shifting all of my SQL queries to prepared statements in the past few weeks and all of the INSERT statements run extremely fast, however, UPDATE is taking an inordinate amount of time. At ...
1
vote
1answer
79 views

connection to mongodb in golang

I am building an API server in golang with mongodb. My main.go file looks something like this: ...
5
votes
1answer
143 views

Rock, paper, scissors in Python 3

I am new to Python (and to programming). I tried to implement this game in Python and took some help from the code reviews of similar questions posted on this website. ...
6
votes
2answers
106 views

Rust Novice's Tic Tac Toe

Introduction I am a Rust novice. So far, I have finished reading the first 15 chapters of The Rust Programming Language (a.k.a. the book). Here's my first big Rust project — Tic Tac Toe. ...
7
votes
2answers
266 views

Rust CSV Sorter Code Lookover

I am new to Rust, began learning a few days ago. I have written a simple csv_sorter based off of one I had written for a class previously. Everything runs fine and I have gotten my expected results. I ...
6
votes
1answer
92 views

Tower of Hanoi without recursion

Hi I am pretty new to programming and I would like you to give me some feedback about my code, how does it look, what could be better. Thank you. ...
4
votes
1answer
67 views

HTTPS proxy server in Rust using the CONNECT protocol

I'm a Rust newbie. As a pet project, I decided to implement a simple multi-threaded HTTPS proxy server in Rust which uses the CONNECT protocol. I have tested the code below using my browser. ...
2
votes
1answer
51 views

Buying bunnies, eggs and elections with tax and a discount

I have a small problem with the code below. Although it executes the task perfectly, It's supposed to be more "short" and compact according to the assignment feedback. I was wondering if someone can ...
3
votes
2answers
134 views

Console-based Guess the Number

I started learning Python and wrote my first program. This is a console game based on guessing the number. Can you take a look and tell me if I'm doing it right or give me any advice? Here is the code:...
2
votes
1answer
77 views

Calculate your total happiness, which depends on the integers in the given sets [closed]

I am a beginner in programming. And I am learning python as my first language. I went on to do some challenges on HackerRank and stumbled upon this problem. The problem goes like this: There is an ...
3
votes
3answers
144 views

Robot Name - Exercise

Robot Name Manage robot factory settings. When robots come off the factory floor, they have no name. The first time you boot them up, a random name is generated in the format of two ...
2
votes
2answers
34 views

Newton Raphson and polynomials in C

I have the following code, that defines: A polynomial struct with some useful functions. The newton Raphson algorithm for polynomials. and calculates sqrt(2). ...
1
vote
2answers
37 views

Copying List Elements To Another List And Changing Them

I'm a beginner python programmer..I recently started reading a python book called: "Python Crash Course, 2nd Edition: A Hands-On, Project-Based Introduction to Programming"...And I found an ...