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
136
votes
17answers
16k 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 ...
111
votes
3answers
11k views

Down with FizzBuzz… LOL

This post is the result of reading through and following the LOLCODE Specification 1.2 ("smoking the manual", right?), and writing and executing my code on compileonline.com. My "hello world" was ...
109
votes
6answers
22k views

Basic Pokedex in C++

I recently started learning C++ about a week ago, and I made a bit of progress. In honor of Pokemon Go releasing, I decided to make a Pokedex with the original 151 Pokemon. So far I have 120 or so of ...
105
votes
6answers
14k views

How clean is my snow?

I just wrote a snow animation in Python. I think this is fairly clean but I have a few things that I don't like. ...
77
votes
7answers
150k views

Convert object array to hash map using lodash

The use case is to convert an array of objects into a hash map where one property is the key and the other property is the value. Common case of using this is converting a "link" object in a ...
64
votes
3answers
16k views

Monopoly simulator

I was advised by a Reddit user to get my code reviewed on this site. The complete code is on GitHub. ...
47
votes
1answer
2k views

Connect Four AI (Minimax) in Clojure

I wrote a Connect Four game including a AI in Clojure and since I'm rather new to Clojure, some review would be highly appreciated. It can include everything, coding style, simplifications, etc. But ...
42
votes
1answer
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, ...
39
votes
2answers
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 ...
38
votes
4answers
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 ...
38
votes
2answers
399k 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? ...
37
votes
4answers
30k views

Swift 1.2 Singleton Implementation

I am pretty new to Swift, as a solo developer I was wondering if somebody could pass comments on the singleton implementation below. The code does work, but being new to Swift and knowing that there ...
36
votes
5answers
13k views

Event scheduler in C

One of my university assignments asked us to create a program using struct in order to create a simple event scheduler. This program is for a single day only, not ...
36
votes
2answers
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 ...
36
votes
5answers
3k views

Sorting strings by length - functional Python

I'm trying to port this little F# snippet while staying pythonic: ...
35
votes
8answers
4k views

Immutable objects in Java

I just finished studying immutable objects and their advantages so I thought I'd create one of my own. Here is my employee class that extends a person class. It is not mutable since I have getters to ...
35
votes
2answers
5k views

A new approach to multithreading in Excel

Intro Multithreading tools exist in Excel - often to run macros in multiple instances of Excel, or to convert macros to vbscripts that can run independently. However I've often come across projects ...
34
votes
9answers
7k views

Solving the Lazy Hobo Riddle

I would like help in optimizing this calculation, which is from the Lazy Hobo Riddle: There once were 4 hoboes travelling across the country. During their journey, they ran short on funds, so ...
33
votes
5answers
147k views

Implement a Shape abstract class

To learn more about OOP, @nhgrif challenged me to implement a Shape abstract class (more details in code remarks below. Here is how I did it. Any and all advice appreciated! Shape.java ...
32
votes
7answers
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 ...
31
votes
7answers
8k views

Checking if a number is divisible by 9

I tried to develop a new way to check if a number is divisible by 9. I have written my code and it is working fine. I'm not allowed to use *,...
31
votes
4answers
3k views

When “How To Ask” is too subtle

This is the first JavaScript code I've ever written, alert("hello, world!"); aside. This site is closing quite a lot of questions because people won't read the ...
31
votes
4answers
1k views

Standardly deviated Fibonacci

I'm new to C++ (about 4 weeks with no prior programming experience in other languages) and am writing a program that's supposed to do the following: Define an array of 100 sequential numbers of type <...
30
votes
3answers
3k views

“Compliment giver” mini-program

I'm fairly new to programming and I decided to make a small C# console program for practice. The program asks for user input and gives a random "compliment", it also has a small chance to give a bonus ...
29
votes
4answers
3k views

Snowfall in HTML

I am a beginner and I have made Snowfall in HTML for my mom. I'm pretty sure it will not look that awesome to any developer out there, but hey, that's why I've posted it. I'd like a general review of ...
29
votes
4answers
10k views

Beginner object-oriented text-based RPG

I'm in the process of writing a text-based RPG in Java using object-oriented programming. I'm fairly new to programming and currently learning through CodeHS and coding this within their sandbox, any ...
29
votes
2answers
3k views

A grid and a menu walked into a program

A program that creates a grid 10x10 and assigns a random number in each tile. It then asks you if you want to: create a new grid view the current one count how many of each number there are in the ...
28
votes
4answers
5k views

I can has(kell) cheezburger?

Edit 13 June: I have made a new and improved version here. Original Question This is a very rudimentary lolcats translator (it only works on the phrase "Can I have a cheeseburger") in Haskell. This ...
28
votes
8answers
4k views

Project Euler Problem 45

As a self-teaching Python beginner for almost 4 months, I have mostly been doing online challenges including Project Euler problems. Problem 45 asks: Triangle, pentagonal, and hexagonal numbers ...
28
votes
6answers
21k views

“Guess a number” game

I began the journey to be a self-taught programmer about a month ago and my biggest fear about teaching myself is developing bad habits and not realizing it. I'm looking for criticism on this "Guess ...
28
votes
3answers
2k views

FizzBuzz implementation using the ternary operator

This is my first time writing JAVA, and I'm trying to start off on the right track. Using my C++ knowledge, I was able to understand the syntax for the ternary operator, but I'm not sure how it ...
27
votes
7answers
26k views

Basic OOP Poker - Deck, Cards and Hands

I decided it would be interesting to simulate a game of Poker. Baby steps at the moment, and eventually I'll attempt to turn it into a GUI. The code I have so far is very basic such as populating a ...
27
votes
3answers
5k views

Message decoder

I've built a C decoder program. The length of an encoded message will be given and the message itself in the following line. All the characters of the message will be in uppercase letters. The task is ...
27
votes
9answers
10k views

Generate a list of 10,000 numbers in random order

I am in the middle of an interview process with a company I am very excited about. The position is for a Junior Developer for C# applications. I have a year of experience at my current position as ...
27
votes
4answers
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 ...
27
votes
2answers
22k views

Password checker in Python

Using Python 2.7.12 I wrote a simple little script, psk_validate.py, that prompts the user for a potential password and checks if it has upper and lower-case ...
27
votes
2answers
2k views

Calculate amount of mugs StackExchange should give away so I'll receive one

Description Calculate how many mugs StackExchange should give away(for graduation) to top reputed users on codereview.stackexchange.com so I'll also receive one. (output is divisible by 50). Code <...
26
votes
4answers
11k views

Café in C++ program

I want to build a cafe in C++. I want the user to answer each question with a yes or no. If they answer yes or no, I want to display their total price. ...
26
votes
8answers
9k views

Basic Java library to hold books

For my education, I have written this basic library in Java. Maybe someone can see something that I can do better, as I'm just beginning with Java and I'm hungry to learn more. ...
26
votes
9answers
112k views

Asks the user to input 10 integers, and then prints the largest odd number

I have written a piece of python code in response to the following question and I need to know if it can be "tidied up" in any way. I am a beginner programmer and am starting a bachelor of computer ...
25
votes
5answers
4k views

Fishing simulator

I'm new to Python, for a school project I created a "fishing simulator". Basically, it is a use of random. I know that my code is repetitive towards the end, but I don't know how to simplify it. <...
25
votes
4answers
5k views

If she floats then she is not a witch like we thought

Continuing my C++ saga, this is the third project for my CS1 class: Buoyancy is the ability of an object to float. Archimedes' principle states that the buoyant force is equal to the weight of ...
25
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 ...
25
votes
6answers
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 ...
25
votes
3answers
2k views

WebTorrent player

I have been working with HTML5 and CSS3 for a long time now, but have avoided JavaScript because of my belief that it's most frequently used unnecessarily while having a tendency to be poorly written. ...
25
votes
2answers
397 views

Plot daily time spent on codereview.stackexchange.com

This draws an xyplot from csv data obtained from RescueTime API for activity time for "http://codereview.stackexchange.com". <...
25
votes
2answers
2k views

Euler's Totient Function in x86 assembly (MASM)

My task was to implement Euler's totient function, and I'm looking for any and all criticism. ...
24
votes
6answers
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 ...
24
votes
5answers
5k views

Comma Code (project from “Automate the Boring Stuff with Python”)

I'm currently learning Python using the book mentioned in the title. I just finished reading about lists, tuples, functions and methods, and one of the projects following this chapter is to create a ...
24
votes
3answers
2k views

Adding a course to one of 8 periods

I have this rather ghastly if statement and I'm sure there is a way to condense it, but I don't really know how. I was told a ...