Sidebar

Learn Programming

learn_programming
Learn Programming JaumeI 1 year ago 94%
Please read: community rules

This community is aimed at two specific topics: - Support general programming questions, of any language, mainly for people beginning their journey in programming. - Give some advice on programming education or career. What this community **doesn't** intend to do: - Give specific answers to very specific, non-beginners, problems of a particular language. You probably can go to a community of that language to get help with that. - Solve your programming assignments. You can ask for a specific issue, but it's essential that you learn to think and solve them, or you'll never progress. As suggested by [Captain Janeway](https://lemmy.world/u/captainjaneway), here are some rules specific to the posts: - Paste your code. Unless there's not any other way, please don't provide screenshots of the code, it's harder to review. - If possible, try to provide a runnable example of the code in question - Explain as much as you can: what you’ve tried, what the error is, what you think the problem is - As usual, be kind The probability of getting an answer will increase dramatically if you follow these points. This post will be updated periodically, with any new inputs considered necessary.-----

17
0
learn_programming
Learn Programming andioop 4 weeks ago 95%
What are some easy-to-solve errors you spent awhile fixing?

I just spent an hour searching for how I could have gotten an > Uncaught TypeError: Cannot set properties of null javascript. I checked the spelling of the element whose property I was trying to set and knew that element wasn't null because the spelling was the same in the code as in the HTML. I also knew my element was loading, so it wasn't that either. Turns out no, the element *was* null. I was trying to set " NameHere" when the element's actual name was "NameHere". Off by a *single space*. No wonder I thought the spelling was the same—because all the non-whitespace was identical. (No, the quotation marks slanting in the second NameHere and being totally vertical in the first NameHere wasn't a part of the error, I am typing them all vertical and either Lemmy or my instance is "correcting" them to slanted for the second NameHere. But that is also another tricky-to-spot text difference to watch out for!) And what did not help is that everywhere I specifically typed things out, I had it correct with no extra spaces. Trying to set " NameHere" was the result of modifying a bunch of correct strings, remembering to account for a comma I put between them, but *not* remembering to account for the space I added after the comma. In short, I only ever got to see " NameHere" written out in the debugger (which is how I caught it after like 30 repeats of running with the debugger), because everywhere I had any strings written out in the code or the HTML it was always written "NameHere". I figured I'd post about it here in case I can help anyone else going crazy over an error they did not expect and cannot figure out. Next time I get a similar error I will not just check spelling, I'll check *everything* in the name carefully, especially whitespace at the beginning and end, or things one space apart being written with two spaces instead. Anyone else have a similar story to save the rest of us some time?

18
17
learn_programming
Learn Programming Cyno 1 month ago 92%
I don't grok repositories and services and where's the cut-off point for them

I understand the basic principle but I have trouble determining what is the hard line separating responsibilities of a Repository or a Service. I'm mostly thinking in terms of c# .NET in the following example but I think the design pattern is kinda universal. Let's say I have tables "Movie" and "Genre". A movie might have multiple genres associated with it. I have a MovieController with the usual CRUD operations. The controller talks to a MovieService and calls the CreateMovie method for example. The MovieService should do the basic business checks like verifying that the movie doesn't already exist in the database before creating, if all the mandatory fields are properly filled in and create it with the given Genres associated to it. The Repository should provide access to the database to the service. It all sounds simple so far, but I am not sure about the following: - which layer should be responsible for column filtering? if my Dto return object only returns 3 out of 10 Movie fields, should the mapping into the return Dto be done on the repository or service layer? - if I need to create a new Genre entity while creating a new movie, and I want it to all happen in a single transaction, how do I do that if I have to go through MovieRepository and GenreRepository instead of doing it in the MovieService in which i don't have direct access to the dbcontext (and therefore can't make a transaction)? - let's say I want to filter entries specifically to the currently logged in user (every user makes his own movie and genre lists) - should I filter by user ID in the MovieService or should I implement this condition in the repository itself? - is the EF DbContext a repository already and maybe i shouldn't make wrappers around it in the first place? Any help is appreciated. I know I can get it working one way or another but I'd like to improve my understanding of modern coding practices and use these patterns properly and efficiently rather than feeling like I'm just creating arbitrary abstraction layers for no purpose. Alternatively if you can point me to a good open source projects that's easy to read and has examples of a complex app with these layers that are well organized, I can take a look at it too.

11
10
learn_programming
Learn Programming andioop 1 month ago 97%
How to go from writing code that works to writing efficient, clean code and following good practices?

Besides some of the very, very obvious (don't copy/paste 100 lines of code, make it a function! Write comments for your future self who has forgotten this codebase 3 years from now!), I'm not sure how to write clean, efficient code that follows good practices. In other words, I'm always privating my repos because I'm not sure if I'm doing some horrible beginner inefficiency/bad practice where I should be embarrassed for having written it, let alone for letting other people see it. Aside from https://refactoring.guru, where should I be learning and what should I be learning?

40
28
learn_programming
Learn Programming joshthewaster 1 month ago 100%
Classes and objects. Just started learning, working in python.

So I have struggled with classes and objects but think I'm starting to get it...? As part of a short online class I made a program that asked a few multiple choice questions and returns a score. To do this there are a few parts. 1. Define some inputs as lists of strings ((q, a), (q2, a2),...). The lists contain the questions and answers. This will be used as input and allows an easy way to change questions, add them, whatever. 2. Create a class that takes in the list and creates objects - the objects are a question and it's answer. 3. Create a new list that uses that class to store the objects. 4. Define a function that iterates over the list full of question/answer objects, and then asks the user the questions and tallies the score. Number 2 is really what I am wondering about, is that generally what a class and object are? I would use an analogy of a factory being a class. It takes in raw materials (or pre-made parts) and builds them into standard objects. Is this a reasonable analogy of what a class is?

20
4
learn_programming
Learn Programming Cyno 2 months ago 100%
Making a database identifier unique per user?

Let's say I am making an app that has table Category and table User. Each user has their own set of categories they created for themselves. Category has its own Id identity that is auto-incremented in an sqlite db. Now I was thinking, since this is the ID that users will be seeing in their url when editing a category for example, shouldn't it be an ID specific only to them? If the user makes 5 categories they should see IDs from 1 to 5, not start with 14223 or whichever was the next internal ID in the database. After all when querying the data I will only be showing them their own categories so I will always be filtering on UserId anyway. So let's say I add a new column called "UserSpecificCategoryId" or something like that - how do I make sure it is autogenerated in a safe way and stays unique per user? Do I have to do it manually in the code (which sounds annoying), use some sort of db trigger (we hate triggers, right?) or is this something I shouldn't even be bothering with in the first place?

21
19
learn_programming
Learn Programming joshthewaster 2 months ago 93%
Just started learning python - question about types of statements.

Just started as in, I'm about an hour into a 4 hour intro video. Seeing two basic ways of manipulating things and don't understand the difference. If I want to know the length of a string and I just guess at how to do it I would try one of these two things, 1. Len(string) 2. string.len() What is the difference between these types of statements? How do I think about this to know which one I should expect to work?

26
20
learn_programming
Learn Programming hal56 2 months ago 100%
Struggling with learning testing

I am really struggling to include proper testing practices into my code and would appreciate any advice on how to get going. I work in web dev so my I am interested in how to properly implement a suite of tests for websites and incorporate into it a CI/CD pipeline. I find a lot of tutorials teach the most basic types of unit tests, 90% of the time most instructors teach how to write a test to sum two numbers, but when it comes to writing real unit test I find it hard to know what I should be testing. I learnt some cypress and have gotten better at including end-to-end testing because that makes more sense to me, but I still feel I am way short of where I should be. How can I move forward? Did anyone else find themselves in my situation and find good resources to help them learn? Thx

16
6
learn_programming
Learn Programming ericjmorey 2 months ago 40%
People often say they can't think of any ideas to practice coding. Maybe try this suggestion for some inspiration.

### I asked some LLM chatbots to give me some silly ideas to try. Below are a few of my favorite responses. --- From [Perplexity.ai](https://www.perplexity.ai/search/hey-give-me-10-stupid-project-j70cAZsbSZ.MkoyeIG5cFg) > Six Degrees of Wikipedia: Creating a program that finds the shortest path between two random Wikipedia articles using graph traversal algorithms. This applies graph theory concepts to explore connections in a large knowledge base. > Emoji Encryption: Using hash tables and cryptographic algorithms to create an encryption system that converts text to emojis. This could be an interesting way to explore cryptography concepts in a fun, visual way. --- From [Gemini.google.com](https://g.co/gemini/share/b570fa16424e) > Procrastination Station: This website creates increasingly elaborate and ridiculous tasks to distract you from what you actually need to do. Dishes? Nah, fold your socks into origami cranes! > Dramatic Password Validator: Forget boring error messages. This program rejects weak passwords with Shakespearean insults or movie villain monologues. --- From [Chatgpt.com](https://chatgpt.com/share/49b0753c-47f1-4d12-87a9-b8f14572f738) > 3. **Time Travel Email Service**: Build a data structure that allows you to send emails to yourself in the past, with time complexity considerations that are totally ignored because it’s time travel. > 4. **Mood-Driven Random Number Generator**: Implement an algorithm that generates random numbers based on the mood of the user, using sentiment analysis on real-time facial expressions.

-3
3
learn_programming
Learn Programming drem 2 months ago 100%
Cleanest way to manage unique objects in C++?

Hello, I would like to store these http headers in classes: ``` Host: developer.mozilla.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br Referer: https://developer.mozilla.org/testpage.html Connection: keep-alive Upgrade-Insecure-Requests: 1 If-Modified-Since: Mon, 18 Jul 2016 02:36:04 GMT If-None-Match: "c561c68d0ba92bbeb8b0fff2a9199f722e3a621a" Cache-Control: max-age=0 ``` As you can see, many have unique data (numbers, strings, list of strings). I would like to: - store a header name - store list of possible options for that header (or store if it's a number) - read an input header and store and return the found option / list of options / number - make adding new types of headers as easy as possible Is making hard coded classes for every type of header viable? How would this be done in the cleanest way possible?

18
9
learn_programming
Learn Programming Eezyville 3 months ago 92%
Open Source 'Eclipse Theia IDE' Exits Beta to Challenge Visual Studio Code -- Visual Studio Magazine visualstudiomagazine.com

[The project home page.](https://theia-ide.org) [The Github](https://github.com/eclipse-theia/theia) Looks just like VS Code and I think it's still built on electron so take that as you will.

44
6
learn_programming
Learn Programming Binette 3 months ago 100%
How do I learn to optimize my code better?

I'm trying to make minesweeper using rust and bevy, but it feels that my code is bloated (a lot of for loops, segments that seem to be repeating themselves, etc.) When I look at other people's code, they are using functions that I don't really understand (map, zip, etc.) that seem to make their code faster and cleaner. I know that I should look up the functions that I don't understand, but I was wondering where you would learn stuff like that in the first place. I want to learn how to find functions that would be useful for optimizing my code.

27
19
learn_programming
Learn Programming ZILtoid1991 3 months ago 100%
X11 + OpenGL window resizing issues

When resizing an X11 window with OpenGL content, the image becomes garbled and certain parts of the window, usually at the parts that wasn't originally part of the initial framebuffer. I couldn't find any documentation on if I supposed to call some extra functions when the window is being resized or not. I otherwise process that even as a system event, so it can be further processed by the program using my API.

6
0
learn_programming
Learn Programming thirdBreakfast 3 months ago 100%
Value of "encrypted at rest" data

I'm writing a specification for a web app that will store sensitive user data, and the stakeholder asked that I consider a number of fairly standard security practices, but also including that the data be "encrypted at rest", i.e. so that if someone gains physical access to the hard disk at some later date the user data can't be retrieved. The app is to be Node/Express on a VPS (probably against sqlite3), so since I would be doing that using an environmental variable stored in a file on that same computing instance, is that really providing any extra security? I guess cloud big boys would be using key management systems to move the key off the local instance, and I could replicate that by using (Hashicorp Vault?) or building a service to keep the key elsewhere, but then I'd need secure access to that service, which once again would involve a key being stored locally. What's your thoughts, experience, or usual practice around this?

16
4
learn_programming
Learn Programming Hammerheart 4 months ago 100%
Weird behavior in python (tkinter) [SOLVED]

I'm working on a little gui app that will eventually (hopefully) add a watermark to a photo. But right now I'm focused on just messing around with tkinter and trying to get some basic functionality down. I've managed to display an image. Now I want to change the image to whatever is in the Entry widget (ideally, the user would put an absolute path to an image and nothing else). When I click the button, it makes the image disappear. I made it also create a plain text label to see if that would show up. It did. Okay, time to break out the big guns. Add a breakpoint. `py -m pdb main.py`. it works. wtf? ```python def change_image(): new_image = Image.open(image_path.get()).resize((480, 270)) new_tk_image = ImageTk.PhotoImage(new_image) test_image_label.configure(image=new_tk_image) breakpoint() ``` with the breakpoint, the button that calls change_image works as expected. But without the breakpoint, it just makes the original image disappear. Please help me understand what is happening! edit: all the code ```python import io import tkinter as tk from pathlib import Path from tkinter import ttk from PIL import ImageTk from PIL import Image from LocalImage import Localimage from Layout import Layout class State: def __init__(self) -> None: self.chosen_image_path = "" def update_image_path(self): self.chosen_image_path = image_path.get() def change_image(): new_image = Image.open(image_path.get()).resize((480, 270)) new_tk_image = ImageTk.PhotoImage(new_image) test_image_label.configure(image=new_tk_image) breakpoint() TEST_PHOTO_PATH = "/home/me/bg/space.png" PIL_TEST_PHOTO_PATH = "/home/me/bg/cyberpunkcity.jpg" pil_test_img = Image.open(PIL_TEST_PHOTO_PATH).resize((480,270)) # why does the resize method call behave differently when i inline it # instead of doing pil_test_img.resize() on a separate line? root = tk.Tk() root.title("Watermark Me") mainframe = ttk.Frame(root, padding="3 3 12 12") mainframe.grid(column=0, row=0, sticky="NWES") layout = Layout(mainframe) image_path = tk.StringVar() tk_image = ImageTk.PhotoImage(pil_test_img) test_image_label = ttk.Label(image=tk_image) entry_label = ttk.Label(mainframe, text="Choose an image to watermark:") image_path_entry = ttk.Entry(mainframe, textvariable=image_path) select_button = ttk.Button(mainframe, text="Select", command=change_image) hide_button = ttk.Button(mainframe, text="Hide", command= lambda x=test_image_label: layout.hide_image(x)) test_text_label = ttk.Label(mainframe, text="here i am") empty_label = ttk.Label(mainframe, text="") for child in mainframe.winfo_children(): child.grid_configure(padx=5, pady=5) entry_label.grid(column=0, row=0) image_path_entry.grid(column=1, row=0) hide_button.grid(column=0, row=3) select_button.grid(column=0, row=4) test_image_label.grid(column=0, row=5) empty_label.grid(column=0, row=6) image_path_entry.insert(0,TEST_PHOTO_PATH) image_path_entry.focus() breakpoint() root.mainloop() ```

15
9
learn_programming
Learn Programming harendra21 5 months ago 72%
JavaScript Daily Quiz and Code Snippets app.withcodeexample.com

I have created this app for javascript beginners. Users can attempt daily quiz and see the explanation after each answer. Also providing the frequently used code snippets, you can download beautiful images of code snippets and quiz. Please provide your feedback.

5
0
learn_programming
Learn Programming linuxPIPEpower 5 months ago 65%
Can I learn android development in a non-javscript IDE? DAE find electron/javascript IDEs confusing?

Does anyone else find javascript/electron-based code editors confusing? I can never understand the organization/hierarchies of menus, buttons, windows, tabs. All my time is spent hunting through the interface. My kingdom for a normal dialogue box! I've tried and failed to use VSCodium on a bunch of occasions for this reason. And a couple other ones. It's like the UI got left in the InstaPot waaaay too long and now it's just a soggy stewy mess. Today I finally thought I'd take the first step toward android development. Completing a very simple [hello world](https://developer.android.com/codelabs/basic-android-kotlin-compose-first-app) tutorial is proving to be challenging just because the window I see doesn't precisely correspond to the screenshots. Trying to find the buttons/menus/tools is very slow as I am constantly getting lost. I only ever have this in applications with javascript-based UIs Questions: 1. Am I the only one who faces this challenge? 2. Do I have to use Android Studio or it there some kind of native linux alternative? edited to reflect correction that Android Studio is not electron

6
15
learn_programming
Learn Programming Lorgres 5 months ago 100%
How to efficiently package CLI application on linux

Hi, I'm looking to open-source a small CLI application I wrote and I'm struggling with how to provide the built app since just providing the binary will not work. I had a friend test it and he had to compile from source due to glibc version differences. My first thought was providing it as a flatpak but that isn't really suitable for CLI software. I've googled around a bit and most guides I find just mention packaging separately for multiple package managers/formats (rpm, apt etc.). This seems really inefficient/hard to maintain. What is the industry standard for packaging a Linux software for multi-distro use?

14
13
learn_programming
Learn Programming Beardedleftist 6 months ago 96%
What's best suited for low-tech

Hi everyone, TL;DR Completely new to coding and programming, but I want to learn enough to be able to run a home server, my own website and tinker a bit with Arduino. Is there any programming language or path that you could recommend? I don't know if those things are related or not. I've been looking at books a bout Arduino, but it's just following instructions to do xyz, but not explanation of the basics. About the server and website, I've wanted to try it out since I stumbled upon the [Low tech magazine](https://solar.lowtechmagazine.com/). Many of the projects there and the philosophy behind it speak to me, so I would like to be more knowledgeable about it and be able to do some stuff myself. EDIT. You guys are awesome! Thank you so much for the replies. It’s so cool to see Lemmy populated with cool people willing to chat and put knowledge in common :) I might be updating this post when I get to do something about… well all the resources you gave me!

31
21
learn_programming
Learn Programming maegul 6 months ago 100%
Ownership in match statements on multiple variables [RUST]

cross-posted from: https://lemmy.ml/post/13353225 > Quick little confusion or even foot-gun I ran into (while working on the [challenge I posed earlier](https://lemmy.ml/post/12478167)). > > ### TLDR > > My understanding of what I ran into here: > > * Matching on multiple variables simultaneously requires assigning them to a tuple (?), > * which happens more or less implicitly (?), > * and which takes ownership of said variables. > * This ownership doesn't occur when matching against a single variable (?) > * Depending on the variables and what's happening in the match arms this difference can be the difference between compiling and not. > > **Anyone got insights they're willing to share??** > > ### Intro > > I had some logic that entailed matching on two variables. Instead of having two match statements, one nested in the other, I figured it'd be more elegant to match on both simultaneously. > > An inline tuple seemed the obvious way to do so and it works, but it seems that the tuple creates some ownership problems I didn't anticipate, mostly because I was thinking of it as essentially syntax and not an actual tuple variable. > > As you'll see below, the same logic with nested match statements each on a single variable doesn't suffer from the same issues. > > ### Demo Code > > ```rust > fn main() { > > // # Data structures > enum Kind { > A, > B > } > struct Data { > kind: Kind > } > > // # Implementation > let data = vec![Data{kind: Kind::A}]; > > // ## Basic idea: process two adjacent data points > let prev_data = data.last().unwrap(); > let new_data = Data{kind: Kind::B}; > > // --- MATCH STATEMENTS --- > > // ## This works: match on one then the other > let next_data = match prev_data.kind { > Kind::A => match new_data.kind { > Kind::A => 1, > Kind::B => 2, > }, > Kind::B => match new_data.kind { > Kind::A => 3, > Kind::B => 4, > }, > }; > > // ## This does NOT work: match on both > let next_data2 = match (prev_data.kind, new_data.kind) { > (Kind::A, Kind::A) => 1, > (Kind::A, Kind::B) => 2, > (Kind::B, Kind::A) => 3, > (Kind::B, Kind::B) => 4, > }; > } > ``` > > ### The Error > > The error is on the line `let next_data = match (prev_data.kind, new_data.kind)`, specifically the tuple and its first element `prev_data.kind`, with the error: > > ``` > error[E0507]: cannot move out of `prev_data.kind` which is behind a shared reference > > move occurs because `prev_data.kind` has type `Kind`, which does not implement the `Copy` trait > ``` > > ### The Confusion > > So `prev_data.kind` needs to be moved. That's ok. Borrowing it with `(&prev_data.kind, ...)` fixes the problem just fine, though that can cause issues if I then want to move the variable within the match statement, which was generally the idea of the logic I was trying to write. > > What got me was that the same logic but with nested match statements works just fine. > > I'm still not clear on this, but it seems that the inline tuple in the second tuple-based approach is a variable that takes ownership of the variables assigned to it. Which makes perfect sense ... my simple mind just thought of it as syntax for interleaving multiple match statements I suppose. In the case of nested match statements however, I'm guessing that each match statement is its own scope. > > **The main thing I haven't been able to clarify is what are the ownership dynamics/behaviours of match statements??** It seems that there's maybe a bit happening implicitly here?? I haven't looked super hard but it does seem like something that's readily glossed over in the materials I've seen thus far?? > > ### General Implications > > AFAICT: > * if you want to match on two or more variables simultaneously, you'll probably need borrow them in the match statement if they're anything but directly owned variables. > * If you want to then use or move them in the match arms you may have to wrangle with ownership or just use nested match statements instead (or refactor your logic/implementation). > * **So probably don't do multi-variable matching unless the tuple of variables is a variable native to the logic**?

14
1
learn_programming
Learn Programming 1_4M_N008 7 months ago 100%
No match from simple regex in python

hello guys. i am trying to match one or more digit from end of string ``` import re print(re.match(r'\d+$', "hello001")) print(re.match(r'[0-9]+$', "hello001")) ``` output None from both print statement. I've tried my regex on regex101.com and it seems working probably.

12
2
learn_programming
Learn Programming ericjmorey 7 months ago 100%
Rust Atomics and Locks by Mara Bos | Resource Not Made For Beginners marabos.nl

cross-posted from: https://discuss.online/post/5803977 > > # About this Book > > > > The Rust programming language is extremely well suited for concurrency, and its ecosystem has many libraries that include lots of concurrent data structures, locks, and more. But implementing those structures correctly can be difficult. Even in the most well-used libraries, memory ordering bugs are not uncommon. > > > > In this practical book, Mara Bos, team lead of the Rust library team, helps Rust programmers of all levels gain a clear understanding of low-level concurrency. You’ll learn everything about atomics and memory ordering and how they're combined with basic operating system APIs to build common primitives like mutexes and condition variables. Once you’re done, you’ll have a firm grasp of how Rust’s memory model, the processor, and the role of the operating system all fit together. > > > > With this guide, you’ll learn: > > > > - How Rust's type system works exceptionally well for programming concurrency correctly > > - All about mutexes, condition variables, atomics, and memory ordering > > - What happens in practice with atomic operations on Intel and ARM processors > > - How locks are implemented with support from the operating system > > - How to write correct code that includes concurrency, atomics, and locks > > - How to build your own locking and synchronization primitives correctly > > Available free of charge. But I doubt I'll ever read it. Never enough time and energy for everything. >

11
0
learn_programming
Learn Programming 6eathaus 7 months ago 100%
Data Structures in Rust

What are some tips and tricks and best practices with rust? Also, I'm used to clearly defined classes and implementation files with C++. Are there any tips and tricks on that with Rust? I haven't found any decent commentary/ documentation on figuring this out correctly with Rust. Yes, I know Rust is not an oop language, but I'm having issues creating clear separation of files so they don't become a scrolling dungeon.

24
3
learn_programming
Learn Programming ericjmorey 7 months ago 100%
Rust for Lemmings Reading Club - Alternate Slot (18:00 UTC+1)

See [learningrustandlemmy@lemmy.ml](https://threadiverse.link/c/learningrustandlemmy@lemmy.ml) for future updates. cross-posted from: https://jlai.lu/post/4802347 > Hi all! > > # What? > > I will be starting a secondary slot/sessions for the Reading Club, also on "The Book" ("The Rust Programming Language"). We will, also, very likely use [the Brown University online edition](https://rust-book.cs.brown.edu/title-page.html) (that has some added quizzes & interactive elements). > > # Why? > > This slot is primarily to offer an alternative to the main reading club's streams that caters to a different set of time zone preferences and/or availability. > > # When ? > > Currently, I intend to start at 18:00 UTC+1 (aka 6pm Central European Time). Effectively, this is 6 hours "earlier in the day" than when the main sessions start, as of writing this post. > > The first stream will happen on the coming Monday (2023-03-04). > > **Please comment if you are interested in joining because you can't make the main sessions *but* would prefer a different start time (and include a time that works best for you in your comment!)**. Caveat: I live in central/western Europe; I can't myself cater to absolutely any preference. > > # How ? > > We will start from the beginning of "The Book". > > There are 2 options: > 1. mirror the main sessions' pace (once every week), remaining ~4 sessions "behind" them in terms of progression through "The Book" > 2. attempt to catch up to the main sessions' progression > > I am personally interested in trying out 2 sessions each week, until we are caught up. This should effectively result in 2-3 weeks of biweekly sessions before we slow back down. I'm not doing this just for me, however, so if most people joining these sessions prefer the first option I'm happy to oblige. > > I will be hosting the session from my own twitch channel, https://www.twitch.tv/jayjader . I'll be recording the session as well; this post should be edited to contain the url for the recording, once I have uploaded it. > > # Who ? > > You! (if you're interested). And, of course, me.

14
1
learn_programming
Learn Programming sleepingoddish 7 months ago 100%
Learning how to build integrations

I want to learn how to build integrations, such as how to connect two systems made by different companies that have different structures. For example: To cut down on redundant data entry, I want to build an integration where the data is pushed from one software to another software. The integration would put the data from the source software into the correct fields in the destination software. How do I go about learning how to build integrations? What classes to even start with? I appreciate any guidance you can provide. Edit: Thanks a bunch for the suggestions. I'm checking out those tools suggested in the comments and looking up classes to learn the skills needed.

15
8
learn_programming
Learn Programming uliwitness 7 months ago 84%
What's the current way of programming Windows?

I'm a seasoned programmer on Mac/Linux/iOS, and want to get into Windows application programming. Problem is, every time I try, Microsoft comes in a week later and discontinues the current framework in favor of something else. Because I need to use a C++ library, I started with C++/CX, just to be told C++/WinRT was the way to go etc. I've lost track of what the current one is now and what has been discontinued, and can't for the life of me find recent information on the web. Anyone here know where I can find info on what's the current one? It seems C# is still the main language, but what UI framework does one use? It used to be UWP, but now it seems WPF is back ... ? My constraints are: I'm making Windows desktop applications, I need to be able to call into C++, and I want it to look like a modern application. I also need to create my UI from code (based on files provided by the user), not from XAML files.

13
10
learn_programming
Learn Programming ericjmorey 8 months ago 100%
Rust For Lemmings - Code Together | "The Rust Programming Language" book club meeting on twitch

cross-posted from: https://sh.itjust.works/post/13993219 > ## The concept > A streamed reading club focused on rusts [The Book](https://doc.rust-lang.org/stable/book/) and becoming reasonably good rust developers through community collaboration. If you're interested, please comment so we know this's something you'd like to join in on. > > ## A Begining > To begin, I'll be setting up a twitch stream where we read through the book together and solve some problems together related to the concepts provided. We'll be able to collaborate in chat, and talk about it here after each stream. This way, we'll be able to lean on each other or just hang out while we learn the language Lemmy uses for it's backend. Other hosts will be welcome as the end goal is to create a group of people whose goal is to support our collective growth as developers > > Anybodies welcome of any skill set, whether or not they want to continue on once we get to lemmys code base. If you're completely new to rust this is a great place to start and if you already know the language we'd love to have you all the more. At the very least it's a good networking opportunity but you'll likely learn more than you thought. > > ## Timing > Please comment your availability so we can find the best time and day to do this. As a stand-in and default though, **6:30pm EST (New York Time)** on tuesday will be the start time. I'd be available on most days myself after 5pm Eastern Time (new york) though so don't hesitate to suggest another time/date. > > ## Where? > For now, I'll be streaming this on a twitch channel I created a bit ago but never used. The link is here: https://www.twitch.tv/deerfromsmoke > > Thank you @morrowind@lemmy.ml for the idea.

19
1
learn_programming
Learn Programming maegul 8 months ago 100%
New community for learning rust and the lemmy codebase together lemmy.ml

cross-posted from: https://lemmy.ml/post/11456831 > Hi all, > > We've started a new community for learning rust and/or the lemmy codebase together. > > Come join in: [!learningrustandlemmy@lemmy.ml](https://lemmy.ml/c/learningrustandlemmy) > > The idea is that there are probably a good amount of people interested in learning rust, or, interested in contributing to or using the lemmy codebase, but find it difficult to get started ... so basically why not start a sort of study group or reading group or support channel style of community? Here's where the idea was originally suggested: https://lemmy.ml/post/11232276 > > We're just putting the place together and sorting out how it could work, but all kinds of inputs and levels of expertise are welcome!

23
2
learn_programming
Learn Programming ericjmorey 8 months ago 100%
Julia Programming Tutorial | An effective tutorial for science and engineering https://www.matecdev.com/posts/julia-tutorial-science-engineering.html

cross-posted from: https://programming.dev/post/9470319 > [Martin D. Maas](https://www.matecdev.com/about.html) writes: > > > Julia is an is a general-purpose, open-source, dynamic, and high-performance language. By leveraging a clever design around a just in time (JIT) compiler, Julia manages to combine the speed of languages like C or Fortran, with the ease of use of Matlab or Python. > > > This is a hands-on tutorial series, which focuses on understanding the most important aspects of the language from a practical point of view, and focusing on the needs of scientists and engineers. > > > > In particular, we won’t be introducing much more syntax or language features than what is required to solve the different problems we will be tackling. > > > > As a quick reference, and if you have experience with Python or Matlab, it might be worth to check out the Matlab-Python-Julia Cheatsheet. > > Read [Julia Programming Tutorial](https://www.matecdev.com/posts/julia-tutorial-science-engineering.html) > Total: 37 posts > Last updated: November 13, 2023

8
0
learn_programming
Learn Programming ALostInquirer 8 months ago 100%
Advice on where to begin with GUI programming?

I realize this is a very *broad* question, so to help I'll mention that my primary experience with any programming language is Python. I've looked into C and C++ as well, but I haven't written much in them; in part because they're more involved, and in part because I get lost in the IDE weeds with'em (whether choosing an IDE or getting it configured to even get started tbh, but that's mostly a different topic). In Python I know there's an option in Tkinter, and I've worked with it to some extent but never got entirely comfortable with it. Maybe it would be best to try making some more stuff with it instead of bouncing around different things, but would that be advisable over something that may be better suited to the task? If it would be better to stick with it, what might be some things you wish you'd known starting out with GUI programming (whether particular to Python or generally applicable)?

17
18
learn_programming
Learn Programming ericjmorey 8 months ago 81%
Can I email or text myself through Python or bash?

cross-posted from: https://beehaw.org/post/10863052 > Noob question incoming, thanks in advance for any help with this! > > I have a specific use case in which I want to send an automated email or text to myself once a day (the message is different each time--otherwise I would just set an alarm, lol!). I'm running Pop_OS on an old desktop computer. Where I'm stuck is getting an email to successfully send from the command line. I'm looking for easy-to-follow instructions that would help me do that, and none of the articles or videos I've come across thus far have helped. > > I'm aware of Twilio and other services that send SMS messages, but I'm looking for something free. Especially since I only need to text one person (myself), and infrequently at that. > > Below is my attempt to send an email with the telnet command. Nothing ever came through... > > ``` > XXXXXXXX@pop-os:~$ telnet localhost smtp > Trying ::1... > Connected to localhost. > Escape character is '^]'. > 220 pop-os ESMTP Exim 4.95 Ubuntu Sun, 07 Jan 2024 15:12:28 -0500 > HELO gmail.com > 250 pop-os Hello localhost [::1] > mail from: XXXXXXXX@gmail.com > 250 OK > rcpt to: XXXXXXXX@gmail.com > 250 Accepted > data > 354 Enter message, ending with "." on a line by itself > Subject: Test > Body: Is this working? > . > 250 OK id=1rMZW4-0002dj-Uy > quit > ``` >

10
2
learn_programming
Learn Programming ericjmorey 8 months ago 100%
New RISC-V emulator for Computer Science education | GitHub - gboncoffee/egg: Emulador Genérico do Gabriel github.com

cross-posted from: https://programming.dev/post/8298023 > More [Discussion on Hacker News](https://news.ycombinator.com/item?id=38895995): > > [New RISC-V emulator for Computer Science education (github.com/gboncoffee)](https://github.com/gboncoffee/egg) > > Just released EGG, an emulator created for teaching Assembly and microprocessors (designed to suit the needs of the Microprocessors classes, at Universidade Federal do Paraná, Brazil). The emulator will support multiple architetures in the future, but currently only RISC-V is implemented. > > The `egg` package itself provides only an interface for interacting with machines, thus supporting different architeture backends. Currently, the only backend implemented is egg/riscv, which implements a RISC-V IM 32 bits machine. A MIPS backend is coming soon. > > `egg/assembler` also provides a small library for creating assemblers, and the support for EGG's debugger. >

13
0