Hacker Newsnew | past | comments | ask | show | jobs | submit | mperdoni's commentslogin

Can it go one meme-step further and automate our jobs away? ;)



Ultimately, if a bug in a library causes issue with your program, and your company loses $X, your superiors will not give a shit. You have the burden of responsibility for the program.

For common major libraries used worldwide in enterprise products, you are right in that there is an element of trust. They are made by people much faster/better/stronger than most of us. If all else fails, the sheer magnitude of people using it is a small insurance policy, as disastrous issues will probably be quickly apparent. That still doesn't absolve you of responsibility, but the overall risk is usually pretty low.

A segment of code on SO, or a weeny niche library? You only have your noggin to vouch for its stability and accuracy.


>They are made by people much faster/better/stronger than most of us.

lmfao no they're not


> You have the burden of responsibility for the program.

What does that mean when the developer who committed it might have left long ago? I'm assuming you mean more than "blame" which is a pretty unhelpful response for a company to have, but then what exactly is "burden of responsibility" which should have this bus-factor-of-1 attitude around it, and why?


There seems to be a suspicious rise of acceptance for this "practice". It's very concerning. I've never found a SO answer to be copyable, they are usually wrong or flawed.

Usually have to dig in all the responses to get a balanced overview, then apply those concept(s) to your problem at hand....


Here's a few reasons why when you finalize a query, you select only the necessary columns (non-exhaustive list):

- Reduce uneccessary IO / resource strain, as you said

- Predictability; consuming program receives data in the same order, every time

- If the DBA adds additional columns to the table, it doesn't hose downstream consumer processes

- Easier to debug if some problem does arise.

- Clarity, if you are only using a few columns from a large table. I might just be getting old though ;)

Data should be served in the simplest, most robust manner.

It should be easily consumed by other services, with little extra effort from the programmer.

If you use Select *, you either accept the possibility of it breaking unexpectedly, or have to write logic within the consuming service to deal with that. If the problem can be eliminated by the DB/query itself, it should be.


I understand how clarity may provide the programmer's intention of the query but I'd rather just pick all, so that change in code below doesn't suddenly break because you didn't sync the columns to be fetched.

> - Predictability; consuming program receives data in the same order, every time

For any joined table, you can specify table name for each '*' or add an alias last to keep the column you need instead of writing it all.

Seems specifying each column name isn't in any way crtitically bad when you can't select all but a column in SQL, which is a deficiency in the language.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: