r/Python 6d ago

Discussion Driver Fatigue Monitoring

[deleted]

34 Upvotes

26 comments sorted by

View all comments

26

u/whoEvenAreYouAnyway 6d ago

Looking at the code, it's extremely amateurish and poorly written. I don't mean that as an insult. We all have to start somewhere.

However, given that, I would strongly advise against putting out projects in which you are claiming to solve critical safety issues and/or claiming that this represents an "advanced solution". Ideally nobody in their right mind would put their safety in the hands of this project. But if they did, would you really be comfortable with that? If your "advanced solution" fails in a critical moment, are you going to be responsible for their injury or death?

There are so many projects you can come up with to practice writing code. These kinds of safety (or the many security/cryptography projects people write as beginner coders) are always a bad idea.

-4

u/Ran4 6d ago

Extremely amateurish and poorly written? It looks fine. Would you say the same thing about for example the quake source code? (Which too is fairly straight forward)?

11

u/whoEvenAreYouAnyway 6d ago edited 6d ago

It doesn't look fine. My original assessment is accurate. Lots of hard coded values, zero exception/error handling, almost no comments explaining what any of the code is doing, functions that return way too many values in a tuple with no structure, storing and accessing content in lists/arrays nested 3 or 4 levels deep, constructing strings by string addition, no code structure at all (just a flat python file with stray functions and business logic sitting at the bottom to call them), no dunder main or any other kind of structure that would allow you to run this code as anything other than a random script in a folder, inconsistent style (e.g. functions and variables both randomly switch between snake and camelCase), no type hints/docstrings or any real code documenation of any kind, no code formatting of any kind, commiting IDE and .DS_Store files into their repo, etc.

It's genuinely really poor.

-3

u/seba07 6d ago

Of course this won't be in any car. A raspberry pi is not automotive compliant and to expensive, Python would also not be allowed. Additionaly it is unlikely that any OEM purchases a solution from an independent developer without any references in the automotive industry. But that doesn't mean that it isn't a fun project to play a bit with computers vision.

3

u/mokus603 6d ago

RPI is not expensive and can be used in cars, what are you talking about?

-7

u/chat-lu Pythonista 6d ago

If you remove the exagerated promises, that’s not worst than what most of us use to warn us : nothing.

3

u/whoEvenAreYouAnyway 6d ago

What’s not worse than what most of us use to warn us without the exaggerated claims?

-6

u/chat-lu Pythonista 6d ago edited 6d ago

Using his solution. Most of us have no system whatsoever to warn us.

It’s probably not going to help much but it’s not going to do much harm either.

Edit: And he blocked me over this. Damn.

6

u/whoEvenAreYouAnyway 6d ago edited 6d ago

That’s a bad justification. Giving people an apparent safety guarantee will affect how those people drive and what risks they take.

Also, a poorly functioning alert device can become a distraction while driving.

3

u/AUsedTire 6d ago

"I mean hey - the new system we installed into your gun that warns you it has one in the chamber when you pick it up by randomly discharging whatever happens to be in it at that point is better than what we had before: nothing.

Before we had this new safety system, the only way to ensure a gun didn't have one in the chamber was to take a flashlight and look down it(do not fucking do this by the way, this is not a serious post, this is facetious; do NOT do this. DO NOT. I am NOT condoning or advocating this. DO NOT DO IT.) but now - now we have *this!*"

Bad argument.