Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [console]

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

0
votes
1answer
57 views

Text reading and string inputting program [on hold]

The Main program. This program pulls from a .txt document with two separate strings, and outputs a .cs program that will display those two string via console when run. It uses a structure.txt file ...
2
votes
2answers
88 views

Reading range sensor data from one Serial Port and writing output to another

I'm reading range/distance sensor data from one Serial Port, decoding it and then transmitting it to a secondary device in ASCII format. The sensor uses a 2-byte header with each byte containing the ...
-4
votes
0answers
39 views

c# console Snake game basic movement [closed]

I have created a small c# snake game. It has no gameover case and no collision with corners and itself. Has a bug. As snake gets longer, it seems to disappear(having some buggy kind of transparency). ...
2
votes
1answer
32 views

Text printing for a text adventure game, with color and other stuff (Python)

I really think there's a better way to do this, but I can't seem to find it. Can you please point me in the right direction? ...
2
votes
1answer
62 views

Self playing console Blackjack game with four players

I want to clean this code to be more production ready. What can be improved, added or removed? ...
1
vote
1answer
57 views

Program for a speed camera

I am doing some online exercises, and I came across this: "Your job is to write a program for a speed camera. For simplicity, ignore the details such as camera, sensors, etc and focus purely on the ...
1
vote
1answer
55 views

Random String guessing game [closed]

I'm looking for some critique of my simple console game application I made. I'm teaching myself to code so I don't have a teacher to "grade" my stuff for me, so this is where I go! I'm using system....
1
vote
2answers
74 views

Generate the Factorial of Given Number

This is a console application that generates the factorial of a given number. Is there any way I can improve my code ? ...
11
votes
3answers
766 views

Console calculator for 2 numbers at a time

I'm learning to code for fun, and just finished my first program. I don't know what to think about it since it's my first finished real code, but hey it works! I'm pretty sure that it can be written ...
2
votes
1answer
64 views

C++ CLI Console Menu Statemachine

I am trying to find the best way(/most efficent way) to setup my console program's menu. The way I have it set up is that I have a Menu class and then I use a menu pointer called currentMenu and I ...
3
votes
4answers
101 views

Display the n terms of even natural numbers(between 1 and 100) and their sum

This is a C# console application that displays the n terms of even natural numbers between (1 and 100) and their sum Is this good? Or is it bug riddled ? ...
0
votes
1answer
29 views

Console output of multiplication table

I have a method, which outputs multiplication table sized by given maximum number. Also, it visually separates first row and column from the rest table. How my code could be improved or optimized? ...
7
votes
5answers
2k views

RockPaperScissor Game

I have been studying C#, and I am trying to model the "Rock / Paper / Scissors" game. Is my program reasonable or is there anything I need to improve? user input a round. user input RockPaper or ...
4
votes
1answer
93 views

Using Span<> and Memory<> to read UTF8 from a socket

I am experimenting with Span<> and Memory<> and checking how to use it for example for reading UTF8 text from a <...
1
vote
2answers
162 views

Conway's Game of Life command line program in C++

I have programmed Conway's Game of Life in C++. ...
8
votes
1answer
116 views

Systemd service configuration helper script

I've written a script that semi-automates the process of configuring/creating a new systemd service. The script is working perfectly well, however, I've had some trouble with the styling and ...
15
votes
2answers
1k views

Dungeon Crawl game for the terminal

I am learning C++ and I attempted to do one exercise I found: Dungeon Crawl. The goal of this game is to reach the treasure by moving your character along the board. The exercise asks not to use ...
0
votes
0answers
59 views

Is this the right way to implement multithreading

I need to write a series of console applications (about 20 of them!). I want each app to be as consistent as possible with regards how it starts up and shuts down, maybe with the logging it generates ...
3
votes
0answers
63 views

Console based Vocabulary Trainer Version 2

After a long break I took the suggestions from Console based Vocabulary Trainer and reworked the Trainer. It contains of the following parts Vocabulary.h/cpp: Save and read vocabulary from/to text ...
2
votes
1answer
60 views

Python CLI-Parser improvement for “one of those options”

I was wondering if there was a better way to implement my cli parser. For context: I need to pass to my script either a file in one of two formats or two files in a specific format. It may be easier ...
2
votes
1answer
105 views

Export data from matrix to txt file [closed]

I am new at programming and I'm really confused about how should I do this, because at first I thought I should ask user which path to export. However I have been told that I should check if it exists ...
0
votes
1answer
65 views

C - Argparse (Argument struct)

I'm trying to make something like Python's argparse in C. I created this Argument struct and functions; is my code good so far? ...
2
votes
1answer
72 views

JS Procedural Hangman

I wrote a procedural version of Hangman (very basic) and would appreciate some feedback on the following points: Is the basic logic OK? Any obvious improvements? Any details or matters of style I ...
6
votes
1answer
131 views

Command line todo list manager

This is a tiny project of mine, a minimal command line todo list program that I regularly use to manage my todos. It saves todos using GitHub markdown task lists format in a plain text file. The ...
2
votes
0answers
72 views

Madlib CLI program, replaces string in text file

Mad Libs program that reads in text files and lets the user add their own text anywhere the word ADJECTIVE, NOUN, ADVERB, or VERB appears in the text file. ...
6
votes
2answers
139 views

Console autocomplete for complex names

I am currently writing a C# console application. Part of it is, that the user needs to enter a fairly complex system name. To make it easier I wrote a function that uses a string[] keywords and auto ...
4
votes
1answer
125 views

Tic Tac Toe in Browser Console

Anyone remember "War games?" I have a very long way to go, but I thought it would be interesting to make a version of Tic Tac Toe which plays itself. At present the AI is "choose a random available ...
4
votes
2answers
140 views

Snake game for Windows text console

I have started to code Snake in C++. I am finding it hard to make progress on this project because the code is quite messy. How can I improve the structure of my program? main.cpp: ...
4
votes
2answers
117 views

Speed-cubing timer console application

This code is my first implementation of this style of application in the console. In essence a stopwatch with some added functionality. I was interested in getting some feedback before I refactor and ...
4
votes
1answer
93 views

CLI to bump package.json version and add git tags

I'm writing a command line app in node.js. At this stage, the app does the following: Get the version from package.json Update the package.json with a new version ...
7
votes
3answers
147 views

Console based Vocabulary Trainer

This code was reworked and repostet in Console based Vocabulary Trainer Version 2 I wrote a console based Vocabulary Trainer to practice C++. Its possible to add and remove vocabulary and practice ...
7
votes
3answers
573 views

Print code-fenced sections of a Markdown document

Original code and demo at this gist. Given a Markdown document like ...
7
votes
1answer
225 views

Time delay indication bar for a text game

For a game I am writing in Python 3.6.5, I made a text-based animation to indicate the passage of time (when chopping a tree or mining a rock, etc). I did a lot of trial and error to get the output ...
1
vote
1answer
45 views

Skeleton for a command-line tool to scan domains for vulnerabilities

I'm working on a new command line application in GO and was hoping I could get feedback on my design pattern, or suggestions on a better one to use. I'm still new to GO, only having used it for a ...
10
votes
2answers
155 views

Tic-Tac-Toe console application (as foundation for Ultimate Tic-Tac-Toe)

For the purpose of becoming better at C++ programming, I wanted to program Ultimate Tic-Tac-Toe as a console application for Windows in C++. However, I thought it would be sensible to create the plain ...
6
votes
1answer
95 views

Two versions of PDF-Selector

I have basically ended up with 2 versions of a PDF-Selector. Both versions do the same thing. I'm not sure which solution is better. Maybe someone could give me a code review. I use: PDFSharp-Nuget-...
6
votes
0answers
122 views

Advanced Logging Function

Way more blood, sweat, and tears have went into this then I would care to admit, but this has been a function I have been using in some shape or form for quite a while and it has taught me alot. It ...
10
votes
4answers
417 views

Another attempt at a Blackjack game

This is a follow up question to this one. I have been working on this game for some time, and now I would like it to be reviewed. Most importantly, I want to know about my code readability, ...
9
votes
1answer
647 views

Text-based User Interface in Python

I wanted to make a GUI-ish (a TUI) thing in the terminal as I have no experience with PyGame or the like. It works, but how can I improve this? ...
10
votes
4answers
663 views

Console-based table structure: Revisited

This is a follow-up from my previous post, which can be found here. A readme for more detailed information can be found here. It is a library to create console based tables where you can insert, ...
5
votes
2answers
354 views

My attempt at a Blackjack game

Please also see the new version here So I've been trying to make a blackjack game as my first attempt at an OOP project. The program is working, but not yet finished as it is lacking three major ...
4
votes
4answers
185 views

Sieve of eratosthenes with std::vector<bool>

How can I improve and optimise this code? ...
7
votes
1answer
193 views

Simple console text editor

I have been following along Gary Bernhardt's excellent video series on "Building a Text Editor From Scratch". It's in Ruby but I wanted to do it in C# just to see how much it differs. Implementation ...
4
votes
2answers
527 views

Right Triangle CMD tool

I was most interested in feedback on the overall approach to the problem, naming conventions, efficiency, etc. I would like to avoid using argparse/docopt or something similar, unless it would have a ...
4
votes
0answers
74 views

Program to pull data from an Oracle database

EDIT: I should clarify that this program currently works as intended (not looking for help making it work); I just want to understand what I could have done better in terms of design. I work on a ...
0
votes
0answers
568 views

Python script to execute Bash code inside of a Docker container

Motivation I like using so-called online judges and competitive programming sites to practice coding (e.g. CodeWars, Exercism, HackerRank, etc.). I was thinking that it would be nice to try write my ...
2
votes
0answers
113 views

Python CLI program to learn words using Wordnik API and SuperMemo2 algorithm

Motivation I wanted to write a simple console application to improve my vocabulary by using the Wordnik API to get words and definitions and using the SuperMemo2 spaced-repetition algorithm to ...
11
votes
4answers
515 views

Console-based table structure

Personally I often prefer console applications over GUI applications. However, sometimes it is quite a challenge to display everything well-aligned. Therefore I decided to create a console-based table ...
4
votes
0answers
112 views

Call a text-editor from within a Python script to get user input

Motivation I'd like to know how integrate the use of text editors (e.g. emacs, vim, etc.) into command-line Python programs. Features I'd like to be able to do the following: Call a text editor ...
8
votes
1answer
146 views

Autogenerate a CLI for Python Functions

Motivation When writing command-line applications in Python I frequently find myself in situations where I want to expose the functionality of some specific set of functions - independently of the ...