Questions tagged [console]

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

Filter by
Sorted by
Tagged with
3
votes
1answer
53 views

Forming words that start with consonants and vowels

I am just starting to learn programming. I had already coded some functions and stuff in other languages, and whilst trying to complete this Python challenge Kevin and Stuart want to play the 'The ...
10
votes
4answers
614 views

Repetitive validation of Console inputs

I have this code that asks the user for inputs and validates the inputs if they are Integers (no other inputs are allowed). I'd like to ask for some help in terms of elegance of the code or ...
0
votes
0answers
49 views

What pattern can I use to write CRUD functionality? [on hold]

I am writing a console application. CRUD functionality.I would like to try to apply the pattern. Is it possible to apply a "state" pattern? In the AddCustomer () ...
4
votes
1answer
41 views

Command line utility to convert image formats of photos

Below is some code for a basic command line utility to convert image formats of photos. I'm wondering how any part of it might be written with better style, i.e. how it could be neater, clearer and ...
2
votes
3answers
49 views

Beginner user registration and login program

I'm new to coding and C++, this is one of my first pieces of "software". Could anyone give me some constructive criticism? ...
4
votes
1answer
41 views

Python wrapper to my own version of unix PS command

The class below provides a set of utility methods to access set of currently running processes. It is a wrapper around my own version of UNIX 'ps' command. Please help me improve this. ...
2
votes
1answer
74 views

Simple console application that changes text color based on user input

I am learning C# like 1 or 2 months and I wanted to know if there is any possibility to shorten this code. It is simple. It only changes color of the console text with ...
2
votes
0answers
29 views

A Simple Connect 4 game in Python

I have made a simple command line version of connect 4. It is my first time using classes and importing one part of my project into another so any feedback on how I've done and any way it could be ...
6
votes
2answers
67 views

Basic console calculator with four operations

I'm an absolute beginner in programming, and Today I decided to put my knowledge to the test and create a basic c# calculator. I've Done it, but now I'm looking for ways to Make it more shorter and ...
3
votes
1answer
112 views

Snake Game in C++ with OOP need advice

I wrote a Snake Game in C++ and I have practiced some OOP approaches on windows 7. What I need: advice how to improve code Most important how to made what Snake on ...
1
vote
0answers
54 views

E-Commerce Mock App in Console

I have completed this E-Commerce Mock App in Console C# which I used object to store the data to apply some C# OOP and LINQ techniques. Since it is just a mock version, features are reduced to the ...
3
votes
3answers
70 views

Join and map command line arguments in Rust

Is there a more natural way to do this in rust? I'm having a lot of difficulty trying to make this look clean. Type mismatches and borrowing have me stumped. What are some refactors that I could make? ...
4
votes
2answers
112 views

c++ console snake game

I have made a console game using c++ without using OOP. The code works, but is it good that way or should I have used OOP? ...
1
vote
0answers
17 views

Console app to get XML from API and save to database

I am making a small console app to get XML from an API and then save the data to a database. While this project was not created via test-driven-development, I have tried to make it such that tests can ...
3
votes
1answer
51 views

Print file out 1 character at a time in the terminal - Python

This program opens a file and prints the text out to the terminal 1 character at a time and at a predetermined speed using time.sleep() Simple and maybe, if you ...
4
votes
1answer
188 views

Console-based BlackJack in C# - Follow-Up

I have done some code-refactoring of my console-based BlackJack in C#. Finally found a better solution to solve Ace problems (double Aces should be value 22 and third Ace should be value 1). I still ...
2
votes
1answer
74 views

Simple Console Maze Game

I am fairly new to C++ and programmed a maze game as an exercise. However, looking at it I can see it can be improved a lot. These are my requests if you don't mind: I do not want to use the library <...
8
votes
1answer
166 views

Console-based ATM client as a class library

I have completed my bank ATM application in C# class library project. For simplicity, the data of this version will be stored in the List instead of a database. The basic feature are Login Check ...
0
votes
1answer
87 views

Simple “Connect 4” game

I made this easy game to improve my C++. The functions like NoFlicker and ShowCursor are copied from the Internet, but I made <...
1
vote
2answers
158 views

My Sal's Shipping challenge on Codecademy

This is my attempt on the Python 3 Sal's Shipping challenge on Codecademy (Challenge Link (instructions in the link)). I'd really appreciate anyone to take the time to review my code. I'm a very new ...
6
votes
2answers
174 views

pydoro - terminal tomato timer

I've recently created a tomato timer for terminal. It's hosted in github. My concerns are how Pythonic my code is? Is the way I'm handling state transitions good? Which areas of the text user ...
2
votes
1answer
96 views

Rock Paper Scissors C# game with rounds input

I have a Rock Paper Scissors project in C# and I was wondering if I could get some feedback on how to improve my code. I ask the user how many rounds the user wants to play. The maximum number of ...
4
votes
1answer
98 views

Program to check an item's price against available credit

This is a working program to check an item's price against available credit. I'm trying to simplify this program to the bare minimum. It would require to run so I'll be better able to understand each ...
6
votes
2answers
114 views

Compact command line argument parser : Revisited

This question is a follow up to my previous one which can be found here. The user dfhwze suggested me to look into compiler construction and recommended me to write a lexer and a parser that would ...
3
votes
0answers
61 views

Console Snake Game

I am beginning to learn rust and I created this snake game for practice. I am looking for some feedback on my code. main.rs ...
2
votes
1answer
78 views

Compact command line argument parser

So, I decided to write my own little command line argument parser for various other projects I work on. I am aware that there are many good command line parser libraries, but I did wrote my own anyway ...
6
votes
0answers
62 views

Console arkanoid in C

On an Internet forum a person came with their homework, to write Arkanoid in a console - it seemed they wanted someone to do their homework for them so I did not respond. However, I found the task ...
3
votes
1answer
47 views

Filling A Linked List With Data From File And Handling User Status Messages

I have completed an university assignment on C. While the code is fully functional based on the specifications of the exercise, I like high-quality code and would like to ask for opinions on how can ...
4
votes
2answers
50 views

File encoder/decoder in Nim

I wrote a simple program to encode a local text file with password and decode it back. There is one text file and it is either encoded with a password or is in plain text. I had a version in Python ...
4
votes
1answer
107 views

A small PHP library for styling terminal output

I've attempted to make a small PHP library for styling terminal output using ANSI escape sequences. The repo is located here. To be honest, I am not really satisfied with the current structure of my ...
0
votes
0answers
13 views

CLI to make HTTP Head requests and check for response code

I needed to create a simple CLI utility to check if a specific endpoint is available and (optionally) responds with some expected HTTP code to help troubleshoot users environments (proxy, network ...
17
votes
7answers
5k views

Tic-Tac-Toe for the terminal

I recently started learning C, and this is my first fairly large (to me) program. It's a basic Tic Tac Toe game for the console. There's no AI, it's just a 2-player game. Is there anything I can ...
2
votes
1answer
70 views

Stacker game with three blocks

I am pretty new to C# and so i would like to ask you, how i could improve my code. I am currently coding a Visual Studio C# Console Game where you have to stack blocks. Currently you can only Stack 3 ...
2
votes
1answer
199 views

To do list mini project

I tried in this project to apply what I learned from OOP, using classes and properties, please advise for any best practice or any improvement. Conclusion: I have a text file "ToDoList.txt" which has ...
3
votes
2answers
61 views

POSIX shell function for asking questions

I've written a tiny function for asking questions intended for my POSIX shell scripts, where I often need user input. The function takes 2+ arguments, where: Is a string containing the question. , 3....
6
votes
1answer
167 views

Snake console game in C++

I reviewed this question to a snake game console implementation: My first C++ game (snake console game) I enjoyed refactoring this code and presenting a solution using more C++ features/classes. I ...
6
votes
1answer
87 views

Tic Tac Toe console game in C++ (w/graphic)

I have finished a simple Tic Tac Toe game, and I'd like if anyone was to give advice to how I could improve my code. main.cpp ...
1
vote
1answer
100 views

Calculate average from .txt file

I have made an exercise where I need to calculate the average per row of a .txt file. (see below) ...
4
votes
1answer
146 views

Beginner c# snake game

I just started using c# and I made this snake game in a console application . It is a bit jittery when i run it in visual studio. How could I improve it to be cleaner and less jittery. ...
1
vote
0answers
61 views

ASCII-Box PowerShell menu

I've written a pair of functions that can be added to a module or script that will allow the developer to specify a list of options and let the user select with the up/down arrow and return any ...
11
votes
3answers
2k views

My first C++ game (snake console game)

I finally finished the code for a snake game I was working on. I would like it if you were to give me some advice as to things that can be improved. ...
1
vote
1answer
80 views

Program that deletes near duplicate directories and directories that have .ini like files

The program needs to only keep directories that have at least 1 .osu (.ini like) file with certain restrictions in them. It also needs to delete duplicate .osu files. But since duplicate files are ...
3
votes
2answers
146 views

Number guessing game in C

This is just a little number guessing game. I know it's simple but I am a newbie in C and I think such a little example can be enough for finding simple design flaws that can than be eliminated. If ...
5
votes
1answer
73 views

Batch upload users to nextcloud on docker with bash csv

I have this bash script that adds users to NextCloud from a csv file. It expects to be run from the same directory as the docker-compose.yml file. I'm pretty new to bash scripting and I'm wondering ...
15
votes
3answers
556 views

Modify casing of marked letters

Trying to learn coding in my 30s. Could anybody review my code and give me some feedback if possible? It works, but I am sure there are better ways to solve this problem. The problem: A text is ...
1
vote
2answers
110 views

Simple Console Address Book in C# using Dictionary

I have created a simple C# console app to display an Address Book using Dictionary. I would like to present it in a interview but I am not sure if the code is "interview" worthy. Given below is the ...
5
votes
1answer
56 views

Java program that relaunches itself in OS's terminal application

I wrote a Java program that when its executable .jar is opened manually, it re-opens itself inside the operating system's shell console. The purpose of this is to have a C#-style console application ...
1
vote
4answers
115 views

Program that prints an ASCII pyramid

I have written the following program in C# to display an ASCII pyramid. ...
17
votes
1answer
219 views

Brainfreeze: A Brainfuck compiler in C

BrainFreeze This is my implementation of a brainfuck compiler in C. The instruction to build/run the project (GitHub repo) can be found here. I am first converting the brainfuck source to x86 ...
7
votes
2answers
104 views

Color ASCII drawing class

I am working on a pseudo graphical interface for a Chess engine I wrote. I want to draw a colored Chess board with ASCII pieces. To abstract the pure ...