Programming

17089 readers
69 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 1 year 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
 
 

I begun learning programming a few years ago, and it feels like I barely progressed. I know the basics and a bit of advanced python(I have learnt to use a few libraries), html and css plus a tiny bit of c++, but not much outside of those. I enjoy programming and solving problems using code, and it’s an enjoyable hobby of mine. But I feel like all I do is extremely basic and I want to advance but it feels overwhelming seeing the countless of things I could learn.

I wanna know what are ways I can actually apply the things I have learnt/will learn on somewhat worthwhile things, because the main problem right now is that I don’t really have anything to do with the things I’ve learnt other than silly projects that don’t really last more than a day and aren’t that complex. I also want to advance my knowledge as previously stated since I feel like I know too little for the amount of time I’ve been learning to program.

For context I’m still in school but not too far off from higher ed, and I have a decent amount of free time on most days(~2-4 hrs).

Thanks if you reply

3
2
Functional Web Components (mastodon.social)
submitted 12 hours ago* (last edited 12 hours ago) by xoron@mastodon.social to c/programming@programming.dev
4
 
 

https://ideatrash.net/2024/09/lies-damn-lies-and-surveys-about-ai.html

The author here breaks down GitHub’s self-congratulatory survey on Copilot and argues that GitHub’s claims are not supported by their data.

5
 
 

@programming@programming.dev Nelua programming language, any one Nim or better?

”What is Nelua?
Nelua is a systems programming language for performance sensitive applications, like real-time applications and game engines. Its syntax and semantics are similar to Lua, but its garbage collection is optional, it provides optional type notations, and it is free from an interpreter. Nelua uses ahead-of-time compilation to generate optimized native binaries. It is metaprogrammable at compile-time using Lua and it is simple and easy to use.

Nelua takes advantage of ahead-of-time compilation using powerful, optimized C compilers such as GCC or Clang, and thus generates very efficient native code. No interpreter is needed at runtime.

Nelua compiles to C first then to native code, thus you can read and debug the generated C code, mix in other C code without costs, create or use C libraries, use C tools, and reuse the generated C code. You can think of Nelua like a "better C" heavily inspired by Lua.”

Any thoughts, experiences?

6
7
 
 

I am currently taking a cybersecurity course and as the topic of my project I chose pentesting. I am aware there are CTFs and intentionally vulnerable applications, but I thought it would be interesting and fun to audit projects of other people who are also just students and/or learning programming.

If you have a webapp, mobile application or any other internet connected project that has enough of an attack surface then I would love to get in touch and possibly pentest it. Of course I'd report any issues I'd find so hopefully it would benefit both parties.

I also do pentesting as my job, so I am not a total newbie. If you have any questions feel free to reply here or DM me. If you are scared of letting someone you don't know pentest your application (which is understandable) I can also help with setting up a testing environment, creating mock data, etc.

Thanks in advance!

8
 
 

I'm a newbie to ActivityPub so please be patient with me.

All intros into ActivityPub speak about how a user of a server A subscribes to a specific community from server B, and then server A will be informed about changes in that community.

But on lemmy it's possible to look at the posts of all communities. For a single concrete community it would be relatively easy: server A gets the request to serve the top post of a community on server B, so A simple asks B for the posts.

But there is also the "posts from all communities" tab on the lemmy front page. This opens questions:

Does each lemmy instance has a full copy of all posts of all communities? If this is true: How are new Instances discovered? Is each Instance distributing all updates to all other Instances?

If each lemmy instance has only a partial dataset (this theory is backed by [1] "Only if a least one user on your instance subscribes to the remote community, will the community send updates to your instance.") then how is the "all posts" view composed? is it in reality not "all" but only "all posts that at least one user of this instance is subscribed to"?

If this is the case: what happens if a bad actor subscribes to all communities of all servers? Is there a maximum number of subscriptions per user?

The source of those questions is, that I'm looking for a way to subscribe to all events of all lemmy instances, to be able to build statistics about upvotes, new posts, comments etc. There seems to be a similar API endpoint for mastadon [2] but nothing for lemmy?!

9
 
 
10
 
 
11
 
 

I went to my local library today and noticed there's a lot of networking, cybersecurity, tcp/ip books from the early 2000s. Now, I want more modern versions of these types of handbooks. Does anyone know any good modern handbooks that deal with networking or network security standards?

Thanks :)

12
 
 

I am a fresh software engineering graduate and I am looking for something to improve my problem solving skills, while I did learn about basic algorithms and data structures, I feel like I could learn further more, I know about big O, fast sorting algorithms, dynamic programming, backtracking, binary trees (Although I do not think I know everything about them), I also know about low level memory concepts.

I am sure I forgot to mention some of the stuff I also know about, but I hope the ones I mentioned give a good insights on where I should move onto next.

13
 
 

From the repo

A (somewhat opinionated) list of SQL tips and tricks that I've picked up over the years in my job as a data analyst.

14
 
 

Git cheat sheets are a dime-a-dozen but I think this one is awfully concise for its scope.

  • Visually covers branching (WITH the commands -- rebasing the current branch can be confusing for the unfamiliar)
  • Covers reflog
  • Literally almost identical to how I use git (most sheets are either Too Much or Too Little)
15
16
 
 

This looks pretty cool for quick deployment of hobby projects. Production grade and easy to use is always a win in my book.

17
 
 

@programming@programming.dev It's time to return to the roots, to the C programming language.

Why am I writing this post? Not because I hope for something or believe in change. These are just words. I could write this at the end, but then you would be looking for answers for me while reading, and I don’t need them. They won’t change anything.
So here it is. I don’t claim to be a software development guru or a C language expert. I’m just a simple developer.

- Why are we looking for new technologies? Why do we want to be part of a community that is buzzing with new projects? Why do we think that this new programming language will definitely help us create something amazing and truly great and, of course, will make us rich and provide us with a comfortable old age?

- Why are we offered so many courses in so many programming languages and frameworks? Why do we teach what is required for companies that make money from us?

- Why are there a lot of conferences on banal simple things, such as *** framework or ### technology (so as not to offend anyone), and there, with a smart look, newly minted gurus tell us how important it is to be able to transfer the value to the client and how to use certain templates?

- Why do computers become more and more powerful, but programs continue to lag?

- Why, when applying for a job, do we look for a vacancy based on knowledge of a programming language, but find it only based on knowledge of certain frameworks? Is it really difficult for a professional programmer to learn a framework in a week?

- Why do we go into software development with the enthusiasm to create something great, but end up in a situation where we are developing some other catalog or some other digital yo-yo to make money?

Reason: because we want our passion for programming, our interest, to also bring us income.
Result: we do not earn this money for ourselves, but for companies whose main goal is to quickly receive income from the software they sell.

I look at how programming has changed over the course of 25 years, what they teach at universities, and where they start. And I came to the conclusion that on a large scale, it was all for the benefit of giant companies or the government.

We must protect the “intimate” knowledge of the foundations and water the roots ourselves. Because they don’t realize, they don’t see that if the roots are not watered, the branches on which they sit will dry out. Therefore, who, if not us?!

18
19
-40
submitted 1 day ago* (last edited 1 day ago) by modev@snac.bsd.cafe to c/programming@programming.dev
 
 

@programming@programming.dev Why is C hidden gold?

Let's say you decide to learn programming. You have two options. Either use the education system (college or courses) or become self-taught. In the first case, you will learn the programming languages that are imposed on you. The education system (universities, colleges, courses) uses the "modern" development stack. Because what matters to them is what can later bring income to companies and you in life, and taxes to the state. They are part of the system and that's how it works. Or because they want to get certificates from industry giants and use everything in their implementation - from development tools to ideology. Only a very few colleges and courses specializing in a very narrow field, such as embedded devices, can teach you the C language.

If you choose to learn programming on your own, the first thing you will do is go to the Internet to determine where to start and what you need to learn today. Naturally, you will find there a lot of articles and posts on the topic of "what programming language to learn in X year". And they will contain a detailed or not very detailed comparison of “modern” languages. But you are unlikely to find the C language among them. Moreover, almost all of these languages will have the intention of being “C replacements”. Naturally, you will choose a new, powerful, and promising language that will replace the “dying C”, while you “look to the future”. You will never find phrases like “Rust is a replacement for Zig” or vice versa, they will all be “replacements for C”. And by doing this they are trying to hide the C language.
We have seen why the C programming language is hidden.

But suddenly one wonderful day you came across a post with the words “give C language a try”, or, if you are over 40, you remembered where you started learning programming as a child before you started writing all this “SaaS garbage”. And you thought “well, okay, what if there is something, here is nothing to lose anyway”. And you started learning C, simultaneously integrating into the C community. And then you discover, to your surprise, that the C language is simple and effective, applicable everywhere, and continues to develop. And the community is kind, not pompous, without hype, and buzzing with interesting projects. You realized that the C language is not dying and is not going to die, as the "gurus" on youtube taught you and representatives of the "modern" language communities argued with foam at the mouth. And that it is unlikely that C will be able to replace anything in the near future. It's as if you have found "your home" again, something you have been looking for a long time, but could not express in words. You have returned to the roots.
And this is why the C language is gold.

Look for your "gold", never give up. When you find it, you will know for sure that this is it. Thanks for reading!

20
 
 

You can now inspect the DOM tree, view styles, evaluate JavaScript, and read console messages in Servo!

21
 
 

Hey all, I'm still a junior dev with years of experience in IT. One of the things I've noticed since making the switch is that (at least where I work) documentation is inconsistent.

Things I encounter include incomplete documentation, outdated documentation and written process details that have assumed knowledge which makes it difficult for junior Devs to pick up.

I've had a search and a lot of what is out there talks more about product and how to document that SDLC rather than best practice in writing and organising documents against the actual software engineering and its processes.

Does anyone have any good sources or suggestions on how I could look to try and begin to improve documentation within my team?

22
 
 

I figured out how to remove most of the safeguards from some AI models. I don't feel comfortable sharing that information with anyone. I have come across a few layers of obfuscation to make this type of alteration more difficult to find and sort out. This caused me to realize, a lot of you are likely faced with similar dilemmas of responsibility, gatekeeping, and manipulating others for ethical reasons. How do you feel about this?

23
 
 

10 Chrome extensions that can make you 10x developer

24
 
 

Have you performed simple arithmetic operations like 0.1 + 0.2? You might have gotten something strange: 0.1 + 0.2 = 0.30000000000000004.

25
 
 

I have a .Net Core (ver 8.0) multiproject solution which uses a native library on linux (.so).

When I start the project with debugger on, the program exits with code 0 and without any messages when hitting the line which loads the library.
Without the debugger, it runs without issues.

So does somebody know how I can get debugging to work?

view more: next ›