8
votes
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 ...
6
votes
Accepted
Update GIS Project by matching files from directory with files already loaded and apply relevant symbology
Wow. That's a lot of code. The very first thing that needs to be done with it is modularization. You need to structure your code such that named functions and/or classes encapsulate shared ...
6
votes
Accepted
NRPE script for monitoring load average
This looks pretty good. Some suggestions:
[[ is preferred over [ in Bash.
This script could benefit from ...
5
votes
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 ...
3
votes
Jekyll plugin which bundles files into a zip archive
Jörg already provided some good suggestions. The only thing I would add is that your render function contains all of your business logic and is quite difficult to ...
3
votes
Accepted
Jekyll plugin which bundles files into a zip archive
Consistency
Sometimes you use snake_case, sometimes you use camelCase for methods and local variables. Sometime you use single-...
3
votes
Accepted
Vim plugin for easy window navigation
As requested on vi.SE, here is my little view.
First, I see a great quality in most patterns you have used: autoload plugin, plug-mappings, and so on. Good work!
If I really had to nit-pick, it would ...
3
votes
Accepted
An extended JavaScript plugin for rendering radial pie charts
First off, that isn't "XML". Those are custom HTML elements.
Most of the code in typesetSinglePieChart belongs in the constructor.
You don't need the ...
3
votes
NRPE script for monitoring load average
I’d agree with all of l0b0’s answer – including the suggestion of using grep to process /proc/cpuinfo. An alternate way to count ...
3
votes
Accepted
Python toolbox for OpenStreetMap data
Some minor stuff:
I don't see where self.tools is used after initialization - can it be deleted? If you need to keep it, does it need to change? If it doesn't ...
3
votes
Accepted
Internet Relay Chat bot core with plugins system
I have the following points to make on the code:
- No logging
- No external config file for the settings (Open/Close Principal violation)
- Creating resources in the init instead of in a separate ...
2
votes
Accepted
WordPress Settings Plugin security
A cursory glance suggests the main issue is a lack of escaping on the HTML
esc_attr esc_html ...
2
votes
Accepted
Setting QProgressBar values based on selection
One idea would be to gather all your techs in a queue and iterate over that, updating the progress as you go.
Since my Python is rather Rust-y (I'm sorry for that pun), here's some pseudocode:
...
2
votes
basic jQuery plugin template
From a short review;
Please follow the lowerCamelCase naming convention, user_settings -> userSettings
In production code, never ...
2
votes
basic jQuery plugin template
In general the template looks like a good start. I noticed that the code appears to resemble the format advised in PHP-Fig's PSR-2, namely "The opening brace MUST go on its own line"1 for functions ...
2
votes
SafeBlockPopulator to ensure neighboring chunks are generated before population
Your algorithm by example: In your method hasSurrounding(), you are executing a query for each point. If for example you have current x=100 and current z=1000 and surrounding=10, you are examining ...
2
votes
AutoSuggest: Better way to implement focus after inserting a snippet
I do feel that negative numbers seems a bit backwards compared to most other libraries I have used. I am not sure what all would be involved with reworking this code to utilize positive numbers but it ...
2
votes
Accepted
NRPE script for monitoring memory usage
I don't understand why it should be a warning to have over 80% of the system RAM available. If anything needs a warning, it should be having under 20% of RAM available, right?
Reading each line into ...
2
votes
A JavaScript plugin for rendering radial pie charts
Bearing in mind that this code has successor code in An extended JavaScript plugin for rendering radial pie charts, which appears to have been modified significantly, I still noticed review aspects.
D....
1
vote
Display WordPress Custom Post Types with ACF-Fields on a Google map
On maps-script.js i've seen a couple of setTimeout to hide and show the spinner element, you could create custom events and add listeners to them, so you don't need to wait more or less than needed.
<...
1
vote
Accepted
Simple Bespoke WordPress Integration Plugin
It's a good idea with frameworks to follow the method calls to see what you're actually doing, Wordpress is one of the most exploited frameworks out there and thus has fairly good security ...
1
vote
Dynamically Generating XML Deserialization Classes / Code: Part I, Reading
Program to Interfaces, not Implementations
The code base heavily depends on ArrayList. For example in Reading
...
1
vote
jQuery plugin to load a full-page view window
Feedback
Overall the code seems to be architected acceptably (though see the first review point below about the DOM-ready code). Some of the HTML generation seems complex - perhaps using a template ...
1
vote
Load ASP.NET Core plugins and their dependencies
I followed most of @Nkosi suggestions and reorganized the code for registering plugins.
I changed the main extension to work on the IMvcBuilder to avoid calling <...
1
vote
Accepted
Load ASP.NET Core plugins and their dependencies
Apart from converting the service configuration to extension methods, There is not much else I would change in the current code.
There is repeated code that can be refactored out into their own ...
1
vote
Accepted
Option buttons in plugin Dialog
Your Question
Is there the better way to add a function to the option "buttons" to get the data and to go to a new dialog?
I don't believe there is a "better" way, though instead ...
1
vote
A simple JavaScript and HTML5 Canvas drawing component
Drawing comments
Currently, one can also draw with the right mouse button, however, upon releasing it, the context menu is still triggered. Contrary to generally disabling the right mouse button, ...
1
vote
Setting QProgressBar values based on selection
Thanks to @PhilKiener's answer, I translated his pseudocode with the relevant methods for Python 2.7 which works well:
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
plugin × 158javascript × 106
jquery × 91
python × 14
performance × 8
beginner × 8
wordpress × 8
java × 7
php × 7
css × 6
bash × 6
object-oriented × 5
html × 5
ajax × 5
c++ × 4
datetime × 4
linux × 4
dom × 4
form × 4
shell × 4
status-monitoring × 4
multithreading × 3
design-patterns × 3
regex × 3
html5 × 3