What is a scalable code?

Asked

Viewed 1,713 times

18

Scalability is linked to growth, in the context of code, I have some pertinent doubts.

  • What is a scalable code?
  • The scalability of code involves more than one aspect or only performance or design?
  • A code with low cohesion and strongly coupled would not be scalable?
  • 3

    I do not know if it answers the question in its entirety but it is worth giving a read in that post!

2 answers

17


Behold What Software Scalability Means? and then forget everything there is. Code scalability has nothing to do with application scalability. We are here (I hope) talking about how easy it is for code to grow and still be manageable. In general the scalability of code has to do with team scalability because it is rare for a code to be very large and maintained by one person, but it is possible to be only about the code.

Code scalability has nothing to do with application performance and not even directly with development productivity, although it has a link between code being manageable and productivity.

Some features of a scalable code:

Experiment

Scalable code can only be written by those who master all aspects of development, all the mechanisms that will be used, and those who have experience, because it is not something obvious. It is possible to do this for a less experienced team, but only under strong supervision of very experienced people, unless the team is all made up of geniuses who are born knowing, who can see the right future without having gone through something like this. One does it to work, not to be right, to be scalable, because one doesn’t even know what it is, because it will be necessary and how to make it climb.

Everyone over time, either write more scalable code, or they should leave the area. But many codes are not scalable because there is no compromise for this, either by failure of the professional, or by term demands in the short period that are imposed.

I have noticed that some software does not need to be scalable. People talk a lot about maintenance, but little is done. I work almost only with maintenance, and it seems that almost everyone works almost only with something new, will never maintain these things? Maybe the modinha won’t let you. Is it all that good? Or is it so bad that it is better to abandon?

Tools

Some languages help the code to be more scalable, for example static typing. Of course, tests can play a similar role, but not at all. Robustness helps not only in code quality, but also in code scalability. "discoverable" codes are more scalable. So dynamic typing languages are good for scripts. No problem people do scripts, many problems need them, the problem is making software Nterprise with scripts. And worse, use techniques like OOP in scripts. OOP helps you scale code if you know what you’re doing.

Certain programming patterns solve certain problems, but they can create others. The more code you write the less scalable it is, unless it simplifies something forcefully. So it’s also possible that dynamic typing language has its chance to be more scalable in some sense. Nothing that reflection and code generation does not solve in static typing languages, the second is not much used for not having many tools ready and give a little more work, but should to scale more.

Example of what may not be scalable in code: checked exceptions. This is a feature that looked good. Why only Java uses it? And almost everyone uses it badly. Because it’s not scalable. As the code grows, the hierarchy gets more complicated and the stack of call methods gets bigger and starts to have so much combination to deal with that is impractical and occurs what everyone does, treats generically. This has become so popular that the examples of Java are bad and then contaminates even other languages and everyone uses exception the wrong way because of this plague.

  • 3

    Term in the short often is the villain that separates me from good coding practice.

  • 3

    @Augustovasques all of us

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.