A mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks.

learn more… | top users | synonyms

14
votes
5answers
2k views

Tic Tac Toe in the Console

I have made a Tic Tac Toe game in C#. How can I improve my code? The full listing is as follows: ...
2
votes
0answers
69 views

Delegating which module's functions to use based on user input

My main concern with this code is this problem - given that this program could generate a prompt string from Bash, Zsh, Fish, etc., I would like to make this code easily extendable so people can add ...
5
votes
3answers
159 views

Small command-line helper tool

I've coded a small command line helper tool for this library I'm working on. The library provides tools for the use of Virtual Texturing on iOS devices (mainly games). This little command line helper ...
0
votes
0answers
54 views

Console Application Customizer - GetBootstrap v2.0

GetBootstrap-2.0 update from GetBootstrap-1.0.0.2 I just update my console application customizer and add some new features like disable minimize, maximize and close button, new color and simple ...
3
votes
1answer
58 views

Easier way to handle a Console Theme System

I'm just curious is there an easier way to handle console colors rather than just doing something like the code below. The problem is the code bloat I'm experiencing when writing a theming system for ...
8
votes
4answers
740 views

Fruitmachine game

I'm quite happy with my code so far but I often make efficiency errors that I don't see when writing code. Have I missed anything? ...
10
votes
4answers
640 views

Text-based BlackJack game

I am a new programmer (I've been doing Java for about 7 weeks) and I am of the type who wants to get it right straight away, so I wonder how this code: Compares to the common practice is structured. ...
5
votes
1answer
98 views

Basic console game architecture

I'm working on some simple console game and I'm starting to get stranded in my modelling. There is some fragmentation and tight coupling going on! In this version I would just want to be able to ...
2
votes
1answer
61 views

Console Application Customizer v1.0.0.2

GetBootstrap v1.0.0.2 a console customizer update from this Please give me tips, request and suggestion for my future updates. (I update every 2 weeks) Sample Preview The following code contains ...
5
votes
4answers
848 views

*Code for fake UI

While I was coding it, I got a better idea, but I continued because I can not compare both of those ideas, because they are different. The idea of that function is to make your fake ui-building ...
5
votes
1answer
100 views

Console application - customizer bootstrap style

I've created a console customizer for a C# console application. This is not finished yet but I'm looking for tips, requests and suggestions so I can make some updates. Sample Preview The ...
5
votes
2answers
94 views

Making user menus in a text-based game

I'm new to Python and programming in general, but I'm making it work. I have this little game I've been working on as a learning exercise and I'm a bit concerned that I'm using far too many ...
5
votes
1answer
53 views

Using a TSV text file and map for a Q&A program

The program outputs a menu asking for a new question or to ask a question. If you ask a question, it will search a .tsv text file for the question and return the answer. It will then check a map that ...
11
votes
4answers
891 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
97 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
785 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
614 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
78 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
293 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
54 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
830 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. ...
3
votes
2answers
48 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
156 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
1k 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
69 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
663 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
204 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
722 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
220 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
728 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
103 views

Simple Calculator - revised

This is my revised code of the Calculator: ...
5
votes
2answers
347 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
956 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
195 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
129 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
236 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
92 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 ...
8
votes
4answers
1k 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
296 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
156 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
4k 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
295 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
80 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
252 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
433 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
867 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
271 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
131 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
186 views