As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

[Programming] Thread: Fixed last bug in 5 month thread

1484951535499

Posts

  • Options
    ironsizideironsizide You must whip it Registered User regular
    bowen wrote: »
    http://3v4l.org/7mLg0

    It was something like this, not exactly, but my php install definitely did not give me an error. It just happily churned along until I tried to access Messages.

    The problem there is that $this->$Inbox can't assign anything because there's no value for $Inbox.

    |_
    Oo\ Ironsizide
    camo_sig2.png
  • Options
    bowenbowen How you doin'? Registered User regular
    edited May 2015
    ironsizide wrote: »
    bowen wrote: »
    http://3v4l.org/7mLg0

    It was something like this, not exactly, but my php install definitely did not give me an error. It just happily churned along until I tried to access Messages.

    The problem there is that $this->$Inbox can't assign anything because there's no value for $Inbox.

    Yeah I don't have the exact code, I was just illustrating the issue with that "5 example" I made. I had no idea that was now legal. It didn't used to be, just kind of missed it in the code because it was a single $ throwing everything off, and code tunnel vision blocked its existence from me until I got up and walked away and rested my eyes for half hour.

    As soon as I removed it, voila, it worked.

    bowen on
    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    bowenbowen How you doin'? Registered User regular
    http://3v4l.org/K1XF2

    This is probably more "better" code that doesn't have an ass ton of stupid mistakes in it. I can't reproduce what I did, I'm sure I will in a few days and I'll bitch again that I missed the $.

    I should just rewrite everything in C# and switch my platforms to windows server.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    ironsizideironsizide You must whip it Registered User regular
    There's a lot of dynamically assigned properties there.

    Here's a version that may return what you'd expect: 3v4l.org/N1hUc

    In your version since you're assigning the username "Poopy" to $this->$Username = $Username it becomes $this->Poopy = "Poopy"; You probably want $this->Username = $Username and so on.

    |_
    Oo\ Ironsizide
    camo_sig2.png
  • Options
    bowenbowen How you doin'? Registered User regular
    Yeah I know, was trying to highlight the 1 one that was failing but ended up doing it all wrong in my example too.

    I'm so exhausted.

    I've been staring at php code for a week.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    ironsizideironsizide You must whip it Registered User regular
    The $this->$variable is useful for iterating over a known property set that may need to grow. I assign a list of properties in such cases and iterate over the list to set the default properties int he constructor on an init() function. Then I can add new fields in one plqce, and in other functions/methods I can just iterate over the same list when necessary with out adding in new property names everywhere.

    |_
    Oo\ Ironsizide
    camo_sig2.png
  • Options
    EchoEcho ski-bap ba-dapModerator mod
    So after never really using anything fancier than Sublime for frog ramming, I'm trying IntelliJ Idea for Grails stuff. And goddamn.

    I just define some relationships in Grails:
    class Contest {
        static hasMany = [players: Player, courses: Course]
    }
    

    And then at a press of a button I can see this.

    to7g4h97vozv.png

  • Options
    iTunesIsEviliTunesIsEvil Cornfield? Cornfield.Registered User regular
    bowen wrote: »
    http://3v4l.org/K1XF2

    This is probably more "better" code that doesn't have an ass ton of stupid mistakes in it. I can't reproduce what I did, I'm sure I will in a few days and I'll bitch again that I missed the $.

    I should just rewrite everything in C# and switch my platforms to windows server.

    I'm so looking forward to C# being more and more cross-platform. I really dislike running Windows Server instances for web-stuff, and I quadruple dislike (read: haaaaaaaate with the fire of a thousand suns) IIS. The closer we get to me being able to run just about any C# stuff I want on a Linux box with Nginx, the happier I get.

    :?

  • Options
    KambingKambing Registered User regular
    What I've been working for the last couple of years. Well, one third of it, at least:

    https://www.youtube.com/watch?v=5a2kRmCtEtM

    @TwitchTV, @Youtube: master-level zerg ladder/customs, commentary, and random miscellany.
  • Options
    StarfuckStarfuck Registered User, ClubPA regular
    You are a beautiful human being.

    jackfaces
    "If you're going to play tiddly winks, play it with man hole covers."
    - John McCallum
  • Options
    EndEnd Registered User regular
    edited June 2015
    why the hell does mono only check $HOME if getpwuid_r fails (in Environment.GetFolderPath and related places)

    I would have much preferred if it was the other way around

    End on
    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpg
  • Options
    SpawnbrokerSpawnbroker Registered User regular
    @Kambing a lot of the words in that video sounded like English that I should be able to understand, but the premise behind what you're doing sounds neat!

    Internet hi5!

    Steam: Spawnbroker
  • Options
    SpawnbrokerSpawnbroker Registered User regular
    I'm always looking at code I wrote a month ago and wondering what the hell I was thinking.

    Steam: Spawnbroker
  • Options
    bowenbowen How you doin'? Registered User regular
    I'm always looking at code I wrote a month ago and wondering what the hell I was thinking.

    Same.

    I run across stuff that is like 1 line of LINQ and wonder what the fuck was wrong with me a year ago because it's a convoluted for loop instead.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Yeah that's a constant thing, whether it's one month, one year or ten

  • Options
    RendRend Registered User regular
    Phyphor wrote: »
    Yeah that's a constant thing, whether it's one month, one year or ten

    Hell depending on what day of the week it was, sometimes it's yesterday.

  • Options
    bowenbowen How you doin'? Registered User regular
    Rend wrote: »
    Phyphor wrote: »
    Yeah that's a constant thing, whether it's one month, one year or ten

    Hell depending on what day of the week it was, sometimes it's yesterday.

    ARE YOU SPYING ON ME

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    urahonkyurahonky Resident FF7R hater Registered User regular
    Yeah my friend was lamenting that his code that he wrote a few months ago looks like garbage now and how he's a little ashamed of it. I had to inform him that it will never change. You will always look back and go "What the hell was I thinking?" no matter how far you get in your career.

  • Options
    electricitylikesmeelectricitylikesme Registered User regular
    So I'm having a fairly good time transitioning my scripting to Go. The benefits of the compiler slapping me for being an idiot are trading off well against learning a new language, and the go get architecture works well for its potential faults.

    Also no more 'oh this machine is missing all the Pythons' problem.

  • Options
    bowenbowen How you doin'? Registered User regular
    Just finished Wave 2 of my certification.

    100% pass rate this time.

    Partial pass on a few modules because I can't test 100% functionality yet.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    bowenbowen How you doin'? Registered User regular
    The fuck... they want me to provide proof my portal is WCAG 2.0 Level A compliant.

    How the fuck am I supposed to do that dynamic pages, it's not like I can run them through a parser.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    InfidelInfidel Heretic Registered User regular
    bowen wrote: »
    The fuck... they want me to provide proof my portal is WCAG 2.0 Level A compliant.

    How the fuck am I supposed to do that dynamic pages, it's not like I can run them through a parser.

    The trick is to spot-check.

    Save As... your page so that you have a static HTML file and upload that to a validator.

    Repeat until they are satisfied. :rotate:

    OrokosPA.png
  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Time for the daily dose of JAVA :rotate:

    CGbxXIvWQAAVWN2.png:large

  • Options
    bowenbowen How you doin'? Registered User regular
    Infidel wrote: »
    bowen wrote: »
    The fuck... they want me to provide proof my portal is WCAG 2.0 Level A compliant.

    How the fuck am I supposed to do that dynamic pages, it's not like I can run them through a parser.

    The trick is to spot-check.

    Save As... your page so that you have a static HTML file and upload that to a validator.

    Repeat until they are satisfied. :rotate:

    I got further into the documentation...

    That is 100% what they're doing.

    They randomly ask you to save pages and upload them. 100% compliance with WCAG isn't needed, just on the pages patients will access.

    Fuck your faces.

    We have to provide support for pediatrics too.

    What the fuck.

    We're not even a pediatric specialty, our office only takes patients older than 16.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    bowenbowen How you doin'? Registered User regular
    Phyphor wrote: »
    Time for the daily dose of JAVA :rotate:

    CGbxXIvWQAAVWN2.png:large

    The fuck?

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    urahonkyurahonky Resident FF7R hater Registered User regular
    Why the fuck would they do that? I can see the use-case for needing to know if a URL is identical to one that's on the same DNS, but having it happen for every .equals() check is absolutely the worst thing they could have done.

  • Options
    bowenbowen How you doin'? Registered User regular
    They're not even remotely equal! That's not just ignorance of URLs, that's down right fucking stupid about how the whole structure of the internet works.

    There's no way when they devised that system that they didn't know of subdomains or whatever at that point.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    InfidelInfidel Heretic Registered User regular
    Yeah, whoever implemented it just has no fucking clue.

    Java :rotate:

    OrokosPA.png
  • Options
    bowenbowen How you doin'? Registered User regular
    Why would you even do a DNS lookup on it to begin with? Just compare the strings. Who cares if it's an active URL?

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    RendRend Registered User regular
    Yeah that's a pretty obvious case of mismatched responsibilities. A URL is not the resource itself, but the address by which you locate it, and more than one different address can reference the same resource.

  • Options
    InfidelInfidel Heretic Registered User regular
    Yeah. The first two make sense, difference in case and an explicit vs implicit port, they are functionally the same.

    Anything beyond that is incorrect. Seriously, thinking that the IP of the host has anything to do with the URL is asinine.

    OrokosPA.png
  • Options
    bowenbowen How you doin'? Registered User regular
    I'm honestly surprised no one has patched it yet.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    bowen wrote: »
    I'm honestly surprised no one has patched it yet.

    There is no doubt countless applications that depend on the broken functionality, you see, so they just can't fix it!

  • Options
    bowenbowen How you doin'? Registered User regular
    Phyphor wrote: »
    bowen wrote: »
    I'm honestly surprised no one has patched it yet.

    There is no doubt countless applications that depend on the broken functionality, you see, so they just can't fix it!

    Fuck that.

    Fix it.

    Make those bitches run an old JVM if they need that functionality for business critical apps.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    InfidelInfidel Heretic Registered User regular
    Phyphor wrote: »
    bowen wrote: »
    I'm honestly surprised no one has patched it yet.

    There is no doubt countless applications that depend on the broken functionality, you see, so they just can't fix it!

    This is the kind of thing where it would fix the people depending on it.

    There's no way anyone is using that functionality intentionally.

    OrokosPA.png
  • Options
    Jimmy KingJimmy King Registered User regular
    Everything about the way Java deals with DNS and URLs is awful. I believe this has actually been fixed since I had to deal with it, but at one point in time the DNS resolver in Java completely ignored specified TTLs and just cached results forever (until the process was restarted). This resulted in a 40 hour workday once when we had to change DNS on a system and our biggest client (as in more than 1/2 of the US revenue at that company, probably more than 75%) would not believe me that there was a DNS problem on their end and my shit worked.

    Java 1.5
    networkaddress.cache.ttl (default: -1)
    Indicates the caching policy for successful name lookups from the name service. The value is specified as as integer to indicate the number of seconds to cache the successful lookup.

    A value of -1 indicates "cache forever".

    Of course this was 2010/early 2011, so it's possible that they were on Java 1.6 and had just hard set it to use the infinite cache.

  • Options
    EchoEcho ski-bap ba-dapModerator mod
    urahonky wrote: »
    Yeah my friend was lamenting that his code that he wrote a few months ago looks like garbage now and how he's a little ashamed of it. I had to inform him that it will never change. You will always look back and go "What the hell was I thinking?" no matter how far you get in your career.

    FxSACVQ.png

  • Options
    SpawnbrokerSpawnbroker Registered User regular
    Hey, I have a question for you guys.

    How do you deal with bosses that are "stuck in their ways" and don't like things they have never seen before?

    As an example, as we transition to having our own software suite, I've started to notice that we're building out a lot of "web pages" that are really just .aspx pages that do a bunch of stuff on Page_Load and have no user interface whatsoever. I mentioned that we should look into creating an API and host it on Azure for ourselves instead of creating these "web pages" that aren't really web pages.

    Every time I bring up something like this (Maybe we could use MVC instead of web forms on this project?), he shoots me down. He's not even an older guy either, he's my age. I think he just gets uncomfortable when confronted with things he doesn't already know. Do you guys have any strategies for how to convince him, or other members of the upper management, otherwise?

    I work at a very small company by the way, less than 10 developers. I'm one of the newer devs, but I've been here for about 2.5 years straight out of school.

    Steam: Spawnbroker
  • Options
    bowenbowen How you doin'? Registered User regular
    Build an example and show him how much time he could save, make it simple.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    TofystedethTofystedeth Registered User regular
    Rend wrote: »
    Yeah that's a pretty obvious case of mismatched responsibilities. A URL is not the resource itself, but the address by which you locate it, and more than one different address can reference the same resource.

    Clearly they meant to implement that version of .equals() in the UR library, not URL.

    steam_sig.png
This discussion has been closed.