• (disco)

    TRWTF is that the comment links worked date( strtodate( date( strtodate($TODAY) ) ).

  • (disco)

    Hey at least the interns used Y-m-d as internal format, could've been m/d/Y :smiley:

  • (disco) in reply to boomzilla
    boomzilla:
    strtodate

    Is that some custom function? If so, can I has the codes?

  • (disco)

    Hasn't the manglement there ever heard the adage "you get what you pay for"?

  • (disco)

    Well, those interns, were in their first or last year? I mean, after 4-5 years of a CS course in college you've got to know how to develop software. At least I did know. Not that it was perfect, but at least I knew about SQL injection (even though it was kind of a new fad which I blame on the explosion of PHP usage)

    Yeah, I was in college when PHP was the NodeJS of the time.

  • (disco) in reply to Eldelshell
    Eldelshell:
    I mean, after 4-5 years of a CS course in college you've got to know how to develop software.

    not necessarily.

    the good ones, sure, but the cargo cult programmers? not so much.

    and accademia tend to actually be very forgiving of cargo cult programmers in a way the job market isn't.

  • (disco) in reply to Eldelshell
    Eldelshell:
    Yeah, I was in college when PHP was the NodeJS of the time.

    DOES_NOT_COMPUTE

    PHP is..... special. yeha i'm being PC here so i'll stick with special.

    and NodeJS is awesome!

    ..... nope. doesn't make sense.

  • (disco) in reply to Keith

    strtotime is a PHP core function and takes a more or less well-formed date string like YYYY-MM-DD HH:MM:SS and turns it into a UNIX timestamp. Similar to strptime, which allows you to specify the format (strtotime guesses).

  • (disco) in reply to accalia

    My intention wasn't to compare both, but that PHP was cool and new. So much that I drank its Kool-Aid for a few years. I won't make the same mistake with NodeJS unless I'm paid for it.

    Fuck it.

  • (disco) in reply to Eldelshell
    Eldelshell:
    I won't make the same mistake with NodeJS unless I'm paid for it.

    NodeJS is fun, but i wouldn't reach for it for business development.

    personal development like @sockbot and @zoidberg sure, business not so much

    (and yes this won't summon those yahoos. mention them in a different category to see what they do)

  • (disco)

    On the other hand, dates ARE hard, they have always been. For instance, ive wondered for so many years why javascript was so stupid using zero based months... Days were in the 1-31 range, years in 1900+ range but months started with 0.

    It was only untill i discovered it mimiced C when studying the c standard library!! .. some nitwits who wrote the C standard library thought it was a good idea to have zero based months :dizzy_face:

  • (disco) in reply to TheIrritainer
    TheIrritainer:
    some nitwits who wrote the C standard library thought it was a good idea to have zero based months

    Probably because it was originally used as an index into an array of month names. (Consistency? What's that? :facepalm: )

  • (disco)

    there should a try catch block, just incase date-to-string-to-date-to-string again fails.

  • (disco) in reply to TheIrritainer
    TheIrritainer:
    On the other hand, dates ARE hard, they have always been. For instance, ive wondered for so many years why javascript was so stupid using zero based months... Days were in the 1-31 range, years in 1900+ range but months started with 0.

    It was only untill i discovered it mimiced C when studying the c standard library!! .. some nitwits who wrote the C standard library thought it was a good idea to have zero based months :dizzy_face:

    Obvious troll is obvious?

  • (disco) in reply to TheIrritainer
    TheIrritainer:
    some nitwits who wrote the C standard library thought it was a good idea to have zero based months

    PREACH!

  • (disco) in reply to Mikerad1979
    Mikerad1979:
    Obvious troll is obvious?

    Is this a @kupfernigk sockpuppet?

  • (disco)

    I'm not sure what the title has to do with the article

  • (disco) in reply to tarunik

    Maybe someone showed them the "Iron Triangle": http://en.wikipedia.org/wiki/File:Project-triangle.svg

    As you clearly see, "cheap" is the base for the rest.

  • (disco)

    First, mandatory xkcd comic covering Universities, exemplifying their typical proportion of usefulness in the real world: [image] Source: http://xkcd.com/773/

    Ok, now I'll just review the obvious.

    So First: "Against the objections of everyone who did the actual work within the company, management partnered with the local University to have graduate students, most of whom had zero experience outside of academia, develop the new system for internship credit. Unpaid, of course."

    Then the Fix: "The next day, he learned in a meeting that the company wouldn't afford the time to fix it. Instead, they would partner with the local University and hire a new team of unpaid interns to fix the system up."

    Cue Benjamin Franklin: "The definition of insanity is doing the same thing over and over and expecting different results."

    Of course, TRWTF is PHP - almost goes without saying. Paging @Arantor (in case he ever makes it back)...

  • (disco) in reply to TheIrritainer

    I think it was the other way round: someone persuaded the data structure designers to let the days start with 1 instead of 0 like any sane programmer would have done it.

  • (disco) in reply to redwizard
    redwizard:
    Cue Benjamin Franklin: "The definition of insanity is doing the same thing over and over and expecting different results."

    Mr Franklin lived a few eras before Windows & co., though. Today, expecting very different results from the same actions is totally reasonable.

  • (disco)

    I've learned something new today: ASAP stands for "As Sordid As Possible".

    (Or does the P stand for Putrid?)

  • (disco) in reply to accalia
    accalia:
    i wouldn't reach for it for business development.

    But it's "Enterprise Ready"!

    http://blog.risingstack.com/node-js-is-enterprise-ready/

  • (disco) in reply to Yamikuronue
    Yamikuronue:
    But it's "Enterprise Ready"!

    just because they say they are doesn't mean they are.

    :-P

  • (disco)
    kupfernigk:
    And I have learned a lesson about the group mindset of thedailywtf.

    A. We don't really tolerate it, unless it's our :heart_eyes: of C#.

  • (disco) in reply to RandyHickey
    RandyHickey:
    ``strtotime`` is a PHP core function and takes a more or less well-formed date string like ``YYYY-MM-DD HH:MM:SS`` and turns it into a UNIX timestamp. Similar to ``strptime``, which allows you to specify the format (``strtotime`` guesses).

    To be fair to PHP (I know, I know), strtotime follows GNU's date format specification, so you can't blame PHP for the wackiness that happens there.

  • (disco) in reply to Eldelshell
    Eldelshell:
    Well, those interns, were in their first or last year? I mean, after 4-5 years of a CS course in college you've got to know how to develop software.

    If it was a "True Computer Science" program, then there's no requirement that you know anything about professional software development and engineering. A lot of computer science professors consider programming to be beneath them. It's far more important to them that you can write a formal proof of an algorithm for the Towers of Hanoi than it is for you to be able to write the code for it.

  • (disco)

    I don't normally post reaction videos or "MFW" type responses, but I felt that this one really did perfectly summarize my response to the representative line.

    https://www.youtube.com/watch?v=WH0z00t8OlM

    So let me see if I have this straight (I don't frequently use PHP). It takes a date string.... converts that to a UNIX timestamp, which it then converts into a date string, which it then converts into a UNIX timestamp, which it finally converts back into a date string?

    I feel like I must have something wrong, because a sane person cannot possibly have conceived such idiocy.

  • (disco) in reply to PWolff

    Ah, you must mean: [image] http://dilbert.com/strip/2004-02-01

    Note PHB's expression in the last frame...

  • (disco) in reply to Masaaki_Hosoi
    Masaaki_Hosoi:
    I feel like I must have something wrong, because a sane person cannot possibly have conceived such idiocy.

    a single sane person couldn't. As Nietzsche said, "Insanity in individuals is rare, but in groups, nations, and epochs, it is the rule."

    And a single person could have done that without much insanity by repeated replacing of expressions. (I've done such things myself.)

  • (disco) in reply to redwizard
    redwizard:
    Ah, you must mean:

    http://dilbert.com/strip/2004-02-01

    I admit I didn't think of this comic strip this time, thanks for reminding me. It is just that clicking on a screenshot of a webpage seldom works at all, but trying to connect to a ressource or using an API function can work differently every time.

  • (disco) in reply to Yamikuronue
    Yamikuronue:
    But it's "Enterprise Ready"!

    I always wonder if that means it renders timestamps as Stardates…

  • (disco) in reply to dkf

    Only when printed to the Captain's logs.

  • (disco) in reply to Dragnslcr
    Dragnslcr:
    "True Computer Science"

    I didn't do "True Computer Science". I was required to write code as well as learn plenty of CS theory.

    University is not trade school. You can't trust graduates of any degree to write decent code because it's just not possible to gain the required experience in three years, or even five in an academic setting.

  • (disco) in reply to PWolff
    PWolff:
    I admit I didn't think of this comic strip this time, thanks for reminding me. It is just that clicking on a screenshot of a webpage seldom works at all, but trying to connect to a ressource or using an API function can work differently every time.

    There is a difference between insanity and persistence. The insane cannot distinguish it. ;-)

  • (disco) in reply to JBert
    JBert:
    Only when printed to the Captain's logs.

    If you work in a crayon reference, we can tie that to that other thread.

  • (disco)

    I wish I could say I haven't seen literally this exact line of code at least 10 places in our codebase.

  • (disco)

    Well, it's like Linux. It's free if your time worth nothing.

    Just see how much time is spent on "try and error" those interns for adequate skill to fix the website.

  • (disco)

    TRWTF is that unpaid interns were writing production code. That's illegal in all 50 states; unpaid interns cannot do work for the benefit of their employer. That makes them regular employees, which are owed minimum wage, must be put on a payroll system, have payroll taxes withheld and all that jazz. In the real world, computer science internships are paid positions.

  • (disco) in reply to dangrossman
    dangrossman:
    TRWTF is that unpaid interns were writing production code. That's illegal in all 50 states;

    Plot Twist: WTF takes place in Elbonia.

  • (disco) in reply to dangrossman

    Probably "unpaid interns" was part of the frontpagification process, and they were new hires on probation or some such.

    Alternatively, given the article, you could make a persuasive case that the work they did didn't in fact benefit their employer in any way.

    On the IDGI front, why would unpaid interns be a thing at all if they aren't allowed to do anything that benefits you?

  • (disco) in reply to PWolff
    PWolff:
    I think it was the other way round: someone persuaded the data structure designers to let the days start with 1 instead of 0 like any sane programmer would have done it.

    I know this is a waste of time but I will just explain the thinking, and then you can tell me why it's stupid. Years and days are referred to by numbers, months by numbers and names, and days of the week normally by names only. As days do not alias to names, there is no point to having zero based days. So the days go 1...n because that is a familiar representation. In effect, the name of day zero of the month is "1", and so on. Months on the other hand not only have names but even in the Gregorian calendar world they have many different names in different languages. There will be many arrays of month names. Arrays are nowadays almost always zero based and so if months are numbered 1...12 there is a potential wtf in a programmer failing to remember this and creating a month array which starts at index 0. So because month names are used far more often than month numbers in presentation, it makes more sense to make the internal representation zero based; reduced chance of error. Days of the week are only referred to by number in ERP systems, in my experience. The same array issue arises as with months but the calculation for day of week does not coincide with a month or day border. Therefore the internal representation of day of week may also be zero based, but nobody notices and complains. The potential wtf in ERP is that day zero of the week can be Sunday or Monday depending on implementation. Dates have been around for a long time, and it's inevitable with legacy systems that cannot be updated that there will be issues when they have to work with computers.

  • (disco) in reply to kupfernigk
    kupfernigk:
    Days of the week are only referred to by number in ERP systems, in my experience.

    Well, that and the Cantonese language. (OneDay, TwoDay, ThreeDay, FourDay, FiveDay, SixDay, SunDay)


    Filed Under: Yeah, fuck Sunday.

  • (disco) in reply to dangrossman
    dangrossman:
    That's illegal in all 50 states

    And many other places besides, but that doesn't stop employers from trying to get away with it.

  • (disco) in reply to accalia

    To be fair some big players are using it for business critical things.

  • (disco) in reply to Dragnslcr

    Plus it doesn't help when you go into employment most places don't have anything resembling a process

  • (disco) in reply to Dragnslcr

    When I went to university, Computer Science was part of the School of Mathematical and Physical Sciences, and it dealt with the theoretical notion of "computation"; you needed to be able to program as far as proof-of-concept, but that was a requisite, not the objective. If you wanted University degrees in the design and development of commercial/industrial grade software, you'd be studying Software engineering at the School of Engineering across the street (BAs and DBAs, please follow the signs to the business school).

    What is this obsession among businesses with using CS students for coding gruntwork? I wonder where all the software engineering interns go.

  • (disco) in reply to redwizard

    The aphorism always reminds me of flight BA009. The crew lost count of the number of times they went through the engine start checklist somewhere around the 30th iteration.

  • (disco) in reply to kupfernigk
    kupfernigk:
    So because month names are used far more often than month numbers in presentation

    This is where I disagree with you. Even if you're right, numbers are used all the time.

    kupfernigk:
    it makes more sense to make the internal representation zero based; reduced chance of error.

    This is "reducing" the error for the library writer instead of the zillions of people who will use it. And who all have numbers associated with the dates. Now they have the extra cognitive burden of figuring out if they have to do math whenever they want to use a month. Because the library developers hate people and are in love with zero based indexing even when it contradicts the real world.

    kupfernigk:
    and then you can tell me why it's stupid.

    You're welcome.

  • (disco) in reply to Watson
    Watson:
    What is this obsession among businesses with using CS students for coding gruntwork? I wonder where all the software engineering interns go.

    I assume it's because most schools, including mine, in the United States don't have Software Engineering degrees. Most colleges consider Computer Science and Software Engineering to be the same thing.

Leave a comment on “Today is Special”

Log In or post as a guest

Replying to comment #:

« Return to Article