Searching We.Love.Privacy.Club

Twts matching #2
Sort by: Newest, Oldest, Most Relevant

Go 語言延遲初始化 -Lazy Initialization- 最佳實踐
簡介—–在有些資源初始化成本很高,甚至在某些代碼路徑未觸發根本沒有必要初始化,可以將對象的創建、配置等耗時操作推遲到真正需要使用時才執行。延遲初始化實現———-2.1 sync.Oncesync.Once 是 Go 標準庫提供的線程安全初始化工具,確保初始化代碼只執行一次:var (    resource MyResource  // 需要延遲初始化的資源    once ⌘ Read more

⤋ Read More

Saw this on Mastodon:

https://racingbunny.com/@mookie/114718466149264471

18 rules of Software Engineering

  1. You will regret complexity when on-call
  2. Stop falling in love with your own code
  3. Everything is a trade-off. There’s no “best” 3. Every line of code you write is a liability 4. Document your decisions and designs
  4. Everyone hates code they didn’t write
  5. Don’t use unnecessary dependencies
  6. Coding standards prevent arguments
  7. Write meaningful commit messages
  8. Don’t ever stop learning new things
  9. Code reviews spread knowledge
  10. Always build for maintainability
  11. Ask for help when you’re stuck
  12. Fix root causes, not symptoms
  13. Software is never completed
  14. Estimates are not promises
  15. Ship early, iterate often
  16. Keep. It. Simple.

Solid list, even though 14 is up for debate in my opinion: Software can be completed. You have a use case / problem, you solve that problem, done. Your software is completed now. There might still be bugs and they should be fixed – but this doesn’t “add” to the program. Don’t use “software is never done” as an excuse to keep adding and adding stuff to your code.

⤋ Read More
In-reply-to » Just discovered how easy it is to recall my last arg in shell and my brain went 🤯 How come I've never learned about this before!? I wonder how many other QOL shortcuts I'm missing on 🥲

@aelaraji@aelaraji.com I use Alt+. all the time, it’s great. 👌

FWIW, another thing I often use is !! to recall the entire previous command line:

$ find -iname '*foo*'
./This is a foo file.txt

$ cat "$(!!)"
cat "$(find -iname '*foo*')"
This is just a test.

Yep!

Or:

$ ls -al subdir
ls: cannot open directory 'subdir': Permission denied

$ sudo !!
sudo ls -al subdir
total 0
drwx------ 2 root root  60 Jun 20 19:39 .
drwx------ 7 jess jess 360 Jun 20 19:39 ..
-rw-r--r-- 1 root root   0 Jun 20 19:39 nothing-to-see

⤋ Read More

New oil and gas fields incompatible with Paris climate goals
Opening any new North Sea oil and gas fields is incompatible with achieving the Paris Climate Agreement goals of limiting warming to 1.5°C or holding warming to “well below 2°C” relative to preindustrial levels, finds a new report published by UCL academics. ⌘ Read more

⤋ Read More

Radxa UFS/eMMC Module Reader and Storage Solution Enables Fast Flashing and Scalable Embedded Storage
Radxa’s UFS/eMMC Module Reader is a compact USB 3.0 adapter for flashing OS images, accessing firmware, and transferring large files. It supports both eMMC v5.0 and UFS 2.1 modules with speeds up to 5 Gbps The adapter is compatible with eMMC and UFS modules from Radxa, and also works with modules from platforms like PINE64 and […] ⌘ Read more

⤋ Read More

CH32H417 Dual-Core RISC-V MCU Offers USB, Ethernet, and SerDes Support
WCH’s new CH32H417 microcontroller introduces a dual-core RISC-V architecture designed for embedded applications requiring high-speed connectivity and peripheral integration. It is built on the Qingke V5F core running at 400 MHz and the V3F core at 144 MHz. The microcontroller supports USB 3.2 Gen 1 with a 5Gbps PHY and dual-role host/device functionality, along with […] ⌘ Read more

⤋ Read More

Download Borderlands 2 for Mac FREE This Weekend on Steam
If you’re a Mac gamer and you love free games, you won’t want to miss out on this deal; Borderlands 2, the classic popular first-person action RPG shooter, is free to download this weekend on Steam (until the morning of June 8 at 10am PDT). And because it’s on Steam, you’ll be able to play … Read MoreRead more

⤋ Read More

Luckfox Pico 2 Adopts RP2350A Dual-Core MCU, Launches at $3.99
Luckfox has released the Pico 2 Micro Development Board, a compact module designed around Raspberry Pi’s RP2350A microcontroller. It targets embedded development and experimentation with both ARM and RISC-V instruction sets, offering dual-core support in a low-cost form factor. The RP2350A microcontroller from Raspberry Pi features a dual-core, dual-architecture design, offering both ARM Cortex-M33 and […] ⌘ Read more

⤋ Read More

Deals: AirPods Pro 2 for $169, AirPods 4 for $99, Apple Watch 10 for $299
Father’s Day is coming up, so perhaps you’re shopping for that, or shopping for yourself. In any event, don’t miss these great deals from Amazon, whether you’re getting a gift for yourself or a loved one. With great deals on the latest iPad mini, MacBook Air, AirPods, AirPods Pro with Hearing Aid functionality, Apple Watch, … [Read More](https://osxdaily.com/2025/06/06/deals-airpods-pro-2-for … ⌘ Read more

⤋ Read More

10 Incredibly Specific Oreo Facts You’ll Think About at 2 A.M.
You’ve twisted them, dunked them, and crumbled them into milkshakes—but odds are, you don’t really know Oreos. Behind the world’s best-selling cookie is a labyrinth of marketing manipulation, food science secrets, and flavor experiments so bizarre they’re hidden from the public. These aren’t your standard “Oreo was invented in 1912” trivia tidbits. These are the […]

The post [10 Incredibly Specific Oreo Facts … ⌘ Read more

⤋ Read More

Vue 團隊正式發佈!未來 Vue 也能寫後端啦!
前言–大家好,我是林三心,用最通俗易懂的話講最難的知識點是我的座右銘,基礎是進階的前提是我的初心~背景需求—-最近,我遇到了一個需求:有兩個頁面,每個頁面各自連接到一個獨立的WebSocket。這兩個頁面能夠通過WebSocket相互影響。爲了更好地理解需求,以下是兩個頁面的簡化版本:頁面 1 和頁面 2 的需求:頁面 1:當點擊更新按鈕時,頁面 1 的數值加 1,同時頁面 2 的數值變爲頁 ⌘ Read more

⤋ Read More

PEP 794: Import Name Metadata
This PEP proposes extending the core metadata specification for Python packaging to include a new, repeatable field named Import-Name to record the import names that a project owns once installed. A new key named import-names will be added to the [project] table in pyproject.toml. This also leads to the introduction of core metadata version 2.5. ⌘ Read more

⤋ Read More

golang 每日一庫之工作流引擎 cadence
Cadence 是由 Uber 開發並開源的分佈式工作流編排引擎,旨在幫助開發者構建可擴展、可靠且具備容錯能力的分佈式應用程序。這個 Uber 當前給我發了好多打車券,還是很厚道的。特點–1. 容錯的有狀態工作流Cadence 的工作流是 “容錯的有狀態工作流”,即使在進程崩潰或服務重啓的情況下,工作流的狀態(包括局部變量、調用棧、定時器等)也能自動恢復,確保業務流程不中斷。2. 異步任務與自動 ⌘ Read more

⤋ Read More