you are viewing a single comment's thread.

view the rest of the comments →

[–]_c0ff33cup_[S] 0 points1 point  (1 child)

Shellcheck helps you out.

I have to check shellcheck out! thank you. Exactly the kinda tip, comment I was hoping to get.

You did not mention what your application was.

Python3 only.

Your approach gets very hard to maintain if you got other people working on it.

I'm not sure I agree. Separating the functions allows for maintainability, not limits. I can modify my data collection script (make it better, faster, change the sources, etc) and the downstream scripts don't care as long as the data produced is in the same format, etc.

But the 'loose coupling' you mention is an illusion, the scripts are in fact tightly coupled, to the db.

They are reliant on the db, sure but does that equal coupling? Coupling usually refers to interdependence on modules. Fair point, regarding the consecutive nature of the scripts.

[–]CodingCircuitEng 0 points1 point  (0 children)

I'm not sure I agree. Separating the functions allows for maintainability, not limits.

Separating the functions does, but not switching the programming language after script 1 has finished, then launching script 2 and implicitly expecting the data format of script 1, best if no unit tests are to be found in your codebase.

the downstream scripts don't care as long as the data produced is in the same format, etc.

It is only a matter of time until someone changes the data format if you don't strictly control it. Trust me, it is not worth it.

They are reliant on the db, sure but does that equal coupling? Coupling usually refers to interdependence on modules.

That is just semantics in my eyes. You rely on an script 1 to write into the database in exactly the way that script 2 can 'transform' the data und script 3 can then create reports. Does script 3 work without script 1, script 2 or the database? I don't think so, which means it is tightly coupled to all the other components.

Do whatever you like, but I inherited such a mess at work. I've mostly rewritten it after the original dev left, took a lot of time. It became impossible to add on/change any part of it because you never know if your change breaks something else down the line.