Recent comments in /f/explainlikeimfive

Aussie_Mo_Bro t1_ja03deq wrote

You've answered your own question.

They're allowing free access to this particular bit of code.

The reasons are varied, but could include

  • Based on an already open source code

  • Used in a paid product or service. The extra support is offered for free

  • It is intended for academic use

  • Its just a small project that they don't want any money for

  • It is a requirement for a third party site or service that your code is made freely available

  • They just want to make it freely available

  • It is a legal grey area, and charging for it would definitely be illegal

5

explainlikeimfive-ModTeam t1_ja037v9 wrote

Please read this entire message


Your comment has been removed for the following reason(s):

  • Top level comments (i.e. comments that are direct replies to the main thread) are reserved for explanations to the OP or follow up on topic questions (Rule 3).

Plagiarism is a serious offense, and is not allowed on ELI5. Although copy/pasted material and quotations are allowed as part of explanations, you are required to include the source of the material in your comment. Comments must also include at least some original explanation or summary of the material; comments that are only quoted material are not allowed.


If you would like this removal reviewed, please read the detailed rules first. If you believe it was removed erroneously, explain why using this form and we will review your submission.

1

Mammoth-Mud-9609 t1_ja01kgo wrote

There is something called retrospective legislation which not only changes current law but also changes how the law is applied in the past, most governments avoid retrospective legislation because of issues like this in general if you broke the law you still knowingly committed a criminal act and have to face the consequences of doing so.

10

MMGeoff t1_ja01c64 wrote

As everyone else has said, I've heard it's mostly, if not only the result of social conditioning.

I'd love someone with some background to confirm or deny this, but I think in African drumming music (which I'm sure is incredibly varied), being much more rhythmic than classical Western music, it's the speed of a piece that determines the emotional impact. Fast pieces are happy, slow pieces are sad.

2

Saporificpug t1_ja00ub0 wrote

Technically nothing would happen. Some languages don't have the concept.

You can think of a program as a list (not a List class) of objects or methods.

For a small grocery list, it's just a list of a few items, you're probably just write them down on a single page with no separation. A small program would be okay with only using one or two classes, it's no big deal.

But say we're talking about multiple store chains in a corporation. You're going to list different stores and different positions in corporate. Each store is going to have their own employees listed, but most people outside of the store is going to be concerned with the store manager and assistant manager so their numbers will be listed for thise outside the store. Inside the store everyone should know about and interact with their coworkers.

Ecapsulation is kind of the same idea. You break code into different classes. Not every class should be concerned with every function or object of a different class, so some objects/methods are marked for different level access so only some or certain objects can interact with those.

One good use of ecapsulation, is imagine you have a method that you have some kind of input like age. A problem with using a public variable from a different class is that you can change the variable and you might not catch every error input like a negative number. By making it private and using a public method that changes it, it can only be changed by that method which can catch if the number is negative, or too high or between a range. This makes debugging easier because the only way that variable could be wrong is if the logic in that setter method is wrong.

1

ohverygood t1_j9zxxts wrote

There was a time when baseball would be played by any number of kids, with whatever kind of stick and ball, in whatever alley or field was nearby. You never see that nowadays in the U.S., although you will see kicking a soccer ball in similar conditions.

2

remradroentgen t1_j9zxutk wrote

To add to the examples: let's say you hate how your roommate leaves dishes everywhere. But you decide to plonk your plate on a chair instead of loading it into the dishwasher. You feel like a hypocrite because you've criticized your roommate doing that -- does it mean that you should also criticize yourself? This is only your first time doing it, it's a stressful week, etc. But now you're wondering why you're allowed to excuse it for yourself and not allow your roommate to excuse when they do it.

All that discomfort you're feeling as you're trying to resolve two conflicting viewpoints (it's bad for your roommate to leave dishes around, but it's fine when you do it) is cognitive dissonance. You'll see a lot of people on Reddit misuse it to refer to you simply having conflicting opinions, but that doesn't quite capture it. Cognitive dissonance should encourage you to resolve your conflicting viewpoints, either by adjusting a viewpoint (it is also bad when you leave dishes around), or abandoning it (it's not bad to leave dishes around, period).

1

mynewaccount4567 t1_j9zwlz5 wrote

I don’t know if not charging for memberships would cause a price increase (at least directly to make up for membership revenue)

I think instead it’s a more binding loyalty program. Most people will only get a membership to one warehouse club. So once they have someone locked in a membership, they are very unlikely to shop elsewhere. Customers will be more likely to shop exclusively at their store. And getting people in the door is half the battle for grocery stores. They can then hope to pump up tabs with enticing impulse buys and high margin items

2

Flair_Helper t1_j9zw559 wrote

Please read this entire message

Your submission has been removed for the following reason(s):

Questions about a business or a group's motivation are not allowed on ELI5. These are usually either straightforward, or known only to the organisations involved, leading to speculation (Rule 2).

If you would like this removal reviewed, please read the detailed rules first. If you believe this submission was removed erroneously, please use this form and we will review your submission.

1

AcusTwinhammer t1_j9zvsam wrote

As a matter of official process, nothing. The fact that something is no longer legal now does not mean you didn't commit an offense when it was illegal in the past. By much the same logic, if something is made illegal now, that doesn't mean you can be charged for doing it when it was still legal.

That being said, there are methods for the government (usually via the executive branch in the US) to grand clemency in some form or another to many of those convicted of something that is no longer illegal.

56

tiredstars t1_j9zvhcj wrote

On the whole they will stay in prison. They still broke the law, and governments and societies generally view this as a bad thing in itself.

There are exceptions where a law might include an amnesty for those convicted, or people might be pardoned. That might be most common with 'political crimes' and changes of government. At the very least, parole hearings are likely to be more lenient.

122

lawrence1998 t1_j9zv0oi wrote

Because encapsulation prevents people from seeing that code (sort of).Another example of encapsulation is it can enforce devs to adopt better practice. It leads to less undefined behaviour.

As a dev, I should only be modifying/impacting code that I need to be interacting with. I shouldn't be able to accidentally modify X code. If other devs adopt encapsulation, I'm no longer able to accidentally interact with code I shouldn't be able to. This reduces undefined behaviour which is a huge part in producing a stable app.

If my system is allowing for tons of (irrelevant) places to interact with otherwise irrelevant code, I could end up introducing bugs/issues every time I PR code. But if my team adopts encapsulation, it reduces that risk.

In other words, it reduces dependencies. Every dependency you add to a module increases the chance of bugs and increases the complexity of that module. So it's harder to work with a system if there are 10000000 potential dependencies vs only a few. It's cleaner and more clear.

1

Regayov t1_j9zu6gl wrote

By encapsulating your code you are defining and separating the external interface from the internal implementation. By doing that the internal implementation can change without breaking everyone who used your components. Without it anyone who uses your components could come to rely on any method or variable you used. If a better implementation comes around and those methods or variables are removed then their code will break.

Similarly if your component is complex, say with lots of concurrency/threads, then leaving internal methods or variables externally accessible can cause all sorts of problems. External components could access those internal structures directly, potentially bypassing any protections you established.

1