13
votes
Accepted
Event Based TCP Library
This won't be comprehensive review/ramble, because I'm hungry; however, it is nice to see fairly comprehensive inline documentation on the public API!
General Networking Commentary
Because you asked ...
9
votes
Accepted
TCP client and server API
I don't understand the point of the IComponent / IComponentConsumer stuff. Nothing else in the large section of code you've ...
5
votes
Custom HttpClient implementation for third part usage with sync/async calls
internal class Client : IDisposable
{
private static HttpClient _client;
private static Uri _baseAddress;
Neither of those fields should be ...
5
votes
Accepted
Extendable REST-Client
I'm working on something of a simple REST client myself and I wonder if my core bit might be able to help your implementation and vice-versa. I'll just post a tiny bit here (the generic GET async ...
5
votes
Accepted
Send and receive functions for telnet client
General Observations
The code could be made more maintainable (easier to read, write, and debug) through reduction of redundant code and simplification.
There is a possible bug in ...
4
votes
CloudFlare Dynamic DNS Update Script in Python 3
Docstrings
You should really consider switching to Docstrings instead of using your current documentation method. (Note that using Docstrings will give the function a ...
4
votes
Accepted
API client to retrieve traffic news
Caching your MD5 hash is premature optimisation, and indeed there are more important things you should be caring about. For instance, you're serialising JSON twice; instead you should use a Requests ...
3
votes
Extendable REST-Client
I asked a very similar question here
The thing that came out of it that I think you should think about is that there's no need to add Get / Post etc. to the interface. You can handle all that with ...
3
votes
PHP script that writes a JSON file with iextrading API data
You cannot use a return in a __construct() method. If you need to check for any "badness", you can use ...
3
votes
HTTP C++ Implementation
Let me add a few quick comments to the other review(s).
In general, pay attention to const correctness to reduce the chances of making mistakes and also to avoid unnecessary - and potentially ...
3
votes
CloudFlare Dynamic DNS Update Script in Python 3
# Horribly unnecessary wrapper
You're right. Don't write your own exit. Since exit itself ...
3
votes
Accepted
Networked Chat App in Python
This is pretty clean code, good job. I'll be reviewing each file in order, and then I'll you some extra advice at the end.
server.py
General
If a statement consists of multiple names, like in a ...
3
votes
C++ Socket Part-2
I've been looking over your code because I wanted to do what you have done and write a nice thin C++ layer over the C socket APIs, so it's abstracted for modern C++ developers without having to worry ...
3
votes
Accepted
Getting prices of crypto coins
Well, I shall start from the top.
According to the style guide, PEP 8 imports should be in the following order:
standard library imports
related third party imports local
application/library ...
3
votes
Accepted
C++ Crypto: Part 1- Hash
Proper capitalization of SHA1
The algorithm's name is SHA1, not Sha1, so I think it is better to use all caps here. That makes grepping the code for a particular algorithm easier.
You only need one ...
3
votes
Accepted
Simple command line API client for getting quotes
One way to improve the structure would be to modularize your code. Once your client is a "real" module, you can convert your main.py into a ...
3
votes
API client to retrieve traffic news
CLI-program feedback
You have used argparse. This is ok, but very basic. There are at least two options that are way easier to read and write: typer and click. Click comes from the Flask ecosystem and ...
3
votes
Accepted
API client that builds a response over multiple lines
By using any you are losing type safety, which defeats the point of Typescript, at least in this spot. But sometimes it’s just easier.
Just because the example is ...
3
votes
Accepted
The receive function for telnet client
Error handling
You are already doing a lot of error handling, which is good, but you need to pay a little bit more attention to what kind of errors functions can return, and how to respond to them.
...
2
votes
Multithreaded Client/ Server communication
A memset should come after printf so that it clears the buffer otherwise when the client sends new message the buffer is already ...
2
votes
Netty connecting to multiple servers
Some issues with your code
The biggest is that you are creating a
new ArrayList with each interruption of your server. You probably
want to allocate that array outside the loop that is creating the ...
2
votes
Networked Chat App in Python
A few minor things:
Indentation matter in Python, and PEP8 says to use indentation of 4 spaces. It will make your code more readable
Remove unused modules, I dont think you use ...
2
votes
Accepted
HTTP C++ Implementation
Initialization in Constructors
Currently the constructors perform the initialization within the body of the constructor, this isn't necessary for simple variables, C++ has a shorthand form for ...
2
votes
Read message protocol socket c
Portability
First this program could be made more portable. There are 2 portability issues here
If it was ported to a system that did not define end of line as "\r\n" this program might not work. ...
2
votes
Accepted
PHP script that writes a JSON file with iextrading API data
Why instantiate an object of class I if the only methods called are static? It appears that only private member variables that are never mutated are accessed. ...
2
votes
Kotlin Android request client
You should look into coroutines.
Coroutines are the Promises from JavaScript and the CompleteableFutures of Java.
It's basically Kotlin handeling the callbacks for you.
...
2
votes
Get list of new questions from Stack Overflow
This is nice code for someone just learning Clojure. You haven't made any of the common pitfalls like trying to use def to create local variables. I'm going to just ...
2
votes
Accepted
2
votes
Python gRPC shopping cart service
Keep-alive
Your sleep method is curious. There are alternates here:
https://stackoverflow.com/questions/20170251/how-to-run-the-python-program-forever
but those are ...
2
votes
Accepted
Java Networking Framework
I read through your profile and saw you are a 17 year old developer hobbiest. I didn't know what OO was at that age. Well done. I made this review under the impression you were a somewhat experienced ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
client × 107server × 48
c# × 27
socket × 21
java × 20
python × 18
c++ × 13
tcp × 13
api × 11
networking × 11
c × 10
json × 9
http × 9
beginner × 6
python-3.x × 6
object-oriented × 6
rest × 6
chat × 6
multithreading × 5
asynchronous × 5
android × 4
cryptography × 4
authentication × 4
javascript × 3
php × 3