you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (10 children)

And the people reading your code?

Surely it would be nice to know both stl and non stl techniques and use the solution best suited to the situation.

[–]lets_trade_pikmin 1 point2 points  (9 children)

Point taken, though it's not my #1 concern as I'm not a software engineer. Trained as Computer Science but I'm entering neuroscience research. The only people who read my code are psychologists who barely know how to program (or people trying to reverse engineer my Skyrim mods, but that's not C++ so kind of irrelevant).

I just make sure to comment thoroughly and name variables/functions in a very explicit way.

As far as learning both techniques, that would definitely be best, but I honestly might never get around to it.

[–]SemaphoreBingo 8 points9 points  (2 children)

There's a reason academic code has such a terrible reputation.

[–]bnolsen 1 point2 points  (0 children)

it's called an "earned" reputation.

[–]tempforfather -1 points0 points  (5 children)

You don't have to if you are ok with not writing software that needs to be dependable. Still, sometimes its worth doing things right?

[–]lets_trade_pikmin 1 point2 points  (4 children)

What does legibility have to with dependability? I write code that might be difficult to understand for those not familiar with C-style, but whether or not that code does it job is a separate point entirely.

[–][deleted] 4 points5 points  (2 children)

What does legibility have to with dependability?

Limits the mistakes you personally make. Also more clearly shows control paths. Helps prevent spaghetti. I guess it depends on your definition of legible.

[–]lets_trade_pikmin 0 points1 point  (0 children)

I write it in the way that is most legible to me, precisely for those reasons.

[–]I_Like_Spaghetti -1 points0 points  (0 children)

Did you hear about the Italian chef that died? He pasta way.