Add this tag to your question to indicate that you are new to the language of your code. This will often be taken in to consideration by reviewers when assessing your code.

learn more… | top users | synonyms

5
votes
2answers
39 views

Compose valid subtractions using all digits from a set

I have created a brainteaser, which I called the "impossible problem" (see this video I made). The aim is to create a valid 3-digit subtraction which uses every digit from 1 to 9 once. Here is an ...
2
votes
0answers
31 views

Basic Python Tic-Tac-Toe Game

I have just decided to get into programming as a hobby (and possibly a job in the distant future). After learning the basics of Python, I made Tic-Tac-Toe to apply what I've learned. I would ...
16
votes
4answers
1k views

Event scheduler in C

Intro 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 ...
3
votes
2answers
41 views

Count calls and update table accordingly

This is literally the first time I've ever used JavaScript so I know it's really bad and how to improve it just not how to implement it. Basically, I need to loop through all the elements instead of ...
3
votes
1answer
31 views

Learning nested for loops in Python with Pig Latin translator

I've been trying to learn Python for a bit now. I've taken a few courses, but I've found that I've been going about them wrong and had allowed them to "hold my hand" too much. I'm trying to build ...
3
votes
3answers
59 views

Scrape HTML into separate files for each chapter

I have written a program to read HTML file, find particular text, write text from that particular text to next particular text in a newly opened file. I am interested in code review. I am very new ...
2
votes
1answer
26 views

Optimally allocating a resource with time-varying demand and cost

I'm working on the following DP which finds the optimal way to allocate a resource. At each time step I can either allocate (0.2 resources) at cost C or not in which case the storage is reduced by the ...
0
votes
1answer
23 views

Compressing a file using zip or gzip

Write a Compress class defines two static methods, gzipFile(), which compresses a file using GZIP compression format, and zipDirectory(), which compresses the files (but not directories) in a ...
2
votes
3answers
79 views

Javascript Ownership Cost Calculator

Javascript newbie here. I built a total cost of ownership calculator to calculate the cost of a business over 5 years. It has a lot of repeating script and prob way more congested than it needs to be ...
6
votes
2answers
80 views

Beginner's Calculator code

I am trying to learn AngularJS as a start to my revival of learning, I think that I am getting the hang of it so far, but would like to see what I can do differently with some super simple ...
2
votes
1answer
42 views

Simple console directive, revised using provider

I recently created my first directive based on jQuery plugin and I asked for review here: Angular console like window - first directive I've edited my directive so now instead of ...
3
votes
1answer
74 views

“Destroy the Asteroid” Game

I made this game for my computer science class. Here is my professor 's requirements: Write a Processing program that draws a triangle in the middle of the window. Rotate the triangle when the left ...
4
votes
2answers
53 views

Filtering triangles

I'm playing with Haskell's list comprehensions, tuples, and foldr. The exercise I've given myself is to find all triangles with a perimeter of length 26 in the set ...
4
votes
1answer
54 views

Calendar made with tkinter

I made a calendar that displays text documents according to month. Thankfully it works, although I could really use some help how to make it more better looking and efficient. I'm new to programming ...
-1
votes
0answers
34 views

Recurrence in Math [closed]

I am still learn about algorithms, i have a homework. I must make an output Sum of : 1/2 + 1/4 + 1/6 - 1/8 + 1/10 + 1/12 Result : 0.975 But output of my program Sum of : 1/2 + 1/4 + 1/6-1/8 + ...
0
votes
1answer
39 views

Caesar Cipher Test

I've been studying computer science for around two school terms now. Currently, I'm making a Caesar Cipher program as a base for my examination, this is so that I can use the 15 hours to either add, ...
4
votes
2answers
78 views

First try Caesar Cipher

I've recently begun to teach myself to code. One simple project that I wanted to do was create a Caesar cipher that works well. Now that I feel I've accomplished that task, I'd like to know how I'm ...
5
votes
1answer
43 views

Dice roll program with statistics

This is a working program I made to roll dice a specified number of times, show how many times each number (2-12) occurred, and the percentage of the total rolls that each number got. I'm trying to ...
1
vote
1answer
33 views

`Maybe` handling in Matrix manipulation in Elm

I'd like to learn if my rewrite is worse than the original, less clear or less "idiomatic". I've found this code that handles updating two dimensional matrixes in Elm: ...
-6
votes
0answers
22 views

R: Function with two inputs telling whether the sum is a cube number [closed]

So I want to do this: Write a function with two inputs \$X\$ and \$Y\$ that can tell you whether the sum of \$X^3\$ and \$Y^3\$ is a cube number so long as that sum is under 500 000 000. My code is ...
1
vote
2answers
177 views

Print every character in a line if it's greater than 80 characters

How can I improve this program? ...
3
votes
2answers
52 views

PHP form validation for name, email, and Twitter handle

Given the following input values from a form, create a method or methods to validate the input based on their requirements. Throw an exception if any data is invalid. 1.1 ...
5
votes
1answer
83 views

Easy Game of Life project

I've developed easy Game of Life project. I'd highly appreciate any feedback and possibilities to improve my code, both in efficiency and style. It works on list and it's terminal program. ICell.java ...
0
votes
0answers
15 views

Writing simple base code for a program that keeps track of my work hours and pay in C [migrated]

When I compile my code it says that everything checks out but when I run it nothing happens. The program just runs until I kill the terminal. ...
5
votes
2answers
79 views

Python simple battleship game

I'm relatively new to Python, I decided to make a simple battleship game. Is there anything I should do to make it shorter, or in practice, "better"? ...
-4
votes
0answers
10 views

Scala spark add new column rdd containing matching values [duplicate]

I am a beginner in spark Scala . Given rdd1 and rdd2 ...
3
votes
2answers
92 views

Tail recursive FizzBuzz in Common Lisp

I solved FizzBuzz using tail recursion. Is it efficient enough? ...
0
votes
0answers
28 views

Remove IE8 compatiblity in HTML

I wrote Angular code and I know it's not optimal (I'm a new developer in Angular). The problem is that I just followed some web tutorial some I don't understand all what I wrote in my code. By the ...
-3
votes
1answer
68 views

Four-function calculator with a text menu

This code works but I don't know if I am doing this correctly. I want to have a do-while loop for the menu and app. How could I ...
6
votes
1answer
34 views

Aligning out-of-sync subtitles

This is my 2nd program I wrote on my own, a pretty simple program consisting of two functions (those functions are not combined in any way yet though). The first function moves the display times of ...
3
votes
2answers
61 views

Parse Numerals from a String in Golang

I recently tried my hand at writing Go code for a project I'm working on. In order to help myself get a better grasp I decided to write a simple yet somewhat practical program for parsing numeral ...
3
votes
1answer
36 views

Bash script to determine a distro, update, upgrade and install the apps I use

This is my first bash script. I am trying to learn scripting and needed an idea. This is the first idea I came up with. When I used to distro hop I had to reinstall everything. This helped me out once ...
-2
votes
1answer
51 views

Creating forms using angular

I am a newly developer in angular. I want to do some homework to create forms with Angular. I spent nearly a week to do it, but my teacher was not really satisfied about it. I tried to follow some web ...
10
votes
3answers
149 views

Pokemon stats calculator

I have a simple working (so it's not a hypothetical stub) framework for calculating Pokemon stats that will later be incorporated in a game. It uses the LCRNG from the first game in order to be as ...
2
votes
1answer
57 views

Print Trace Debugger

See my Scala print trace debugger. This project is used for lightweight debugging sort of like the Haskell Debug.Trace module. The README, the documentation, and the test cases need work. To test it ...
8
votes
3answers
467 views

“Magic Squares” assignment

The assignment is to take a "Magic Square" .txt file (where the horizontal lines, vertical lines and diagonal line all add up to the same number), read it and prove that they are in fact magic ...
2
votes
2answers
68 views

Player classes for a playing card game

I have a simple base class and two derived classes. However, when I'm creating new instances of that class, the line where I instantiate the variables is getting way too long. I have it on two lines: ...
5
votes
1answer
72 views

Text-based Dungeon Crawl game

This code is an answer to an exercise I found on the cplusplus forums. I'm a beginner so any reviews will be appreciated :) Make a program that outputs a simple grid based gameboard to the screen ...
7
votes
1answer
50 views

CS50 pset-1 itsa Mario - make a half-pyramid using parameters from user input

I'm taking Harvard's introduction to computer science (CS50) course online, and I've written a program that satisfies a coding challenge but I don't understand what I did or how I can improve it. I'm ...
8
votes
2answers
355 views

Program to index a book

Indexing a book. Write a program that reads in a text file from standard input and compiles an alphabetical index of which words appear on which lines, as in the following input. Ignore case ...
3
votes
2answers
103 views

Beginning C# dice game

I've been learning C# for about a month and have a finished game. I would like some constructive feedback on my progress so far. ...
3
votes
2answers
152 views

“Guess my Number” game in Python (2.7.9)

First time posting to Code Review. Just looking to get some advice on how I can write better code. I found the following exercise for a "Guess my Number" game on DaniWeb, but the linked source code ...
3
votes
1answer
59 views

Method to convert numbers into plain text

I'm relatively new to Java, and over the past week or so I've just been reading through the docs and messing around with it to better improve my understanding. As stated in the title, I've created a ...
2
votes
7answers
592 views

Producing triangles of asterisks based on height

I have created a simple terminal program: it allows the user to enter a height and it will produce triangles of asterisks (*'s) based on the height. I have just started learning C# as practice for my ...
4
votes
2answers
182 views

C# Winform Amazon Application

This is my first program I've written ever. Don't hold back on me. Any help and feedback is appreciated. This code wont work because it requires some keys, but I censored them out, but it does ...
7
votes
1answer
257 views

Calculating the results of bit operations

I have a simple program that calculates and outputs the results of all the bit operators. I'm planning to send it to my friend and to explain some stuff about them to him. Before I do that, I want to ...
0
votes
2answers
87 views

Morse Code Translator in C#

I'm writing a Morse code translator for homework in C#. I understand that this code may look horrible, so how could I improve it in terms of efficiency and readability? The program takes an input ...
7
votes
2answers
219 views

WinForms Poker (complete project)

I have quite huge question/favor to ask but I hope I can get some useful answers. This is my first complete project, I'm still learning C#, my first programming language. I'm afraid that there will ...
6
votes
2answers
627 views

Simple customer program in C (using binary files)

I have just finished a simple C program which is basicaly composed of 3 functions: accadd(void){} which adds some customer details to a binary file ...
-2
votes
0answers
25 views

Assigning distinct random numbers to variables [closed]

I'm attempting to generate non repeating random numbers between 1-5, 1-10, 1-20, etc. I'm on to the Fisher-Yates Shuffle but I'm not sure I've implemented it in the best way. My plan is to associate ...