A logical subdivision of a larger, more complex system.

learn more… | top users | synonyms

5
votes
0answers
25 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 ...
3
votes
0answers
57 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 ...
0
votes
1answer
40 views

Ad-hoc analytics script to module/package

I have a text analytics process that I complete for work. This process mines text for different Twitter accounts and finds patterns in the tweets. The actual machine learning pipeline is much more ...
0
votes
0answers
48 views

Library to mimic canvas using divs

I was recently developing some canvas library and (mimicking canvas using div). The requirement was to develop something without using any third-party library. The sample app had a asset library and ...
3
votes
0answers
53 views

Read in file, Filter out records, output results

I have been working on a project for some time and have let one Python file grow into a huge file that tries to do everything. The structure is pretty flat and I don't like it. I've used other ...
1
vote
0answers
42 views

Dynamically loading and naming controllers in nodejs and express

I'm trying to write a module to dynamically load all the files from my "controllers" folder, and then add them to the main express instance as routers. The files inside the controllers export an ...
3
votes
1answer
67 views

jQuery module to edit HTML elements

I need to turn a lot of html elements as editable elements. You will double click on the element to edit, press enter to validate (send a PUT to the RESTapi), press esc to undo. I've written this ...
1
vote
0answers
11 views

Simple ES6 JavaScript Module “Loader” (semi follow-up)

I have recently updated my JavaScript Module "Loader" to ES6 and would like some feedback on the code and how "ES6-y" it is. I previously asked about the ES5 version of my code here and I have ...
7
votes
1answer
43 views

Python App that parses file for lines that match a format

I recently wrote some code that was dinged on not having well defined tests and poor modularity. Was hoping someone could review my code and give me pointers on how to create more well-defined tests (...
3
votes
1answer
27 views

Simple JavaScript Module “Loader”

I have written a simple JS module "loader" (loader is in quotes because it doesn't actually load the files) that is designed to resolve simple dependencies between modules. It is heavily inspired by ...
1
vote
0answers
16 views

Modular widget that minimizes js and css scope pollution

So, my goal with this is to create a simple login widget that does as close to nothing to the global scope as possible. The login mechanism is less important than the encapsulation. The whole script ...
1
vote
0answers
46 views

Dynamically call a function in a given module

I use the following code that is working as expected and I want to get some feedback from the community how I can Improve it... The code does the following: Get Some request with specific action ...
2
votes
0answers
54 views

jQuery form change listener, modularized using ES6

I have the following javascript code that I'm trying to modularize using ES6: ...
2
votes
0answers
149 views

Perl switch/case module

I know Perl now has given and when to simulate switch/case statements, but these are still experimental and are not guaranteed ...
2
votes
1answer
23 views

Draggable toolbar header class, inheriting from a draggable parent class

I have written a draggable parent class using a module pattern: ...
6
votes
1answer
66 views

Extendable JavaScript module that converts between camelCase, PascalCase, and underscore_case

The basic idea is that by defining three functions--recognize, dissect, and combine--...
4
votes
3answers
112 views

Status display module

I've developed a template to modularize JavaScript code I write for client work. The example below is a simple class with 1 attribute and 3 functions. Rationale: Standardized constructor to add or ...
1
vote
1answer
33 views

Making a news widget webpage

I have finished the assignment but would love some feedback. Data.json contains news articles data. Requirements for assignment: Fetch the data and render it on the page. Initially the page ...
6
votes
1answer
146 views

Modularised Document Construction

The goal: A set of configurable options, combined with a standardised data source, to produce a standardised Report. This question: One module of said document, with accompanying code. Input: (...
3
votes
2answers
127 views

Getting all divisors from an integer

I am using mod and my code works. I am wondering if there is a more efficient way to write a method that returns the total number of divisors for an integer. ...
3
votes
2answers
413 views

Python exception handler to recommend package

Consider this python 3 snippet, where when an import exception is raised, a string 'e' is created that says: "No module named ' packageName'". The goal is to simply say on exit, that the import error ...
6
votes
2answers
239 views

Snake game using a canvas

I'm trying to reach good understanding of how to build scalable modular application structure. Recently I've been practicing with canvas and rewriting one of the popular snake game realizations. I've ...
7
votes
2answers
177 views

Perl recursive copy and move functions

I know a module like this already exists on CPAN, but I wanted to write my own simplified version that accepts wildcards in the input. I don't write many Perl modules so I figured I would post the ...
3
votes
0answers
260 views

Modular Angular structure with Browserify

I am trying to create a basic angular template where all files are sorted into a modular structure and referenced using the browserify require method. I am very new to browserify and the CommonJS-...
3
votes
1answer
105 views

Somewhat less semi-primitive IRC bot - follow-up

As of now, instead of the previous 4 or 5 out of 10 (relative to my C# programming skill), I'd say I'm a solid 6, and some of that is thanks to the advice I got from the last revision. I realize the ...
0
votes
1answer
53 views

Designing a public API for a JavaScript module

I am writing a module that can access localStorage through a public API which exposes methods that allow string or array returns. It doesn't feel as though I'm ...
3
votes
1answer
101 views

Combat simulator - single page JavaScript with requirejs from a Java Applet

Single-page web app from Applet I'm seeking feedback on my first single-page web app using RequireJS and a web worker. I converted it from a Java applet, and the code is up on GitHub. It's a combat ...
1
vote
2answers
371 views

Including the necessary polyfills for every combination of browser support

My project uses a Promise polyfill and the fetch polyfill, that I am only including if the browser does not yet support it ...
2
votes
1answer
65 views

Finding expiring/expired documents

This code is to find expiring/expired documents. It was included in one of the models, say Document. Is this good approach of using constant variables which holds ...
1
vote
2answers
84 views

Separate Ajax code in separate modules

This is the first time I am working on OOJS code and I am a beginner in JS. I think I have pretty much messed it up. I am planning to modularize my code, but with the inclusion of ...
2
votes
1answer
62 views

Node.JS Twitter Count Module

I would like someone review this code and tell if it can be done better, or if the code is elegant and simple enough for the task at hand. I used code climate and I got 4/4 and my test coverage is 96%...
4
votes
0answers
481 views

RSS parser for Node.JS

I would like someone review this code and tell if it can be done better, or if the code is elegant and simple enough for the task at hand. I used code climate and I got 4/4 and my test coverage is 96%...
2
votes
1answer
113 views

Move through a basic roguelike text map

I have a basic outline for the best way I can come up with to move a character through a basic text map. I want to implement this module in my simple text RPG. I know there has to be a better way to ...
3
votes
1answer
59 views

Framework to define and require JavaScript modules

I'm working on a webapp that I use gulp to build. It uses useref to gather and concatenate/uglify the assets used in the HTML files. In this case, as things are getting concatenated, it doesn't make ...
1
vote
0answers
50 views

Sourcemap translator service

This is my first attempt to a serious Node.js application, I've tried to follow the async style of Node at my best, but I have several doubts and I am sure that this code can be massively improved. ...
7
votes
1answer
102 views

Project Euler module

I use Project Euler to teach me programming and not to submit any results. As such I look up the expected return values to double check my solutions. To organise my files I use the following folder ...
4
votes
1answer
99 views

Strategy to reduce duplicate code in many similar modules

The Situation I have created some code in the form of modules that each represent a medical questionnaire (I'm calling them Catalogs). Each different questionnaire ...
2
votes
1answer
288 views

Switching from functional jQuery code to object-oriented

I've been happily using jQuery, creating vars and binding events in my modules (which have only a little bit of JS). But recently I needed to add an anonymous functions to my code and after ...
3
votes
1answer
92 views

Listing an optional Python dependency in setup.py

I have a small project that requires a third-party module that's rarely updated (once every other year or so) and not maintained by any package management system. The context, here, is cognitive ...
3
votes
2answers
4k views

List all classes in a package directory

I have a package directory pkg with several classes that I would like to build into a convenient dict property. The structure ...
3
votes
1answer
201 views

Binary index tree optimization

I have written code for a binary index tree. My problem is that there are many functions based on the binary index tree the function stores the sum of element within a given range of binary index tree....
1
vote
0answers
49 views

Injecting required functions by synchronous script loading

I have a file HintBox.js containing a JS prototype of the same name which requires our internal JS library (call it $lib) in ...
8
votes
1answer
309 views

Loading and Using Lua Scripts

I have been experimenting with integrating Lua into Objective-C. I have tried to do the bare minimum to get Lua to compute values and return them. I did not want to use any external libraries so I ...
2
votes
1answer
70 views

Custom module of common functions

I got sick and tired of writing certain functions over and over again, so I made a module that has those functions whenever I need them. I don't use it for code I plan on sharing, so I don't need to ...
6
votes
2answers
127 views

Physics particle collisions

I have a large file that I want to refactor. My idea is to make helper classes with helper methods so that I can modularize methods. Is that a good idea? For instance before refactoring: ...
3
votes
1answer
175 views

Decoupling with a self-descriptive mediator function

I don't have a lot of experience writing libraries and just recently started thinking a lot about structure and patterns. I wrote a tiny module manager based on the facade and mediator design ...
3
votes
0answers
115 views

Implement.js JavaScript module pattern

I have been playing with a new JavaScript module pattern to see what I can come up with. I think it's quite powerful and wanted to know if it is something people would find useful? I'm looking for ...
2
votes
1answer
165 views

Am I using the JavaScript “module pattern” correctly?

I am reading this article about how you can organize JavaScript code for large projects. I am attempting to write a simple events calendar as a way to play with some of these design patterns. Using ...
4
votes
1answer
4k views

Module to validate and sum a string containing no negative numbers

To learn the language of JavaScript, I did a dojo exercise by Roy Osherove. Is there a better way to organize this so that the only method exported is add while ...
4
votes
1answer
103 views

Merging with different modules

We have an action merge for two projects. In the projects we have different modules like Feed, Files, Post etc.... ...