A list of puns related to "Acyclic dependencies principle"
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?
[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.
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!
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?
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
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.
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.
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?
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?
Are there any good algorithms for doing so?
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:
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 :)
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->_dependency = $dependency;
}
Then, I simply call $this->_dependency->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->_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.
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.