Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
The March Hare
Oct 15, 2006

Je rêve d'un
Wayne's World 3
Buglord

Lumpy posted:

I like to imagine that little mouse running around on a keyboard and these posts are the result.

Tei is easily my favorite SA poster these days, absolutely always a joy to read their posts.

Also, OT as hell but you can break up lines all you want in Python.

Adbot
ADBOT LOVES YOU

Shy
Mar 20, 2010

Nolgthorn posted:

PHP/Perl CGI all these things are still very popular although not for any actual programming.

right?

Define "actual programming". PHP is still widely used, Perl isn't.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
What I meant is those tools are used commonly as a delivery layer, for an application. Such as a single page application to the client, or as a proxy to an application located more deep inside the network as suggested earlier.

I'm pretty sure something like that is how my host is able to offer TLS without much effort for me.

Shy
Mar 20, 2010

PHP is used for big web apps too, e.g. Laravel is popular nowadays.

Shy fucked around with this message at 20:20 on Feb 14, 2018

Capri Sun Tzu
Oct 24, 2017

by Reene

Nolgthorn posted:

PHP/Perl CGI all these things are still very popular although not for any actual programming.

right?
Not even close. A staggering amount of websites are still PHP based, probably because Wordpress is the most popular CMS by far.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I think probably the concept someone is trying to get at when they say "PHP is not very popular" is more like "PHP is not very popular as a choice when you don't have external factors constraining your choices like having to work with WordPress or the limitations of some cheap and crappy host".

Capri Sun Tzu
Oct 24, 2017

by Reene

Thermopyle posted:

I think probably the concept someone is trying to get at when they say "PHP is not very popular" is more like "PHP is not very popular as a choice when you don't have external factors constraining your choices like having to work with WordPress or the limitations of some cheap and crappy host".
Oh, yeah definitely. PHP is great as a scripting language to bang out some quick server-side logic but I wouldn't use it for anything else unless I had to. (Which I do all the time since Wordpress is never going to die. )

Maleh-Vor
Oct 26, 2003

Artificial difficulty.
We use Drupal where I work at. While I'm just a designer, I did take a bootcamp for web apps on ruby/rubyonrails, and at least much of what I saw for the rendering end was similar. What's so terrible about PHP? I'm not really very familiar with full programming though, just scripting languages that are a bit more front-end focused.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Maleh-Vor posted:

We use Drupal where I work at. While I'm just a designer, I did take a bootcamp for web apps on ruby/rubyonrails, and at least much of what I saw for the rendering end was similar. What's so terrible about PHP? I'm not really very familiar with full programming though, just scripting languages that are a bit more front-end focused.

https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

TheCog
Jul 30, 2012

I AM ZEPA AND I CLAIM THESE LANDS BY RIGHT OF CONQUEST

Maleh-Vor posted:

We use Drupal where I work at. While I'm just a designer, I did take a bootcamp for web apps on ruby/rubyonrails, and at least much of what I saw for the rendering end was similar. What's so terrible about PHP? I'm not really very familiar with full programming though, just scripting languages that are a bit more front-end focused.

Having never worked with it, apparently a fairly common error is in yiddish

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Maleh-Vor posted:

We use Drupal where I work at. While I'm just a designer, I did take a bootcamp for web apps on ruby/rubyonrails, and at least much of what I saw for the rendering end was similar. What's so terrible about PHP? I'm not really very familiar with full programming though, just scripting languages that are a bit more front-end focused.

It was really bad for a long time, nowadays its apparently kinda OK-ish, there's just nothing really compelling about it.

Like, if you wanted to learn a backend language to start a software career, I suppose PHP would be OK since there's a bajillion sites out there built on it. You're not likely to find an exciting job doing exciting new things with it. You're more likely to find stodgy jobs maintaining stodgy stuff in stodgy old code bases.

Thermopyle fucked around with this message at 22:56 on Feb 14, 2018

darthbob88
Oct 13, 2011

YOSPOS

TheCog posted:

Having never worked with it, apparently a fairly common error is in yiddish

Hebrew, actually, because that feature was developed by Israeli devs.

Variable 5
Apr 17, 2007
We do these things not because they are easy, but because we thought they would be easy.
Grimey Drawer

The March Hare posted:

Tei is easily my favorite SA poster these days, absolutely always a joy to read their posts.

:same:

Tei is a flippin’ treasure

ModeSix
Mar 14, 2009


Can someone who knows a lot about PHP explain this to me and why/if it's true:

quote:

Unlike (literally!) every other language with a similar operator, ?: is left associative. So this:

code:
$arg = 'T';
$vehicle = ( ( $arg == 'B' ) ? 'bus' :
             ( $arg == 'A' ) ? 'airplane' :
             ( $arg == 'T' ) ? 'train' :
             ( $arg == 'C' ) ? 'car' :
             ( $arg == 'H' ) ? 'horse' :
             'feet' );
echo $vehicle;
prints horse.

Because what?!?

I don't even understand how that makes any sense at all.... please explain...

darthbob88
Oct 13, 2011

YOSPOS

ModeSix posted:

Can someone who knows a lot about PHP explain this to me and why/if it's true:


Because what?!?

I don't even understand how that makes any sense at all.... please explain...

From Wikipedia, everything before the last "?" gets collapsed into one giant condition, and since
code:
( $arg == 'B' ) ? 'bus' :
             ( $arg == 'A' ) ? 'airplane' :
             ( $arg == 'T' ) ? 'train' :
             ( $arg == 'C' ) ? 'car' :
             ( $arg == 'H' )
returns 'train' which is truthy, the final expression returns the true branch, which is "horse".

This is an acknowledged error that they have no plans to fix.

Alpha Mayo
Jan 15, 2007
hi how are you?
there was this racist piece of shit in your av so I fixed it
you're welcome
pay it forward~
Php has a its roots in being terrible about security and default settings. Combine with its ease of use and you ended up with lots of sites getting easily owned.

Register_globals defaulted on for years. Meaning if a bad programmer had something like

If (username=="admin" and logged_in==true)
admin_access=true;

If (admin_access==true)
provide admin abilities



All an attacker would have to do is guess /?admin_access=true and they'd get admin access. I know this code might seem so bad no one would use something like that but it was extremely common because how easy php is to write. Then get into people not escaping their MySQL queries and basically openly exposing their database to any attacker.. It was hacking paradise back then.

I don't have anything against PHP plus Laravel, I've heard a lot of good things about that.

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


Yeah, basically for a long time, it was really easy to write terrible code. Sometimes without realizing it since PHP has some issues. There's a reason any serious PHP development uses some sort of framework to enforce things. With how much legacy code written for PHP3/4 out there, I'm not sure how they can fix some of the issues without making breaking changes. Assuming they wanted to.

geeves
Sep 16, 2004

Alpha Mayo posted:

PHP brought us facebook

And for that alone PHP should be exiled.


Facebook stuck with PHP because some psycho wrote a PHP -> C++ transpiler that majorly increased the performance.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

geeves posted:

Facebook stuck with PHP because some psycho wrote a PHP -> C++ transpiler that majorly increased the performance.

I hope they are rich now and living on an island because they destroyed humanity

Capri Sun Tzu
Oct 24, 2017

by Reene
Facebook also gave us React though

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Capri Sun Tzu posted:

Facebook also gave us React though

We can destroy Facebook and write a React clone! Win-win!!

Capri Sun Tzu
Oct 24, 2017

by Reene

Lumpy posted:

We can destroy Facebook and write a React clone! Win-win!!
I'm about to blow your mind: facebook is good

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Capri Sun Tzu posted:

I'm about to blow your mind: facebook is good

Counterpoint: it’s utter garbage that is destroying our society.

Capri Sun Tzu
Oct 24, 2017

by Reene

Lumpy posted:

Counterpoint: it’s utter garbage that is destroying our society.
Whatever GRANDPA!

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I mean, if you're using Facebook aren't you the old person?

Tei
Feb 19, 2011

Kind of off-topic, but Facebook was good until they started filtering the wall, to weight post based on *their* criteria. At that point it become a platform to shape people opinions.

Then the craze of webgames messages was a bit too much, but the things done to rebalance that made the system even more obscure and more deep into whatever obscure algorithm apply the bias.

Other than that Facebook has made a few cool technologies.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Capri Sun Tzu posted:

Whatever GRANDPA!

:corsair: AND STAY OFF MY LAWN!

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
Facebook is trash. Everyone under 30 posts their memes on Twitter dot com nowadays

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

Grump posted:

Facebook is trash. Everyone under 30 posts their memes on Twitter dot com nowadays

Pretty sure Twitter is for old people as well. All kids do now is snapchatting nudes to each other.

Tei
Feb 19, 2011

I sometimes enjoy the idea that all these things existed in unix.

Unix even had a wall command to write in other people TTYs, the .plan file that was more or less your profile. Commands like finger and who. To poke people.

Facebook what they did was take all these ideas and repackage them in a nice container for dumb people. And thats awesome, theres merit in that.

Like how Whatsup is a IRC Client, not better or worse than Mirc, Pirch or others. But they have the merit to repackage things better.

Thats something us technical people need to learn to do better, to produce better packaging. The person with the better packaging normally wins.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Tei posted:

I sometimes enjoy the idea that all these things existed in unix.

Unix even had a wall command to write in other people TTYs, the .plan file that was more or less your profile. Commands like finger and who. To poke people.

Facebook what they did was take all these ideas and repackage them in a nice container for dumb people. And thats awesome, theres merit in that.

Like how Whatsup is a IRC Client, not better or worse than Mirc, Pirch or others. But they have the merit to repackage things better.

Thats something us technical people need to learn to do better, to produce better packaging. The person with the better packaging normally wins.

Zuck at least was apparently a Linux-on-the-desktop guy, so you might be onto something there.

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

Munkeymon posted:

Zuck at least was apparently a Linux-on-the-desktop guy, so you might be onto something there.

Pretty sure Facebook was all just a big scam to look at girls pictures.

The Dave
Sep 9, 2003

Facebook was such a crazy Wild Wild West in the early days. I remember being in college and everyone had their dorm building and room number on FB and if you were having a party you could just blast the whole building.

Capri Sun Tzu
Oct 24, 2017

by Reene

Tei posted:

Thats something us technical people need to learn to do better, to produce better packaging. The person with the better packaging normally wins.
That's why I'm a front-end dev :smug:

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

The UI/UX is your product (much to the chagrin of many backend devs).

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

Skandranon posted:

Pretty sure Facebook was all just a big scam to look at girls pictures.

Its origin story is pretty much college sleaze ‘rating’ women.

Knifegrab
Jul 30, 2014

Gadzooks! I'm terrified of this little child who is going to stab me with a knife. I must wrest the knife away from his control and therefore gain the upperhand.
I'm looking to make the background of a landing page more interesting. Currently its just a flat tone of grey/blue but I want something more visually dynamic.

I know this is a weird example, but see the background behind the heroes on the dota 2 pick screen: https://www.youtube.com/watch?v=U5hgxPfecv4&t=99s?

I kind of want something like that, a suble but pleasing color that has some smooth and interesting motion. Obviously I know nothing of how to achieve this. Is there CSS fuckery I can utilize to do such things? I may be asking something completely idiotic too, I realize.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Knifegrab posted:

I'm looking to make the background of a landing page more interesting. Currently its just a flat tone of grey/blue but I want something more visually dynamic.

I know this is a weird example, but see the background behind the heroes on the dota 2 pick screen: https://www.youtube.com/watch?v=U5hgxPfecv4&t=99s?

I kind of want something like that, a suble but pleasing color that has some smooth and interesting motion. Obviously I know nothing of how to achieve this. Is there CSS fuckery I can utilize to do such things? I may be asking something completely idiotic too, I realize.

Seems like that'd just be a video.
Maybe you could have a background image and slowly animate its background-size and/or background-position?

bigmandan
Sep 11, 2001

lol internet
College Slice
I played around with BigVideo.js ages ago, but it seems like it was abandoned in 2015. There is also a pure css/html5 approach, but mobile and older browsers will likely have issues. If you are going to go this route make sure the video size is small so it does not kill someones lovely mobile data cap.

Adbot
ADBOT LOVES YOU

geeves
Sep 16, 2004

Capri Sun Tzu posted:

Facebook also gave us React though

What’s funny is that react was sitting on the shelf at FB (along with a handful of other web ideas ) and when they acquired Instagram one of the IG guys said that it looked cool and used it for IGs first web page

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply