A mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks.
3
votes
0answers
52 views
Console Command module (in-game console or base for script engine)
I've created a console/terminal command handling module that allows the programmer to bind functions to a command name and later execute them from std::string. What's new is that it handles most stuff ...
10
votes
3answers
93 views
Counting characters
I'm a beginner at coding, and I am looking to improve the structure of how I write code and will take any tips. Posted a simple program that takes your name as input, then runs the string through a ...
1
vote
0answers
34 views
Pipeline processing for a command line interface (CLI) program
I currently have this code that is controlling my CLI flow:
...
2
votes
1answer
59 views
Non-curses pager in C (revision 2)
In this revision (follow-up of this post) I've fixed reading from stdin, and also tried to minimise the damage caused by typing additional characters. You might want to see my original post on this.
...
7
votes
1answer
356 views
Non-curses pager in C
I have written a pager in C that is supposed to be used in systems where curses is not installed (or broken). It can also be used as a system-wide pager, it works ...
2
votes
0answers
25 views
Command-line ssh address book app
I'm trying to learn a bit about Golang and decided to try out building an SSH address book command-line app. I used a YAML library to serialize and store data in a configuration file. The app has a ...
2
votes
2answers
51 views
Flashcard memory training
I have written a simple flashcard program that runs in the terminal:
It loads the cards from an ordinary .txt file.
It provides a way to add flashcard from within ...
-5
votes
1answer
152 views
Blinking console start menu
gotoxy() allows you to place the blinking text wherever you want. I wasn't able to get it to behave the way I wanted, so you will notice I had to insert a bunch of ...
1
vote
0answers
42 views
Node JS Beginner's CLI Game of Life
I have finished writing my first node app that is a CLI app that runs Conway's Game of Life. I am looking for feedback on things that might not have been done the node way and what I can do to better ...
4
votes
1answer
50 views
Parsing a command line
I've written an object which allows parsing and serializing a command line. I don't in any way consider this done, but this is the beginning of it. I know there are other implementations out there ...
3
votes
1answer
52 views
Ruby Command Line Tic-Tac-Toe
The following is my implementation of a command-line Tic-Tac-Toe game, written in Ruby. This was my first attempt at practicing object-oriented design principles.
...
7
votes
2answers
198 views
Small “Grid Battle” console game
This is my first attempt to make a game on my own. I just want to see if anyone has any comments. Am I doing things, at least, sort of alright? Is there a better way I could deal with the input?
...
5
votes
1answer
43 views
Sokoban text clone
I rewrote this simple, list-based Sokoban implementation a few times, trying to make it better. Right now, I'm stuck without ideas, but I still feel there is room for improvement, specially in ...
2
votes
2answers
46 views
Simple ConsoleWorker
This class updates the console's title so it can tell the person using it the programs uptime, which can be pretty useful. The class holds a timer and each time the timer executes it will call the ...
18
votes
3answers
1k views
“Up” script for moving up directories quickly
A long time ago I created a script for moving up directories very quickly in the command line using the command up. You can find usage notes here.
It's a very ...
7
votes
1answer
106 views
Simple console Snake game following GRASP
I would like to know if there is anything that I missed following the GRASP patterns.
The Main Controller class:
...
2
votes
1answer
65 views
Tagging the directories and switching between them by tags
MOTIVATION
I have this small software package that allow users to maintain a simple text file that looks like
tag1 path1
tag2 path2
.
.
.
For example, it may ...
4
votes
3answers
955 views
3
votes
3answers
364 views
ATM Console Program
I decided to write an ATM program in my favourite programming language, C#.
Tested with a few numbers and I am confident it will give correct output for any valid input:
...
4
votes
2answers
50 views
m3u file collector
I'm new to Python and wrote this code for collecting all files in an m3u (playlist) file and copying them into a directory.
...
3
votes
2answers
95 views
Bash script to capture error message and change exit status
I'm working with the Perforce command line client. I ...
2
votes
0answers
42 views
Console User Interface Framework
I've been learning Scala and I'd love to get your feedback in order to improve. As an exercise I made a simple framework for creating command-line user interfaces.
Gist
...
2
votes
0answers
64 views
General Tic Tac Toe with Alpha-beta pruning in Java
I like toy AI and what can be better than starting from Tic Tac Toe. Basically, this is a command line program that asks the user to input
the height of the game field,
the width of the game field,
...
3
votes
0answers
51 views
Simple REPL command parser in Java
I have this tiny library for implementing simple command line languages. It is not flexible enough for handling actual programming languages, but hopefully it may help implementing simpler REPL's ...
2
votes
3answers
322 views
Determining if a possible new entry already exists in a dataset
For example, if I have the following data table layout:
...
6
votes
2answers
108 views
Ruby command line Mastermind game with AI
I've created a small command-line 'Mastermind' game using Ruby. The intent of the project (aside from having fun in the build!) was to learn and emphasize OOP concepts and principles.
The game has ...
1
vote
2answers
259 views
Accepting a positive integer from either a command-line argument or System.in
I've been doing a lot of programs for classes that require a prompt from the program. I thought it would be much faster for me to rapidly test inputs if I didn't have to execute the program and then ...
5
votes
1answer
578 views
Design patterns for console commands
I've made a pretty standard console in which you type a command and it does something. However, the issue that comes to my mind is scaling: if I want to add hundreds of commands, I have to manually ...
3
votes
1answer
51 views
Binary Bayes network classifier in Java - Part I/II - follow-up
TERMINOLOGY
We are given a directed acyclic graph (dag) \$G = (V, A)\$, where \$V\$ is the set of nodes and \$A \subseteq V \times V\$ is the set of directed arcs, and a weight function \$p \colon V ...
11
votes
1answer
151 views
Binary Bayes network classifier in Java - Part I/II
I was working on the binary Bayesian network classifier I asked about earlier.
See also Part II/II.
See also the next iteration of Part I.
TERMINOLOGY
We are given a directed acyclic graph (dag) ...
1
vote
2answers
54 views
Argument parser for a word count and/or line count program
How to make code dry in this example? My program is working, but I want to improve it by shorting my code.
.
...
6
votes
2answers
131 views
Simple console snake game in Python
Here's a simple snake game I implemented in Python, which works in a console. It's not complete yet (doesn't generate food yet, and no scoring or difficulty levels), but it works. I would be really ...
5
votes
1answer
147 views
Terminating an Active Directory user
I'm writing an AD Termination script for work. I'm new to PowerShell and was wondering if multiple commands within PowerShell switch statement is okay to do:
...
4
votes
1answer
103 views
Converting uploaded video and saving preview images
I'm coding a basic video upload system for a client. The uploaded videos will live on the page using the HTML5 video element.
Essentially what I've done is call the following PHP script ...
21
votes
5answers
2k views
A completely repetitive console prompt, a completely repetitive console prompt
So I wrote this for my Mandelbrot Generator, to collect and use input from the user, and I made it dynamic enough to be useful anywhere.
I'm really interested in all critiques of it, as I'm going to ...
3
votes
3answers
378 views
Loop at specific folder in outlook to look for specific title
I created a C# console program to loop through a specific folder in Outlook to look for a specific email subject. When I run it on my computer (multi-core CPU), it didn't use up 100% of the CPU ...
5
votes
2answers
340 views
Prompting for five test scores and printing the average
I am not sure how to properly make this readable. I have been trying to find examples online but I cannot find any that are specific to this simple program.
...
5
votes
2answers
229 views
Print output one word per line - K&R Exercise 1-12
When writing this code I found myself getting more and more complex. When I got to the solution I trimmed the excess parts I'd thought I needed from before, but didn't actually need. The example of ...
13
votes
2answers
558 views
Full C++ Snake game
I managed to finish my approach on the legendary Snake game. You move around with the WASD keys. I would like to hear your opinion and maybe ideas on how I can improve frame rate because now it sort ...
2
votes
2answers
118 views
Hangman game school project
This is a school project and took me a while to write the code. Any help to improve my code is welcome!
...
7
votes
1answer
135 views
Console Calculator in C#
This is a calculator I've made in C#. Is there any way to improve it? Surely there is a way to get rid of all the ifs that are nested inside one another.
...
12
votes
1answer
194 views
Racetrack in Java
Racetrack:
The August community challenge is to implement a program that plays the Racetrack game. Each player starts with an integer position on a square grid. On each turn, the current player can ...
6
votes
1answer
141 views
ANSI colors cross platform
I am trying to write for both NT and POSIX (my two usual platforms) and have come up with the code below. The clrs code I refer to is apparently from blender build ...
6
votes
1answer
104 views
printf-style string formatter
As part of a larger project I'm working on, I've made a function that aims to replicate, as best as I can, the placeholder part of the console.log() function usable ...
2
votes
1answer
68 views
11
votes
2answers
157 views
A low tech approach to measuring game speed
Whilst developing a game I needed a delay routine capable of doing delays
ranging from 0.5 sec to just a few msec. The obvious choice was to use
the BIOS delay function 86h on int 15h. In a true real ...
10
votes
5answers
1k views
Marijuana information program
I made a simple marijuana information program in which I give the user a list of strains and give the user information about it, like: effects, medical, negatives, and its cannabis type ...
-1
votes
1answer
346 views
Console-based Rock-Paper-Scissors game
I just began my C# debut and was just wondering if this Rock-Paper-Scissor console app is good and flexible.
...
3
votes
1answer
77 views
Pass the password back
This code simply receives a very basic 'password' (numbers, letters, nothing fancy). After you press enter, it will display it back. The only special key I'm handling is backspace (code ...
4
votes
1answer
28 views
Simple local source control - Part 2
I've refactored the previous version of my local source control, and revised a few things. It's mostly the same, but there are a few minor differences, like the argument separator, one new command, ...