Programming

26138 readers
213 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
301
302
303
304
305
 
 

cross-posted from: https://sh.itjust.works/post/52190045

Microsoft wants to replace its entire C and C++ codebase, perhaps by 2030

306
307
 
 

Hi,

I'm a programmer with a bunch of years in IT and currently I'm trying to build my own project that can bring me enough revenue so I can leave my full-time job and focus on my projects only and eventually start my own business.

The main struggle right now is that I have too little time to work on my projects (around 3 hours per week) and I estimate it will take me at least 2 more years to start earning anything (not talking about real money so I can leave my full time job). I don't want to create any sort of scam just to grab some cash, but building a real complex software is a time consuming process, not speaking about that I must handle other stuff than programming (which I enjoy but this means I have even more work to do).

I'm wondering if anybody can give me any advice how to speed up that process or where I can get money to be able to focus on my ideas full time? Or maybe somebody tried to do the same and failed and can share what lessons they learned from their mistakes?

I'm looking for a real solutions, so please cut out generic advices like "just keep working" or "just find an angel investor". I understand that starting your own business is hard and requires to take a risk, but I'm looking for practical advices and not advices based on luck or having a huge start capital.

Thanks

308
309
20
submitted 2 months ago* (last edited 2 months ago) by verstra@programming.dev to c/programming@programming.dev
 
 

For the last year, I've been working on a query language that aims to replace SQL and data frame libraries. It's continuation of my work on PRQL and EdgeQL.

Now I need feedback on usability, ergonomics and overall design. Read trough the examples, check out the CLI & tell me what could be better.

310
 
 

For the last year, I've been working on a query language that aims to replace SQL and data frame libraries. It's continuation of my work on PRQL and EdgeQL.

Now I need feedback on usability, ergonomics and overall design. Read trough the examples, check out the CLI & tell me what could be better.

311
312
313
 
 

The worst kind of accidental complexity in software is the unnecessary distribution, replication, or restructuring of state, both in space and time.

314
 
 

geteilt von: https://programming.dev/post/42846946

Hi everyone,

we, the iceoryx community, just released iceoryx2 v0.8, an ultra-low latency inter-process communication middleware in Rust, with C, C++, Python and with this release, C# bindings.

If you are into robotics, embedded real-time systems (especially safety-critical), autonomous vehicles or just want to hack around, iceoryx2 is built with you in mind.

Check out our release announcement for more details: https://ekxide.io/blog/iceoryx2-0.8-release

And the link to the project: https://github.com/eclipse-iceoryx/iceoryx2

315
316
317
318
 
 

Hello Programming.dev gang,

I'm still wrapping my head around classes, oop, and scoping, and was hoping to get some feedback. on a class definition.

Here's the background:

I'm implementing pydantic for handing my .env secrets and constants (Haven't gotten to a secrets manager yet), with pydantic_settings's BaseSettings and SettingsConfigDict, as well as pydantic's SecretStr.

I set up a parent class in settings.py to configure the .env file and settings, which you can see below.

settings.py Parent Class (click to expand)

from pydantic_settings import BaseSettings, SettingsConfigDict
from pydantic import SecretStr


class Settings(BaseSettings):
    model_config = SettingsConfigDict(
        env_file="/opt/pyprojects/media-scripts/.env.dev", extra="ignore"
    )

I've got a self hosted Baserow database that I'm using for my project, and I defined a class in baserow.py that inherits from the Settings class for the .env config, and has all of the fucntions for interacting with the database as methods of the class, which you can see below.

(I've got a number of other classes similar to Baserow planned that will inherit from the Settings class, provided I'm on the right track with this layout.)

I thought it was a good idea to put the methods in the class with the .env var attributes to keep scoping focused and local. I'm wondering if this is a good idea or not, and am also open to any other feedback on the code/classes anyone might have. Thank you to anyone taking the time to read and/or respond.

baserow.py with Baserow child class (click to expand)

import json

import requests
from pydantic import SecretStr

from mods.settings import Settings


class Baserow(Settings):
    br_url: str
    br_api: SecretStr

    def query_db(self, urlFilters):
        url = f"{self.br_url}?user_field_names=true&{urlFilters}"
        headers = {"Authorization": f"Token {self.br_api}"}

        brQueryResults = requests.get(url, headers=headers)

        return brQueryResults.json()

    def get_all_shows(self):
        url = f"{self.br_url}?user_field_names=true&size=200"
        headers = {"Authorization": f"Token {self.br_api.get_secret_value()}"}

        brQueryResults = requests.get(url, headers=headers)

        return brQueryResults.json()

    def post_db(self, showDictionary):
        brPostResults = requests.post(
            f"{self.br_url}?user_field_names=true",
            headers={
                "Authorization": f"Token {self.br_api.get_secret_value()}",
                "Content-Type": "application/json",
            },
            json=showDictionary,
        )

        print(json.dumps(brPostResults.json(), indent=2))

    def patch_db(self, showDictionary, row):
        brPatchResults = requests.patch(
            f"{self.br_url}?user_field_names=true",
            headers={
                "Authorization": f"Token {self.br_api.get_secret_value()}",
                "Content-Type": "application/json",
            },
            json=showDictionary,
        )

        print(brPatchResults)

    def delete_db_row(self, row):
        brDeleteResults = requests.delete(
            f"{self.br_url}{row}/",
            headers={
                "Authorization": f"Token {self.br_api.get_secret_value()}",
            },
        )
        print(brDeleteResults)

319
320
 
 

For a few months I've spent my free time working on a C++ messenger. It started off pretty simple, just two input boxes for IP address and port number, more of a fun experiment. From there it started to grow and soon allowed for peers to connect automatically using a relay. For a while it only allowed two people to speak at once, which was good for security but was very inconvenient. Now Retro Messenger allows multiple users to speak at once, sending encrypted files and messages that exist only in memory.

Although there is plenty of things I could improve, I was curious to see if anyone had suggestions or requests for what else could be added. I'm currently debugging a local-logs feature, and I could look into how to implement voice calls in the future. Thanks for your time and feel free to ask questions

Landing page: https://retromessenger.space/

321
322
323
324
325
view more: ‹ prev next ›