-
Cache-Oblivious Algorithms and Data Structures - Erik Demaine (One of the earliest papers in cache oblivious data structures and algorithms that introduces the cache oblivious model in detail and examines static and dynamic cache oblivious data structures built between 2000-2003)
-
Cache Oblivious B-Trees - Bender, Demaine, Farch-Colton (This paper presents two dynamic search trees attaining near-optimal performance on any hierarchical memory. One of the fundamental papers in the field where both search trees discussed match the optimal search bound of Θ(1+log (B+1)N) memory transfers)
-
Cache Oblivious Search Trees via Binary Trees of Small Height - Brodal, Fagerberg, Jacob (The data structure discussed in this paper works on the version of [2] but avoids the use o
package main | |
import ( | |
"expvar" | |
"fmt" | |
"log/slog" | |
"net/http" | |
"os" | |
"time" |
{ | |
description = "A very basic flake"; | |
inputs = { | |
ugit-src = { | |
url = "github:Bhupesh-V/ugit"; | |
flake = false; | |
}; | |
flake-utils = { | |
url = "github:numtide/flake-utils"; |
FROM alpine:3.18 as base | |
ENV ESSENTIAL="tar sh" | |
ENV DEPS="ugit git fzf tput nl cut bash sed awk tr env xargs" | |
RUN apk add --no-cache \ | |
bash \ | |
coreutils \ | |
git \ | |
ncurses \ | |
ncurses-terminfo \ |
Writing this post in response to the WeekendDevPuzzle of 2022-01-15. This thread has a bunch of submissions, and it's insightful to go over how we often think about debuggers. I'll be linking this post to this twitter thread, which may also contain some follow up twitter follow ups later.
Let's start with a simple piece of code. This is the program we'll be debugging. As you can see, it's a fairly simple piece of code. We will be setting a breakpoint on the crashtest
function, crashing the debugger and seeing what happens.
Let's start with running this program (we've compiled using gcc -o testdebugcrash testdebugcrash.c
). We'll be running this on Linux for now (the importance of this will be understood later).
![start-program](https://user-images.githubusercontent.com/1546858/149652729-dbfa2104-a
``` | |
package helper | |
import ( | |
"database/sql" | |
"encoding/json" | |
"fmt" | |
"reflect" | |
"time" |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
-- count till n | |
WITH RECURSIVE count_cte AS ( | |
SELECT 1 AS n -- anchor member | |
UNION | |
SELECT n + 1 -- recursive member | |
FROM count_cte WHERE n < 10 | |
) SELECT * FROM count_cte; | |
-- factorial | |
WITH RECURSIVE fact_cte AS ( |
from .social_media_post import SocialMediaPost | |
from .social_media_post_publisher import SocialMediaPostPublisher | |
# This is used by 'from socsocial_media_post import *' | |
# As far as there is nothing else here and in app.py | |
# we import the classes explicitely, this part can be ommited | |
__all__ = [ | |
'SocialMediaPost', | |
'SocialMediaPostPublisher' | |
] |