• 1 Post
  • 97 Comments
Joined 3 years ago
cake
Cake day: June 14th, 2023

help-circle

  • addie@feddit.uktoScience Memes@mander.xyzMakes perfect sense
    link
    fedilink
    English
    arrow-up
    26
    ·
    1 month ago

    Got the most actual quoted lines from the book of any film version, plus you’ve got all of Dicken’s direct-to-reader moralising delivered by Gonzo. And as well as being very faithful to the book, it is a superb film as well.

    Michael Caine excels as Scrooge, too. I wouldn’t say that he was better than Alastair Sim was in his version - that’s a performance that would take some beating - but there’s not much in it.


  • Java’s biggest strength is that “the worst it can be” is not all that bad, and refactoring tools are quite powerful. Yes, it’s wordy and long-winded. Fine, I’d rather work with that than other people’s Bash scripts, say. And just because a lot of Java developers have no concept of what memory allocation means, and are happy to pull in hundreds of megabytes of dependencies to do something trivial, then allocate fucking shitloads of RAM for no reason doesn’t mean that you have to.

    There is a difference in microservices between those set up by a sane architect:

    • clear data flow and pragmatic service requirements
    • documented responses and clear failure behaviour
    • pact server set up for validation in isolation
    • entire system can be set up with eg. a docker compose file for testing
    • simple deployment of updates into production and easy rollback

    … and the CV-driven development kind by people who want to be able to ‘tick the boxes’ for their next career move:

    • let’s use Kubernetes, those guys earn a fortune
    • different pet language for every service
    • only failure mode is for the whole thing to freeze
    • deployment needs the whole team on standby and we’ll be firefighting for days after an update
    • graduate developers vibe coding every fucking thing and it getting merged on Claude’s approval only

    We mostly do the second kind at my work; a nice Java monolith is bliss to work on in comparison. I can see why others would have bad things to say about them too.


  • Apart from being slow, having discoverability issues, not being able combine filters and actions so that you frequently need to fall back to shell scripts for basic functionality, it being a complete PITA to compare things between accounts / regions, advanced functionality requiring you to directly edit JSON files, things randomly failing and the error message being carefully hidden away, the poor audit trail functionality to see who-changed-what, and the fact that putting anything complex together means spinning so many plates that Terraform’ing all your infrastructure looks like the easy way; I’ll have you know there’s nothing wrong with the AWS Console UI.


  • I’m in this photo and I don’t like it.

    More specifically, my programming background is in industrial automation and I’d like to add some more ‘robust and flexible’ algorithms to CoolerControl so I can control my system fans / temperature better, but it’s written in a mix of TypeScript and Rust.

    I’ve spent 20 years programming hard real-time z80 assembly and know quite a few higher-level languages. (Although I prefer the lower-level ones.) Not those ones, however, so it’s not just a couple of hours work to raise a PR against that project. Going to need to crack some books.


  • addie@feddit.uktoScience Memes@mander.xyzI support pluto
    link
    fedilink
    English
    arrow-up
    19
    ·
    3 months ago

    … and it’s been doing it for long enough that it, and all the other plutinos, have settled into a 2:3 resonant orbit with Neptune, which takes 165 years to orbit the sun by itself.

    Space is really big and the timescales are really long, in a way which doesn’t really make sense on human scales, except for things which are so fast that they also don’t make sense on human scales, like core-collapse supernovas.

    The good news is that we’re good at doing maths and we’ve built some big computers to do that maths, so we’ve no problems ‘popping a few zeros’ into the sums that we do.


  • addie@feddit.uktoScience Memes@mander.xyzIf it works it works
    link
    fedilink
    English
    arrow-up
    31
    arrow-down
    3
    ·
    3 months ago

    Speaking as someone with a chemical engineering degree and twenty years in industry:

    • we have some really complicated computer programs and simulations for all the important stuff, then we add ten percent for safety and round it up to the next standard size. We don’t buy 292 mm pipe, we just use 300 mm, because that’s what’s on the shelves.

    • you need to be able to decide quickly whether results you’re seeing are sensible, usually to order-of-magnitude, and whether eg. it will take an hour to fill a tank, or a week. We usually don’t care whether it’s 55 minutes or 56. You need to be able to do those sums in your head, though.

    3 is more than accurate enough as an engineering approximation for pi. In fact, 5 is close enough, and much easier to work with.






  • Vim is my preferred ‘IDE’ for C++, Python, Bash, and general configuration file editing. It’s got some big pluses:

    • its text editing is superb once you’ve mastered it, but that’s a small part of its benefits when used as an IDE, and ‘Vim mode’ in other environments kind of undersells what else it can do

    • Vim has some great plugins for development. YouCompleteMe is awesome for predictive completion and showing docs, but NerdTree for file management and TagBar for showing structure are amazing as well. They’re all very configurable and they get out of your way.

    • Vim lives in your terminal window, so you can do splits and tabs using whichever terminal you like. Kitty is very fast and configurable and keeps out your way. Being able to have multiple tabs of Vim open, a tab for compilation, a tab for debugging, a tab for version control, a tab for man pages, and being able to flip between them without taking your fingers off the keyboard makes for a very fast workflow

    • Vim makes it very easy to edit binary files and be precise about whitespace changes, so it’s easy to make a minimal change for raising a PR.

    If you assign a hotkey to run a macro in Vim, then that can be made very flexible - saving and formatting all open windows, then invoking CMake to do a build and CTest to run all your unit tests can be put on a function key if you like. Trying to tell Eclipse to “just run CMake to do the build” seems to be an exercise in frustration; so many IDEs are terrible at “just getting out of the way”.

    Work pays for an IntelliJ licence for using Java. Java is so unwieldy without a proper IDE that it’s hard to code in it without it. I certainly don’t love it, though, and they seem determined to make every new version worse with bizarre new features. Flexible minimalist editing with configurable plugins is all that you really need, and on that basis Geany looks pretty good - will give it a try.





  • addie@feddit.uktoScience Memes@mander.xyzI love a good fractal
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    5 months ago

    Think if the GNU project had spent less time working on ‘clever’ recursive acronyms and fitting Scheme into everything, and more time hacking, we might actually be using their kernel.

    Linus locked himself in his bedroom for the summer and got almost all of POSIX working on 386. That’s the level of geek to aspire to. If RMS had just decided to name his kernel after himself rather than messing, we’d all be be using Stallix instead.


  • What you can achieve in a couple of pages of Python can be pretty spectacular. It’s also mostly very easy-to-read, with the possible exception of class inheritance, which is confusing mess.

    If you need to write more than a couple of pages, then its lack of types becomes a hindrance to me - doing refactors when functions can take basically any arguments is quite painful, for instance. Not requiring any particular structure is great, up until you start to struggle with lack of structure.

    Ideal programming language for when you’re wanting to do something that would be a bit too unwieldy for a shell script. It also makes network requests and json parsing very straightforward, so it’s great for interacting with REST APIs and writing simple microservices. Fast to write and runs quite quickly, so a good choice for Advent Of Code-like tasks. Would probably choose a different language for larger projects or when working in a team, though.


  • Visited a traditional water-powered flour mill recently. Very cool, beautiful building, and the end product makes really delicious bread and pasta. Wholemeal, not too fine, nothing in it but grain. Perfection.

    From the water flow, drop and wheel turning rate, I made the maximum possible power as about 5 kW. Probably optimistic to think you’d get a quarter of that in practice. Still, that’s a huge amount compared to what a person can produce, and it’s ‘on tap’ 24 hours a day. That kind of thing does explain why, in the days before electrification, that having ‘the right landscape’ made some areas really wealthy and some others not. Exploitable renewable energy, what a concept.

    So yeah, your proposed map would be really interesting. The Romans burned down whole forests to make steel - you simply couldn’t refine it in a place without. It would be fascinating to see the map of “power resources” and the resulting industries, even if it would be very hypothetical.



  • I learned z80 assembly back when the cutting edge of technology was a ZX Spectrum, and 68k assembly when I upgraded to an Amiga. That knowledge served me quite well for my early career in industrial automation - it was hard real-time coding on eZ80’s and 65c02 processors, but the knowledge transfers.

    Back in the day, when input got mapped straight into a memory location and the display output was another memory location, then assembly seems like magic. Read the byte they corresponds to the right-hand middle row of the keyboard, check if a certain bit is set in that byte, therefore a key is held down. Call your subroutine that copies a sequence of bytes into a known location. Boom, pressing a key updates the screen. Awesome.

    Modern assembly (x64 and the like) has masses of rules about pointer alignment for the stacks, which you do so often you might as well write a macro for it. Since the OS doesn’t let you write system memory any more (a good thing) then you need to make system calls and call library functions to do the same thing. You do that so often that you might as well write a macro for that as well. Boom, now your assembly looks almost exactly like C. Might as well learn that instead.

    In fact, that’s almost the purpose of C - a more readable, somewhat portable assembly language. Experienced C developers will know which sequence of opcodes they’d expect from any language construction. It’s quite a simple mapping in that regard.

    It’s handy to know a little assembly occasionally, but unless you’re writing eg. crypto implementations, which must take the exact same time and power to execute regardless of the input, then it’s impractical for almost any purpose nowadays.