Dependencies



Dependency definition, the state of being dependent; dependence. Dependencies in DBMS is a relation between two or more attributes. It has the following types in DBMS − Functional Dependency; Fully-Functional Dependency. Every project has dependencies, which Max Wideman’s Glossary defines as the “relationships between products or tasks”, i.e. Tasks that require input from other tasks to be completed, or activities that can’t start until a previous activity is done. There are often several sequences to a task, and they’re all dependent on each other.

This article explains what Dependencies in Programming mean.

This article is going to be a very informative read no matter what kind of programmer you are. In fact, even if you aren’t a programmer you will find this article useful. After all, dependencies is not just a programming concept. It’s a general term that has meaning even outside of Computer Science.

Table of Contents:

  • What are Dependencies
  • The Dangers of using Dependencies
  • Why we use Dependencies
  • Picking the right Dependency
  • Further Reading

What are Dependencies

Dependency is a broad software engineering term used to refer when a piece of software relies on another one. Simply put, if Program A requires Program B to be able to run, Program A is dependent on Program B. This makes Program B a dependency of Program A.

You may ask, why would Program A even need Program B, or any other program for that matter? This will be further elaborated in the “Why we use dependencies” section in this article, but a short version is that Program A requires a special service or feature which Program B has.

It doesn’t really matter what it is, if your program needs to run correctly, it’s a dependency. Common examples of dependencies are programming libraries, Online services, programming scripts etc.

If you’re a Python programmer reading this, I recommend you check this article on Pyinstaller as well. It also has alot to do with Dependencies, converting python files to exe’s and distributing software, a very informative article overall.

The Dangers of using Dependencies

Having dependencies for your code is generally frowned upon. As we explained earlier, it reduces the flexibility of your code and worse case scenario, it can completely ruin your program. Before we get into this though, we’re going to categorize dependencies into the two follow categories.

  1. Dependencies that we control
  2. Dependencies that we do not control

Uptil now we’ve mostly been talking about the first category, dependencies which we have direct control over, such as a custom library that you may have wrote. Now we’ll briefly discuss the second category, dependencies that we do not control.

Unlike dependencies that you have direct control over, (like a custom library) dependencies that you do not control have a much higher risk factor involved. What happens if one of the dependencies suddenly shuts down or goes through some kind of drastic change (breaking your program in the process), what will you do?

There have been cases where a company completely based their application around a dependency or external service and it was shut down suddenly, causing them major losses.

Of course, this doesn’t mean you shouldn’t be using dependencies. Most of the time you won’t have a choice anyway. What you can do however is minimize the risk involved by choosing your dependencies smartly.

Why we use Dependencies

At this point you may be wondering, “why do we even use dependencies if there is so much risk?”. That’s a good question, and the answer is pretty simple and straightforward.

Applications are becoming more and more complex day by day. The average amount of code behind an application is also increasing day by day. If each one of us started from scratch each time, we would barely make any progress.

What we do is to carry forward what has already been tried and tested and then further build upon that. Basically, we save time by using pre-written and tested code, and then use the time we saved to create new and better things.

This is actually one of the major reason Python is so popular. There are so many Python libraries with pre-written code for various scenarios, that a new programmer can build complex and advanced applications within a few weeks using these libraries.

Reinventing the wheel

You may have heard of this expression, “reinventing the wheel”. It refers to the act of creating your own version of something that has already been created. Trying to reinvent the wheel is generally a highly discouraged practice in programming (with few exceptions).

The reason for this is quite simple. If a widely tested and adopted service/library already exists, why waste the time and effort making your own version which is probably going to be subpar to the one that already exists.

To sum up, we use dependencies to avoid having to reinvent the wheel, to speed up our coding process, save time and increase efficiency. Let’s say you have a software that requires location data for a certain part, are you going to create an entire service that provides location data? Of course not, you’re going to use a pre-existing location service to provide you that data. It could be the difference between writing 10 and 10,000 lines of code.

Things to look for in a Dependency

A couple of important things to keep in mind while selecting a dependency.

  1. Portability: The last thing you want is a dependency that only works on certain systems and platforms. Unless you only plan to release your application on a certain platform, you should definitely research your dependency carefully and even pre-test it on the platforms you’re aiming for.
  2. Version control: Be mindful of the version you pick for your dependency. You should already know this, but each new version brings in new features. If you’re using the latest version of that dependency and your customers/clients have a slighter older version there might be issues. You also have to consider how you will be managing your update schedule.
  3. Regular Updates: This is both a security issue, and also an indication that this dependency could abandoned entirely in the future. If the dependency you’re looking to use hasn’t been updated in a year, it’s best to avoid it.
  4. Adoption rate and usage: You’ll usually find several different possible dependencies you can use for your program. You should aim for the one has been widely adopted in it’s respective field and is actively being used. Not only does this show the dependency is reliable and trustworthy, it also indicates that the community for this Dependency will be large. Popular dependencies are thoroughly documented and discussed across the internet, making troubleshooting or asking for help easier.
  5. Compatibility: The last thing you want is to pick a dependency without properly researching it and later finding out that it wasn’t compatible on all the platforms you were aiming for. This problem is more common than you may think. There are all kinds of issue that may be involved so be sure to do your research before hand. As another suggestion, while coding keep testing your code on different platforms and settings. You don’t have to leave all the testing for once you’re done.

Good Dependencies

An example of a good third party dependency would be Google Maps. If you build an application that requires locations services, you could use the Google Maps API to retrieve location data. I say this is a good dependency because:

  1. Google Maps is managed by Google, a large company.
  2. Google Maps as a service is used globally, hence you can expect it to be reliable and consistent. You don’t have worry about this service vanishing over night or something.
  3. The Google Maps API is simple and easy to use. It has a free version with a limited number of requests and a premium (paid) version as well. For most cases the free version is perfectly fine.

If you’ve been coding for a while, you’ll also have undoubtedly used many libraries too. About 95% of the time using these programming libraries as your dependencies is perfectly fine due to how widespread their use is. As a bonus, it’s not too hard to bundle up these libraries into a compiled program either using something a file to exe converter like pyinstaller (for python programs).

You should however avoid libraries which are outdated and have very little support. Basically just keep an eye out for everything we mentioned in the previous section.

Be smart and pick wisely!

Other Resources

Dependencies in programming is a topic over which an entire book can be written. There’s alot more to them than what was covered in this article, so if you’re interested we’ve included some resources here for further reading.

If you interested in hearing more about dependencies and their dangers in programming, I suggest you read this article.

This marks the end of the “What are Dependencies in Programming” article. Any suggestions or contributions for CodersLegacy are more than welcome. Questions regarding the article content can be asked in the comments section below.

Project dependencies are nothing but Schedule dependencies.

I have written this article to discuss different aspects of dependencies in project management. You will find the definition, meaning, and description of dependencies in this post. You will also see explanatory diagrams and small examples of schedule dependencies.

Project dependencies are often misconstrued as assumptions or constraints in project management. But there is a difference between project dependencies, assumptions, constraints, and risks. You will be able to distinguish between these terms by the end of this post.

I have written three other posts to explain Project Assumptions, Project Constraints, and Project Risks. Together these posts will help you to understand the concept completely.

What Are Project Dependencies – Definition & Meaning

A project dependency is better characterized as schedule or task dependency. It simply means that one task or activity is reliant on another one. Sometime these are (incorrectly) referred to inter-dependencies. Inter-dependencies are between two different projects.

A dependency can be defined between two activities, or between a milestone and an activity.

You can also look at Max Wideman’s Glossary or PMI Lexicon for some other definitions.

Dependencies

Project Dependencies Example

Let us consider two activities A and B. Let us assume B is dependent on A through FS relationship without any lead or lag.

What does it mean?

It simply means that B is dependent on A and it would start as soon as A finishes.

I have used Finish to Start relationship in the above example without any lead or lag. But dependencies can be expressed for other project relationships as well – Finish to Finish, Start to Start and Start to Finish.

The above example can be depicted in any one of the following ways.

Bar charts are popularly known as Gantt Charts.

The above figure shows the same dependency as a Project Network Diagram.

You can also represent the above example mathematically.

B(S) = A(F)

The above equation suggests that start of B is equals to finish of A.

Project Management Dependencies Example – A Real Life Scenario

Let’s understand the concept through the same example that I used in both Assumptions and Constraints posts.

Situation – PM requires an Approval of Design Artifacts from the Customer during the course of the project. Project cannot move ahead without this Approval.

PM may “Assume” that the Approval may come within 2 weeks and may plan accordingly.

The team cannot do anything but wait till the Design Approval comes. Project Team is “Constrained”.

There is a “Risk” of that the project might get delayed if the design is not approved as per the schedule.

Project Dependency – The activities of project team can start only after customer’s activity (Design Approval) is complete. The subsequent activity of project team is “Dependent” on customer’s activity (Design Approval).

Difference Between Project Dependencies, Assumptions and Constraints

You would have noticed that the same situation (Design Approval) can be written in different ways. It can written as a Dependency, Assumption, constraint, or Risk.

So what is the difference?

Dependencies vs Assumptions

Project Assumption can be defined as a statement that is generally considered to be a true without any proof or evidence. It is one of the major factors in planning process.

Project Dependencies & Assumptions are very different from each other.

Like in previous example, you can identify an assumption when there is a task dependency. But you can also identify a project assumptions even when there is no dependency. e.g. resource cost is unlikely to go above $100 per hour.

Similarly there could be pure task dependencies without any identified assumptions. e.g. you can ride a bus only after buying a ticket.

Dependencies vs Constraints

A constraint simply means limitation. A project could have constraints due to many factors. Task dependency is just one of them.

In the above example, the project team was “Constrained” due to customer’s activity (Design Approval). They could not do anything till customer’s approval (limitation).

Dependencies Definition

In many other cases the project constraints may not come because of a dependency. e.g. constraints could be due to unavailability of resources, shortage of budget, external environment etc.

Dependencies vs Risks

A risk is an event or condition that is likely to happen, which can impact at least one of the project objectives.

Just like a constraint, risk can happen due to many factors. Schedule dependency is just one of them.

In the above example, the project is likely to get delayed if the approval does not come as per the schedule.

Dependencies Synonyms

In many other cases the project risk may not be due to a dependency. e.g. risk could be due to incorrect estimates, poor quality, natural calamities etc.

Final Thoughts

Project Dependencies are considered solely between two Activities.

  1. They are also called Schedule/Task Dependencies.
  2. They could be either Mandatory or Discretionary. At the same time, they could also be External or Internal.
  3. Identification/determination of Project Dependencies is important part of scheduling.
  4. Discovery of new project activities or dependencies can lead to modification of the project schedule.
  5. They need not be separately documented. They should, rather, be depicted in the project schedule through Bar Charts and Project Network Diagrams.

Over To You

How do you use the term ‘Project Dependency’ in your projects? Do you use Assumptions, Constraints and Dependencies interchangeably?

Do you document dependencies separately?

Define Dependencies In Project Management

Please leave a comment below.