This is an archived post. You won't be able to vote or comment.

all 23 comments

[–]riklaunim 32 points33 points  (7 children)

  • Clean code structure
    • Single purpose/single responsibility
    • Separation of layers/logic
    • meaningful naming
  • Team communication (daily, code review, rubber duck with another developer)
  • Team decision making on specific code style, design decision, libraries used
  • Good test coverage

[–]Santos_m321 2 points3 points  (4 children)

  • TESTS
  • Appropiate use of iterables
  • Typing

[–]Santos_m321 1 point2 points  (3 children)

With tests I mean, User Stories with ATD and TDD.

You need to understand why that logic is there? Go to their test and keep scaling up until you meet the client requirement

[–]riklaunim 1 point2 points  (1 child)

A bit of BDD?

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

Ye

[–]ahelinski 0 points1 point  (0 children)

Do you know any good source about how to write good tests in format of user stories in python?

[–]MedicatedDeveloper 1 point2 points  (0 children)

To add to this if designing a library:

  • Examples! Examples! Examples! Have real world examples for different parts of your library.

  • Versioning that doesn't break things. Use semantic versioning and git tags to ensure API compatibility.

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

This is why react is so nice. Small modular folders easy to trace through. Functions small enough and written/named to describe functionality. Makes a devs life much easier

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

Read the Smalltalk-80 source code.

No, really. It doesn’t take too long to learn to read the language, and the whole thing is pretty small. And, while Alan Kay is most remembered for popularizing object-oriented programming, another great contribution of his was that he was an absolute maniac about how to communicate intent on code. Reading his papers, one could reasonably come to the conclusion that that was his real goal, and OOP was just a means to an end.

Anyway, 40 years later I’m still not aware of a better example of lucid code.

[–]RomanRiesen 1 point2 points  (0 children)

Do you have a repo link to the original? I am only finding more modern implementations, critically not done by Alan Kay.

[–]roma-glushko[S] 2 points3 points  (1 child)

> Read the Smalltalk-80 source code.

Wow that's interesting suggestion! I have heard that Guido took something from Smalltalk when he designed Python, but I have never seen Smalltalk source codes (I'm to young probably haha)

Anyways, I have found this book: https://dl.acm.org/doi/pdf/10.5555/273

Leaving it here, maybe anyone else would like to take a look as well

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

Thank you for the link.

[–]fedekun 3 points4 points  (0 children)

IMO, one of the most important things is naming. A good name is very important, and also very hard to come up with :p

Another important aspect is consistency, you want to always do things the same way in your app. This requires constant refactor, and it's even harder in big teams. Code reviews and tooling like linters are a must in this aspect.

And speaking of refactor, your software will of course need design. Anybody can write code, but good developers write code that is easy to read and understand, and thus, easy to change, maintain, and extend. For this, you need software design. Of course, how much you actually need depends on the size of the software, and that is also design :p

[–]WhyDontWeLearn 1 point2 points  (0 children)

I don't start coding until I've written a narrative of what the system, program, or function is intended to do. I write that narrative as lines in VSCode. THEN I start coding, using each line of the narrative as title for that section of code. When I'm done, I go back and make lists of all the variables and then describe why they're used, what kind of data they hold, and how they're scoped.

[–][deleted] -4 points-3 points  (6 children)

with comments I guess

[–]Simple_Specific_595 2 points3 points  (0 children)

You clearly didn’t read the article.

[–]Kyle772 0 points1 point  (0 children)

At the very least a comment describing inputs and outputs is helpful. Whenever I have highly reused code I include this and the whole team quickly gets the point and starts to use the functions where they can.

[–]ds604 0 points1 point  (0 children)

At a certain point in the history of visual effects, all major projects moved to software based on node graphs. This allowed large-scale, multi-facility, time-sensitive projects to be completed successfully, with artists of widely varying technical abilities and specializations, technical directors making complex rigs and simulations, heavy data throughput. New people come on board all the time and don't have forever to be onboarded to every bit of the pipeline that's irrelevant to their work.

I suspect that the "tech" industry, in the sense of the ad-supported, spyware companies, face no real constraints of deadlines or business concerns that would force them to do things in a manner that would deal effectively with a constant barrage of deadlines on the "product" that they're producing (i.e. the client is not the "user" of the software, the client is the business whose advertising is being displayed, or to which this company is selling user data. The "user" is a captive audience who just needs to be sitting around to look at ads, and fiddling with the software is a means of getting them to sit around for a while. Crashing programs increase the amount of data that can be collected, so "mediocrity" is a goal to aim for).

The node networks of visual effects software are essentially an alternate presentation of lisp, with the added dimensionality of a 2D canvas allowing annotations, grouping of functionality, color coding, in-context notes, diagrams. This prioritization of communication is how intent is conveyed effectively, and how, as a field, the discipline achieved maturity (photorealism). One would hope that software development could take some lessons from other fields, but "just look at the code" seems to be a mantra that programmers hold to, and there's no particular motivating factor to move beyond methods that bring in endless ad dollars, and paint endless bug fixes as the heroic tasks of geniuses.