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
1answer
59 views

Enumerations for a game character's statistics

I would like to improve my functions and work properly on enums without all of those IFs as well as make it more consistent (for example ...
3
votes
2answers
222 views

FizzBuzz for CodeEval

Synopsis I'm a beginner programmer and decided to try some coding challenges. I found CodeEval and attempted the first challenge, FizzBuzz. However upon submitting my code I found that my submission ...
5
votes
1answer
54 views

Simple Python + Gtk.Window

I'm learning Python and Gtk so I decided to write a simple application that will take some image let user annotate with a pen and send results through email or save to a file. So far I have the ...
1
vote
1answer
30 views

Resumé builder app

Wrote this an hour or so after learning some basics. Took me a while because I had to write it in a way to fit the previous structure of my page. Basically, there are three rows of data. There HAS to ...
3
votes
3answers
86 views

Tic-Tac-Toe classes according to SOLID principles

I have these classes for my Tic-Tac-Toe game project. I am very new to object oriented analysis and design. Can anyone help determine if SOLID principles are preserved in this code or if it is ...
7
votes
1answer
41 views

Printing three ASCII 'banners'

This code that I wrote for a lab works perfectly and gives the desired output. That said, it's over 200 lines of code to reach the result. This seems ridiculous, even when you consider that there is a ...
6
votes
3answers
295 views

Money class with overloaded operators

I have program that uses a Money class which has several constructors for different methods of input and overloaded operators to add, subtract, and compare values. ...
8
votes
2answers
63 views

Enigma machine simulator

As my first (keep that in mind!) Haskall program (full code at end) I've written a simple Enigma machine and would like feedback on the core code related to its stepping and encoding — stripped of ...
2
votes
3answers
60 views

“Heads or Tails” game

I'm a beginner in programming and made a pretty simple heads or tails type game. I would like to know if I have done this efficiently. If not, please let me know what you would have done differently. ...
1
vote
1answer
53 views

Generating tables of numbers in PHP

I have this code and this works fine but I think it's too lengthy. I want to know if there can be a less lengthy code. I've heard from people that lengthy code is often not considered good. ...
5
votes
5answers
634 views

Menu to save and load football team information

I am a newb, and whilst I'm sure my formatting can be improved, I really want to know, how I can re-use my code for this simple program. The objective is simple, football game with a menu, that allows ...
10
votes
3answers
78 views

Producing and comparing maximum sub array sum algorithms

This is an exercise in implementing the maximum sub-array sum problem. It asks for several solutions of complexity: \$O(n)\$ \$O(n \log n)\$ \$O(n^2)\$ \$O(n^3)\$ For an additional challenge I ...
2
votes
2answers
23 views

SQLite DB Check and Update Script

My script looks for handshake files in an input folder to determine whether certain processes have completed. If it finds them, it will update the database with the current time stamp. Things I am ...
-3
votes
0answers
18 views

Pong Code Java Applet [closed]

I wrote a very simple pong applet game. Right now, the ball basically is just bouncing off the sides, but I want the platform to move by using keylisetner, but it ...
2
votes
1answer
40 views

PHP class to represent types of refrigerants

I'm relatively experienced with Java and C++ so picking up PHP wasn't too difficult. I wanted to get some feedback on my first PHP class. There's nothing extremely complicated as of now, but its nice ...
2
votes
3answers
36 views

Fairly Simple Hangman in Python

This is my take on a simple hangman game, which is played from command prompt. ...
6
votes
3answers
72 views

Python OOP shopping cart

I am a new Pythoner, and don't have good knowledge of OOP. I completed the following task, but I feel the code is not good. I welcome recommendations to improve the code. You need to create the ...
5
votes
2answers
47 views

Process text file of fulltext articles from news publications

I'm relatively new to programming and have started writing some code for work. This script is something I wrote that I'd like to have someone comment on. Am I doing anything silly, stupid or totally ...
6
votes
3answers
134 views

Revealing store sales based on time

I am delving into trying to write some JavaScript code. I understand the basics, (the very basics...) enough that I have been able to write the following and it works. However, my knowledge doesn't ...
4
votes
2answers
81 views

Finding all legal bishop moves

I am trying to create a two player Chess game. To do this I want to generate a list of legal moves. I am having trouble with the brevity of the code to generate the moves for the rooks and bishops. ...
5
votes
5answers
652 views

Car Savings Calculator

I've created a second 'calculator-like' program, this time using the JOptionPane rather than typing in the console. At the moment the code looks to have a lot of repetition so I'm looking to simplify ...
7
votes
3answers
330 views

Simple implementation of a generic stack

I'm fairly new to C++ programming. To help I've been writing my own data structures for practice. I'd liked this to be judged as if it was written by a professional, and receive honest feedback. I ...
7
votes
2answers
599 views

Decorator for cars

Is this a good use of the decorator pattern? If not, why not? Is this a good idea to use for example when we have objects communicating with MVC through PHP or via ASP? To send data through the model ...
1
vote
2answers
51 views

Project Euler #12 in Racket

Problem here. It's not exactly the brute force approach but I'm not using any sort of pre-calculated primes table, and I'm definitely not using the coprimality trick shown in the PE pdf. I'm finding ...
3
votes
2answers
195 views

“Guess number” game in Python

What could I improve on this code? ...
2
votes
1answer
64 views

Precision sum of doubles

Summing doubles can cause a loss of precision. Summing integers, however, doesn't. (Assuming no overflow.) Here's a high precision sum function I wrote: ...
5
votes
1answer
70 views

Palindrome using stack

I recently started learning Java, algorithms, and data structures. I am trying to check if a string is palindrome. I would like a review to see where and how I could improve. ...
3
votes
1answer
42 views

Multiplying over a matrix

The below code is a solution I put together for the Project Euler #11 question which asked to find the largest product of 4 numbers of any direction in a matrix (horiz, vertic, and diag all ...
5
votes
0answers
50 views

Typing exercise app

I've been writing a program to improve my Javascript skills. It's a very simple app for typing practicing. ...
3
votes
1answer
48 views

Insert and attach tag to the post in same time

I created a form with title, body and tag input and there are 3 tables: posts, tags and post_tag. Now I use this function to add new tags and attach them to the post postcontroller.php ...
2
votes
2answers
39 views

K&R atoi() variation

I'm currently learning C with The C Programming Language by K&R and this is my current exercise: Rewrite appropriate programs from earlier chapters and exercises with pointers instead of array ...
7
votes
2answers
402 views

Countdown clock in Python

This project is from the subreddit for beginner Python projects: The goal of the project is to create a program that allows the user to choose a time and date, and then prints out a message at ...
7
votes
5answers
645 views

Creating a numeric phone keypad

I'm writing a Telephone class and it has a method called getDigits which takes in a String parameter and returns the number that would appear on your phone if you ...
5
votes
3answers
310 views

Little text game in Java

I'm a beginner in the coding world, and I've been learning Java recently. I tried to make a small text game with the limited knowledge that I currently have of Java. I would like you to tell me ways ...
2
votes
1answer
34 views

Monoalphabetic Cipher in Java With GUI

An easy, terribly written but working, Caeasar (Monoalphabetic) cipher implementation, with a GUI (Graphical User Interface). Cipher.java ...
5
votes
3answers
98 views

Poker game implementation

I have included almost all features that real poker game contains, but even tho I tried to make it as clean as possible, I think it can be done much better. I used inheritance to somewhat distinct ...
7
votes
1answer
57 views

War Games whOOP

I am a beginner level programmer and recently I started learning OOP, so I made a simple war game ...
4
votes
2answers
171 views

Simple Tax Calculator

I've been learning Java for a very short period of time but with a couple of pointers, I've been able to put this simple VAT calculator together. If anyone could offer any ideas for improvement ...
4
votes
1answer
89 views

Finding palindromes in C#

This is my first foray into OOP, so I'd appreciate any kind of advice! Here is the problem description: On the first line of the input, you will receive a number specifying how many lines of ...
3
votes
2answers
47 views

C - K&R getint() variation

I'm currently learning C with "The C Programming Language" by K&R. At the moment I'm at the chapter about pointers (since I come from Java, they are new to me). In the book is an example code for ...
5
votes
2answers
383 views

Program that tells if a date is valid in C

I'm reading a book about C programming, at the end of each chapter it has some training exercise and one of them was to make a program that tells if a date is valid or not, the code below is what I ...
8
votes
1answer
122 views

Assembler for the HACK assembly language

Here's my assembler for the HACK assembly language, part of the Nand2Tetris course. I'd really appreciate any comments/criticism/help! If you want to know what input and output files should look ...
16
votes
4answers
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). ...
14
votes
2answers
329 views

Simple game of Hangman in Python

I'm starting out with learning how to program in Python and created a Hangman game. I think there is a lot of unnecessary code but I am not sure how to improve it. I wanted to avoid using global ...
5
votes
1answer
60 views

Task Reminder - Repeatedly notify every 6 hours

So I'm very much a beginner to Java and Android programming. I've worked a lot more with Python so I might have some quirks from there bleeding into my code here. I'd like a particular focus on ...
2
votes
1answer
64 views

Who wants a FizzBuzz?

I have been playing around with the Io language, and this is my second toy, after the yes program that is just ...
4
votes
1answer
86 views

Simple calculation in Java

I am kind of new to Java and I have tried making a simple calculator. This lets you do different calculations in a row until you type done then you get the answer. It works as I expected but I was ...
11
votes
1answer
95 views

2D Gravity Simulator-like game

This project is pretty much like a 2D gravity simulator. You click and it creates a circle that attracts other circles. The result of a collision is a bigger circle that is a sum of the masses. If you ...
5
votes
1answer
69 views

PDO Insert function using PHP

This code inserts data into the database successfully. I was concerned about whether it is a considered good practise to go about inserting data into the database in this way. Is there something I am ...
1
vote
3answers
182 views

Finding the relationship between two values

My code was made as an practice for CodeChef. Here's the brief from that page: Relational Operators are operators which check the relationship between two values. Given two numerical values A ...