• 0 Posts
  • 21 Comments
Joined 1Y ago
cake
Cake day: Jul 01, 2023

help-circle
rss

What?

It’s simple and readable. You literally put somebody that has never coded in their life, show them the YAML file and they will probably get it. Worked both with my boss and my girlfriend.

In Toml there are too many ways to do the same thing, which I don’t like. Also unless you know it deeply, you have no idea how the underlying data structure is going to look.


In polish we have ź and ż. For ż we use Alt gr + z, and for ź we use Alt gr + x. Same for other non-standard letters. The rest of the keyboard is a regular US layout.

So in Swedish you could use Alt gr + a and Alt gr + s for different variants of a.


All of these functionalities can be provided by a simple WebSocket + REST server. The car connects to the WebSocket, and you can access these functionalities from your phone either with WebSockets or regular HTTP requests.

Cheapest servers with backend written in JS can easily handle thousands of WebSocket connections, and written in Go tens of thousands WebSocket connections. They would not ever need like over 100 of these servers GLOBALLY, which would cost them around $3000 monthly.

That’s the price of 60 subscriptions, which is freaking ridiculous.


You realize that maintaining a server that would allow that costs pennies?

You wouldn’t pay $150 for a lollipop, but somehow people think this is ok.

This problem exists exactly because of people like you, thinking it’s OK to pay for the features you already paid for.


And as always, DRMs fuck only legitimate customers, and pirates can watch anywhere at full quality.

That’s one of the reasons I don’t feel bad about pirating any more. Not even the cost, but the fact that if you pay you’re going to have a worse experience.


Learn it first.

I almost exclusively use it with my own Dockerfiles, which gives me the same flexibility I would have by just using VM, with all the benefits of being containerized and reproducible. The exceptions are images of utility stuff, like databases, reverse proxy (I use caddy btw) etc.

Without docker, hosting everything was a mess. After a month I would forget about important things I did, and if I had to do that again, I would need to basically relearn what I found out then.

If you write a Dockerfile, every configuration you did is either reflected by the bash command or adding files from the project directory to the image. You can just look at the Dockerfile and see all the configurations made to base Debian image.

Additionally with docker-compose you can use multiple containers per project with proper networking and DNS resolution between containers by their service names. Quite useful if your project sets up a few different services that communicate with each other.

Thanks to that it’s trivial to host multiple projects using for example different PHP versions for each of them.

And I haven’t even mentioned yet the best thing about docker - if you’re a developer, you can be sure that the app will run exactly the same on your machine and on the server. You can have development versions of images that extend the production image by using Dockerfile stages. You can develop a dev version with full debug/tooling support and then use a clean prod image on the server.


Then again, cookie auth is vulnerable to CSRF. Pick your poison.

Although CSRF protection just adds a minor inconvenience, while there is never a guarantee your code is XSS vulnerability free.


Yeah I don’t get why it spits out whole types instead of only differences between them. Like “function expects non-null ‘some.param.in.object’ of type ‘string’ in argument ‘someArgument’, which is missing in passed argument”.


If you’re a beginner:

I almost gave up programming once, I thought I was too stupid.

Then I learned Linux and figured out starting out in IDEs as a beginner is the worst thing you can do. It doesn’t teach you anything, it just lets you get the job done - the thing that you should avoid while learning.

If you can’t build your software with only CLI - you probably have no idea how technology you’re programming in works.

If you are intermediate:

Reinventing the wheel is a great way to learn how libraries you’re using actually work.


The language itself is not that bad. Especially the newest releases are really great, thought out DX improvements. What stinks are its legacy parts and how it needs to be run.

My biggest pain is that for it to actually behave like it should it requires some sort of an actual web server like apache or nginx.

Also, servers written in are actually request handlers - every time a request comes, the whole app is reinitialized, because it just can’t hold its state in memory. In many apps every request means reinitializing connection with database. If you want to keep some state, you have to use some caching mechanism like redis or memcached.

Also had one time when Symfony app was crashing, because someone forgot to close class braces, and everything was “working” until some part of code didn’t like it and was just dying without any error.

And one time when someone put two endlines after php closing tag at the end of the file, confusing the entire php interpreter into skipping some lines of code - also without warning, and only in specific php version.


Honestly, if you work in a shell a lot, learning vim is a great investment. You’re gonna fly through files editing them faster than with any IDE.


Lockfile contains exact state of the npm-managed code, making it reproducible exactly the same every time.

For example without lockfile in your package.json you can have version 5.2.x. In your working directory, you use 5.2.1, however on repo, 5.2.2 has appeared, matching your criteria. Now let’s say a new bug appeared in 5.2.2.

Now you have mismatched vendor code, that can make your code behave differently on your machine, and your coworker’s machine, making you hunt for bug that wasn’t even on your side.

Lockfile prevents that by saving an actual state of vendor code.


The way I use it is ‘undefined’ is literally undefined (not set), but null means no value - explicitly.



I disagree (mostly). What’s the difference between library and language built-in? PHP and C++ has a ton of built-ins. It doesn’t make it less complex than using library.

Problems that look simple at the first glance are in most cases are complex with too many edge cases.

I think I have never written a single utility function that had no non-obvious bug, and imagine that in more complex problems

Not to mention in many cases any function you write is possibly dangerous.

Just take a look how many things you have to consider when checking for odd number in JS:

https://www.npmjs.com/package/is-odd?activeTab=code

And of course most of that can be fixed be using strongly typed language.


I specifically have a rule that if at the current abstraction layer, a step is more than one function call/assignment - I’m creating another function for that.



Yup, if you have SSH service open on port 22, you’re automatically spammed by bots trying to brute force their way onto the system.



Because terminal emulators are literally the old terminal emulators (ye oldy screens + keyboard combos that looked like a computer but were just IO) and everything modern they do is just a hack.


Arch is buying furniture, Gentoo is Ikea and LFS is making everything out of plywood yourself.