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] Mirror, mirror, on the wall, show the git diff for them all

16791112100

Posts

  • Options
    urahonkyurahonky Resident FF7R hater Registered User regular
    Yay they added another week until we release (not this weekend, next weekend now).

    Except they threw conversion of the old Mongo DB to Postgres.

  • Options
    bowenbowen How you doin'? Registered User regular
    urahonky wrote: »
    Yay they added another week until we release (not this weekend, next weekend now).

    Except they threw conversion of the old Mongo DB to Postgres.

    FYI that's something that should be 2-3 months long.

    Make sure to tell your manager and not wuss out and attempt to do it with 80 hours of overtime 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
    djmitchelladjmitchella Registered User regular
    Starfuck wrote: »
    Out of all of them, I like doT as the absolute simplest and cleanest.

    One red flag is that the github repo for doT hasn't been touched since January, and there's a bunch of PRs piled up -- if it does what you want it to to Right Now and you're not concerned about any of the things in PRs/issues, then sure, but if it doesn't work somehow then it looks like it'll be a pain finding out what to do about it)

    (it's pretty funny seeing "issue: it would be great if doT used a virtual DOM". Well, possibly it should, but given doT is (kind of) a giant regexp that takes templates in and outputs javascript that concatenates strings of HTML, that is a non-trivial change.. I appreciate the simplicity, though, it's pretty clear what's going on in there)



  • Options
    zeenyzeeny Registered User regular
    bowen wrote: »
    urahonky wrote: »
    Yay they added another week until we release (not this weekend, next weekend now).

    Except they threw conversion of the old Mongo DB to Postgres.

    FYI that's something that should be 2-3 months long.

    Make sure to tell your manager and not wuss out and attempt to do it with 80 hours of overtime a week.

    Or it can be a day, depending on what you are storing and how are you reading it.

  • Options
    bowenbowen How you doin'? Registered User regular
    zeeny wrote: »
    bowen wrote: »
    urahonky wrote: »
    Yay they added another week until we release (not this weekend, next weekend now).

    Except they threw conversion of the old Mongo DB to Postgres.

    FYI that's something that should be 2-3 months long.

    Make sure to tell your manager and not wuss out and attempt to do it with 80 hours of overtime a week.

    Or it can be a day, depending on what you are storing and how are you reading it.

    Judging by the kind of hours he's working, his system seems complex.

    I don't even feel comfortable saying 3 months... but that's the minimum I'd need moving from NoSQL to SQL.

    Hopefully not medical.

    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
    zeeny wrote: »
    bowen wrote: »
    urahonky wrote: »
    Yay they added another week until we release (not this weekend, next weekend now).

    Except they threw conversion of the old Mongo DB to Postgres.

    FYI that's something that should be 2-3 months long.

    Make sure to tell your manager and not wuss out and attempt to do it with 80 hours of overtime a week.

    Or it can be a day, depending on what you are storing and how are you reading it.

    Whatever the estimate is, he should add 30% to it and give it to his manager honestly.
    "I figure it'll take <x>, so given time to thoroughly test and debug we're probably talking <1.3*x>. If things go really poorly, it could be as much as <y>, or if they go really well it could be as little as <z>, but <1.3x> is my best estimate right now."

  • Options
    zeenyzeeny Registered User regular
    edited September 2015
    bowen wrote: »
    zeeny wrote: »
    bowen wrote: »
    urahonky wrote: »
    Yay they added another week until we release (not this weekend, next weekend now).

    Except they threw conversion of the old Mongo DB to Postgres.

    FYI that's something that should be 2-3 months long.

    Make sure to tell your manager and not wuss out and attempt to do it with 80 hours of overtime a week.

    Or it can be a day, depending on what you are storing and how are you reading it.

    Judging by the kind of hours he's working, his system seems complex.

    I don't even feel comfortable saying 3 months... but that's the minimum I'd need moving from NoSQL to SQL.

    Hopefully not medical.

    If it's a data model, if he has to translate it etc, maybe. He said: Mongo to Postgres -> http://www.postgresql.org/docs/9.3/static/functions-json.html
    I really doubt they were doing actual schemas with mongo, I mean, it doesn't work.
    Postgres is civilisation.

    zeeny on
  • Options
    RendRend Registered User regular
    edited September 2015
    If a manager actually knows what's up, there's going to be several reports they care about:
    1. Estimate of how long
    2. When-ish you'll have it tested and finished
    3. How long if things are significantly more difficult than you anticipated
    4. How long if things are significantly less difficult than you anticipated
    5. How likely is it that it's significantly more or less difficult than you anticipated, and how likely is a total showstopper

    Rend on
  • Options
    zeenyzeeny Registered User regular
    edited September 2015
    Gotta adapt to the workplace, Rend. Mongo to Postgres. Write a cli script. Run it. Check manually that most things are in there(god forbid, don't write an integrity/validation tool). Set the issue to 100%.

    Edit: Fuck sorry, I forgot. Sunday. Do it all on a Sunday.

    zeeny on
  • Options
    bowenbowen How you doin'? Registered User regular
    Okay so you've converted the data.

    Now you've gotta convert the code that interacts with the data.

    You're talking at least a few weeks for simple code.

    If you're confident stamping your name on a conversion script and and some small code changes on an app that large... good on you I guess.

    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
    Grey PaladinGrey Paladin Registered User regular
    I don't understand, and am frankly scared of, random number generators. I need a reasonably fast and reasonably random generator. It doesn't have to be cryptographically secure. I'm currently using the Mersenne Twister but my much more clever friend who has a CS degree and everything is suggesting that I should use PCG instead. Does anyone have any experience with it?

    "All men dream, but not equally. Those who dream by night in the dusty recesses of their minds wake in the day to find that it was vanity; but the dreamers of the day are dangerous men, for they may act their dream with open eyes to make it possible." - T.E. Lawrence
  • Options
    RendRend Registered User regular
    zeeny wrote: »
    Gotta adapt to the workplace, Rend. Mongo to Postgres. Write a cli script. Run it. Check manually that most things are in there(god forbid, don't write an integrity/validation tool). Set the issue to 100%.

    Edit: Fuck sorry, I forgot. Sunday. Do it all on a Sunday.

    teach me your skills

    please

  • Options
    RendRend Registered User regular
    edited September 2015
    bowen wrote: »
    Okay so you've converted the data.

    Now you've gotta convert the code that interacts with the data.

    You're talking at least a few weeks for simple code.

    If you're confident stamping your name on a conversion script and and some small code changes on an app that large... good on you I guess.

    The funny thing is that if the code architecture is properly done, the code changes should be very minor. By using the gang of four's bridge pattern you can make it so that you have to rewrite one code file (an implementation of the interface between database and code base), and make very minor edits to wherever the interface is created (ideally to a factory, to stop it from generating a bridge of the old type and replace it with a bridge of the new type), and BAM. There you go.

    Rend on
  • Options
    bowenbowen How you doin'? Registered User regular
    Rend wrote: »
    bowen wrote: »
    Okay so you've converted the data.

    Now you've gotta convert the code that interacts with the data.

    You're talking at least a few weeks for simple code.

    If you're confident stamping your name on a conversion script and and some small code changes on an app that large... good on you I guess.

    The funny thing is that if the code architecture is properly done, the code changes should be very minor. By using the gang of four's bridge pattern you can make it so that you have to rewrite one code file (an implementation of the interface between database and code base), and make very minor edits to wherever the interface is created (ideally to a factory, to stop it from generating a bridge of the old type and replace it with a bridge of the new type), and BAM. There you go.

    Eh.

    Then comes debugging and testing to verify it.

    I'd say a few days to convert the data for testing.

    A week or two to make code changes and make sure they're correct

    Another few weeks for testing.

    Give it a once through with beta testing and actual employees and use cases

    Then release it.

    Easily 2 months worth of work there.

    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
    I have noticed as I get older I've definitely shifted away from the "GOTTA CODE AND IMPLEMENT FAST FAST FAST FAST" type of person I was when I first started.

    Super fucking jaded that shit will work from the get go and I won't spend hours debugging some stupid issue because people are idiots.

    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
    bowen wrote: »
    Rend wrote: »
    bowen wrote: »
    Okay so you've converted the data.

    Now you've gotta convert the code that interacts with the data.

    You're talking at least a few weeks for simple code.

    If you're confident stamping your name on a conversion script and and some small code changes on an app that large... good on you I guess.

    The funny thing is that if the code architecture is properly done, the code changes should be very minor. By using the gang of four's bridge pattern you can make it so that you have to rewrite one code file (an implementation of the interface between database and code base), and make very minor edits to wherever the interface is created (ideally to a factory, to stop it from generating a bridge of the old type and replace it with a bridge of the new type), and BAM. There you go.

    A week or two to make code changes and make sure they're correct

    Another few weeks for testing.
    .

    It could easily be, but if the code was written to be easily maintained and changed in the first place you could definitely cut the "a week or two to make code changes" down by half at least. Perhaps not, it all depends on the system of course, but the benefits of good architecture should not be understated.

    I'm not saying you could get the whole job done in 3 days, I'm saying that architecturally speaking, if the system only ever talks to the database through a specific interface, then changing the database necessitates only changing the specific implementation of the interface (and whenever an instance of one of those implementations is created)... which is waaaaay easier than trawling through the whole network-facing code base for any time the database is contacted, making changes, and then testing them individually. It also makes testing the changes much easier.

  • Options
    bowenbowen How you doin'? Registered User regular
    I just don't think it's wise to say those things around honky because he'll assume his code was designed for that and shove in 80 hours over the next 4 days to do it.

    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
    I don't understand, and am frankly scared of, random number generators. I need a reasonably fast and reasonably random generator. It doesn't have to be cryptographically secure. I'm currently using the Mersenne Twister but my much more clever friend who has a CS degree and everything is suggesting that I should use PCG instead. Does anyone have any experience with it?

    What are you using it for exactly? It looks like the one you're using is reasonable in all categories.

  • Options
    RendRend Registered User regular
    I don't understand, and am frankly scared of, random number generators. I need a reasonably fast and reasonably random generator. It doesn't have to be cryptographically secure. I'm currently using the Mersenne Twister but my much more clever friend who has a CS degree and everything is suggesting that I should use PCG instead. Does anyone have any experience with it?

    What are you using it for exactly? It looks like the one you're using is reasonable in all categories.

  • Options
    RendRend Registered User regular
    edited September 2015
    bowen wrote: »
    I just don't think it's wise to say those things around honky because he'll assume his code was designed for that and shove in 80 hours over the next 4 3 days to do it.

    ftfy

    But yeah I agree the bottom line here is that honky needs to honestly assess the schedule and report it to his project manager.

    Rend on
  • Options
    bowenbowen How you doin'? Registered User regular
    Rend wrote: »
    bowen wrote: »
    I just don't think it's wise to say those things around honky because he'll assume his code was designed for that and shove in 80 hours over the next 4 3 days to do it.

    ftfy

    But yeah I agree the bottom line here is that honky needs to honestly assess the schedule and report it to his project manager.

    he's only got an extra week though?

    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
    stupid strikethrough is really hard to see on the number 4
    44444444444

  • Options
    crimsoncoyotecrimsoncoyote Registered User regular
    oh god
    errant email went out
    cue everyone replying "please remove me from this mail"
    as reply all
    :|
    including the one guy that "replied all" with email guidelines that state "Only reply all if absolutely necessary"
    and 2 other, separate reply-alls saying "PLEASE DO NOT REPLY ALL"

    I swear...

  • Options
    bowenbowen How you doin'? Registered User regular
    Now I'm even more confused! There's only 72 hours in 3 days!

    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
    bowen wrote: »
    Now I'm even more confused! There's only 72 hours in 3 days!

    latest?cb=20090819180839

  • Options
    admanbadmanb unionize your workplace Seattle, WARegistered User regular
    oh god
    errant email went out
    cue everyone replying "please remove me from this mail"
    as reply all
    :|
    including the one guy that "replied all" with email guidelines that state "Only reply all if absolutely necessary"
    and 2 other, separate reply-alls saying "PLEASE DO NOT REPLY ALL"

    I swear...

    You're assuming those are serious responses. What if everyone is trolling each other?

  • Options
    bowenbowen How you doin'? Registered User regular
    Rend wrote: »
    bowen wrote: »
    Now I'm even more confused! There's only 72 hours in 3 days!

    latest?cb=20090819180839

    I am desensitized!

    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
    crimsoncoyotecrimsoncoyote Registered User regular
    admanb wrote: »
    oh god
    errant email went out
    cue everyone replying "please remove me from this mail"
    as reply all
    :|
    including the one guy that "replied all" with email guidelines that state "Only reply all if absolutely necessary"
    and 2 other, separate reply-alls saying "PLEASE DO NOT REPLY ALL"

    I swear...

    You're assuming those are serious responses. What if everyone is trolling each other?

    I wish that were the case

  • Options
    Grey PaladinGrey Paladin Registered User regular
    Rend wrote: »
    I don't understand, and am frankly scared of, random number generators. I need a reasonably fast and reasonably random generator. It doesn't have to be cryptographically secure. I'm currently using the Mersenne Twister but my much more clever friend who has a CS degree and everything is suggesting that I should use PCG instead. Does anyone have any experience with it?

    What are you using it for exactly? It looks like the one you're using is reasonable in all categories.
    Simulating virtual cards.

    "All men dream, but not equally. Those who dream by night in the dusty recesses of their minds wake in the day to find that it was vanity; but the dreamers of the day are dangerous men, for they may act their dream with open eyes to make it possible." - T.E. Lawrence
  • Options
    RendRend Registered User regular
    Rend wrote: »
    I don't understand, and am frankly scared of, random number generators. I need a reasonably fast and reasonably random generator. It doesn't have to be cryptographically secure. I'm currently using the Mersenne Twister but my much more clever friend who has a CS degree and everything is suggesting that I should use PCG instead. Does anyone have any experience with it?

    What are you using it for exactly? It looks like the one you're using is reasonable in all categories.
    Simulating virtual cards.

    You're probably good where you're at.

    Moving to PCG would be like drinking craft beer instead of coors. If you're just aiming to get drunk it's unnecessary effort. If you want to savor the experience itself, go top shelf.

  • Options
    Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    Rend wrote: »
    I don't understand, and am frankly scared of, random number generators. I need a reasonably fast and reasonably random generator. It doesn't have to be cryptographically secure. I'm currently using the Mersenne Twister but my much more clever friend who has a CS degree and everything is suggesting that I should use PCG instead. Does anyone have any experience with it?

    What are you using it for exactly? It looks like the one you're using is reasonable in all categories.
    Simulating virtual cards.
    Making sure you get the shuffling algorithm right is more Important than getting the highest possible quality rng.

    I have a thoughtful and infrequently updated blog about games http://whatithinkaboutwhenithinkaboutgames.wordpress.com/

    I made a game, it has penguins in it. It's pay what you like on Gumroad.

    Currently Ebaying Nothing at all but I might do in the future.
  • Options
    Grey PaladinGrey Paladin Registered User regular
    Rend wrote: »
    Rend wrote: »
    I don't understand, and am frankly scared of, random number generators. I need a reasonably fast and reasonably random generator. It doesn't have to be cryptographically secure. I'm currently using the Mersenne Twister but my much more clever friend who has a CS degree and everything is suggesting that I should use PCG instead. Does anyone have any experience with it?

    What are you using it for exactly? It looks like the one you're using is reasonable in all categories.
    Simulating virtual cards.

    You're probably good where you're at.

    Moving to PCG would be like drinking craft beer instead of coors. If you're just aiming to get drunk it's unnecessary effort. If you want to savor the experience itself, go top shelf.
    Cool. Thank you.
    Rend wrote: »
    I don't understand, and am frankly scared of, random number generators. I need a reasonably fast and reasonably random generator. It doesn't have to be cryptographically secure. I'm currently using the Mersenne Twister but my much more clever friend who has a CS degree and everything is suggesting that I should use PCG instead. Does anyone have any experience with it?

    What are you using it for exactly? It looks like the one you're using is reasonable in all categories.
    Simulating virtual cards.
    Making sure you get the shuffling algorithm right is more Important than getting the highest possible quality rng.
    I'm using the Fisher-Yates shuffle. Anything I need to know?

    "All men dream, but not equally. Those who dream by night in the dusty recesses of their minds wake in the day to find that it was vanity; but the dreamers of the day are dangerous men, for they may act their dream with open eyes to make it possible." - T.E. Lawrence
  • Options
    RendRend Registered User regular
    edited September 2015
    Rend wrote: »
    Rend wrote: »
    I don't understand, and am frankly scared of, random number generators. I need a reasonably fast and reasonably random generator. It doesn't have to be cryptographically secure. I'm currently using the Mersenne Twister but my much more clever friend who has a CS degree and everything is suggesting that I should use PCG instead. Does anyone have any experience with it?

    What are you using it for exactly? It looks like the one you're using is reasonable in all categories.
    Simulating virtual cards.

    You're probably good where you're at.

    Moving to PCG would be like drinking craft beer instead of coors. If you're just aiming to get drunk it's unnecessary effort. If you want to savor the experience itself, go top shelf.
    Cool. Thank you.
    Rend wrote: »
    I don't understand, and am frankly scared of, random number generators. I need a reasonably fast and reasonably random generator. It doesn't have to be cryptographically secure. I'm currently using the Mersenne Twister but my much more clever friend who has a CS degree and everything is suggesting that I should use PCG instead. Does anyone have any experience with it?

    What are you using it for exactly? It looks like the one you're using is reasonable in all categories.
    Simulating virtual cards.
    Making sure you get the shuffling algorithm right is more Important than getting the highest possible quality rng.
    I'm using the Fisher-Yates shuffle. Anything I need to know?

    For 52 elements the fisher-yates shuffle will work just fine. The important part is to make sure that you have this line:
    "Counting from the low end, strike out the kth number not yet struck out, and write it down elsewhere."
    ...implemented correctly.

    There are lots of ways to do it incorrectly, like this:
    for(i = 0; i < 52; i++){
      int k = getRandom(0, 52);
      while(array[k] == Card.EMPTY){
        k++;
        if(k >= 52){
          k = 0;
        }
      }
      shuffledDeck[i] = array[k];
    }
    

    Which looks like a fisher-yates shuffle, but its randomness is noticeably bad, because cards that are ahead of blank spaces in the deck are more likely to get chosen.

    As long as you make sure every card remaining in the unshuffled deck has an equal chance to be chosen you should be good to go.

    Rend on
  • Options
    hippofanthippofant ティンク Registered User regular
    Rend wrote: »
    I don't understand, and am frankly scared of, random number generators. I need a reasonably fast and reasonably random generator. It doesn't have to be cryptographically secure. I'm currently using the Mersenne Twister but my much more clever friend who has a CS degree and everything is suggesting that I should use PCG instead. Does anyone have any experience with it?

    What are you using it for exactly? It looks like the one you're using is reasonable in all categories.

    Determining how many multi-posts to make.

  • Options
    MadpoetMadpoet Registered User regular
    Rend wrote: »
    Rend wrote: »
    Rend wrote: »
    I don't understand, and am frankly scared of, random number generators. I need a reasonably fast and reasonably random generator. It doesn't have to be cryptographically secure. I'm currently using the Mersenne Twister but my much more clever friend who has a CS degree and everything is suggesting that I should use PCG instead. Does anyone have any experience with it?

    What are you using it for exactly? It looks like the one you're using is reasonable in all categories.
    Simulating virtual cards.

    You're probably good where you're at.

    Moving to PCG would be like drinking craft beer instead of coors. If you're just aiming to get drunk it's unnecessary effort. If you want to savor the experience itself, go top shelf.
    Cool. Thank you.
    Rend wrote: »
    I don't understand, and am frankly scared of, random number generators. I need a reasonably fast and reasonably random generator. It doesn't have to be cryptographically secure. I'm currently using the Mersenne Twister but my much more clever friend who has a CS degree and everything is suggesting that I should use PCG instead. Does anyone have any experience with it?

    What are you using it for exactly? It looks like the one you're using is reasonable in all categories.
    Simulating virtual cards.
    Making sure you get the shuffling algorithm right is more Important than getting the highest possible quality rng.
    I'm using the Fisher-Yates shuffle. Anything I need to know?

    For 52 elements the fisher-yates shuffle will work just fine. The important part is to make sure that you have this line:
    "Counting from the low end, strike out the kth number not yet struck out, and write it down elsewhere."
    ...implemented correctly.

    There are lots of ways to do it incorrectly, like this:
    for(i = 0; i < 52; i++){
      int k = getRandom(0, 52);
      while(array[k] == Card.EMPTY){
        k++;
        if(k >= 52){
          k = 0;
        }
      }
      shuffledDeck[i] = array[k];
    }
    

    Which looks like a fisher-yates shuffle, but its randomness is noticeably bad, because cards that are ahead of blank spaces in the deck are more likely to get chosen.

    As long as you make sure every card remaining in the unshuffled deck has an equal chance to be chosen you should be good to go.

    Or just use the in-place version:
    To shuffle an array a of n elements (indices 0..n-1):
      for i from 0 to n − 2 do
           j ← random integer such that i ≤ j < n
           exchange a[j] and a[i]
    
    (https://en.wikipedia.org/wiki/Fisher–Yates_shuffle, "The modern algorithm")

  • Options
    ecco the dolphinecco the dolphin Registered User regular
    edited September 2015
    Recorded a video of my desktop to demo a new feature to QA (QA is in another office, in another city).

    On playback, I realised that I say "umm" a lot, and I start saying a sentence, mentally backspace a few words, and restart the sentence again.

    I had to restart the recording several times because several of my sentences didn't actually appear to make sense.

    This live recording/streaming business is actually a bit harder than it seems!

    ecco the dolphin on
    Penny Arcade Developers at PADev.net.
  • Options
    htmhtm Registered User regular
    Jasconius wrote: »
    weird apple bug today

    fast enumeration over NSMutableArray... failed 100% at random points in the loop

    the implication was that the array was being altered mid-loop

    do nothing to the code at all except cast the NSMutableArray to its immutable counterpart... bug fixed

    if i was actually attempting to alter the array mid-loop, making it immutable would have caused another crash presumably... but no. merely being mutable was apparently enough...? never seen it before in 6+ years of iOS development

    Do you get the same results if you make a copy of the mutable array and then iterate the copy?

    The only other thing I can think of is that something has done some bad casting beforehand. In other words, your NSMutableArray * is really pointing to an NSArray. If NSArray and NSMutableArray use different types of NSEnumerator for iteration, then that would explain your explosion.

  • Options
    RendRend Registered User regular
    It sounded like a school project, so I didn't want to just post correct code :p

  • Options
    ecco the dolphinecco the dolphin Registered User regular
    edited September 2015
    Story of a developer's life: How a simple task wasn't

    "Hey ecco, your next JIRA is to show a tooltip to inform the end user why a particular button is disabled and why they can't use it."

    Me: "Sweet! I know how to disable buttons, and I know how to show tooltips. This should be, maybe... 15-30 minutes, after getting the i18n message etc correct."

    Hours later: "Oh. Bootstrap removes the mouse/pointer events for disabled buttons, and so my hover/mouse over events don't fire, which means my tooltip events don't fire which means aaaarhghghghghghghhhhhhhhhh"

    ecco the dolphin on
    Penny Arcade Developers at PADev.net.
  • Options
    admanbadmanb unionize your workplace Seattle, WARegistered User regular
    I feel like I've been trapped in that same hell before. Or a coworker was.

This discussion has been closed.