A logical subdivision of a larger, more complex system.

learn more… | top users | synonyms

1
vote
1answer
58 views

Calling a Class Method on a Module

I have a module (in file dialect.rb) defined as such: ...
2
votes
0answers
85 views

Improvements to an Angular ScrollSpy module

Things that I'm not sure about: Whether this works in all use cases - alongside routing and within templates etc Am I polluting the scope with all these variables? This seems to be the easiest way ...
5
votes
1answer
245 views

Avoiding RequireJS circular dependencies

My app module bootstraps a Backbone.js application. I need app to be available in every other view for easy access to router, ...
3
votes
4answers
130 views

A package for sort algorithms

I'm trying to learn basic algorithms which are typically taught in an introduction to CS course, which is usually taught in a compiled language like Java. However, I want to focus on JavaScript, so I ...
2
votes
1answer
86 views

Javascript code pattern

I have been working on a javascript heavy project. There are sales, purchases, reports etc. What I've done is created a separate module for each i.e. a separate module for each i.e. a separate one for ...
1
vote
0answers
72 views

Javascript slider module and extending it further

i created this module, and i'm wondering if i did a good job. How would an experienced javascript developer improve this simple slider module further? Like, let's say that you want to use this module ...
2
votes
2answers
99 views

Finding correct format? Arrays and Modulation

I am fairly new to programming and I am having difficulty modulating the following code. The program reads a file, selects certain requirements, and displays them. I have tried to use passing arrays ...
4
votes
1answer
133 views

Loading 'Plugins' in Ruby

I have written a plugin loader in Ruby, and I would like to know if it uses the best technique to handle classes, or if anyone has any recommendations on how to improve my code. I have written a ...
2
votes
1answer
120 views

Correctly dealing with closures and modularity in Javascript

The code below is designed to deal with this situation: There is a Battle environment with Characters; these Characters obviously have certain characteristics and abilities, and they need to be ...
0
votes
1answer
234 views

A flexible Ruby Observable module

I was learning a bit about about observers. Ruby has an Observable module, but I decided to make my own with a few tweaks. The first important feature is that this ...
2
votes
1answer
516 views

Javascript modules loading with eval()

Recently i asked to use eval() for a module function. Now i ended up doing a very weird function which does what i want. I like the idea i made it but im not so sure if this is state of the art, or ...
1
vote
1answer
101 views

Mixin both instance and class methods in Ruby

I have a Ruby class into which I want to include both class and instance methods. Following the pattern described in "Ruby Pattern: Extend through Include", I'm currently using the following: ...
2
votes
2answers
181 views

Criticize my first Python module please

This is a Python module I have just finished writing which I plan to use at project Euler. Please let me know how I have done and what I could do to improve it. ...
4
votes
1answer
379 views

Monitor filesystem for continuous integration and build

I've written a simple Python module that depends on watchdog to monitor for modified files, then runs various integration and build processes. I'm fairly new to Python, so I'd appreciate all ...
3
votes
1answer
109 views

JavaScript templating language: ivy-markup

This library is a markup parser which is intended to be used in node.js and browser environment. I've decided to use Jasmine for tests. The library's name is ivy-markup. URL: ...
3
votes
4answers
231 views

What is the shortest snippet that emulates `include` in JavaScript without third-party scripts?

JavaScript doesn't offer a module system. There are many third-party solutions, like require.js or jQuery's $.getScript. Most, ...
4
votes
1answer
878 views

How are my javascript module pattern and promise pattern?

I'm working on an app that downloads some SVG paths from a server and draws them. Anything in here is open to critique, but specifically I'd like to review my use of a module pattern and my ...