Task manager in awk with dependencies implemented as directed acyclic graph github.com/phillbush/todo
πŸ‘︎ 12
πŸ’¬︎
πŸ‘€︎ u/narrow_assignment
πŸ“…︎ Dec 10 2021
🚨︎ report
Dependency inversion principle in Typescript staszewski.me/dependency-…
πŸ‘︎ 49
πŸ’¬︎
πŸ‘€︎ u/staszewski
πŸ“…︎ Jan 15 2022
🚨︎ report
Dependency inversion principle in Typescript staszewski.me/dependency-…
πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/staszewski
πŸ“…︎ Jan 15 2022
🚨︎ report
Practical SOLID in Golang: Dependency Inversion Principle levelup.gitconnected.com/…
πŸ‘︎ 26
πŸ’¬︎
πŸ‘€︎ u/ompluscator
πŸ“…︎ Nov 22 2021
🚨︎ report
Why is "zero dependencies" seen as a good thing in software? Isn't that violating the very important principle of "reuse code"?

Often times I see software advertise itself as "zero dependencies", and it gets celebrated as a great thing. Though there are exceptions, I find that "zero dependencies" means the developer might have had to reinvent functionality that already exists and duplicate it in their app, when they could have just imported a dependency and focused on the part of the code that no one has invented yet, at least not in the way they want to do it.

If for any reason, the existing solution is not perfect, the developer could still contribute to upstream, or even fork it and add to it.

If the existing solution is really just so bad they have to rewrite it, it would still be ideal to separate it as its own separate package that can be maintained separately and used for for different purposes.

If the app was just a really small thing that really didn't need dependencies, I'd agree. But this isn't always the case.

What are your thoughts?

πŸ‘︎ 28
πŸ’¬︎
πŸ‘€︎ u/oxamide96
πŸ“…︎ Aug 28 2021
🚨︎ report
Acyclic, a compiler plugin to control circular dependencies github.com/lihaoyi/acycli…
πŸ‘︎ 13
πŸ’¬︎
πŸ‘€︎ u/lihaoyi
πŸ“…︎ Feb 17 2014
🚨︎ report
Practical SOLID in Golang: Dependency Inversion Principle levelup.gitconnected.com/…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/ompluscator
πŸ“…︎ Nov 22 2021
🚨︎ report
Logical dependencies between Maxwell equations (from first principles is even better!)

[X-posting from /r/physics. I'd be greatful if /r/math people could help me out with formalizing the proof for induced EMF below! It's really math technicalities, not physics stuff, that is holding me up there.]

Does someone know of an article or some notes that prove the logical dependencies (as in implication and if-and-only-if) between the various Maxwell equations and "Maxwell lemmas"? (An example of a "Maxwell lemma" is the Biot-Savart law).

While I'll settle for iff's that relate Maxwell equations and Maxwell lemmas if I must, it would be nice to be able to derive some of the Maxwell equations or Maxwell lemmas from first principles (like maybe a continuity equation?). I also prefer longer, more intuitive "discovery-style" arguments that are geometric if possible to "efficient" arguments that start with nonobvious hypotheses or use magical machinery like delta functions.

Here's what I have so far. This also outlines the kind of content I'm looking for.

  • (Coloumb and Gauss laws). Wikipedia already details the relationship between the Coloumb and Gauss laws: Coloumb's law and E field has superposition => Gauss's law, and Gauss's law for a stationary charge => Coloumb's law.
  • (Faraday's law). First principles (or possibly more assumptions I'm not aware of) => induced EMF is negative time derivative of magnetic flux. Applying Stokes' theorem to this formula for induced EMF gives the integral form of Faraday's law. I suspect that the implication "EMF formula => Faraday" is actually an if-and-only if.
  • (No monopoles). I don't know how to prove the "no monopoles" Maxwell equation, which states that div(B) = 0, or equivalently, that magnetic flux around any volume is zero.
  • (Magnetostatic Ampere's law). Magnetostatic Ampere's law <=> Biot-Savart law. (See proof below).
    • (General Ampere's law). It seems to me that the general (magnetodynamic) Ampere's law can be motivated as follows. First, take the divergence of the magnetostatic Ampere's law and apply the continuity equation for current density to obtain the false statement that charge density is always constant. So magnetostatic Ampere's cannot be correct. The magnetodynamic version of Ampere's is obtained by taking the time derivative of the differential form of Gauss's law, commuting d/dt with
... keep reading on reddit ➑

πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/Ihsiasih
πŸ“…︎ Jun 26 2021
🚨︎ report
Does having multiple instances of one dependency service violates any of the SOLID principles?

Hi Everyone!

Recently, I refactored my code project to implement Dependency Injection and I noticed I still have a lot more to fix in my code project.

To give an idea, in my codebase, I already made an ICalculator interface, which will be inherited to all instances of a Calculator (ex. Converter Calculator, Currency, etc.). I plan on creating other instances using the same interface and calling them as needed. (See example below)

public interface IService { }
public class ServiceA : IService { }
public class ServiceB : IService { } 
public class ServiceC : IService { }

I know that it is not mandatory to apply SOLID principles but I want to apply it in my code otherwise as I see my code project expanding for the long run.

My concern is if it would violate the SOLID principles using the said approach of creating multiple instances implemented by the same ICalculator interface.

I would like to have some clarifications regarding this.

Thank you and have a good day!

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/JehanJoseph550
πŸ“…︎ Jun 08 2021
🚨︎ report
[Q] Do principles of sufficiency and likelihood mean functional dependency?

Casella and Berger's Statistical Inference lists:

> Formal sufficiency principle. Consider experiment E = (X, theta , {f(xltheta)}) and suppose T(X) is a sufficient statistic for theta. If x and y are sample points satisfying T(x) = T(y), then Ev(E, x) = Ev(E, y).

Does it mean that Ev(E, x) = h(E, T(x)) for any x, for some function h?

> FORMAL LIKELIHOOD PRINCIPLE: Suppose that we have two experiments, E1 = (X1, theta , {f1(x1 | theta)}) and E2 = (X2 , theta , {f2(x2 | theta )}), where the unknown parameter theta is the same in both experiments. Suppose x1 and x2 are sample points from E1 and E2, respectively, such that L(theta | x1) = C L(theta | x2) for all theta and for some constant C that may depend on x1 and x2 but not theta. Then Ev(E1, x1) = Ev(E2, x2).

Does it mean that Ev(E, x) = g(E, L( | x)) for any x, for some function g?

πŸ‘︎ 12
πŸ’¬︎
πŸ‘€︎ u/timlee126
πŸ“…︎ May 22 2021
🚨︎ report
The underlying principles of car-dependent urban planning. Shit needs to change.
πŸ‘︎ 2k
πŸ’¬︎
πŸ‘€︎ u/SaxManSteve
πŸ“…︎ Dec 30 2021
🚨︎ report
Opinion: DAGs (Directed Acyclic Graphs) are the future, not Blockchains

I think it's important that everyone diversify your portfolio in this market. But I'm not just talking about different projects that share similar architecture, I'm talking about diversifying into different technologies and consensus mechanisms as some will win out over others. In the case of this post, I think people should consider having at least 1 DAG project in your portfolio.

What's is a Directed Acyclic Graph (DAG) and how does this differ from Blockchain: Directed - having a specified direction / Acyclic - not cyclic (doesn't cycle) / Graph - a diagram (such as a series of one or more points, lines, line segments)

In blockchain, consensus is achieved by validating transactions block by block on a chain. A blockchain uses miners or stakers for example to maintain consensus and security on the network.

In a DAG, individual transactions provide validation for one another I.e. 1 transactions must approve the following 2 or 3 transactions (you must give a little bit of computing power to contribute to the network). Network users are both miners and validators, although you cannot validate your own transactions.

Key Differences: Blockchains do not require large volumes of transactions on the network to be secure but DAGs often do. Blockchains have fees but many DAGs have no or extremely little fees. Blockchain currently has better proven history than DAGs. DAGs have much better scalability principles that underpin them than Blockchains. Acheiving full decentralisation on a DAG is challenging and alot of Blockchains are arguably more decentralised than DAGs today however it depends on the project, in saying this IMO DAGs will become more decentralised than Blockchains as they develop.

Some examples of projects currently using a DAG structure instead of Blockchain: Nano / Avalanche / IOTA / Byteball / Hendra Hashgraph / Hathor / Aleph Zero

Article: This is an extremely detailed article that digs into both Blockchain and DAGs to help you learn. https://www.cryptocoinsociety.com/what-is-blockchain/

Summary: If you don't understand DAG technology I encourage you to do your own research and incorporate at least 1 DAG project into your portfolio if not for the promising tech than purely for diversification. While DAGs have some challenges there is alot of work being done with them that I believe is far superior to Blockchain technology in the long run.

Disclaimer I own IOTA Tokens

πŸ‘︎ 49
πŸ’¬︎
πŸ‘€︎ u/FR330M
πŸ“…︎ Jan 14 2022
🚨︎ report
Write better Python code with the dependency inversion principle

Part 2 of my How to Write Better Python Code series introduces the concept of dependency inversion. Dependency inversion is a very useful design principle that helps you write code that’s a lot easier to maintain and extend. The idea behind this principle is that instead of having modules depend directly on each other, you use an interface or abstract class to remove that direct dependency. I made a YouTube video where I explain the concept in detail and go through a Python code example that shows you exactly how it works: https://www.youtube.com/watch?v=Kv5jhbSkqLE

Let me know what you think. This is something I’ve been applying more and more in my code and it helped me a lot in writing higher quality code.

πŸ‘︎ 13
πŸ’¬︎
πŸ‘€︎ u/ArjanEgges
πŸ“…︎ Feb 03 2021
🚨︎ report
Recommend books on PHP and the right way to connect PHP Project with Database (using Singleton or Dependency Injection or SOLID principles), without using WAMP or XAMPP environments. Possibly written from a perspective of Linux user

Here is what really bothers me. I am being a professional developer for a three and a half years now and by professional developer I mean I am doing that for a living. I've been programming before that also, during my studies, so it makes me an active programmer for even more then 4 years now. The main problem I am facing, and I guess it's not only me, is that whenever you start working for new company, the project you will be working on has already been created and developed. Your job is mostly gonna bring down to bug fixing and eventually adding new features. But I have never created an application from the very start. Currently I am working as a Full Stack developer in a company where we use Laravel framework on the back and VueJS on the front (it's a Single Page Applicaiton), and I can program in both languages without problems, but recently I had a job interview where I was asked if first page of our application is being rendered on the server or even that page is rendered with everything else on the client side. I couldn't answer that question, since I do not know the basics of our project, that was the part which was developed before I came to this company and nobody is ever going to explain that parts of the project since it's "not important" for my current job position, I can perform my day to day duties pretty well without that knowledge.

So that was the main reason why I wanted to start as if I coming to software development the very first time now, to learn all that basics. I want to start with books that use plain PHP, no frameworks, but I don't want to read about variables, loops, data types or similar things. I would like to learn what is the right way to connect PHP project to Database (as said in title of this question) and later on would like to continue with the right way to create MVC architecture using PHP and JS (again plain), and only then continue my progress by including frameworks and everything else needed for my progress.
I have to mention that I am forced to work on Linux distros, currently I am working on Ubuntu. But I can't say I do not like it, actually I got used to it and I love it now!

Please help me by recommending me some good books, possibly of newer date, which I could read and which are going to help me regarding this problem I wrote about.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/nikolamilo
πŸ“…︎ Nov 08 2020
🚨︎ report
Dependency Inversion Principle - Python Example youtube.com/watch?v=SRoFC…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/here-i-am-people
πŸ“…︎ Apr 18 2021
🚨︎ report
[SPORT, Spain] Agreement in principle between Cavani & Barcelona, the Uruguayan forward gives the OK to sign for a year and a half with the Blaugrana club. in Manchester they are still not clear if they will release Cavani since it depends on the possible departure of other players such as Martial. twitter.com/sport/status/…
πŸ‘︎ 291
πŸ’¬︎
πŸ“…︎ Dec 20 2021
🚨︎ report
β€œAlex Jones is a little better than Hasan because he lives his principles”. I guess bad things aren’t so bad depending on if the person doing said bad things is consistent?
πŸ‘︎ 27
πŸ’¬︎
πŸ“…︎ Jan 07 2022
🚨︎ report
Should I use the SOLID principles and dependency injection when working with Unity?

Hey all,

I have recently started noticing that the majority of C# scripts that I create are really connected to each other, meaning that if I change something in one script, lots of stuff in other scripts can break. While I regularly use and follow the single-responsibility as well as the open/closed principles, I am not particularly sure if I should use dependency injection when working with Unity. I think that it can make things much more complicated than they need to be. Also, as far as I know, dependency injection is primarily used by software engineers, not game developers. On the other hand, I think that dependency injection could certainly be helpful at times. So, should I use dependency injection when working with Unity?

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/ClinsBER
πŸ“…︎ Nov 29 2020
🚨︎ report
ELI5: Dependency Inversion Principle

I read that the Dependency Inversion Principle states that

'High level modules should not depend on low level modules. Both should depend on abstractions. Abstractions should not depend on details. Details should depend upon abstractions'

The second part of the principle about abstractions makes sense to me.

I don't have a good understanding of the first part of the principle, the part about high level modules should not depend on low level modules.

Aren't high level modules by definition dependent on low level modules?

Can someone give an ELI5 example of a hack/situation that would not follow the first part of the DIP principle?

Is the first part of this principle stating avoid circular dependencies?

πŸ‘︎ 27
πŸ’¬︎
πŸ‘€︎ u/Truetree9999
πŸ“…︎ Jan 31 2020
🚨︎ report
The underlying principles of car-dependent urban planning.
πŸ‘︎ 75
πŸ’¬︎
πŸ‘€︎ u/Jacinda-Muldoon
πŸ“…︎ Dec 30 2021
🚨︎ report
Dependency injection and the principle of least privilege olleharstedt.github.io/ph…
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/usernameqwerty003
πŸ“…︎ Jul 09 2020
🚨︎ report
I developed a FLOSS educational tool in Godot for engineering students to learn the basic principles for sequential logic in time-dependent processes. Goal? To finally have more fun while solving exercises and to get deeper insights v.redd.it/ccwwpxprfy281
πŸ‘︎ 146
πŸ’¬︎
πŸ‘€︎ u/Kersoph
πŸ“…︎ Dec 01 2021
🚨︎ report
There is a free open-source educational tool to learn the basic principles for sequential logic in time-dependent processes (e.g., PLCs, using roughly SFC) for newcomers who do not have hardware or simulators at home (or corporate access). May be useful for some v.redd.it/sq42k06s4p481
πŸ‘︎ 117
πŸ’¬︎
πŸ‘€︎ u/Kersoph
πŸ“…︎ Dec 10 2021
🚨︎ report
S.O.L.I.D Design Patterns - Unity - Dependency Inversion Principle youtube.com/watch?v=OLjXw…
πŸ‘︎ 59
πŸ’¬︎
πŸ‘€︎ u/natemi10
πŸ“…︎ Sep 04 2019
🚨︎ report
Principled way to turn a cyclic graph into an acyclic graph

Are there any good algorithms for doing so?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/unguided_deepness
πŸ“…︎ Aug 17 2018
🚨︎ report
Dependency Inversion Principle (live lesson)

What is a dependency principle and what it is not? Why does it matter and how to apply it using best practices in the modern codebase?

There is an ongoing misconception that DIP is just depending on an interface and injecting it through a constructor or the like. There is much more to it than that. What exactly? Find out in my lesson live on twitch:

https://twitch.tv/kaisinnel

In case you miss it- here is a link to the slides:

https://docs.google.com/presentation/d/1hiSKCULC_kqfbAvT9F61AIRbfEJ4bIvDg8iaxnVIJxQ/edit?usp=sharing

Feel free to ask any questions in the comments :)

πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/Kaisinell
πŸ“…︎ Jun 27 2020
🚨︎ report
β€œAlex Jones is a little better than Hasan because he lives his principles”. I guess bad things aren’t so bad depending on if the person doing said bad things is consistent?
πŸ‘︎ 2
πŸ’¬︎
πŸ“…︎ Jan 07 2022
🚨︎ report
Dependency Injection, Inversion of Control & The Dependency Inversion Principle kc.my-junk.info/di-ioc-di…
πŸ‘︎ 53
πŸ’¬︎
πŸ“…︎ Jun 12 2017
🚨︎ report
Considering SOLID principles, esp. Dependency Inversion, What's the current best practice for helper functions e.g. Helper::formatDate()?

I've recently been educating myself on the current implementation of dependency injection with the hopes of refactoring my current (Laravel) project. I've more or less understood the pattern to use amounts to:

protected $_dependency;
function __construct(Dependency $dependency)
{
    $this-&gt;_dependency = $dependency;
}

Then, I simply call $this-&gt;_dependency-&gt;method() anywhere in my class.

This pattern is all fine and good for classes meant to be instantiated, but I run into a problem using this with primarily static classes e.g. StaticDependency::staticMethod(). I can't call any methods e.g. $this-&gt;_staticDependency::method() without first assigning it to a simple variable, which felt a bit off to me. Is this uunavoidable, or is there a better, DI-compatible solution?

The specific dependency I'm encountering this issue with is my Helper class, which I store methods into that encapsulate logic using PHP core functions and classes e.g. changeDateFormat(). Besides the above issue, I also encountered an opinion online noting that such a class violates the Single Responsibility in SOLID. Since it also acts as a wrapper for otherwise core PHP functionality, I have no reservations calling it from the same global scope anywhere in my app. Feel free to correct any mistaken assumptions I've made, though.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/firagabird
πŸ“…︎ Jan 22 2019
🚨︎ report
Applying the Dependency Inversion Principle in Angular blog.snowfrog.dev/depende…
πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/snowfrogdev
πŸ“…︎ Nov 28 2019
🚨︎ report
SOLID Principles #5 - Dependency Inversion Principle netguru.co/codestories/so…
πŸ‘︎ 32
πŸ’¬︎
πŸ‘€︎ u/lonewinds
πŸ“…︎ Apr 26 2018
🚨︎ report
Beyond SOLID: The Dependency Elimination Principle qualityisspeed.blogspot.n…
πŸ‘︎ 40
πŸ’¬︎
πŸ‘€︎ u/Pair_of_socks
πŸ“…︎ Jan 23 2015
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.