1176
12
Fuck Hackcyom (studium.dev)
1177
91

I found the https://jeffhuang.com/designed_to_last/ also good. Wondering what can auto-create the different formats for long form blog posts?

1178
100
1179
14
fitlog (github.com)

CLI Workout logger.

Features:

  • Track exercises with customizable types (weight, time, bodyweight)
  • Log workouts with sets, reps, weight, time, and notes
  • View workout history by date range or specific criteria
  • Use shortcuts for quick and efficient workout logging
  • Remove or update exercise and workout entries
  • Display workout data in clean, tabular format
  • Configuration management
  • Import and export your fitlog data

A learning project created to lean the basics of C language.

1180
13
1181
44
submitted 11 months ago* (last edited 11 months ago) by moseschrute@lemmy.world to c/programming@programming.dev

I’ve been working full time as a frontend developer for about 3 years now. I also have a bachelors degree in computer science.

I really feel like I leveled up this past year, and I wanted to share two things that stand out to me that I learned.

Keeping git work organized

It doesn’t really matter how small/large your commits are, but what matters is keeping it focused. Write a good description for your commit and don’t make unnecessary changes that aren’t related to the commit message. If you see something unrelated that needs fixing, don’t mix it in with your current work. Same goes for pull requests, which I always squash commit.

The goal is if you want to revert your commit/squashed pr later, it should only revert what’s described in the commit message. It will cause problems if the revert also brings a bunch of unrelated changes.

When to abstract

There’s a lot of opinions about DRY or WET code bases, but I think that’s confusing. When you have A and B, and you’re wondering if you should bract the shared code (let’s call this shared abstraction C), ask yourself this. Do I want it so a change to C affects A and B, or do I want changes to A to not affect B and B not to affect A?

It’s like your building knobs/dials into your codebase, and it’s up to you if you want a single dial to affect one thing or multiple things. You know you built the right dials when product asks for something later, and it’s as simple as turning the dial you created.

On the other hand, if you build something as two dials that should have been one, you may find you turn dial A and forget to turn dial B. This sounds simple, but your codebase may have thousands and thousands of dials, so the right consolidation can help with managing large projects.

In summary

Idk if that made any sense, but as I progress in my career, I’m finding I’m able to manage larger projects with less overwhelm.

1182
22
submitted 11 months ago by who@feddit.org to c/programming@programming.dev
1183
46
1184
25

Pijul is a free and open source (GPL2) distributed version control system. Its distinctive feature is to be based on a theory of patches, while still being fast and scalable. This makes it easy to learn and use, without any compromise on power or features.

Why Pijul

Pijul is the first distributed version control system to be based on a sound mathematical theory of changes. It is inspired by Darcs, but aims at solving the soundness and perfor>mance issues of Darcs.

Pijul has a number of features that allow it to scale to very large repositories and fast-paced workflows. In particular, change commutation means that changes written independently can be applied in any order, without changing the result. This property simplifies workflows, allowing Pijul to:

  • clone sub-parts of repositories
  • solve conflicts reliably
  • easily combine different versions.

The main difference between Pijul and Git (and related systems) is that Pijul stores changes (or patches), whereas Git deals only with snapshots (or versions).

1185
65
1186
209
1187
22
1188
12

More npm fun.

1189
7
1190
38

I'm at a relatively stable point in my life (working part time, financially stable), so I'm thinking about trying out as a freelancer, but just casually to start out and see if I like it. I'm curious how people get started - primarily, how to find work and connect with people who have available work and are willing to hire.

Other things to have in place before getting started (professional website, portfolio, other things) would also be helpful to know, but since I'm pretty casual about trying this out, I would hesitate to do additional stuff unless it's really important and makes a serious difference in obtaining potential clients.

Thanks in advance!

1191
40
submitted 11 months ago* (last edited 11 months ago) by orsetto@lemmy.dbzer0.com to c/programming@programming.dev

Soo I'm working on a database that needs to support multiple languages (two for now, but who knows). I stumbled across this blog post that explains how to develop what it calls a "translation subschema" (haven't seen it called like this anywhere else so I don't know if it's actually how you'd call it), which seems like a very nice way of dealing with things.

I'm not very experienced with DB stuff, so it took me a while to fully understand what it was doing, but now that (I think) I do, I'm wondering if I could just ignore the Languages table, and just use a language field in the tables TextContent and Translations, without loosing any functionality. (except of course having a table listing the available languages, which is not however something I'm interested in)

In my head everything would still work, I'd insert stuff with

INSERT INTO TextContent (OriginalText, OriginalLanguage)
VALUES ("Ciao", "it");

DECLARE TextContentId INT = SCOPE_IDENTITY();

INSERT INTO Translations (TextContentId, Language, Translation)
VALUES (@TextContentId, "it", "Ciao");
INSERT INTO Translations (TextContentId, Language, Translation)
VALUES (@TextContentId, "en", "Hello");

and given a TextContentId, i'd retrieve the correct translation with

SELECT Translation FROM Translations WHERE TextContentId = TCId AND Language = "en"

At this point, I'm thinking I could drop TextContent too, and just have a Translations table with TextContentId, Language, and Translation, with (TextContentId, Language) as primary key.

Am I missing something? I'm trying to simplify this solution but I don't want to risk making random errors.

Edit: translations on the DB are for user inserted text, which will also provide translations. The client then will only receive text it the correct language.

1192
32
1193
42
1194
28

It's been a long time since 2023, when Bun.js arrived and disrupted the JavaScript world. During that time, I was working on something unusual—something that encourages all JS developers to write API code that actually runs on top of Rust.

I gave it my best and eventually published this framework on npm. Many people asked for async support, and after countless sleepless nights, I finally achieved it. Meet Brahma-JS (brahma-firelight) one of my finest creations that replaces Node.js tcp / http module with Rust's Tokio and Hyper library inspired from Deno runtime. Also I tested against the fastest rust frame work may-mini-http.

May-MiniHTTP Benchmarks

Running 10s test @ http://127.0.0.1:8080/
  1 threads and 200 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.70ms  812.42us  20.17ms   97.94%
    Req/Sec   117.65k     7.52k  123.40k    88.00%
  1171118 requests in 10.08s, 115.04MB read
Requests/sec: 116181.73
Transfer/sec:     11.41MB

Brahma-JS Benchmarks

Running 10s test @ [http://127.0.0.1:2000/hi](http://127.0.0.1:2000/hi)
1 threads and 200 connections
Thread Stats   Avg      Stdev     Max   +/- Stdev
Latency     1.51ms  479.16us   7.89ms   78.17%
Req/Sec   131.57k     9.13k  146.78k    79.00%
1309338 requests in 10.00s, 186.05MB read
Requests/sec: 130899.58
Transfer/sec: 18.60MB

Oh sure, just another framework casually doing 130k+ requests/sec. No big deal. Totally normal. Definitely not powered by a Rust beast disguised as friendly JavaScript.

Now I have released v1.5 A stable release with support for Mac, Linux and Windows too. You can give a try by starting

npm i brahma-firelight 

If you find this framework useful plz do share your thoughts and feedbacks.

Npm : https://www.npmjs.com/package/brahma-firelight

Github: https://github.com/Shyam20001/rsjs

1195
32

Scrolling through this webpage is an adventure.

1196
10

I find this useful for finding Docker image tags for images that don't list the versions and instead suggest people to use :latest.

1197
22

I've used neovim for a couple years now, but had trouble using it professionally because package managers often break in certain environments like docker containers or remote servers. Rather than go with the graybeard option of using plain vim in unusual environments, I experimented with not using any package managers and just directly controlling the environment.

This worked surprisingly well, so I reworked my dotfiles into a shareable format - which is freak.nvim

Hope other vim appreciators enjoy =)

1198
15
submitted 11 months ago* (last edited 11 months ago) by elBoberido@programming.dev to c/programming@programming.dev

Hi everyone,

we, the iceoryx community, just released iceoryx2 v0.7, an ultra-low latency inter-process communication framework for Rust, C, C++ and with this release, Python.

If you are into robotics, embedded real-time systems (especially safety-critical), autonomous vehicles or just want to hack around, iceoryx2 is built with you in mind.

Check out our release announcement for more details: https://ekxide.io/blog/iceoryx2-0-7-release

And the link to the project: https://github.com/eclipse-iceoryx/iceoryx2

1199
-22
1200
47
view more: ‹ prev next ›

Programming

28304 readers
573 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS