Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [modules]

A logical subdivision of a larger, more complex system.

Filter by
Sorted by
Tagged with
0 votes
0 answers
49 views

Asynchronously download lists of scholarships

TL;DR There is a script here that handles async stuff. Another script imports that file and uses content from it as a "normal" function. Please help me evaluate my async code, I am new to ...
user avatar
3 votes
0 answers
58 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? ...
user avatar
  • 131
1 vote
1 answer
109 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 ...
user avatar
  • 321
4 votes
0 answers
53 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 ...
user avatar
3 votes
0 answers
47 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: ...
user avatar
3 votes
1 answer
100 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 ...
user avatar
5 votes
1 answer
156 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: ...
user avatar
2 votes
0 answers
142 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 ...
user avatar
4 votes
1 answer
184 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 ...
user avatar
1 vote
0 answers
32 views

Tell GUI to update itself by passing self to module?

I hope this is the right spot to ask this, if not tell me and I will delete the post. I need my GUI/program to update whenever the active_bots variable is changed, ...
user avatar
  • 11
2 votes
1 answer
77 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 ...
user avatar
1 vote
1 answer
53 views

Ruby: Database Authentication Module

I have created a module that validates the credentials against different databases. ...
user avatar
3 votes
1 answer
38 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 ...
user avatar
9 votes
1 answer
57 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 ...
user avatar
0 votes
1 answer
89 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 ...
user avatar
1 vote
1 answer
29 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. ...
user avatar
  • 111
10 votes
2 answers
15k 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() ...
user avatar
3 votes
3 answers
172 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 ...
user avatar
2 votes
1 answer
87 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 ...
user avatar
  • 193
6 votes
1 answer
66 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 ...
user avatar
  • 221
3 votes
1 answer
47 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 ...
user avatar
  • 8,717
3 votes
0 answers
48 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 ...
user avatar
2 votes
0 answers
164 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. ...
user avatar
1 vote
1 answer
85 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 ...
user avatar
2 votes
1 answer
644 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 ...
user avatar
1 vote
0 answers
465 views

Creating a logger in the top level of my react app and then using it in other components as I need it

...
user avatar
3 votes
1 answer
135 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 ...
user avatar
2 votes
1 answer
155 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), ...
user avatar
  • 123
2 votes
2 answers
173 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 ...
user avatar
  • 375
2 votes
0 answers
113 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 ...
user avatar
  • 307
0 votes
3 answers
91 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 ...
user avatar
4 votes
0 answers
67 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 ...
user avatar
  • 41
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: ...
user avatar
6 votes
1 answer
78 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 ...
user avatar
  • 163
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: ...
user avatar
  • 1,538
2 votes
0 answers
188 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 ...
user avatar
3 votes
1 answer
51 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 ...
user avatar
  • 131
2 votes
2 answers
228 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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
2 votes
1 answer
40 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 ...
user avatar
  • 123
2 votes
0 answers
62 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 ...
user avatar
  • 211
4 votes
1 answer
226 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,...
user avatar
  • 4,492
5 votes
2 answers
451 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 ...
user avatar
  • 419
6 votes
2 answers
134 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 ...
user avatar
  • 491
4 votes
1 answer
87 views

Pomodoro timer module

I have been learning javascript for some time and have just finished my first piece of code that not only actually does something, but is also longer than a few lines of code. It most likely is pretty ...
user avatar
  • 41
4 votes
2 answers
371 views

Cursor module for a text-editor

A few weeks ago, I had started to write a text-editor in C++ using SFML library. The work is now paused pretty much because I am a lazy freak. So, I thought I might use this passive time to get ...
user avatar
0 votes
2 answers
119 views

Simple SASS & BEM module for social feed widgets

I've been messing around with SASS and BEM for the last few months. I recently starting 'thinking' in modular in terms of building out my applications (for re-usability and simplicity). I am coding ...
user avatar
  • 127
8 votes
1 answer
681 views

Bitex - Cryptocurrency Exchange API Framework for Python

BitEx is a Python module I've been working on for a little over 9 months now, as a side project. It was published 6 months ago on GitHub, and as I edge closer to my 1.0 release, I wanted to take the ...
user avatar
  • 227
2 votes
0 answers
82 views

Simple JavaScript module to manipulate CSS

After posting some of this code on Stack Overflow I was told to have a look here and get some feedback. I am having fun building a light JavaScript framework and have copied this pattern. It works ...
user avatar
  • 121