19
votes
Concurrent HashSet
General Stuff
Would be nice to have inline documentation (///) on classes and public members, but everything is pretty simple and understandable. Some might ...
14
votes
Accepted
Porting C-style socket to CPP class
Avoid using malloc() in C++
There are much better ways to allocate memory in C++ that are simpler and safer. First, in C++ you should use ...
7
votes
Accepted
Wrapping libusb library in C++
It is kind of hard to say without seeing the whole code but at a glance the whole thing seems kind of pointless to me. You're not making it object oriented but rather just adding your own "flavor" API ...
7
votes
MongoDB Perl Wrapper
I'm the lead engineer for the MongoDB Perl driver with a couple of thoughts for you:
you're using 'authenticate', which is for a very old version of the driver which is not recommended for use. In ...
7
votes
Auctionsite API Wrapper in Python
In API.__init__, you're assigning a value to self.base_url. However, that value is never changed and thus is the same for every ...
6
votes
Accepted
C++ Wrapper for cURL: Multithreading and serializing asynchronous ops
Design Issue
Creating a new thread for every connection is not a good idea. Creating a thread is expensive. Also a single thread can easily handle thousands of connections, so utilizing a single ...
5
votes
Accepted
PHP MySQLi wrapper class
This is not much a wrapper. Rather call it a wannabe Query Builder.
I don't know the reason, but many people are constantly trying to write something like this. And I don't understand why.
Okay, for ...
5
votes
Accepted
C++ wrapper class for array of OpenGL buffer objects -- just the constructors
Some specific questions I have about this code/approach are, if applicable,
OK.
Error handling design decision: should the constructors throw, or should I leave error checking, if desired, to the ...
5
votes
Auctionsite API Wrapper in Python
Payload
This code is pretty hard to read (and possibly prone to encoding errors):
...
4
votes
Accepted
Wrapping COM objects with IDisposable
There is two things that caught my attention.
Every public method / property of all implementing classes
needs to call ThrowIfDisposed(). Always. That's the ...
4
votes
Wrapping COM objects with IDisposable
Just a flying review:
Have you tested this? The equality code isn't at all right. Firstly, never override == and != without ...
4
votes
Random generator extension for VSCode
As for the architecture it seems good to me.
As for the TypeScript I have a few minor suggestions:
Avoid using var, use const ...
4
votes
Array whose first element is arbitralily indexed – writing a container wrapper
I believe that you are expending way too much energy trying to solve something that should be a non-problem. Simply always let your containers be zero based, if you have for example 1-based indexes as ...
4
votes
Enum wrapped in a struct
To use static instances of value types instead of plain enum isn't a strange thing. I can't discuss its merits because each case ...
4
votes
Accepted
TweetResolver class, to be used in a graphql project
If all your catch is doing is re-throwing the error, there is no reason to have the try/catch in the first place.
If you find ...
4
votes
Proxy/Wrapper class for a dynamic object from a SOAP API
this.BasketResponse = new SoapSimplifier(basketResponse).ToJObject();
At this point you know you have a JObject: by ...
4
votes
Accepted
F# wrapper to generate SHA256 signature for a file
The use binding is usually better than the using function. The object is disposed when leaving the scope of the ...
4
votes
usart driver wrapper
Consider using enum class
Instead of having a regular enum inside its own namespace, use an ...
4
votes
Functions in PHP to run basic MySQL crud
Just from a pure useability stand, I don't find these types of wrappers very useful. They work fine for the simplest test cases, but as soon as you want to do a basic join you're back to writing the ...
4
votes
Accepted
SNTPv4 server based on rfc 4330 in C++
General
It's better to present the files in a more logical order - headers before implementation files, and lower-level utilities before the higher-level code that depends on them.
Address.cpp
The <...
4
votes
Accepted
OO simple network time server with changes from a previous code inspection and added Windows support
Answers to your questions
Is creating a Makefile to work under Windows a fools errand?
No, it can work fine under Windows. However, installing GNU make on Windows might be an annoying step for some. ...
3
votes
3
votes
Accepted
Linux/Mac hashing SHA-1
There's not a huge amount to review here.
It looks like the Apple code is intended to be a drop-in replacement for OpenSSL, so you could probably just rename to match, rather than creating a new name:...
3
votes
Accepted
OpenGL 4.5 Core Buffer wrapper
template<GLenum target>
As I've explained elsewhere, buffer objects are not typed. There's no such thing as a "vertex buffer object", "transform feedback ...
3
votes
Short header file for safe CLI input handling in C
I see some things that I think could help you improve your code.
Eliminate unused definitions
The top of the code includes this line:
#define TRUE 1
However, ...
3
votes
Accepted
Wrapper Connection PDO PHP
Honestly, you can improve your application by discarding this wrapper. You are not going to derive any value from it.
You can find similar discussion around this very common Codereview topic in ...
3
votes
C++ Dirent.h "Wrapper"
Parameter names
This is one of my pet peeves:
Inode(const std::string &);
The point of a header file / class definition at least in my head is to separate the ...
3
votes
Accepted
Using dynamic to avoid code duplication when wrapping an API
I'd say no, this is not a good use of dynamic. This looks like a problem that can be easily solved by generics.
...
3
votes
Only top scored, non community-wiki answers of a minimum length are eligible