Programming

17613 readers
204 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 2 years ago
MODERATORS
1
 
 

Hi all, I'm relatively new to this instance but reading through the instance docs I found:

Donations are currently made using snowe’s github sponsors page. If you get another place to donate that is not this it is fake and should be reported to us.

Going to the sponsor page we see the following goal:

@snowe2010's goal is to earn $200 per month

pay for our 📫 SendGrid Account: $20 a month 💻 Vultr VPS for prod and beta sites: Prod is $115-130 a month, beta is $6-10 a month 👩🏼 Paying our admins and devops any amount ◀️ Upgrade tailscale membership: $6-? dollars a month (depends on number of users) Add in better server infrastructure including paid account for Pulsetic and Graphana. Add in better server backups, and be able to expand the team so that it's not so small.

Currently only 30% of the goal to break-even is being met. Please consider setting up a sponsorship, even if it just $1. Decentralized platforms are great but they still have real costs behind the scenes.

Note: I'm not affiliated with the admin team, just sharing something I noticed.

2
3
6
submitted 10 hours ago* (last edited 8 hours ago) by xoron@programming.dev to c/programming@programming.dev
 
 

i wanted to see if we can create asynchronous bottom-up state management, we have the basics to put together a state management system. State management solutions in apps typically have ways to persist data.

I wanted to explore if there are any benefits to define and manage state in webcomponents with a bottom-up approach. I wanted to see if it could give a greater flexibility in developing a UI and not having to worry about persisted storage management.

https://positive-intentions.com/blog/bottom-up-storage

4
5
6
7
 
 

Howdy Everyone. I'm 1hitsong. I'm on the Jellyfin team and programmed things such as the OSD, music support, and playlist support in the Jellyfin Roku client.

I've just started a series where I share things I've learned and helpful code I've created from programming Roku channels. It's very early - only 2 posts so far, but I hope you enjoy.

8
 
 

Posting this as it deeply resonates with me

9
10
11
12
 
 

edit: title

This book is efficient and answered questions the moment as I imagined asking, but to see its unique coolness -- we could do with some context on its literary genus.

Have you ever seen Kate Gregory's talk: Teach C++ not C?

The idea is, C++ has different habits than C, even if C++ is a "99% superset of C". But beginners can understand C++ just fine without learning C first. It's more ergonomic to learn about std::vector before using raw arrays and pointers, as Gregory puts it.

So, why do we teach vim before neovim, or before a well-regarded distribution like LazyVim? Because vim is "purer", installed everywhere? Because we learned it that way? What if we taught LazyVim/Neovim before raw vim, a la C++ before C? Modern features and ergonomics will keep a beginner listening -- surely you don't disagree.

Anyway, this book is that efficient and direct path to LazyVim. It covers the things that StackOverflow won't be the most useful pedagogues for (e.g. "what are those tab things on top of my window? How do I use the explorer thingamajig on the left -- should I even care about it, anyway?"). Plus, it keeps LazyVim as a first-class learning target, providing its mnemonics and habits alongside the typical vim stuff you'd normally learn with vimtutor.

I like this kind of learning :) good for the on-the-fencers like me

13
 
 

cross-posted from: https://programming.dev/post/22672085

Earlier this year I gave this talk which is about how programmers can get the most of the Fediverse, particularly for dotnet/MAUI developers - some of the killer features which are available and how to use them. The focus of the examples are with dotnet/MAUI, but these things would undoubtedly also be available for other languages/ecosystems, I was just using dotnet/MAUI to illustrate the underlying functionality available to us here. This recording would be good for anyone who isn't familiar with these features (maybe anyone you want to convince to come here, or just if you feel you don't know everything that is available).

The first part of the recording is a different talk about MAUI, and the first link below will be where my talk starts, and then some more links for other key points, if you just want to see the parts you don't already know about.

Following these recording links will be links to resources that I talked about...

30:06 start/MAUI Lemmy community

31:31 overview of talk

33:20 what is the Fediverse?

38:15 Lemmy

42:08 Mastodon

43:40 Mastodon dotnet.social

46:33 Mastodon Local timeline

48:01 Mastodon Federated timeline

60:11 Mastodon Lists

56:28 Mastodon hashtags

56:25 Mastodon pinned posts

1:00:20 follow Twitter accounts from Mastodon

1:01:51 how to use Lemmy from Mastodon

1:07:25 Mastodon's killer feature for dev's - github bots

1:10:47 Guide to Mastodon for .NET and MAUI people

1:13:15 Pixelfed, UI comparison

1:15:41 Maho Pacheco's repo (federate static website, etc.)

1:17:52 Microsoft DevBlogs

Links to resources from this talk

Creating MAUI UI's in C#

fediverse.party

.NET MAUI @ programming.dev

.NET MAUI Mastodon bot

.NET Mastodon bot

@SmartmanApps@dotnet.social

Join dotnet.social

Join dotnet.social and auto-follow @SmartmanApps@dotnet.social

How to follow multiple hashtags in a column

@Microsoft@bird.makeup

Github bots by Carlos Sanchez of Microsoft...

Dotnet github bot

MAUI github bot

MastodonGitHubBot repo

Guide to Mastodon for dotNetMAUI and dotNet peeps

Github repo of Maho Paheco of Microsoft

Maho's guide to implement ActivityPub in a static site (or any website)

Follow Maho's blog from Mastodon (or almost any Fediverse service!)

Follow Microsoft DevBlogs (federated thanks to Maho)

14
15
 
 

Free tutorial

16
 
 

im 29 yo. recently lose my job, and thinking about use some of my saving money to school for programming, for the sake of not being homeless, but idk consider of my age, will it helps me in the future to survive if i have a degree on programming.

pardon my english

17
 
 

Today I found the weirdest bug in my life. I was making a chatbot for Signal using Ollama in Rust. I finished a basic demo and tried it. For any message I would get { }, {}, {} or { } .

Do you know how hard is to debug something like this???

What was the problem? Not my program. Ollama bug combined with ollama-rs bug (rust library for ollama). And both bugs are not even bugs if you don't combine them.

Ollama released a new feature yesterday called "Structured outputs". Basically you can specify a format of the output using format field in json request. Format field already existes for something but I don't know for what. In ollama-rs you can specify the format to json or leave it empty. By default its empty. Where is the bug?

There is a difference betwen "format": null and not specifying the format at all. Ollama-rs will set format to null if you dont specify it. Ollama will interpret null as a valid format. What happens? LLM WILL ACTUALLY GIVE YOU FORMAT OF OUTPUT AS NULL - { }!

18
19
 
 

I am fairly new to programming and for my cs class i need to run individual programs. they don't need to interact with anything else, so i am trying to just run the file I'm currently on but Kate just greys out the option. I really want to avoid using projects if i can because they're just extra effort for no reason when I only need to run a single file. I did try using one, but Kate doesn't have a new project button for some reason and i had some trouble with Cmake.

I'm aware that these are actually pretty basic things, but I can't find anything online that actually explains how to use Kate at all. I would try using something else, but every IDE seems to have this same issue where by default it can't run code and it has no documentation of any kind regarding actually running code, so i'll just stick with the one that came with my distro.

also as a bonus question, why does every IDE seem to require you to configure every single option before it can run code and why do they all seem to discourage doing anything less than making an entire app?

20
 
 

~ Code Crafters Cafe ~

We intend to save human intelligence, to preserve the ability to write code with our own hands and our own brains. Join us now on #codecrafters channel at libera.chat or discord: https://discord.gg/W7CMehj6dd

~ A cozy place in the jungle of the techno world for all programmers who like to create high-quality and effective code from scratch with their own hands. Hobbyists, professionals, beginners, and just curious about how things really work. Handmade, free and open-source software written with a love for engineering and deep knowledge is code crafting. ~

@programming@programming.dev

21
 
 

This is epic. Even though it's java!

22
 
 

I'm asking for your help to get me started. I work in backend, it's just that i've never tried to find "exploit" and "do crimes" before, i guess, so i'm just asking here in case you can "get me up to speed" sort of. I use linux and i am fairly competent in linux and programming. I know basic networking but i could learn more. I'm leaning more on the programming side than the network or sysadmin. Because i'm just starting, so far i have automated the creation of vms on linode and configuring the vms with bash scripts and ssh. And that's it. I've never been into vpns at home, but obviously im going to need a vpn because i dont want to leak my ip address, so im thinking about buying a vpn, looking into tor, or learning openvpn and rolling my own vpn.

please give me project ideas perhaps like a website with list of corrupt politicians from my country.

So... i'm asking for your help to get me started quicker if that make sense. i'm from cambodia btw

23
24
 
 

The four phases of the typical journey into coding

  1. The Hand Holding Honeymoon is the joy-filled romp through highly polished resources teaching you things that seem tricky but are totally do-able with their intensive support. You will primarily learn basic syntax but feel great about your accomplishments.
  2. The Cliff of Confusion is the painful realization that it's a lot harder when the hand-holding ends and it feels like you can't actually do anything on your own yet. Your primary challenges are constant debugging and not quite knowing how to ask the right questions as you fight your way towards any kind of momentum.
  3. The Desert of Despair is the long and lonely journey through a pathless landscape where every new direction seems correct but you're frequently going in circles and you're starving for the resources to get you through it. Beware the "Mirages of Mania", like sirens of the desert, which will lead you astray.
  4. The Upswing of Awesome is when you've finally found a path through the desert and pulled together an understanding of how to build applications. But your code is still siloed and brittle like a house of cards. You gain confidence because your sites appear to run, you've mastered a few useful patterns, and your friends think your interfaces are cool but you're terrified to look under the hood and you ultimately don't know how to get to "production ready" code. How do you bridge the gap to a real job?

Which phase are you in?

25
 
 

This mod is written in an unconventional way: it is written in Rust. The Rust code is here. It uses JNI and JVMTI to interact with Java objects. The only Java code in this mod is for loading the compiled native binary into memory.

view more: next ›