Canadian software engineer living in Europe.

  • 19 Posts
  • 462 Comments
Joined 1 year ago
cake
Cake day: June 7th, 2023

help-circle
  • I feel like you must have read an entirely different post, which must be a failing in my writing.

    I would never condone baking secrets into a compose file, which is why the values in compose.yaml aren’t secrets. The idea is that your compose file is used exclusively for testing and development, where the data isn’t real, and the priority is easing development. When you deploy, you don’t use that compose file because your environment is populated by whatever you use in production (typically Kubernetes these days).

    You should not store your development database password in a .env file because it’s not a secret. The AWS keys listed in the compose are meant to be exactly as they are there: XXX, because LocalStack doesn’t care what these values are, only that they exist.

    As for the CLI thing, again I think you’ve missed the point. The idea is to start from a position of “I’m building images” and therefore neve have a “local app, (Django, sqlite)” because sqlite should not be used unless that’s what’s used in production. There should be little to no difference between development and production, so scripting a bridge between these doesn’t make a lot of sense to me.


  • Daniel Quinn@lemmy.caOPtoPython@programming.devDeveloping with Docker
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    2
    ·
    20 hours ago

    I don’t mean to be snarky, but I feel like you didn’t actually read the post 'cause pretty much everything you’ve suggested is the opposite of what I was trying to say.

    • A CLI to make things simple sounds nice, but given that the whole idea is to harmonise the develop/test/deploy process, writing a whole program to hide the differences is counterproductive.
    • Config settings should be hard-coded into your docker-compose file and absolutely not stored in .json or .env files. The litmus test here is: “How many steps does it take to get this project running?” If it’s more than 1 (docker compose up) it’s too many.
    • Suggesting that one package Django into a single Lambda seems like an odd take on a post about Docker.


  • It’s a tough one, but there are a few options.

    For AWS, my favourite one is LocalStack, a Docker image that you can stand up like any other service and then tell it to emulate common AWS services: S3, Lamda, etc. They claim to support 80 different services which is… nuts. They’ve got a strange licensing model though, which last time I used it meant that they support some of the more common services for free, but if you want more you gotta pay… and they aren’t cheap. I don’t know if anything like this exists for Azure.

    The next-best choice is to use a stand-in. Many cloud services are just managed+branded Free software projects. RDS is either PostgreSQL or MySQL, ElastiCache is just Redis, etc. For these, you can just stand up a copy of the actual service and since the APIs are identical, you should be fine. Where it gets tricky is when the cloud provider has messed with the API or added functionality that doesn’t exist elsewhere. SQS for example is kind of like RabbitMQ but not.

    In those cases, it’s a question of how your application interacts with this service. If it’s by way of an external package (say Celery to SQS for example), then using RabbitMQ locally and SQS in production is probably fine because it’s Celery that’s managing the distinction and not you. They’ve done the work of testing compatibility, so theoretically you don’t have to.

    If however your application is the kind of thing that interacts with this service on a low level, opening a direct connection and speaking its protocol yourself, that’s probably not a good idea.

    That leaves the third option, which isn’t great, but I’ve done it and it’s not so bad: use the cloud service in development. Normally this is done by having separate services spun up per user or even with a role account. When your app writes to an S3 bucket locally, it’s actually writing to a real bucket called companyname-username-projectbucket. With tools like Terraform, the fiddly process of setting all this up can be drastically simplified, so it’s not so bad – just make sure that the developers are aware of the fact that their actions can incur costs is all.

    If none of the above are suitable, then it’s probably time to stub out the service and then rely more heavily on a QA or staging environment that’s better reflective of production.





  • Let me tell you how primary lane travel works in civilised countries: drunks and the others you mentioned end up in a canal, stranded up on a meridian, or crashed into a bollard.

    That’s because they do more there than just say “share the lane” and call it a day. They narrow the road to almost exactly the width of a typical car using unforgiving barriers like bollards, medians, and 5m deep canals. They restructure the roads so they aren’t straight throughways, but brick-paved, winding pathways through the city.

    They turn roads into obstacle courses, calming traffic, because as we all know, drivers may not be worried about killing cyclists, they’re horrified by the idea of scratching their paint.

    They still have drunks of course, but they’re typically on bikes (since driving is so impractical), and they too often end up in a canal.

    Here’s a decent example from Amsterdam where they effectively have 3 classes of road:

    • Highways where no bikes are permitted but there are always entirely separate cycle path options to travel the same distance.
    • Wide through roads with level asphalt paving and typically a curb, a row of trees, a tram, or other safe barrier between cars and cyclists.
    • Narrow, often winding shared roads where traffic is naturally calmed by the terrain: bollards, canals, bricks or cobblestone, big speed bumps, raised crosswalks, or other oncoming cars in a space clearly designed for a maximum of one. Even the traffic lights here are configured to reduce speed by defaulting to red in all directions.

    That last category is the majority over there, and a big reason why the city is so safe and quiet… unless it’s King’s Day or New Years eve. Then these spaces are flooded with loud, drunk pedestrians or children shooting fireworks at random. On those days I recommend trips out of town ;-)



  • This is one of the most infuriating things about the left. Automation is fantastic! Why the hell should we rail against something that reduces the amount of work people have to do? Why oppose something that reduces risks we have to take in our daily lives?

    There’s no dignity in human labour. We do it because our survival depends on it. The problem is that the automation of that labour is treated by capitalists as a net profit to the owning class.

    We should not be fighting to “maintain employment” FFS. We should be fighting for a reasonable share of the fruits of our community. If your job is automated, you should get a share of the company profits for life and then happily leave for new and different work, not try to prevent the automation in the first place.






  • I have an FP4 and I love it. I only ever have problems with the fingerprint sensor when my hands are dirty or overly sweaty. The camera works rather well to be honest, but I did replace the app with the Googled one.

    I can’t speak to Android Auto, 'cause I’ve never used it, and don’t know what ARKit is. I do heavily use Google (and Organic) Maps though, and I find the accuracy of both the GPS and compass to be quite good.

    Honestly, I generally find the hardware to be pretty solid and have been using it since the FP4 was released without issue. I connect it to my computer to transfer Very Large Files all the time, and regularly push a lot of data through the wifi.

    I’ve been abusing the shit out of the battery though, so I just ordered a replacement one. Something most phones still can’t do. It’s Fairphone’s killer feature in my book.

    I’m not posting this to invalidate your experience, just to demonstrate that there are others who feel differently.




  • Daniel Quinn@lemmy.catoSelfhosted@lemmy.worldPort Forwarding/Redirecting
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    1
    ·
    25 days ago

    At the firewall level, port forwarding forwards traffic bound for one port to another machine on your network on an arbitrary port, but the UI built on top of it in your router may not include this.

    If it’s not an option in your Fritzbox, your options are:

    • Make the service running on your internal network listen on one of those high-number ports instead.
    • Introduce another machine on the network that also performs NAT between your router and your machine
    • Try to access the underlying firewall in your router to tweak the rules manually. Some routers have an admin console accessible via telnet or SSH that may allow this.
    • Get a new router.

    The first and last options on this list are probably the best.


  • Daniel Quinn@lemmy.catoLinux@lemmy.mlIs Linux As Good As We Think It Is?
    link
    fedilink
    English
    arrow-up
    47
    arrow-down
    2
    ·
    edit-2
    12 days ago

    You make an excellent point. I have a lot more patience for something I can understand, control, and most importantly, modify to my needs. Compared to an iThing (when it’s interacting with other iThings anyway) Linux is typically embarrassingly user hostile.

    Of course, if you want your iThing to do something Apple hasn’t decided you should want to do, it’s a Total Fucking Nightmare to get working, so you use the OS that supports your priorities.

    Still, I really appreciate the Free software that goes out of its way to make things easy, and it’s something I prioritise in my own Free software offerings.