• 0 Posts
  • 117 Comments
Joined 1 year ago
cake
Cake day: August 7th, 2023

help-circle

  • The following isn’t any professional advice or anything, I am writing HTML manually for my hobby blog code. I don’t have much experience with HTML outside occasionally reading it.

    I write a bit by hand, to layout my blog page, which is using HTMX. Generally I use RustRover since that actually gives details for attributes and such along with autocomplete. And apparently yesterday it asked if I wanted to enable HTMX support, which was even more intriguing. The main articles are however converted from markdown to HTML.

    I do want a better way to design with preview of my page but I think it’s a long shot to find something that does HTMX at the same time. Especially since that often means having segregated pieces of HTML mixed into one document at page loading.


  • I made a super basic blog by hand using actix-web. Basic processing of markdown into HTML and then present it through handmade (and chatgpt assisted) html+css with htmx to spice things up and try to do mimic a single page application. I don’t have much web experience though, so much of it is crude.

    I don’t host myself yet, I used Shuttle which procides free hosting for hobby rust projects. It also comes with postgres so I have been looking into how to move from storing articles in files to a database for more consistent article support. Shuttle also supports other things than actix-web, so you don’t havr to use that specifically.

    While I said blog, I don’t support new articles without a redeploy yet… And it only has like 3 random articles based on reddit posts. But it works at least.

    https://handmade-blog.shuttleapp.rs/


  • Because I want to be a God.

    It’s a bit of hyperbole, but I was using some program on my pc and was frustrated because it didn’t do things I wanted it to do. Or it had bugs, and there was no way for me to get that changed, so I was left to pray that somehow the creator would find this small problem and fix it. I was envious of those people that could make these windows with buttons that made things happen. I wanted this power that transcended what I could see on my screen, and change how that world worked.

    And so, I learned to program. I took the powers to shaped my own creations and ascended.




  • I sure don’t sound helpful saying this, but it’s mostly about finding the equivalent to the python action/types, and typing them out when making functions and variables. Though 99% of the time, you are completely fine defining variables as var to avoid excessive typing.

    I assume you dealt a bit with classes in python, if not then you’re doing double time with both changing language and learning object oriented classes at the same time.

    If there is any specific I can try to give some clarity since I also came from Python to C#.


  • I found C# to pretty much be python just with strict types and semicolons. Jumped right into it really on my first job and it worked out pretty fine, granted I got to orient myself in the existing project where I started.

    You are perhaps already familiar, but some things stand out like public/private annotations and other class related things like interfaces which work to create a more organized and controlled use compared to pythons “we are all consenting adults” approach were nothing ever really truly blocked from you. It depends a little on what you want to do/use it for, there’s frameworks and different uses like WPF / .NET for the frontend.

    While it may be too basic for you, ZetCode was useful for me back when learning PyQt in python, so you might find some use with the C# intro: https://zetcode.com/all/#csharp







  • How do you view diffs and merges when you say you don’t use git GUIs? External tool or terminal/command line?

    I use Jetbrains IDEs and most of my life has been IDE based git interaction. And I honestly love it, easy access to see my diffs, the most common commit, push and stage(or shelve as Jetbrains does it, which is better than visual studio). Hassle free and available beats writing anything to me.






  • Skimmed comments, but if you download and manage your music on your own on a machine you can have a super simple setup like I do. All music is synced using Syncthing to my phone. So my phone gets local storage, and then I use Poweramp (android) to play it.

    I pretty much have a folder for all the music though. But I assume you can sort music into folders to have them as playlists. But perhaps not as practical as desired.


  • What’s fun is determining which function in that list of functions actually is the one where the bug happens and where. I don’t know about other langauges, but it’s quite inconvenient to debug one-linres since they are tougher to step through. Not hard, but certainly more bothersome.

    I’m also not a huge fan of un-named functions so their functionality/conditions aren’t clear from the naming, it’s largely okay here since the conditional list is fairly simple and it uses only AND comparisons. They quickly become mentally troublesome when you have OR mixed in along with the changing booleans depending on which condition in the list you are looking at.

    At the end of the day though, unit tests should make sure the right driver is returned for the right conditions. That way, you know it works, and the solution is resistant to refactor mishaps.