Skip to main content
10 votes

Network Interface Object

the posted code causes the compiler to output several warning messages. When compiling, always enable the warnings, then fix those warnings. Here is the compile statement and the resulting warning ...
user3629249's user avatar
  • 2,928
10 votes
Accepted

Network Interface Object

There is no guarantee that write writes out the entire buffer. This means that ...
vnp's user avatar
  • 58.7k
4 votes
Accepted

Simple web service call with retries

In general if you have a goto statement, you should reorder your code to not need it. In this case, your code actually tries 9 times, not three, because you ...
TheAtomicOption's user avatar
4 votes

Program for creating custom directory listings

You care about state of the art: that's good! But CGI and state of the art do not go in the same sentence. You're writing for integration to a specific server, Abyss, whose Python support explicitly ...
Reinderien's user avatar
  • 71.1k
4 votes
Accepted

Microservice that fetches data from REST repository endpoints on Github

The main improvements can be done in your two helper functions. Your first function could use the builtin collections.Counter: ...
Graipher's user avatar
  • 41.7k
4 votes

Microservice that fetches data from REST repository endpoints on Github

The two functions you broke out (LanguagesCounter, and RepoListLanguages) both could be simplified significantly using list ...
Coupcoup's user avatar
  • 1,086
3 votes

Getting metadata from MusicBrainz service

Some quick remarks: Properly name things. avail_recordings and fpcalc_output do not follow the Microsoft guidelines (e.g. don't ...
BCdotWEB's user avatar
  • 11.4k
3 votes
Accepted

Getting metadata from MusicBrainz service

Here are my observations: There are couple of unused namespaces right click on the namespaces then select the Remove and Sort Usings menuitem acoustid_mbids \ <...
Peter Csala's user avatar
  • 10.8k
3 votes
Accepted

Tiny Network Web Framework / Library in C++

...
rioki's user avatar
  • 472
3 votes
Accepted

Callback usage with custom Stack Exchange Flair

I wouldn't say the code is difficult to follow but I do have some suggestions. The first thing I notice is that some variables are declared with let. Many of those ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
3 votes

Simple web service call with retries

Retry logic is usually a bit of a code smell. It's not very common to have a transient error that is common and resolved in the space of a few seconds of retry logic. In such a scenario it may be ...
Phil DeVeau's user avatar
2 votes

Simple web service call with retries

I would like to add few more suggestions to the previous answer. The idea is to set minimum delay, maximum delay and step delay, this will help us in increasing of delay progressively, irrespective ...
vishnu vardhan's user avatar
2 votes

Pool of two objects for a web service

I have plenty of things to say here.. You should apply separation of concerns by isolating the pooling behavior from the logic of the webmethod itself. you might want to create both instances at ...
robertfriberg's user avatar
2 votes

Single instance of reusable HttpClient

I suggest private HttpClient Client { get { return _Client = _Client ?? GetNewClient(); } } Instead of ...
Moisés Alexander Salazar Vila's user avatar
2 votes
Accepted

Parsing SOAP messages from a web service

Spot the inconsistency: ...
Peter Taylor's user avatar
  • 24.5k
2 votes
Accepted

Web Service that gets data from multiple tables in a database using EF Core Database-First approach

Controllers should be kept as lean as possible. Consider adding another layer of abstraction specific the controller in order to separate concerns. ...
Nkosi's user avatar
  • 3,296
2 votes
Accepted

Gin framework project with an endpoint to return a list of users based on their score

Let's start by addressing your 2 main questions: 1. Visibility (exporting) of functions Yes, there's a very easy way of doing this, by using receiver functions (methods), and interfaces. Golang ...
Elias Van Ootegem's user avatar
2 votes

Decorate a python function to work as a Google Cloud Function

Decorator Function -> Decorator class IMO, this decorator function should be a class. The use of global pool hints at this, the decorator needs to maintain some ...
C.Nivs's user avatar
  • 3,117
2 votes
Accepted

Most efficient way to check if user is allowed to update an object

Soo ... I'm not quite sure how to formulate this without it sounding brash, but... Both of these methods are less than ideal... Let's follow the behavioural flow to see what issues this code has: The ...
Vogel612's user avatar
  • 25.5k
2 votes

Tiny Network Web Framework / Library in C++

General Observations First off, nice a Server and Client Library in 1250 lines of code! This review does comment on some code in the repository that is not included in the question. One of the rules ...
pacmaninbw's user avatar
  • 26.1k
2 votes

Microservice in Springboot

Actually I did not reviewed your code as such (as warned by @Emma). But for an "architectural" perspective I see some improvements. However some are more personal guts than real good ...
gervais.b's user avatar
  • 2,147
2 votes

A program designed to update fields in Service Now depending on type

Pathlib _filePath = os.path.splitext(__file__)[0]+'.exe' is better expressed as ...
Reinderien's user avatar
  • 71.1k
1 vote

Flask static url view

The good thing is that you are using the logger module. It is very useful for debugging too. But then you should not do this: ...
Kate's user avatar
  • 8,333
1 vote

Flask static url view

Don't provide multiple methods - methods=('GET', 'POST') only to then check the method: if request.method == 'POST': Instead, ...
Reinderien's user avatar
  • 71.1k
1 vote
Accepted

Retrieve filename and ID with Google Drive API in C#

First of all let me clarify that I'm not familiar with the Google Drive API. I've done some refactoring but I haven't tested it (just make it compile). If I can assume you are using greater C# version ...
Peter Csala's user avatar
  • 10.8k
1 vote
Accepted

Properly disposing of a WCF connection using IDisposable

The adviced way to call a service endpoint when the connection is not an open stream, is to have the lifecycle of you client in line with the operation you are calling. So rather than storing an ...
dfhwze's user avatar
  • 14.2k
1 vote
Accepted

Java Messenger data transmission

Is it common practice to use ObjectStream's with a custom "Protocol"/Packet to transmit data or should I use already existing protocols like HTTP instead? I am not en expert and would say that it ...
gervais.b's user avatar
  • 2,147
1 vote
Accepted

Web application response message API

It seems to me that you are somewhat reinventing gettext. So if your system allows it, you could use it instead. You would need to change your ...
301_Moved_Permanently's user avatar
1 vote

Find currency exchange rates

What if in future we need to add different providers with different representation? How can I make it more flexible and keep the core logic decoupled? It seems like the parser in parse-xml.js is ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
1 vote
Accepted

User registration - Controller, service and repository layers in Spring framework

Should I keep in my Controller class just AuthService field? I'm using userRepository to check if username and email is available. I think it is ok to use the ...
unwichtich's user avatar

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