# 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.

631 questions
Filter by
Sorted by
Tagged with
15k views

### Random walk on a 2D grid

The program assignment: A drunkard in a grid of streets randomly picks one of four directions and stumbles to the next intersection, then again randomly picks one of four directions, and so on. ...
3k views

### Charmander Brainfuck interpreter in Haskell

I just started learning Haskell and this is my first big project (ie not factorials, fibonacci or graphers). This is kind of a gift for somebody so the language is a bit different. The program works, ...
4k views

### RPSLS Game in C#

I went with what I know and can use well, not what I know and can't figure the syntax out to make it look good. So please enjoy the code and prepare to school me (probably in the basics) in C# ...
1k views

I have all these functions that work together to create functionality on a page. Is the structure of these functions OK? Can I do anything to speed this up or make my code better? I'm not exactly ...
5k views

### Project Euler Problem #4 - Palindromic number

The problem is as follows: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made ...
20k views

### Find the binary gap of a number N

For example, number 9 has binary representation 1001 and contains a binary gap of length 2. The number 529 has binary representation 1000010001 and contains two binary gaps: one of length 4 and one of ...
1k views

### Calculating Luhn-algorithm checksum digit

Today I decided to learn some basic Haskell, and for starters I made a program for calculating the checksum of a Swedish personal identification number. It uses the Luhn-algorithm, aka. ...
125 views

### A Simple Cluster Generator v0.2

[NOTE] This question can be depreciated in favor of version 0.3. This is a code revision of a previous post and works well. Code has been reworked to be far more clear and concise, thanks to ...
2k views

### Efficiency of Project Euler problem 35

The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, ...
281 views

### My included in every script file

Right now I'm finishing my very first web application, and I will buy my first domain name in my life shortly. My project is about a personal website that I'm going to upload every application I ...
134 views

### contact.php file

This is my contact.php file which has only 2 functionalities: Response with the default page if it is requested by the get method Process the message posted by the ...
4k views

### Hello, Brainfuck

It has been bugging me for a while that while I understand how the basics of Brainfuck works, I can't get a firm grasp on the advanced features of the language. So I started to re-evaluate what I know ...
3k views

...
3k views

### Algorithm for Run Length Encoding - String Compression

I attempted a problem from the Cracking the Coding Interview book. The following input: aabcccaaa should give the following output: ...
2k views

### Are there any open vulnerabilities in this mailer script?

I made a PHP mailer script does the basic validation of fields, return errors, else submit if all is good. But it also has a honeypot field that is not required to be filled in (I'm assuming by hiding ...
1k views

### Cheapest hotel finder

Please help me make this code more object oriented. I also want to use a few more classes and separate the input processing code to another class. Question: A hotel chain operating in Goa wishes ...
170 views

### My included in every script file - follow-up -1

In this particular question, I need the reviewers help to judge my understanding to MVC and OOP as it was my biggest problem in my original question a month ago. I included in the question the contact ...
2k views

I'm hoping to get some feedback on how to improve and optimise a program I wrote which takes three values as input (via the terminal) and uses them in the quadratic formula. I'm aware this is mostly ...
866 views

### Selection Sort Algorithm (Python)

Selection Sort The selection sort algorithm sorts a list by finding the minimum element from the right unsorted part of the list and putting it at the left sorted part of the list. The ...
514 views

### Calculating the number of rooms in a 2D house

I stumbled upon this problem on cses.fi (a problem set for the Finnish Olympiad in Informatics. This problem is in finnish so I'll translate it). I'll describe the problem, present the code and think ...
1k views

### Log probe requests of WiFi devices

I developed a program that collects probe requests from WiFi devices. It already works but I think that a programmer can improve it. ...
127 views

### A Simple Cluster Generator v0.3

[NOTE] This question can be depreciated in favor of version 0.31. This is a code revision of a previous post and works well. The purpose of this code is to produce a universe of points, randomly ...
1k views

### Opening a file and printing its contents line by line

Everything that I've read online says that the best way to open a file in python is: ...
2k views

### It'th wabbit theathon

I don't know regex. I want to learn regex, but learning regex just for the sake of regex would be quite boring. So I decided to learn Ruby as well (which so far looks a lot like Python, which I'm ...
3k views

Are there any ways which I could improve and simplify this code? Is my code idiomatic Haskell? Is the use of a lens library to change an element of a two-dimensional array unnecessary? If so, how ...
155 views

### Digitizing paper label system with Python

I'm currently halfway through a Python project, but would like a review before I spend too much more time on this to avoid going too far down a rabbit hole. I had previously wanted to use HTML, CSS, ...
17k views

### Disproving Euler proposition by brute force in C

I wrote a little bit of code to brute force disprove the Euler proposition that states: $$a^4 + b^4 + c^4 = d^4$$ has no solution when $a$, $b$, $c$, $d$ are positive integers. I'm no ...
447k views

### Snake game in C++

This is my version of the Snake game, written in C++. How could it be improved, and what general advice would be useful for future projects? ...
6k views

### Project Euler #7 10001st prime

I decided to start working on the Euler project exercises. I'm doing fine for now but the seventh problem is running quite slow and I can't think of anything to make it work faster. It takes around ...
106k views

I am just coding some classic brute force password cracking program, just to improve myself. I've explained how my program works at the start of the code. Check some of those screenshots to ...
14k views

### TicTacToe logic in Java

I'm currently studying Java by myself. The book I'm using (while very good) lacks feedback (obviously). While trying to write this program, I found myself solving most of the problems I've ...
2k views

### Shell Sort, Insertion Sort, Bubble Sort, Selection Sort Algorithms (Python)

There is a follow-up question available: shell-sort-insertion-sort-bubble-sort-selection-sort-algorithms-python. Selection Sort The selection sort algorithm sorts a list (array) by finding the ...
5k views

### Everyone loves Fibonacci

I was bored and burnt out on more serious projects.... until I saw this Computerphile video on YouTube. Now I'm inspired again. Now I feel like spending some time implementing that recursive algorithm ...
10k views

### Binary Calculator in Java

I'm a beginner in Java and I tried to create a program that will perform basic arithmetic operations on binary numbers. BinaryOperations class: ...
8k views

### Basic user registration code

My first attempt at a user registration code. Login.php defines database log in variables (e.g. Database name, Table name, etc) ...
479 views

### RPSLS is less messy now, but is it clean?

This is a follow up to the following questions: RPSLS Game in C# Ensuring user input is an integer in a range I haven't made my way to DecideWinner() yet, but ...
2k views

### RattleHiss (fizzbuzz in python)

This is an iterative review. The previous iteration can be found here. The next iteration can be found here I've now been programming in python for all of 4 hours. At 70 lines it's rather verbose ...
18k views

### STL Stack Implementation

I implemented std::stack from the STL for deeper understanding of the language and memory since I still am only a beginner. I implemented the stack using a singly ...
1k views

### A wounded Zombie finder, or: how to find the almost dead undead?

The Zombies are on their way to eat our statistics. Fortunately, we have a way to get rid of them: our votes. However, we need to find them first. The /unanswered section is too large and contains ...
3k views

### O PC, why are you so slow?

In order to test some software I've written, I need to write values to a test harness with OLE for Process Control (OPC). The problem is, for a larger range of values I'm generating points for (say ...
2k views

### Countdown program in x86 NASM

I am fairly new to Assembly language programming and, for practice, I gave myself a problem: count down from 10 and right after 1, say "Blast off!". ...
2k views

### Beginnings of a Poker hand classifier part 2

Part 1 - Beginnings of a Poker hand classifier I'm a beginner programmer I've been working on a poker hand classifier to improve my object orientation and programming skills, I've improved and ...
38k views

### Text-based Blackjack game in Python

I am new to programming in Python and wrote a simple Blackjack project. I am looking for experienced peers to provide a high level code review about the overall design patterns and proper usages. The ...
124 views

### A Simple Cluster Generator v0.31

[NOTE] This question can be depreciated in favor of version 0.32. This is a code revision of a previous post and works well. The purpose of this code is to produce a universe of points, randomly ...
2k views

### Summing up distinct elements in steps

My current task is to find a score from an array where the highest/lowest scores have been taken away, and if the highest/lowest occur more than once (ONLY if they occur more than once), one of them ...
6k views

### Is it Friday yet?

This is the first program that I have written in my C++ saga that I actually think is useful. The description for this assignment is kinda long and mundane though: Write a program that inputs a ...
2k views

### Print out table with start/end temperatures and step size

I am trying to learn C++ by myself. I looked up a sample question after going through some text. Though I would like someone to review my code. I'm basically asking you to break it to show some flaws ...
4k views

I was tasked by my teacher with making a linked list by myself, so I could understand the concept better. Here is the MyLinkedList class: ...