Skip to main content
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 ...
Bailey Parker's user avatar
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 ...
Dan Oberlam's user avatar
  • 8,049
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 ...
l0b0's user avatar
  • 9,117
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 ...
200_success's user avatar
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 ...
Christian Bruckmayer's user avatar
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-...
Jörg W Mittag's user avatar
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 ...
Luc Hermitte's user avatar
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 ...
RoToRa's user avatar
  • 11.6k
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 ...
Anthony Geoghegan's user avatar
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 ...
Reinderien's user avatar
  • 71.1k
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 ...
C. Harley's user avatar
  • 1,663
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 ...
Tom J Nowell's user avatar
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: ...
Phil Kiener's user avatar
2 votes

basic jQuery plugin template

From a short review; Please follow the lowerCamelCase naming convention, user_settings -> userSettings In production code, never ...
konijn's user avatar
  • 34.4k
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 ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
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 ...
Chaarmann's user avatar
  • 121
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 ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
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 ...
200_success's user avatar
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....
Sᴀᴍ Onᴇᴌᴀ's user avatar
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. <...
xiscodev's user avatar
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 ...
hxtree's user avatar
  • 161
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 ...
Roman's user avatar
  • 2,923
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 ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
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 <...
t3chb0t's user avatar
  • 44.7k
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 ...
Nkosi's user avatar
  • 3,296
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 ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
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, ...
ComFreek's user avatar
  • 771
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: ...
Joseph's user avatar
  • 373

Only top scored, non community-wiki answers of a minimum length are eligible