-
-
Save DocGreenRob/a7f08d56bae684f7f00583f446c27e8a to your computer and use it in GitHub Desktop.
Windows Pro Tips | |
----------------- | |
powertoys - https://apps.microsoft.com/store/detail/microsoft-powertoys/XP89DCGQ3K6VLD | |
devtoys - https://apps.microsoft.com/store/detail/devtoys/9PGCV4V3BK4W | |
Visual Studio 2022 Pro Tips | |
--------------------------- | |
vscoloroutput - https://marketplace.visualstudio.com/items?itemName=MikeWard-AnnArbor.VSColorOutput | |
solutionColor - https://marketplace.visualstudio.com/items?itemName=Wumpf.SolutionColor | |
save vs settings to apply to other computer - https://learn.microsoft.com/en-us/visualstudio/install/import-export-installation-configurations?view=vs-2022 | |
Podcasts | |
-------- | |
Dev interrupted | |
Hacking Humans | |
Cyber Security Headlines | |
Click Here | |
Malicious Life | |
The Stack Overflow Podcast | |
The Backend Engineering (with Hussein Nasser) | |
The Changelog: Software Development, Open Source | |
Tech Stuff | |
Cyberwire Daily | |
Techmeme Ride Home | |
Soft Skills Engineering | |
Syntax - Tasty Web Development Treats | |
Cyber Security Today | |
Software Engineering Daily | |
Developer Tea | |
Coding Blocks .NET | |
The Cloud Cast | |
JS Party: Javascript, CSS, Web Development | |
Go Time: Golang, Software Engineering | |
Cyber | |
Dev Questions with Tim Corey | |
Thoughtworks Technology Podcast | |
.NET Rocks! | |
Smashing Security | |
Hanselminutes with Scott Hanselman | |
Software Engineering | |
Talk Python To Me | |
Security Now | |
Darknet Diaries | |
Hacked | |
The .NET Core Podcast | |
The .NET MAUI Podcast | |
Kubernetes Podcast from Google | |
Adventures in .NET | |
Coding After Work | |
Base.cs Podcast | |
The Static Void Podcast | |
Tools | |
------ | |
couchbase | |
honeycomb.io/changelog | |
firehydrant | |
logrocket | |
playwright | |
openmct | |
thundra.io | |
raygun | |
fly.io | |
appwrite | |
sentry.io | |
https://sourcegraph.com/ | |
https://www.kolide.com/ | |
https://entity.services/ | |
WeekPlan | |
Docker Extensions | |
------------------ | |
Ddosify - High-performance load testing tool | |
- https://github.com/ddosify/ddosify | |
BurpSuite | |
- https://portswigger.net/burp | |
- https://danaepp.com/ | |
VS Tips | |
-------- | |
Extract method from selected code | |
- Ctrl + R + M | |
Ctrl + K + D | |
Ctrl + R + G | |
Ctrl + M + Z (Code Maid) | |
Important | |
---------- | |
ApplicationInsights SamplingSettings for AzFn | |
- https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json | |
Design Patterns in C# | |
- https://www.dofactory.com/net/factory-method-design-pattern | |
- https://github.com/DovAmir/awesome-design-patterns?utm_source=programmingdigest&utm_medium&utm_campaign=1493 | |
Shopify Query | |
- https://shopify.engineering/reducing-bigquery-costs?utm_source=programmingdigest&utm_medium&utm_campaign=1403 | |
Building Own Operating System | |
- https://o-oconnell.github.io/2023/01/12/p1os.html?utm_source=programmingdigest&utm_medium&utm_campaign=1493 | |
Debugging Linq | |
- https://www.red-gate.com/simple-talk/development/dotnet-development/linq-secrets-revealed-chaining-and-debugging/ | |
--> https://michaelscodingspot.com/debug-linq-in-csharp/ | |
Bleeping Computer | |
- https://www.bleepingcomputer.com/ | |
Utilities | |
--------- | |
Handle v5.0 | |
- https://learn.microsoft.com/en-us/sysinternals/downloads/handle?WT.mc_id=DT-MVP-5003978 | |
Auto Increment Build # | |
- https://stackoverflow.com/questions/826777/how-to-have-an-auto-incrementing-version-number-visual-studio | |
Phylosophy | |
---------- | |
1. Do I have to have a "purpose" to have an address in the USA? | |
- if yes, then as a Human being I must have a purpose? Seriously? Ok, a purpose to whom? To whom must I state my pupose or execute or report to about...??? | |
2. System Failure - Zero Day Exploit | |
3. Good PR example - https://github.com/dotnet/aspnetcore/pull/45587/files | |
App Insights Log Queries | |
------------------------ | |
availabilityResults | |
| where timestamp > datetime("2022-12-19T04:07:00.000Z") and timestamp < datetime("2022-12-20T04:07:00.000Z") | |
| where customDimensions["WebtestArmResourceName"] == "availability-test-1-app-notepad-physical-activity-dev-eastus" | |
| where true and true | |
| extend percentage = toint(success) * 100 | |
| summarize avg(percentage) by bin(timestamp, 1h) | |
| render timechart | |
****************************************************************** | |
You can delete all branches in your repository except for 'master', 'branch one', and the currently checked out branch using the following command in PowerShell:
git branch | ForEach-Object { if ($_ -notmatch '\*|master|branch one') { git branch -d $_.trim() } }
This command does the following:
git branch
lists all branches.ForEach-Object
loops over each branch.if ($_ -notmatch '\*|master|branch one')
checks if the branch is not the currently checked out branch (represented by*
) and is not 'master' or 'branch one'.git branch -d $_.trim()
deletes the branch if the condition is met.
Please replace 'master' and 'branch one' with the actual names of the branches you want to keep if they are different.
Note: This command will only delete branches that have been merged. If you want to delete all branches regardless of whether they have been merged or not, you can use the -D
option instead of -d
.
git branch | ForEach-Object { if ($_ -notmatch '\*|master|branch one') { git branch -D $_.trim() } }
Be careful with this command as it will delete branches even if they contain unmerged changes. Always make sure to check the branches and their changes before deleting them. It's a good practice to keep your work committed and pushed to a remote repository to avoid any loss of work.
$WShell = New-Object -Com Wscript.Shell
while (1) {$WShell.SendKeys("{SCROLLLOCK}"); sleep 60}
Great question — this gets to the heart of modern software architecture vs. legacy (but sometimes still valid) approaches.
Let’s break it down clearly:
⚖️ Stored Procedure vs. Business Logic in Application Code
Aspect | Stored Procedures | Application-Level Logic (e.g., LINQ, EF, Services) |
---|---|---|
Performance | ✅ Very fast for set-based operations ✅ Precompiled and optimized by SQL Server |
❌ Not precompiled, relies on EF query generation |
Maintainability | ❌ Harder to version & maintain ❌ Poor readability, especially for complex logic ❌ Requires DBA or SQL expertise |
✅ Easier to version in Git ✅ More readable & testable ✅ Fits with modern CI/CD pipelines |
Testability | ❌ Difficult to write unit tests ✅ Can write integration tests, but hard to mock |
✅ Fully testable with mocks, stubs, unit tests ✅ Better coverage & automation |
Deployment | ❌ Requires direct DB script deployment ❌ Harder to rollback or track versions |
✅ Deploys with the app code ✅ Works with CI/CD pipelines, git-controlled |
Reusability | ❌ Not easily shared across services unless all touch the same DB | ✅ Code reuse through services, interfaces, shared libraries |
Security | ✅ Can restrict access to just stored procs (minimize SQL injection) | ✅ EF Core helps with SQL injection |
Portability | ❌ Tied to a specific RDBMS (e.g., SQL Server T-SQL) | ✅ Works across SQL Server, PostgreSQL, MySQL, etc. if ORM is used |
Version Control | ❌ Often forgotten or manually managed | ✅ Git handles code changes, history, rollbacks |
Business Logic Location | ❌ Logic is in the DB — makes code harder to understand holistically | ✅ Logic is centralized in app code — clearer architecture |
Legacy Support | ✅ Works well in older architectures ✅ Can encapsulate legacy business logic |
✅ Preferred for greenfield and modern microservices architectures |
💡 Summary
-
Stored Procedures are great for:
- High-performance batch jobs
- Legacy systems
- Tight DBA control environments
- Data integrity enforcement close to the data
-
App-Level Logic (like what you're doing) is better for:
- Testability (unit tests, mocking, automation)
- Maintainability (Git, version control)
- Scalability (microservices, clean architecture)
- Developer productivity (modern tooling, CI/CD)
🧠 Final Advice
You're doing the modern, clean approach by keeping business logic out of the DB and inside service layers and EF/LINQ logic. This gives you better test coverage, source control, and clarity across your team.
If you need performance on large data ops, you can combine both: use EF for most of the system, and have a few well-tuned stored procedures for data-heavy reports or batch updates.
Let me know if you want to see a hybrid example or best practices for stored procs in a modern stack.
You can use the
git branch
command in PowerShell to list all branches in your repository. To exclude specific branches like 'master' and 'branch one', you can use thegrep -v
command which inverts the match. Here is the command you can use:This command will list all the branches in your current repository except for 'master' and 'branch one'. Please replace 'master' and 'branch one' with the actual names of the branches you want to exclude if they are different.
Please note that this command requires Git Bash utilities. If you're using pure PowerShell, you might need to use a different approach as
grep
is not a built-in command in PowerShell. Here's how you can do it in pure PowerShell:This command does the same thing: it lists all branches except 'master' and 'branch one'. The
Where-Object
cmdlet in PowerShell is used to filter out objects from a collection that do not meet a certain condition. In this case, the condition is that the branch name does not match 'master' or 'branch one'.