[–] 2 points 8 months ago

It's not exactly the same, but having taught sixteen folks from complete beginner to full-time engineer, I find there's a point where it's most effective to transition to self-directed exercises with test-driven development. If you've gotten familiar with the fundamentals you might check these out.

This method of learning with TDD has you build the workbook yourself with tests first, then you change gears to write the code to satisfy them. While not as fast in terms of features per hour, it's a much higher level of engagement and so provides much more value per hour.

There are hundreds of YouTube videos on TDD in Java. I would just follow along with a few of that until you get comfortable with the technique. After that there's dozens of exercises on sites like this one https://codingdojo.org/practices/KataCatalogue/

That being said, some of my best students only ever did the Poker Hands kata over and over again. They'd start on an empty repo each time, and each time solve it some new way. After about a dozen successful attempts they'd have seen so have different ways to solve the same problem that they've developed an intuition of when to use each technique.

This is also now how I learn new languages. I'll skim some docs, watch a YouTube on getting tests setup, and then do the poker kata a few times in it. After the fifth or sixth pass I'm already feeling extremely comfortable in the language and can start a more rigorous study of tools like libraries to solve a specific purpose. This is how I'm able to get very comfortable in most languages in a few days (unless it's an extremely different language like Rust, Lisps, and Haskell those took me much longer to get comfortable).

  • source
  • [–] -1 points 8 months ago

    Yeah, you’re just giving a lot of recommendations about people’s favorite language rather than the most fun. I actually didn’t recommend my favorite language (which is Kotlin) because I didn’t want to do exactly what others are doing.

    Fun languages don’t necessarily translate to ones you want to use in production. Like Ruby is great for scripting and command line tools, but I wouldn’t use it in any enterprise backend or frontend system.

  • source
  • parent
  • context
  • [–] 1 point 8 months ago* (1 child)

    Rust has a lot of cool ideas (I love the borrow checker), but in its current state I don't think it can replace C++ for the things I'd be interested in using it for. 99% of the time when I reach for a natively compiled language it's because I need to do some performance-critical loop I can't reasonably implement in the language my business logic is written in (normally Java), and I end up in a situation where most of Rust's advantages (and C++'s footguns) aren't really relevant (lifetimes don't matter if I'm just writing some SIMD code which reads/writes into externally allocated memory segments). So for my purposes, Rust is mostly just a worse version of C++ in that it's missing a bunch of features I want (my main gripes already listed above) and has a bunch of cool features that I don't care about.

    If I were writing an entire program from scratch I'd probably opt for Rust over C++, at least for the bulk of the business logic, but I don't think Rust has quite achieved its ideal of "zero-cost abstraction" for many performance-critical use cases, and certainly not most of the ones I actually have.

  • source
  • parent
  • context
  • [–] 6 points 8 months ago* (2 children)

    Rather than parsing the whole board, keep a hashset or list of all the cells that are live. Then apply the rules to all of those cells and their neighbours. Should avoid needlessly checking dead cells.

  • source
  • [–] 2 points 8 months ago (1 child)

    You'll want to get an electronics starter kit. There's zillions of them.

    Having said that, the easiest hardware to work with is the rp2040 (RPi Pico) and rp2350 (RPi Pico 2). It's got USB mass storage support built in which is about as easy as it gets and it does everything and you can use just about any pin for any thing. It really is awesome.

    If you can't find a kit that includes the RPi Pico (or Pico 2) just get a regular kit (e.g. Arduino) and a Pico separately.

    Note: I just found this neat thing... https://a.co/d/05qypEzY it looks like it'd be super easy to learn with but you miss out on learning how to use a breadboard but that's no big deal (you can just do that later).

  • source
  • parent
  • context
  • [–] -2 points 8 months ago

    Just pick a thing you want to work on. If it's a website it's JS/TS, if it's a terminal app then python (or JS/TS). If it's a desktop app then I'd personally say C# but opinions vary wildly. If you want to do something embedded (microcontroller) then C, Zig or python. If it's a mobile app then Swift for iOS, Java/Kotlin for Android or Dart/Flutter.

    Honestly, python is IMO the best to get going unless you want to make a website then it's JS/TS.

    Web frameworks can be fun to learn but it might be a bit much to start out but making an Astro blog is easy and fun. If you want to spice it up to a Web app then I recommend Vue even though I work with angular and know react.

    But yeah, I recommend python to most beginners unless you want your first thingy to be a website.

  • source
  • [–] 2 points 8 months ago (1 child)

    So, there's not a great answer to that. The big problem is that x86 assembly is painful because the x86 instruction set is a weedy overgrown mess due to being built on top of literal decades of cruft. Even a CPU made today starts off by booting up pretending to be an 8086 processor, a 16 bit CPU from 1978. To get to a "modern" operating mode you need to walk through a series of configuration steps to get the CPU into the correct mode, but all those modes and configs add a lot of noise when trying to understand x86 assembly. For that reason it's probably a good idea to start by not learning x86, but instead the far more minimal and sane ARM assembly.

    The problem of course is that there's like a 99% chance that the system you're going to be working on when learning assembly is an x86 system not an ARM one. So now you need two more things, you need an assembly cross-compiler to use your x86 system to build an ARM executable, and you need an ARM emulator to run it. Personally I'd install LLVM (specifically clang) and start by writing a small C wrapper with some inline assembly in it. For running it I'd use QEMU and a Linux ARM image (maybe one of the raspberry pi distros).

    Finally allow me to introduce you to one of the absolute coolest tools out there godbolt compiler explorer. Godbolt allows you to take a snippet of code written in one of dozens of supported languages and see the assembly instructions that various compilers would produce from that code. This is a great way to learn more about not just assembly, but any of the supported languages and is also an invaluable tool for doing fine grained optimizations.

  • source
  • parent
  • context
  • [–] 2 points 8 months ago* (last edited 8 months ago)

    I can't comment as I've not used scheme but looking at scheme's syntax, elixir is much nicer. It's supposed to take some of its inspiration from Ruby.

    The big seller is that it runs on the Erlang VM so you get all the goodies for free: supervisor trees, OTP, processes, even able to call Erlang directly. It is both scriptable and compiled. Not so much suited for high performance computing though as benchmarls will show, but it is interesting to learn and I have gained a lot from exposing myself to functional programming paradigms.

    https://elixir-lang.org/

  • source
  • parent
  • context
  • [–] 2 points 8 months ago*

    IDK really, perhaps you can use a book.
    I mainly did it in the 8085 practicals during B.Tech and they had a handy learning kit with a HEX keyboard so we could Assemble it manually on paper, write the program directly to a given RAM address and then run it from there. For ARM, we just used Keil µVision.
    Now I just download an x64 instruction manual or just look up the instructions on the web, on the occasional requirement of reading disassembly.

    I don't recommend starting with x86_64 reference. While it can be used just fine, it has lots of instructions and and you instead want a very small subset of them.


    Also, there will be a great difference between using an OS and not doing so, as going with one, then includes a lot of potential boilerplate.

  • source
  • parent
  • context
  • view more: ‹ prev next ›