• 0 Posts
  • 88 Comments
Joined 2 years ago
cake
Cake day: June 16th, 2023

help-circle


  • The best way to learn is to just do it! When I’m starting out with something I generally have a few ideas of basic things I could do with it, generally that’s making simple CRUD apps (when I started using Axum I made a simple API that returns json from a file directory as long as the directory is formatted as: /type/name. Then I went and made a website using vanilla js/html/CSS and made everything run using the backend).

    This second project is great because there’s always something else I could do like auth, like not doing a post and redirect to the same page for updates, like creating dynamic client & employee pages, like using an actual db instead of a script to make CSV files as a db. IMO, THIS is where you learn things.









  • Same, I always remember this with interfaces and inheritance, shoehorned in BS where I’m only using 1 class anyway and talking to 1 other class what’s the point of this?

    After I graduated as a personal project i made a wiki for a game and I was reusing a lot of code, “huh a parent class would be nice here”.

    In my first Job, I don’t know who’s going to use this thing I’m building but these are the rules: proceeds to implement an interface.

    When I have to teach these concepts to juniors now, this is how I teach them: inheritance to avoid code duplication, interfaces to tell other people what they need to implement in order to use your stuff.

    I wonder why I wasn’t taught it that way. I remember looking at my projects that used this stuff thinking it was just messy rubbish. More importantly, I graduated not understanding this stuff…


  • I don’t get why we’re taking a swing at Linus here. The article only mentions him in relation to the rust for Linux project being slow going. But, it IS going and the US government has only stated that “you need a plan to move to a memory safe language by 2025 or you might be liable if something bad happens as a result of the classics (use after free/double free/buffer overflow/etc.)” but I don’t think Linux would count it’s free software and it does have a plan.








  • IMO the best way to start in a new language is to rewrite some of your previous projects in that language.

    I generally start out by rewriting a couple simple 1-3 function console apps, basic leet code stuff like; palindrome, fizzbuzz, reverse an array in place, etc, and some simple unit tests for them. Then I go ahead and rewrite some of my previous projects or uni assignments in that language.

    At that point I generally have a good understanding of basics and have an idea of how to approach a new project. When I got to this point in rust I then started on threading, async, why it’s easy to return a String and an ordeal to return &str, etc.