Programming Leftovers

-
Maxim Burgerhout: Fish, bash, zsh
Over the last year, I’ve been using fish as my shell on Linux. Before that, I have tried both zsh (with and without oh-my-zsh) and bash. For bash, I wrote my own configuration framework, which - let’s be real - everyone needs to do and probably has done at some point.
Last week, I decided to switch back from fish to bash. This blog is the story why I did that and what I’m using now. I might look into zsh again at some point, but not now.
-
Write good examples by starting with real code
When I write about programming, I spend a lot of time trying to come up with good examples. I haven’t seen a lot written about how to make examples, so here’s a little bit about my approach to writing examples!
The basic idea here is to start with real code that you wrote and then remove irrelevant details to make it into a self-contained example instead of coming up with examples out of thin air.
I’ll talk about two kinds of examples: realistic examples and suprising examples.
[...]
The example I just gave of explaining how to use sort with lambda is pretty simple and it didn’t take me a long time to come up with, but turning real code into a standalone example can take a really long time!
For example, I was thinking of including an example of some weird CSS behaviour in this post to illustrate how it’s fun to create examples with weird or surprising behaviour. I spent 2 hours taking a real problem I had this week, making sure I understood what was actually happening with the CSS, and making it into a minimal example.
In the end it “just” took 5 lines of HTML and a tiny bit of CSS to demonstrate the problem and it doesn’t really look like it took hours to write. But originally it was hundreds of lines of JS/CSS/JavaScript, and it takes time to untangle all that and come up with something small that gets at the heart of the issue!
-
Jussi Pakkanen: A followup to the Refterm blog post
My previous blog post was about some measurements I made to Refterm. It got talked about on certain places on the net from where it got to Twitter. Then Twitter did the thing it always does, which is to make everything terrible. For example I got dozens of comments saying that I was incompetent, an idiot, a troll and even a Microsoft employee. All comments on this blog are manually screened but this was the only time when I just had to block them all. Going through those replies seemed to indicate that absolutely everyone involved [1] had bad communication and also misunderstood most other people involved. Thus I felt compelled to write a followup explaining what the blog post was and was not about. Hopefully this will bring the discussion down to a more civilized footing.
[...]
I pondered for a while whether I should mention the memcpy thing and now I really wish I hadn't. But not for the reasons you might think.
The big blunder I did was to mention SIMD by name, because the issue was not really about SIMD. The compiler does convert the loop to SIMD automatically. I don't have a good reference, but I have been told that Google devs have measured that 1% of all CPU usage over their entire fleet of computers is spent on memcpy. They have spent massive amounts of time and resources on improving its performance. At least as late as 2013, performance optimizing memcpy was still subject to fundamental research (or software patents at least). For reference here is the the code for the glibc version of memcpy, which seems to be doing some special tricks.
If this is the case and the VS stdlib provides a really fast memcpy then rolling your own does cause a performance hit (though in this particular case the difference is probably minimal, possibly even lost in the noise). On the other hand it might be that VS can already optimize the simple version to the optimal code in which case the outcome is the same for both approaches. I don't know what actually happens and finding out for sure would require its own set of tests and benchmarks.
-
This Week in Rust 398
-
3 reasons Quarkus 2.0 improves developer productivity on Linux | Opensource.com
No matter how long you work as an application developer and no matter what programming language you use, you probably still struggle to increase your development productivity. Additionally, new paradigms, including cloud computing, DevOps, and test-driven development, have significantly accelerated the development lifecycle for individual developers and multifunctional teams.
You might think open source tools could help fix this problem, but I'd say many open source development frameworks and tools for coding, building, and testing make these challenges worse. Also, it's not easy to find appropriate Kubernetes development tools to install on Linux distributions due to system dependencies and support restrictions.
Fortunately, you can increase development productivity on Linux with Quarkus, a Kubernetes-native Java stack. Quarkus 2.0 was released recently with useful new features for testing in the developer console.
-
GSoC 21 Projects mentored by Collabora for LibreOffice
Summer is synonymous with the opportunity to participate in beautiful projects. Let’s look at the students who work in improving LibreOffice during the Google Summer of Code. This year, four of the approved GSoC projects for the LibreOffice community are mentored by Collabora developers. Find out about the improvements they are currently implementing!
-

- Login or register to post comments
Printer-friendly version- 2101 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