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

learn more… | top users | synonyms (2)

5
votes
2answers
106 views

Command line Hangman game

I was wondering if you can give me advice / and your opinion on the following code. I'm aware there are a few things that it doesn't presently deal with that could be enhanced (I don't have time, this ...
3
votes
2answers
48 views

File Archiving Console App

Overview I wanted to create a small console app that would point at a given directory, evaluate the last accessed date of each file within that directory, and if the last access date was below a ...
3
votes
2answers
53 views

Huffman compressor in C++

I have this Huffman compressor that can compress both text and binary files by treating each as binary files. (By the way, it is fully compatible with this Java implementation.) See what I have: Code ...
7
votes
1answer
82 views

Text-based adventure game using classes and XML

I am studying software engineering and we just started learning about object oriented programing. I wanted to be a bit ahead of all others, so I decided to write a little text-adventure using classes. ...
6
votes
2answers
95 views

Josephus algorithm using array in C#

I'm trying to write the Josephus algorithm as a project for school, however, I think that there is a better way than what I already have. ...
0
votes
1answer
64 views

Huffman compressor in Java - follow-up

This post improves upon my Java implementation of the Huffman algorithm for data compression. I did the following improvements: The map mapping each byte value to its frequency does not rely on <...
-4
votes
0answers
22 views

Raw_Input help in python. Not defined? [closed]

I'm making a character customization feature to my unmade "game" and I'm running into some error when I run this: ...
5
votes
2answers
135 views

Faster brute force algorithm

I have this brute force code, where you input a password and runs through combinations of numbers, lowercase and uppercase letters, and special characters until it match the password given. The ...
7
votes
2answers
394 views

Huffman compressor in Java

(See the next iteration as well.) I have this Java program that can en-/decode files, both text and binary. What comes to critique I want to hear anything regarding these points: Performance, ...
2
votes
2answers
51 views

Printing log messages with varying length fit into screen width

I'm writing a simple sanity tool for a simple USB driver. The customer is directly facing the output so I have to care about how it looks. The log messages that I need to print are varying length, ...
4
votes
1answer
54 views

Python Hex Viewer

I have created an hex viewer in python, as a timed-challenge by friend. My implementation was in the form of a class, with a separate main file running with ...
8
votes
1answer
70 views

Ntree: a reimplementation of the tree utility

tree is described as "a recursive directory listing command that produces a depth indented listing of files" on the homepage for its Linux implementation. I don't ...
6
votes
2answers
107 views

Console colorizer

To be able to apply various colors to the console I created a ConosoleColorizer. It's really simple. It just takes an XML and renders it to the console with the ...
5
votes
1answer
57 views

X86 Legacy boot loader error trapping

The boot loader that I'm designing is just simply going to setup (A) Stack, (B) Segment registers (C) Load remainder of track for specified device. Conventionally, this could have been up to 4 floppy ...
3
votes
1answer
31 views

A telephone book command line program in ANSI C - follow-up 2

(See the previous iteration.) What does this program do? This program gives you a command line interface for managing your personal telephone book. The program supports three actions: Adding a ...
2
votes
1answer
44 views

Multi platform ASCII spinner in C

Okay I've just finished writing a nice tiny C program to have an ASCII spinner (works on Windows and POSIX). I'm quite new to C, so any suggestions would be great. This is designed to be a small ...
5
votes
2answers
37 views

Image batch processing in Ruby

I know a lot about Java, PHP and stuff, but I'm fairly new to ruby. I've written this script to look into the current working directory, get two parameters from the command line and then resize and ...
1
vote
1answer
42 views

A telephone book command line program in ANSI C - follow-up

(See the next iteration.) This question is a slight improvement over A telephone book command line program in ANSI C I have incorporated almost all points stated by Toby Speight. Now I have this: ...
2
votes
2answers
71 views

Simple library app

I'm trying to learn coding by actually coding my first working and hopefully expandable in future app. Yesterday I asked about optimizing my menu and got some answers about my take on it. Obviously ...
4
votes
1answer
66 views

A telephone book command line program in ANSI C

(See the next iteration.) Introduction I was in the mood for some C code and wrote this program for handling a personal telephone record book. One of the goals is strict portability; the code ...
1
vote
0answers
38 views

RSYNC Style Mirror Folder Application

I've written a mirror folder application in C#. It uses CommandLine for command line parsing. I'm just looking for a general review. ...
3
votes
3answers
119 views

Optimizing simple menu in console app

I want to optimize code in my simple app that I'm writing to learn C#. I feel it's really badly optimized in terms of good coding practises. Could anyone take a look at it and give me a hint to make ...
4
votes
1answer
93 views

Basic C# R-E-P-L

So I was thinking of making a C# REPL, as I didn't find any viable solution that would work for me, so I made a simple, basic one, I am sure it can be improved, as it seems once the REPL class is ...
0
votes
1answer
23 views

colorprint - part 2

This is a followup of the last review to comply with meta's rules. In the last, I posted a small library called colorprint and got some helpful pointers from chux ...
3
votes
1answer
23 views

colorprint - An ANSI Escape sequence console writer mini-library

I wrote this a long time ago. I came back to it and decided to clean it up a little. It uses the preprocessor and C99 anon structs to make a flexible python-like ...
2
votes
1answer
50 views

Multi threaded console IO

For many console applications it is handy to be able to receive input and output at the same time from multiple threads. This is supposed to allow receiving input commands from multiple threads, while ...
3
votes
1answer
53 views

Bash manual page selection menu

I wrote the following script in the hopes of streamlining the finding and reading of multiple manual pages. Since I am always looking up different utilities' manual pages I thought this would a good ...
1
vote
1answer
18 views

Pausing script while waiting for Docker container and printing updates

I'm looking to improve it in brevity, readability, and simplicity. Basically, I'm just looking for a more elegant solution. What improvements can I make? ...
4
votes
2answers
95 views

Java CLI Program Commands

As I was creating a CLI program, I realized having a ton of switch/if-then statements was a messy way to process user input. So, I set up a way to dynamically create commands as I added modules (...
1
vote
2answers
61 views

Calculate fractions of positive, negative and zeros

Find the fractions for, all positive numbers, all negative numbers and zeros in a given set of integer array. I wrote the below program. If you see any improvements required, please feel free to ...
2
votes
1answer
74 views

Console argument parsing and output printing in c#

I have a console application, which uses Ndesk.Options to parse console arguments, request weather data and print them. I am looking primarily for code style suggestions. This is the code, which ...
2
votes
0answers
201 views

Console command parser for my custom Libgdx console (gamedev)

For a game I'm writing using LibGDX framework and Kotlin language, I've decided to make a dev console. This is a WIP line parser. Since there's already a decent amount of code written I've decided to ...
4
votes
1answer
391 views

Display a List<T> in Console

I was searching for a way to display a List<T> with n elements in a user friendly and easy to handle way within the console application. So I wrote this ...
0
votes
1answer
56 views
25
votes
4answers
3k views

Loading… animating dots in C

I've recently wanted to make a "Loading..." display in C where the dots print one at a time in order and then reset: Suprisingly, there isn't much on the internet for doing this well, so I figured I ...
10
votes
1answer
173 views

Autocompleting console input

Yesterday I stumbled upon a Stack Overflow question that asked if it was possible to implement Tab-triggered auto-completion in a console application. I thought that was an interesting idea, so I ...
3
votes
3answers
530 views

BMI calculator in Python

This is my first attempt at writing a programme: a BMI calculator written in Python. Please give me feedback on the programme overall, as well as how easy the code is to interpret and adapt. ...
-1
votes
2answers
94 views

Object-oriented console adventure

I have been messing around with practicing some c++ making a little console game, and I would like to receive some advice and tips on how to improve my code. Some of the code is not done, meaning ...
6
votes
1answer
174 views

Emails, emails everywhere

My job entails me to send a lot of emails. I'm really bad at typing so I decided to create a program to do it for me. I've created an email generation tool (originally posted here.) I've changed ...
6
votes
1answer
109 views

Coloured bash prompt including git status and previous exit code

I wanted to create a short, informational and colourful prompt. My prompt includes: Exit status of last command (if not 0) Distinctive changes when root rsync-...
3
votes
0answers
28 views

Get only intended input from user through the console

I finally worked out all of the bugs in this bit of code. I'm pretty proud of it and I wanted to give it to all of you so that you could have it if you wanted it for any console programs that you make....
4
votes
2answers
942 views

Minesweeper C++

This is my improvement of a minesweeper game I took from the internet, which I am quite proud of. Nevertheless I am willing to hear your opinions, suggestions, and comments. ...
10
votes
0answers
172 views

Using argparse module within cmd interface

I've created an application that uses a cmd interface. It has multiple levels, and the number of available commands and their complexity is growing. As such, I need to generalise argument parsing - of ...
0
votes
1answer
192 views

How to flatten multiple nested node readline questions?

Say I'm creating a simple CLI. I want to use native node readline module to take in some input from user at prompt. I thought of this : ...
3
votes
3answers
62 views

Console Worker Follow-Up

A few hours ago I posted a similar question but this is a follow-up, I have revised the code and added and removed certain lines of code and hopefully improved it a bit, I just brought it here for a ...
2
votes
2answers
52 views

ConsoleWorker update console timer with how long application has been open

earlier I coded a quick console worker that runs a timer every 1 second and updates the consoles timer with how long the app has been open, how can I improve this? ...
5
votes
3answers
136 views

Console RPG - show cycle optimization

I have this RPG game and this has elements such as the map, the monsters and the items. The monsters and the items are stored in Lists and every time I want to show ...
3
votes
1answer
121 views

Connect Four in Java for two human players

Connect Four kinda caught my eye, and I decided to start from the very basics. Here I have bare-bones implementation for playing the game between two human players on the command line: Board.java <...
1
vote
2answers
41 views

Countdown Timer for Tests

I created this countdown timer as a tool to count down the remaining time on a test a few months ago. However, I looked at the code today and it looks like it needs some improvement, but I'm not sure ...
4
votes
2answers
113 views