Live data from Hacker News

It’s hard work printing nothing

tedunangst.com

21–30 of 79 posts

Re: It’s hard work printing nothing

#21

Earlier quoted context omitted.

So? If they indicate a problem or potential problem, they should be fixed in the software. The fact that there is a "warning" message means that someone, somewhere thought it serious enough to write home about. If they don't indicate a potential problem, then why even print them? Think about how you're supposed to treat compiler warnings: You don't ignore them--they are there for a reason. Quite the opposite--you sho…

Read SQLite's FAQ on that. Given, most projects aren't as amazing as SQLite.

[deleted]

Re: It’s hard work printing nothing

#22

I always thought low-level programmers (C, C++, assembly, etc.) cared more about minimal abstractions and minimizing dependencies. But it turns out it's the same story no matter what level of the stack you are on. Currently working on a project with 200+ requirements in requirements.txt and growing. Before anyone says microservices just realize that you have taken the same programmers that made this mess and shoveled…

That `requirements.txt` was probably generated by `pip freeze > requirements.txt`, which would yield all the installed packages and _their_ dependencies.

Though, if 200+ packages were used in the codebase explicitly, that requires some sort of wizardry!

Re: It’s hard work printing nothing

#23

I always thought low-level programmers (C, C++, assembly, etc.) cared more about minimal abstractions and minimizing dependencies. But it turns out it's the same story no matter what level of the stack you are on. Currently working on a project with 200+ requirements in requirements.txt and growing. Before anyone says microservices just realize that you have taken the same programmers that made this mess and shoveled…

There is low-level code that is as you describe, and low-level programmers who write it. Probably if printf is involved, it's not that "low level".

Maybe this needs printf for a test suite, and talloc doesn't call it itself? Maybe there is also a way to run talloc in some verbose mode? I'm not familiar with it.

Re: It’s hard work printing nothing

#25

I always thought low-level programmers (C, C++, assembly, etc.) cared more about minimal abstractions and minimizing dependencies. But it turns out it's the same story no matter what level of the stack you are on. Currently working on a project with 200+ requirements in requirements.txt and growing. Before anyone says microservices just realize that you have taken the same programmers that made this mess and shoveled…

> Currently working on a project with 200+ requirements in requirements.txt and growing. That's incredible. I've worked on some very large python projects before, but 200? That's pure insanity. Can I ask what that project does? I just can't imagine a project where you'd need 200 libraries.

Somewhere along the lines, someone might have just done a pip freeze and pulled in all the dependencies needed, recursively.

For example, my project has 66 dependencies after cleaning up pip-freezes' output to only keep secondary dependencies if they were depended on by more than one thing (e.g. chardet is a dependency of every package that works with character processing).

If we're talking about only primary dependencies, we have 13 or so.

If we're talking about the entire dependency network... its easily above 200.

Re: It’s hard work printing nothing

#26

Earlier quoted context omitted.

> Currently working on a project with 200+ requirements in requirements.txt and growing. That's incredible. I've worked on some very large python projects before, but 200? That's pure insanity. Can I ask what that project does? I just can't imagine a project where you'd need 200 libraries.

Eh, in Ruby, just installing Rails is like 80 dependencies. Would be surprised if Django wasn't 40+

I work on a abnormally large Django codebase. It has 30 dependencies on the requirements.txt file. I've worked on other Django codebases and they usually have about 15. Python has a big standard library which cuts down on dependencies. Not that Django > Rails. Just different.

Re: It’s hard work printing nothing

#28
post #5

The more I see of what goes on under the covers, the more surprised I am that anything works at all. As an example, every gtk+ program I run spews thousands of errors to the console. Why? Are they bad? The programs seem to run anyway, never crashing more than one would expect. So … why the console spam?

I think not a single actual application is completely well formed. They all work on luck. Especially in the embedded world. Btw, my android just rebooted.

Re: It’s hard work printing nothing

#29
There’s an argument to be made that silly error messages are better than crashing browsers

There's an argument, but it's a really lousy one. If you're passing NULL as a string to printf, your code is broken. A crash which results in someone tracking down and fixing the bug is far better than quietly doing something which is 100% guaranteed to be wrong.

Post reply on HN