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] Reinventing equality, one language at a time

12467100

Posts

  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    dporowski wrote: »
    Jasconius wrote: »
    are you cleaning between these builds?

    and if so how confident are you in that clean button?

    I run into things like that all the time and it's because Xcode's "Clean" is bullshit that doesn't actually do a full clean, so I have to go and vacuum out cache files at least once a month.

    About the only thing I didn't do was nuke the repo and restart from a clean clone. I have a couple suspicions around "maybe I should reboot that poor little dev device", since I think there's some timeout happening before the tests can attach. (Not that the report says exactly what happened, mind. Just hints.)

    Hell, it's Xcode; could be I fixed it by just swapping from device to sim. I think this happened to me once, and "adding another test" fixed it, even.

    you should check the DerivedData folder and just remove everything

    i didnt know you were using Xcode, there's all manner of things that can fuck up in any build

    the only way to be 100% sure is clean, delete dervieddata, close xcode, replug the device, and try again

  • Options
    ElaroElaro Apologetic Registered User regular
    Where can I learn how to make a webserver do what I want?

    Children's rights are human rights.
  • Options
    dporowskidporowski Registered User regular
    edited July 2017
    Jasconius wrote: »
    dporowski wrote: »
    Jasconius wrote: »
    are you cleaning between these builds?

    and if so how confident are you in that clean button?

    I run into things like that all the time and it's because Xcode's "Clean" is bullshit that doesn't actually do a full clean, so I have to go and vacuum out cache files at least once a month.

    About the only thing I didn't do was nuke the repo and restart from a clean clone. I have a couple suspicions around "maybe I should reboot that poor little dev device", since I think there's some timeout happening before the tests can attach. (Not that the report says exactly what happened, mind. Just hints.)

    Hell, it's Xcode; could be I fixed it by just swapping from device to sim. I think this happened to me once, and "adding another test" fixed it, even.

    you should check the DerivedData folder and just remove everything

    i didnt know you were using Xcode, there's all manner of things that can fuck up in any build

    the only way to be 100% sure is clean, delete dervieddata, close xcode, replug the device, and try again

    Did. Doesn't help. Does the same thing on someone else's machine, even, so there is Weird. Most of the internet says "reinstall Appium!" which would be a great idea, if I was actually using Appium.

    Then again, this is a framework that's in test target A; I'm test target B. Even matching the search paths, every single build setting, using the EXACT framework they're pulling in (seriously, just linking it over, no new files of any kind), Xcode thinks no such module exists right up until I hit "build", at which point it goes "OH THAT MODULE!"


    Fucking Xcode.

    dporowski on
  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    Elaro wrote: »
    Where can I learn how to make a webserver do what I want?

    what do you want it to do?

  • Options
    EchoEcho ski-bap ba-dapModerator mod
    edited July 2017
    Okay, govendor is way better than godeps for managing vendored packages. Godeps kept having trouble handling stuff imported for side-effects like the pq package, and then I ended up with crashes as postgres tried to register itself as a driver twice, once from the GOPATH and once from my vendor dir.

    Govendor handles that like a champ.

    Echo on
  • Options
    EchoEcho ski-bap ba-dapModerator mod
    Oh look, the CI never ran a whole ton of tests at all because the sqlmock package wasn't vendored. :rotate:

    That's a thing that should have made the build fail.

  • Options
    zeenyzeeny Registered User regular
    edited July 2017
    Echo wrote: »
    Okay, govendor is way better than godeps for managing vendored packages. Godeps kept having trouble handling stuff imported for side-effects like the pq package, and then I ended up with crashes as postgres tried to register itself as a driver twice, once from the GOPATH and once from my vendor dir.

    Govendor handles that like a champ.

    Just use glide.
    Echo wrote: »
    Oh look, the CI never ran a whole ton of tests at all because the sqlmock package wasn't vendored. :rotate:

    That's a thing that should have made the build fail.

    I would think so, so who messed up the CI configuration? ;oP

    zeeny on
  • Options
    zeenyzeeny Registered User regular
    Yo @Echo, did you make 3 years in software development yet? I kind of remember when you started learning, but we've all been on here SO LONG.

  • Options
    EchoEcho ski-bap ba-dapModerator mod
    zeeny wrote: »
    Yo Echo, did you make 3 years in software development yet? I kind of remember when you started learning, but we've all been on here SO LONG.

    Technically speaking I'm still a student! However, I'm on the last stretch and I've been at a company for four months now with one month left (and likely another ten weeks to wrap up a final exam project related to the stuff I'm doing here), and there have been various hints about "the future" going back and forth between me and the CTO so we'll see what happens. I do hope I get an offer though, this is a great place.
    zeeny wrote: »
    Just use glide.

    Oh, that's a new one. Gave it a quick spin and it seems nice, so I'll probably try that for the new project I nearly have ready for poking on staging, so it's time to actually vendor the dependencies.

  • Options
    EchoEcho ski-bap ba-dapModerator mod
    zeeny wrote: »
    I would think so, so who messed up the CI configuration? ;oP

    So tests are returning exit code 1, things should fail right there, but the CI just keeps running anyway.

    More like TeamShitty.

  • Options
    KakodaimonosKakodaimonos Code fondler Helping the 1% get richerRegistered User regular
    In other test hilarity, someone moved a circuit in our FPGA layout and then moved it back. But didn't revert the change.

    So now we're in the middle of a 30 hour testbench run.

  • Options
    dporowskidporowski Registered User regular
    "You know, we're going to be changing the entire project structure when we move to Carthage... I wonder if the search paths will need to change then? You could try..."

    GOD DAMMIT. YOU COULD HAVE SAID THAT.


    So that's a day and a half of troubleshooting in the shitter. On the upside, "hey, a dependency manager!" which solves like three other problems for me.

  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    edited July 2017
    Working for a modern software shop is such a breath of fresh air. Oh everything is already in AWS? We already dockerize everything? Technical debt is something to be killed instead of embraced because of "business need"? The customer can have what they want, but not at the expense of the long term health of our system? Well shit...all I have left to complain about is the lack of trash cans. Seriously, why is there only one trash can in each area?

    GnomeTank on
    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • Options
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    When I was a fresh, green programmer, I learned Go.

    To this day, I try to write Java code like it is Go. And this someone helps (concurrnecy) and sometimes hurts (java hates delegation).

    But the degree to which the languages you learn earlier affects your code style years later kind of shocked me when I realized that was the reason I wrote things that way.

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • Options
    dporowskidporowski Registered User regular
    GnomeTank wrote: »
    Working for a modern software shop is such a breath of fresh air. Oh everything is already in AWS? We already dockerize everything? Technical debt is something to be killed instead of embraced because of "business need"? The customer can have what they want, but not at the expense of the long term health of our system? Well shit...all I have left to complain about is the lack of trash cans. Seriously, why is there only one trash can in each area?

    We have one(1) release branch at any given time.

    My last job hit 35 before I stopped paying attention to it. All named "release_yyyymmdd", sometimes with an "_2" at the end if there were multiple.


    I seriously about CRIED when I saw the repos. So beautiful. So orderly. (I mean if you ignore the feature branches everywhere, right.)

  • Options
    GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    edited July 2017
    We squash our feature branches and close them once they are complete. At any given time you'll only see a few feature branches hanging off development. If we need a hot fix branch we'll create it.

    e: Also, we're pretty "true micro-services" (I guess that's a thing), so our repos are small and only have a few hands in the pot at a time.

    GnomeTank on
    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • Options
    dporowskidporowski Registered User regular
    GnomeTank wrote: »
    We squash our feature branches and close them once they are complete. At any given time you'll only see a few feature branches hanging off development. If we need a hot fix branch we'll create it.

    e: Also, we're pretty "true micro-services" (I guess that's a thing), so our repos are small and only have a few hands in the pot at a time.

    Yeah, same. I think the web interface for your PR on the repo even has a "automatically merge it" button. Sure has a "and now delete it" button.

  • Options
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    edited July 2017
    GnomeTank wrote: »
    "true micro-services" (I guess that's a thing)

    Its a thing if you've got the ops and testing and process up to properly handle having 10x or more services as you would in the old days of SOA.

    But when you have that? It's wonderful and game changing and a huge boost in productivity and adaptability.

    People sometimes assume "Oh we'll just break up all our services and use docker everywhere and it'll be great" until they realize they can't even research their own inter-service dependencies and APIs anymore, much less reason about them, and testing becomes a lovecraftian nightmare, and "wait why were we doing this in the first place"...

    Transitions to a more modular setup (really this just a continuation of going from ONE TRUE MONOLITH to SOA) are always going to involve a bunch of upfront work to "do things right" that if you skip is just going to result in unmitigated doom.

    Monkey Ball Warrior on
    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • Options
    DynagripDynagrip Break me a million hearts HoustonRegistered User, ClubPA regular
    edited July 2017
    hmmm, what to learn next in the world of iOS and swift. Think I'm going to hold off on Swift 4 until xcode 9 is out of beta. I'm thinking maybe some custom transitions type stuff to make my dogedex app "pop"

    Dynagrip on
  • Options
    djmitchelladjmitchella Registered User regular
    Having finally dragged the build process for our main web app kicking and screaming into something approaching modernity, I realise how much better things are with that stuff going. Just doing some quick testing with grunticon to see if we can avoid having to have the designers spend all their time hitting file > export in Illustrator, and the five minutes it takes to set up a boilerplate grunt watch/connect system has paid off about tenfold even just working on that yesterday afternoon.

    (does anyone use webstorm's builtin features for this kind of thing? I can't help feeling I could be getting more out of it than just a text editor with sort-of-intellisense, but I'm so used to 'launch command window, start grunt tasks going, use Chrome debugger, forget about it' that I've never tried anything else).

  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    if i already have a largish python 2.x codebase, can I just start using 3 in new modules, or do I have to do Special Things to my 2.x code so that it is compatible?

  • Options
    thatassemblyguythatassemblyguy Janitor of Technical Debt .Registered User regular
    edited July 2017
    Jasconius wrote: »
    if i already have a largish python 2.x codebase, can I just start using 3 in new modules, or do I have to do Special Things to my 2.x code so that it is compatible?

    you have to do special things or you will get errors. mainly around strings, but there is other stuff. I believe there is a conversion tool that you can run your p2 code through to get mostly p3 compatible code.

    e: yeah the utility is called 2to3. It's documented in the python docs at: https://docs.python.org/2/library/2to3.html

    thatassemblyguy on
  • Options
    EchoEcho ski-bap ba-dapModerator mod
    https://anvaka.github.io/common-words/#?lang=go

    That illustrates my biggest annoyance with Go - this constant nil-checking of errors. This is what you'll do all the time:
    foo, err := DoStuff()
    if err != nil {
      return nil, err
    }
    

  • Options
    thatassemblyguythatassemblyguy Janitor of Technical Debt .Registered User regular
    Echo wrote: »
    https://anvaka.github.io/common-words/#?lang=go

    That illustrates my biggest annoyance with Go - this constant nil-checking of errors. This is what you'll do all the time:
    foo, err := DoStuff()
    if err != nil {
      return nil, err
    }
    

    There is a short list of things-that-cannot-be-done by design. The argument is that the trade off is worth the advantages that are gained.

    Do you get to Go for the jerb?

  • Options
    mightyjongyomightyjongyo Sour Crrm East Bay, CaliforniaRegistered User regular
    Jasconius wrote: »
    if i already have a largish python 2.x codebase, can I just start using 3 in new modules, or do I have to do Special Things to my 2.x code so that it is compatible?

    you have to do special things or you will get errors. mainly around strings, but there is other stuff. I believe there is a conversion tool that you can run your p2 code through to get mostly p3 compatible code.

    e: yeah the utility is called 2to3. It's documented in the python docs at: https://docs.python.org/2/library/2to3.html

    We use this as well: https://pypi.python.org/pypi/six

    It may not help -- 2to3 is more about migration whereas six is more about interop -- but just in case..

  • Options
    EchoEcho ski-bap ba-dapModerator mod
    edited July 2017
    There is a short list of things-that-cannot-be-done by design. The argument is that the trade off is worth the advantages that are gained.

    Yeah, I get why it's there. It's just annoying to repeat "one line of doing stuff, then a nilcheck" and repeat that 4-5 times while doing some things.
    Do you get to Go for the jerb?

    Yep! We have a bunch of microservices that are all written in Go.

    The typical "new intern/new hire" thing has been to have them develop some microservice to get the hang of the infrastructure, since they're pretty well isolated - most of them just get input from a message queue and spit something out the other end.

    Since it's a "first project" thing they all do pretty much the same general thing but are written entirely differently. And we're starting to get a bunch of them (I think we're on our tenth third-party integration), it's becoming a PITA to add features to them.

    So after I wrote my first service (and had an interlude adding features to an existing one), I said "screw it" and took some time to extract code from my first service and clean it up into a generic package so I could reuse that code for future services.

    So I started on the next service, and then shit felt silly because now I'm calling like 90% of the code from that generic package and the rest is just the stuff specific to that service. :rotate:

    The new service is incredibly tiny code-wise. I just import packages and fire up its subcomponents as needed. Feels good, man.

    Echo on
  • Options
    thatassemblyguythatassemblyguy Janitor of Technical Debt .Registered User regular
    Developing the way nature intended. *wipes away tear*

  • Options
    DelzhandDelzhand Hard to miss. Registered User regular
    dporowski wrote: »
    Echo wrote: »
    Mostly the actual "run things" bit. Linting on commit and running tests on push is pretty much what I want.

    If you've got something like Jenkins running, it's pretty easy to have it run all your tests every time it sees a commit to a repo. Does nice reports, etc etc too.

    Jesus christ do not do this.

    Watching people bitch about the build server being too slow because they cannot build locally is just the dumbest thing when you have piles of developer workstations more then capable of it.

    What you is make a file called "autogen.sh" and as part of it have it setup symlinks in your .git/hooks folder for the pre-commit hooks you want. The best way is to just call into the bits of your Makefile or whatever that you want run.

    CI servers should be a validation check, not "the build system". The build system should always work locally as a first priority.

    I get what you're saying here. But, sometimes it's nice to chuck the work over the fence, power down my station, go to the pub, and wait for an e-mail to tell me it's done.

    icetq86j7ydo.png

  • Options
    ElaroElaro Apologetic Registered User regular
    Jasconius wrote: »
    Elaro wrote: »
    Where can I learn how to make a webserver do what I want?

    what do you want it to do?

    I want it to...

    1)serve a website that would allow people to write a specially formatted text file,
    1.1)allow them to save said text file, server-side, in their user account directory (hopefully in a subfolder)
    1.2)send a message to the server to run a jar file taking as input this text file
    1.3)allow users to choose from a list which jar file to execute
    2)Store the MIDI file resulting from the execution of the jar file in the user account directory (hopefully in a different subfolder), but only allow download of this file if certain conditions are met.
    3)Stream music generated from the created MIDI file through the website

    Now, I don't have the website written yet, but I do have the jar file written.

    Children's rights are human rights.
  • Options
    Jimmy KingJimmy King Registered User regular
    Hey guys, I had a baby. Well, my wife did. Two kids is a lot of work. I'm tired. My side projects have fallen by the wayside for god knows how long, except for my awesome ip cam/raspberry pi touch screen baby monitor frankenstein project I'm building. Why buy one off the shelf when I can build it myself for twice the cost + my own time, right?

  • Options
    ecco the dolphinecco the dolphin Registered User regular
    Well, you know what Elvis said; "Hail to the Jimmy King baby".

    Penny Arcade Developers at PADev.net.
  • Options
    KakodaimonosKakodaimonos Code fondler Helping the 1% get richerRegistered User regular
    Got an interesting argument going at work (and by interesting I mean nit-picky and completely overblown).

    I have a flat array of calculation parameters. And that array contains multiple independent blocks of parameters. So when we use those parameters we're also handing in an offset id and ptr index to the parameter block.

    One group wants to precalculate the offset. And another group says we should calc the offset in the algo.

    So
    Node cNode = *(base_ptr + precalced_offset)
    

    Vs
    Node cNode = *(base_ptr + (param_index * param_length))
    

    I tend to lean towards the first because I can set it all on initialization and guarantee the data integrity.

  • Options
    OrcaOrca Also known as Espressosaurus WrexRegistered User regular
    Anything that can be made compile-time, should be made compile-time.

    IMO.

  • Options
    thatassemblyguythatassemblyguy Janitor of Technical Debt .Registered User regular
    Got an interesting argument going at work (and by interesting I mean nit-picky and completely overblown).

    I have a flat array of calculation parameters. And that array contains multiple independent blocks of parameters. So when we use those parameters we're also handing in an offset id and ptr index to the parameter block.

    One group wants to precalculate the offset. And another group says we should calc the offset in the algo.

    So
    Node cNode = *(base_ptr + precalced_offset)
    

    Vs
    Node cNode = *(base_ptr + (param_index * param_length))
    

    I tend to lean towards the first because I can set it all on initialization and guarantee the data integrity.

    depending on how the precalculation is happening, the former is more efficient because it doesn't include the multiply.

  • Options
    thatassemblyguythatassemblyguy Janitor of Technical Debt .Registered User regular
    Orca wrote: »
    Anything that can be made compile-time, should be made compile-time.

    IMO.

    agreed, and if it's a compile time constant (#define or enum), it should then be all capitalized case (our internal coding convention requires that).

  • Options
    mightyjongyomightyjongyo Sour Crrm East Bay, CaliforniaRegistered User regular
    I think it depends on 1) how you're doing the pre-init and 2) how critical the runtime of the algo is. I think it's equally unreadable because in one case you need to keep referring to where you calculated the dang offsets and in the other, you need to parse how it's calculating the offset... so at that point it becomes a performance tradeoff.

    Although why not make a struct that mirrors the parameter block layout? It's much easier to work with that way.

  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    From a performance standpoint, compilers are pretty good about pulling calculations out of loop bodies these days

  • Options
    KakodaimonosKakodaimonos Code fondler Helping the 1% get richerRegistered User regular
    This is all on CUDA devices and the parameters aren't known until we initialize the device. I'm just gonna go with #1 and try to set up enough checks on the inbound side to avoid catastrophic failures.

  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited July 2017
    my brain is leaking of my skull trying to build html/js pages to support my web app

    thinking about trialing angulardart 3.x ... anyone know anything about this?

    i just... i need to watch the traditional web gui stack off my hands forever. i absolutely can't stand it, and i'm at the phase in my project where there's no getting around it unless I change my approach entirely

    Jasconius on
This discussion has been closed.