a snapchat inspired backend chat application
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"time" |
A step by step introduction into the AWK command, it's syntax, uses and sample use cases.
The awk
command is a column based manipulation tool that can be used for a variety of things, from reading CSVs to killing processes, literally.
At the very core, AWK is based on the following
awk '{expression to qualify output} {print $output expression}'
Although it's a cli tool, it offers a lot of programming language paradigms such as
So i've been asking the question: "how exactly should i write Golang in a very futuristic way?" futuristic meaning maintainable, flexible and of course, testable. I came across Mat Ryer's way which made a lot of sense, however, Russ Cox begs to differ, and of Russ Cox is whoever he thinks is within Golang's compound. So I dug further and found more resources, I'll try to update this gist as i continue this journey
TLDR; they all say the same thing: organise by function and not by type
import xml.etree.ElementTree as ET | |
import re | |
def find_broken_attributes(xml_string): | |
"""Find and report broken attributes in an XML string using recursion""" | |
# First try simple regex approach to find common broken attribute patterns | |
broken_attributes = find_broken_attributes_with_regex(xml_string) | |
# If no broken attributes found with regex, try parsing and recursively checking | |
if not broken_attributes: |