Programming

16752 readers
234 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 [email protected]



founded 1 year ago
MODERATORS
51
52
 
 

What side projects can I work on that will impress the heck out of employers?

53
 
 

Youtube link: https://www.youtube.com/watch?v=xx7Lfh5SKUQ

A fairly in-depth and "dense" C3 talk about the AGC that covers the architecture and instruction set, the hardware implementation, peripherals, and the system & mission software.

Really interesting stuff if you're into retrocomputing and/or computers that got people to the fucking Moon, and if you're not the sort of person who turns into an unskippable cutscene when the AGC is mentioned, you'll probably learn a lot. If you're like me and you are that sort of person, you'll probably enjoy the talk anyhow.

(book tips: The Apollo Guidance Computer: Architecture and Operation by Frank O'Brien for AGC details, and Digital Apollo by David Mindell for a general overview of the automation in Apollo)

54
55
35
JSON Patch (jsonpatch.com)
submitted 3 weeks ago by [email protected] to c/[email protected]
56
57
58
59
60
61
 
 

Alright, let’s dive into the world of PHP content management systems and eCommerce platforms. WordPress, Joomla, OpenCart, and Magento all bring something to the table, but WordPress is the heavyweight champ when it comes to popularity. Now, I’m not exactly a WordPress fan myself, but I can’t ignore the fact that its biggest selling point is how it lets folks who don’t know a lick of programming still make a splash in web development. WordPress started out as a simple blogging tool, but it's become a juggernaut of a CMS. The thing that really sets it apart is how easy it is to use. It’s got this super user-friendly interface and a massive library of plugins and themes. This means you can build a site without having to mess around with much code. It’s like an entry-level ticket to web development—you don’t need to be a coding guru to get things up and running. Joomla, though, is no slouch and definitely deserves a shout-out as a serious competitor. It’s got a lot of power and flexibility, making it a solid choice for more complex sites. Joomla’s admin panel can be a bit of a brain teaser compared to WordPress, but that complexity also means it’s got more advanced features. It’s perfect for sites that need a bit more structure and functionality, like social networks or community sites. If you’re someone who’s comfortable with a steeper learning curve, Joomla’s got the goods to handle bigger, more intricate projects. OpenCart is geared specifically towards eCommerce and is pretty straightforward when it comes to setting up an online store. It’s a good option if you’re focused on selling stuff online without getting into too many technical weeds. On the flip side, Magento is the big dog of the eCommerce world, built for large-scale operations. It’s incredibly flexible but requires a solid understanding of its setup and customization. So, to wrap it up: WordPress is all about ease of use and accessibility, making it a go-to for those without much programming know-how. It’s the gateway drug for people who want to get into web development without diving deep into code. Joomla, meanwhile, stands tall as a real competitor with its robust features and flexibility for more complex sites. Each platform has its own strengths, but WordPress’s appeal lies in its ability to get newbies into the game with minimal fuss. I haven't forgotten about Drupal and other options, but this is just a quick and simple rundown. Personally, I like to choose between them based on the project's needs, and for me, Joomla is the top pick. What’s your take?

62
46
20 new CSS viewport units (web.archive.org)
submitted 3 weeks ago* (last edited 3 weeks ago) by [email protected] to c/[email protected]
63
 
 

I've found lots of examples in C of programs illustrating buffer Overflows, including those of pointer rewrites which has been of great help in understanding how a buffer overflow works and memory safety etc. but I've yet to be able to find an example illustrating how such a buffer overflow can rewrite a pointer in such a way that it actually results in code execution?

Is this just not a thing, or is my google-fu rust y? Tried ChatGPT and my local Mistral and they both seem unable to spit out precisely what I'm asking, so maybe I'm wording this question wrong.

If anyone in here knows, could point me in the right direction? Thanks y'all btw love this community 🧡

64
65
66
67
9
submitted 3 weeks ago* (last edited 3 weeks ago) by [email protected] to c/[email protected]
 
 

Hello folks. So I'm still not good at Rust and learn even basics after years (just on and off doing some stuff). I'm currently working on my first small GUI application with FLTK in Rust. It's not that important for my question, but I think this gives a bit of context. The actual question is about struct and impl, using a builder pattern like pattern, but without impl builder and build() function.

Normally with the builder pattern, there are at least two structs and impl blocks. One dedicated to build the first struct. But I am doing it with only one struct and impl block, without a build() function. But it is functionally (at least conceptional) the same, isn't it? A shorted example for illustration:

Edit: Man beehaw is ruining my code blocks removing the opening character for >, which wil be translated to < or or completely removed. I use a % to represent the opening.

struct AppSettings {
    input_directory: Option%PathBuf>,
    max_depth: u8,
}

impl AppSettings {
    fn new() -> Self {
        Self {
            input_directory: None,
            max_depth: 1,
        }
    }

    fn input_directory(mut self, path: String) -> Self {
        self.input_directory = match path.fullpath() {
            Ok(p) => Some(p),
            Err(_) => None,
        };

        self
    }

    fn max_depth(mut self, levels: u8) -> Self {
        self.max_depth = levels;

        self
    }
}

And this is then used in main like

    let mut appsettings = AppSettings::new()
        .input_directory("~/test".to_string())
        .max_depth(3);

BTW I have extended PathBuf and String with a few traits. So if you wonder why I have code like this path.fullpath() . So just ignore that part. I'm just asking about the builder pattern stuff. This works for me. Do I miss something? Why would I go and do the extra step of creating another struct and impl block to build it and a final struct, that is basically the same? I don't get that.

Is this approach okay in your mind?

68
69
70
71
72
 
 

In this article, we will explore the key differences between Ktor and Spring Boot for Kotlin developers based on the experience of various developers.

73
74
 
 

Massive context window, free tier, suuuuuuuper fast. So far the best copilot I've tested; highly recommended.

75
 
 

This article aims to explore several common misconceptions of SwiftUI to help developers better understand and utilize SwiftUI

view more: ‹ prev next ›