A mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks.
11
votes
4answers
755 views
Hangman game in Java - second try
Please look over my new object-oriented version of my Hangman game I posted here about two weeks ago.
I know I should work more on commenting and be clearer and more descriptive of the methods and ...
6
votes
1answer
72 views
Dict of names and birth dates which prints with age at birthday of current year
As a beginner (Learn Python the Hard Way), I've set myself this exercise with classes and it works but looks very inelegant to me. I'm trying to write classes which could be re-used in other code. ...
12
votes
2answers
763 views
“Who are you, and where do you live?” — a Q&A exercise
This is my first attempt at a programme. Is it good form? Does it follow best practice? Or am I completely off the mark?
...
6
votes
3answers
550 views
Lemonade stand menu program
This is an assignment given in my C++ programming class. I have one main menu with four other menus branching out from it. I would like to make my code as clutter-free as I can, so please review ...
4
votes
2answers
65 views
Console class that handles multiple buffers
I'm working on a 80x25 terminal that splits the screen into two. The top half gets the first buffer, the bottom half gets the second buffer. I'm concerned about readability and accessibility.
For ...
7
votes
3answers
160 views
Hangman game in Java
I'm hoping someone can look over my code and tell me if there is anything I can improve. I am not very experienced with Java so I am hoping for some feedback as to avoid developing any bad habits ...
3
votes
1answer
20 views
Implementation of *nix ipcalc
I posted a JS subnetting calc before, but I wanted to try a CLI version, so I made this.
The parts I'm most worried about are:
structure (could I refactor the layout better?)
Did I goof any math?
...
6
votes
2answers
737 views
Hotel Booking Simulation
I am learning java and I successfully wrote one small console application. I would love to get reviews and possible bug sources on my code. I'm particularly concerned with my object structure.
...
2
votes
2answers
39 views
Basic value comparisons
I made a value comparison "programming language" similar to a previous one I made, except this one is based solely on value comparisons.
...
10
votes
3answers
109 views
Add color to terminal output
I have the following header included in some of my projects so that I can add a little color to the terminal output. Here is how it would be used:
...
10
votes
3answers
545 views
Console Blackjack game
What do you think the weak points are and how can I improve? I thought I could really use a Hand class in the dealHand method.
...
2
votes
1answer
39 views
A module to display, update and save a dictionary as .csv v2.0
I'd like feedback on my revised code after my previous question.
The goal is to create a module which can display, update, save dictionaries as .csv files. I'll use this in another program to update ...
5
votes
3answers
264 views
Simple “arrow-throwing” console game
I'm trying to make a simple console application game. The code is a bit messy and I hope anyone can point out anything wrong.
...
3
votes
3answers
171 views
A program to display, update and save a dictionary as .csv
I'm now looking for feedback on v2.0 of this program instead.
I'd like some feedback about my code. What bad habits do I have? What advice could help me write more Pythonic?
I'm trying to write a ...
6
votes
5answers
663 views
Petals Around the Rose
I have been working on a program that walks you through "Petals Around the Rose". I would like anyone to review it and point out any bad coding practices, as well as efficiency problems.
...
4
votes
2answers
159 views
Python Hangman Console
I'm quite new to Python and have been experimenting. So far I have made a simple hangman type game which creates a random word and the user than guesses it. I'd like to know if I've committed any bad ...
14
votes
8answers
1k views
Console application for providing detailed error messages
I'm writing a console application where I need to provide detailed error messages in case anything goes wrong. As a result of this, I find myself splitting up my code into many pieces and making sure ...
12
votes
3answers
638 views
Finding largest prime factor from inputted number
This is my first C# console application. This program asks for an input of a number, and finds the highest prime factor of that number. Please review my code.
Have I used things right?
Is my code ...
4
votes
1answer
87 views
5
votes
2answers
217 views
Text-based adventure game with combat and game-reset functionality
Please suggest improvements/refactoring to this game to make it more idiomatic Python.
...
6
votes
3answers
181 views
Returning the lowest and highest number based on input
This simple console program prompts the users for a number and returns the lowest and highest numbers from their inputs. It is difficult to add more user inputs, though. How can I make this easier to ...
6
votes
1answer
132 views
Simple chat console app
I wanted to practice using sockets and multithreading. This is simple code where I start a Server and connect to it via Client ...
10
votes
3answers
124 views
Saving player name throughout script-launches
I would like to use this in a program to save users' names even after they relaunch the script. I was just wondering if there were some ways I could clean up this code.
Note: this currently was made ...
4
votes
1answer
107 views
Permutations program in Python
This code asks for letters and a number of letters per word and generates all possible permutations. Then compares those permutations with an English dictionary and creates a list with all the words ...
3
votes
2answers
67 views
Java Cross with characters
I managed to make a perfectly even cross with for loops.
I'm trying to make this cross easier to code. I have to keep it with ...
7
votes
4answers
674 views
Simple C++ calculator which follows BOMDAS rules
This was my first attempt at making a C++ calculator. The user basically inputs an expression (I'll use \$1+1*(9*(11-1))\$ as an example) and the program searches for and creates a vector for ...
10
votes
2answers
209 views
Hangman game with hard-coded word or phrase
I feel that this implementation can still be simplified. I've tried to keep variable scopes low and have used as much of the standard library as I could.
It currently works with a hard-coded word or ...
3
votes
0answers
103 views
Building a console application using a DI service container
I am working on a project that will allow developers to create a console application using a dependency injection service container. Both the console and container are Symfony components with some ...
13
votes
9answers
3k views
Text-based adventure game with too many conditional statements
For a school project, I am creating a text-based adventure game in C++. I have shown my code to my teacher and he is stating my code is not entirely logical in sequence and that I should make my ...
4
votes
3answers
195 views
Changing the foreground and background colors of substrings based on ANSI escape codes
I am checking for particular keywords in a string, and then changing the foreground and background colors of substrings based on the keywords. Following is the snippet for checking the background ...
4
votes
1answer
71 views
Shortcut script for elusive grep command
This is an example of my filesystem:
/code/
internal/
dev/
main/
public/
dev/
main/
release/
tools/
/code/internal/dev/, /code/public/dev/ and /code/tools/ contain subdirectories for ...
8
votes
1answer
217 views
Bash script to clone all public repos or gists for a specified user, optionally to a directory of choice
I wrote this script as a way to backup and/or download quickly a set of repos or gists from a user. I don't have any major concerns but I'm a noob at bash scripting, and I've been scouring the ...
10
votes
1answer
331 views
Markup calculator application using MVC
I want to make sure that the code is correct in terms of its design, code correctness, best practices & Junit testing.
The complete description is given below:
Functioning of the app quickly ...
6
votes
4answers
584 views
Sum of subset of 5 numbers equals 0
I have a task to print all zero subsets of 5 numbers, input from the console.
I have succeeded in implementing a working code, but it seems it is quite complex (it is like inception) and if the count ...
3
votes
1answer
187 views
Falling Rocks Game
I have implemented the Falling rocks game in C#. The instructions are simple: Don't get hit by rocks. The game is running quite well, however there are some bugs that occur and furthermore, I would ...
4
votes
1answer
83 views
“Agenda” test application for Enum
I'm still new in Java so I always try to find new ways and improve my skills.
I found enum in Java to be very powerful (maybe excessively?) and while I was reading ...
6
votes
2answers
165 views
10
votes
5answers
1k views
Vertically placing the words in a string
Please let me know a better approach to solve below problem:
Problem: Vertically arrange the words in a string and print on console.
Sample Input:
Hello Jack
...
4
votes
1answer
111 views
My HangMan Game
I have been trying to learn C by making a Hangman game. It's not perfect, but with C, I worry that my coding practices will not be very good. I'm also new to allocating memory myself, so I feel I ...
4
votes
2answers
121 views
Different factorial algorithm implementations and measuring their execution time
I'm new to C, and as an exercise I'm building 4 different factorial algorithm implementations and measuring their running time. I'm looking for this feedback, especially:
The implementation of the ...
10
votes
1answer
158 views
Console command tool
I have created a little console tool that simply does commands that you enter.
The commands are stored in a txt file. Right now I only got 2 commands: getTime and ...
12
votes
2answers
209 views
Drink order program
I'm looking to improve my code to make it more efficient, such as shortening it but continuing to gain the same output, or to add some more complex functions into the code.
...
4
votes
1answer
288 views
Calculator for more than two numbers
I am having this problem with my code. I have variables firstnumber and secondnumber, as well as ...
5
votes
1answer
104 views
Console monster battle game
This code currently works, but I'm new to Objective-C from a Python/PHP background. How can I improve it/make it more Objective-Cesque?
Header File/Interface
...
5
votes
2answers
3k views
6
votes
3answers
2k views
Random number guessing game
I'm working on a random number guessing game. I'm done with the code and it's working, but there is a part that I want to make better. I declared an instance of a ...
7
votes
1answer
450 views
Command line reverse polish calculator
Write the program expr, which evaluates a reverse Polish expression from the command line, where each operator or operand is a separate argument.
For ...
2
votes
1answer
239 views
User-defined color implementation in windows console
I have implemented an user defined colors enumerator, and if is possible I appreciate if I will get a code review.
I want to know if my implementation is correctly or must improve it.
If there exist a ...
7
votes
1answer
164 views
Bash script - automate an upload image + description process on a server
I was tasked at work to improve a system where through a web interface a client, which eventually became us, uploads a bunch of images with descriptions (latter coming from csv files), the images are ...
6
votes
1answer
283 views
Simple console roguelike game
I have written this small game for the "learn python the hard way" book. I ask for some opinions about it and how to improve it.
I know about pygame and others game engines but all the game runs in ...