Programming Leftovers


-
6 Universal Readable Code Tricks To Improve Your Coding Skills • Python Land Blog
Chances are your code looks like crap, is hard to read, and hard to understand. There… I’ve said it. Sorry if that sounded harsh, but it’s the painful truth. Writing readable code is difficult.
I’ve seen too much code in my career that was written so badly that I had to throw it away and redo the entire project. And the most painful fact is that this code was not written by beginners either!
Writing nice, readable code takes time and effort, sure. But it’s also a matter of learning the right habits. With a few simple tweaks to your coding style, you can improve your code quality ten-fold without much effort.
-
gem-compare goes 1.0
What is gem-compare, you ask? gem-compare is a RubyGems plugin that can compare gem versions. I originally created it to vet new gem versions I packaged for Fedora, but it’s useful for all kinds of tasks.
-
Inject DB connections in Golang gRPC API
One of the first issues that I had to solve when I started to use gRPC was how to inject a DB connection pool to the function handling the request. The DB connection injection is needed because creating a new SQL connection every time there is a new gRPC request (and tearing it down at the end) is a massive waste of resources. Also, this approach could limit the scalability of the API since the database probably has a limited number of connections it will accept.
There are different possible ways of doing this, and some people would deem this solution as “dirty” since you will leverage Go’s context to pass the SQL connection pool to the function. Despite this, I (and many others) do not see any potential practical issue with this practice. If you see practical issues, let me know!
-
What’s New In Deno 1.19? – CloudSavvy IT
Deno 1.19 was released in February 2022 as the latest incremental update for the secure-by-design JavaScript runtime. Among the changes are a streamlined permissions management experience, first-class support for vendored dependencies, and new native web streams for files, network sockets, and standard input and output.
-
What Is Composable Code and How Can You Create It? – CloudSavvy IT
Composable code describes classes and functions that can be readily combined to create more powerful higher-level constructs. Composability compares favorably to alternative forms of code reuse such as object-oriented inheritance. It advocates the creation of small self-contained units that are treated as building blocks for bigger systems.
-
Capacitive Soil Moisture Sensor with Raspberry PI Pico: wiring, code and calibrating with MicroPython
If you are both a maker or a professional farmer, your smart watering project will always start from measuring the ground moisture. With the Capacitive Soil Moisture sensor and Raspberry PI Pico you can get great results with an affordable cost
-
Rakudo Weekly News: 2022.12 Releasomatic
Justin DeVuyst has done it again: the Rakudo Compiler Release 2022.03 is now available, binary releases have been made available by Patrick Böker, and the Linux packages by Claudio Ramirez should also be available soon. No exciting new features, mostly maintenance and some nice-to-haves this time.
-
Rust's Unsafe Pointer Types Need An Overhaul
I literally wrote the book on unsafe Rust. And the book on pointers in Rust. And redesigned the Rust’s pointer APIs. And designed the standard library’s abstraction for unsafe heap-allocated buffers. And maintain the alternative Vec layout.
-
Beingessner: Rust's Unsafe Pointer Types Need An Overhaul [LWN.net]
Aria Beingessner points out a set of problems with Rust's conception of unsafe pointers and proposes some fixes in this highly detailed post.
-

- Login or register to post comments
Printer-friendly version- 1308 reads
PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
digiKam 7.7.0 is released
After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release.
|
Dilution and Misuse of the "Linux" Brand
|
Samsung, Red Hat to Work on Linux Drivers for Future Tech
The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world.
Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility.
|
today's howtos
|








.svg_.png)
Content (where original) is available under CC-BY-SA, copyrighted by original author/s.

Recent comments
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago