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/
We're funding a new Acquisitions Incorporated series on Kickstarter right now! Check it out at https://www.kickstarter.com/projects/pennyarcade/acquisitions-incorporated-the-series-2

[Programming] Kafkaesque rabbits in the queue at the pub

17778808283100

Posts

  • admanbadmanb unionize your workplace Seattle, WARegistered User regular
    I like unit tests in any language (not that I ever get paid to write them). I solve most of those bugs long before I get to testing, honestly. Other than a few very specific situations I'm not building functions that are designed to take in a variety of types, so typing errors almost always show themselves on a first run.

  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    i like writing unit tests for things concerning data, or things that require specific user interactions to accomplish

    not a fan of code coverage tests

    for example, in my current project, I have a test suite for an XML data fixture which scans it for data entry errors, such as someone forgetting to set data keys which the application requires to operate normally

  • urahonkyurahonky Registered User regular
    Coverage tests are good, depending on the language and the size of the app. I think it's more peace-of-mind that every single line of code is at least hit/run and doesn't cause an error under regular circumstances. Obviously that stuff falls apart if you're testing for null values and pass a string or whatever, but that's also why unit test writing is very important.

    I really wish I'd take my own advice. I'm still at 0 unit tests and 0 coverage.

  • admanbadmanb unionize your workplace Seattle, WARegistered User regular
    urahonky wrote: »
    Coverage tests are good, depending on the language and the size of the app. I think it's more peace-of-mind that every single line of code is at least hit/run and doesn't cause an error under regular circumstances. Obviously that stuff falls apart if you're testing for null values and pass a string or whatever, but that's also why unit test writing is very important.

    I really wish I'd take my own advice. I'm still at 0 unit tests and 0 coverage.

    Not your fault. Good testing usually results in net less time consumption, but you have to allocate time differently so it needs to be included at planning time. If your company isn't gonna support good testing, you're not gonna do it.

    Campy
  • EtheaEthea Registered User regular
    admanb wrote: »
    I like unit tests in any language (not that I ever get paid to write them). I solve most of those bugs long before I get to testing, honestly. Other than a few very specific situations I'm not building functions that are designed to take in a variety of types, so typing errors almost always show themselves on a first run.

    My current workflow when fixing bugs is to first write a test ( be it regression, unit, functional ) that exposes the error. That way I get to add tests, and correct bugs at the same time :)

    But really most of my coding workflow starts with me writing a functional test, and working backwards from that. Generally these are a step above a unit test

  • urahonkyurahonky Registered User regular
    admanb wrote: »
    urahonky wrote: »
    Coverage tests are good, depending on the language and the size of the app. I think it's more peace-of-mind that every single line of code is at least hit/run and doesn't cause an error under regular circumstances. Obviously that stuff falls apart if you're testing for null values and pass a string or whatever, but that's also why unit test writing is very important.

    I really wish I'd take my own advice. I'm still at 0 unit tests and 0 coverage.

    Not your fault. Good testing usually results in net less time consumption, but you have to allocate time differently so it needs to be included at planning time. If your company isn't gonna support good testing, you're not gonna do it.

    Our first wave of layoffs got rid of our QA staff and UI guy, leaving me to fend for myself.

  • bowenbowen How you doin'? Registered User regular
    yet they kept the pm on staff who was the cause of all the wasting of the dollars

    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
  • urahonkyurahonky Registered User regular
    bowen wrote: »
    yet they kept the pm on staff who was the cause of all the wasting of the dollars

    And no one was the wiser!

  • bowenbowen How you doin'? Registered User regular
    do your managers and c-level peeps not do internal spending audits or anything?

    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
  • urahonkyurahonky Registered User regular
    bowen wrote: »
    do your managers and c-level peeps not do internal spending audits or anything?

    No clue. I still haven't had my review so I'm doubting it.

    bowen
  • dporowskidporowski Registered User regular
    bowen wrote: »
    yet they kept the pm on staff who was the cause of all the wasting of the dollars

    After all, a project won't manage itself! Those developers can just write some tests or something, save all that pointless QA money! PS could you document all the bugs in this project before we write the code? Much easier to fix things that way.

    I am suddenly no longer certain how facetious I am being. :/

    ecco the dolphinbowenurahonkyNaphtaliironsizide
  • hippofanthippofant ティンク Registered User regular
    dporowski wrote: »
    bowen wrote: »
    yet they kept the pm on staff who was the cause of all the wasting of the dollars

    After all, a project won't manage itself! Those developers can just write some tests or something, save all that pointless QA money! PS could you document all the bugs in this project before we write the code? Much easier to fix things that way.

    I am suddenly no longer certain how facetious I am being. :/

    :hydra:

    ecco the dolphinbowenironsizide
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited April 2017
    trying to decide on how to serve up my web application

    i want to get a physical dedicated server as a valid excuse to Really Learn *NIX, but having a hard time with should I just get a cheap serviceable box and transition later, or go ahead and get a real rack mounted server with ample capacity that can carry me all the way to profitability

    the other thing I'm not set on is whether or not this one server should run both the DB and the web app simultaneously

    Jasconius on
  • Grape ApeGrape Ape Registered User regular
    Owning your own server is out of fashion. Can you host it in some AWS solution?

    MadPenInfidel
  • CampyCampy Registered User regular
    Jasconius wrote: »
    trying to decide on how to serve up my web application

    i want to get a physical dedicated server as a valid excuse to Really Learn *NIX, but having a hard time with should I just get a cheap serviceable box and transition later, or go ahead and get a real rack mounted server with ample capacity that can carry me all the way to profitability

    the other thing I'm not set on is whether or not this one server should run both the DB and the web app simultaneously

    How much grunt are you going to need for it. If you have a decent home PC could you VM it as a stopgap instead of the cheapo box?

  • InfidelInfidel Heretic Registered User regular
    Jasconius wrote: »
    trying to decide on how to serve up my web application

    i want to get a physical dedicated server as a valid excuse to Really Learn *NIX, but having a hard time with should I just get a cheap serviceable box and transition later, or go ahead and get a real rack mounted server with ample capacity that can carry me all the way to profitability

    the other thing I'm not set on is whether or not this one server should run both the DB and the web app simultaneously

    Yeah, why wouldn't you just spin up a host somewhere? Most of the knowledge/skillset you would want to learn involves working with hosting providers and scaling and such.

    I haven't had to manage physical hardware for a long time, up until this latest company due to physical control requirements. I said fuck-that to building a server and got a vendor to do a couple for me, throw vSphere on it, and I took over from there and setup a private cloud of linux VMs...

    OrokosPA.png
  • bowenbowen How you doin'? Registered User regular
    My problem with AWS is that they tend to be costly.

    Sure so is running a server, but I can roll a lot of those costs into my day to day much easier.

    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
  • InfidelInfidel Heretic Registered User regular
    bowen wrote: »
    My problem with AWS is that they tend to be costly.

    Sure so is running a server, but I can roll a lot of those costs into my day to day much easier.

    Even if the hardware is free, your time investment into hardware doesn't really pay any return for practical management of web app servers these days.

    OrokosPA.png
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    bowen wrote: »
    My problem with AWS is that they tend to be costly.

    Sure so is running a server, but I can roll a lot of those costs into my day to day much easier.

    There are many things you have to deal with otherwise; if your hardware fails with a cloud service you don't need to worry, just spin up a new VM somewhere. Availability is handled for you, backups, logs, etc

  • MadPenMadPen San DiegoRegistered User regular
    What's the thought on cmake these days? Seems pretty powerful and straightforward. But every time I download something I need to compile for Ubuntu instead of using cmake, I have to download some godamn build engine written in Python or Ruby to build it. And of course...then I have to build the build engine..

    3DS: 4098-4243-6127
  • dporowskidporowski Registered User regular
    bowen wrote: »
    My problem with AWS is that they tend to be costly.

    Sure so is running a server, but I can roll a lot of those costs into my day to day much easier.

    This may be of interest.

    https://cloud.google.com/free/

    Free trial and an "Always Free" offering; it's pretty solid, albeit with definite usage limits on the "Always Free" components. More than enough to use for preproduction/fiddling around, I'd think.

  • bowenbowen How you doin'? Registered User regular
    I kind of wish there was "Active Directory As a Service" though, I hate managing that stuff and it'd be great to plug and play that kind of thing.

    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
  • InfidelInfidel Heretic Registered User regular
    bowen wrote: »
    I kind of wish there was "Active Directory As a Service" though, I hate managing that stuff and it'd be great to plug and play that kind of thing.

    Azure AD. Standalone or part of Office 365.

    OrokosPA.png
    Dehumanized
  • bowenbowen How you doin'? Registered User regular
    Infidel wrote: »
    bowen wrote: »
    I kind of wish there was "Active Directory As a Service" though, I hate managing that stuff and it'd be great to plug and play that kind of thing.

    Azure AD. Standalone or part of Office 365.

    how would you plug that in to replace the normal AD services of a domain controller?

    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
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    Infidel wrote: »
    Jasconius wrote: »
    trying to decide on how to serve up my web application

    i want to get a physical dedicated server as a valid excuse to Really Learn *NIX, but having a hard time with should I just get a cheap serviceable box and transition later, or go ahead and get a real rack mounted server with ample capacity that can carry me all the way to profitability

    the other thing I'm not set on is whether or not this one server should run both the DB and the web app simultaneously

    Yeah, why wouldn't you just spin up a host somewhere? Most of the knowledge/skillset you would want to learn involves working with hosting providers and scaling and such.

    I haven't had to manage physical hardware for a long time, up until this latest company due to physical control requirements. I said fuck-that to building a server and got a vendor to do a couple for me, throw vSphere on it, and I took over from there and setup a private cloud of linux VMs...

    I'm also looking at leasing dedicated hardware in the interim instead of owning it outright, as I realized today after more research I shouldn't attempt to build a machine until I have a better picture of where my performance needs will be

    Managed application platforms like Heroku, and the bulk of AWS have a menu of legitimate downsides that I lived 6 or 7 years ago and am not that interested in re-living. In particular, I ran a Ruby on Rails production server tasked withed handling a high volume of Large - Extra Extra Large photo uploads, and the process of running this on Heroku came with some code and wallet issues specific to these platforms that I've not seen any managed cloud provider solve.

    Between dedicated leasing and magic cloud providers are VPS services like Linode, but pricing wise for the amount of money you need to gaurantee someone else won't pee in your pool AND horror stories from people I respect about the dangers of hypervisors and I/O behavior, I'm willing to pay the extra few bucks per month to avoid it.

    The part about the actual physical hardware, I admit, was for my own personal interest. I'm talking myself out of it for now but only because if I colo that will be an hours long drive and I don't want to sign myself up for that yet

  • InfidelInfidel Heretic Registered User regular
    bowen wrote: »
    Infidel wrote: »
    bowen wrote: »
    I kind of wish there was "Active Directory As a Service" though, I hate managing that stuff and it'd be great to plug and play that kind of thing.

    Azure AD. Standalone or part of Office 365.

    how would you plug that in to replace the normal AD services of a domain controller?

    Depends what you mean with that?

    Azure AD has user/group directory services out of the box, useful for SSO and authentication of that sort. You can get AD Directory Services to provide the more standard Windows Server environment without on-prem, but I haven't used that myself. Gives you domain computers and GPO, mainly? And you can put your Azure VMs onto it, if you have any, so one domain to unify company assets at your sites and in the cloud.

    That's the theory, anyway.

    OrokosPA.png
  • InfidelInfidel Heretic Registered User regular
    Jasconius wrote: »
    Infidel wrote: »
    Jasconius wrote: »
    trying to decide on how to serve up my web application

    i want to get a physical dedicated server as a valid excuse to Really Learn *NIX, but having a hard time with should I just get a cheap serviceable box and transition later, or go ahead and get a real rack mounted server with ample capacity that can carry me all the way to profitability

    the other thing I'm not set on is whether or not this one server should run both the DB and the web app simultaneously

    Yeah, why wouldn't you just spin up a host somewhere? Most of the knowledge/skillset you would want to learn involves working with hosting providers and scaling and such.

    I haven't had to manage physical hardware for a long time, up until this latest company due to physical control requirements. I said fuck-that to building a server and got a vendor to do a couple for me, throw vSphere on it, and I took over from there and setup a private cloud of linux VMs...

    I'm also looking at leasing dedicated hardware in the interim instead of owning it outright, as I realized today after more research I shouldn't attempt to build a machine until I have a better picture of where my performance needs will be

    Managed application platforms like Heroku, and the bulk of AWS have a menu of legitimate downsides that I lived 6 or 7 years ago and am not that interested in re-living. In particular, I ran a Ruby on Rails production server tasked withed handling a high volume of Large - Extra Extra Large photo uploads, and the process of running this on Heroku came with some code and wallet issues specific to these platforms that I've not seen any managed cloud provider solve.

    Between dedicated leasing and magic cloud providers are VPS services like Linode, but pricing wise for the amount of money you need to gaurantee someone else won't pee in your pool AND horror stories from people I respect about the dangers of hypervisors and I/O behavior, I'm willing to pay the extra few bucks per month to avoid it.

    The part about the actual physical hardware, I admit, was for my own personal interest. I'm talking myself out of it for now but only because if I colo that will be an hours long drive and I don't want to sign myself up for that yet

    Any headaches you have with a reputable VPS are better than what you run into owning yourself. And give you the exact same experience for the system admin side of things, you'll get your *NIX skills exactly the same.

    Having our services running in a colo right now gives me nothing but worry that something will go down and it will be my ass having to go fix it. I would not have done it this way except it's in the gaming industry and we have regulatory reasons for it.

    I had a meeting this morning where we were talking budget and I brought up again how it would be good to spend some more on the infrastructure since our firewall isn't physically redundant and so we don't have full hardware HA.

    OrokosPA.png
  • UselesswarriorUselesswarrior Registered User regular
    Typescript is really good and fixes most things I really hate about JS

    Yeah, I am doing my first node / typescript project and it's been years since I last did a non trivial project in JS. Typescript plus ES6 make it feel like a completely different language. No more weird scoping, simple class symantics and typescript brings a nice modern type system to the table that is more expressive then either Java or C#.

    Hey I made a game, check it out @ http://ifallingrobot.com/. (Or don't, your call)
  • UselesswarriorUselesswarrior Registered User regular
    edited April 2017
    urahonky wrote: »
    Coverage tests are good, depending on the language and the size of the app. I think it's more peace-of-mind that every single line of code is at least hit/run and doesn't cause an error under regular circumstances. Obviously that stuff falls apart if you're testing for null values and pass a string or whatever, but that's also why unit test writing is very important.

    I really wish I'd take my own advice. I'm still at 0 unit tests and 0 coverage.

    After years of fighting this fight I am finally working at a place that values TDD. It's like night and day and terms of regressions and bugs.

    I am giving up on trying to convenice employers that it's the right thing to do. If people aren't doing it I don't think I want to work for them frankly. It's just modern development.

    I wouldn't want to use Visual Basic or SVN either but everyone seems to get that. The amount of money companies are wasting by not writing automated tests is crazy and in my experience with it TDD has made me a better developer.

    Uselesswarrior on
    Hey I made a game, check it out @ http://ifallingrobot.com/. (Or don't, your call)
    schuss
  • [Michael][Michael] Registered User regular
    Typescript is really good and fixes most things I really hate about JS

    Yeah, I am doing my first node / typescript project and it's been years since I last did a non trivial project in JS. Typescript plus ES6 make it feel like a completely different language. No more weird scoping, simple class symantics and typescript brings a nice modern type system to the table that is more expressive then either Java or C#.

    I'm a fan, too. My experience has been pretty similar.

    This was interesting, I thought:
    https://slack.engineering/typescript-at-slack-a81307fa288d

    Finding existing bugs on projects just by adding types as you add them to the codebase is pretty nifty. The fact that you don't have to convert anything to "strict" TypeScript if you don't want to is helpful, too. All your vanilla JavaScript is already good to go. Everything is already the "any" type, and you can get more specific whenever there's a need.

  • LD50LD50 Registered User regular
    [Michael] wrote: »
    The fact that you don't have to convert anything to "strict" TypeScript if you don't want to is helpful, too. All your vanilla JavaScript is already good to go. Everything is already the "any" type, and you can get more specific whenever there's a need.

    I actually kind of wish this wasn't the case. I am a fan of both dynamic and static typing, but I find that when they're mixed it's almost always a "worst of both worlds situation". I'd rather they force your whole project to be TypeScript just so that there aren't any secretly still dynamic bits hidden inside of other TypeScript projects I use as a dependency or work on.

    I feel the same way about the dynamic keyword in C#. Part of me is very happy it exists and the rest of me hopes I never actually see it.

  • UselesswarriorUselesswarrior Registered User regular
    LD50 wrote: »
    [Michael] wrote: »
    The fact that you don't have to convert anything to "strict" TypeScript if you don't want to is helpful, too. All your vanilla JavaScript is already good to go. Everything is already the "any" type, and you can get more specific whenever there's a need.

    I actually kind of wish this wasn't the case. I am a fan of both dynamic and static typing, but I find that when they're mixed it's almost always a "worst of both worlds situation". I'd rather they force your whole project to be TypeScript just so that there aren't any secretly still dynamic bits hidden inside of other TypeScript projects I use as a dependency or work on.

    I feel the same way about the dynamic keyword in C#. Part of me is very happy it exists and the rest of me hopes I never actually see it.

    Yeah but for easy interopt it's needed so I think they made the right choice. A lot of js libraries have types over at http://definitelytyped.org but not everything.

    Hey I made a game, check it out @ http://ifallingrobot.com/. (Or don't, your call)
  • DelzhandDelzhand Hard to miss. Registered User regular
    Starting to spend some time with golang. I've never used a language before where functions could have multiple return values. It's neat.

    Echo
  • djmitchelladjmitchella Registered User regular
    We're using typescript, and interop is definitely the killer for proper typing, so we've made boundaries where the 'any'ness of third party things is contained.

    Also, definitelytyped and the various wrappers is not "now this library has proper typing", it's "someone has tried to make classes for it a bit". There are libraries where the TS wrappers give you a very different sort of interface than the original one does, which sometimes makes sense because they're imposing proper objects on an otherwise amorphous blob of dynamic JS, but sometimes it makes it really awkward to use. Also, there's TS wrappers that are missing functionality from the original library, because the person that wrote the wrapper didn't put that in -- it's fixable, of course, but it can be very confusing when trying to work out why the code won't build properly.

  • EchoEcho ski-bap ba-dapModerator mod
    edited April 2017
    Wee, working on a test for the API where the test gets blank data. Testing manually with Postman works properly. :rotate:

    edit: and of course it was something too obvious.

    Echo on
  • djmitchelladjmitchella Registered User regular
    We just got a Hololens dev kit around here, so at last week's hackathon, a few of us came up with a way to integrate it with the rest of our stuff -- not particularly elegantly, given we had two days, but well enough that it counts, I reckon. I learned a lot about what hololens development is like during those two days. There's a lot of places where the libraries you use to do things are very different between Unity and Hololens, but that's sort of fair enough, I guess.

    However, some things made less sense -- let's put it this way. Here's a question. Which of these two do you think has a more functional implementation of C#?
    1. The C# backend for Unity?
    2. Visual Studio 2015 building a UWP app?
    That's right, it's Unity.

    And it's wrongly better, too.

    We had to do some JSON serialization/deserialization to talk to our servers, and after dealing with the Unity-specific HTTP libraries and the Unity-specific JSON libraries, we had things running in Unity. So then I built the hololens project and tried to run it -- and got a bunch of errors like "Exception thrown: 'System.InvalidCastException' in UnityEngine.dll InvalidCastException: Unable to cast object of type 'TokenResult' to type 'UnityEngine.IUnitySerializable'."

    After some investigation, it turns out that Unity's C# does a better job of supporting object serialization than the C# that runs in Hololens projects -- and that it _shouldn't_ do that, https://forum.unity3d.com/threads/json-top-level.461322/#post-2997110 is one of the Unity devs saying "woops, that shouldn't work in the first place". Ugh.

    (it also turned out that hololens's feature to let laptops stream what the wearer is seeing fails a lot in iffy wifi conditions -- like, for instance, a hackathon demo session when there's lots of people in the room all with their phones on the same hotspot that the hololens is trying to use.. It was a comically bad demo as that sort of thing goes, because all anyone else could see was me doing the hololens 'click' gesture in space and looking around saying "I promise, there's a big 3d park here, I totally swear it's true". And also with bad wifi their voice recognition fails, so the export from hololens to our app didn't work either, so there was literally _nothing_ for people to see..)

    Carpy
  • OrcaOrca Also known as Espressosaurus WrexRegistered User regular
    Delzhand wrote: »
    Starting to spend some time with golang. I've never used a language before where functions could have multiple return values. It's neat.

    I can't wait for C++17 support and structured bindings. Multiple return values is handy.

    ecco the dolphin
  • DelzhandDelzhand Hard to miss. Registered User regular
    Just built a slack bot in Go. It's super bare bones, but I now have an executable that I can run that posts to an incoming webhook. I called it gobot, because of course I did.

    EchoGrape ApeOrcamightyjongyothatassemblyguy
  • EchoEcho ski-bap ba-dapModerator mod
    Delzhand wrote: »
    Just built a slack bot in Go. It's super bare bones, but I now have an executable that I can run that posts to an incoming webhook. I called it gobot, because of course I did.

    I have a four-day weekend starting Friday, so I'm going to take a stab at making a Telegram bot in Go.

    Uselesswarriorthatassemblyguy
  • schussschuss Registered User regular
    Echo wrote: »
    Delzhand wrote: »
    Just built a slack bot in Go. It's super bare bones, but I now have an executable that I can run that posts to an incoming webhook. I called it gobot, because of course I did.

    I have a four-day weekend starting Friday, so I'm going to take a stab at making a Telegram bot in Go.

    Some guys I'm in slack with I think built a bridge in Go that allows you to post to telegram, irc or slack and it posts to the others.

    ecco the dolphin
This discussion has been closed.