Questions tagged [modules]
A logical subdivision of a larger, more complex system.
120
questions
5
votes
1
answer
399
views
Noughts & Crosses (tic-tac-toe) revisited (using C++20 modules)
This is a development of Nought and Crosses (tic-tac-toe) in C++ a learning project in C++. This time using C++20 modules. As before, any suggestions on improvements in style, clarity (or anything ...
1
vote
1
answer
150
views
Version 2 of my Python Password Manager
I am still just starting out with python and just finished learning about classes, with no further understanding on many python modules. With this in mind, this is one of the biggest/hardest things I ...
4
votes
2
answers
221
views
Test generator I made for practice
Made this generator to practice using imports from other modules and better readability for coding. What could I have done better and what did I do wrong?
File called test_generator.py
...
1
vote
0
answers
152
views
Restaurant Management follows MVC pattern
I am writing the Restaurant Management homework which must be following the MVC pattern. My Menu model has two parts: Drink menu and Food menu.
With Food menu, it separates into three different types ...
2
votes
1
answer
122
views
Program for creating custom directory listings
The following code was written to create custom directory listings for the Abyss Web Server. It attempts to provide an improved example of the included documentation for doing so in Python. However, ...
1
vote
2
answers
80
views
UPDATE on Newspaper Bill Calculator CLI with Python (1 of 3, Core)
Code is posted after explanation.
Due to the size of the project, this is being posted in three separate posts. This also ensures each post is more focused.
Post 2 of 3, CLI: UPDATE 1 on Newspaper ...
3
votes
0
answers
84
views
Tic-Tac-Toe Backend for Commercial Use
I've been working on a tic-tac-toe backend for an interactive commercial-use display, and was wondering if I could get some feedback on it?
...
1
vote
1
answer
124
views
Organizing things together to form a minimum viable Scraper App
This is a follow-up of my group of scraper questions starting from here.
I have thus far, with the help of @Reinderien, written 4 separate "modules" that expose a ...
4
votes
0
answers
56
views
How to structure and write exchangable calculation models (in python3 modules)?
I do research and compare different numeric models to each other. Therefore, I want to easily switch out the numeric models in my simulations and evaluation code.
Some models work in cartesian ...
3
votes
0
answers
98
views
Weather app using es6 modules
i have recently built this simple weather-app.
I would be happy to get some criticisms to improve my code.
Structure:
app.js:
...
3
votes
1
answer
105
views
All core MediaWiki upgrade script (round 2)
The following script upgrades an existing, all core (no add ons) MediaWiki install. I run it with set -x for debugging (I avoid ...
5
votes
1
answer
185
views
Express.js blogging application
I have put together a blogging application with Express, EJS and MongoDB.
There is a public, front-end part and a dashboard. In index.js I have:
...
2
votes
0
answers
223
views
naming convention for atomic design
We follow atomic design principle. More here
I have a react app where we put small components like button, label etc and call it atoms.
In that I have made loading and Error component responsible for ...
4
votes
1
answer
292
views
Modular Design Patterns in C
I have created a modular design pattern which provide a single interface that can be used create instances with swapable back-end components, however I'm not entirely satisfied with it.
My practical ...
2
votes
1
answer
83
views
To Do List Project - app lets you make projects and inside of this projects you can save to-dos
I have built a To Do App in Javascript, using Webpack and some modules. The app lets you store projects (School, Sport, Grocery, etc.)... And inside these projects, you can store todo items... You can ...
1
vote
1
answer
56
views
Ruby: Database Authentication Module
I have created a module that validates the credentials against different databases.
...
3
votes
1
answer
48
views
(Improved) get-release npm module
Improved version of the original question
I've created a simple npm module and CLI program to get the latest GitHub and Bitbucket release from their APIs using Node.js. Please tell me if there's ...
9
votes
1
answer
68
views
get-release npm module
Solved, question with improved code
I've created a simple npm module and CLI program to get the latest GitHub and Bitbucket release from their APIs using Node.js. Please tell me if there's anything to ...
3
votes
2
answers
65
views
Adding and Retrieving Players in a simple Pre-Flop Poker Hud with Local Storage
I am building a browser based Pre-Flop HUD that for now just tracks VPIP, PFR and number of hands played for an opponent (https://pokercopilot.com/poker-statistics/vpip-pfr). I am currently using ...
0
votes
1
answer
218
views
NodeJS - Auto Module Loader
I took some time to try and solve a problem. I am building a basic Node + Express API. In the app I have created a models folder and will be adding new models as I continue development.
I attempted ...
1
vote
1
answer
35
views
Customized method for dataframe in my analysis module
Please download the file and save in home directory and extract it:
https://www.dropbox.com/s/swtw8bk35zr1i6d/analyse.7z?dl=0
I can get some warrants info.
...
14
votes
2
answers
36k
views
Using async / await with dynamic import() for ES6 modules
I am experimenting with the best way to standardise my dynamic import() expressions when importing javascript modules.
import() ...
3
votes
3
answers
251
views
Linear Regression Class in Python
I have recently been brushing up on my statistics and calculus and wanted to implement Linear Regression, the code will be for a calculus/statistics library I am working on (I know there are libraries ...
2
votes
1
answer
102
views
Python Etiquette for Functions in Multiple Files
Here's the context: My code is meant to automate testing of OCR (Image to Text programs) for a science project which could easily be read and understood my others. The code includes sets of functions ...
6
votes
1
answer
75
views
Raku / Perl6: A module to enable escape codes in the win32 console, naming suggestions
I have this little project i am about to release.
https://github.com/holli-holzer/perl6-Win-VT
I would be happy about a code review and suggestions for a better name.
Discussion in IRC yielded ...
3
votes
1
answer
2k
views
Snippet to get all local classes from a module
I'm working on a project which due to the complexity of the business logic has had to pull out some classes to do computation related to some values in a database. To link the code and database, both ...
3
votes
0
answers
55
views
Eassily create a logger in python for many modules with loglevel set according to command line arguments
I'm trying to learn writing python programs in a modular way as much as possible. One of the issues I've had difficulty to solve is parsing command line arguments (with ...
2
votes
0
answers
200
views
Addition of defaults to components in AngularJS
I wrote a small module in typescript that augments the angularjs registerComponent function to provide a new way of default values for the component controller.
...
1
vote
1
answer
90
views
Reusable vector module with tests
I'm learning rust with mostly a background in managed languages. I have a little C background.
As a learning project I am re-implementing a linear-transformations library I've been working on in ...
2
votes
1
answer
704
views
Python 3 adventure game in modules
I have been learning Python 3 for about a year now. I have been looking for a project to do instead of just going through tutorials and completing some Code Wars challenges. One website suggested that ...
1
vote
0
answers
565
views
3
votes
1
answer
177
views
JavaScript module to filter data and render it as a table
I want to organize some JavaScript code using module pattern.
The scenario is as follows: Having the following html table created dynamically
...
2
votes
1
answer
162
views
Mocking an F# primality tester
I would like to ask 2 questions about the modularization of an F# file. The code is just a working example of prime factorization, but that's not the main topic. I have a main file (PrimeFactors.fs), ...
2
votes
2
answers
188
views
Mapping one array onto another where columns from first array become rows in second array
I am processing an unformatted CSV, New-AmbSYS-to-2018-Jan.csv, from NHS England Ambulance Quality Indicators, by reading its contents into an array, and carrying out a number of steps that lead to a ...
2
votes
0
answers
133
views
Bundling JavaScript modules into a single file
I was just going through Modular Design Patterns in JavaScript and I came across bundlers like browserify and webpack. They ...
0
votes
3
answers
98
views
Modular square checker in ANSI-C
I've written a simple program using modular programming in C (using a lot of functions), that gets a line of input from the user, and then prints if a given input forms a magic square or not.
The ...
4
votes
0
answers
90
views
Self-notification modules
Specifically, I have been working my way through Al Sweigart's Automate the Boring Stuff and was inspired to write my own util/module that I can use for sending myself SMS messages via Twilio. The ...
5
votes
4
answers
3k
views
Simple Java program - Coding bat sumNumbers
The problem is stated as follows:
Given a string, return the sum of the numbers appearing in the string, ignoring all other characters. A number is a series of 1 or more digit chars in a row. (Note: ...
6
votes
1
answer
87
views
Laser cutter daily reports parser
In my Python journey I was looking for a "real life" problem and I think I have found a good one at my current work.
The laser CNC machine I'm working with generates reports that contains timings of ...
9
votes
2
answers
2k
views
Python Export Decorator
In Python, we use __all__ to explicitly denote the public API of a module or package. That looks like this:
...
2
votes
0
answers
211
views
Applying CSS styling based on different pages in React
Short Story: I created this website last year in plain HTML, CSS, JS which I can't even remember how I wrote that and now I can't even edit the website without breaking it. So, I'm re-writing ...
3
votes
1
answer
55
views
Copying and resizing pictures, depending on user input
I'm working on a macro which copies some pictures to a new sheet, then resizes the pictures. The user can input a number 1, 2, ..., 5 and, depending on the number, the macro returns a different set of ...
2
votes
2
answers
236
views
API with revealing module pattern in Javascript
I'm working on a project where I want to create a API that can be used to do some mathmatical calculations.
Here are the important aspects:
I used the revealing module pattern
I added method ...
3
votes
1
answer
1k
views
JS calculator module using functional programming
All of the code is self-explanatory and pretty much complete.
What the code does:
Calculates using onscreen numerics and operators
Validates any erroneous operations, such as 4 ** 8 or *9
Good ...
6
votes
1
answer
2k
views
Pig Dice Game: Luck game to get to 100 points
I have a dice game called Pig to play (a simple google search will show rules, they are included in my .js file as well). I am new to JavaScript and the main goal of this code review is to give me an ...
2
votes
1
answer
58
views
NodeJS module to calculate linear motion
I am on the process of changing jobs, so I would like to get an idea of what I do wrong in order to improve.
For this, I have created a small node module. It's very simple; it calculates linear ...
2
votes
0
answers
67
views
Choosing structure of fields validation module in Swift
I've implemented abstract module for fields validation according to this MVP clean architecture repo.
In a nutshell I've created ValidationGateway protocol ...
4
votes
1
answer
252
views
A hash cracker for Python 3.0 and up (module)
I've worked on pycrack.py to improve it (hopefully). New features:
Renamed to kronos (kronos.py).
Attack modes:
Bruteforce;
Wordlist attack.
Portability:
Kronos can run on Windows, MacOS and Linux,...
5
votes
2
answers
469
views
Optimizing a Text-To-Speech program with a lot of repetition
I have a Text-To-Speech program that will ask the user to input text, convert it to speech and then output that speech from within Pygame by loading the file into memory, getting Pygame to play the ...
6
votes
2
answers
150
views
MongoDB Perl Wrapper
I'm trying to create a custom "mongodb perl wrapper".
I created the following perl module, which local on my machine runs.
My questions to the community are:
Would you create the module different?
Do ...