Skip to main content

New answers tagged

6 votes

Very simple CSV-parser in Java

conservative design Since this is billed as "a CSV parser", a caller may reasonably believe they could send it any *.csv file produced by Excel. Better to ...
J_H's user avatar
  • 32.7k
7 votes
Accepted

Very simple CSV-parser in Java

Side-effects Stream.forEach() operation should be utilized with care since it operates via side-effects and should not be used as a substitution of a proper ...
Alexander Ivanchenko's user avatar
2 votes

Matrix Multiplication & Addition

This code is completely missing the error-handling for when malloc() returns a null pointer. Which makes the entire program's behaviour undefined on any occasion ...
Toby Speight's user avatar
  • 79.3k
6 votes
Accepted

Matrix Multiplication & Addition

Other than what vnp already said in their answer, I'd like to point out a logic error in the code. When checking whether the matrices have the same dimensions in ...
dawn's user avatar
  • 76
7 votes

Matrix Multiplication & Addition

create_matrix happily accepts negative arguments. It does not exactly make sense. Semantically m and ...
vnp's user avatar
  • 57k
2 votes

A View over java.lang.String - improved take II

There are only two hard things in computer science: concurrency and getting programmers to pay attention to naming things. Naming is really simple. You look at what the component you are naming does, ...
TorbenPutkonen's user avatar
6 votes

A View over java.lang.String - improved take II

grow / shrink / shift There's no need to construct a new StringView instance if any of these methods receives zero as an argument. Add guard clauses returning <...
Alexander Ivanchenko's user avatar
5 votes
Accepted

A View over java.lang.String

Mutability / Lack of Functionality Despite StringView being a cheap to instantiate thin wrapper, this class is not attractive to use. Reasons: ...
Alexander Ivanchenko's user avatar
6 votes

A View over java.lang.String

Just two observations from me: I don't understand why toString() works a character at a time, rather than simply returning ...
Toby Speight's user avatar
  • 79.3k

Top 50 recent answers are included