News for hackers. Stuff that matters.
Re:Never Write Your Own Database (2017) by lmilcin on Friday May 04, 2018 @01:55PM (#16996661)
What I am really objecting to is those hard "rules". "Never optimize early". "Never roll your own database", etc.

All those rules work for most but not all projects. It's the same as saying "You shall allways obey traffic rules". Maybe I should, but sometimes I may not want to brake on yellow light when I have clearly impatient driver tailgating me.

As we gain experience we learn the world is not black and white. Akin's law #8 says:

"In nature, the optimum is almost always in the middle somewhere. Distrust assertions that the optimum is at an extreme point."

Re:Never Write Your Own Database (2017) by plorntus on Friday May 04, 2018 @02:01PM (#16996719)
The article deliberately contradicts the title, it's literally stating the same thing you're saying but with a real world example (One Note) and why they needed to write their own.
Re:Never Write Your Own Database (2017) by fgonzag on Friday May 04, 2018 @08:02PM (#16999403)
I'm fine with those rules. Until you can understand why the rule exists (on a technical level), can you break it. Because anyone who knows all the edge cases, filesystem issues, contention issues, deadlocking and integrity guarantees with databases will search hard for an OOB solution that fits his requirements, and will consider rolling his own a last resort.
Re:Never Write Your Own Database (2017) by ksk on Friday May 04, 2018 @06:59PM (#16999123)
But your objection is rather silly!! Those rules are meant for beginners. If you're not a beginner you already know when/if/how you can break the rules. It is correct to teach kids that they should tell the truth in every scenario, even if as adults we don't.
Re:Never Write Your Own Database (2017) by anyfoo on Friday May 04, 2018 @07:35PM (#16999291)
Exactly. Fully understand why should never do x, so that fully understand when you actually have to do x.
Re:Never Write Your Own Database (2017) by voodootrucker on Friday May 04, 2018 @11:59PM (#17000246)
values > principles > practices

You are free to violate any of those on the right in the interest of the ones to the left.

Re:Never Write Your Own Database (2017) by hutzlibu on Saturday May 05, 2018 @10:09AM (#17001860)
"It is correct to teach kids that they should tell the truth in every scenario, even if as adults we don't."

Not correct. Example, a stranger: "are you alone a home?" or "what is the keycode for the door" etc.

Re:Never Write Your Own Database (2017) by dragonwriter on Saturday May 05, 2018 @10:19AM (#17001903)
I don't agree that these are counterexamples; there's a difference between telling the truth and telling the truth someone else wants to hear.

“I am not going to answer that” is a true, correct, and appropriate response to both of those questions.

Re:Never Write Your Own Database (2017) by hutzlibu on Saturday May 05, 2018 @12:06PM (#17002389)
But to a potentiell hostile stranger it is better to lie, than to tell the truth. More extreme examples come to my mind, with active agressor wanting to know something, where it is smarter to fool the enemy, than to tell the truth. "I don't knoe the code instead of "I am no allowed to tell".

But besides, most kids learned to lie pretty well, to circumvent various restrictions - and learning from the adults who tell them no to lie, but do it by themselves.

I am in favor of leading by example. If I am lying, how can I possible demand it from kids, to do otherwise? When they find out, they loose confidence in me. But when I tell them to only lie in extreme situations to "enemys" and act accordingly, they are much more likely to become truthful by default as well.

Re:Never Write Your Own Database (2017) by ksk on Saturday May 05, 2018 @12:47PM (#17002557)
I think its still correct. Sorry, I don't find your examples to be a reason to teach children that truth is optional.
Re:Never Write Your Own Database (2017) by klibertp on Saturday May 05, 2018 @06:39PM (#17004268)
It would be much better to teach children that the truth doesn't exist, that everything we call "reality" is a lie on some level, and that the best you can do is to stay honest to yourself and your intentions. Probably much harder to teach, but much closer to what they will fight with for the rest of their lives. I think it's the lack of such preparation in childhood which makes people give up, either never trying to figure out what the "truth" even is or relying on an imaginary friend in the sky as a source of one and only truth.

Some simplifications are useful in some contexts, but the world is an unimaginably complex thing and trying to dumb it down can only take you so far.

Re:Never Write Your Own Database (2017) by ibeckermayer on Sunday May 06, 2018 @02:24AM (#17005477)
"the truth doesn't exist, that everything we call "reality" is a lie on some level"

Wait so does this truth exist, or is it also a lie on some level?

Re:Never Write Your Own Database (2017) by klibertp on Monday May 07, 2018 @06:29AM (#17011635)
> does this truth

It's not truth at all. Just an observation. It happens to fit with my perceptions. That's it.

You can artificially define truth by tying it to a particular frame of reference, but that's not "the truth", as that frame of reference is not 100% transferable to others anyway. The idea of umwelt, as I understand it, seems to work here. Still, it's just an observation, an impression.

I'm not really saying anything new here. Descartes was saying something similar quite a long time ago. Then again, he could have meant something else entirely and there's no way for me to know which is it. I just assume my understanding is close enough to the intended meaning. I may well be completely wrong on this.

Basically, there's nothing you can be really sure about, including the fact that you can't be really sure about anything. There are only things that appear to work for you and, possibly, others. You can use them. Just don't believe them unquestioningly.

Re:Never Write Your Own Database (2017) by hutzlibu on Saturday May 05, 2018 @01:08PM (#17002647)
Never said that. Default is truth. But there are rare exceptions.
Re:Never Write Your Own Database (2017) by ksk on Saturday May 05, 2018 @01:48PM (#17002825)
If you didn't then I don't even know what you're saying, or why you're disagreeing.

Me: It is correct to teach kids that they should tell the truth in every scenario, even if as adults we don't.

You: Not correct. [...]

Exceptions exist in every situation for every single thing you say or do or think. Pointing out exceptions doesn't get you anywhere. Every adult knows this. A childs mind doesn't, and depending on the maturity level, cannot comprehend them. There is an established successful method of instruction of starting with simple rules/laws/examples, and then layering complexity later on. All of our systems of education are based on this. Nobody tells a child to also look up for a possible meteor or a skyscraper collapsing, or a vulture about to attack them before crossing the street. We just teach them to look both ways. Programmers are taught to take for granted that a bit in memory retains its value once set. When you're learning how to program you don't need to account for CPU bugs or cosmic radiation.

Re:Never Write Your Own Database (2017) by hutzlibu on Saturday May 05, 2018 @07:59PM (#17004563)
"If you didn't then I don't even know what you're saying, or why you're disagreeing.

Me: It is correct to teach kids that they should tell the truth in every scenario, even if as adults we don't." teach children that truth is optional."

Optional means maybe. I said default is truth. And when I say every, I mean every. But there are exceptions, in the case of enemys. So if they lie to someone, it means this one is a (temporary) enemy. Which is a serious implication. They do understand that usually.

They also understand the concept of friend and enemy very early, I bet you agree. (not that they can allways correctly sort it out, but also we adults can't do that allways)

So they very intuitively understand the exception in the case of a meeting with a potential dangerous person and I bet, instinctivly act accordingly and not tell him, where others are hiding for example. (Or break down and cry, also a valid strategy)

Re:Never Write Your Own Database (2017) by ksk on Sunday May 06, 2018 @02:48AM (#17005513)
Sorry, I don't agree with your comment. No point in going round and round. Goodluck!
Re:Never Write Your Own Database (2017) by hutzlibu on Saturday May 05, 2018 @08:05PM (#17004588)
But it is much more likely for a kid to be approached by strangers who ask them if they are alone, than be hit by a meteor. So I say it does make sense to explain them the concept of a complex world and different rules for different situations as early as they can get in situations, where they have to look for themselves.
Re:Never Write Your Own Database (2017) by youdontknowtho on Sunday May 06, 2018 @06:52AM (#17005990)
"Never roll your own authentication" seems to hold up pretty well though...
Re:Never Write Your Own Database (2017) by brightball on Friday May 04, 2018 @10:27PM (#17000002)
“Never use absolutes.” - Brightball’s Law
Re:Never Write Your Own Database (2017) by lmilcin on Saturday May 05, 2018 @06:19AM (#17001181)
"Never use absolutes." is absolute in itself
Re:Never Write Your Own Database (2017) by Marazan on Saturday May 05, 2018 @10:37AM (#17001984)
That's the joke.
Re:Never Write Your Own Database (2017) by hutzlibu on Saturday May 05, 2018 @10:05AM (#17001841)
What a smart observation
Re:Never Write Your Own Database (2017) by prmths on Saturday May 05, 2018 @06:31PM (#17004233)
Exactly. Exceptions prove the rule. But this applies to everything, not just databases. Never write your own OS, unless you are faced with an exception where you have to.

If you have a special case where RDBMs can't fill your need, then you obviously have to build your own. But these cases are so rare that it proves the rule.