![38% of CISOs Fear They’re Not Moving Fast Enough on AI](https://cdn.sanity.io/images/cgdhsj6q/production/faa0bc28df98f791e11263f8239b34207f84b86f-1024x1024.webp?w=400&fit=max&auto=format)
Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
A trolling project turned practical (hopefully) Python decorator for marking and ignoring problems in your code
A useless Python package for marking technical debt in your codebase. Based on the infamous "Ostrich Algorithm" - if you can't see the problem, is it really a problem? As the saying usually goes, if you don't see it, it's not there /s.
The Ostrich Algorithm is a term in programming where developers deliberately ignore certain problems in their code (like an ostrich "burying its head in the sand"). While it sounds like a joke, it's actually a legitimate strategy when:
This package turns this concept into a (hopefully) useful marking system for your code, letting you:
pip install py-ostrich
from ostrich import ostrich, Priority
# Mark high priority issues with specific line problems
@ostrich(Priority.HIGH, "PERF-123", lines={
15: "This regex makes senior devs cry",
20: "O(n³) but we pretend it's O(1)"
})
def slow_as_hell_function():
pattern = r'^[^\s]{0,}(?<=\w{3})\d+'
for i in range(1000000):
do_something_terrible(i)
return "somehow it worked"
# medium priority stuff you'll "fix later"
@ostrich(Priority.MEH)
def might_explode():
x = {'a': 1, 'b': 2}
return "🤞"
@ostrich()
def pure_chaos():
important_business_logic()
return "¯\_(ツ)_/¯"
from ostrich import ostrich, Priority
@ostrich(Priority.HIGH, "PERF-123", lines={
15: "This query makes the DB cry",
22: "N+1 query problem but it's Friday"
})
def calculate_user_metrics():
query = "SELECT * FROM users WHERE..."
for metric in all_metrics:
results.append(calculate_metric(user, metric))
return results
# The output will look like:
# [OSTRICH HIGH][PERF-123] watching from line 3
# Marked lines in this function:
# Line 15 -> This query makes the DB cry
# query = "SELECT * FROM users WHERE..."
# Line 22 -> N+1 query problem but it's Friday
# for metric in all_metrics:
Found a bug? (Or want to professionally ignore it?) Feel free to:
Because sometimes you need to:
This is meant to be a joke. Please write proper code.
MIT License - Because we take some responsibility (unlike our code)
FAQs
A trolling project turned practical (hopefully) Python decorator for marking and ignoring problems in your code
We found that py-ostrich demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.