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
144 votes
17 answers
18k 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 ...
user avatar
  • 2,303
124 votes
3 answers
12k 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 ...
user avatar
116 votes
6 answers
16k 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. ...
user avatar
  • 1,670
114 votes
5 answers
28k 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 ...
user avatar
  • 1,401
89 votes
7 answers
180k 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 ...
user avatar
  • 2,244
71 votes
3 answers
19k views

Monopoly simulator

I was advised by a Reddit user to get my code reviewed on this site. The complete code is on GitHub. ...
user avatar
  • 813
49 votes
1 answer
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 ...
user avatar
  • 631
45 votes
2 answers
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 ...
user avatar
  • 12.7k
45 votes
1 answer
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, ...
user avatar
42 votes
2 answers
468k 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? ...
user avatar
  • 940
40 votes
4 answers
11k views

Brainfuck interpreter written in C

I am a beginner with regards to C; I'm used to using high-level languages (Java, Python, JS, etc) and this is my first project in a lower-level language. I wrote a simple Brainfuck interpreter, given ...
user avatar
  • 501
40 votes
4 answers
6k 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 ...
user avatar
  • 30.7k
39 votes
2 answers
11k 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 ...
user avatar
  • 2,050
38 votes
8 answers
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 ...
user avatar
38 votes
2 answers
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 ...
user avatar
  • 12.7k
38 votes
4 answers
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 ...
user avatar
  • 511
37 votes
5 answers
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 ...
user avatar
37 votes
5 answers
4k views

Sorting strings by length - functional Python

I'm trying to port this little F# snippet while staying pythonic: ...
user avatar
36 votes
9 answers
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 ...
user avatar
36 votes
5 answers
20k 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 ...
user avatar
  • 692
35 votes
5 answers
207k 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 ...
user avatar
  • 20.3k
34 votes
7 answers
10k 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 *,...
user avatar
33 votes
7 answers
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 ...
user avatar
  • 8,438
33 votes
4 answers
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 ...
user avatar
  • 331
32 votes
9 answers
6k views

Simple n-body class in C++

As part of my training, I implemented a n-body class in C++ to simulate gravitational interaction of bodies and to get more familiar with features that C++ offers such as object oriented programming. ...
user avatar
  • 1,003
32 votes
3 answers
6k 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 ...
user avatar
32 votes
8 answers
5k 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 ...
user avatar
32 votes
9 answers
12k 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 ...
user avatar
  • 421
32 votes
4 answers
2k 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 <...
user avatar
32 votes
3 answers
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 ...
user avatar
32 votes
2 answers
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 ...
user avatar
31 votes
4 answers
15k 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 ...
user avatar
  • 433
31 votes
3 answers
3k 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 ...
user avatar
  • 34.7k
30 votes
7 answers
28k 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 ...
user avatar
  • 303
30 votes
4 answers
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 ...
user avatar
30 votes
6 answers
22k 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 ...
user avatar
30 votes
2 answers
36k 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 ...
user avatar
  • 805
29 votes
4 answers
7k 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 ...
user avatar
  • 21.7k
29 votes
2 answers
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 <...
user avatar
28 votes
5 answers
6k 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. <...
user avatar
  • 554
28 votes
9 answers
140k 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 ...
user avatar
28 votes
5 answers
6k 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 ...
user avatar
  • 381
28 votes
4 answers
7k views

My first random password generator

I'm making a simple program that generates a random password of some length with or without special characters, just for the sake of learning the C language. Finally I've got this working very well ...
user avatar
28 votes
3 answers
411 views

"How can I make this SEDE query better?" (bad title finder)

It was suggested on Meta for July 2015 Community Challenge to make a bot that can find questions with bad titles. I wrote this query to help others find examples to help them make write their code. ...
user avatar
  • 20.3k
27 votes
4 answers
15k 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. ...
user avatar
27 votes
8 answers
13k 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. ...
user avatar
  • 315
27 votes
4 answers
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 ...
user avatar
  • 21.7k
27 votes
2 answers
448 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". <...
user avatar
27 votes
2 answers
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. ...
user avatar
  • 509
26 votes
6 answers
3k 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 ...
user avatar
  • 453

1
2 3 4 5
146