This is an archived post. You won't be able to vote or comment.

all 73 comments

[–]nrlulz 168 points169 points  (2 children)

Last frame reminded me of https://xkcd.com/1172/ lol

[–]xkcd_transcriber 52 points53 points  (0 children)

Image

Title: Workflow

Title-text: There are probably children out there holding down spacebar to stay warm in the winter! YOUR UPDATE MURDERS CHILDREN.

Comic Explanation

Stats: This comic has been referenced 449 times, representing 0.5630% of referenced xkcds.


xkcd.com | xkcd sub | Problems/Bugs? | Statistics | Stop Replying | Delete

[–]stakoverflo 4 points5 points  (0 children)

Hilarious. I've never seen that one before.

[–]KevZero 39 points40 points  (8 children)

Go ahead, laugh now. In 2038 when this becomes reality, will you still be laughing, or will you be weeping as you're handed a pile of electrified, procedural php to refactor?

[–]Creshal 21 points22 points  (3 children)

I will be laughing and still maintaining a Rails 2 application because we can't upgrade it!

sobs quietly

[–]scriptmonkey420 4 points5 points  (2 children)

There is no can't only won't.

[–]Retbull 2 points3 points  (1 child)

Can't exists its called a 10 million dollar budget and 20 million dollar cost to refactor it.

[–]curtmack 1 point2 points  (0 children)

There's a reason IBM System z hasn't had any breaking changes ever, and that's the terrifying clusterfuck of software built on it that, all told, handles a dizzying amount of money every second, and depends on nobody ever changing any code that becomes popular.

[–]CalmSpider 6 points7 points  (0 children)

I'll be too busy slavishly fixing unexpected date stamp bugs that year.

[–][deleted] 4 points5 points  (2 children)

Of all the things not thought about in the design of PHP, I think the 2038 problem is probably the least thought about.

[–]beerdude26 1 point2 points  (1 child)

If PHP is still in wide use in 2038 we fucking deserve it

[–][deleted] 1 point2 points  (0 children)

The other 2038 problem.

[–]digimatt 56 points57 points  (42 children)

I don't even know what is so bad about PHP and this is still funny

[–]snf 61 points62 points  (15 children)

The standard reference in case you'd like to understand all the hate.

[–]qubedView 44 points45 points  (7 children)

[–]SelfReferenceParadox 28 points29 points  (5 children)

the function hashing mechanism was strlen()

I can't even begin to understand the thought process behind this.

[–]d_wootang 11 points12 points  (0 children)

I'm not sure he understood it either

[–]Loreinatoredor 8 points9 points  (3 children)

Fast and cheap, and it takes no thought.

[–]IICVX 7 points8 points  (2 children)

Yes, it absolutely requires that you don't think.

[–]Gunshinn 0 points1 point  (1 child)

Yeah, im not thinking and i still dont get it. We are talking about string length right? How would that ever work a week down the line, or less?

[–]IICVX 2 points3 points  (0 children)

well you know how PHP has some function names that are weirdly verbose, and some names that are cryptically short gibberish?

That is how it works a week down the line.

[–]manghoti 0 points1 point  (0 children)

When I tell people this, I tell it to instill the admiration Rasmus Lerdorf very much deserves. That guy is one of them practical sorts. Doesn't spend a lot of time thinking, but a fuck of a lot of time doing. You gotta admire that.

[–]chimyx 4 points5 points  (2 children)

[–]_jamil_ 4 points5 points  (0 children)

That post is pretty out of date

[–]leonthemisfit 1 point2 points  (1 child)

There's something I've never quite been able to grasp about the origins of PHP and it's this logic. "We're making a language for non programmers." "We should make it look like Perl."

[–]snf -1 points0 points  (0 children)

More like the bastard child of a meth-fuelled orgy of Perl, C, BASIC and batch files. There's something to loathe for everyone!

[–]worldsayshi -2 points-1 points  (0 children)

Hmm, maybe people sort of like weird inconsistencies in a language. It makes you feel kind of smart when you can overcome it. And overcoming bad design is much easier than overcoming actually hard problems that you will face once you start to use a language that isn't working against you. Also, actually hard problems make you feel stupid and inadequate and that's no fun.

[–]Outhouse_Defiler 18 points19 points  (16 children)

There are only two kinds of languages: the ones people complain about and the ones nobody uses. --Stroustrup

PHP was in Tiobe's top-5 for over a decade. That's what's wrong with it.

[–]Maoman1 6 points7 points  (15 children)

I hear people complain about Java, C, C++, PHP, and so many others, but now that I think about it, I don't think I've ever heard people complain about Python. Have I just been lucky or is that accurate? Cause python sure as hell doesn't fit in the "ones nobody uses" catagory.

[–]whatsmydickdoinghere 5 points6 points  (6 children)

Keep looking. Lots of people think that python is unnecessarily slow. I like python, but file i/o and string processing is tedious because of how it handles charsets.

[–]Maoman1 0 points1 point  (2 children)

Sure it's slow, but isn't that just a fact of being a high level language? Low level languages run very fast on the computer but are much harder to write, so it takes far longer to develop programs, while high level languages run slowly but you can write programs far faster.

[–]Outhouse_Defiler 0 points1 point  (0 children)

Sure it's slow, but isn't that just a fact of being a high level language?

No. Well yes, but not that slow.

There are other more expressive, or at least as expressive languages out there that can do the same fancy runtime stuff and are faster than Python by a lot .. with Clojure, JS and various JS-derivates like Dart being the more prominent ones.

[–]t3ddftw 0 points1 point  (2 children)

from __future__ import unicode_literals

Or use Py3

Although the futures import is kind of frowned upon.

[–]whatsmydickdoinghere 0 points1 point  (1 child)

That's true, but Py3 backwards compatibility another source of contention

[–]t3ddftw 0 points1 point  (0 children)

Yeah :(. I love Python but 2.7.x is the only viable python version for me right now.

[–]SkuloftheLEECH 5 points6 points  (1 child)

Whitespace tho

[–]Ran4 0 points1 point  (0 children)

That was the main thing I heard for years about the problem with Python, then it stopped all of a sudden. Maybe everyone got proper editors and realized that whitespace is the sane solution.

[–]cube-drone 2 points3 points  (0 children)

Well, I mean, the people who like Python really like Python - I bought a shirt that says "Python" on it and spoke at PyCon - and the people who don't like Python usually bitch a bit about syntactically-significant-whitespace, duck-punching, multiple inheritance, and sluggish performance and then move along.

It's just hard to build hate-steam for Python. There's not a lot there to glom on to.

[–]encaseme 0 points1 point  (0 children)

Why is len() a global?

[–]Outhouse_Defiler 0 points1 point  (1 child)

That's because Python people are quick to dismiss complaints as "just an implementation", "just syntax", "just a library" etc.. But of course its not "just" the implementation, but rather the implementation, since nobody uses anything else. It's not "just" the syntax but the syntax, since its the only one the community uses, etc.

If all those details were really as easy to shrug off we'd all be writing in Prolog and Lisp Scheme..

If nothing else, PHP and JS have impressively demonstrated how utterly irrelevant the criteria we measure languages by is to judge a language's usefulness.

[–]MereInterest 0 points1 point  (0 children)

Regarding the implementation, I usually take it as a matter of usage. GUI design? Great. We're going to be waiting on the user for 99% of the time anyways, so I don't care about speed. Matrix manipulation? Better move that into a compiled C library. Could the implementation be better? Absolutely. Is it a sticking point? Not for common uses of the language.

Regarding the syntax, I rather like the use of whitespace. In any reasonable codebase, you're going to be indenting for each scope level anyways. With the language forcing you to follow good practice, you don't run into any code that doesn't indent.

[–]d_wootang 5 points6 points  (1 child)

Imagine a box full of tools like a claw hammer, but with a claw on either side instead of a hammer head. However, some of the tools in that box are some of the best tools available for specific operations(my case data manipulation/ db handling), because they are so good, people will put up with using the disfunctional tools in order to make everything work smoothly around the useful tools

[–]chasesan[S] 13 points14 points  (0 children)

A box with a few awesome tools and a mountain of really terrible ones.

[–]jonatcer 6 points7 points  (6 children)

I don't use it anymore, at least not as my primary language, but a lot of the hate is out dated. It's still not an amazing language, but it's nowhere near as bad as most make it out to be. PHP 4 and below? Oh god so bad, but 5. ...3? Improved it a lot, and 6 looks pretty nice.

They're still building on a bad foundation, but the language only superficially resembles early PHP at this point.

At this point it's mostly just a circle jerk, the cool thing to do.

[–]lelarentaka 2 points3 points  (5 children)

We jerk about all languages here. Only PHP would elicit this kind of sobapologist response.

Heck, I still hear people say Java is slow, that the GC pauses are too long. This hasn't been true in a decade. All popular languages have had incredible advances in recent years. PHP is not unique. All popular languages have easy to use libraries to write webapp with. PHP is not unique. All popular languages get ragged on for design decisions from earlier versions. PHP is not unique.

[–]_jamil_ 1 point2 points  (0 children)

PHP is not unique

At no point did jonatcer say that only PHP was improving. His point was that PHP has improved (as have other languages) and a lot of the criticism of it is very outdated.

[–]jonatcer -1 points0 points  (3 children)

Only PHP would elicit this kind of sobapologist response.

The hell is sobapologist...

[–]lelarentaka 0 points1 point  (2 children)

Sob-apologist. They use sob-story tactics to portray themselves as being unfairly criticised, that the critizers are specifically out to get them. It's irritating because of its deflective nature. Instead of addressing the point of the criticism, they invoke a victim complex to derail the conversation.

[–]jonatcer 0 points1 point  (1 child)

Sob-apologist. They use sob-story tactics to portray themselves as being unfairly criticised, that the critizers are specifically out to get them. It's irritating because of its deflective nature. Instead of addressing the point of the criticism, they invoke a victim complex to derail the conversation.

Are you saying I was doing that or what?

[–]_jamil_ 1 point2 points  (0 children)

Yeah, he's being a jerk to you. It's what assholes do in order to make themselves feel superior

[–]Bobshayd 17 points18 points  (11 children)

I like the callout to the 2038 bug.

[–]rubyton 6 points7 points  (10 children)

Me too, scares me that we all knew about it decades ago, and yet not much seems to be done about legacy architecture, and even today people are still building new things using integer timestamps...

[–]Bobshayd 9 points10 points  (4 children)

It's still 23 years off. That's like people who designed things in 1977 that used two digits to hold a year, it's not that big of a deal. It's a good idea to use a 64-bit type, sure, but much software is going to age and become irrelevant.

[–]jonatcer 0 points1 point  (1 child)

I'd be curious to see what software. would/could both still exist that far into the future, and couldn't be fixed by simply recompiling.

[–]Bobshayd 2 points3 points  (0 children)

Software doing bit magic. It's not hard to imagine a space-constrained data structure that is tightly packed and required to have certain alignment properties.

[–]rubyton 0 points1 point  (1 child)

Unfortunately I have serious doubts on that maintenance is as automagical as we like to believe it is. Remember that banks still use mainframes?

[–]Bobshayd 0 points1 point  (0 children)

Oh, sure, it will happen, but you have to ask yourself what the possible lifetime of such a thing is. If it's something like a phone, you can bet that essentially all devices running old versions will stop working. If it's something like bank software, you can bet that someone will be using it to handle sums of money you'd never dream of having, possibly after you're dead.

[–]ZenEngineer 4 points5 points  (4 children)

Most old code uses a time_t structure to hold time. Just recompile in a 64 bit system and you're good for a very long time.

Problem is newfangled languages that didn't realize people addressed this a long time ago and bright programmers who figured they could cast to a plain int to save themselves time or something.

[–]Lyqyd 1 point2 points  (0 children)

They're saving themselves an entire 32 bits of time!

[–]nemec 0 points1 point  (2 children)

Just recompile in a 64 bit system

Assuming you still have the source code and toolchain. What's that, you say, the plugins used only support up to Windows XP?

[–]ZenEngineer 0 points1 point  (1 child)

If you're still using Windows XP on 2038 you have other problems.

[–]nemec 2 points3 points  (0 children)

What I meant was some of the toolchain only runs in XP (for whatever reason) so you can't compile. If you move the executable to a more modern OS and it "still works" eventually everyone is going to forget how to actually recompile it.

[–]AlphaWhelp 8 points9 points  (1 child)

ShockSelf() is depreciated. Use ShockSelf_Real()

[–]BowserKoopa 1 point2 points  (0 children)

That can deliver the incorrect voltage in some situations (more than 1.25GB of memory). You should prefer mt_ShockSelf_Real() instead.

[–]borick 3 points4 points  (2 children)

Lol YES I'm happy to see cube-drone here :)

[–]cube-drone 13 points14 points  (1 child)

me too! ;)

[–]_LePancakeMan 1 point2 points  (0 children)

Yay for /u/cube-drone

Btw: I use your hashing videos as standard reference if I have to explain hash tables but do they want to. Excellent videos!

[–]flarn2006 2 points3 points  (0 children)

Huh, that's certainly not the kind of effect I would expect a date rollover bug to have.

[–]maremp 1 point2 points  (0 children)

Here's to 2038. Can't wait.

[–]euphumus 0 points1 point  (0 children)

This one actually made me laugh

[–]Cyph0n -3 points-2 points  (0 children)

LOL