Canadian software engineer living in Europe.

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

help-circle

    • Keep everything in an external git service. You can use third party services like Codeberg, GitLab, or GitHub, or host your own on your NAS.
    • When you’re not working on a project and don’t think you’ll need to reference it for a while, just delete it from your laptop. The code always lives in git anyway.

    In terms of local storage, I usually have everything in ~/projects/project-name, and I don’t have tiny file size limits because I don’t use FAT32 filesystems — that’s the default filesystem you usually get on USB sticks and external hard drives you buy. You have to format those drives to something like EXT4 (Linux) or NTFS (Windows) or you get stuck with FAT32 which has 2gb file sizes.





  • So my first impression is that the requirement to copy-paste that elaborate SQL to get the schema is clever but not sufficiently intuitive. Rather than saying “Run this query and paste the output”, you say “Run this script in your database” and print out a bunch of text that is not a query at all but a one-liner Bash script that relies on the existence of pbcopy – something that (a) doesn’t exist on many default installs (b) is a red flag for something that’s meant to be self-hosted (why am I talking to a pasteboard?), and (c) is totally unnecessary anyway.

    Instead, you could just say: “Run this query and paste the result in this box” and print out the raw SQL only. Leave it up to the user to figure out how they want to run it.

    Alternatively you can also do something like: “Run this on your machine and copy/paste the output”:

    $ curl 'https://app.chartdb.io/superquery.sql' | psql --user USERNAME --host HOSTNAME DBNAME
    

    In the case of the cloud service, it’s also not clear if the data is being stored on the server or client side in LocalStorage. I would think that the latter would be preferable.






  • Generally, I agree. I think what I meant by the above is “how would you tell someone how to use the thing”. My favourite example is email vs email-with-PGP.

    How do you send an email?

    1. Open client
    2. Click “send new email”
    3. Type your email
    4. Click send

    How do you send a PGP-encrypted email

    Let’s first talk about this thing called a “keyserver”. Once you know what that is, you’ll have to go out and find some keys to add to it. We’re not going to talk about styling your message 'cause that’s not something you should be able to do… etc. etc.


  • This is a common problem with Free software, and honestly I think it’s our biggest one: we build stuff for ourselves and stop there. If we want our stuff to be adopted (which, for things that rely on network effects, we do) then we need to pay more attention to usability.

    Here’s a suggestion for anyone starting a project they think they might share. Before you start writing any code, write the documentation. Then rewrite it from the perspective of the least tech-literate person you know who you’d still want to use the project. Only after you’ve worked out how easy it should be for this person to get started, then you can start writing the thing.





  • I’ve been self-hosting my blog for 21years if you can believe it, much of it has been done on a server in my house. I’ve hosted it on everything from a dusty old Pentium 200Mhz with 16MB of RAM (that’s MB, not GB!) to a shared web host (Webfaction), to a proper VPS (Hetzner), to a Raspberry Pi Kubernetes cluster, which is where it is now.

    The site is currently running Python/Django on a few Kubernetes pods on a few Raspberry Pi 4’s, so the total power consumption is tiny, and since they’re fanless, it’s all very quiet in my office upstairs.

    In terms of safety, there’s always a risk since you’re opening a port to the world for someone to talk directly to software running in your home. You can mitigate that by (a) keeping your software up to date, and (b) ensuring that if you’re maintaining the software yourself (like I am) keeping on top of any dependencies that may have known exploits. Like, don’t just stand up an instance of Wordpress and forget about it. That shit’s going to get compromised :-). You should also isolate the network from the rest of your LAN if you can. Docker sort of does this for you (though I hear it can be broken out of), but a proper demarcation between your laptop and a server on the Open web is a good idea.

    The safest option is probably to use a static site generator like Hugo, since then your attack surface is limited to whatever you’re using to serve the static sites (probably Nginx), while if you’re running a full-blown application that does publishing etc., then that’s a lot of stuff that could have holes you don’t know about. You may also want to setup something like Cloudflare in front of your site to prevent a DOS attack or something from crippling your home internet, though that may be overkill.

    But yeah, the bandwidth requirements to running a blog are negligible, and the experience of running your own stuff on your own hardware in your own house is pretty great. I recommend it :-)






  • 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 ;-)