Skip to main content

· 11 min read

Good Reads

2023-11-01 Life Lessons from the Death Bed – Isonomia Quarterly

As part of our graduation requirements, we had to participate in service learning my junior year of high school during the time slot allotted for our theology class. We were given a list of places in our city to volunteer and told to pick one that we’d be interested in. Of course, dozens of girls selected the animal shelter, the park, the library, and daycares. My eyes fell to the bottom of the list, a location with 0 volunteers — our local Hospice.

image-20231102003834603

2023-10-29 Random Thoughts 15 years into Software Engineering

found in How to Make a CPU - Programming Digest

Debuggability is highly underrated. When writing code, you have to think about how it will execute. You also need to be thinking about how it will fail and how you will debug it in production. Leave yourself audit trails, store data in human readable formats, and invest in admin tooling.

Projects are late, a lot. This is not unique to software. The reality is that time is constantly moving against us, and when unexpected things happen they can take an order of magnitude longer than we planned. And in software, there’s always more we can add to a given feature or system. Give a best effort, and keep your stakeholders informed of progress and blockers.

Aggressively manage scope. Related to the above, protect your project’s scope. Defensively, as people will often try to add things throughout the project. You don’t have to push back if you don’t want, but be transparent about how it will affect the project delivery and communicate it widely. Offensively, look for things you can cut or, my favorite, look for things that you can ship AFTER launch and push to prioritize those at the end. I love a good “fast follow”.

Staging is pretty much always broken. I see a lot of younger devs hand wring about testing environments. Don’t get me wrong, testing environments are great and you should use them. But the larger your systems get the harder and harder is to maintain a parallel environment that actually mirrors production in a meaningful way. Make a best effort - but otherwise don’t sweat it and don’t be afraid to test things in production (safely, feature flags are your friend).

Action is rewarded. Pointing out problems or complaining is not.

...

2023-10-27 Lessons learned from two decades of Site Reliability Engineering

  1. The riskiness of a mitigation should scale with the severity of the outage
  2. Recovery mechanisms should be fully tested before an emergency
  3. Canary all changes
  4. Have a "Big Red Button" -- A "Big Red Button" is a unique but highly practical safety feature: it should kick off a simple, easy-to-trigger action that reverts whatever triggered the undesirable state to (ideally) shut down whatever's happening.
  5. Unit tests alone are not enough - integration testing is also needed
  6. COMMUNICATION CHANNELS! AND BACKUP CHANNELS!! AND BACKUPS FOR THOSE BACKUP CHANNELS!!!
  7. Intentionally degrade performance modes
  8. Test for Disaster resilience
  9. Automate your mitigations
  10. Reduce the time between rollouts, to decrease the likelihood of the rollout going wrong
  11. A single global hardware version is a single point of failure

2023-10-27 Approaching unconventional problems | Manas.Tech

The phone was found!

After having lived in a rural area for almost two years, I’ve learnt to save battery by switching my phone’s wifi off whenever I go into the woods or mountain - but I also know that people don’t usually do that. After confirming this assumption with him, I’ve used my own phone’s tethering feature to create a wifi network with the same name & password as my cousin’s home network - and we started walking around the place.

Fun

2023-10-24 How To Make A CPU - A Simple Picture Based Explanation

image-20231102011337991

2023-10-19 Ex Astris Scientia - Commercially Available Chairs in Star Trek

image-20231102011742683

2023-10-17 Napflix | Siesta Video Platform.

image-20231102011919609

2023-10-17 GitHub - Bathlamos/Programmers-Playing-Cards: Play cards with style with this fancy programmer’s deck. 52 languages!

By By

image-20231102012114239

Retro

2023-10-19 Bill Gates demonstrates Visual Basic (1991) - YouTube Windows 3.1

image-20231102011601993

2023-10-13 GUIdebook Screenshots Windows 95 2023-10-13 GUIdebook Screenshots Windows 3.1 2023-10-13 GUIdebook > Screenshots > Windows NT 3.51 Workstation

image-20231102012813839

image-20231102012917285

Metadata Blog

On distributed systems broad ly defined and other curiosities. The opinions on this site are my own.

This paper appeared in OSDI'22. There is a great summary of the paper by Aleksey (one of the authors and my former PhD student, go Aleksey!). There is also a great conference presentation video from Lexiang. Below I will provide a brief overview of the paper followed by my discussion points.

This paper appeared in July at USENIX ATC 2023. If you haven't read about the architecture and operation of DynamoDB, please first read my summary of the DynamoDB ATC 2022 paper . The big omission in that paper was discussion about transactions. This paper amends that. It is great to see DynamoDB, and AWS in general, is publishing/sharing more widely than before.

This paper (from Sigmod 2023) is a followup to the deterministic database work that Daniel Abadi has been doing for more than a decade. I like this type of continuous research effort rather than people jumping from one branch to another before exploring the approach in depth.

The backstory for Detock starts with the Calvin paper from 2012. Calvin used a single logically centralized infallible coordinator (which is in fact 3 physical nodes under the raincoat using Paxos for state machine replication) to durably lock-in on the order of oplogs to be executed. The coordinator also gets rid of nondeterminism sources like random or time by filling in those values. The oplogs then get sent to the workers that execute them and materialize the values. The execution is local, where the executors simply follow the logs they receive.

This paper got the best paper award at SOCC 2021. The paper conducts a comprehensive study of large scale microservices deployed in Alibaba clusters. They analyze the behavior of more than 20,000 microservices in a 7-day period and profile their characteristics based on the 10 billion call traces collected.

SQLite is the most widely deployed database engine (or likely even software of any type) in existence. It is found in nearly every smartphone (iOS and Android), computer, web browser, television, and automobile. There are likely over one trillion SQLite databases in active use. (If you are on a Mac laptop, you can open a terminal, type "sqlite3", and start conversing with the SQLite database engine using SQL.) SQLite is a single node and (mostly) single threaded online transaction processing (OLTP) database. It has an in-process/embbedded design, and a standalone (no dependencies) codebase ...a single C library consisting of 150K lines of code. With all features enabled, the compiled library size can be less than 750 KiB. Yet, SQLite can support tens of thousands of transactions per second. Due to its reliability, SQLite is used in mission-critical applications such as flight software. There are over 600 lines of test code for every line of code in SQLite. SQLite is truly the little database engine that could.

This paper introduces a simple yet powerful idea to provide efficient multi-key transactions with ACID semantics on top of a sharded NoSQL data store. The Warp protocol prevents serializability cycles forming between concurrent transactions by forcing them to serialize via a chain communication pattern rather than using a parallel 2PC fan-out/fan-in communication. This avoids hotspots associated with fan-out/fan-in communication and prevents wasted parallel work from contacting multiple other servers when traversing them in serial would surface an invalidation/abortion early on in the serialization. I love the elegance of this idea.

2023-11-01 dlemstra/magick-wasm: The WASM library for ImageMagick

ImageMagick is a powerful image manipulation library that supports over 100 major file formats (not including sub-formats). With magick-wasm you can use ImageMagick in your web application without doing a callback to an api.

2023-11-01 xxlong0/Wonder3D: A cross-domain diffusion model for 3D reconstruction from a single image

Single Image to 3D using Cross-Domain Diffusion

2023-11-01 donnemartin/system-design-primer: Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

image-20231102004329082

2023-11-01🍒 InterviewReady/system-design-resources: These are the best resources for System Design on the Internet

2023-11-01 trimstray/the-book-of-secret-knowledge: A collection of inspiring lists, manuals, cheatsheets, blogs, hacks, one-liners, cli/web tools and more.

image-20231102004646155

JavaScript / Web

2023-10-30 Sit., (together) devlog 002 – Space Kalimba - Untested

Tone.js Tone.js is a Web Audio framework for creating interactive music in the browser. The architecture of Tone.js aims to be familiar to both musicians and audio programmers creating web-based audio applications. On the high-level, Tone offers common DAW (digital audio workstation) features like a global transport for synchronizing and scheduling events as well as prebuilt synths and effects. Additionally, Tone provides high-performance building blocks to create your own synthesizers, effects, and complex control signals.

Algebra / Math & Stats

2023-10-30 Linear Algebra Done Right

Sheldon Axler: I am happy to announce the publication of the fourth edition of Linear Algebra Done Right as an Open Access book. The electronic version of the book is now legally free to the world at the link below.

Linear Algebra Done Right, fourth edition

2023-09-02 Slava Akhmechet - Linear Algebra for programmers, part 1

The most important thing about reading this blog post is to not get scared off by the formulas. The post may look like all the crap you normally skim over, so you may be tempted to skim over this one. Don’t! None of this is hard. Just read the post top to bottom, and I promise you every individual step and the whole thing put together will make sense.

2023-10-12 Introduction to Modern Statistics (2nd Ed)

image-20231102013053158

Apache Spark

2023-10-29 How to Speed Up Spark Jobs on Small Test Datasets - Blog | luminousmen

Dealing with small datasets (less than a million entries), can be a peculiar challenge when you've chosen Apache Spark as your go-to tool. Apache Spark is known for its capabilities in handling massive datasets through distributed computing. However, using it for smaller datasets may not always be the most efficient choice. This is most often the case for writing tests, and I’ve noticed that people frequently miss those pieces, but who knows your work better than you?

In this blog post, we'll explore various optimization techniques to fine-tune Apache Spark for small datasets and discuss when it might be worthwhile to consider alternative tools.

OAuth

2023-10-27 Grammarly's OAuth mistakes

These are companies with millions of active users and hundreds or thousands of employees. These are not startups in a garage. Yet for all three, “Login With Facebook” was insecurely implemented in such a way that user account takeover was a real possibility.

I’m not going to dig into the details in this post. The article does a great job of that, including walking through how account takeover could be achieved.

Graphics

2023-10-27 A Journey Into Shaders

Interactive intro to shaders References

image-20231102011150282

· 19 min read

A room labeled "Bing HQ." Developers huddled around a computer, looking confused. The screen shows jumbled text results from Bing Image Create. One developer says, "It's supposed to generate images, not this gibberish!"

2023-10-04 A room labeled "Bing HQ." Developers huddled around a computer, looking confused. The screen shows jumbled text results from Bing Image Create. One developer says, "It's supposed to generate images, not this gibberish!" - Image Creator from Microsoft Bing

image-20231003223923283

Good Reads

2023-10-04 The Workflow Pattern

image-20231003173306503

found in Programming Digest

2023-09-21 Falsehoods programmers believe about time, in a single list

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
  • A week always begins and ends in the same month.
  • A week (or a month) always begins and ends in the same year.
  • The machine that a program runs on will always be in the GMT time zone.
  • Ok, that’s not true. But at least the time zone in which a program has to run will never change.
  • Well, surely there will never be a change to the time zone in which a program hast to run in production.
  • The system clock will always be set to the correct local time.
  • The system clock will always be set to a time that is not wildly different from the correct local time.

image-20231003190601540

2023-08-24 How to sabotage your salary negotiation efforts before you even start

Exactly what to say For questions about comp expectations at the beginning of the process: At this point, I don’t feel equipped to throw out a number because I’d like to find out more about the opportunity first – right now, I simply don’t have the data to be able to say something concrete. If you end up making me an offer, I would be more than happy to iterate on it if needed and figure out something that works. I promise not to accept other offers until I have a chance to discuss them with you.

For questions about comp expectations at the end of the process: It sounds like there’s an offer coming, and I’m really excited about it. I’m not sure exactly what number I’m looking for, but if you’d be able to share what an offer package might look like, then I will gladly iterate on it with you if needed and figure out something that works. I promise not to accept other offers until I have a chance to discuss them with you.

For questions about where else you’re interviewing at the beginning of the process: I’m currently speaking with a few other companies and am at various stages with them. I’ll let you know if I get to the point where I have an exploding offer, and I promise not to accept other offers until I have a chance to discuss them with you.

For questions about where else you’re interviewing at the end of the process: I’m wrapping things up with a few companies and in process with a few more. I promise to keep you in the loop, and I promise not to accept other offers until I have a chance to discuss them with you.

2023-08-15 Book 🚩 Software Engineering at Google

We’ve found that expertise and shared communication forums offer great value as an organization scales. As engineers discuss and answer questions in shared forums, knowledge tends to spread. New experts grow. If you have a hundred engineers writing Java, a single friendly and helpful Java expert willing to answer questions will soon produce a hundred engineers writing better Java code. Knowledge is viral, experts are carriers, and there’s a lot to be said for the value of clearing away the common stumbling blocks for your engineers.

image-20231003223011168

Bing!!! A sleek, modern design showcases a vast network of interconnected nodes, symbolizing software intricacy, over a satellite view of Earth. At the center, the bold, white text "Software Engineering at Google" contrasts with a deep blue background, signifying global technological dominance.

2023-10-04 A sleek, modern design showcases a vast network of interconnected nodes, symbolizing software intricacy, over a satellite view of Earth. At the center, the bold, white text "Software Engineering at Google" contrasts with a deep blue background, signifying global technological dominance. - Image Creator from Microsoft Bing

image-20231003223349812

Layered over an abstract representation of code, glowing in Google's iconic colors, sits a polished chrome 'G'. Above it, the title "Software Engineering" is written in modern font, with "at Google" just below, emanating the innovative essence of the tech giant.

2023-10-04 Layered over an abstract representation of code, glowing in Google's iconic colors, sits a polished chrome 'G'. Above it, the title "Software Engineering" is written in modern font, with "at Google" just below, emanating the innovative essence of the tech giant. - Image Creator from Microsoft Bing

image-20231003223611630

More Wisdom

2023-10-04 A list of 100 opinions I hold

image-20231003190019270

  • 09 - Log all the things. If you didn’t log it, it didn’t happen.
  • 10 - Don’t assume users are dumb. They will find things you never knew was possible.
  • 11 - Spend most of the time writing the failure paths, not the happy path.
  • 12 - Don’t slap on an index and call it a day. Check your queries, rewrite them and/or create indices accordingly. And hire a DBA.
  • 13 - Javascript is an unreadble async mess.
  • 14 - Scrum is bad
  • 15 - Kanban is better
  • 16 - Just because you say you do scrum, doesn’t mean you do scrum.
  • 17 - you can be “agile” without daily standups, sprints, retrospectives.

2023-09-27 wisdom/wisdom.md at master · merlinmann/wisdom

image-20231003190129574

image-20231003190210607

  • Sometimes, an email is just a way to say, “I love you.”

  • People think about you much less than you either hope or fear.

  • It’s often easier not to be terrible.

  • Buy the nicest screwdrivers you can afford.

  • Every few months, take at least one panorama photo of your kid's room. At least annually, secretly record your kid talking for at least ten minutes. I promise you'll treasure both, and then you will curse yourself for not having done each way more often.

  • Most well-written characters have something they want—or something they think they want. The more fascinating characters also have something they don’t want you to know. The best ones also have something they’re not pulling off nearly as well as they think.

  • Related: these are each also true for real people.

2023-09-14 Work Chronicles - Webcomics

image-20231003190800509

View All Comics Archives - Work Chronicles

Good Talks!

2023-10-03 "Comedy Writing With Small Generative Models" by Jamie Brew - YouTube

2023-10-02 "Making Hard Things Easy" by Julia Evans (Strange Loop 2023) - YouTube

koalaman/shellcheck: ShellCheck, a static analysis tool for shell scripts RFC 9110: HTTP Semantics New tool: Mess with DNS! mess with dns Float Exposed

2023-09-26 World of Warcraft's Network Serialization and Routing - YouTube

I am a Principal Software Engineer, if you are misbehaving, I bring you to my office. JAM -- messaging serialization protocol

2023-08-22 Mark Rickert –Outrage-driven development to take your React Native app up a level (Chain React 2023) - YouTube

SOME FINAL TIPS AND TRICKS FOR BEING AN ODD DEVELOPER:

  1. Practice using empathy with your users, clients, and team members.
  2. Consider user security, privacy, and accessibility as core design principles throughout the development process.
  3. Try to foster a culture of learning and experimentation - remember everyone is at a different point in their learning journey.
  4. Treat customers, clients, and coworkers how you would want to be treated.
  5. Measure the impact of your work

Projects

2023-10-03 orhun/daktilo: Turn your keyboard into a typewriter! 📇

On one side, this is a project with a useless (but funny) goal. On the other side -- this is an awesome sample of cross-platform system app.

daktilo ("typewriter" in Turkish, pronounced "duck-til-oh", derived from the Ancient Greek word δάκτυλος for "finger") is a small command-line program that plays typewriter sounds every time you press a key. It also offers the flexibility to customize keypress sounds to your liking. You can use the built-in sound presets to create an enjoyable typing experience, whether you're crafting emails or up to some prank on your boss.

2023-10-03 google/graph-mining

This project includes some of Google's Graph Mining tools, namely in-memory clustering. Our tools can be used for solving data mining and machine learning problems that either inherently have a graph structure or can be formalized as graph problems.

Web, JavaScript

2023-10-04 Draggable objects

image-20231003175838376

C and C++

2023-09-30 philip82148/cpp-dump: An all-round dump function library for C++ that supports even user-defined classes.

image-20231003175644796

Typescript

2023-09-30 One Thing Nobody Explained To You About TypeScript - Redd

image-20231003175339737

Delving deeper into configurations, the article illuminates the necessity of nested configurations for different project layers, advocating for as many TypeScript files as there are layers. This granularity is essential to avoid "unleashing hundreds of ghostly types" and ensuring precise type-checking. As development tools evolve, and while frameworks might abstract complexities, it's emphasized that "TypeScript is still your tool," urging developers to grasp its depths and nuances.

Rust

2023-10-02 Writing a Debugger From Scratch - DbgRs Part 1 - Attaching to a Process // TimDbg

image-20231003170601953

2023-10-02 Writing a Debugger From Scratch - DbgRs Part 2 - Register State and Stepping // TimDbg 2023-10-02 Writing a Debugger From Scratch - DbgRs Part 3 - Reading Memory // TimDbg 2023-10-02 Writing a Debugger From Scratch - DbgRs Part 4 - Exports and Private Symbols // TimDbg 2023-10-02 Writing a Debugger From Scratch - DbgRs Part 5 - Breakpoints // TimDbg - Tim Misiak

2023-10-02 Programming Digest

Amazing Apache Spark

The time has come to publish everything. Everything I have collected so far

Apache Spark Performance

2023-10-01 sql - How to measure the execution time of a query on Spark - Stack Overflow

No, using time package is not the best way to measure execution time of Spark jobs. The most convenient and exact way I know of is to use the Spark History Server. 2023-10-01 ✨ Use the extended Spark history server to debug apps - Azure Synapse Analytics | Microsoft Learn 2023-10-01 Plan to manage costs for Azure Synapse Analytics - Azure Synapse Analytics | Microsoft Learn

2023-09-09 Optimizing Spark jobs for maximum performance

Let’s take a look at these two definitions of the same computation:

val input = sc.parallelize(1 to 10000000, 42).map(x => (x % 42, x))
val definition1 = input.groupByKey().mapValues(_.sum)
val definition2 = input.reduceByKey(_ + _)
RDDAverage timeMin. timeMax. time
definition12646.3ms1570ms8444ms
definition2270.7ms96ms1569ms

Lineage (definition1):

(42) MapPartitionsRDD[3] at mapValues at <console>:26 []
| ShuffledRDD[2] at groupByKey at <console>:26 []
+-(42) MapPartitionsRDD[1] at map at <console>:24 []
| ParallelCollectionRDD[0] at parallelize at <console>:24 []

Lineage (definition2):

(42) ShuffledRDD[4] at reduceByKey at <console>:26 []
+-(42) MapPartitionsRDD[1] at map at <console>:24 []
| ParallelCollectionRDD[0] at parallelize at <console>:24 []

The second definition is much faster than the first because it handles data more efficiently in the context of our use case by not collecting all the elements needlessly.

image-20231003220824599

Apache Spark Azure

2023-10-01 Azure Storage Data Lake Gen2 Pricing | Microsoft Azure

Data transfer prices for ADLS When you write data into GRS accounts, that data will be replicated to another Azure region. The Geo-Replication Data Transfer charge is for the bandwidth of replicating that data to another Azure region. This charge also applies when you change the account replication setting from LRS to GRS or RA-GRS. View the Data transfer prices on Blobs pricing page.

➡2023-10-01 Azure Data Transfer Costs: Everything You Need To Know • CloudMonitor

Azure data transfer within the same availability zone is free of charge, while data transfer between two different availability zones now incurs a cost of $0.01 per GB. As mentioned earlier, incoming data traffic or data communicating between Azure services within the same region incur no charges. However, charges start to kick in when data is moved across different Azure regions. These charges depend on the amount of data being transmitted and on the zone from where the traffic is originating. For example, if you transfer data between regions within North America (intra-continental data transfer), you will be charged at a $0.02 per GB rate.

2023-08-28 The Hitchhiker's Guide to the Data Lake | Azure Storage

A comprehensive guide on key considerations involved in building your enterprise data lake

Share this page using https://aka.ms/adls/hitchhikersguide

Azure Data Lake Storage Gen2 (ADLS Gen2) is a highly scalable and cost-effective data lake solution for big data analytics. As we continue to work with our customers to unlock key insights out of their data using ADLS Gen2, we have identified a few key patterns and considerations that help them effectively utilize ADLS Gen2 in large scale Big Data platform architectures.

image-20231003224402864

Apache Spark Code Snippets

2023-09-30 SharedSparkContext · holdenk/spark-testing-base Wiki\

Instead of initializing SparkContext before every test case or per class you can easily get your SparkContext by extending SharedSparkContext. SharedSparkContext initializes SparkContext before all test cases and stops this context after all test cases. For Spark 2.2 and higher you can also share the SparkContext (and SparkSession if in DataFrame tests) between tests by adding override implicit def reuseContextIfPossible: Boolean = true to your test.

2023-09-30 spark-testing-base/core/src/main/2.0/scala/com/holdenkarau/spark/testing/SharedSparkContext.scala at main · holdenk/spark-testing-base

How Apache Spark works

2023-09-27 Big Data Processing in Apache Spark: Serialization - DZone

This post is organized as follows:

  • In Section 1, I briefly review Spark architecture and Spark run modes.
  • In Section 2, I review what RDD is and what operations we can do on it.
  • In Section 3, I review how Spark creates a physical plan out of a logical plan.
  • In Section 4, I demonstrate how a physical plan gets executed and where and how Spark tasks get serialized.
  • Finally, in Section 5, I summarize all these as simple rules to avoid the exception.

Apache Spark Videos

2023-09-24 Operational Tips For Deploying Apache Spark - YouTube

2023-08-28 Spark Basics Partitions - YouTube

2023-04-29 MIT 6.824 Distributed Systems (Spring 2020) - YouTube

  • MIT Distributed Systems (https://www.youtube.com/playlist?list=PLrw6a1wE39_tb2fErI4-W...) - This is a series of lectures by Robert Morris (co-founder of YC) on distributed systems and their properties. The lectures pick a specific tool/technology (Google File System, ZooKeeper, Apache Spark, etc.) and then discusses it. I've really enjoyed reading the papers and watching the lectures.

Apache Spark Articles

2023-09-05 Prudent development of Spark jobs in Scala | by Alec Lebedev | Analytics Vidhya | Medium

Good unit testing coverage

In this article we started exploring working with Spark code in Scala from the software engineering perspective. We created a source code repository in Git and configured a CI/CD pipeline for it in GitLab. We integrated the pipeline to push code coverage metrics to CodeCov.io and implemented unit and integration tests to achieve a high level of coverage. In our unit tests, we experimented with object mocking techniques. In the integration test we generated a sample data set and registered it as a table with SparkSession. We enabled Spark integration with Hive in order to allow the test to write transformed data to a Hive table backed by the local file system. In the next article we will continue this exploration by implementing a data conversion for a practical use case.

2023-08-26 Spark Partitioning & Partition Understanding - Spark By {Examples}

FREE ADS!

2023-07-05 Our journey at F5 with Apache Arrow (part 2): Adaptive Schemas and Sorting to Optimize Arrow Usage | Apache Arrow

2023-08-05 Introduction · The Internals of Apache Spark

2023-08-05 GitHub - awesome-spark/spark-gotchas: Spark Gotchas. A subjective compilation of the Apache Spark tips and tricks

2023-08-05 Azure Synapse Spark: Add Scala/Java Libraries | DUSTIN VANNOY

2023-04-29 Debugging a long-running Apache Spark application: A War Story

Security holes

2023-10-01 Lazarus luring employees with trojanized coding challenges: The case of a Spanish aerospace company

The fake recruiter contacted the victim via LinkedIn Messaging, a feature within the LinkedIn professional social networking platform, and sent two coding challenges required as part of a hiring process, which the victim downloaded and executed on a company device. The first challenge is a very basic project that displays the text “Hello, World!”, the second one prints a Fibonacci sequence – a series of numbers in which each number is the sum of the two preceding ones. ESET Research was able to reconstruct the initial access steps and analyze the toolset used by Lazarus thanks to cooperation with the affected aerospace company.

MS-Files

2023-10-02 ✨✨ 2008!!✨✨ Mini-Microsoft: Achieving Senior Level 63 at Microsoft

image-20231003170638449 Aspects of an L63 Contributor: some random aspects that come to my mind beyond our CSPs:

  • They can own a room: they aren't warming a seat but rather can take charge of a conversation and represent such a deep level of knowledge that they gain respect for what they say and earn a good reputation. Their focus stays on accountable results and this person can bring resolution and closure together.
  • Expert: They are sought after to be in meetings, for instance, so that good decisions can be made.
  • Results-focused: they are focused on getting great results and don't entwine their ego to particular solutions. They don't get defensive if their ideas are revealed to have flaws but rather delight in being able to move to a better solution.
  • Leadership: pro-active leadership that convinces team members of the future direction and even helps to implement it. This is a big difference between those who can complain about the way things should be and those you can actually bring it about.
  • Solutions, not problems: following up on the above, they aren't complaining about problems on the team but rather implementing and driving solutions.
  • Makes other great: the team benefits and grows from the person's contributions. Answers questions from the team, from support, from customers. Knows what the team delivers backwards and forwards. They are a good mentor.
  • Influence when they can, scare when they must: they have fundamental skills in influencing people, but if they need to flip into junk-yard dog mode, they can. They don't give up and walk away but rather fight when they need to fight, escalating only when needed and with lots of justification.
  • Makes the boss great: if the team and your boss are succeeding because of you, of course you'll be succeeding too.
  • Not doing it for the promotion: if you're out for a promotion, don't do work specifically chose to get the promotion. This is like meeting the Buddha on the road. If you come up with a pretty plan to justify your promotion, you've already lost it. Such plotting is obvious and actually detrimental to your career. If, however, you've determined what it takes to have a successful career in your group at Microsoft and have started what you need to start and stopped what you need to stop, then you're on the right path.

2023-10-02 Interview with an Escalation Engineer at Microsoft - YouTube

We must learn how to debug!

Seattle

2023-09-30 Unintentional Drug Overdose Data (SUDORS) | Washington State Department of Health

image-20231003175526084 2023-09-30 WA rolls out new data dashboard on fatal overdoses | The Seattle Times

Factorio research

2023-08-28 R-O-C-K-E-T/Factorio-SAT: Enhancing the Factorio experience with SAT solvers 2023-08-28 teoxoy/factorio-blueprint-editor: A feature-rich Factorio Blueprint Editor 2023-08-28 FactorioBlueprints/factorio-prints: factorioprints.com 2023-08-28 factoriolab/factoriolab: Angular-based calculator for factory games like Factorio and Dyson Sphere Program 2023-08-28 deniszholob/factorio-cheat-sheet: Cheat Sheet for Factorio

2023-08-27 Alternative Friday Factorio Fan Facts

2023-08-27 AlternativeFFFF/Alt-F4: Alternative Factorio Friday Fan Facts, also known as Alt-F4

2023-08-27 efokschaner/terraform-provider-factorio: The Terraform Provider for Factorio

2023-08-27 teoxoy/factorio-blueprint-editor: A feature-rich Factorio Blueprint Editor

2023-08-27 drewtato/factorio-css: A CSS framework to make your things look like Factorio

· 13 min read

image-20230924235054701

Prompt:

Stylized Silhouette Story: Using shadow and light, the scene showcases the silhouette of the Hulk against a moonlit night, pushing a stroller with starry patterns. Baby Yoda, emitting a soft, magical glow, looks up with the cutest, roundest eyes, casting a warm light that draws enchanted creatures closer.

Good reads

2023-09-24 7 simple habits of the top 1% of engineers

Found in 2023-09-24 Programming Digest

  1. Engineering over Coding
    • Writing code is a means to an end, a creative pursuit aimed at solving problems for humans.
    • Outstanding engineers focus on products and solutions, maintaining a mindset oriented towards the end-users.
  2. Human-Centric Code
    • Code should be written for humans—team members and users—ensuring it's understandable and maintains value to all audiences.
    • Engineers should be detached from the code, valuing change delivery over perfection and acknowledging the transient nature of code.
  3. Consistency and Simplicity
    • Maintaining consistent coding standards and style is crucial for scalability and readability.
    • Writing simple, clean, organized, and logical code, even if complex to produce, ensures the code is aesthetically pleasing and understandable.
  4. Predictability and Testing
    • Code should not produce surprises and should be predictable through following principles and proper testing.
    • Various tests from unit to end-to-end tests ensure functionality and provide confidence in code modifications.
  5. Communication
    • Collaboration and frequent communication are essential, allowing for design reviews, feedback, and iterations on initial designs to achieve better results.
  6. Balanced Pacing and Mindful Rule Adherence
    • Efficient engineering involves a balanced approach to coding speed, applying principles meticulously to avoid setbacks.
    • Not all coding situations conform to established rules and principles; mindful deviations, properly documented, are necessary, maintaining code that is consistent, clean, understandable, testable, and valuable.
  7. Domain Expertise and Visibility
    • Exceptional engineers often have deep knowledge in at least one field and are known for their expertise and value within their teams, achieved through strategic self-marketing and involvement in high-impact projects.

2023-09-23 It's okay to Make Something Nobody Wants

Products reflect the creator's emotions, often resonating more deeply with users when born from genuine interest. True innovation stems from authentic self-expression rather than merely anticipating user needs.

2023-09-01 🍒 How to Speak Up About Ethical Issues at Work

“A better place to start would be to ask questions instead of making assertions,” Detert explains. Use phrases like: “Can you help me understand…” or “Can you help me see why you’re not worried…” Detert points to two reasons why this approach works. First, he says, “there’s a possibility that the person isn’t aware they’re doing something wrong and your questioning might allow them to see the problem.” Second, asking questions is “a reasonably safe way to determine if the target is going to be open to discussing this issue or whether you need to pursue another avenue.”

Principles to Remember Do:

  • Seek to understand your colleague’s perspective ­— why is she acting the way she is?
  • Consider the benefits of speaking up against the potential consequences
  • Rehearse what you’re going to say before calling out unethical behavior

Don’t:

  • Rationalize the behavior just because you’re afraid of having a tough conversation
  • Go straight to your boss or HR unless the situation is severe ­— try talking directly to your colleague first
  • Make moral accusations ­— ask questions and treat the initial conversation as information-gathering

___ Funny good reads

2023-09-24 🥨 How to do a full rewrite - by David Tate

When you work on a software system that:

  • has existed for a long time and is making money
  • is stable but has an architecture that you didn’t come up with
  • is using older technologies that aren’t as attractive

2023-09-24 How to design a system that never works, that you can't be blamed for 2023-09-24 How to write a post-mortem that always blames Terry

  • *Why? —* A manual script was run to remove one account, but all accounts were removed.
  • *Why? —* Because Terry had an error in his script, the WHERE clause was commented out.
  • Why? — While Terry was working on the script, someone interrupted him and started scolding him in front of everybody.
  • *Why? —* He messed up another data script earlier that week, and QA found the error and escalated it to a manager.
  • Why? — People make mistakes, and Terry puts up with being scolded.
  • Why? — He thinks he deserves it.
  • *Why? —* His relationship with his mother robbed him of belief in his own power and agency.
  • *Why? —* Children are very receptive to negative feedback between ages 5 to 13, and parents, through exhaustion, impatience, or anger, can accidentally cause a child to think that something is fundamentally wrong with themselves.
  • Why? — When we are small, it is much easier to think of ourselves as weak than that those who care for and protect us are weak.
  • Root Cause: Terry has not dealt with his emotional trauma and doesn’t really know who he is.

2023-09-25 Death by a thousand microservices

image-20230924234324990

  • Complexity kills: software industry is suffering from a culture of over-engineering and unnecessary complexity, especially with the widespread adoption of microservices and distributed systems. It claims that most companies do not need such architectures and would benefit from simpler, monolithic solutions that are easier to develop, test, and maintain.
  • Context matters: blindly following the practices of large tech companies like Google or Amazon, which have very different problems and resources than most startups. It suggests that developers should focus on solving the actual problem at hand, rather than imitating what they think is “web scale” or “cutting edge”.
  • Trade-offs exist: there are advantages and disadvantages to any design choice, and that there is no silver bullet for software engineering. It urges developers to be aware of the costs and benefits of microservices, such as increased boilerplate,

Good views!

2023-09-24 Full Resolution Photo Archive - Aurel Manea

I have decided to make my photos available in full resolution for free. You can download the archive from here

image-20230924232837203

Beautiful even in 16 colors! (cannot do full color, the style...)

Okay, just this one:

image-20230924233016843

2023-09-15 Akiyoshi's illusion pages

image-20230924234917997

Fun

2023-09-08 Sound Effects Soundboard - Instant Sound Buttons | Myinstants

Fart sounds!

image-20230925000348511

Clippy research

2023-09-02 📢 Fuco1/clippy.el: Show tooltip with function documentation at point

image-20230925001632838

2023-09-02 EsotericSoftware/clippy: Multifunctional Windows productivity tool for programmers and other power users

Just the name! Clippy is a small, multifunctional Windows productivity tool for programmers and other power users. Clippy runs in the background and provides a powerful clipboard history, easy uploading of screenshots, files, and text, and optional features to improve your health when using a computer for long periods of time.

2023-09-02 walaura/vs-code-clippy: It's clippy! on VS Code!

image-20230925001905655

2023-09-02 tanathos/ClippyVS: The legend is back, in Visual Studio!

2023-09-02 FireCubeStudios/Clippy: Bring back Clippy on Windows 10/11!

Clippy by FireCube (Not by Microsoft) brings back the infamous Clippit into your desktop powered by the OpenAI GPT 3.5 model (OpenAI key required as of this version).

Clippy can be pinned to the screen for quick access to chat or just be left for nostalgia.

image-20230925002027669

2023-09-02 citizenmatt/resharper-clippy: Clippy. For ReSharper

2023-09-02 Cosmo/Clippy: 📎💬🎉 Clippy from Microsoft Office is back and runs on macOS! Written in Swift.

Software Design

2023-09-20 🐇 RabbitMQ vs. Kafka - An Architect's Dilemma (Part 1) - Eran Stiller

image-20230924233732091

Chrome Extensions

2023-09-22 guocaoyi/create-chrome-ext

🍺 Scaffolding your Chrome extension! Boilerplates: react \ vue \ svelte \ solid \ preact \ alpine \ lit \ stencil \ inferno \ vanilla

Apps

2023-09-21 Organic Maps: An Open-Source Maps App That Doesn't Suck

Can't tell much, still trying

Projects

2023-09-13 Interactive map of Linux kernel

image-20230924235558186

2023-09-09 LogoScale - A Method for Vectorizing Small, Crappy Logos

image-20230925000212450

2023-09-02 Show HN: XRss: An RSS Reader and web stack demo powered by Htmx

image-20230925001202053

2023-09-02 Animated Knots by Grog | Learn how to tie knots with step-by-step animation

image-20230925001321834

image-20230925001410061

Retro

2023-09-10 Amiga C Tutorial upd. 2022

image-20230924235952968

2023-09-07 ZX Origins » DamienG

ZX Spectrum fonts

image-20230925000525955

2023-08-22 The History of Windows 2.0 - by Bradford Morgan White

image-20230925002836678

The Era of AI

2023-09-25 A Hackers' Guide to Language Models - YouTube

Explains how LLM work

2023-09-01 Teaching with AI

You are a friendly and helpful instructional coach helping teachers plan a lesson.

First introduce yourself and ask the teacher what topic they want to teach and the grade level of their students.

Wait for the teacher to respond. Do not move on until the teacher responds.

2023-08-27 Normcore LLM Reads

Anti-hype LLM reading list Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts and experience preferred (super rare at this point).

image-20230925002621805

Typescript

2023-09-17 CRM from scratch with Bun and Typescript - Ep 001 - Columns Layout - YouTube

image-20230924234456070

C#

2023-09-07 💡 LINQ to SQL cheat sheet » DamienG

2009

https://download.damieng.com/dotnet/LINQToSQLCheatSheet.pdf

Old, but not obsolete, nicely made cheat sheet

image-20230925000723983

C and C++ and Performance

2023-09-15 hanickadot/compile-time-regular-expressions: Compile Time Regular Expression in C++

Fast compile-time regular expressions with support for matching/searching/capturing during compile-time or runtime.

You can use the single header version from directory single-header. This header can be regenerated with make single-header. If you are using cmake, you can add this directory as subdirectory and link to target ctre.

ctre::match<"REGEX">(subject); // C++20
"REGEX"_ctre.match(subject); // C++17 + N3599 extension
  • Matching
  • Searching (search or starts_with)
  • Capturing content (named captures are supported too)
  • Back-Reference (\g{N} syntax, and \1...\9 syntax too)
  • Multiline support (with multi_) functions
  • Unicode properties and UTF-8 support

2023-09-25 Parsing integers quickly with AVX-512 – Daniel Lemire's blog

If I give a programmer a string such as "9223372036854775808" and I ask them to convert it to an integer, they might do the following in C++:

std::string s = ....
uint64_t val;
auto [ptr, ec] =
std::from_chars(s.data(), s.data() + s.size(), val);
if (ec != std::errc()) {} // I have an error !
// val holds the value

It is very fast: you can parse a sequence of random 32-bit integers at about 40 cycles per integer, using about 128 instructions.

Can you do better?

auto DIGIT_VALUE_BASE10_8BIT =
_mm256_set_epi8(1, 10, 1, 10, 1, 10, 1, 10,
1, 10, 1, 10, 1, 10, 1, 10,
1, 10, 1, 10, 1, 10, 1, 10,
1, 10, 1, 10, 1, 10, 1, 10);
auto DIGIT_VALUE_BASE10E2_8BIT = _mm_set_epi8(
1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100);
auto DIGIT_VALUE_BASE10E4_16BIT =
_mm_set_epi16(1, 10000, 1, 10000, 1, 10000, 1, 10000);
auto base10e2_16bit =
_mm256_maddubs_epi16(base10_8bit, DIGIT_VALUE_BASE10_8BIT);
auto base10e2_8bit = _mm256_cvtepi16_epi8(base10e2_16bit);
auto base10e4_16bit =
_mm_maddubs_epi16(base10e2_8bit, DIGIT_VALUE_BASE10E2_8BIT);
auto base10e8_32bit =
_mm_madd_epi16(base10e4_16bit, DIGIT_VALUE_BASE10E4_16BIT);
AVX-5121.8 GB/s57 instructions/number17 cycles/number
std::from_chars0.8 GB/s128 instructions/number39 cycles/number

2023-09-16 Formatting Text in C++: The Old and The New Ways

image-20230924234733422

2023-09-13 Integrating C++ header units into Office using MSVC (2/n) - C++ Team Blog

The blog post describes the progress and challenges of integrating header units, a C++23 feature, into the Office codebase. Header units are a standardized replacement for precompiled headers (PCH) that can improve build performance and modularity.

The coolest thing is Microsoft has C++ blog! Wow!

2023-09-13 📶 C++ Team Blog

image-20230924235830000

OAuth2 - Playground research

2023-05-18 OAuth 2.0 basics - Playground | MSS Architecture

image-20230924231346905

2023-05-18 nbarbettini/oidc-debugger: OAuth 2.0 and OpenID Connect debugging tool

Videos

2023-09-21 TypeScript Origins: The Documentary - YouTube

You know you’ve made it when you get your own documentary! This has just dropped but is well produced, packed with stories from TypeScript’s co-creators, users, and other folks at Microsoft, and kept me entertained. It goes particularly deep into the motivations and process behind TypeScript's creation, including why Microsoft felt it was worth pursuing at all. OFFERZEN ORIGINS

from 📧 JavaScript Weekly Issue 655: September 21, 2023 image-20230924233411652

2023-09-25 Don’t Build a Distributed Monolith - Jonathan "J." Tower - NDC London 2023 - YouTube

Good talk, monoliths are also scalable, also:

Smallest possible microservices without chatty communication between services

image-20230924231928978

· 11 min read

Good Reads

2023-08-13 Moving faster

From 2023-08-13 Programming Digest

A list of tools that help to work faster. The caveat here is that you need to spend a lot of time learning and mastering the tools; only then will the tools help you. It is a gradual everyday process rather than one-day learning.

  • Keyboard Shortcuts: Learning the keyboard shortcuts for your favorite IDE or editor, as well as for your operating system, can significantly speed up your workflow. These become automatic over time, allowing you to perform complex actions without thinking.

  • Code Syntax: Familiarity with the syntax of the language you're working in makes writing code a lot smoother. It becomes a low-level skill when you no longer have to think about the basic structure of loops, conditionals, etc., and can focus on the logic you're implementing.

  • Testing Frameworks: If you're using automated testing (and you should be), learning your testing framework inside and out enables you to quickly write and run tests without having to stop and think about how to do it. This enhances your ability to perform TDD (Test Driven Development) or other testing methodologies without a hitch.

  • Debugging Techniques: Understanding the ins and outs of your debugging tools and how to quickly diagnose common problems in your code can become a low-level skill. Knowing how to efficiently use breakpoints, inspect variables, and utilize other debugging features saves a lot of time.

  • Git Commands: If you're using Git or a similar version control system, becoming fluent in common commands enables you to manage your codebase efficiently. Committing, branching, merging, and resolving conflicts can become automatic processes.

  • Touch Typing: This is a fundamental skill for any professional who spends a significant amount of time on a computer. Being able to type without looking at the keys allows your thoughts to flow directly onto the screen, greatly enhancing your efficiency.

  • Use of Snippets and Templates: Many editors and IDEs allow you to define snippets or templates for code that you write frequently. This could be something as simple as the boilerplate for a class definition or as complex as a full file template. Being adept at using these can save a lot of time and effort.

  • Build Tools and Automation: Understanding how to automate repetitive tasks using build tools, scripts, and other automation techniques is a vital low-level skill. It allows you to focus on the higher-level aspects of your work, knowing that the lower-level tasks are handled efficiently.

By turning these into automatic processes, you free up cognitive resources to focus on higher-level problem-solving and decision-making. It can be highly beneficial to invest the time and effort into mastering these low-level skills, as they'll pay off in the long run by enhancing your efficiency, reducing mistakes, and allowing you to produce better-quality code more quickly.

A good practice for developing these skills is to identify areas where you feel you are slowing down or getting stuck frequently and deliberately practice those specific tasks until they become second nature. Whether it's through deliberate practice, reading documentation, or seeking tutorials and guidance, investing in these low-level skills will have long-lasting benefits in your coding career.

2023-08-08 Articles For Beginning Cyclists 🚴🚵🚵‍♀️🚵‍♂️

Everything You Wanted To Know About Shifting Your Bicycle's Gears, But Were Afraid To Ask. This is an introduction to gear shifting, and the basics of how a derailer works. How, why and when to shift gears.

image-20230813232537463

2023-08-09 Jared Ramsey - the last 1%

So what's in this last 1%? Here are some of the most frequently skipped things I've seen:

  • Internal (maintenance) documentation
  • External (how-to/FAQ) documentation
  • Performance metric instrumentation
  • Easy-to-decipher performance metric dashboard
  • Usage metric instrumentation
  • Easy-to-decipher usage metric dashboard
  • Error metric instrumentation
  • Easy-to-decipher error metric dashboard
  • Alerting
  • Automated testing

2023-08-08 Some tactics for writing in public

  1. Talk About Facts: By focusing on facts, especially those related to your expertise, you can elicit more productive, fact-based comments.
  2. Share Stories: Sharing personal experiences or stories can encourage relatable and constructive discussions.
  3. Ask Technical Questions: Asking specific questions invites people to contribute and answer, fostering a more engaging and informative conversation.
  4. Fix Mistakes: Being willing to correct mistakes and update content shows humility and a dedication to accurate information.
  5. Ask for Examples/Experiences, Not Opinions: By seeking experiences rather than mere opinions, you can drive more useful dialogue.
  6. Start with Context: Providing context helps readers understand your perspective and relate to the content.
  7. Avoid Boring Conversations: Steering clear of repetitive or uninteresting topics keeps the conversation fresh and engaging.
  8. Preempt Common Suggestions: Acknowledging potential alternative solutions or explaining choices preemptively can prevent repetitive suggestions.
  9. Set Boundaries: By drawing a line on what is acceptable behavior, you can create a more respectful and enjoyable environment for dialogue.
  10. Don't Argue: Recognizing when to avoid fruitless arguments conserves energy and maintains focus on constructive conversations.
  11. Analyze Negative Comments: Instead of dismissing negative feedback outright, seeking to understand and learn from it can turn it into a valuable resource.
  12. Embrace Your Feelings: Lastly, acknowledging your emotional reactions to comments and learning how to manage them helps to maintain a balanced approach to online interactions.

How the things work

2023-08-14 Consistency Patterns - System Design

Consistency Models in Distributed Systems

The target audience for this article falls into the following roles:

Tech workers Students Engineering managers The prerequisite to reading this article is fundamental knowledge of system design components. This article does not cover an in-depth guide on individual system design components.

Disclaimer: The system design questions are subjective. This article is written based on the research I have done on the topic and might differ from real-world implementations. Feel free to share your feedback and ask questions in the comments. Some of the linked resources are affiliates. As an Amazon Associate, I earn from qualifying purchases.

image-20230813234704955

Fun

2023-08-09 LCD, Please by dukope online game; 10 years Papers, please!

image-20230813233201552

Books

2023-08-13 Book Make JS Games

We walk you through the process of making games with the Kaboom.js library. By the end you will have:

Significantly improved your game making skills.

Some fun games to play and showcase.

You can read each tutorial online or one-click download an ebook of the entire collection.

image-20230813230853788

C++

2023-08-14 Performance Ninja -- Data Packing Intro - YouTube

2023-08-14 GitHub - dendibakh/perf-ninja: This is an online course where you can learn and master the skill of low-level performance analysis and tuning.

2023-08-14 GitHub - dendibakh/perf-book: The book "Performance Analysis and Tuning on Modern CPU"

Performance Ninja Class This is an online course where you can learn to find and fix low-level performance issues, for example CPU cache misses and branch mispredictions. It's all about practice. So we offer you this course in a form of lab assignments and youtube videos. You will spend at least 90% of the time analyzing performance of the code and trying to improve it.

image-20230813230433926

C++ Optimization

2023-08-06 CPP How branches influence the performance of your code and what can you do about it? - Johnny's Software Lab

from 2023-08-06 Programming Digest - A newsletter about programming and technology

2023-08-07 CPP Crash course introduction to parallelism: SIMD Parallelism - Johnny's Software Lab

2023-08-07 CPP Make your programs run faster by better using the data cache - Johnny's Software Lab

2023-08-07 CPP Bit Twiddling Hacks

Conditionally set or clear bits without branching
bool f; // conditional flag
unsigned int m; // the bit mask
unsigned int w; // the word to modify: if (f) w |= m; else w &= ~m;

w ^= (-f ^ w) & m;

// OR, for superscalar CPUs:
w = (w & ~m) | (-f & m);

C++ Talks

2023-08-09 Calendrical C++: std::chrono, History, Mathematics and the Computus - Ben Deane - CppNow 2023 - YouTube

This talk is about weird stuff in the history of calendars. Very fun!

image-20230813231852057

See also:

C#

2023-08-09 Frugal Cafe

Performance optimization in C#

image-20230813232729502

Projects

2023-08-08 diogocapela/flatdraw: A simple canvas drawing web app with responsive UI. Made with TypeScript, React, and Next.js.

2023-08-08 Flatdraw — Simple Canvas Drawing App

image-20230813233516763

2023-08-06 My Favorite Vim Oneliners For Text Manipulation | Muhammad

image-20230813233702041

Mental Health

2023-08-06 PowerShell Summit 2023: Your Code is Flawless, But How YOU doing? by Dave Carroll Andrew Pla - YouTube

Wow, very unexpected talk about more mental health... and Powershell... This is important.

image-20230813234128526

OAuth2 Corner

Philippe De Ryck:

In the context of authentication and authorization, these acronyms refer to specific standards and protocols. Here's an overview:

  1. JAR (JWT-Secured Authorization Request):

    • Description: JAR is a method to secure OAuth 2.0 authorization requests using JWT (JSON Web Tokens). This allows the client to send requests in a way that ensures integrity and possibly confidentiality of the authorization request parameters.
    • Use: It's used to protect the content of the authorization request, thus increasing the security of the OAuth 2.0 flow.
  2. PAR (Pushed Authorization Request):

    • Description: PAR enables the client to request authorization from the authorization server without exposing the parameters to the end-user's user-agent. It essentially allows the parameters to be sent directly to the authorization server, returning a URL that the user-agent can be redirected to.
    • Use: This enhances the security of the OAuth 2.0 authorization process by reducing exposure of sensitive parameters to possibly malicious user-agents or intermediaries.
  3. RAR (Rich Authorization Requests):

    • Description: RAR is an extension to OAuth 2.0 that provides a way for clients to convey a fine-grained authorization request, using a structured format, both for scope and other authorization parameters.
    • Use: This allows for a more detailed and flexible authorization request, suitable for various complex use cases that require more than the basic scopes.
  4. FAPI2 (Financial-grade API Part 2 - Advanced Financial-grade API):

    • Description: FAPI2 is a set of security profiles for OAuth 2.0 and OpenID Connect, designed for high-risk scenarios like financial services and payments. It specifies various security requirements and recommendations to ensure that the authorization process is highly secure.
    • Use: It's used to provide robust security measures specifically for financial APIs, where high levels of security are needed.

In summary, these terms are all related to enhancing and extending the security and functionality of the OAuth 2.0 protocol, particularly in scenarios that require high levels of security, such as in financial services.

2023-08-06 OAuth and the long way to Proof of Possession - Dominick Baier & Steinar Noem - NDC Security 2023 - YouTube

2023-08-06 Securing SPAs and Blazor Applications using the BFF (Backend for Frontend) Pattern - Dominick Baier - YouTube

2023-08-06 YARP Documentation We found a bunch of internal teams at Microsoft who were either building a reverse proxy for their service or had been asking about APIs and tech for building one, so we decided to get them all together to work on a common solution, this project. Each of these projects was doing something slightly off the beaten path which meant they were not well served by existing proxies, and customization of those proxies had a high cost and ongoing maintenance considerations.

· 10 min read

A cat image for no reason!

Hey, Roma, thank you again for suggesting an idea!

An impressively detailed image shows a plump, anthropomorphized cat, realistically depicted. Casually attired for work, it calmly sips coffee amidst a roaring house fire. The stark contrast between its fluffy cuteness, casual attire and the engulfing flames creates an unnerving sense of tranquility.

image-20230805032403079

Good reads

2023-08-05 Fast machines, slow machines - Julio Merino (jmmv.dev)

Modern computers can feel slower due to increased complexity of software, additional features, layers of abstraction, graphically intensive interfaces, background tasks, and certain optimization choices. While newer systems are undoubtedly more powerful, they're also burdened with many more tasks and demands compared to older systems. Your comparison videos have sparked a crucial discussion about performance versus features in our technology.

image-20230805030347086

Work, Life, and Balance?

2023-08-05 Dark Side of Remote Work – Personal Experience - DEV Community

The author, a remote junior Javascript developer, shares her struggles with remote work. Despite the appeal of flexibility, she faced challenges including the reality of spending all day at home, the loneliness that resulted from missing office interactions, and mental exhaustion from a lack of routine and breaks. The continuous focus on work led to near burnout, making her consider a hybrid work model that combines remote work with office days for better work-life balance and social interaction.

image-20230805023016638

2023-08-05 How 22-Year-Old Gets Away With Making $144k Working 2 Full-Time Remote Jobs

Jason, a 22-year-old software engineer, found himself able to complete his full-time remote work in 10-15 hours per week. Capitalizing on the time he had left, he decided to take a second full-time remote software engineering role, nearly doubling his annual income to $144,000. Jason is part of a subset of remote workers who manage multiple full-time jobs, a strategy growing due to high inflation. He shares five strategies to maintain both roles without being discovered:

  1. Overestimation of task completion times to manage workload.
  2. Avoiding overperformance to evade extra attention and tasks.
  3. Spending less time on tasks where feasible.
  4. Turning down additional projects when needed.
  5. Keeping colleagues informed of delays caused by others.

image-20230805023339183

2023-08-05 Productivity - Sam Altman

Productivity and Growth: The writer emphasizes the power of compounded productivity growth in careers and the importance of optimizing productivity. Small gains can yield massive compounded differences over a long-term.

What You Work On: Choosing the right direction for one's efforts is essential. It involves independent thought and conviction in one's beliefs. The author suggests allocating time to think about this, engage with stimulating material/people, and avoid working on tasks that don't resonate with you. Delegation is vital, and it should be based on people's preferences and skills. The author underscores the need to seek job satisfaction and enjoy your work for increased productivity.

Prioritization and Time Management: The author uses three pillars for his productivity: "Getting important tasks done", "Avoiding wasteful activities", and "Making lots of lists". He prefers written lists to stay focused and flexible, not categorizing or sizing tasks but highlighting important items. He uses momentum in prioritization, is relentless about important projects, and advocates being ruthless in saying 'no' to non-critical tasks. He avoids meetings and schedules them to be short or long, according to their nature. He has different times of day for different tasks, with early morning as the most productive time.

Physical Factors: The author highlights sleep, exercise, and nutrition as key physical factors impacting productivity. He uses specific sleep aids and has a meticulous sleep routine. Regular exercise, particularly weight-lifting and high-intensity interval training, boosts productivity. In nutrition, he avoids breakfast and sugar, consumes moderate caffeine, and supplements his vegetarian diet with specific vitamins and minerals.

Work Environment and Other Factors: The author prefers a workspace with natural light, quiet, free from interruptions, and provides for long blocks of time. He has written custom software for frequent tasks and mastered typing and keyboard shortcuts. Periods of low motivation are recognized as inevitable and weathered patiently. He recommends a slight overcommitment to push efficiency but warns against excessive overcommitting. He underlines the importance of not neglecting personal relationships and hobbies for productivity, and he repeatedly emphasizes the importance of choosing the right work focus.

2023-08-05 Team management tips: 10 ways to kill a team

This article covers detrimental practices in team management, including:

  1. Ignoring Team Input: Dictatorial leadership can lead to demotivation. As a leader, listening to your team's input is essential for collective action.

  2. Lack of Empathy: Not being able to understand and share the feelings of your team can ruin a positive work environment.

  3. Setting Unrealistic Deadlines: Too much pressure can lead to burnout or resignations. Deadlines must be realistic and incorporate team input.

  4. Unclear Goals: Teams without clear objectives become demotivated. As a leader, you need to set specific, measurable, achievable, relevant, and time-bound (SMART) goals.

  5. Not Tracking Progress: Teams need to regularly review their KPIs for efficient operation and continuous improvement.

  6. Resisting Innovation: Teams that fail to innovate can become obsolete. Regularly reviewing processes and encouraging innovation is essential.

  7. Ignoring the Bus Factor: Important knowledge within a team should always be shared among at least two persons to mitigate risk.

  8. Poor Communication: Teams need effective communication within themselves and with the rest of the organization for effective functioning.

  9. Creating Isolated Teams: A team should work together and not as separate individuals, promoting self-organization rather than control.

  10. Micro-management: Constantly controlling every aspect of the team's work stifles creativity and motivation, and undermines productivity.

These practices are damaging for team morale and productivity and should be avoided for a healthy, efficient team environment.

image-20230805031629096

Fun

2023-08-05 The Guild - Do You Wanna Date My Avatar - YouTube

Mini tv-show

Thank you, Roma!

image-20230805031827016

2023-08-05 The Guild - YouTube

image-20230805031929888

Do you wanna date my avatar?

2023-08-05 MyHouse.WAD - Inside Doom's Most Terrifying Mod - YouTube

image-20230805024213765

image-20230805024244608

2023-08-05 The Password Game

image-20230805025612563

The Era of AI

2023-08-05 ChatGPT Cheat Sheet for Developers | 40 Best Prompts

image-20230805030927773

In this article

JavaScript

2023-08-05 The Modern JavaScript Tutorial

image-20230805024351178

CSS

2023-08-05 CSS Pattern: Fancy backgrounds with CSS gradients

CSS Patterns! Very cool

image-20230805032157669

C#

2023-08-05 Back to Basics: Efficient Async and Await - Filip Ekberg - NDC Oslo 2023 - YouTube

Tasks / async / await

image-20230805030554437

C language

2023-08-05 Structures in C: From Basics to Memory Alignment – Abstract Expression

Structures allow us to combine several variables to create a new data type. Some other languages support the same concept but call it “records”. If you come from object-oriented programming you can think about them as classes without methods.

Declaration

A structure is declared by the keyword struct followed by the name of the new structure and a list of its members enclosed in parentheses:

struct s {
char a;
int b;
double c;
char d[10];
};

Here we declared a new structure with the name s that has the members a (a single character), b (an integer), c (a double), and d (a char array of size 10 which can store up to 9 characters and a terminating null character).

image-20230805025906714

Algorithms

2023-08-05 GitHub - jetpack-io/typeid: Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs

A type-safe, K-sortable, globally unique identifier inspired by Stripe IDsTypeIDs are a modern, type-safe extension of UUIDv7. Inspired by a similar use of prefixes in Stripe's APIs.

TypeIDs are canonically encoded as lowercase strings consisting of three parts:

  1. A type prefix (at most 63 characters in all lowercase ASCII [a-z])
  2. An underscore '_' separator
  3. A 128-bit UUIDv7 encoded as a 26-character string using a modified base32 encoding.

Here's an example of a TypeID of type user:

  user_2x4y6z8a0b1c2d3e4f5g6h7j8k
└──┘ └────────────────────────┘
type uuid suffix (base32)

A formal specification defines the encoding in more detail.

Projects

2023-08-05 GitHub - imgly/background-removal-js: Remove backgrounds from images directly in the browser environment with ease and no additional costs or privacy concerns. Explore an interactive demo.

@imgly/background-removal is a powerful npm package that allows developers to seamlessly remove the background from images directly in the browser. With its unique features and capabilities, this package offers an innovative and cost-effective solution for background removal tasks without compromising data privacy.

The key features of @imgly/background-removal are:

  • In-Browser Background Removal: Our one-of-a-kind solution performs the entire background removal process directly in the user's browser, eliminating the need for additional server costs. By leveraging the computing power of the local device, users can enjoy a fast and efficient background removal process.
  • Data Protection: As @imgly/background-removal runs entirely in the browser, users can have peace of mind knowing that their images and sensitive information remain secure within their own devices. With no data transfers to external servers, data privacy concerns are effectively mitigated.
  • Seamless Integration with IMG.LY's CE.SDK: @imgly/background-removal provides seamless integration with IMG.LY's CE.SDK, allowing developers to easily incorporate powerful in-browser image matting and background removal capabilities into their projects.

The Neural Network (ONNX model) and WASM files used by @imgly/background-removal are hosted on UNPKG, making it readily available for download to all users of the library. See the section Custom Asset Serving if you want to host data on your own servers.

image-20230805025502965

Time and Space

2023-08-05 Factories in Space - Making products for Earth and space

I know, I've posted it already, but it is so cool!

image-20230805024504065

image-20230805024533836

2023-08-05 GitHub - arwes/arwes: Futuristic Sci-Fi UI Web Framework.

image-20230805025005303

2023-08-05 Dark Galaxies

image-20230805025059026

· 16 min read

Books

2023-08-05 Distributed systems for fun and profit

I wanted a text that would bring together the ideas behind many of the more recent distributed systems - systems such as Amazon's Dynamo, Google's BigTable and MapReduce, Apache's Hadoop and so on.

In this text I've tried to provide a more accessible introduction to distributed systems. To me, that means two things: introducing the key concepts that you will need in order to have a good time reading more serious texts, and providing a narrative that covers things in enough detail that you get a gist of what's going on without getting stuck on details. It's 2013, you've got the Internet, and you can selectively read more about the topics you find most interesting.

In my view, much of distributed programming is about dealing with the implications of two consequences of distribution:

  • that information travels at the speed of light
  • that independent things fail independently*

In other words, that the core of distributed programming is dealing with distance (duh!) and having more than one thing (duh!). These constraints define a space of possible system designs, and my hope is that after reading this you'll have a better sense of how distance, time and consistency models interact.

This text is focused on distributed programming and systems concepts you'll need to understand commercial systems in the data center. It would be madness to attempt to cover everything. You'll learn many key protocols and algorithms (covering, for example, many of the most cited papers in the discipline), including some new exciting ways to look at eventual consistency that haven't still made it into college textbooks - such as CRDTs and the CALM theorem.

I hope you like it! If you want to say thanks, follow me on Github (or Twitter). And if you spot an error, file a pull request on Github.

The first chapter covers distributed systems at a high level by introducing a number of important terms and concepts. It covers high level goals, such as scalability, availability, performance, latency and fault tolerance; how those are hard to achieve, and how abstractions and models as well as partitioning and replication come into play.

The second chapter dives deeper into abstractions and impossibility results. It starts with a Nietzsche quote, and then introduces system models and the many assumptions that are made in a typical system model. It then discusses the CAP theorem and summarizes the FLP impossibility result. It then turns to the implications of the CAP theorem, one of which is that one ought to explore other consistency models. A number of consistency models are then discussed.

A big part of understanding distributed systems is about understanding time and order. To the extent that we fail to understand and model time, our systems will fail. The third chapter discusses time and order, and clocks as well as the various uses of time, order and clocks (such as vector clocks and failure detectors).

image-20230805003412230

2023-08-05 Book Data-Oriented Design Richard Fabian

Online release of Data-Oriented Design : This is the free, online, reduced version. Some inessential chapters are excluded from this version, but in the spirit of this being an education resource, the essentials are present for anyone wanting to learn about data-oriented design. Expect some odd formatting and some broken images and listings as this is auto generated and the Latex to html converters available are not perfect. If the source code listing is broken, you should be able to find the referenced source on github. If you like what you read here, consider purchasing the real paper book from here, as not only will it look a lot better, but it will help keep this version online for those who cannot afford to buy it. image-20230805004022297

DOD

Good Reads

2023-07-08 Falsehoods programmers believe about addresses

Addressing is a fertile ground for incorrect assumptions, because everyone's used to dealing with addresses and 99% of the time they seem so simple. Below are some incorrect assumptions I've seen made, or made myself, or had reported to me. (If you want to look up an address for a UK postcode or vice-versa to confirm what I'm telling you, try the Royal Mail Postcode Finder)

An address will start with, or at least include, a building number.

Counterexample: Royal Opera House, Covent Garden, London, WC2E 9DD, United Kingdom.

When there is a building number, it will be all-numeric.

Counterexample: 1A Egmont Road, Middlesbrough, TS4 2HT

4-5 Bonhill Street, London, EC2A 4BX

No buildings are numbered zero

Counterexample: 0 Egmont Road, Middlesbrough, TS4 2HT

Well, at the very least no buildings have negative numbers

Guy Chisholm provided this counterexample: Minusone Priory Road, Newbury, RG14 7QS

(none of the databases I've checked render this as -1)

image-20230805004916634

Fun

2023-08-05 WORDWARD DRAW by Daniel Linssen

image-20230805002810247

Retro

2023-08-05 GitHub - grassmunk/Chicago95: A rendition of everyone's favorite 1995 Microsoft operating system for Linux. Linux

XFCE / Xubuntu Windows 95 Total Conversion

image-20230804235415730

Click here for more screenshots

I was unhappy with the various XFCE/GTK2/GTK3 Windows 95 based themes and decided to make one that was more consistent across the board for theming.

Included in this theme:

  • Icons to complete the icon theme started with Classic95
  • GTK2 and GTK3 themes
  • Edited Redmond XFWM theme to more accurately reflect Windows 95
  • Chicago95 Plus! A tool to preview and install Windows 95/98/ME/XP themes
  • Plymouth theme created from scratch
  • An MS-DOS inspired theme for oh-my-zsh
  • Partial support for HiDPI monitors
  • Partial icon theme for LibreOffice 6+

Requirements:

  • GTK+ 3.22 or 3.24
  • Xfce 4.12, 4.14, 4.16
  • gtk2-engines-pixbuf (Recommended for GTK2 applications)
  • The xfce4-panel-profiles package
  • A Window compositor

Maps

2023-08-05 overpass turbo

Allows to query OpenStreetMap

image-20230804235952243

[out:json];
// Define the area of interest using a predefined area for Seattle.
area["name"="Seattle"]->.seattle;

// Search for nodes tagged as public restrooms within the Seattle area
node(area.seattle)[amenity=toilets];

// Output the results
out;

The Era of AI

2023-07-25 A comprehensive guide to running Llama 2 locally - Replicate – Replicate

2023-07-22 Highly Efficient Prompt for Summarizing — GPT-4 : r/ChatGPTPro

As a professional summarizer, create a concise and comprehensive summary of the provided text, be it an article, post, conversation, or passage, while adhering to these guidelines:

  1. Craft a summary that is detailed, thorough, in-depth, and complex, while maintaining clarity and conciseness.
  2. Incorporate main ideas and essential information, eliminating extraneous language and focusing on critical aspects.
  3. Rely strictly on the provided text, without including external information.
  4. Format the summary in paragraph form for easy understanding.
  5. Conclude your notes with [End of Notes, Message #X] to indicate completion, where "X" represents the total number of messages that I have sent. In other words, include a message counter where you start with #1 and add 1 to the message counter every time I send a message.

By following this optimized prompt, you will generate an effective summary that encapsulates the essence of the given text in a clear, concise, and reader-friendly manner.

2023-07-17 yokoffing/ChatGPT-Prompts: ChatGPT and Bing AI prompt curation

2023-07-17 f/awesome-chatgpt-prompts: This repo includes ChatGPT prompt curation to use ChatGPT better.

2023-07-15 JushBJJ/Mr.-Ranedeer-AI-Tutor: A GPT-4 AI Tutor Prompt for customizable personalized learning experiences.

Unlock the potential of GPT-4 with Mr. Ranedeer AI Tutor, a customizable prompt that delivers personalized learning experiences for users with diverse needs and interests.

2023-07-05 How Coders Can Survive—and Thrive—in a ChatGPT World - IEEE Spectrum

// I am testing GPT summary prompt here

  • Stick to Basics and Best Practices: Despite AI's growth, the basics of programming, such as problem-solving skills, understanding code, and being able to fit code into larger systems, remain vital. Domain-specific knowledge, system design, and software architecture remain primarily human domains.
  • Find the Tool That Fits Your Needs: It's crucial to identify and experiment with various AI-based tools that align with your requirements, whether for automating tasks like test creation or for providing programming suggestions. Adapting to new tools as they emerge in the fast-paced AI field is key.
  • Clear and Precise Conversations Are Key: When using AI tools, being detailed and clear in communication is critical. For conversational AI programmers, prompt engineering helps frame effective prompts. The process should be viewed as iterative, with the AI assistant seen as an inexperienced yet knowledgeable collaborator.
  • Be Critical and Understand the Risks: Programmers should remain critical of AI-generated code, as models can produce incorrect code. Checking generated code is essential, even if it adds extra steps. Concerns regarding proprietary code, copyright, and security are also highlighted. Programmers need to understand the models' data sources and the versions of programming languages used during training to appropriately contextualize results.

FFmpeg

2023-08-05 ffmprovisr ffmpeg cookbook

Github: amiaopensource/ffmprovisr: Repository of useful FFmpeg commands for archivists!

Making FFmpeg Easier FFmpeg is a powerful tool for manipulating audiovisual files. Unfortunately, it also has a steep learning curve, especially for users unfamiliar with a command line interface. This app helps users through the command generation process so that more people can reap the benefits of FFmpeg.

Each button displays helpful information about how to perform a wide variety of tasks using FFmpeg. To use this site, click on the task you would like to perform. A new window will open up with a sample command and a description of how that command works. You can copy this command and understand how the command works with a breakdown of each of the flags.

This page does not have search functionality, but you can open all recipes (second option in the sidebar) and use your browser's search tool (often ctrl+f or cmd+f) to perform a keyword search through all recipes.

image-20230805000424900

2023-08-05 Editing Videos with ffmpeg – Hadet – Earth Based System Administrator and Hobbyist

image-20230805001802130

Editing Videos with ffmpeg

This is a short and messy guide for editing files from the command line. While I do this on Linux, these commands will work on MacOS and Windows too. The reason I do this is because I am vision impaired and timeline editors are very cumbersome for me in particular. Sometimes I also feel this is faster, especially for sharing short clips scaled for chat platforms like Discord.

Bash

2023-08-05 GitHub - denysdovhan/bash-handbook: 📖 For those who wanna learn Bash

image-20230804234848447

If you are a developer, then you know the value of time. Optimizing your work process is one of the most important aspects of the job.

In that path towards efficiency and productivity, we are often posed with actions that must be repeated over and over again, like:

  • taking a screenshot and uploading it to a server
  • processing text that may come in many shapes and forms
  • converting files between different formats
  • parsing a program's output

Enter Bash, our savior.

Bash is a Unix shell written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. It was released in 1989 and has been distributed as the Linux and macOS default shell for a long time.

So why do we need to learn something that was written more than 30 years ago? The answer is simple: this something is today one of the most powerful and portable tools for writing efficient scripts for all Unix-based systems. And that's why you should learn bash. Period.

In this handbook, I'm going to describe the most important concepts in bash with examples. I hope this compendium will be helpful to you.

Projects

2023-08-05 Cap'n Proto: Introduction

image-20230805002615039

Cap’n Proto is an insanely fast data interchange format and capability-based RPC system. Think JSON, except binary. Or think Protocol Buffers, except faster. In fact, in benchmarks, Cap’n Proto is INFINITY TIMES faster than Protocol Buffers.

2023-08-05 Hacker News Blogroll / RSS

image-20230805004403296

2023-07-08 The Code Review Pyramid - Gunnar Morling

image-20230805004745288

code_review_pyramid.svg Code Style:

  • Is the project's formatting style applied?
  • Does it adhere to agreed on naming conventions
  • Is it DRY?
  • Is the code sufficiently "readable" (method lengths, etc.)

Tests:

  • Are all tests passing?
  • Are new features reasonably tested?
  • Are corner cases tested?
  • Is it using unit tests where possible, integration tests where necessary?
  • Are there tests for NFRs, e.g. performance?

Documentation:

  • New features reasonably documented?
  • Are the relevant kinds of docs covered: README, API docs, user guide, reference docs, etc.?
  • Are docs understandable, are there no significant typos and grammar mistakes?

Implementation semantics:

  • Does it satisfy the original requirements?
  • Is it logically correct?
  • Is there no unnecessary complexity?
  • Is it robust (no concurrency issues, proper error handling, etc.)?
  • Is it performant?
  • Is it secure (e.g. no SQL injections, etc.)
  • Is it observable (e.g. metrics, logging, tracing, etc.)?
  • Do newly added dependencies pull their weight? Is their license acceptable?

API Semantics:

  • API as small as possible, as large as needed?
  • Is there one way of doing one thing, not multiple ones?
  • Is it consistent, does it follow the principle of least surprises?
  • Clean split of API/internals, without internals leaking in the API?
  • Are there no breaking changes to user-facing parts (API classes, configuration, metrics, log formats, etc.)?
  • Is a new API generally useful and not overly specific

Licensed under CC BY-SA 4.0 (C) @gunnarmorling

Web/SVG

2023-08-05 SVG Path Commands | Lines

Interactive tutorial

image-20230805004239796

C#

2023-07-10 Hunting .NET memory leaks with Windbg » André Snede

Recently a client called me about an issue where one of their production servers would run out of memory, every other week.

The application in question was a .NET Framework 4.5 Windows service, that runs in an Azure VM, and ever so often it would become unstable and start causing trouble.

Advanced .NET debugging Book

Debugging managed code, memory leak with memory dump using windbg

Identifying memory leak with process explorer and windbg

Windbg cheatsheat

C++ CPP CXX

2023-07-30 fffaraz/awesome-cpp: A curated list of awesome C++ (or C) frameworks, libraries, resources, and shiny things. Inspired by awesome-... stuff.

Concurrency in C++: A Programmer’s Overview

image-20230805003731357

C language

2023-08-05 "Once" one-time concurrent initialization with an integer

The article discusses the idea of "once" initialization in concurrent programming, which ensures a certain part of a program is only initialized once regardless of how many threads are trying to access it simultaneously. The writer compares the traditional pthread_once function and Go's sync.Once function, highlighting their limitations.

To overcome these limitations, the author proposes a new "once" interface that removes callbacks and breaks down initialization into two separate steps, do_once and once_done. The do_once function returns true if initialization is required, otherwise, it returns false after initialization has completed (blocks if it's in process). The once_done function signals that the initialization process is complete.

The author's approach doesn't limit the initialization to global data, and it uses integers to represent the three states of the "once" object: Uninitialized, Undergoing initialization, and Initialized. This approach allows for zero-initialization, concurrency control with atomic operations, and an optimization for a quicker state transition with an atomic increment.

In the end, the author presents the implementation details of this new approach, clarifying how it ensures initialization is performed only once and how it handles multiple threads trying to initialize the same piece of data. image-20230804235145362

SIMD

2023-07-08 Packing a string of digits into an integer quickly – Daniel Lemire's blog

#include <arm_neon.h>
// From "20141103 012910", we want to get
// 0x20141103012910
uint64_t extract_nibbles(const char *c) {
const uint8_t *ascii = (const uint8_t *)(c);
uint8x16_t in = vld1q_u8(ascii);
// masking the high nibbles,
in = vandq_u8(in, vmovq_n_u8(0x0f));
// shuffle the bytes
const uint8x16_t shuf = {14, 13, 12, 11, 10, 9, 7, 6,
5, 4, 3, 2, 1, 0, 255, 255};
in = vqtbl1q_u8(in, shuf);
// then shift/or
uint16x8_t ins =
vsraq_n_u16(vreinterpretq_u16_u8(in),
vreinterpretq_u16_u8(in), 4);
// then narrow (16->8),
int8x8_t packed = vmovn_u16(ins);
// extract to general register.
return vget_lane_u64(vreinterpret_u64_u16(packed), 0);
}

Talks / Security

2023-08-04 Secure Coding Back to Basics - Erlend Oftedal - NDC Security 2022 - YouTube

image-20230804234609455

cure53/DOMPurify: DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo: let clean = DOMPurify.sanitize(dirty); https://github.com/colinhacks/zod

import as z from "zod" ;
export const registrationParser = z.object ({
email: z.string().min(10).max(60).regex(emailRegex),
password: z.string().min(8).max(256)
})

Value objects 2023-08-03 Input Validation - OWASP Cheat Sheet Series 2023-08-03 Why input validation is not the solution for avoiding SQL injection and XSS 2023-08-03 Secure by Design

Multiplayer games - Research 🔬

2023-07-22 leereilly/games: 🎮 A list of popular/awesome video games, add-ons, maps, etc. hosted on GitHub. Any genre. Any platform. Any engine.

2023-07-22 SirRenzalot/awesome-lan-party-games: Awesome games for LAN parties or local multiplayer sessions.

2023-07-22 PCGamer The 30 best multiplayer browser games to play right now : r/lowendgaming

2023-07-22 Best Multiplayer Browser Games Of 2021 (No Download)

2023-07-22 Best multiplayer games to play in a web browser | | Resource Centre by Reliance Digital

2023-07-22 QuickParty.Games – Instant Browser-Based Party Games

· 15 min read

Good Reads

2023-07-30 Before you try to do something, make sure you can do nothing - The Old New Thing

When building a new thing, a good first step is to build a thing that does nothing. That way, you at least know you are starting from a good place. If I’m building a component that performs an action, I’ll probably do it in these steps:

  • Step zero is to write a standalone program to perform the action. This ensures that the action is even possible.
  • Once I have working code to perform the action, I write a component that doesn’t perform an action. That at least makes sure I know how to build a component.
  • Next, I register the component for the action, but have the Invoke method merely print the message “Yay!” to the debugger without doing anything else. This makes sure I know how to get the component to run at the proper time.
  • Next, I fill in the Invoke method with enough code to identify what action to perform and which object to perform it on, print that information to the debugger, and return without actually performing the action. This makes sure I can identify which action is supposed to be done.
  • Finally, I fill in the rest of the Invoke method to perform the action on the desired object. For this, I can copy/paste the already-debugged code from step zero.

This link came from 2023-07-30 Programming Digest

2023-07-30 What we talk about when we talk about System Design | mahesh’s blog

The rules for effective design are as follows:

  1. Late-bind on designs: The design process should explore the entire design space rather than converging on a single point solution too early, allowing teams to switch between different possibilities until the best solution is found.
  2. Each point solution is a DoS attack on the design process: Discussing designs within the context of the design space accelerates the process, making it easier to compare and iterate on different solutions efficiently.
  3. Think in parallel; Design together; Implement in parallel; Review together: The design and development process should be parallelized and divided into creative thinking, centralized design, parallel implementation, and centralized reviewing. Late-binding to developers is crucial for fostering new ideas.
  4. Talk about the problem, not existing systems: Designing from first principles is more effective than basing solutions solely on existing systems, as they might introduce unnecessary complexity or bias.
  5. Always talk about a second application: Abstractions should be described independently of specific applications to prevent application-specific details from leaking into the abstraction.
  6. For each abstraction, build one implementation; plan for a second; hope for a third: Discussing multiple implementations of an abstraction ensures that the semantics of the abstraction remain independent of implementation details.
  7. Abstraction is not free: Each abstraction layer adds complexity, requiring precise definitions and reasoning in generic ways. Designers must balance concreteness and abstractness.
  8. Be critical (but about the right things): Designers should critically assess unknown and challenging aspects of a project while recognizing that every well-established system started with rough ideas.

This link came from 2023-07-30 Programming Digest

2023-07-25 Unicode is harder than you think · mcilloni's blog

Reading the excellent article by JeanHeyd Meneide on how broken string encoding in C/C++ is made me realise that Unicode is a topic that is often overlooked by a large number of developers. In my experience, there’s a lot of confusion and wrong expectations on what Unicode is, and what best practices to follow when dealing with strings that may contain characters outside of the ASCII range.

This article attempts to briefly summarise and clarify some of the most common misconceptions I’ve seen people struggle with, and some of the pitfalls that tend to recur in codebases that have to deal with non-ASCII text.

2023-07-22 The Most Important Coding Habits – PuppyCoding

In this article, the author asserts that the most significant coding habits aren't related directly to the code itself, but rather those that sustain and enhance a programmer's physical health and longevity in the field. This realization comes after suffering from a spinal disc herniation, commonly known as a slipped disc, attributed to poor posture from prolonged keyboard usage. The author stresses four crucial habits for healthy coding:

  1. Daily stretches: A chiropractor attributed the author's slipped disc to the inactivity of stomach and thigh muscles, which should help support the back but become weak due to extended sitting. To alleviate this, they recommend regular stretching exercises, particularly for the central and lower body, to improve muscle suppleness and support.
  2. Regular breaks: Taking a short break at least once an hour is advised, which apart from maintaining physical health, also aids in refreshing the mind. Breaks often provide a new perspective, making problem-solving easier upon return.
  3. Avoid late-night coding: Working long hours into the night not only leads to poorer quality code but also encourages bad posture. The author suggests establishing a strict cut-off time for work, promoting better mental and physical health.
  4. Improving the coding environment: Investing in an ergonomic setup, including a laptop stand, comfortable chair, and a standing desk, can significantly improve posture and reduce strain. In conclusion, the author regrets not incorporating these habits sooner and encourages fellow programmers, particularly those early in their career, to learn from their mistakes to enjoy a healthier, more prolonged coding career.

2023-07-07 Excellence is a habit, but so is failure – Andreas Kling – I like computers!

  • I didn't become addicted to drugs overnight. It happened over hundreds of moments where I prioritized momentary pleasure over health and safety.
  • I didn't become overweight overnight. It happened over hundreds of moments where I opted for immediate gratification over long-term health.
  • I didn't ruin relationships overnight. It happened over hundreds of moments where I chose comfort over confronting difficult conversations, admitting my mistakes, or even just acknowledging that someone was better than me at something.

How the things work

2023-07-22 The "Basics" | Putting the "You" in CPU

image-20230801223725713

2023-07-22 A brief history of computers — LessWrong

image-20230801223840840

Retro

2023-07-14 Windows: A Software Engineering Odyssey

image-20230801224752243 image-20230801224815398

2023-07-09 Chistory

The C programming language was devised in the early 1970s as a system implementation language for the nascent Unix operating system. Derived from the typeless language BCPL, it evolved a type structure; created on a tiny machine as a tool to improve a meager programming environment, it has become one of the dominant languages of today. This paper studies its evolution.

Fun

2023-07-08 Windows 95 Tips, Tricks, and Tweaks

image-20230801225207726

2023-07-13 Interview with an Emacs Enthusiast in 2023 Colorized - YouTube

image-20230801224636647

2023-07-28 My 90's TV!

image-20230801222426881

2023-07-25 Got called to a professor’s office after a complaint his SPARC4 was running slow

Back in the day, I got called to a professor’s office (I was IT support in the CS department) and the professor was complaining his Sparc4 was running slow. First thing I did was minimise a window and there was just this black square. Bit by bit roaches slowly moved. Like 0.5 fps. So many xroaches under his xterm that it was just a solid black square. The roaches multiply if they’re left alone long enough. This professor NEVER moved windows. So roaches scurried under his windows and then sat there. Never disturbed by being exposed. Slowly multiplying at some rate. Some grad student had thought it would be funny to play a prank on the professor and run xroach on him. But the professor obviously never saw the roaches. So they hid under his windows slowly increasing until finally they soaked up so much RAM that it impaired performance.

2023-07-25 veltman/clmystery: A command-line murder mystery

There's been a murder in Terminal City, and TCPD needs your help. To figure out whodunit, you need access to a command line.

2023-07-24 Death Metal English

Normal English: “Commuting to work” Death Metal English: “TRANSPORTATION OF THE WAGEBOUND UNTO THE NEXUS OF PERPETUAL QUOTIDIAN ENSLAVEMENT”

Projects

2023-07-31 Numbers Every Programmer Should Know By Year

image-20230801220602570

C++

C++ Talks and Videos

2023-08-01 SIMD Libraries in C++ - Jeff Garland - CppNow 2023 - YouTube

image-20230801215244268

Application libraries:

Developer libraries

C++ Articles

2023-08-01 💡 Agner Fog

According to ChatGPT: Agner Fog is a Danish professor known for his work in cultural selection theory, optimization methods, and system development methods. He holds a PhD in Operations Research and has a diverse educational background including sociology, statistics, and computer science.

One of his main contributions to the field of computer science is his development of CPU dispatcher software and comprehensive documentation of instruction latencies and throughputs for various CPU models. His optimization guides and tools are popular among performance-oriented programmers.

In the field of social sciences, he has developed a theory of cultural selection, which is similar to biological evolution but acts on cultural phenomena such as norms, traditions, language, technology, and art.


Software optimization resources

Optimization manuals

Optimizing software in C++: An optimization guide for Windows, Linux and Mac platforms

This is an optimization manual for advanced C++ programmers. Topics include: The choice of platform and operating system. Choice of compiler and framework. Finding performance bottlenecks. The efficiency of different C++ constructs. Multi-core systems. Parallelization with vector operations. CPU dispatching. Efficient container class templates. Etc.

File name: optimizing_cpp.pdf, size: 1838972, last modified: 2023-Jul-01. Download.

The microarchitecture of Intel, AMD and VIA CPUs: An optimization guide for assembly programmers and compiler makers

This manual contains details about the internal working of various microprocessors from Intel, AMD and VIA. Topics include: Out-of-order execution, register renaming, pipeline structure, execution unit organization and branch prediction algorithms for each type of microprocessor. Describes many details that cannot be found in manuals from microprocessor vendors or anywhere else. The information is based on my own research and measurements rather than on official sources. This information will be useful to programmers who want to make CPU-specific optimizations as well as to compiler makers and students of microarchitecture.

File name: microarchitecture.pdf, size: 2472395, last modified: 2023-Jul-01. Download.

C++ vector class library

This is a collection of C++ classes, functions and operators that makes it easier to use the the vector instructions (Single Instruction Multiple Data instructions) of modern CPUs without using assembly language. Supports the SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, FMA, XOP, and AVX512F/BW/DQ/VL instruction sets. Includes standard mathematical functions. Can compile for different instruction sets from the same source code. Description and instructions. Message board. Source on Github. Nice little instruction video by WhatsaCreel.

Latest release.

image-20230801215850674

2023-07-25 Getting Friendly With CPU Caches

When a CPU needs to access a piece of data, the data needs to travel into the processor from main memory.

The architecture looks something like this:

Figure 1: CPU Cache

img

Figure 1 shows the different layers of memory a piece of data has to travel to be accessible by the processor. Each CPU has its own L1 and L2 cache, and the L3 cache is shared among all CPUs. When the data finally makes its way inside the L1 or L2 cache, the processor can access it for execution purposes. On Intel architectures the L3 cache maintains a copy of what is in L1 and L2.

Performance in the end is about how efficiently data can flow into the processor. As you can see from the diagram, main memory access is about 80 times slower than accessing the L1 cache since the data needs to be moved and copied.

Note: Memory Performance in a Nutshell: The data is from 2016 but what’s important are the latency ratios which are pretty constant.

2023-07-23 STX: Main Page

lamarrr/STX: C++17 & C++ 20 error-handling and utility extensions. These monadic types not only make error handling easier but also make the paths more obvious to the compiler for optimizations. Monads can be simply thought of as abstract types of actions. Their monadic nature makes it easy to operate on them as pipelines and in the process eliminate redundant error-handling logic code.

  • stx::Result<T, E> : Type for relaying the result of a function that can fail or succeed (with monadic extensions)
  • stx::Option<T> : Type for safe optional values (with monadic extensions)

Markdown

2023-08-01 mark-when/markwhen: Make a cascading timeline from markdown-like text. Supports simple American/European date styles, ISO8601, images, links, locations, and more.

Markwhen is an interactive text-to-timeline tool. Write markdown-ish text and it gets converted into a nice looking cascading timeline.

Use the editor here.

This repo is for the view container, not the editor. The editor (markwhen.com) and VSCode extension are built on top of the view container.

image-20230801220208326

2023-08-01 Show HN: Markwhen: Markdown for Timelines | Hacker News

Yodeling

Hyper-realistic portrait of an alpine yodeling girl, her skin textured by highland winds, expressive azure eyes reflecting the vast sky, and lips curved into a melodious call. Every detail from her freckled button nose to her windswept hair contributes to this stunning, picturesque character

image-20230801221725728

2023-08-02 LESSON 1 - It's Foundational - Yodel-lay-ee-dee

image-20230801221028571

Songs

BethWilliamsMusic: image-20230801221924368

1 https://www.youtube.com/watch?v=plyd2kzWWYc

2 https://www.youtube.com/watch?v=bTrmN11fkPc

3 https://www.youtube.com/watch?v=Xp1PmnrfFks

Good Talks!

2023-07-30 The Art of Code • Dylan Beattie • YOW! 2022 - YouTube

image-20230801220844409

2023-07-30 The 128-Language Quine Relay - esoteric.codes 2023-07-30 mame/quine-relay: An uroboros program with 100+ programming languages 2023-07-30 Shakespeare Programming Language – Living London – Carleton College Hamlet: You lying stupid fatherless big smelly half-witted coward! You are as stupid as the difference between a handsome rich brave hero and thyself! Speak your mind! (Will print "H" from "Hello World")

Sonic PI demo (minute: 38:00) https://sonic-pi.net https://youtu.be/gwLQMuTspxE?t=2282

RockstarLang

2023-07-30 RockstarLang/rockstar: The Rockstar programming language specification https://youtu.be/gwLQMuTspxE?t=2520 (t= 42:00)

Comparison

OperandDescription
==your love is a lie
!=the whisky ain't the answer
>my heart is stronger than steel
<my soul is weaker than water
>=my will is as strong as a lion
<=your lies are as low as a snake

2023-07-15 Locknote: How JavaScript Happened: A Short History of Programming Languages - Mark Rendle - YouTube

image-20230801224527281

FORTRAN

  • IF statement
    • for multiplication operator
  • i as iterator variable

ALGOL

  • Block structure
  • IF ... THEN
  • ELSE ...
  • SWITCH
  • FOR loops
  • Functions
  • Semicolons
  • Backus—Naur Form

LISP

  • Functional Programming
  • First-class functions
  • The Heap
  • Garbage collection

Simula

  • Classes
  • Inheritance
  • Polymorphism
  • Scope (public / private)

APL

  • Dynamic typing

BCPL

  • Curly braces

C

  • for (int i = 0; i < 100; i++) { }

Smalltalk

  • Reflection
  • console
  • Virtual Machine
  • Everything being an object

ML

  • Arrow function syntax

C++ try / catch / throw

Self

  • prototype-based object orientation

C# async/await

· 15 min read

image-20230629004445045

Good Reads

2023-06-23 How my online gaming addiction saved my Ph.D. – Advait Sarkar

Previously, this might have taken me weeks. With JavaScript, I built the prototype in hours. Using web technology had another advantage: it was easy to deploy the study as a website and therefore get many more participants than I would have normally gotten in a lab-based experiment. The study was completed within a month and was published at a good conference.

2023-06-19 Imaginary Problems Are the Root of Bad Software

In this blog post, the author discusses *imaginary problems* as the root of bad software and how they affect developers, managers, and clients. He:

  • Defines imaginary problems as problems that are designed to do something other than their intended purpose, and contrast them with real problems that have to be solved.
  • Shows how long chains of communication and boredom can create imaginary problems by changing, misunderstanding, or misrepresenting requirements and specifications.
  • Examines how corruption, inertia, and fear can keep imaginary problems alive by preventing or discouraging fixing real problems that threaten the status quo or the livelihoods of others.
  • Provides examples and data from various domains and projects to illustrate the prevalence and impact of imaginary problems, such as online banking, blockchain, and software development.
  • Concludes that imaginary problems are a vicious cycle that prevents software from being reliable, efficient, or user-friendly, and that everyone needs to stop creating and solving them, and start focusing on the real problems.

2023-06-17 Generating income from open source

Open source projects need to charge money for their work. The author argues that donations are not enough to sustain open source projects and maintainers should adopt different business models to generate revenue. The author suggests several ways to charge money for open source work, such as different licenses, pro features, hosted solutions, or paid support.

Examples of successful open source businesses. The author provides several examples of open source projects that have built profitable businesses around their work, such as Metafizzy, Sidekiq, Plausible Analytics, PostHog, Metabase, React Flow, Babel, curl and Filippo Valsorda. The author explains how each project offers value to its customers and what kind of pricing or support they have.

Advice for open source maintainers. The author gives some advice for open source maintainers who want to start charging money for their work, such as understanding the value they provide, packaging their product well, letting people discover their paid plans, giving something of value immediately after purchase and offering insurance that their project will be maintained. The author encourages maintainers to try different options and not be ashamed of asking for money.

2023-06-14 Finish your projects

This article is about the importance and challenges of finishing a project, especially in the open source community. The author shares his personal experience and insights on how to overcome the obstacles of work and fear that often prevent people from releasing their projects. He also encourages readers to take pride in their finished work and to honor their past and future selves by publishing their projects. He concludes by introducing himself and The ReadME Project, which aims to amplify the voices of open source developers.

2023-06-12 The Surprising Power of Documentation

  1. Documentation saves time and improves productivity across the company.
  2. Documentation eradicates guesswork and reinvention of the wheel.
  3. Documentation enables fast onboarding and helps newcomers navigate startup processes.
  4. Documentation reduces the reliance on meetings and promotes asynchronous communication.
  5. Documentation serves as a knowledge repository and facilitates learning from past decisions.
  6. A documentation-first culture breaks down hierarchical barriers and promotes knowledge sharing.
  7. Templates, guidelines, and user-friendly tools should be provided to facilitate documentation.
  8. Resistance to documentation should be addressed through engagement and modeling behavior.
  9. Documentation should be clear, concise, well-structured, and easily accessible.
  10. Startups should cultivate a love for documentation and make it a daily practice

2023-07-02 Hashing

Hash functions, key to many aspects of computing such as databases, data structures, and security, are explored in this piece. These functions take an input, often a string, and generate a number. If a good hash function is used, it will always return the same number for the same input, while minimizing 'collisions' where different inputs produce the same number. This article evaluates the performance of hash functions, highlighting their efficacy with random and non-random inputs. An effective hash function, like the widely-used murmur3, provides even distribution regardless of input. The 'avalanche effect' is another measure of a good hash function, where a single change in the input results in an average 50% change in the output bits. Understanding hash functions is essential in utilizing key-value pair storing data structures known as maps.

Books

2023-05-07 A Programmer's Introduction to Mathematics

image-20230702155147644

Azure Active Directory

2023-06-29 Demystifying OAuth, JWTs and Azure AD - Graeme Foster - NDC Oslo 2023 - YouTube

Good video by Graeme Foster about how AAD OAuth works with demos. Video starts from 16:50

Emacs

2023-07-02 p3r7/awesome-elisp: 🏵️ A curated list of Emacs Lisp development resources

Awesome List

image-20230702150855336

TypeScript

2023-07-02 The Concise TypeScript Book (Free and Open Source) by Simone Poggiali

image-20230702150659219

CSharp

2023-06-29 Performance tricks I learned from contributing to open source .NET packages - Daniel Marbach - YouTube

danielmarbach/PerformanceTricksAzureSDK: Performance tricks I learned from contributing to the Azure .NET SDK github repository for this talk.

LINQ TO COLLECTION-BASED OPERATIONS

  • Use Array.Empty<T>() to represent empty arrays
  • Use Enumerable.Empty<T> to represent empty enumerables
  • Prevent collections from growing

HOW TO DETECT ALLOCATIONS?

  • Use memory profilers and watch out for excessive allocations of *__DisplayClass* or various variants of Action* and Func*

  • Use tools like Heap Allocation Viewer (Rider) or Heap Allocation Analyzer (Visual Studio)

  • Avoid excessive allocations to reduce the GC overhead

  • Think at least twice before using LINQ or unnecessary enumeration on the hot path

  • Be aware of closure allocations

  • Pool and re-use buffers

  • For smaller local buffers, consider using the stack

  • Be aware of parameter overloads

  • Where possible and feasible use value types but pay attention to unnecessary boxing

  • Move allocations away from the hot-path where possible

  • C# 9 - Improving performance using the SkipLocalsInit attribute - Meziantou's blog

C++

2023-06-24 👃 60 terrible tips for a C++ developer

60 Dirty tips for dirty developers ;)

... and the list goes on and on

2023-06-24 Make your programs run faster by better using the data cache - Johnny's Software Lab

It covers the following topics and tips:

  • The concept and importance of cache memory and how it compensates for the difference in speed between processor and main memory.
  • The principles of temporal and spatial locality, which govern the behavior of real-world programs and affect the cache performance.
  • The tips and rules for better exploiting the data cache in different scenarios, such as:
    • Using arrays of classes or structs instead of values, to increase the cache utilization and reduce the cache misses.
    • Aligning the starting address of the array and the class data to the cache line size, to avoid splitting the data across multiple cache lines and to optimize the cache access.
    • Performing loop interchange on matrices, to move the loop over the innermost position and to eliminate column-wise accesses, which are costly for the cache.
    • Avoiding padding in classes and structs, to make sure they are correctly aligned and to reduce the cache overhead.
    • Sorting the variables in the declaration of the classes by size from largest to smallest, to guarantee that the compiler will not insert any padding and to optimize the cache access.
  • The tools and references available to help with the data cache optimization, such as pahole and StuctLayout, which can help with exploring and visualizing the paddings in the classes.

2023-06-15 ReactiveX/RxCpp: Reactive Extensions for C++

2023-06-14 Text Editor Data Structures - invoke::thought() - Cameron DaCamara

In The Beginning…

I am a strong believer in “experiment and get things working as fast as possible”—essentially, a fail fast mentality. This is not to say that your first pass should ignore optimization, and I refuse to pessimize my code. That said, I started from the simplest possible representation of a text file to start: a giant string.

There are some pretty great properties of having a single string as your text buffer:

  1. It is the most compact possible representation.
  2. The algorithms for insertion and removal are simple.
  3. It is very friendly to the rendering process because you can slice up the string into views which can be independently rendered without additional allocation.
  4. Did I mention it is simple?

Here’s a short example of insertion and deletion:

image-20230702152940627

C

1993 ⭐ Object-oriented Programming with ANSI-C (1993) [pdf]

Retro document! but very well written

image-20230629003429585

2023-06-14 Leo Robinovitch @ The Leo Zone

image-20230629004711183

2023-07-01 Few lesser known tricks, quirks and features of C

There are some tricks, quirks and features (some quite fundamental to the language!) which seems to throw even experienced developers off the track. Thus I did a sloppy job of gathering some of them in this post (in no particular order) with even sloppier short explanations and/or examples (or quote of thereof).

2023-06-30 Structures in C: From Basics to Memory Alignment – Abstract Expression

Structures allow us to combine several variables to create a new data type. Some other languages support the same concept but call it “records”. If you come from object-oriented programming you can think about them as classes without methods.

image-20230702152138229

SIMD

2023-07-02 Parsing time stamps faster with SIMD instructions – Daniel Lemire's blog

Standard:

#include <time.h>
#include <stdio.h>
int main() {
char buffer[15];
struct tm timeinfo;
time_t rawtime;
time(&rawtime);
gmtime_r(&rawtime, &timeinfo);
size_t len = strftime(buffer, 15, "%Y%m%d%H%M%S", &timeinfo);
buffer[14] = '\0';
puts(buffer);
}

SIMD:

 __m128i v = _mm_loadu_si128((const __m128i *)date_string);
v = _mm_sub_epi8(v, _mm_set1_epi8(0x30));
__m128i limit =
_mm_setr_epi8(9, 9, 9, 9, 1, 9, 3, 9, 2, 9, 5, 9, 5, 9, -1, -1);
__m128i abide_by_limits = _mm_subs_epu8(v, limit); // must be all zero
const __m128i weights = _mm_setr_epi8(
10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 0, 0);
v = _mm_maddubs_epi16(v, weights);
__m128i limit16 =
_mm_setr_epi16(99,99, 12, 31, 23, 59, 59, -1);
__m128i abide_by_limits16 = _mm_subs_epu16(v, limit16);
__m128i limits = _mm_or_si128(abide_by_limits16,abide_by_limits);
if (!_mm_test_all_zeros(limits, limits)) {
return false;
}
instructions per stamptime per stamp
standard C with strptime70046
SIMD approach657.9

Rust

2023-06-16 Effective Rust

Effective Rust

35 Specific Ways to Improve Your Rust Code

David Drysdale

image-20230629004251225

Security

2023-06-12 Desktop Linux Hardening | PrivSec - A practical approach to Privacy and Security

image-20230702153430958

ToC

Projects

2023-06-23 Style your RSS feed

RSS is not dead. It is not mainstream, but it's still a thriving protocol, especially among tech users. However, many people do not know what RSS feeds are or how to use them. Most browsers render RSS as raw XML files, which doesn't help users understand what it's all about...

2023-06-15 TypeCell Notebooks

TypeCell is an open source Typescript live programming environment.

Running code has never been easier :)

this is what I was looking for

2023-06-15 TypeCellOS/TypeCell

2023-07-01 Announcing Hurl 4.0.0

Hurl is a command line tool powered by curl, that runs HTTP requests defined in a simple plain text format:

GET https://example.org/api/tests/4567

HTTP 200
[Asserts]
header "x-foo" contains "bar"
certificate "Expire-Date" daysAfterNow > 15
jsonpath "$.status" == "RUNNING" # Check the status code
jsonpath "$.tests" count == 25 # Check the number of items
jsonpath "$.id" matches /\d{4}/ # Check the format of the id

image-20230702151808375

2023-06-30 Introduction - mdBook Documentation

mdBook is a command line tool to create books with Markdown. It is ideal for creating product or API documentation, tutorials, course materials or anything that requires a clean, easily navigable and customizable presentation.

  • Lightweight Markdown syntax helps you focus more on your content
  • Integrated search support
  • Color syntax highlighting for code blocks for many different languages
  • Theme files allow customizing the formatting of the output
  • Preprocessors can provide extensions for custom syntax and modifying content
  • Backends can render the output to multiple formats
  • Written in Rust for speed, safety, and simplicity
  • Automated testing of Rust code samples

This guide is an example of what mdBook produces. mdBook is used by the Rust programming language project, and The Rust Programming Language book is another fine example of mdBook in action.

Who wrote this?

2023-06-11 I Created Clippy - YouTube

2023-07-02 kevan atteberry

This guy made a monster! Just kidding, Clippy will be awesome! The character is there, now it needs AI! #ms

2023-06-11 Inside Task Manager with the Original Author - YouTube

2023-07-02 Dave's Garage - YouTube

How Task Manager was born, how it works, and insider secrets to using it! For information on my book, "Secrets of the Autistic Millionaire": https://amzn.to/3diQILq #ms 2023-06-11 How To Launch Nuclear Missile - YouTube

Workplace

2023-07-01 Leveling Up in Job Interviews for Software Engineers

2023-07-02 How you can ~1.5x your salary through negotiation

Videos

2023-06-26 Email vs Capitalism, or, Why We Can't Have Nice Things - Dylan Beattie - NDC Oslo 2023 - YouTube

Dylan is amazing speaker ;) fun conversation about the history of email, current limitations and how it works.

2023-06-17 Don't Talk to the Police - YouTube

I saw it years ago! I remember this video.

image-20230629004031212

· 11 min read

Good Reads

2023-06-05 Anything can be a message queue if you use it wrongly enough - Xe Iaso

image-20230608155314182

Dependency Injection

2023-06-07 Dependency Injection

image-20230608155040126

2023-06-07 Dependency Injection Design Pattern in C# - Dot Net Tutorials

image-20230608155111606

2023-06-07 Dependency injection - .NET | Microsoft Learn

image-20230608155152188

2023-06-02 The work is never just “the work” | Dave Stewart

Last year I took on what seemed like a short, easy-to-deliver project, which over the course of a year turned into the kind of “night of the living dead” slog and because of a variety of factors has never been easy to estimate.

With the latest phase finally delivered, I wanted to conduct a detailed postmortem to understand why my perception of the actual work was so off, and in the process reevaluate everything I know about assumptions and estimation.

In the rest of the article I’ll deep dive my own shortcomings around estimation, as well as present a framework to plan and visualise estimates, hopefully helping both of us clear those lurking feelings of confusion and guilt.

Table of contents:

image-20230608161215972

2023-05-30 Factories in Space - Making products for Earth and space

Introduction to in-space manufacturing, in-space economy and alternatively new space economy. Related fields include microgravity services, space resources, in-space transport services, orbital economy, cislunar economy, Moon & Mars economies and dozens more.

Overview of commercial microgravity applications. Both for terrestrial use and in-space use. Listing and analysing potential business opportunities to make unique profitable materials and products in microgravity.

Factories in Space is the largest public database of companies active in the emerging in-space economy and in-space manufacturing fields.

image-20230608161812944

How the things work

2023-06-04 🔨 GPS – Bartosz Ciechanowski

Global Positioning System is, without a doubt, one of the most useful inventions of the late 20th century. It made it significantly easier for ships, airplanes, cars, and hikers to figure out where they are with high degree of accuracy.

One of the most exciting aspects of this system are the satellites surrounding Earth. Here’s a current constellation of active satellites, you can drag the view around to see it from different angles:

image-20230608160152904

2023-06-03 The Pluto Scarab — Hash Functions

Hash Functions

Hash functions are functions that map a bit vector to another bit vector, usually shorter than the original vector and usually of fixed length for a particular function.

There are three primary uses for hash functions:

  1. Fast table lookup
  2. Message digests
  3. Encryption

Fast Table Lookup

Fast table lookup can be implemented using a hash function and a hash table. Elements are found in the hash table by calculating the hash of the element’s key and using the hash value as the index into the table. This is clearly faster than other methods, such as examining each element of the table sequentially to find a match.

Message Digests

Message digests allow you to compare two large bit vectors and quickly determine if they are equal. Instead of comparing the vectors bit-by-bit, if the hash values of each bit vector are available you can compare the hash values. If the hash values are different, the original vectors must be different. If the hash values are the same then the original vectors are very likely to be the same if the hash function is good.

Message digests can use either cryptographic or non-cryptographic hash functions. If the purpose of the message digest is to determine if the original message has been tampered with, you would need to use a cryptographic hash function. If you just want to quickly tell if it’s the same as another file with a different name (assuming the hash values have already been computed), you can use a non-cryptographic hash function.

Encryption

Encryption is the transformation of data into a form unreadable by anyone without a secret decryption key. Hash functions play an important role in encryption because it is their properties that cause the encrypted data to be unreadable and the original data to be unrecoverable from the encrypted data without the decryption key.

image-20230608160538570

Fun

2023-06-02 Fold 'N Fly » Paper Airplane Folding Instructions

image-20230608160715423

Mental Health

2023-05-15 Taxonomy of procrastination

ADHD and procrastination

What I’d like to understand is: Is there a failure mode from having too much willpower?

There’s an angle on this that seems promising at first. People who have ADHD have “low willpower”. This is claimed to be a result of some kind of dopamine (or norepinephrine) dysfunction—either producing too little, or having low-sensitivity receptors. So is there a problem associated with having “too much” dopamine? Perhaps yes—the dopamine hypothesis is that an overly sensitive dopamine system (or taking lots of meth) causes schizophrenia.

As a cartoon, we might think that:

LOW DOPAMINE ↓ LOW CONFIDENCE IN PREDICTIONS ↓ FORGET HOMEWORK PLAY VIDEO GAMES

And:

HIGH DOPAMINE ↓ EXTREME CONFIDENCE IN PREDICTIONS ↓ HALLUCINATIONS

Nice theory, right? Trouble is, people with ADHD are also much more likely to develop schizophrenia. So this doesn’t make sense, nothing makes sense.

The Era of AI

2023-06-07 Why AI Will Save The World - Marc Andreessen Substack

In our new era of AI:

  • Every child will have an AI tutor that is infinitely patient, infinitely compassionate, infinitely knowledgeable, infinitely helpful. The AI tutor will be by each child’s side every step of their development, helping them maximize their potential with the machine version of infinite love.

  • Every person will have an AI assistant/coach/mentor/trainer/advisor/therapist that is infinitely patient, infinitely compassionate, infinitely knowledgeable, and infinitely helpful. The AI assistant will be present through all of life’s opportunities and challenges, maximizing every person’s outcomes.

...

2023-06-05 GPT best practices - OpenAI API

Strategy: Write clear instructions

Tactic: Include details in your query to get more relevant answers

In order to get a highly relevant response, make sure that requests provide any important details or context. Otherwise you are leaving it up to the model to guess what you mean.

WorseBetter
How do I add numbers in Excel?How do I add up a row of dollar amounts in Excel? I want to do this automatically for a whole sheet of rows with all the totals ending up on the right in a column called "Total".
Who’s president?Who was the president of Mexico in 2021, and how frequently are elections held?
Write code to calculate the Fibonacci sequence.Write a TypeScript function to efficiently calculate the Fibonacci sequence. Comment the code liberally to explain what each piece does and why it's written that way.
Summarize the meeting notes.Summarize the meeting notes in a single paragraph. Then write a markdown list of the speakers and each of their key points. Finally, list the next steps or action items suggested by the speakers, if any.

2023-04-17 Understanding Large Language Models - by Sebastian Raschka

image-20230608162353839

Projects

2023-06-08 axodox/axodox-machinelearning: This repository contains a C++ ONNX implementation of StableDiffusion.

(Windows Only)

This repository contains a fully C++ implementation of Stable Diffusion-based image synthesis, including the original txt2img, img2img and inpainting capabilities and the safety checker. This solution does not depend on Python and runs the entire image generation process in a single process with competitive performance, making deployments significantly simpler and smaller, essentially consisting a few executable and library files, and the model weights. Using the library it is possible to integrate Stable Diffusion into almost any application - as long as it can import C++ or C functions, but it is most useful for the developers of realtime graphics applications and games, which are often realized with C++.

2023-06-08 axodox/unpaint: A simple Windows App for generating AI images with stable diffusion.

2023-06-04 This Site is no longer Solar Powered... For Now | Andrew JV Powell

2023-06-04 We are now Solar Powered | Andrew JV Powell

Oh no!

image-20230608155824844

2023-06-03 wader/fq: jq for binary formats - tool, language and decoders for working with binary and text formats

image-20230608160248445

2023-06-02 adamritter/fastgron: High-performance JSON to GRON (greppable, flattened JSON) converter

2023-06-02 Sharing WebSocket Connections between Browser Tabs and Windows | Bright Inventions

2023-06-02 How to draw any regular shape with just one JavaScript function | MDN Blog

2023-05-04 GitHub - taviso/123elf: A native port of Lotus 1-2-3 to Linux.

2023-04-18 JSLinux

Windows 2000

2023-04-18 atrosinenko/qemujs: Qemu.js source code with proof-of-concept machine-code-to-WASM JIT.

2023-05-16 robdelacruz/lkwebserver: Little Kitten Webserver

Little Kitten Web Server

A little web server written in C for Linux.

  • No external library dependencies
  • Single threaded using I/O multiplexing (select)
  • Supports CGI interface
  • Supports reverse proxy
  • lklib and lknet code available to create your own http server or client
  • Free to use and modify (MIT License)

C++

2023-06-07 Modern Image Processing Algorithms Overview & Implementation in C/C++

Implementing modern image processing algorithms in C requires a solid understanding of image representation, data structures, and algorithmic concepts. Uncompressed image data are typically stored as matrices or multidimensional arrays, with each element representing a pixel's intensity or color value. C provides the necessary tools to access and manipulate individual pixels efficiently, making it ideal for algorithm implementation. Most of the algorithms featured here except the patented SIFT & SURF are already implemented in the open source, embedded, computer vision library SOD, and already in production use here at PixLab or FACEIO.

image-20230608154148144

2023-04-18 Geometry Central

Geometry-central is a modern C++ library of data structures and algorithms for geometry processing, with a particular focus on surface meshes.

Features include:

  • A polished surface mesh class, with efficient support for mesh modification, and a system of containers for associating data with mesh elements.
  • Implementations of canonical geometric quantities on surfaces, ranging from normals and curvatures to tangent vector bases to operators from discrete differential geometry.
  • A suite of powerful algorithms, including computing distances on surface, generating direction fields, and manipulating intrinsic Delaunay triangulations.
  • A coherent set of sparse linear algebra tools, based on Eigen and augmented to automatically utilize better solvers if available on your system.

SIMD

2023-06-02 Cornell Virtual Workshop: SIMD Parallelism

SIMD stands for "Single Instruction Multiple Data," and is one of several approaches to parallelism found in modern high-performance computing.

Vector instructions are a primary example of SIMD parallelism in modern CPUs. For instance, the vector add instruction is a single instruction (add) that acts on multiple data (vectors) to yield a vector of sums. Given the two vectors (1, 2, 3, 4) and (5, 6, 7, 8), the vector result (6, 8, 10, 12) is produced in a single operation. This operation is illustrated in the diagram and linked video below.

image-20230608160855199

WebGPU

2023-05-04 cohost! - "I want to talk about WebGPU"

image-20230608162813856

WebGPU is the new WebGL. That means it is the new way to draw 3D in web browsers. It is, in my opinion, very good actually. It is so good I think it will also replace Canvas and become the new way to draw 2D in web browsers. In fact it is so good I think it will replace Vulkan as well as normal OpenGL, and become just the standard way to draw, in any kind of software, from any programming language. This is pretty exciting to me. WebGPU is a little bit irritating— but only a little bit, and it is massively less irritating than any of the things it replaces.

image-20230608162731777

Seattle

2023-06-07 Free apps and online maps for walking tours of Seattle - Greater Seattle on the Cheap

image-20230608154629268

Offline docs

2023-06-01 freeCodeCamp/devdocs: API Documentation Browser

2023-06-08 DevDocs API Documentation

image-20230608161536705

· 11 min read

image-20230528164321688

2023-05-28 Ditherpunk — The article I wish I had about monochrome image dithering — surma.dev

image-20230528163845673

Good Reads

2023-05-28 zakirullin/cognitive-load: 🧠 Cognitive Load Developer's Handbook

Cognitive load

Cognitive load is how much a developer needs to know in order to complete a task.

We should strive to reduce the cognitive load in our projects as much as possible.

The average person can hold roughly four facts in working memory. Once the cognitive load reaches this threshold, a significant effort is required to understand things.

*Let's say we've been asked to make some fixes to a completely unfamiliar project. We were told that a really smart developer had contributed to it. Lots of cool technologies, fancy libraries and trendy frameworks were used. In other words, the previous author had a high cognitive load in his head, which we are yet to recreate.*

image-20230528163230728

Inheritance nightmare

We're tasked to change a few things for our admin users: 🧠

AdminController extends UserController extends GuestController extends BaseController

Ohh, part of the functionality is in BaseController, let's have a look: 🧠+ Basic role mechanics got introduced in GuestController: 🧠++ Things got partially altered in UserController: 🧠+++ Finally we're here, AdminController, let's code stuff! 🧠++++

Oh, wait, there's SuperuserController which extends AdminController. By modifying AdminController we can break things in the inherited class, so let's dive in SuperuserController first: 🤯

Prefer composition over inheritance. We won't go into the details - there are plenty of articles on the subject.

Complicated if statements

if val > someConstant // 🧠+
&& (condition2 || condition3) // 🧠+++, prev cond should be true, one of c2 or c3 has be true
&& (condition4 && !condition5) { // 🤯, we're messed up here
...
}

Introduce temporary variables with meaningful names:

isValid = var > someConstant
isAllowed = condition2 || condition3
isSecure = condition4 && !condition5
// 🧠, we don't need to remember conditions, there are descriptive variables
if isValid && isAllowed && isSecure {
...
}

2023-05-28 Modern work requires attention. Constant alerts steal it - Stack Overflow Blog We often describe working with focused attention as a flow state. As described in the book Flow: The Psychology of Optimal Experience by Mihaly Csikszentmihalyi, a flow state allows one to become fully engaged and focused on the task at hand. It leads to better results and greater happiness. But it can only happen when you have the attention to focus fully on whatever it is that lies before you. Why can’t we focus at work? The contemporary workspace, whether in-person or remote, is full of demands on your attention. We have chat programs, email inboxes, and project management apps all throwing notifications our way. In offices, you have other people tapping you on the shoulder and creating general noise (and woe betide those in open offices). Working remotely avoids some of these, but places the entire communication burden on chat and email applications with their little red notifications. These apps promise asynchronous communications, but that doesn’t always happen in practice.

2023-05-24 How to start a Go project in 2023 | Ben E. C. Boyter

I previously wrote about starting a Go project in 2018. A lot has changed since I wrote that and I had been wanting to write an updated version. What follows should be enough for anyone new to Go to get started and ideally start them being productive.

Quick links:

2023-05-24 google/comprehensive-rust: This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust to everyone.

This repository has the source code for Comprehensive Rust 🦀, a multi-day Rust course developed by the Android team. The course covers all aspects of Rust, from basic syntax to generics and error handling. It also includes deep dives on Android, bare-metal, and concurrency.

Fun

2023-05-26 The Fastest Maze-Solving Competition On Earth - YouTube

image-20230528164810343

The Era of AI

image-20230528164106815

2023-05-28 👃 imartinez/privateGPT: Interact privately with your documents using the power of GPT, 100% privately, no data leaks

Run GPT on your local machine!

Ask questions to your documents without an internet connection, using the power of LLMs. 100% private, no data leaves your execution environment at any point. You can ingest documents and ask questions without an internet connection! The supported extensions are:

  • .csv: CSV,
  • .docx: Word Document,
  • .doc: Word Document,
  • .enex: EverNote,
  • .eml: Email,
  • .epub: EPub,
  • .html: HTML File,
  • .md: Markdown,
  • .msg: Outlook Message,
  • .odt: Open Document Text,
  • .pdf: Portable Document Format (PDF),
  • .pptx : PowerPoint Document,
  • .ppt : PowerPoint Document,
  • .txt: Text file (UTF-8),

2023-05-26 #002 - Donald Trump • The Joe Rogan AI Experience

Disclaimer: This video depicts a fictional podcast between Joe Rogan and Donald Trump, with all content generated using AI language models. The ideas and opinions expressed in the podcast are not reflective of the thoughts of Joe Rogan or Donald Trump. The content portrayed in this video is purely for entertainment purposes

image-20230528164943445

2023-05-13 upscayl/upscayl: 🆙 Upscayl - Free and Open Source AI Image Upscaler for Linux, MacOS and Windows built with Linux-First philosophy.

Upscayl lets you enlarge and enhance low-resolution images using advanced AI algorithms. Enlarge images without losing quality, it's almost like magic!

image-20230528172155972

2023-05-06 🎨 nadermx/backgroundremover: Background Remover lets you Remove Background from images and video using AI with a simple command line interface that is free and open source.

BackgroundRemover is a command line tool to remove background from image and video using AI, made by nadermx to power https://BackgroundRemoverAI.com. If you wonder why it was made read this short blog post.

image-20230528172101528

2023-05-29 FastStone Image Viewer, Screen Capture, Photo Resizer ...

Not an AI, but helps a lot with managing Stable Diffusion results

image-20230528172353739

Projects

2023-05-28 BlockNote - Javascript Block-Based text editor | BlockNote

A beautiful text editor that just works. Easily add an editor to your app that users will love. Customize it with your own functionality like custom blocks or AI tooling.

image-20230528163701665

Podcasts

- 🙊 2023-05-26 Podcast – You Are Not So Smart

image-20230528165130113

- 🙊 2023-05-26 All Podcasts | Manager Tools

image-20230528165206461

Work

2023-05-28 Ask HN: Engineering managers, how do you onboard new hires? | Hacker News

avinassh

  1. A week before their joining, we ship the laptop
  2. I'd have a calendar ready for them, which gives an overview of what they will be doing for the next three months
  3. First week goes into setting up the tooling on the machine. Someone from the product team gives an overview and entire product walkthrough. Next, they spend some to play with the product as a user. This week also involves the initial orientation session.
  4. We use Golang heavily, however, the people joining might not know it. The second week goes into doing the tour of Go.
  5. Third week they spend on onboarding tutorial that shows how to write a small service, generate APIs, build, and deploy it in our infra.
  6. Fourth week they will spend shipping a really small feature to the production.
  7. Since day one, they'd have assigned a buddy who becomes their go-to person. Buddy also explains them about the culture, how things typical done here etc. The buddy also creates a new slack channel just for them, where they can interact.
  8. They pair with the buddy in the initial weeks, where buddy is the driver.
  9. First three months, they'd spend working on a feature along with someone which also involves some good amount of pair programming.

Tehnix

  • Before you start we send an onboarding plan: As detailed as we can for the first 7 days (e.g. onboarding call, intro to this or that, pairing up with another Engineer), and much more high-level of expectations after 30 days and after 3 months

  • Everyone has an "onboarding buddy": This is an Engineer on their team and makes sure the other Engineer feels like it's their responsibility to spend time getting the new Engineer up-to-speed

  • If you're fully remote we try to fly you into our HQ (Copenhagen, Denmark) for the first week. We've had overwhelmingly good feedback on how big of a difference this makes in establishing connections and making people feel a lot more comfortable with the colleagues much earlier on.

  • We focus on giving you a lot of context initially: The organization, the team and their purpose, meeting up with your manager weekly so they can fill in the gaps continuously, intro to the overall tech infrastructure

  • We dive into the specifics via work: Finding smaller projects that are well scoped to get you into the various corners of the teams' domain

  • We knowledge share a lot via PR Reviews: Onboardees always add two people on the PRs to maximize knowledge sharing over speed initially. After a month or two they go down to just the regular 1 person and they themselves also start reviewing code

  • From then on: We freestyle, but have a continuous focus on learning. At this point, people are so unique and varied that we adjust on to their learning style, gaps, etc.

Everyone in the team is quite communicative. One thing we explicitly focus on is for new people to get comfortable asking in public channels instead of via DMs. This comes naturally to some, but not to others and they need some nudging and you showing off how its safe to do.

There's many more things we do, but those are some of the important parts of the top of my head :)

EDIT: Some context around our environment. We have our own CLI tool to quickly setup a dev environment as well as using GitHub Codespaces as a fallback. There's strong coverage of CI for checking everything is good, and things are deployed very often. We try to automate most of our flows, at least as much as we can to keep friction low, but also to minimize "things you need to just know".

C

2023-05-25 xorvoid

SectorC: A C Compiler in 512 bytes

SectorC (github) is a C compiler written in x86-16 assembly that fits within the 512 byte boot sector of an x86 machine. It supports a subset of C that is large enough to write real and interesting programs. It is quite likely the smallest C compiler ever written.

2023-05-22 Memory Allocation

One thing that all programs on your computer have in common is a need for memory. Programs need to be loaded from your hard drive into memory before they can be run. While running, the majority of what programs do is load values from memory, do some computation on them, and then store the result back in memory.

In this post I'm going to introduce you to the basics of memory allocation. Allocators exist because it's not enough to have memory available, you need to use it effectively. We will visually explore how simple allocators work. We'll see some of the problems that they try to solve, and some of the techniques used to solve them. At the end of this post, you should know everything you need to know to write your own allocator.

image-20230528170203659

Research on RSS readers

I haven't found the one that I like yet.

2023-05-26 Tiny Tiny RSS

2023-05-26 yang991178/fluent-reader: Modern desktop RSS reader built with Electron, React, and Fluent UI

2023-05-26 stringer-rss/stringer: A self-hosted, anti-social RSS reader.

2023-05-26 👃 Athou/commafeed: Google Reader inspired self-hosted RSS reader.

Talks

2023-05-22 Developer Tools That Shouldn't Be Secrets Christian Heilmann GOTO 2022 - YouTube

image-20230528170557079

Slides 2023-05-22 More devtools secrets Console.log to show variable name in the output, instead of console.log(x), put curly braces console.log({x}) so the output will be an object with one property.

2023-05-22 Dear Console,… - a collection of code snippets to use in the browser console

image-20230528170512157

See ya!