Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tored
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
121.
▲
by
tored
3y ago
No, functions are never autoloadable in PHP (except with nasty hacks).
122.
▲
by
tored
3y ago
Yes, the paradox with ORMs are that you actually need caching because they are typically very slow, with raw SQL and good indexes you can usually query database live for most of it. I find it usually better to have short timed cache in fron
123.
▲
by
tored
3y ago
I wouldn't pick an ORM even for caching, ORMs are typically a multi-layered blackbox magic based God class, thus very hard to debug when things hit the fan. Here is I how I do it with simple SQL and built in PHP constructs, easy to rea
124.
▲
by
tored
3y ago
Native SQL is the way to go, I always push for SQL over ORM in every project I'm in.
125.
▲
by
tored
3y ago
Personally I believe that you should always use require ( require_once ) instead of include ( include_once ) to be sure that a failure to load file creates an E_ERROR instead of an E_WARNING , this both for loading the framework but
126.
▲
by
tored
3y ago
For web PHP. PHP has many stable frameworks if you are in to that and if you don't want to use a framework you can run vanilla PHP without a problem. Dependency management is done these days with composer and it is easy add a dependenc
127.
▲
by
tored
3y ago
Loading jQuery twice is a band aid solution. However the jQuery 4 announcement page linked to this jQuery migration plugin that I was unaware of. Perhaps it can help in some old projects. https://github.com/jquery/jquer
128.
▲
by
tored
3y ago
Worst part of jQuery is actually upgrading it to a new version, because the api design that made jQuery powerful is also what makes it quite difficult figure out if you broke anything.
129.
▲
by
tored
3y ago
Sweden has universal healthcare and education is free, but still Sweden suffers from massive crime wave. Sweden's welfare state is a left wing dream come true, however the bad news for the left is that it empirically disproves every le
130.
▲
by
tored
3y ago
Please explain what is the root problem and how solve it.
131.
▲
by
tored
3y ago
Why don’t thieves stop being thieves after they can afford food?
132.
▲
by
tored
3y ago
If what you are claiming is true then the welfare state of Sweden wouldn’t experience almost any crime at all because no one in Sweden suffers from food insecurity. The educated middle class can afford to hold the most out of touch abstrac
133.
▲
by
tored
3y ago
There is an unwarranted hate against BASIC. BASIC has of course also evolved since then and you can still write professional software in numerous BASIC dialects just as in Pascal. Few years ago I evaluated FreePascal for writing desktop app
134.
▲
by
tored
3y ago
My first programming language was Commodore BASIC. It was already there when you booted up the machine, loading another compiler never crossed my mind.
135.
▲
by
tored
3y ago
I should be, it already exist a .NET implementation of PHP. https://www.peachpie.io/ https://www.peachpie.io/usecases
136.
▲
by
tored
3y ago
> What is that, exactly? Component rendered before client side JavaScript. > Web components quite literally don't work without Javascript. That is why I'm not using them.
137.
▲
by
tored
3y ago
Sure, the article is incomplete in the sense that it doesn't fully commit to the idea of HTML Web component as opposed to JavaScript Web components, but it is the correct way of thinking about this. There will almost always be a roundt
138.
▲
by
tored
3y ago
The article argues between the difference of a JavaScript Web component and a HTML Web component, you describing the former, thus the need for JavaScript. Personally I think the main problem here is client side rendering to begin with, with
139.
▲
by
tored
3y ago
It depends, if the page is very dynamic the element may or may not be there. Point is that the DOM API version of the initial jQuery snippet are not equivalent. $() statement does a bit more than that. This becomes obvious if the requiremen
140.
▲
by
tored
3y ago
In theory that sounds like a great idea, however in practice it isn't, because all you have done is compiled your own custom made distro that no one else uses and benefits from, thus just a waste of time and resources.
141.
▲
by
tored
3y ago
If the problem is in the desktop environment why then replace the kernel? Doesn't make much sense.
142.
▲
by
tored
3y ago
However getElementById() can return null, thus that entire statement can error. In the old days you had to sprinkle your code with if checks when using the DOM API.
143.
▲
by
tored
3y ago
That longbow shot was still most of the time within the combat zone, you as an individual knew that we can get ambushed here. Today you can get killed even far away from the front in a place that was considered mostly safe in previous wars.
144.
▲
by
tored
3y ago
Why not? Non-engineers seems always be the most eager to use the cloud to the most extreme. It is your tech-illiterate friends that hook you into the toxic cloud merely by having your contact information. Technology changes social interacti
145.
▲
by
tored
3y ago
There is no functioning market if it is a monopoly.
146.
▲
by
tored
3y ago
And what group today is the "right people" that these corporations push for?
147.
▲
by
tored
3y ago
But how is it fascism? These corporations are above the nation state.
148.
▲
by
tored
3y ago
I guess it comes down to the definition of capitalism, Mr Varoufakis says that it is markets and profits. I'm not an economist, thus a layman, but I can't entirely agree with that, in my opinion it is perfectly fine to have capita
149.
▲
by
tored
3y ago
You may have the skill, knowledge and wealth to pay for email, news and services, but a large part of the population doesn't and they will drag you down with them. Edit: typo, 'to' instead of 'the'
150.
▲
by
tored
3y ago
Common argument from Free software advocates is that violation of user's rights is a consequence of proprietary software. With Google you can even make an argument that they can violate more user's rights because of Free software.
More ›