# Tag Info

## Hot answers tagged plugin

Accepted

### Pluggin' in Plugins

I think surely there must be a way to avoid so many ugly looking else statements. Return early, for example: ...
• 24.9k

### Pluggin' in Plugins

I'm aware of return early but the opportunity is unfortunately quite rare Two levels removed as @tim's suggestions, it's quite significant. With his other suggestions applied too, the whole thing ...
• 107k
Accepted

### Responsive text by JavaScript

Thoughts: Variable names: I hate typing unnecessary text as much as the next dev, but variable names are not a good place to skimp. It's one thing when using i as an index variable, for example, but ...
• 431
Accepted

### Voting plugin for an IRC bot

Grumble, grumble. Browser tab crashed and SO didn't save my draft apparently. I'll try to recreate everything I remember writing: First off, your question is fantastically written. Often one of the ...
• 2,834

### Showing a list of plugins to filter

Early Return You can return early to reduce the nesting of your if statements: if (plugins.isEmpty()) { plugin = null; return; } Also note that I ...
• 24.9k

• 166
Accepted

### jQuery carousel plugin

From a once over; Very well commented Assigning element to element is overkill here and does nothing: ...
• 32.7k

### jQuery plugin that makes a slider out of an <ul> list

One thing that jumps out to me is locking your plugin to one element: ...
• 567

### Sublime Text plugin to modify text before it's pasted

If your intention is to escape certain characters by prefixing them with backslashes, you would be better off with a function that performs that specific task, rather than a generalized function that ...
• 142k
Accepted

### Plugin for communication protocols in browser(s)

Interesting question, 2 upfront general notes first: Run your code through JsHint.com, there are a ton of little things you could fix Run your code through a beautifier, there are a ton of ...
• 32.7k

### Scanning a directory for plugins and loading them

Since you seem to be using Python 3, you could use the new pathlib module from Python 3.4 to have a Path object. Since paths ...
• 19.9k
Accepted

### Scanning a directory for plugins and loading them

I started a project with a structure similar to the one you detailed: My first order of business was to move the import plugins out of the ...
• 2,794
Accepted

### Metalsmith plugin for stripping UTF8 BOM from files

As @konijn said in the comments, it looks pretty OK, though I do have some comments. I don't know anything about Metalsmith specifically, so it'll just be more general JS/Node comments. Firstly, it ...
• 32.9k

### Animating a block of HTML on scroll

When you have multiple conditions on the same value, then you should chain the conditions using else if. For example in most in most of the conditions on ...
• 107k

### Animating a block of HTML on scroll

loadValues() is rather problematic. It checks for each possible data-attribute and if present overrides the value in settings. These repeated checks are just ...
• 2,064

### jQuery plugin that makes a slider out of an <ul> list

I saw something that could make your code more dry... ...
• 28.5k

...
• 13.2k
Accepted

### Bash plugin to setup project for books

Single responsibility principle The input validating functions do two things: Read input (when invoked without parameters) Validate input It would be better to make a function do just one thing ...
• 107k
Accepted

### Reduce list manipulation for QGIS layer tree

Your lists manipulations are indeed messy. It seems like you are trying to perform multiple things at once and thus you end up mixing variables that serve different purposes into the same loops. ...

### Monitoring params via JMX

First impressions can make a huge impact when assessing someone's code. Let's look at your Main class: ...
• 96.8k

### Showing a list of plugins to filter

A few things that are jumping me here, though it might get a little harsh :( @NotNull @DataModel("plugins") List<Plugin> plugins; This one is smelly, ...
• 25k

### Scanning a directory for plugins and loading them

After several more tries, I came up with a solution with some advantages: slightly simpler, using __import__ instead of the imp ...
• 107k

### Small jQuery mobile plugin to handle touch events

Architecture Right away, something jumps out at me about the overall architecture. You have written this as a jQuery plugin, but it hardly relies on jQuery at all. On the user's end of things, it has ...
• 4,531