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.
7,541
questions
26
votes
5
answers
9k
views
Rock Paper Scissors. My first C++ program. Please judge harshly
I am new and only know the basics of C++. Any help will be appreciated. I want to know how to make my code less lines, more efficient, proper practice and play better.
...
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 ...
26
votes
4
answers
4k
views
Calculate distance using speed of sound
I've been working on learning Java and this was a challenge as part of a chapter on data types:
Create a program that computes how far away, in feet, a listener is
from a sound. Sound travels ...
26
votes
5
answers
29k
views
Non-AI Tic-Tac-Toe program
I'm fairly new to C++ and to game programming itself. Today I decided to build a multiplayer Tic Tac Toe program using only elemental C++ syntax/data structures. I also implemented a text interface ...
26
votes
3
answers
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 ...
26
votes
2
answers
3k
views
Android Flashlight app
This is my first project, a Flashlight application for Android-based devices:
...
26
votes
2
answers
2k
views
99 bottles of beer on the wall
I'm super new to this so please be nice. I tried solving Chris Pine's challenge to print the entire lyrics to 99 bottles of beer on the wall. This seems to work, but is there a better/more efficient ...
26
votes
2
answers
2k
views
Spin-the-bottle-like game
I've started coding about 3 weeks ago, just for fun and maybe practical uses later. My GF dared me to make a PGM that would replace this dice game where you roll two dice, one with body parts and one ...
26
votes
3
answers
125k
views
Brute force password-cracker
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 ...
26
votes
3
answers
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
5
answers
3k
views
Hello World, Phrancis
I just yesterday started learning some Java. I wrote this piece and got some help from @Simon André Forsberg to refine it some. I added a few things since. It's super-simple but I just want to make ...
25
votes
8
answers
5k
views
Feedback on a programming practice problem in C
This is a programming practice that our teacher gave us, and I would appreciate if someone can look over my program and tell me if I did a good job.
Basically, the context is I joined a company and ...
25
votes
8
answers
32k
views
Simple C# console Tic Tac Toe program
I've been teaching myself how to program for a little bit now, and was hoping to get some critique on my most recent project, creating a Tic Tac Toe program! I'm hoping for people to point out some of ...
25
votes
5
answers
25k
views
Simple random number generator
I have been wanting to learn programming for some time now and decided to really give it a shot today. I have edited and read lots of things in Java to fix small issues but never written from scratch. ...
25
votes
4
answers
3k
views
Project Euler #1 Sum of all the multiples of 3 or 5 below 1000
If we list all the natural numbers below 10 that are multiples of 3 or
5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
My ...
25
votes
2
answers
1k
views
The grid looked at the menu and said "Something with class, please"
This is a follow up on my previous question:
A grid and a menu walked into a program
I integrated classes into the mix.
The program now asks how big you want the grid to be.
...
25
votes
2
answers
2k
views
First real-world F# application - how "good"/idiomatic is it? (long!)
After reading/watching various introductions and blog posts and some code here and there, doing a bit of the Try F# tutorial and starting to read "Real World Functional Programming", I felt I should ...
25
votes
3
answers
888
views
Music info model
I'm learning Django as I go. I know this model is missing user authentication, registration, comments/comment threading, and voting. But this is my starting code for my model. What are some of the ...
25
votes
1
answer
3k
views
4-stage pipelined RV32I CPU in Verilog
This is a simple 4-stage pipeline that partially implements the RV32I ISA.
All instructions are supported, except jalr, those relating to memory (...
24
votes
7
answers
10k
views
FizzBuzz in Javascript
I'm sure everyone here knows what FizzBuzz is. I would like constructive criticism for my solution.
I'm a beginner to programming as a whole and this isn't my first solution, but it's what I think is ...
24
votes
9
answers
3k
views
24
votes
4
answers
8k
views
Prime number generator in C++
I am slowly learning C and C++, and decided after a few lessons to dive in myself without any help. I developed this prime number generator. It seems fast, but I'm wondering if I'm following the best ...
24
votes
6
answers
5k
views
Tic-Tac-Toe program in about 250 lines
I'm new to C programming and I recently challenged myself to writing a Tic-Tac-Toe program. I found that my code becomes lengthy very quickly with so many if ...
24
votes
5
answers
8k
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
3
answers
5k
views
A simple mastermind clone
I made a simple Mastermind clone and I'd just like some tips on what I could do better/different solutions for what I have already coded. If you're wondering what mastermind is, there are, for the ...
24
votes
4
answers
4k
views
Converting the weight of a potato into a letter grade
I've just started learning C# using Rob Miles' C# Programming Yellow Book and some related lab exercises from his website. I did one of them and produced a solution that works. In Miles' book, he says ...
24
votes
4
answers
32k
views
Simple Age Calculator
I have written an age calculator that takes a birthDate as input.
I'd like a general review of this. I'm especially concerned about the ...
24
votes
3
answers
12k
views
Snake++ game (in C++ with SDL)
Yes, It's called Snake++. I build it to learn C++.
What features and techniques can be improved? I used SDL for some basic rendering, but my concern is more about ...
24
votes
4
answers
3k
views
Perl CGI script to serve a PDF file
In a different post I showed the following Perl CGI script. Someone in the comments said that
"You're using a lot of very unperlish syntax, and I'd like to give you some feedback".
So, here it ...
24
votes
5
answers
3k
views
Word Inverter in C
I've just made this program and I want to know how to improve it. It just receives a word and prints it backwards. Sequences of numbers are also accepted, but not white spaces (that's why I used scanf)...
24
votes
6
answers
24k
views
Beginner number guessing game in Java
I am a first year CS student. We are currently learning Java and my latest assignment was to create this random number game. I am hoping to get some feedback on code style etc so that I know what not ...
24
votes
4
answers
2k
views
My first calculator
I've just wrote my first code, which is basically a calculator. Please rate it and suggest improvements (keeping in mind that I'm a beginner).
...
24
votes
2
answers
22k
views
Texas Hold'em in Java
I have been a programmer for 12 years, mainly ERP software and C development and
am looking to make a career/specialty change to Java. I've read it countless
times if you want to learn a new language ...
24
votes
5
answers
3k
views
The Term-inator: Pi edition
The fourth project, continuing my C++ saga with terrible post names. :P
An approximate value of pi can be calculated using the series given
below:
$$ \pi \...
24
votes
2
answers
7k
views
Zork-like text adventure w/ Python
I've been using Python for around 3 months and decided to make a simple text adventure game for fun and to exercise a lot of ideas I've been learning about. I've just recently learned about classes ...
24
votes
1
answer
663
views
Wanted a cat. Got lolcat
Wanna learn Rust? Ya rly!
I can haz FizzBuzz? No wai!
Gimme /bin/cat then. But rustc say LOL! Must handle teh err0rz!
Now iz ...
24
votes
4
answers
11k
views
Simple Turing machine simulator
Yesterday I got a sudden urge to go from writing Python to something, well, more UNIX core-ish. I read some examples on here and decided I might as well put some of that stuff to use to test something ...
24
votes
3
answers
585
views
Stack Exchange User Activity Score
About
This is a SEDE query which will calculate your activity and participation on a site. It's geared for Programming Puzzles & Code Golf where questions are values more, but the values can be ...
23
votes
11
answers
11k
views
Find nth Fibonacci Number, using iteration and recursion
I'm a beginner programmer and I came upon this problem which is to find the nth number in the Fibonacci series.
I used to solve the problem using a for loop; ...
23
votes
6
answers
5k
views
Implementing any_of in C++
I've decided to implement Python's any in C++. I've gone about this using templates to allow multiple types of data to be passed, instead of overloading the ...
23
votes
6
answers
13k
views
Check if a Sudoku board is filled out correctly
The code below takes a filled out Sudoku board of size NxN, with sub-blocks of nxn, and checks if the solution is correct.
main_function takes a board as input. ...
23
votes
3
answers
3k
views
Project Euler #1 in PHP
The code below works & as far as I can tell the result is correct. Would you please review and let me know what I could have done better?
I tried to use variables as much as possible, that way it ...
23
votes
6
answers
15k
views
Validating Yes/No answers in C++
I intend to accept all of the following answers:
y
Y
yes
YES
Yes
plus mixtures, such as yeS, yES, which I didn't intend to accept but it's a consequence of my code
the same applies to No and its ...
23
votes
3
answers
4k
views
Financial website scraper
I wrote the code that would scrape Finviz for tickers and href that attach to the ticker. I tested with multi-page as well as one page. I'm new to Python ...
23
votes
5
answers
4k
views
Simple battle class
I'm new to Java, and this code could likely be squashed down a whole heap. How can I make this code simpler and easier to read?
chance.base is a percentage. If it ...
23
votes
3
answers
3k
views
Isn't this Interest-ing?
This is the fifth project in my CS1 class. It's a bit more drab than my past projects, so my titles are getting worse unfortunately. :(
Write a program that ...
23
votes
5
answers
5k
views
Setting and getting bits in C
I am just starting to get my feet wet with C; and am rather enjoying myself in doing so. This is sort of a follow up to my last question here. I am posting this ordinate to hopefully getting some ...
23
votes
2
answers
4k
views
First prime number larger than given integer
How can I test this C program for "efficiency"? The most interesting usage is that it returns negative output for large enough input, otherwise the behavior is about expected. Will you suggest how to ...
23
votes
5
answers
7k
views
Modelling a Call Center
This is the requirement I have (from the book: Cracking the Coding Interview)
Imagine you have a call center with three levels of employees: fresher, technical lead (TL), and product manager (PM). ...
23
votes
4
answers
2k
views
Monty Hall Simulation
I wrote this code as my first self-directed effort and would appreciate any input on things that I've done seriously wrong. I worry that perhaps I'm over-relying on ...