New answers tagged

1 vote

C++ std::string implementation

Overview The main issue is to decide if the stored char buffer is '\0' terminated or not. Make it clear in comments then write tests to check for it. The first constructor does this explicitly but ...
  • 91.9k
1 vote

General purpose 2D grid

That code is already of utterly high quality for a "beginner" in Rust. I think you should be proud of yourself here! Highlights: you use an initializer function in the constructor! your ...
  • 387
1 vote

Quadratic equation solver using ABC and PQ formula

For one, the special case of a=1 is not very interesting. You could as well remove the branch and just use abc everytime. Instead you could check if a is close to 0 and choose a different formula that ...
2 votes

Derivative calculator simplifier using python

Firstly I recommend using some form of standard Python formatter, so your code is standardized and will allow others to more easily assist you. In my answer I use the ...
5 votes
Accepted

Improving the speed of an MD5 implementation from scratch in C++

First Look: In these two functions: static std::string digest(std::string str); static std::vector<char> padder(std::string str); You are passing the ...
  • 91.9k
1 vote
Accepted

Simple ISO date, time and datetime implementation

welcome to the Rust community! Your code is quite good. There are a couple areas where the code could be improved, but not by much. It would be helpful if you implement more code for review all at ...
7 votes

Simple TimeStamp class in Python

First, I want to point out that leap seconds exist, which means a day is not necessarily guaranteed to be exactly 86400 seconds. If you're aware of this and have determined your use case does not ...
  • 3,022
6 votes
Accepted

Need for matrix multiplication speed

High level The code implements tiling, which is good, but there is only one TILE_SIZE. In my experience, there is benefit from allowing tiles to be non-square. The <...
  • 6,759

Top 50 recent answers are included