batiste
- "But it tests more things!"
Well ok, but those are integration tests, not unit tests... It is unacceptable that a unit tests can fail because of external system...
Test setup is sometimes very complicated AND expensive. Enforcing only 1 assertion per test is moronic beyond description.
It just makes things less readable, with not other benefits than making the code look more clever than it is.
- Legacy internal REST APIs
- NoSQL Databases
- Various SQL Databases
- Some static text files
- Some REST APIs from a third party
- POST or PUT or PATCH?
- Why can't my GET or DELETE requests have a JSON body?
It is just a better interface, even if it where to be used exactly as REST without any nesting. I used the Appollo server in NodeJS and it was so natural to make parallel queries and let the query planner take care of the parallelism for me...
Nhaa, I don't think so. Glyphosate residue are not a real concern for me.
Other things that are way higher on my list, that are considered "natural":
Sun exposure
Radeon gas
Alcohol and tobacco consumption
FastAPI doesn't have those issues at all...
This what I have been explained. Any sort data sharing, like introducing Google Analytics in your website and you need a disclaimer.
https://github.com/batiste/blop-language
Not sure why they claim proxies are complicated... I found it was a piece of cake to implement a working library for state management using a Proxy.
It is a huge mountain of work you have ahead yourself if you are a newbie in both domains.
Sure you might be able to slap together a simple CRUD app following a tutorial but truly knowing what you are doing will take months, if not years. It is a huge investment.
I don't quite share the same experience with i18n though. I always found Django statical code analysis to extract translation keys to be superior in many ways to other translation systems. It is giving useful context that are stored in the PO files and good translation tools use them. I also never had any issue with string based keys. You can chose an english based key or an abstract whatever you prefer.
Some of the annoyance you mentioned, that I agree completely, are more of a language issue like: reloader, or dependency management.
For multiple environments there is a very simple pattern you can put in place using an environment variable and conditional imports. something like:
from settings.base import *
if env == 'prod':
from settings.prod import *Then maybe it is an indication is not worth very much. Why not using something like hyperscript instead if it is just some javascript.
> JSX is also super copy-pastable. Less logic and all that.
In my experience the copy-paste-reuse in FE is a red herring. And React is no exception. And a logic less templating is not necessarily helping with a flexible/reusable piece of code.
> JSX being simple also makes the learning curve simple.
Not so sure about that. I think I would have personally preferred not having to learn a new DSL if some basic function call in Javascript can do the same job.
I guess I have been scared by colleagues using ugly ternary operator expressions with React.
I also used so many template languages in the past: PHP, Django, Pug, Rails, etc, etc. That I try to reproduce similar features/mistakes.
I created a small language to demonstrate what I mean https://github.com/batiste/blop-language
Yes, I learned it not so long ago in fact and I am a bit ashamed of it.
Try to save this into a HTML file:
<html>
<body>
<script>
let someJSON = {"hello": "</script><script>alert('powned')</script>"}
</script>
If you execute just the JavaScript in your browser console: perfectly fine, valid JS. Now open the HTML file in a browser: powned.This the because the browser has a HTML parsing phase, and only after JS is executed.
When <script> is parsed, then the HTML parser is looking for the next </script>. It doesn't matter if the </script> happened to be inside the context of a JavaScript string. At this point the browser doesn't know about JS.