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
0answers
39 views

Simple dmenu launcher for passwords, docs, notes and application shortcuts (Python)

did a small script for automating password store management and quickly searching and launching notes, shortcuts and documents through some keybindings that will execute the script. Script is working ...
4
votes
1answer
149 views

Thread-safe console for C#

I've created an small lib to allow writing to console with multiple threads and reading from console at the same time avoiding output being written in the middle of input because console cursor is ...
21
votes
4answers
5k views

Rock, Paper, Scissors in C++

I have a fair few years experience with programming, and am currently working in a software development role, writing internal web applications in C#. This is the first C++ code I have ever written, ...
0
votes
1answer
38 views

Python 3 Simple Xor Pipe/CLI Program

I wrote a simple Python 3 program that takes data from either a file or standard input and xor encrypts or decrypts the data. By default, the output is encoded in base64, however there is a flag for ...
7
votes
1answer
121 views

Generating Infinite Procedural Terrain Using Command-Line Graphics

Continuing my trend of (ab)using the Windows command-line interface to do fancy graphics-related things with my command-line-graphics library, CLIGL, I've created an infinite procedural terrain ...
1
vote
0answers
41 views

X in a Line Console Game - Python OOP

Please could you review my code below? The game is similar to "Connect 4", but I haven't implemented diagonal checking for wins. In particular I'm interested in my use of OOP. E.g. My choice of ...
3
votes
1answer
41 views

Ubuntu 18.04.3 ASCII strings length with embedded VT100 control codes

As my applications rely on VT-100 emulation, I found that I had to do quite a few workarounds to determine the number of visible characters in a string with embedded VT-100 control codes. So that led ...
8
votes
1answer
108 views

Deduplication by hard-linking files in multiple directories

About a year ago, I wrote a Python script that enumerates all the files in a directory, partitions them based on a couple of criteria (file size, a custom byte-signature of the file, hash, ...) and ...
5
votes
2answers
164 views

Simulating a Solar System Using Command-Line Graphics

After a relative hiatus of around two years, I've decided to start delving back into the programming world; to start, I've appropriated one of my older projects, CLIGL, and have made a solar system ...
1
vote
2answers
123 views

Minesweeper game for the console

You can set any size of the field and any number of bombs. I think I got a pretty flexible program again(Tic tac toe game for the console). What do you think about the code? I would like to know if I ...
5
votes
1answer
376 views

Tic tac toe game for the console

You can set any size of the field, you can set how much you need to put in a row to win. I think I got a pretty flexible program. What do you think about the code? I would like to know if I made ...
7
votes
4answers
81 views

Ubuntu 18.04.3 LTS get terminal columns and rows NASM

As part of the prologue of all my console applications, I need to determine the extents of the current terminal so if there are less than 132 columns or 43 lines the user can be warned output may not ...
7
votes
2answers
96 views

Simple VGA driver for a toy kernel

I learn about OS development and follow the tutorial Bare Bones on OSDev. And I did some extra tasks from the Moving Forward section. I would like to get any suggestion about code improvement, ...
9
votes
4answers
254 views

Extremely basic login system in console

This is my first C# project. I still am a noob to programming, and while I'm happy I carried out this project, I know that my code needs A LOT of improving and that's why I posted it here. This code ...
5
votes
1answer
38 views

Downsample fastqs

I'm working on a project to downsample some fastqs (files that contain sequences). Each line of the fastq bioinformatics format comprises 4 lines chunks (id, dna sequence, "+", quality score). ...
5
votes
1answer
84 views

Bash script for speedreading training

I have coded a speedreading training bash script. My targed was to make some experience with bash in a funny way. It ...
1
vote
1answer
66 views

Tower of Hanoi, ASCII animation with ANSI escape codes

A few days ago I saw a nice video on YouTube with prof Thorsten Altenkirch about recursion and the Tower of Hanoi puzzle. Today I tried to reproduce the code from the video and came to this: ...
3
votes
2answers
113 views

Parcel size classifier [closed]

I submitted a technical assignment for a job interview process and I am stressing out wondering if my submission was any good. I would like to learn and be a better developer, so please give me ...
6
votes
2answers
190 views

rock paper scissor

I just started to learn C++ and I decided to make a rock paper scissor game. It works very well but I would like to know how could I improve it further. Thank you very much in advance for your help. <...
4
votes
3answers
104 views

TicTacToe in Javascript

I made this two player TicTacToe game as a challenge i was given in class. The game starts where the first player chooses where their X will be placed. Each area in the array has been given a number ...
6
votes
2answers
215 views

Made my own simple calculator

So I made this calculator in c# console, I'm pretty nooby-ish in programming. I want to know if I can make it better, because my coding skills suck. Pretty sure my logic sucks too. Any advice and ...
5
votes
2answers
362 views

Single vs Multiple Try Catch

I have this code which is a third-party transfer for ATM console app. For best practice, should I just put all the code into one try block or with multiply try block like below? ...
2
votes
2answers
81 views

Print Integers in a Pyramid

I need to write a method that will print the integers from [1, maxValue] in a pyramid where the nth row contains ...
2
votes
1answer
66 views

The most elegant way to locate two enums

I have situation where user has got options to select, and after selected any option will appear next options. For example : 1 - Add car 2 - Add motorcycle. 3 - Print cars 4 - Print motorcycles And ...
9
votes
6answers
677 views

Sum and average calculator

I've just written some code in an online compiler, and since I'm very new to C#, I wanted to ask what could be improved about the code. The task of the program is simply to add up the numbers the ...
5
votes
1answer
48 views

Stack Exchange graph data - helper modules

Building on previous reviews Whilst not an iterative review I have tried to follow the advice provided to some of my older questions: KISS, in some of my previous questions I've over complicated the ...
1
vote
2answers
101 views

Very simple calculator with four basic operations using only if/else statements

I created a simple calculator with multiplication, division, addition, and subtraction. Is there a way to write it shorter? I am a beginner so I do not know much about programming other than if...else ...
3
votes
1answer
81 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
681 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 ...
1
vote
0answers
65 views

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

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 () ...
5
votes
1answer
53 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
70 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
94 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
93 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 ...
3
votes
1answer
139 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
77 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
191 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
103 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
90 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
167 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
25 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
55 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 ...
6
votes
1answer
252 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
155 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
369 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
227 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
201 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
200 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
248 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
176 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 ...