diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index 90304c599..72366d6b5 100644
--- a/.github/workflows/gh-pages.yml
+++ b/.github/workflows/gh-pages.yml
@@ -1,10 +1,9 @@
-name: github pages
+name: Deploy GitHub Pages
on:
push:
branches:
- - main # Set a branch to deploy
- pull_request:
+ - main
jobs:
deploy:
@@ -12,8 +11,8 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
- submodules: true # Fetch Hugo themes (true OR recursive)
- fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
+ submodules: true
+ fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 000000000..db82000ad
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,23 @@
+name: Prettier Lint
+
+on:
+ pull_request:
+ branches: [main]
+
+jobs:
+ prettier:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ ref: ${{ github.head_ref }}
+ fetch-depth: 0
+
+ - name: Prettify code
+ uses: creyD/prettier_action@v4.3
+ with:
+ dry: True
+ prettier_options: --check **/*.md
+ only_changed: True
diff --git a/.prettierrc b/.prettierrc
index 5f3a26009..d0d007cb0 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -10,7 +10,7 @@
"bracketSpacing": false,
"overrides": [
{
- "files": ["*.html", "*.json", "*.yaml", "*.yml"],
+ "files": ["*.html", "*.md", "*.json", "*.yaml", "*.yml"],
"options": {
"tabWidth": 2
}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 36edbfb81..d717d1272 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,12 +2,12 @@
## Writing Best Practices
-- Write one sentence per line. [Read more](https://sive.rs/1s)
-- Make sure to add a beginning and a conclusion.
-- Try to talk about the problem before presenting the solution.
-- Run your article through a spellchecker and/or [grammarly](https://app.grammarly.com/) for possible typos.
-- Make sure your Markdown code is properly formatted, using a formatter like prettier is recommended.
-- Run `hugo serve` after making changes to verify the changes on your local.
+- Write one sentence per line. [Read more](https://sive.rs/1s)
+- Make sure to add a beginning and a conclusion.
+- Try to talk about the problem before presenting the solution.
+- Run your article through a spellchecker and/or [grammarly](https://app.grammarly.com/) for possible typos.
+- Make sure your Markdown code is properly formatted, using a formatter like prettier is recommended.
+- Run `hugo serve` after making changes to verify the changes on your local.
# Naming Conventions
@@ -17,33 +17,32 @@
Use standard nouns as `prefix` to categorize the branch, e.g:
-- article : The branch only includes blog related changes such as adding/editing an article
-- feature : When a new feature is to be added such as dark mode to our website
-- bugfix/hotfix : The purpose is to simple fix a bug that has sipped in
+- article : The branch only includes blog related changes such as adding/editing an article
+- feature : When a new feature is to be added such as dark mode to our website
+- bugfix/hotfix : The purpose is to simple fix a bug that has sipped in
### Tips:
-- The branch name should be short and able to convey the objective of the changes
-- We'll follow the use of `/`(slash) delimiter between the category and branch motive
-- Branch names should be hyphenated, they should be in `lower-kebab-case`
-- For example, if the goal is to add a blog on ElasticSearch, the branch name can be — `article/why-elastic-search`
+- The branch name should be short and able to convey the objective of the changes
+- We'll follow the use of `/`(slash) delimiter between the category and branch motive
+- Branch names should be hyphenated, they should be in `lower-kebab-case`
+- For example, if the goal is to add a blog on ElasticSearch, the branch name can be — `article/why-elastic-search`
### What to avoid:
-- Long names
-- Only numerals
-- Full sentences
+- Long names
+- Only numerals
+- Full sentences
These branches should be deleted as soon as the branch is merged to `main`.
## PR Naming Convention
-- To keep a better track of blogs and filter them quickly, two things can be done:
-- Add a prefix `Article: foo bar` to the title of the PR
-- Add the label `article` to your PR
+- To keep a better track of blogs and filter them quickly, two things can be done:
+- Add a prefix `Article: foo bar` to the title of the PR
+- Add the label `article` to your PR
## Commit messages convention
-- We'll follow category naming convention similar to what is explained for branches.
-- Here's a quick rundown — [Standard Terminology](https://gist.github.com/turbo/efb8d57c145e00dc38907f9526b60f17)
-
+- We'll follow category naming convention similar to what is explained for branches.
+- Here's a quick rundown — [Standard Terminology](https://gist.github.com/turbo/efb8d57c145e00dc38907f9526b60f17)
diff --git a/README.md b/README.md
index d2a50ce37..6373649be 100644
--- a/README.md
+++ b/README.md
@@ -30,12 +30,15 @@ git clone --recurse-submodules https://github.com/incubyte/incubyte.github.io.gi
cd incubyte.github.io
hugo server -D
```
+
The blog should now be live at http://localhost:1313
To add a new article
+
```bash
hugo new blog/article-name.md`
```
+
If you are adding images make sure they are optimized, we suggest something like `https://squoosh.app/`, images are stored in `static/images`
Commit in a new branch and create PR against `main` branch
diff --git a/config/_default/languages.toml b/config/_default/languages.toml
index b5165977d..0ca4a1744 100644
--- a/config/_default/languages.toml
+++ b/config/_default/languages.toml
@@ -11,4 +11,4 @@ footer_menu_middle = "Services"
footer_menu_right = "Contact Us"
footer_content = "Crafting Software Products For Today and Tomorrow."
# copyright
-copyright = "© 2022 Incubyte. All rights reserved."
+copyright = "© 2024 Incubyte. All rights reserved."
diff --git a/content/_index.md b/content/_index.md
index 89a5082de..02862f83a 100644
--- a/content/_index.md
+++ b/content/_index.md
@@ -1,3 +1,3 @@
---
- url: blog
+url: blog
---
diff --git a/content/authors/abhishek-keshri/_index.md b/content/authors/abhishek-keshri/_index.md
index 5b68a8074..49faf829b 100644
--- a/content/authors/abhishek-keshri/_index.md
+++ b/content/authors/abhishek-keshri/_index.md
@@ -1,7 +1,7 @@
---
title: Abhishek Keshri
-image: '/authors/abhishek-keshri/abhishek.jpg'
-subtitle: "Software Craftsperson @Incubyte 💼 | Learner 📚 | Maker 👨🏻💻 | Explorer 🔎"
+image: '/authors/abhishek-keshri/abhishek.jpg'
+subtitle: 'Software Craftsperson @Incubyte 💼 | Learner 📚 | Maker 👨🏻💻 | Explorer 🔎'
---
Passion Driven Software Craftsperson with a strong affinity for OSS and the CLI.
diff --git a/content/authors/akshay-vadher/_index.md b/content/authors/akshay-vadher/_index.md
index 8466e0f77..3aa7d126f 100644
--- a/content/authors/akshay-vadher/_index.md
+++ b/content/authors/akshay-vadher/_index.md
@@ -1,7 +1,6 @@
---
title: Akshay Vadher
image: '/authors/akshay-vadher/akshay-vadher.jpg'
-
---
diff --git a/content/authors/arohi-parikh/_index.md b/content/authors/arohi-parikh/_index.md
index ce932a47a..3503f193d 100644
--- a/content/authors/arohi-parikh/_index.md
+++ b/content/authors/arohi-parikh/_index.md
@@ -1,6 +1,6 @@
---
title: Arohi Parikh
image: '/authors/arohi-parikh/arohi.jpg'
-
---
+
Operations [@incubyte_co](https://twitter.com/incubyte_co) | Community Builder [@swcraftindia](https://twitter.com/swcraftindia) | Conscious Human | Words: "Leave the world better than you found it"
diff --git a/content/authors/jaymin-shah/_index.md b/content/authors/jaymin-shah/_index.md
index 97253c9eb..6d8ec8481 100644
--- a/content/authors/jaymin-shah/_index.md
+++ b/content/authors/jaymin-shah/_index.md
@@ -1,7 +1,7 @@
---
title: Jaymin Shah
-image: "/images/favicon.png"
-subtitle: "Software Craftsperson in Training at Incubyte"
+image: '/images/favicon.png'
+subtitle: 'Software Craftsperson in Training at Incubyte'
---
To be added soon.
diff --git a/content/authors/karishma-shah/_index.md b/content/authors/karishma-shah/_index.md
index a67cecb2a..154422285 100644
--- a/content/authors/karishma-shah/_index.md
+++ b/content/authors/karishma-shah/_index.md
@@ -1,7 +1,7 @@
---
title: Karishma Shah
-image: "/images/favicon.png"
-subtitle: "Handles Finance at Incubyte"
+image: '/images/favicon.png'
+subtitle: 'Handles Finance at Incubyte'
---
To be added soon.
diff --git a/content/authors/pranita-aitwadkar/_index.md b/content/authors/pranita-aitwadkar/_index.md
new file mode 100644
index 000000000..26651cfa4
--- /dev/null
+++ b/content/authors/pranita-aitwadkar/_index.md
@@ -0,0 +1,5 @@
+---
+title: Pranita Aitwadkar
+image: '/images/favicon.png'
+subtitle: 'Quality Craftsperson at Incubyte'
+---
diff --git a/content/authors/rushali-parikh/_index.md b/content/authors/rushali-parikh/_index.md
index a340cb598..af9842ce6 100644
--- a/content/authors/rushali-parikh/_index.md
+++ b/content/authors/rushali-parikh/_index.md
@@ -2,4 +2,5 @@
title: Rushali Parikh
image: '/authors/rushali-parikh/rushali.jpg'
---
+
Co-founder of [@incubyte_co](https://twitter.com/incubyte_co) | Co-organizer of Software Craftspeople - India | Product Enthusiast | Dedicated to making clean coding practices accessible
diff --git a/content/authors/sapan-parikh/_index.md b/content/authors/sapan-parikh/_index.md
index b7f900bbb..e1cd16dea 100644
--- a/content/authors/sapan-parikh/_index.md
+++ b/content/authors/sapan-parikh/_index.md
@@ -1,6 +1,7 @@
---
title: Sapan Parikh
-image: "/images/favicon.png"
-subtitle: "Co-founder and Software Craftsperson at Incubyte"
+image: '/images/favicon.png'
+subtitle: 'Co-founder and Software Craftsperson at Incubyte'
---
-A tech evangelist and mentor, Sapan has been fuelled by two things in his 15+ year professional career; coffee and his love of designing self-motivated, high-performing and passionate software engineering teams. Being a software craftsperson at heart, he has created and coached teams of over 500 software developers spread across the US and India with the sole objective of forging exceptional software products with an unfettered focus on quality.
\ No newline at end of file
+
+A tech evangelist and mentor, Sapan has been fuelled by two things in his 15+ year professional career; coffee and his love of designing self-motivated, high-performing and passionate software engineering teams. Being a software craftsperson at heart, he has created and coached teams of over 500 software developers spread across the US and India with the sole objective of forging exceptional software products with an unfettered focus on quality.
diff --git a/content/authors/sutirtha-das/_index.md b/content/authors/sutirtha-das/_index.md
index 05188adfd..ed02dcc7e 100644
--- a/content/authors/sutirtha-das/_index.md
+++ b/content/authors/sutirtha-das/_index.md
@@ -1,5 +1,5 @@
---
title: Sutirtha Das
image: '/authors/sutirtha-das/sutirtha.jpg'
-subtitle: "Software Craftsperson @Incubyte | Reader | Writer | Developer"
+subtitle: 'Software Craftsperson @Incubyte | Reader | Writer | Developer'
---
diff --git a/content/authors/utsav-parmar/_index.md b/content/authors/utsav-parmar/_index.md
index 9243819c1..b3a19d74e 100644
--- a/content/authors/utsav-parmar/_index.md
+++ b/content/authors/utsav-parmar/_index.md
@@ -1,7 +1,7 @@
---
title: Utsav Parmar
-image: "/images/favicon.png"
-subtitle: "Software Craftsperson at Incubyte"
+image: '/images/favicon.png'
+subtitle: 'Software Craftsperson at Incubyte'
---
Developer | Co-organizer at [@swcraftindia](https://twitter.com/swcraftindia) | Trying to change the world one PR at a time
diff --git a/content/blog/_index.md b/content/blog/_index.md
index b3f1b3b76..ce07de2c8 100644
--- a/content/blog/_index.md
+++ b/content/blog/_index.md
@@ -1,5 +1,5 @@
---
# meta description
draft: false
-url: "/"
+url: '/'
---
diff --git a/content/blog/a-developers-daily-checklist.md b/content/blog/a-developers-daily-checklist.md
index d91351040..5260b496c 100644
--- a/content/blog/a-developers-daily-checklist.md
+++ b/content/blog/a-developers-daily-checklist.md
@@ -16,40 +16,47 @@ But what about little things you can do to improve your daily work? All you need
Ask yourself these questions at the end of the day every day.
### 1. Did I create an item in the todo list?
+
You have completed your morning errands, and your hands are itching to start coding, but wait! Are you supposed to reply to some emails? Or complete that blog that you were writing? Or summarize last night's call and make some technical decisions based on it? All of these things are the ones that fall through the cracks. As a developer, it's essential to be organized. There are a zillion things "you will do later." Make them part of your todo list, and then mark them off. Give Todoist a try. There is a rumor going that checking things off of your todo list releases Dopamine :-)
### 2. Did I check my calendar?
+
Thank god you are past your todos, and you are all ready to start coding that shiny new feature. But you are not done yet. You have to check your calendar and see if you have any important events. If you have, then you have to make sure that you are on the right track.
Checking and organizing the calendar along with your TODO list should be the first thing as you start your day. It's crucial in the world of remote working, there will be people waiting for you on calls, or you will miss something vital because you could not join a call. Make a mental note of how your day is going to look based on your calendar.
If your calendar is primarily empty, then go ahead and book your lunchtime on it!
### 3. Did I write a test?
+
For many, writing tests and writing production code has no difference. Production code gets written alongside tests. But if you don't do it already, try it.
It will make your life stress-free in the long run, and seeing your tests pass one by one will give you the pleasure of success every time.
### 4. Did I think before naming my variables, classes, functions?
+
Now you have done it. You have reached the point where you start coding. You are in your flow, adding lines after lines of code. But you can't be sure that you have thought before naming each of the variables, classes, functions.
No matter how small it may sound, this one thing will make you and your teammates extremely happy. See, this is what makes you a better human being :-) you are already thinking about others, people who will read your code.
This principle is just a tiny part of clean coding practices and signifies just one of them, but the point is to learn and apply all of them to your code.
-
### 5. Did I automate something that I did three or more times?
+
One trade-off of being a developer is getting caught in a spiral of monotonous, repetitive tasks. That leads to general unhappiness about your work. You have an opportunity to change that. Ask yourself, "Have I done this already three or more times?" If the answer is yes, then think about ways of automating it. Automation can range from sending emails to encapsulating code you find yourself writing over and over again.
Believe it or not, you can send emails automatically by using Zappier or Microsoft Flow. We do it, and you should too!
### 6. Did I make a note?
+
Wait, what! Notes? Isn't that something managers do? They do, but capturing the details of what you need to do, like thoughts on architecture while coding or even an execution plan, goes a long way. Numerous things come to our mind, either as part of team meetings or simply during showers. If you didn't note that thought down, it would be part of those thousands of things you thought of but never got to.
Often, you may take shortcuts while coding, note them down, revisit the notes, create work items from there, and fix the technical debt you created!
### 7. Did I commit and push something?
+
Now you have created the new shiny feature with the cleanest possible code, the Monalisa! Were you able to commit and push it?
Understandably, you can't push something every day. But as developers, we must strive to create stories so small that we can do commits and push every day. These practices will promote frequent releases, smaller changes, and lower risks. Of course, all of this works well if you have looked into our [project kickoff checklist.](https://blog.incubyte.co/blog/kickstart-checklist/)
### 8. Did I create a diagram?
-Creating diagrams can help you clear your thoughts in terms of software architecture or simply workflows. One more advantage, others can refer to it!
+Creating diagrams can help you clear your thoughts in terms of software architecture or simply workflows. One more advantage, others can refer to it!
### 9. Did I read a book?
+
Finally, your day is over, and you are ready to go to bed. How about squeezing 10 minutes of reading?
You are consuming content all the time, blogs, videos, tweets, though books are different. It allows you to choose what you want to learn deliberately. Also, the book got printed and made in your hand, which may mean the author has some authenticity on the subject and can deliver some value instead of some random tweet pushed to you.
Sure, you can not read a book every day, but we mean spending 10 to 15 minutes every day doing so. Once again, 1% investment in yourself every day.
diff --git a/content/blog/acclerate-metrics.md b/content/blog/acclerate-metrics.md
index 4b699f4f8..79a1308e6 100644
--- a/content/blog/acclerate-metrics.md
+++ b/content/blog/acclerate-metrics.md
@@ -9,7 +9,6 @@ tags = ["Modernization", "Book Review"]
title = "Accelerate: Metrics that Define High-Performance Software Delivery"
+++
-
Accelerate by Nicole Forsgren, Jez Humble, and Gene Kim was released in 2018, and it changed how I think about software delivery.
Who really is responsible for the software delivery business or engineering? The book summarizes years of research of the State of DevOps Reports and presents four key metrics to measure software delivery performance. Each measure balances the other in such a way that an organization can perform well only if business and engineering work hand in hand, and it's hard for someone to cheat the system!
diff --git a/content/blog/angular-provider.md b/content/blog/angular-provider.md
index 1e7bf2b63..5aef3da57 100644
--- a/content/blog/angular-provider.md
+++ b/content/blog/angular-provider.md
@@ -1,4 +1,3 @@
-
+++
title = "Angular Provider"
slug = "angular-provider"
@@ -15,7 +14,7 @@ type = ""
Angular Provider is like a command to Angular Dependency Injection system regarding how to get an object/instance for a particular dependency.
-This helps us to register dependencies, like classes or functions or even values with the Angular Dependency Injection system.
+This helps us to register dependencies, like classes or functions or even values with the Angular Dependency Injection system.
**Now you must be wondering what on earth is the Angular Dependency Injection system**
@@ -28,84 +27,102 @@ Let's first see what is a Dependency.
[Dependency injection](https://en.wikipedia.org/wiki/Dependency_injection), or DI, is a design pattern in which a class requests dependencies from external sources rather than creating them.
### Example
+
We have a `CarFactory` in which `Car` object is created.
-````typescript
+
+```typescript
class CarFactory {
- car: Car = new Car();
+ car: Car = new Car();
}
-````
-And here is our `Car`
-````typescript
+```
+
+And here is our `Car`
+
+```typescript
export class Car {
engine: Engine;
-
+
constructor() {
this.engine = new Engine();
}
}
-````
-````typescript
+```
+
+```typescript
export class Engine {}
-````
+```
In the above example, in order to create a `Car`, we first need to create an `Engine`.
Because we are instantiating the `Engine` class inside the constructor of the `Car` class with `new` keyword, there is a tight coupling between the `Car` class and the `Engine` class.
### And this is a Problem.
+
Actually, there are many types of Engine
Like a Flat Engine
-````typescript
+
+```typescript
export class FlatEngine {}
-````
+```
+
or an Inline Engine
-````typescript
+
+```typescript
export class InlineEngine {}
-````
+```
The problem here is that if a `Car` class requires a specific type of `Engine` it can't have one.
This `Car` can only have a generic `Engine` because of the tight coupling.
-````typescript
+
+```typescript
export class Car {
- engine: Engine;
-
- constructor() {
- this.engine = new Engine();
- }
+ engine: Engine;
+
+ constructor() {
+ this.engine = new Engine();
+ }
}
-````
+```
This problem can be resolved by making both classes loosely coupled with each other.
For that, first, we will turn our `Engine` class into an interface like this
+
```typescript
interface class Engine {}
```
+
and let our `FlatEngine` and `InlineEngine` implement it.
+
```typescript
export class FlatEngine implements Engine {}
```
+
```typescript
export class InlineEngine implements Engine {}
```
With that our `Car` class will look like this
+
```typescript
export class Car {
- constructor(private engine: Engine) {}
+ constructor(private engine: Engine) {}
}
```
+
The responsibility of object creation of the `Engine` is no more with the `Car` class. And the dependency will be directly injected through the constructor of the `Car` class.
The Car Factory can now have `Car` with different `Engine` types
+
```typescript
class CarFactory {
- flatEngine: Engine = new FlatEngine();
- porsche911: Car = new Car(this.flatEngine);
-
- inlineEngine: Engine = new InlineEngine();
- bmwM88: Car = new Car(this.inlineEngine);
+ flatEngine: Engine = new FlatEngine();
+ porsche911: Car = new Car(this.flatEngine);
+
+ inlineEngine: Engine = new InlineEngine();
+ bmwM88: Car = new Car(this.inlineEngine);
}
```
+
That was just a basic example of dependency injection.
Now let's get back to Angular Provider.
@@ -113,43 +130,53 @@ Now let's get back to Angular Provider.
# Configuring the Angular Provider
To Provide an instance of the dependency, we need to register it in the Providers metadata.
+
```typescript
- providers: [CarService]
+providers: [CarService];
```
+
The above is an actual shorthand notation for the following syntax:
+
```typescript
- providers: [{ provide: CarService, useClass: CarService }]
+providers: [{provide: CarService, useClass: CarService}];
```
As you can see in the above example, the object has 2 properties. They are **provide** and **provider**.
# 1. Provide
+
The first property is Provide holds the Token or DI Token
The Injector uses the token to locate the provider in the Providers array
{{< figure src="/images/2022/08/provide.png" >}}
## Type Token
+
Here the type being injected is used as the token.
For Example, we would like to inject the instance of the `CarService`, we will use the `CarService` as the token as shown below
+
```typescript
- providers: [{ provide: CarService, useClass: CarService }]
+providers: [{provide: CarService, useClass: CarService}];
```
The `CarService` is then injected to the component by using the following code.
+
```typescript
export class CarComponent {
- constructor(private carService: CarService) { }
+ constructor(private carService: CarService) {}
}
- ```
+```
## String Token
+
We can use a string literal to register the dependency. This is useful in scenarios where the dependency is a value or object etc., which is not represented by a class.
-````typescript
+
+```typescript
{ provide: 'CAR_SERVICE', useClass: CarService },
{ provide: 'API_URL', useValue: 'https://randomcar.com/api' }
-````
+```
It is then injected using the `@Inject` in the constructor of the service/component.
+
```typescript
constructor(
@Inject('CAR_SERVICE') private carService: CarService,
@@ -158,62 +185,78 @@ constructor(
```
## Injection Token
+
Angular provides `InjectionToken` class to ensure that the Unique tokens are created.
The Injection Token is created by creating a new instance of the `InjectionToken` class.
-````typescript
- export const API_URL = new InjectionToken('api.url');
-````
+
+```typescript
+export const API_URL = new InjectionToken('api.url');
+```
+
Register the token in the providers array.
-````typescript
- providers: [{ provide: API_URL, useValue: 'https://randomcar.com/api' }]
-````
+
+```typescript
+providers: [{provide: API_URL, useValue: 'https://randomcar.com/api'}];
+```
+
It is then injected using the `@Inject` in the constructor of the service/component.
-````typescript
+
+```typescript
constructor(@Inject(API_URL) private apiURL: string) {}
-````
+```
# 2. Provider
+
The second property is the Provider definition object.
It tells Angular how to create the instance of the dependency.
Angular can create the instance of dependency in four different ways.
{{< figure src="/images/2022/08/provider.png" >}}
## Class Provider
+
`useClass` is used when you want to provide an instance of the provided class.
-It expects us to provide a type. The Injector creates a new instance from the type and injects it. It is like calling the new operator and returning instance. If the type requires any constructor parameters, the injector will resolve that also.
-````typescript
+It expects us to provide a type. The Injector creates a new instance from the type and injects it. It is like calling the new operator and returning instance. If the type requires any constructor parameters, the injector will resolve that also.
+
+```typescript
{ provide: CarService, useClass: CarService }
-````
+```
We can also switch dependencies easily. You can provide a mock class for Testing purposes as shown below.
-````typescript
+
+```typescript
{ provide: CarService, useClass: MockCarService }
-````
+```
## Value Provider
+
`UseValue` is used when you want to provide a simple value.
Angular will inject whatever is provided in the useValue as it is.
It is useful in scenarios like, where you want to provide API URL, application-wide configuration, etc
-````typescript
+
+```typescript
export const APP_CONFIG = Object.freeze({
devUrl: 'https://dev.randomcar.com/api',
IsDevelopmentMode: true
});
-````
+```
+
And we can use the APP_CONFIG as provided in the providers array.
+
```typescript
- providers: [{ provide: 'API_CONFIG', useValue: APP_CONFIG }]
+providers: [{provide: 'API_CONFIG', useValue: APP_CONFIG}];
```
## Factory Provider
+
`useFactory` expects us to provide a function.
It invokes the function and injects the returned value. We can also add optional arguments to the factory function using the deps array. The deps array specifies how to inject the arguments.
We usually use the useFactory when we want to return an object based on a certain condition.
+
```typescript
{
provide: CarService,
- useFactory: (config: any, loggerService: LoggerService) => return config.IsDevelopmentMode
- ? new MockCarService(loggerService)
+ useFactory: (config: any, loggerService: LoggerService) => return config.IsDevelopmentMode
+ ? new MockCarService(loggerService)
: new CarService(),
deps: [APP_CONFIG, LoggerService]
}
@@ -221,7 +264,7 @@ We usually use the useFactory when we want to return an object based on a certai
## Aliased Provider
-The `useExisting` provider key lets you map one token to another.
+The `useExisting` provider key lets you map one token to another.
In effect, the first token is an alias for the service associated with the second token, creating two ways to access the same service object.
```typescript
diff --git a/content/blog/are-you-saboteur.md b/content/blog/are-you-saboteur.md
index 00404aa34..55859d663 100644
--- a/content/blog/are-you-saboteur.md
+++ b/content/blog/are-you-saboteur.md
@@ -16,7 +16,9 @@ When seen in the context of software modernization, it's clear that software mod
Following is the list of simple sabotage guidelines, cherry-picked from the paper.
## General Interference with Organizations and Production
+
### Organizations and Conferences
+
1. Insist on doing everything through “channels.” Never permit short-cuts to be taken in order to expedite decisions.
2. Make “speeches.” Talk as frequently as possible and at great length. Illustrate your “points” by long anecdotes and accounts of personal experiences. Never hesitate to make a few appropriate “patriotic” comments.
3. When possible, refer all matters to committees, for “further study and consideration.” Attempt to make the committees as large as possible—never less than five.
@@ -27,6 +29,7 @@ Following is the list of simple sabotage guidelines, cherry-picked from the pape
8. Be worried about the propriety of any decision—raise the question of whether such action as is contemplated lies within the jurisdiction of the group or whether it might conflict with the policy of some higher echelon.
### Managers and Supervisors
+
9. Demand written orders.
10. Do everything possible to delay the delivery of orders. Even though parts of an order may be ready beforehand, don’t deliver it until it is completely ready.
11. Don’t order new working materials until your current stocks have been virtually exhausted, so that the slightest delay in filling your order will mean a shutdown.
@@ -42,21 +45,24 @@ Following is the list of simple sabotage guidelines, cherry-picked from the pape
21. Apply all regulations to the last letter.
### Office Workers
+
22. Make mistakes in quantities of material when you are copying orders. Confuse similar names. Use wrong addresses.
23. Misfile essential documents.
### Employees
+
24. Work slowly. Think out ways to increase the number of movements necessary on your job: use a light hammer instead of a heavy one, try to make a small wrench do when a big one is necessary...
25. Contrive as many interruptions to your work as you can: when changing the material on which you are working, as you would on a lathe or punch, take needless time to do it. If you are cutting, shaping or doing other measured work, measure dimensions twice as often as you need to. When you go to the lavatory, spend a longer time there than is necessary.
26. Do your work poorly and blame it on bad tools, machinery, or equipment. Complain that these things are preventing you from doing your job right.
27. Never pass on your skill and experience to a new or less skillful worker.
## General Devices for Lowering Morale and Creating Confusion
+
1. Act stupid.
2. Give lengthy and incomprehensible explanations when questioned.
3. Report imaginary ~~spies~~ or danger
## Industrial Production: Manufacturing
+
1. Leave saws slightly twisted when you are not using them. After a while, they will break when used.
2. Let cutting tools grow dull. They will be inefficient, will slow down production, and may damage the materials and parts you use them on.
-
diff --git a/content/blog/benefits-and-challenges-of-open-source-development.md b/content/blog/benefits-and-challenges-of-open-source-development.md
index 5229def5b..4770f1c8b 100644
--- a/content/blog/benefits-and-challenges-of-open-source-development.md
+++ b/content/blog/benefits-and-challenges-of-open-source-development.md
@@ -11,35 +11,34 @@ title = "Benefits and Challenges of Open-Source Development"
+++
-
Open-source software (OSS) is the holy grail for developers. It is a hub of innovation through intense collaboration in this era of agile software development. Without it, many of the technologies we take for granted today would never have been developed or would have been locked away behind strict patents. The open-source movement is the reason technology has developed at such a breakneck pace over the past few decades.
For those who are new to OSS, it is source code that is: Publicly accessible
-* Available to use, customize, manipulate, or examine
-* Open for collaboration and redistribution
-* Either free or paid
-* Issued under a license granted by the copyright holder
+- Available to use, customize, manipulate, or examine
+- Open for collaboration and redistribution
+- Either free or paid
+- Issued under a license granted by the copyright holder
-**Benefits of Open Source for Developers, Teams, and Companies********Integrated Growth******
+**Benefits of Open Source for Developers, Teams, and Companies**\*\*\***\*Integrated Growth**\*\*\*\*
{{< figure src="/images/2021/05/2.jpg" >}}
-OSS is the ultimate example of individual-level growth incorporating and leading to community-level development. Millions of contributors across the globe are working on projects simultaneously, opening issues, fixing bugs, adding new features, writing, reviewing pull requests, and discussing improvements to achieve a common goal. This makes OSS a great platform for developers to learn, grow and improve through collaborating with top developers across the world. Participants learn to behave professionally, adhere to a global Code of Conduct, and follow universally accepted coding standards for the project to be a success. A contribution can be as small as a typo change in the documentation or as big as a mammoth feature implementation and it will be accepted with constructive feedback, comments, and critique from the community. Thus, fostering inclusivity and motivation among contributors.
+OSS is the ultimate example of individual-level growth incorporating and leading to community-level development. Millions of contributors across the globe are working on projects simultaneously, opening issues, fixing bugs, adding new features, writing, reviewing pull requests, and discussing improvements to achieve a common goal. This makes OSS a great platform for developers to learn, grow and improve through collaborating with top developers across the world. Participants learn to behave professionally, adhere to a global Code of Conduct, and follow universally accepted coding standards for the project to be a success. A contribution can be as small as a typo change in the documentation or as big as a mammoth feature implementation and it will be accepted with constructive feedback, comments, and critique from the community. Thus, fostering inclusivity and motivation among contributors.
-******Accelerated Development****** With easy access to remodel and upgrade existing projects or bits of existing projects, developers accelerate their own development process. And not only faster development, but the higher quality and stable codebases also make it easier for the team to speed up future enhancements and ease maintenance.******Public Recognition******
+**\*\***Accelerated Development**\*\*** With easy access to remodel and upgrade existing projects or bits of existing projects, developers accelerate their own development process. And not only faster development, but the higher quality and stable codebases also make it easier for the team to speed up future enhancements and ease maintenance.**\*\***Public Recognition**\*\***
{{< figure src="/images/2021/05/3.jpg" >}}
-Involvement in open-source projects benefits developers with both, a credible portfolio and a stronger skillset. The developer’s name is forever etched as the owner of that piece of source code and all the people who will ever use it, shall have used a little bit of their work and that is a HUGE deal in their career! Coming from a company that values open-source contributions from developers, a mention of such on the resume takes candidates a long way and is a valuable experience.
+Involvement in open-source projects benefits developers with both, a credible portfolio and a stronger skillset. The developer’s name is forever etched as the owner of that piece of source code and all the people who will ever use it, shall have used a little bit of their work and that is a HUGE deal in their career! Coming from a company that values open-source contributions from developers, a mention of such on the resume takes candidates a long way and is a valuable experience.
-******Secure Code****** While it might seem counter-intuitive, open-source codes are in reality very secure. Owing to a vast network of professionals involved in code auditing and testing, resulting in a fewer number of bugs. In cases when an end-user encounters a bug, the process of verifying credibility to discussing solutions and ultimately, fixing the bug is so streamlined and transparent, that the chances of going wrong are drastically reduced. While true, open-source programs are thoroughly and constantly vetted by experienced code maintainers, thier open nature still makes them vulnerable to potential bugs and have a security issues. This is often countered by an additional layer of security provided by high-profile Open-Source tools, issue trackers, and intrusion detectors.
+**\*\***Secure Code**\*\*** While it might seem counter-intuitive, open-source codes are in reality very secure. Owing to a vast network of professionals involved in code auditing and testing, resulting in a fewer number of bugs. In cases when an end-user encounters a bug, the process of verifying credibility to discussing solutions and ultimately, fixing the bug is so streamlined and transparent, that the chances of going wrong are drastically reduced. While true, open-source programs are thoroughly and constantly vetted by experienced code maintainers, thier open nature still makes them vulnerable to potential bugs and have a security issues. This is often countered by an additional layer of security provided by high-profile Open-Source tools, issue trackers, and intrusion detectors.
### Challenges while working with open-source software
{{< figure src="/images/2021/05/4.jpg" >}}
-While contributing to an OSS project is exciting, getting started on the journey can be a bit daunting, especially for first-timers. Listed down are some challenges that may arise while contributing to or using OSS: **Barrier to entry** It is difficult to find open-source projects that are simple and easy to fix. Usually, a lot of the open problems are very complex and unless you have a deep insight into the product, it will not be possible for you to make valuable contributions. That said, there are many good first issues that help beginners get started.
+While contributing to an OSS project is exciting, getting started on the journey can be a bit daunting, especially for first-timers. Listed down are some challenges that may arise while contributing to or using OSS: **Barrier to entry** It is difficult to find open-source projects that are simple and easy to fix. Usually, a lot of the open problems are very complex and unless you have a deep insight into the product, it will not be possible for you to make valuable contributions. That said, there are many good first issues that help beginners get started.
Here are some good resources for finding beginner-friendly issues:
@@ -51,11 +50,11 @@ Stay tuned for our next blog for a more detailed guide to making your first open
**Complex Learning** Open-source environments are inclined more toward the innovative dimension. Adapting to OSS has a gradual learning curve. You just can’t expect to harmonize with operating systems like Linux from day one.
-**Non-compliance** Open-source projects are released under licenses specified by the owner. The common thought is that since the code is open-source, it is available to use for any purpose, but this is not always the case. Failure to comply with the license can put you through legal notices, causing unwanted trouble. All the licenses have different T&C and it is important that you understand those before using the OSS. Here is a quick rundown on common OS licenses along with the corresponding commercial usage:
+**Non-compliance** Open-source projects are released under licenses specified by the owner. The common thought is that since the code is open-source, it is available to use for any purpose, but this is not always the case. Failure to comply with the license can put you through legal notices, causing unwanted trouble. All the licenses have different T&C and it is important that you understand those before using the OSS. Here is a quick rundown on common OS licenses along with the corresponding commercial usage:
{{< figure src="/images/2021/05/Screenshot-2021-05-13-at-7.52.57-AM.png" >}}
-You can additionally learn more about the different licenses available here: [https://choosealicense.com/licenses](https://choosealicense.com/licenses/ )
+You can additionally learn more about the different licenses available here: [https://choosealicense.com/licenses](https://choosealicense.com/licenses/)
### Contributing to OSS & Source Community
@@ -65,7 +64,6 @@ At Incubyte, we are a group of passionate Software Craftspeople who like a good
A few that might help one be a better software developer:
-[Google Summer of Code (GSoC)](https://summerofcode.withgoogle.com) [Outreachy](https://www.outreachy.org) [Hacktober Fest by Digital Ocean](https://hacktoberfest.digitalocean.com) [Linux Kernel Mentorship Program](https://www.linuxfoundation.org/en/about/diversity-inclusivity/mentorship/)
-
-Participating in these helps us learn and hone our skills with version control, software coding standards like clean coding, TDD, peer code reviews, source collaboration, continuous integration & continuous deployment (CI/CD), prioritizing features & bugs (project management) and more! We encourage students, software engineers, and professionals alike to participate in these events and are always on the lookout for more such events/activities that can help our colleagues grow, learn and add experience on a global scale. Have thoughts on how this culture can be promoted/shared by all? Would love to know your thoughts, reach out to me at [arohi@incubyte.co](/benefits-and-challenges-of-open-source-development-4/arohi@incubyte.co)!
+[Google Summer of Code (GSoC)](https://summerofcode.withgoogle.com) [Outreachy](https://www.outreachy.org) [Hacktober Fest by Digital Ocean](https://hacktoberfest.digitalocean.com) [Linux Kernel Mentorship Program](https://www.linuxfoundation.org/en/about/diversity-inclusivity/mentorship/)
+Participating in these helps us learn and hone our skills with version control, software coding standards like clean coding, TDD, peer code reviews, source collaboration, continuous integration & continuous deployment (CI/CD), prioritizing features & bugs (project management) and more! We encourage students, software engineers, and professionals alike to participate in these events and are always on the lookout for more such events/activities that can help our colleagues grow, learn and add experience on a global scale. Have thoughts on how this culture can be promoted/shared by all? Would love to know your thoughts, reach out to me at [arohi@incubyte.co](/benefits-and-challenges-of-open-source-development-4/arohi@incubyte.co)!
diff --git a/content/blog/books-we-believe-should-be-on-your-bookshelf-and-read-them-too.md b/content/blog/books-we-believe-should-be-on-your-bookshelf-and-read-them-too.md
index 020e5daf3..bb503ec21 100644
--- a/content/blog/books-we-believe-should-be-on-your-bookshelf-and-read-them-too.md
+++ b/content/blog/books-we-believe-should-be-on-your-bookshelf-and-read-them-too.md
@@ -11,7 +11,6 @@ title = "12 Books Developers Must Read"
+++
-
###
Books are a massive source of knowledge. Before we list all the books here, we want to discuss why we think it's essential for programmers to read them.
@@ -42,7 +41,7 @@ A continuous learning process, especially when English is not the first language
Coming to the point, we've listed below some recommended and popular programming books.
-We believe that these software development books will prove as a piece of advice to developers. [Mancuso, Sandro. The Software Craftsman: Professionalism, Pragmatism, Pride.](https://www.amazon.in/Software-Craftsman-Professionalism-Pragmatism-Robert-ebook/dp/B00QXAGIDO)
+We believe that these software development books will prove as a piece of advice to developers. [Mancuso, Sandro. The Software Craftsman: Professionalism, Pragmatism, Pride.](https://www.amazon.in/Software-Craftsman-Professionalism-Pragmatism-Robert-ebook/dp/B00QXAGIDO)
[Martin, Robert C., et al. Clean Code: a Handbook of Agile Software Craftsmanship.](https://www.amazon.in/Clean-Code-Handbook-Software-Craftsmanship-ebook/dp/B001GSTOAM)
@@ -67,6 +66,3 @@ We believe that these software development books will prove as a piece of advice
[Feathers, Michael C. Working Effectively with Legacy Code.](https://www.amazon.in/Working-Effectively-Legacy-Robert-Martin/dp/0131177052)
We hope you read them!
-
-
-
diff --git a/content/blog/build-deployment-case-study.md b/content/blog/build-deployment-case-study.md
index 0816aa7eb..bf171f0ca 100644
--- a/content/blog/build-deployment-case-study.md
+++ b/content/blog/build-deployment-case-study.md
@@ -26,5 +26,3 @@ card_2_slug="finance-case-study/"
+++
Streamlining Expense Tracking Process by Modernizing a Solution for a US-based Expense Management Solution Provider
-
-
diff --git a/content/blog/clean-agile-with-uncle-bob-a-summary.md b/content/blog/clean-agile-with-uncle-bob-a-summary.md
index 2bdc65b98..f2657e4a3 100644
--- a/content/blog/clean-agile-with-uncle-bob-a-summary.md
+++ b/content/blog/clean-agile-with-uncle-bob-a-summary.md
@@ -34,18 +34,15 @@ Seventeen programmers met in Snowbird lodge in Utah and wrote the following mani
> This physics constrains all projects to obey an unassailable trade-off called the Iron Cross of project management. Good, fast, cheap, done: Pick any three you like. You can’t have the fourth.
>
->
> The reality is that a good project manager understands that these four attributes have coefficients. A good manager drives a project to be good enough, fast enough, cheap enough, and done as much as necessary. A good manager manages the coefficients on these attributes rather than demanding that all those coefficients are 100%. It is this kind of management that Agile strives to enable.
->
The velocity and burndown charts are valuable tools to manage these coefficients. Agile is a feedback-driven approach, “in most cases, your tomorrows are going to look like yesterdays!” These charts help you make appropriate adjustments and fail fast if you do not meet the deadlines.
Talking of deadlines, they are the first thing you know. Even before the name of the project is decided, the deadline is. In a typical waterfall way, the projects would go through different phases for a few months before a half-baked project is delivered to a client, which causes a lot of friction at the end of the project.
-On the contrary, a more agile way of working maybe work in tiny iterations, say a week. We may deliver a working product each week by delivering a well-analyzed, small subset of stories! Each week we know how much we can deliver and in case how much spills over. We use that data to estimate our next iteration. Use the data being generated to feed to upcoming iterations.
+On the contrary, a more agile way of working maybe work in tiny iterations, say a week. We may deliver a working product each week by delivering a well-analyzed, small subset of stories! Each week we know how much we can deliver and in case how much spills over. We use that data to estimate our next iteration. Use the data being generated to feed to upcoming iterations.
> Some folks think that Agile is about going fast. It’s not, and it’s never been about going fast. Agile is about knowing, as early as possible, just how screwed we are.
->
Working in small iterations based on data generated in each iteration allows us to manage and finetune the iron cross while welcoming the changing scope.
@@ -56,7 +53,6 @@ Most of the book then focuses on the Circle Of Life (XP) because it is the most
Let’s conclude with a quote from the book.
> Agile is a process wherein a project is subdivided into iterations. The output of each iteration is measured and used to continuously evaluate the schedule. Features are implemented in the order of business value so that the most valuable things are implemented first. Quality is kept as high as possible. The schedule is primarily managed by manipulating scope.
->
## Chapter 2 The Reasons for Agile
@@ -78,7 +74,7 @@ Our managers, customers and users should reasonably be able to expect the follow
8. **Test Automation.** Repeatable tests must be automated. Manual QA should do something that involves human creativity and imagination.
9. **We cover for each other.** Teams cover for each other.
10. **Honest Estimates.** “I don’t know” is a much better estimate than “I will try” or estimates based on gut feeling.
-11. **You Need to Say “No.”** Your inputs are regularly used to make decisions; thus, you may need to say “no” when you think something is impossible.
+11. **You Need to Say “No.”** Your inputs are regularly used to make decisions; thus, you may need to say “no” when you think something is impossible.
12. **Continuous Aggressive Learning.** Learn Learn Learn
13. **Mentoring.** Teach to learn and learn to teach
diff --git a/content/blog/code-tidying.md b/content/blog/code-tidying.md
index 2e1b39091..2526310b6 100644
--- a/content/blog/code-tidying.md
+++ b/content/blog/code-tidying.md
@@ -13,36 +13,37 @@ type = ""
Let's embark on a thought experiment. Envision yourself as a driving virtuoso, conquering city streets with gear shifts smoother than a buttered dolphin on a rainbow. Your turns rival a ninja's wit, and parallel parking? You could slide a spacecraft into a closet unscathed.
-Now, imagine this twist: You're not the driver but the ultimate backseat conductor – a dictator!
+Now, imagine this twist: You're not the driver but the ultimate backseat conductor – a dictator!
"Hard left, now! No, no, the other left! Smooth right, smoother than a freshly buttered pancake! And now, execute the parallel parking extravaganza, but make it snappy – oh, and don't forget to hold your breath!" All this while comfortably seated, you're dishing out orders like a bewildered symphony conductor.
-That, my friend, is feature envy! I am sure you have had an experience with a driver in the back seat. Wouldn’t that experience have been much better if the passenger just said, “Let’s go to the mall,” and left the driving details to you?
+That, my friend, is feature envy! I am sure you have had an experience with a driver in the back seat. Wouldn’t that experience have been much better if the passenger just said, “Let’s go to the mall,” and left the driving details to you?
-Wouldn’t it be awesome if people would “tell” once instead of posing multiple “asks”?
+Wouldn’t it be awesome if people would “tell” once instead of posing multiple “asks”?
-In programming, too, there is a “tell, do not ask” principle. Let’s visit it (now, this was a hard segue).
+In programming, too, there is a “tell, do not ask” principle. Let’s visit it (now, this was a hard segue).
## Feature Envy:
+
In programming, there exist backseat drivers. The backseat driver is a module that asks for data from another class or a module and works with it (logic), while the whole logic could have been in the other module.
{{< figure src="/images/2023/code_tidying/1.png" >}}
{{< figure src="/images/2023/code_tidying/2.png" >}}
-
## Problems Caused by Feature Envy:
-- **Code Smell:** It just looks terrible! It may be an indicator of something being wrong with the overall design of the code too.
+- **Code Smell:** It just looks terrible! It may be an indicator of something being wrong with the overall design of the code too.
-- **Coupling:** Many instances of feature envy in code indicate that clear boundaries are not drawn between modules. This lack of boundaries may also increase coupling between these modules.
+- **Coupling:** Many instances of feature envy in code indicate that clear boundaries are not drawn between modules. This lack of boundaries may also increase coupling between these modules.
- **Duplication:** Because of a lack of ownership of the logic, the same logic may be written in multiple places, causing duplication.
- **Difficult Maintenance:** Because of high coupling, low cohesion, duplication, and general readability-related issues, code becomes difficult to maintain.
## How to Spot it:
-Once we scanned the code with CodeScene, we looked closely at the hotspots.
+
+Once we scanned the code with CodeScene, we looked closely at the hotspots.
CodeScene hotspots = files' churn rate + code health.
@@ -52,21 +53,18 @@ The other option to detect feature envy issues is by using IntelliJ's code analy
{{< figure src="/images/2023/code_tidying/3.gif" >}}
-Here is an example. Do you see how every line of code written here works with an instance of IndexMetadata class?
+Here is an example. Do you see how every line of code written here works with an instance of IndexMetadata class?
Though, currently, this method is in some other class entirely!
{{< figure src="/images/2023/code_tidying/4.png" >}}
-
So what can we do?
-Well, we move the method body to the class it should belong to! Here is an example.
+Well, we move the method body to the class it should belong to! Here is an example.
{{< figure src="/images/2023/code_tidying/5.gif" >}}
-
## Conclusion:
Larger and better architectural designs are not achieved by fancy diagrams alone. Sometimes small tidyings around code smells help you take a step towards achieving the larger vision. Like we saw here, CodeScene and IntelliJ help you achieve this, one step at a time.
-
diff --git a/content/blog/codescene-refactoring.md b/content/blog/codescene-refactoring.md
index 34a8f2a7e..cb21ceaf0 100644
--- a/content/blog/codescene-refactoring.md
+++ b/content/blog/codescene-refactoring.md
@@ -50,7 +50,7 @@ if(need to update){
}
```
-Code like the example above soon becomes more complex, growing in depth and breadth, which means these methods tend to get longer and more nested with logic.
+Code like the example above soon becomes more complex, growing in depth and breadth, which means these methods tend to get longer and more nested with logic.
One such method in the Elasticsearch hotspot was the following:
@@ -60,7 +60,6 @@ One such method in the Elasticsearch hotspot was the following:
To increase code readability and maintainability, it is easier to start extracting methods, i.e., copying a part of the nested code and creating a new method. Most IDEs support this process fully automatically, meaning extracting a method is low-risk and free of manual operations.
-
{{< figure src="/images/2023/codescene_refactoring/refactor-gif.gif" >}}
Now, if you look at the new code health rating:
@@ -75,5 +74,4 @@ Consequently, a more modular version of the code tends to suggest further refact
## Conclusion
-As the saying goes, small changes garner big wins. Similarly, in code, the compounding effect of refactoring is evident in healthy code quality over time. Just think of it as simplifying complex code to enhance readability, benefiting both present and future developer teams.
-
+As the saying goes, small changes garner big wins. Similarly, in code, the compounding effect of refactoring is evident in healthy code quality over time. Just think of it as simplifying complex code to enhance readability, benefiting both present and future developer teams.
diff --git a/content/blog/commit-lock-file.md b/content/blog/commit-lock-file.md
index 84d89524e..ab6b1f435 100644
--- a/content/blog/commit-lock-file.md
+++ b/content/blog/commit-lock-file.md
@@ -11,7 +11,7 @@ categories = ["Dependency Management", "Best Practices"]
type = ""
+++
-In software development, dependency management is a critical aspect that directly impacts the stability and reproducibility of your projects. When working with package managers like npm, yarn, or others, one crucial decision developers must make is whether to commit the lock file to version control.
+In software development, dependency management is a critical aspect that directly impacts the stability and reproducibility of your projects. When working with package managers like npm, yarn, or others, one crucial decision developers must make is whether to commit the lock file to version control.
In this article, we'll explore why it's essential to commit lock files and how they help in ensuring deterministic, secure, and consistent builds.
@@ -42,7 +42,7 @@ version, but in the subsequent installations, it will use the same version as in
`npm install` automatically generates the lock file.
-Take a look at the below diagram.
+Take a look at the below diagram.
Application A depends on libraries B (1.2.9) and C (^6.8.7). B depends on C (6.8.8), D (4.5.3), and E (7.2.9).
@@ -60,7 +60,7 @@ _The above description is a grossly simplified explanation of the process._
Let's eliminate wildcard characters (`^`, `~`, `*`, etc.) and use the exact version. Wouldn't that solve the problem?
-Unfortunately, that's not how it works.
+Unfortunately, that's not how it works.
Even if you use the exact version for the library, the library itself might have dependencies with wildcard
dependencies, and the application is still prone to breaking.
@@ -72,7 +72,7 @@ Yarn introduced many features like caching, parallel downloads, etc. However, np
### Using a Lock File
-Merely having a lock file isn't sufficient. You need to make sure you execute the proper command(s).
+Merely having a lock file isn't sufficient. You need to make sure you execute the proper command(s).
For instance, `npm install` is intended to be used only in developer mode. If you want to install dependencies for production, you
need to use `npm ci`.
@@ -102,6 +102,5 @@ etc.
### Conclusion
-In conclusion, committing lock files, along with executing the appropriate commands for dependency installation, is a best practice that ensures deterministic amd secure builds.
+In conclusion, committing lock files, along with executing the appropriate commands for dependency installation, is a best practice that ensures deterministic amd secure builds.
By doing so, developers can mitigate issues related to version conflicts, enhance project security, and foster collaborative development in an environment of consistency and reliability.
-
diff --git a/content/blog/cypress-guide.md b/content/blog/cypress-guide.md
new file mode 100644
index 000000000..d75d0b488
--- /dev/null
+++ b/content/blog/cypress-guide.md
@@ -0,0 +1,150 @@
++++
+authors = ["Pranita Aitwadkar"]
+categories = ["Testing", "Automation"]
+date = 2023-11-14T00:00:00Z
+description = ""
+draft = false
+image = "/images/2023/cypress-guide/header-image.jpg"
+slug = "cypress-guide"
+tags = ["Testing", "Automation"]
+title = "A Comprehensive Guide To Web Testing with Cypress"
++++
+
+In the fast-paced world of web development, ensuring the quality of your applications is paramount.
+One powerful tool that has gained significant popularity in recent years is Cypress.
+Cypress is an end-to-end testing framework that empowers developers and QA engineers to write reliable, efficient, and maintainable tests.
+In this blog, we will explore the ins and outs of Cypress and discover how it can revolutionize your web testing workflow.
+
+## What is Cypress?
+
+Cypress is an automation testing tool for web applications.
+It runs on Windows, Linux and macOS.
+Cypress app is open-source software released under the MIT License while the Cypress Cloud is a web application.
+
+## Installation and Setup Instructions
+
+**Prerequisites:** Ensure that you have Node.js installed on your machine.
+You can download and install it from the [Node.js website](https://nodejs.org).
+
+1. Creating a new project
+
+Create a new directory for your project and navigate to it in your terminal or command prompt.
+
+```bash
+mkdir -p cypress-starter
+cd cypress-starter
+```
+
+2. Initializing npm
+
+Run the following command to initialize a new npm project.
+
+```bash
+npm init -y
+```
+
+4. Installing Cypress
+
+Run the following command to install Cypress as a development dependency in your project.
+
+```bash
+npm install cypress --save-dev
+```
+
+5. Verifying installation
+
+After the installation is complete, Cypress should be available in your project's node_modules directory.
+You can verify it by running the following Cypress command.
+
+```bash
+npx cypress --version
+```
+
+6. Opening Cypress
+
+To open the Cypress Test Runner, run the below command.
+
+```bash
+npx cypress open
+```
+
+This will open the Cypress Test Runner, which provides an interactive interface for managing and running your tests.
+
+## Creating Your First Cypress Test
+
+1. With the Cypress Test Runner open, you'll see a list of example tests provided by Cypress.
+ You can choose to keep them or remove them.
+
+2. To create a new test, click on the "New File" button in the Cypress Test Runner.
+ By default, the test files are created in the cypress/e2e directory.
+
+3. In your new test file, you can write your first Cypress test using the Cypress API.
+
+Here's a simple example that tests the title of a web page.
+
+```javascript
+describe('My First Test', () => {
+ it('Visits the homepage and checks the title', () => {
+ cy.visit('https://example.com');
+ cy.title().should('contain', 'Example Domain');
+ });
+});
+```
+
+4. Save the test file with a `.cy.js` extension.
+ For instance, you can save it as `homepage.cy.js`.
+
+5. In the Cypress Test Runner, click on your test file to run it.
+ You should see a browser window open and the test being executed.
+ You can see the test commands and assertions in the Cypress Test Runner's command log.
+
+### Feature of Cypress
+
+#### Time Travel
+
+Cypress has an interesting feature called time-travel debugging.
+Basically, it allows you to watch your tests run step by step, pause whenever you want, and check out what's happening in the application at that moment.
+
+It's like having a slow-motion button for your tests!
+
+#### Automatic Waiting and Retrying
+
+Cypress automatically waits for things to finish before moving on to the next step in your test.
+
+What's great about this is that it's really smart! If a command or assertion takes longer than expected, Cypress will keep retrying it until it succeeds or until it reaches a timeout.
+
+So you don't have to worry about writing explicit waits or adding delays in your tests.
+
+#### Screenshots and Video Recording
+
+Cypress offers a convenient feature that captures screenshots and records videos as your tests run. This proves incredibly useful for visually diagnosing any failures that may occur during the test.
+
+#### Headless and Interactive Modes
+
+Cypress gives you the freedom to run tests in different modes: headless mode and interactive mode.Running your tests in headless mode can speed up the testing process and allow you to run tests in environments.Cypress runs tests interactively, allowing you to see commands as they execute while also viewing the Application or Component Under Test, and exploring its DOM.
+
+#### Customization and Extensibility
+
+The plugin architecture feature in Cypress operates like a toolbox, enabling you to customize and expand Cypress's capabilities to meet your specific needs. With this plugin architecture, you can create your own custom commands.
+
+#### DOM Manipulation and Control
+
+Cypress simplifies working with the Document Object Model (DOM) directly. The DOM serves as the blueprint of a webpage, and Cypress empowers you to interact with it effortlessly. By using selectors, you can pinpoint specific elements on the page, just like using a super-smart search tool that precisely locates what you're seeking.
+
+#### Cross Browser Testing
+
+Cypress makes it easy to run tests with Firefox, Chrome, Edge & Electron.
+
+#### Debugging
+
+With Cypress, when a test fails, you can simply open the developer tools & explore the console, network, request & other useful information.
+
+### Conclusion
+
+Cypress is undoubtedly a game-changer in the world of web testing, providing developers and QA engineers with a powerful and intuitive toolset. With its extensive features, straightforward syntax, and seamless integration with modern development workflows, Cypress is a valuable asset for any web testing endeavor.
+
+By following the best practices outlined in this guide, you'll be equipped to leverage Cypress to its fullest potential, delivering high-quality web applications with confidence.
+
+Get ready to elevate your web testing game with Cypress!
+
+For more details, check out the official [Cypress Docs.](https://docs.cypress.io/guides/getting-started/installing-cypress)
diff --git a/content/blog/data-engineer.md b/content/blog/data-engineer.md
index 68863e660..fc7b389dc 100644
--- a/content/blog/data-engineer.md
+++ b/content/blog/data-engineer.md
@@ -10,34 +10,22 @@ title = "Data Engineer"
+++
-
## Benefits we offer
-1. Holidays & flexibility of working - We offer 25 holiday days in addition to national holidays. We’re also flexible with how our people manage their time and believe in self driven work as opposed to right structures
-
-2. Pensions and tax benefits
-
-3. Learning pool budget - As the course is relevant for the company and you'll do a lightning talk on the subject, we’re happy to help pay for it.
-
-4. Books and reading list – We have a growing list of recommended books to read that will keep you up to speed on the latest developments
-
-5. Autonomy in working
-
-6. Medical and accident coverage
-
-7. Internal community of experts - You’ll be working alongside Craftspeople who share your passion for learning, whether that’s on a client project or contributing to our internal projects.
+1. Holidays & flexibility of working - We offer 25 holiday days in addition to national holidays. We’re also flexible with how our people manage their time and believe in self driven work as opposed to right structures
+2. Pensions and tax benefits
+3. Learning pool budget - As the course is relevant for the company and you'll do a lightning talk on the subject, we’re happy to help pay for it.
+4. Books and reading list – We have a growing list of recommended books to read that will keep you up to speed on the latest developments
+5. Autonomy in working
+6. Medical and accident coverage
+7. Internal community of experts - You’ll be working alongside Craftspeople who share your passion for learning, whether that’s on a client project or contributing to our internal projects.
## Interview Process
Our interview process will help us to understand your breadth and depth of expertise. We all carry different skills and areas of expertise, and encourage people at all stages of their journeys to apply. Depending on your availability, the entire process can take as little as 2 days.
-1. Coding test: You will take an online coding test and submit your repo to Git following a set of simple instructions
-
-2. Initial call: Usually a 30-minute call with our recruitment team where we’ll get to know each other and to see what values we have in common. At this stage, we’re more interested in your mindset and any values or principles that are important to you.
-
-3. Technical Test: A technical/functional conversation with one of our Craftspeople. You will go into more depth regarding your technical skills and interests. This is a great opportunity to ask questions.
-
-4. Pair Programming/Live coding: A remote pair programming session with your choice of IDE and tooling up to you. We’ll tackle a coding kata together, with more focus on your coding and software design skills. Look at it as a chance to showcase your skills.
-
-5. Final interview: A call with the founders to determine alignment in attitude and work philosophy
-
+1. Coding test: You will take an online coding test and submit your repo to Git following a set of simple instructions
+2. Initial call: Usually a 30-minute call with our recruitment team where we’ll get to know each other and to see what values we have in common. At this stage, we’re more interested in your mindset and any values or principles that are important to you.
+3. Technical Test: A technical/functional conversation with one of our Craftspeople. You will go into more depth regarding your technical skills and interests. This is a great opportunity to ask questions.
+4. Pair Programming/Live coding: A remote pair programming session with your choice of IDE and tooling up to you. We’ll tackle a coding kata together, with more focus on your coding and software design skills. Look at it as a chance to showcase your skills.
+5. Final interview: A call with the founders to determine alignment in attitude and work philosophy
diff --git a/content/blog/data-security.md b/content/blog/data-security.md
index c3a8f4563..d033e01e0 100644
--- a/content/blog/data-security.md
+++ b/content/blog/data-security.md
@@ -11,7 +11,6 @@ title = "Security Practices for Postgres Web Application"
+++
-
Data security is when protective measures are put in place to keep unauthorsized access out of computers, websites, and databases. This process also provides a mechanism for protecting data from loss or corruption.
There can be many ways in which a database's security can be breached. However, today I am going to be writing about one in particular - **SQL injection**.
@@ -36,7 +35,7 @@ As we are using string concatenation our SQL query will become:
> SELECT ∗ FROM users WHERE email = ’‘ OR Email != ‘’
-The WHERE clause in this statement is a tautology (a statement that is true by definition). This means the email address is either equal to the empty string or not equal to the empty string. We do not have to know which email addresses that are present in the table and the query will return every row in the table.
+The WHERE clause in this statement is a tautology (a statement that is true by definition). This means the email address is either equal to the empty string or not equal to the empty string. We do not have to know which email addresses that are present in the table and the query will return every row in the table.
Similarly, the malicious user can join data together from multiple tables, insert data, modify data, and delete data.
@@ -50,15 +49,15 @@ If the user enters "FALSE; DROP TABLE" users. Our query after concatenation will
Most instances of SQL injection can be prevented by using parameterized queries (also known as prepared statements) instead of string concatenation within the query. Prepared statements create a template for a query that establishes an immutable grammar.
-> PreparedStatement stmt = con.prepareStatement (“SELECT * FROM table WHERE id = ?”;); stmt.setInt(1, data);
+> PreparedStatement stmt = con.prepareStatement (“SELECT \* FROM table WHERE id = ?”;); stmt.setInt(1, data);
The **?** is used as the placeholder and value is added by various set functions. Java provides type-specific binding functions for data such as setString() or setInt(). These functions help sanity check the data received from the user
The power of this approach is that the SQL and the data are always kept separate. If an attacker inserts a long string, that will result in the database rejecting it because it was expecting an integer.
-The grammar of the above expression will always be _email=something_ and the SELECT statement will return records only where the email column **exactly matches** the value of the parameter provided to the statements. The query below will try to search email with value * and will not return all the rows.
+The grammar of the above expression will always be _email=something_ and the SELECT statement will return records only where the email column **exactly matches** the value of the parameter provided to the statements. The query below will try to search email with value \* and will not return all the rows.
-> statement.setInt(1, "*")
+> statement.setInt(1, "\*")
This holds true even when the data contain SQL commands such as the following examples:
@@ -66,19 +65,19 @@ This holds true even when the data contain SQL commands such as the following ex
Prepared Statements can save us from the attacks specified above, But it doesn't mean the prepared statements will change the result set. Consider the code that changes the email comparison from an equality test (=) as in the previous examples to a LIKE statement that would support wildcard matches.
-> statement = con.prepareStatement("SELECT email FROM employee WHERE email LIKE ?") statement.setString(1, "%@%")
+> statement = con.prepareStatement("SELECT email FROM employee WHERE email LIKE ?") statement.setString(1, "%@%")
This will return all the email addresses as all the emails contain @.
-This attack is possible as the '**like'** statement supports wildcards and hence special characters like the asterisk (*), percent symbol (%), underscore (_), and question mark (?) can be inserted into a bound parameter resulting in undesirable effects.
+This attack is possible as the '**like'** statement supports wildcards and hence special characters like the asterisk (\*), percent symbol (%), underscore (\_), and question mark (?) can be inserted into a bound parameter resulting in undesirable effects.
-There are some characters that need to be escaped even if we are using PreparedStatements. SQL wildcards such as ([ and ]), (%), (_), (*) have an effect when part of parameters. We must escape these wildcards Unless a query explicitly matches multiple values based on wildcards.
+There are some characters that need to be escaped even if we are using PreparedStatements. SQL wildcards such as ([ and ]), (%), (\_), (\*) have an effect when part of parameters. We must escape these wildcards Unless a query explicitly matches multiple values based on wildcards.
#### 2. JAP/ Hibernate / ORM
JPA or ORM do not **prevent us from writing vulnerable code.** Let’s consider the example below
-> TypedQuery query = em.createQuery( "SELECT * FROM User WHERE userid= '" + userId+ "'", User.class); User user= query.getSingleResult();
+> TypedQuery query = em.createQuery( "SELECT \* FROM User WHERE userid= '" + userId+ "'", User.class); User user= query.getSingleResult();
All the vulnerabilities specified above are persistent in this Query. To avoid them we may write parameterized queries Similar to JDBC PreparedStatement, either by using Positional parameters or named Parameters
@@ -94,11 +93,11 @@ Stored Procedures are SQL statements stored in the database rather than in the a
They have to be securely written to avoid SQL Injections.
-> CREATE PROCEDURE bad_proc @name varchar(256) BEGIN EXEC ('SELECT COUNT(*) FROM users WHERE name LIKE "' + @name + '"') END
+> CREATE PROCEDURE bad_proc @name varchar(256) BEGIN EXEC ('SELECT COUNT(\*) FROM users WHERE name LIKE "' + @name + '"') END
We can write the above Stored Procedures securely as below
-> CREATE PROCEDURE bad_proc @name varchar(256) BEGIN EXEC ('SELECT COUNT(*) FROM users WHERE name LIKE @name') END
+> CREATE PROCEDURE bad_proc @name varchar(256) BEGIN EXEC ('SELECT COUNT(\*) FROM users WHERE name LIKE @name') END
#### Some more database safeguards:
@@ -113,4 +112,3 @@ In the case where you need to execute DDL(Data Definition Language) query, like
1. Your most used DB user(the one stored in properties or context.xml file) must have only rights to execute DML queries. Let's call this user 'dmlOnlyUser' 2. Create a new elevated user with DDL privilege. Let's call this user 'ddlUser'. Store the ddlUsers credentials in the database. 3. In order to run DDL statements, access the Database, retrieve the 'ddlUser' user's credentials, and then create a new connection using those credentials. Then run the DDL and release the connection right away.
These are some of the security measures we can take to prevent SQL Injections. The main idea is that even if it is difficult to find all possible vulnerabilities in our code especially when we are working with legacy code, we should at least try to limit the damage and the possibility of attacks through SQL Injections.
-
diff --git a/content/blog/dead-code.md b/content/blog/dead-code.md
index 93fab3d13..8dc866e02 100644
--- a/content/blog/dead-code.md
+++ b/content/blog/dead-code.md
@@ -9,7 +9,6 @@ title = "Dead code"
+++
-
While developers look at their code as a prized possession, I have learned to look at code as a liability, and I think developers should discuss why.
`more code = more liability`
@@ -48,4 +47,3 @@ There is no arguing that dead code can make your code less readable and less mai
Finally, dead code increases the size of your code. This means, bit by bit, dead code makes your tests slower, your builds slower, security and static analysis scans slower, download of artifacts slower.
If you are still not convinced about deleting dead code, then, once again, let me remind you that it impacts security :-).
-
diff --git a/content/blog/do-not-assume-that-technical-debt-is-a-problem-with-your-code.md b/content/blog/do-not-assume-that-technical-debt-is-a-problem-with-your-code.md
index 28c119d5f..680b35675 100644
--- a/content/blog/do-not-assume-that-technical-debt-is-a-problem-with-your-code.md
+++ b/content/blog/do-not-assume-that-technical-debt-is-a-problem-with-your-code.md
@@ -30,4 +30,3 @@ So, what can you do to reduce technical debt? Of course, fixing important things
4. **Prioritize your debt**; developers don't have to pay off all the debt. "Software Design X-Rays" by Adam Tornhill is an excellent book on this subject.
Finally, this is not an exhaustive list. Instead, it is meant for us to think about what causes technical debt and to create a strategy to eliminate the root cause, not just the debt created. Always remember, cleaning things takes a lot more time as compared to messing them up. Thus, it is crucial to stop the leakages right at the source.
-
diff --git a/content/blog/do-not-fall-for-faux-agile.md b/content/blog/do-not-fall-for-faux-agile.md
index 082c88811..e33d82046 100644
--- a/content/blog/do-not-fall-for-faux-agile.md
+++ b/content/blog/do-not-fall-for-faux-agile.md
@@ -11,9 +11,6 @@ title = "Do not Fall for faux agile"
+++
-
-
-
Enough ink is already spilled on this topic, nevertheless talking about it once again may not hurt.
A team that is adopting agile must adopt its underlying spirit.
@@ -40,12 +37,9 @@ Teams should embrace other software development tools and practices too, a few t
Finally, here are the values of Agile from the Agile Manifesto
-
-
-* _Individuals and interactions over processes and tools_
-* _Working software over comprehensive documentation_
-* _Customer collaboration over contract negotiation_
-* _Responding to change over following a plan_
+- _Individuals and interactions over processes and tools_
+- _Working software over comprehensive documentation_
+- _Customer collaboration over contract negotiation_
+- _Responding to change over following a plan_
_That is, while there is value in the items on the right, we value the items on the left more._
-
diff --git a/content/blog/do-not-get-so-busy-that-you-stop-learning.md b/content/blog/do-not-get-so-busy-that-you-stop-learning.md
index 4efe05557..ac36557f5 100644
--- a/content/blog/do-not-get-so-busy-that-you-stop-learning.md
+++ b/content/blog/do-not-get-so-busy-that-you-stop-learning.md
@@ -11,10 +11,8 @@ title = "Do not Get so busy that you stop learning"
+++
-
Learning is the most vital part of a software developer's life. Being so busy that one stops learning is neither desirable nor helpful to one's career. Sandro wrote in his book Software Craftsman, having one year of experience ten times does not mean having ten years of experience.
Apart from learning programming languages like Java or Python, we should also aim to become proficient at our Source Control Management software, build systems, leadership skills, communication, documentation, cloud infrastructure technologies, excel, and word too!
Expanding your horizon helps you find the most befitting solutions to various coding problems and the underlying business.
-
diff --git a/content/blog/do-not-optimize-prematurely.md b/content/blog/do-not-optimize-prematurely.md
index 81c355013..ec23b6150 100644
--- a/content/blog/do-not-optimize-prematurely.md
+++ b/content/blog/do-not-optimize-prematurely.md
@@ -11,10 +11,8 @@ title = "Do not Optimize Prematurely"
+++
-
Once again, you would think that the software development community has moved past this point, but I still get many teammates who want to "save memory" using HashMaps instead of POJOs. I am not too sure how efficient HashMaps are compared to POJOs, but I am sure of how they can become a maintenance nightmare if we start using maps wherever we could use POJO.
In hindsight, it now seems foolish, but I have been guilty of committing crimes like sprinkling static variables, singletons, and data structures like maps instead of more compiler-friendly data structures. All this is because either I had some misconception about how performance optimization works or an obscure scenario in my mind like "what will happen when 2,13,00093 users access my piece of code in parallel."
Between a speculative performance issue that you may or may not encounter and the use of clean code, clean code should always win. If your code is clean, it will be easy to find it and fix it when a performance issue arises.
-
diff --git a/content/blog/do-not-say-i-will-try.md b/content/blog/do-not-say-i-will-try.md
index 4c0a65e1e..bb0897c09 100644
--- a/content/blog/do-not-say-i-will-try.md
+++ b/content/blog/do-not-say-i-will-try.md
@@ -11,4 +11,3 @@ title = "Do not Say \"I will try\""
Uncle Bob says this very well in his book Clean Coder. And I will try it too! In the world of SoWs, contracts, and deadlines, one of the most common phrases software developers end up saying is "I will try"!
When a developer says this, he may mean, "I will try, and I may not be able to deliver." However, it gets perceived as a promise of timely delivery. This behavior is one of the pitfalls of being a developer. Accepting the deadline before knowing the details of what has to be done and saying, "I will try." As a developer, you should strive to become aware of what you will need to complete a task before making promises of when you will deliver it.
-
diff --git a/content/blog/do-not-show-separate-estimate-for-testing.md b/content/blog/do-not-show-separate-estimate-for-testing.md
index 0f3677c54..0c8f769c0 100644
--- a/content/blog/do-not-show-separate-estimate-for-testing.md
+++ b/content/blog/do-not-show-separate-estimate-for-testing.md
@@ -11,6 +11,4 @@ title = "Do not Show Separate Estimate for Unit Testing"
+++
-
Once I was asked in an interview (I was the interviewer!) What do you do in situations where the customers don't want you to write test cases, or they want you to deprioritize the activity of writing test cases. My answer was, the customer gets such ideas if you show test cases as a separate activity; if testing becomes an inherent part of your development workflow, then one cannot tear them apart. This is where methodologies like TDD help. Delivering features mean delivering features with tests; they should not be two different things. Teams should not create stickies on boards or issues in Jira dedicated to unit testing.
-
diff --git a/content/blog/escape-bad-coding-loop.md b/content/blog/escape-bad-coding-loop.md
index 93bf7ecba..4e919a87b 100644
--- a/content/blog/escape-bad-coding-loop.md
+++ b/content/blog/escape-bad-coding-loop.md
@@ -76,4 +76,3 @@ But if you have already entered the spiral, here are a few steps that can help.
4. Reduce technical debt. By having a mission-critical task force, you can eliminate bad code at the most fundamental level and prevent it from recurring. Create a road map, and possibly a task force, to fix the debt and upskill the team. (Refer, for example, to the book, The DevOps Handbook: How to Create World-Class Agility, Reliability and Security in Technology Organizations.)
Modernizing software systems is a large subject, and is not an exhaustive list of problems and solutions. When looking at your company's concerns, you can use this method to suggest more influencing flows and stocks in order to have a conversation on how it can help the system reduce technical debt.
-
diff --git a/content/blog/estimation.md b/content/blog/estimation.md
index d47a70722..629992eba 100644
--- a/content/blog/estimation.md
+++ b/content/blog/estimation.md
@@ -30,9 +30,11 @@ We have established that we want to estimate because we need to plan ‘Somethin
Estimation can be broadly classified into two types, “Effort Estimation” and “Cost Estimation” both of which are equally important in an agile software environment.
## Effort Estimation:
+
This translates to the amount of probable time that is to be spent on completing a defined task. The accuracy of this estimate directly depends on the definition of this task.
To quote “Donal Rumsfield”
+
```
There are known knowns – there are things we know that we know.
There are known unknowns – that is to say, there are things we know we don’t know.
@@ -44,6 +46,7 @@ How much we know about a task and how much we don’t know, and the time spent i
There are many techniques available for estimating the effort. Given below are some of the popular techniques, which are used in effort estimation:
## Parametric Estimation:
+
Parametric estimation is one of the statistical methods to estimate the amount of time required to complete a project. This technique is mainly dependent on the available historical data of an assumed ‘parameter’. The output of a parametric estimate can be classified into two types based on granularity and accuracy: Deterministic and Probabilistic.
A parameter with its assumed correlation to the amount of time taken is determined and is then scaled up to the actual project size. A deterministic result is a certain number or a figure based on such scaling of the correlation. A probabilistic result on the other hand provides a range of estimates over a probability density curve as given below:
@@ -51,7 +54,7 @@ A parameter with its assumed correlation to the amount of time taken is determin
{{