Better HN
topnewbestaskshowjobs
Log inSign up

fetbaffe

949 karma · joined Apr 29, 2013 (13y ago) · 489 submissions

Submissions

comment 5y ago · link · parent

I think that todays terrorism is mainly state sponsored, terrorist organisation use different types of resentment when recruiting new members, however many of the terrorist organisations are funded by governments around the world, this is the modern form of covert warfare in the post cold war era.

What we have is that one government, lets call it the States of Merica, funds & trains freedom fighters in a country called Lyria. Sometime after this Lyria is thrown into huge & devastating civil war against the regime where the opposing terrorist forms a new entity, the Salami State.

The civil war results in massive refugee crisis. Refugees flees north into the big trade union called Äuropean Club, ÄC. ÄC happens to be allied with States of Merica. Terrorists from the Salami State infiltrates the refugees and travels to ÄC where they commit a horrific terrorist attack in the capital city of Sirap. President of the States of Merica is chocked by these horrible news and pledges to help it's friends in the ÄC.

This leads the ÄC to adopt surveillance measures to track any potential terrorist. To its help it uses the knowhow and infrastructure from their close friends States of Merica (obviously).

When the civil war in Lyria nears it end and the Salami State is almost defeated, suddenly the winning Lyrian regime commits a gas attack on innocent civilians in a Salami State stronghold. ÄC and States of Merica condemns the gas attack and bombs the Lyrian regime as punishment. The freedom fighters rejoice because they now can fight for freedom a few more years.

The Salami State still exists and continue to get help from somewhere, unknown by whom, and commits more terrorist attacks in ÄC, in cities like Ockholm and Womanchester, because ÄC still haven't fixed it's border problem, but coincidentally ÄC has instead developed an excellent surveillance program, which is if course needed when the border is wide opened to the Salami state, duh!

All this is of course highly speculative and shares no resemblance with the real world.

So yes, if we fix terrorism because of like uh poverty, it can probably be solved.

comment 6y ago · link · parent

Correct, OOP in itself it’s not bad. I use it every day, but I mostly use composition rather than inheritance.

What I was trying to say was that the inheritance based OOP was sold as the ultimate problem solver.

We all remember programming classes with Hello World like examples of Cat inherits from Animal.

Problem is of course that in the real world is never that simple so the inheritance based model turned out many times to be a mess because it was applied to problems where it didn’t fit.

That doesn’t mean that inheritance based OOP has its place, it does, but that is usually in very specific domains.

comment 6y ago · link · parent

Early web was written in Perl, I guess it was the classic approach of lets borrow what is already successful and in end PHP won over Perl so it worked too. Bill Gates would have been proud.

comment 6y ago · link · parent

$ was taken from Perl

https://stackoverflow.com/a/3073818

but because early PHP was more simplistic than Perl it only has $.

Powershell also uses $ for variables.

Regardless of etymology of the $ sign and the usefulness of it, personally I like it because it makes it easier for me when I'm reading code, especially if you are scanning fast, to differentiate variables from symbols. Yes, you can get that with your editor too, but for me it is easier to associate the $ sign with a variable rather than a specific color, sometimes you don't have coloring available like when in command line going thru diffs, cat, nano etc.

comment 6y ago · link · parent

I learned Spring, one of the worst frameworks I ever worked with (note that I have worked with Laravel too). Spring is a bloated mess with lots of legacy & misuse of annotations, a.k.a necromancy.

It has somewhat improved with Spring Boot, but still to be avoided.

Database layer in Spring, especially if you combine it with the monstrosity called Hibernate, is enough to apply to an insane asylum. Trying to debug what combinations of annotations that work and doesn't work is time you could have used writing PHP instead and get results.

The idea that you can annotate a SQL schema & query language into a Java class with annotations is one of the most asinine ideas I ever come across.

And don't get me started on Java collections.

comment 6y ago · link · parent

Because the alternatives is actually not good, it just a fallacy.

There will always be something negative regardless of what you pick, problem is to decide what your core values are when writing different types of software. If you don't, you are just comparing apples to oranges.

When it comes to PHP, core values are usually things that has to do with tooling, server architecture & deployment, not much the language (syntax, expressions, lambdas, classes etc) it self, except maybe it is easy to learn & use.

This means that developers who comes from a background of that the language itself is the most important part of a project will most of the time just get confused what PHP is about.

comment 6y ago · link · parent

PHP is filled to the brim with bad frameworks with one size fits all type of mentality. Just avoid them and make your life easier.

If you need a framework, look for something small, small enough to read thru and understand in one hour.

comment 6y ago · link · parent

It was because every developer in the West was taught that inheritance based OOP was the one thing to rule them all.

And that unfortunate school of thought created the Java mythos that spread to many languages, not only PHP, eg JavaScript (everyone trying to write inheritance based OOP in a prototype based language).

Few years ago the mythos changed somewhat to every programming language should be functional.

Thus it is not a specific PHP problem, it is common problem of trend sensitivity in programming culture.

And the funny thing is that much of the critique against PHP, like in this thread, is in the form of "why isn’t PHP like the other programming languages?"

But agree PHP should go it’s own way, it has much to contribute to the world still and it feels like it has started to create its own path again.

comment 6y ago · link · parent

Nothing is stopping you of writing PHP the "old" way, all new stuff is optional.

comment 6y ago · link · parent

If you haven't realized it yet, your ideology liberalism is dying.

comment 6y ago · link · parent

If social media is poising the country, why give social media (YouTube) more powers?

If it is the case then you have two options, ban YouTube or add more government regulation.

Let them, with the poison, regulate themselves doesn’t make sense if you agree with that premise except if you think some poison is ok.

comment 6y ago · link · parent

Because the neighbors were Romans.

comment 6y ago · link · parent

I find it easier to handle multiple PHP versions on Windows than on Linux. As you say just download zip,unpack somewhere copy php.ini-development to php.ini, and you can do this for every minor PHP-version.

Apache is almost as easy, download zip, unpack & configure apache conf to use your php.

MySQL is somewhat more complicated because you need to run an setup script after unpacking the zip.

comment 6y ago · link · parent

I can’t escape Apple even I would change to Android according to this decision done by Apple against Telegram.

comment 6y ago · link · parent

It usually begins as

let’s split our project into multiple libraries so it can be reused within the company or even better if we put it on GitHub everyone can use it.

After a few months you notice nobody within the company cares about your nicely versioned libraries and on GitHub you get more and more complaints that the libraries are very limited and need more features.

After that you merge everything back into your monorepo and try to forget all the time wasted on git bureaucracy, versioning, dependency handling and syncing changes between repos.

comment 6y ago · link · parent

PHP, Apache, MySQL (or MariaDB), Bootstrap CSS and jQuery.

Very good setup that will solve your problems relatively fast and can be running for years without much maintenance.

There is no point of using anything else to do webpages. These technologies are tested and tried and works. Tons of documentation.

Ignore ideas that says you need to use fancy modern technologies, that is what has ruined the web and web development.

What is important is to follow best practices and web standards and that is true regardless of what technology you choose.

comment 6y ago · link · parent

The mix of Excel & Access as a new application would be a killer app. Hasn’t someone already built that in the cloud?

comment 6y ago · link · parent

How do you share the spreadsheet? Shared network drive? By email? With Excel?

comment 6y ago · link · parent

Sure, but you always have to ask, to what degree?

If it is more prevalent than in other societies then you can definitely call it a phenomenon.

comment 6y ago · link · parent

Pattern is high trust societies vs low trust societies.

comment 6y ago · link · parent

Most common XML parsers in PHP uses libxml which is written in C, so it should be relatively fast, however I haven't used it for super large XML-files and not for every request. It would be interesting to test.

comment 6y ago · link · parent

Sure, but how is it ironic? That is what I'm trying to figure out.

comment 6y ago · link · parent

So basically you never become a native regardless how many generations you stay in a country, thus nationalism is valid point of view.

comment 6y ago · link · parent

How is that ironic?

comment 6y ago · link · parent

In the old days many things that were XML when it should have been JSON, today it is the opposite, many things that are JSON when it should be XML.

comment 6y ago · link · parent

I’m not so sure about that, the reason is that the total number of programmers in the world are just increasing and more importantly more and more non-programmers program code today than ever before.

It hard to convince non-programmers to see the beauty of a type system when they only want to print some html.

So what I see is a bright future for languages that can do both, types or no types.

comment 6y ago · link · parent

I read the original poster's post as Graalphp needs to support both PDO, the C extension, AND Laravel, specifically every language construct that Laravel uses.

comment 6y ago · link · parent

Efforts like this with GraalVM and the upcoming JIT in PHP 8 should lead to, I believe, that many of the existing C extensions of PHP to be converted to pure PHP implementations.

When you have a JIT based language you want as much to be executed in that language, jumping back and forth between PHP and C is a drawback from a JIT perspective.

However there exist many PHP C extensions that are just thin wrappers around large C libraries like cURL, it is not really feasible to implement that in pure PHP.

But with the introduction of a foreign function interface with PHP 7.4 that has made it possible to call C libraries with ease, as long the C library doesn't do too much macro magic, and to my understanding upcoming Java release ships with a much improved native bridge with better support for native types, these two thing could lead to, guessing here, that you only need to implement the bridge for each implementation but share the rest of the PHP wrapper code for that C library.

However the foreign function interface introduced in PHP 7.4 is signigfanctly slower that the old style C extension of Zend PHP, but to my understanding is that future evolution of the JIT could theoretically reduce that performance impact.

comment 6y ago · link · parent

Hilarious. Marxist are constantly trying to rewrite history of the Vikings to fit the modern political spectrum of migration & multiculturalism, but now suddenly rewriting history is problem because of "white supremacy", which is of course once again trying to fit history into our modern discourse.

comment 6y ago · link · parent

> Laravel of the Java world

Fixed it for you.

12345
17