26
114
27
36

So basically I built a backend with some working endpoint and I built a React Frontend. I can run both things locally and I hosted the page on Cloudflare pages which is working. But now I’m wondering if that’s a good idea?

I have never done this before and I’m wondering if it’s secure enough to host the backend on some server and allow a CORS header to let the Frontend generate requests?

The alternative would be to host Frontend and backend on a VPS and then route my domain that I bought on Cloudflare there, but then I’m thinking that in case my Frontend is insecure somehow the whole instance would be compromised, no?

I hope this is the right platform to ask as I’m pretty new here.

28
-23
submitted 1 week ago* (last edited 1 week ago) by LabPlot@floss.social to c/programming@programming.dev

SAME STATS, DIFFERENT IMPROVEMENTS

@programming

After 12 months of managing #bugs, #developers A, B, and C changed their approach.

Assuming a steady flow of bugs of the same kind, whose change is an improvement❓

Boosts appreciated! 🙂 :boost_love:

More generally, the problem is domain independent.

#OpenSource #FreeSoftware #FOSS #FLOSS #Software #Tech #Development #Engineering #Business #Improvement #Software #Programming #Python #InfoSec #Statistics #Linux

29
56
30
10
submitted 2 weeks ago* (last edited 2 weeks 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

31
11
32
138
Dear OAuth Providers (pilcrowonpaper.com)
33
18

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.

34
98
35
8
36
23
37
45
submitted 2 weeks ago* (last edited 2 weeks ago) by greywolf0x1@lemmy.ml to c/programming@programming.dev

Posting this as it deeply resonates with me

38
42
submitted 2 weeks ago* (last edited 1 week ago) by 2xsaiko@discuss.tchncs.de to c/programming@programming.dev
39
19

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)

40
26
41
35
submitted 2 weeks ago* (last edited 2 weeks ago) by fool@programming.dev to c/programming@programming.dev

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

42
44

Free tutorial

43
43
need advices (lemmy.world)

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

44
-11

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 - { }!

45
83
46
25

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?

47
27
~ Code Crafters Cafe ~ (snac.bsd.cafe)

~ 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

48
53

This is epic. Even though it's java!

49
-8

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

50
23
view more: ‹ prev next ›

Programming

17680 readers
138 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