Programming/Logic quandry

Not everyone knows how to use BASH and GREP.
If they can’t figure it out using the resources on the web, including Droid notes above, they can always become supermarket car guards.

There many ways to solve a problem. As has been pointed out in this thread, ask, search the web, choose one best suited to your use case. Use your skills to tweak available solutions to your needs.
 
The third party software wasnt designed to handle such massive input at any one time. The customer base has grown so massive that a workaround had to be found. Its working now and the system no longer times out.
If the input file is potentially very large, then consider using a buffered read instead of trying to read the whole file into memory
 
grep is not required, and bash commands aren't really more difficult than Windows' console commands.

Example (split 500 lines into each file):
split -l 500 /path/sourcefilename.extension

Split Man Page
https://ss64.com/bash/split.html

Really enjoying this thread:

This thread is a prime example of the difference between thinking like a developer, vs approaching the problem like an engineer.

Important to understand the complexity of how the problem is solved (the developer)so that you understand the simplicity of the solution (the engineer).
 
Not sure if OP needs to apply the solution into a real working system or whether this is a coding/learning exercise. If the latter, then the comments about bash etc are irrelevant. Then it is about applying logic and developing a solution that has minimum time & space complexity.
 
Really enjoying this thread:

This thread is a prime example of the difference between thinking like a developer, vs approaching the problem like an engineer.

Important to understand the complexity of how the problem is solved (the developer)so that you understand the simplicity of the solution (the engineer).
As I said before; how one goes about tackling a problem will always depend on the workflow. Plus it's a simple requirement so writing a few lines of code isn't that big of a deal.
 
As I said before; how one goes about tackling a problem will always depend on the workflow. Plus it's a simple requirement so writing a few lines of code isn't that big of a deal.

True.

A lot of people mix the roles of developers with engineers. Developers over engineer problems, your solution is what I see true engineers implement in the industry.

Goes beyond just the lines of code typed, its about using a solution that has been trusted by millions of people.
 
True.

A lot of people mix the roles of developers with engineers. Developers over engineer problems, your solution is what I see true engineers implement in the industry.

Goes beyond just the lines of code typed, its about using a solution that has been trusted by millions of people.
Sure, but if this was only 1 step in a series of steps, then I would never integrate with bash; because trapping success / failure with a terminal session is fraught with problems, and makes concurrency far more difficult. As for developers over engineering problems; that really depends on a number of factors including the experience of the developer, the person delegating the task, the business project lead, ...

Developer experience
https://medium.com/@webseanhickey/the-evolution-of-a-software-engineer-db854689

Business Experience
WGH7f5T.png

Those of us who have been in this industry for more than a few decades would always push back against this type of request; but that type of confidence only comes with experience.
 
Last edited:
If they can’t figure it out using the resources on the web, including Droid notes above, they can always become supermarket car guards.

There many ways to solve a problem. As has been pointed out in this thread, ask, search the web, choose one best suited to your use case. Use your skills to tweak available solutions to your needs.

When I started learning how to program, I lacked a fundamental skill. Knowing how to ask questions and when to ask. I linked this to my pride and fear of growth.

Given a long enough time line, Id hope that people realize that learning to code or rather learning to solve problems is well within their reach, but like myself, if you cannot identify what is holding you back first, there is no point in trying.
 
Just coming back to this, does anybody know where I can get a massive .csv file I can test with?
 
Top
Sign up to the MyBroadband newsletter
X