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] Page overflow to new thread

11415171920101

Posts

  • Options
    TelMarineTelMarine Registered User regular
    edited September 2019
    urahonky wrote: »
    Do you guys develop on desktops or laptops? If you do it on desktops do you just VPN/Remote Desktop from home? Or do you have a shared desktop app that transfers your profile around? I'm trying to figure out how much I want to push for a desktop. The laptop I use (HP Envy, i7, 16GB of RAM, 800GB of SSD) is just hot garbage. I can't have Youtube running (for music) + MySQL Workbench + VSCode + anything else without something taking several seconds to happen. I'm trying to decide if a Ryzen + 32GB + SSD is worth pushing for when it's ~$400 cheaper than another laptop for the company, but it goes against the standard.

    Previous company, desktop with a laptop at home for remote work (everything was saved on network drives). Current place, laptop with all work on the laptop and github. Dell XPS from 2017/2018 I believe with Ubuntu 18. Came with 16GB ram that was upgraded to 32GB manually (cheaper). 1TB ssd, i believe. I have tons of stuff running at once. Multiple IDEs, browsers, projects, etc. I preferred having the desktop so I didn't have to carry my laptop everywhere with me.

    TelMarine on
    3ds: 4983-4935-4575
  • Options
    dporowskidporowski Registered User regular
    Does anyone happen to know a good "Idiot's Basic Guide to Flask templates" site? I don't know webpages. My entire devteam doesn't know webpages. Untold quantities of money, and none of us can figure out how to make a fucking button in something that's not a native platform. I've gone digging, and I've found some decent end to end tutorials, but something like a cheatsheet for just the HTML bits would be a godsend.

    I mean to be clear, all the stuff that should happen when the button gets hit? No problem. We literally can't usefully get a damn button on the page because I guess we are all chimps with fancy laptops.

  • Options
    KragunKragun Registered User regular
    dporowski wrote: »
    Does anyone happen to know a good "Idiot's Basic Guide to Flask templates" site? I don't know webpages. My entire devteam doesn't know webpages. Untold quantities of money, and none of us can figure out how to make a fucking button in something that's not a native platform. I've gone digging, and I've found some decent end to end tutorials, but something like a cheatsheet for just the HTML bits would be a godsend.

    I mean to be clear, all the stuff that should happen when the button gets hit? No problem. We literally can't usefully get a damn button on the page because I guess we are all chimps with fancy laptops.

    I'm assuming your flask application is using Jinja2 for the templating engine? (If I recall that's the default but I'm sure it can be swapped for something else).

    Template Docs.

    Basically you want to look at template inheritance. I am just guessing here, but it sounds to me like you're not modifying the appropriate template html file. You have a base layout template file composed of other child template files (like a navbar, sidebar, content). And then which content template it uses is supplied by the app.

  • Options
    OrcaOrca Also known as Espressosaurus WrexRegistered User regular
    edited September 2019
    So this was a depressing read: https://www.nngroup.com/articles/computer-skill-levels/

    Summary: Across 33 rich countries, only 5% of the population has high computer-related abilities, and only a third of people can complete medium-complexity tasks.

    One of usability’s most hard-earned lessons is that you are not the user. This is why it’s a disaster to guess at the users’ needs. Since designers are so different from the majority of the target audience, it’s not just irrelevant what you like or what you think is easy to use — it’s often misleading to rely on such personal preferences.

    For sure, anybody who works on a design project will have a more accurate and detailed mental model of the user interface than an outsider. If you target a broad consumer audience, you will also have a higher IQ than your average user, higher literacy levels, and, most likely, you’ll be younger and experience less age-driven degradation of your abilities than many of your users.

    There is one more difference between you and the average user that’s even more damaging to your ability to predict what will be a good user interface: skills in using computers, the Internet, and technology in general. Anybody who’s on a web-design team or other user experience project is a veritable supergeek compared with the average population. This not just true for the developers. Even the less-technical team members are only “less-technical” in comparison with the engineers. They still have much stronger technical skills than most normal people.

    It then goes on to detail exactly what each category of skill is defined as, along with typical percentages of the population that can do things at that level.

    Orca on
  • Options
    schussschuss Registered User regular
    I go on that rant on a regular basis. You are not your user. You are not SMARTER than your user. Set targets, instrument the UI and keep improving until it actually works. Most people just want a UI that works like the things they know, so stop being too clever. Also, Mac people, don't put your close buttons on the left.

  • Options
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    I think UI is hard enough, and subtle enough, and easy enough to convince yourself you are doing it right when you are most certainly not, it needs its own dedicated person(s). Folks need to specialize in it. It could almost be its own degree, distinct from regular computer science.

    Every UI I've ever made has been terrible. But that's because it isn't something I focused on.

    I do hope one day to be able to design a reasonably decent CLI experience. That is more than enough challenge for me.

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • Options
    TelMarineTelMarine Registered User regular
    Orca wrote: »
    So this was a depressing read: https://www.nngroup.com/articles/computer-skill-levels/

    Summary: Across 33 rich countries, only 5% of the population has high computer-related abilities, and only a third of people can complete medium-complexity tasks.

    One of usability’s most hard-earned lessons is that you are not the user. This is why it’s a disaster to guess at the users’ needs. Since designers are so different from the majority of the target audience, it’s not just irrelevant what you like or what you think is easy to use — it’s often misleading to rely on such personal preferences.

    For sure, anybody who works on a design project will have a more accurate and detailed mental model of the user interface than an outsider. If you target a broad consumer audience, you will also have a higher IQ than your average user, higher literacy levels, and, most likely, you’ll be younger and experience less age-driven degradation of your abilities than many of your users.

    There is one more difference between you and the average user that’s even more damaging to your ability to predict what will be a good user interface: skills in using computers, the Internet, and technology in general. Anybody who’s on a web-design team or other user experience project is a veritable supergeek compared with the average population. This not just true for the developers. Even the less-technical team members are only “less-technical” in comparison with the engineers. They still have much stronger technical skills than most normal people.

    It then goes on to detail exactly what each category of skill is defined as, along with typical percentages of the population that can do things at that level.

    Interesting read, thanks for posting this.

    3ds: 4983-4935-4575
  • Options
    schussschuss Registered User regular
    I think UI is hard enough, and subtle enough, and easy enough to convince yourself you are doing it right when you are most certainly not, it needs its own dedicated person(s). Folks need to specialize in it. It could almost be its own degree, distinct from regular computer science.

    Every UI I've ever made has been terrible. But that's because it isn't something I focused on.

    I do hope one day to be able to design a reasonably decent CLI experience. That is more than enough challenge for me.

    I work with professional UX people quite a bit. The real pros generally produce 2-3 distinct designs the use feedback to filter and refine, the crappy ones complain about being "constrained".
    It's absolutely a profession of its own, but much like good code, a great process beats intuition nine times out of ten.

  • Options
    OrcaOrca Also known as Espressosaurus WrexRegistered User regular
    One of my favorite tools is VoidTools' Everything, which makes searching millions of files a snap.

    So as a learning experience I decided to make my own copy of it.

    I started with the most naive, simple implementation I could think of: build up a gigantic array consisting of the strings corresponding to every file I found on the system, then apply a regex to each and every one of the file strings.

    I expected this to be a punishingly poor idea, and was planning on putting it all in a database or having to do some fun algorithm implementation.

    NOPE.

    Turns out it actually works surprisingly well! 7 seconds to index 400K files, 80ms to run the regex against every single one of 'em and come up with a list of results.

    Well, so much for that project. I'm bored now.

  • Options
    schussschuss Registered User regular
    Orca wrote: »
    One of my favorite tools is VoidTools' Everything, which makes searching millions of files a snap.

    So as a learning experience I decided to make my own copy of it.

    I started with the most naive, simple implementation I could think of: build up a gigantic array consisting of the strings corresponding to every file I found on the system, then apply a regex to each and every one of the file strings.

    I expected this to be a punishingly poor idea, and was planning on putting it all in a database or having to do some fun algorithm implementation.

    NOPE.

    Turns out it actually works surprisingly well! 7 seconds to index 400K files, 80ms to run the regex against every single one of 'em and come up with a list of results.

    Well, so much for that project. I'm bored now.

    Now lemmatize and track past selections vs. search results to tune results.

  • Options
    gavindelgavindel The reason all your software is brokenRegistered User regular
    Orca wrote: »
    So this was a depressing read: https://www.nngroup.com/articles/computer-skill-levels/
    Summary: Across 33 rich countries, only 5% of the population has high computer-related abilities, and only a third of people can complete medium-complexity tasks.
    ...
    It then goes on to detail exactly what each category of skill is defined as, along with typical percentages of the population that can do things at that level.

    That sort of UI guide becomes less and less valuable as your software becomes more specialized. It is simply not possible to take something like Photoshop or video editing software or any of the major ERP suites and turn them into "one click solutions".

    The UI might be complex because the needs are complex. Some software simply requires users to be trained.

    At that point, I feel like the UI goal of "let's copy Apple and make one button that contextually renders everything" is a poor design decision. (One I've seen more than one person try to hamfist into products older than half the people working on it.) Then you need to start prioritizing things like the consistency of the experience (button A is button A), the documentation for training new tasks, and the user's ability to customize the UI so that the pieces they care about can be moved to the front of their workflow.

    Book - Royal road - Free! Seraphim === TTRPG - Wuxia - Free! Seln Alora
  • Options
    dporowskidporowski Registered User regular
    Kragun wrote: »
    dporowski wrote: »
    Does anyone happen to know a good "Idiot's Basic Guide to Flask templates" site? I don't know webpages. My entire devteam doesn't know webpages. Untold quantities of money, and none of us can figure out how to make a fucking button in something that's not a native platform. I've gone digging, and I've found some decent end to end tutorials, but something like a cheatsheet for just the HTML bits would be a godsend.

    I mean to be clear, all the stuff that should happen when the button gets hit? No problem. We literally can't usefully get a damn button on the page because I guess we are all chimps with fancy laptops.

    I'm assuming your flask application is using Jinja2 for the templating engine? (If I recall that's the default but I'm sure it can be swapped for something else).

    Template Docs.

    Basically you want to look at template inheritance. I am just guessing here, but it sounds to me like you're not modifying the appropriate template html file. You have a base layout template file composed of other child template files (like a navbar, sidebar, content). And then which content template it uses is supplied by the app.

    Excellent, thank you! (It's totally a Jinja2 thing, yes, though not for any other reason than "Yep, that's what came out of the box...")

    We're just absolutely not, any of us, web... Competent, at least not with modern tooling. I have melted at least three brains by showing them what an html template looks like, in fact.

  • Options
    Casual EddyCasual Eddy The Astral PlaneRegistered User regular
    Any angular2+ folks here? I’m supposed to look up a new or interesting angular 2 technology and research it and come in with questions - curious if anyone has a library or technology they think is cool. I’m still pretty newish to frontend development and haven’t explored much beyond the stuff we use.

    I’ve been doing some work migrating from angularjs to angular2 so I may look into that

  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    https://golang.org/doc/effective_go.html#semicolons
    Like C, Go's formal grammar uses semicolons to terminate statements, but unlike in C, those semicolons do not appear in the source. Instead the lexer uses a simple rule to insert semicolons automatically as it scans, so the input text is mostly free of them.
    One consequence of the semicolon insertion rules is that you cannot put the opening brace of a control structure (if, for, switch, or select) on the next line. If you do, a semicolon will be inserted before the brace, which could cause unwanted effects.

    Well that's certainly one way of enforcing your preferred coding style, by writing it into the lexer

  • Options
    EchoEcho ski-bap ba-dapModerator mod
    Phyphor wrote: »
    Well that's certainly one way of enforcing your preferred coding style, by writing it into the lexer

    ...and I love it.

    The only tiny annoyance with is that if you want to split chained statements you'll end up with
    foo.
      Bar().
      Baz()
    

    But that's a teeny thing I've gotten used to.

  • Options
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    While I do prefer same-line opening braces, I love this only because having the formatting style baked into the language removes an entire class of nitpicks from code reviews, either because they didn't run gofmt, or just because it is literally impossible to write code in the "wrong" style in a way that still compiles.

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • Options
    Ear3nd1lEar3nd1l Eärendil the Mariner, father of Elrond Registered User regular
    I wrote a handy little javascript method today to flatten a parent/child list of objects.
    const flatten = (arr, childProp) => {
      let retArray = [];
      const tempArray = JSON.parse(JSON.stringify(arr));
      tempArray.forEach(i => {
         if (Array.isArray(i[childProp]) && i[childProp].length) {
          const children = [...i[childProp]];
          delete i[childProp];
          const flatChildren = flatten(children, childProp);
          retArray = [...retArray, i, ...flatChildren];
        }
        else {
          delete i[childProp];
          retArray = [...retArray, i];
        }
      });
      return retArray;
    };
    

  • Options
    qwer12qwer12 PhilippinesRegistered User regular
    Hi all, I'm trying to practice functional programming, and does anybody know a repo or tutorial which uses functional programming for complex projects? While I pretty much understand the basics (pure functions, immutability, etc), I just can't wrap my head around how I'm supposed to organize the code when making complex projects. Every time I try to do create something more complex than a coding exercise, my mind automatically falls back into using object oriented design patterns to organize the code.

    steam_sig.png

    PSN: jrrl_absent
  • Options
    Jimmy KingJimmy King Registered User regular
    edited October 2019
    qwer12 wrote: »
    Hi all, I'm trying to practice functional programming, and does anybody know a repo or tutorial which uses functional programming for complex projects? While I pretty much understand the basics (pure functions, immutability, etc), I just can't wrap my head around how I'm supposed to organize the code when making complex projects. Every time I try to do create something more complex than a coding exercise, my mind automatically falls back into using object oriented design patterns to organize the code.

    Maybe RabbitMQ? I imagine that's a beast of a codebase and maybe more than you're asking for but it's written in Erlang and so is a traditional functional language which has been around for quite awhile and has powered quite a bit of serious business. They have separate code bases for both the main server and management ui/http api plugin

    CircleCI has a bunch of stuff written in Clojure.

    You might also be interested in looking at the Elixir programming language. It is a purely functional language built on top of the erlang beam vm, but generally looks like Ruby (very intentionally) and allows for organizing code in a way which looks and feels very comfortable to someone more accustomed to OO structure while staying completely functional. It has a very capable web framework, DataMapper, and GraphQL server which I've used in projects in the past and a number of not web specific things.

    Jimmy King on
  • Options
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    edited October 2019
    I mean I myself would love some basic hints on how separation of concerns works in heavily functional setups. You do have to know of a function to call it. Unless it is an argument, in which case the caller has to know about you. I don't want to dig through a codebase, just like assuming you "get" the basics of why state is bad and pure functions and functions-as-values are good, how do you go from there to being able to write nontrivial stuff functionally?

    I use functional style a huge amount all over (by that I mean I prefer immutable types and pure functions and strategy patterns), but it is always found in the implementation details of an essentially OO application. (I use the term OO loosely enough to include Go, which does not support inheritance. I hate inheritance. Let us not speak of it.)

    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
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    edited October 2019
    Ear3nd1l wrote: »
    I wrote a handy little javascript method today to flatten a parent/child list of objects.
    const flatten = (arr, childProp) => {
      let retArray = [];
      const tempArray = JSON.parse(JSON.stringify(arr));
      tempArray.forEach(i => {
         if (Array.isArray(i[childProp]) && i[childProp].length) {
          const children = [...i[childProp]];
          delete i[childProp];
          const flatChildren = flatten(children, childProp);
          retArray = [...retArray, i, ...flatChildren];
        }
        else {
          delete i[childProp];
          retArray = [...retArray, i];
        }
      });
      return retArray;
    };
    

    I'm still shocked at how even basic javascript is completely different than it used to be. Two of those keywords didn't even exist until recently...

    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
    Ear3nd1lEar3nd1l Eärendil the Mariner, father of Elrond Registered User regular
    I didn't know about 'delete' until today.

  • Options
    InfidelInfidel Heretic Registered User regular
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat

    Has a bunch of example alternatives to using .flat() as well along your lines.

    OrokosPA.png
  • Options
    SpawnbrokerSpawnbroker Registered User regular
    edited October 2019
    I mean I myself would love some basic hints on how separation of concerns works in heavily functional setups. You do have to know of a function to call it. Unless it is an argument, in which case the caller has to know about you. I don't want to dig through a codebase, just like assuming you "get" the basics of why state is bad and pure functions and functions-as-values are good, how do you go from there to being able to write nontrivial stuff functionally?

    I use functional style a huge amount all over (by that I mean I prefer immutable types and pure functions and strategy patterns), but it is always found in the implementation details of an essentially OO application. (I use the term OO loosely enough to include Go, which does not support inheritance. I hate inheritance. Let us not speak of it.)

    I didn't even understand what functional programming was until recently. I thought all programmers wrote their code in the functional programming way, but I think I was taught CS in a particularly math-heavy way, so it's naturally how I think about things.

    I have never understood why people like inheritance. Composition solves almost all problems in a way that's easily understandable to me. Inheritance solves some problems at the cost of readability, and readability is king.

    Spawnbroker on
    Steam: Spawnbroker
  • Options
    Ear3nd1lEar3nd1l Eärendil the Mariner, father of Elrond Registered User regular
    I mean I myself would love some basic hints on how separation of concerns works in heavily functional setups. You do have to know of a function to call it. Unless it is an argument, in which case the caller has to know about you. I don't want to dig through a codebase, just like assuming you "get" the basics of why state is bad and pure functions and functions-as-values are good, how do you go from there to being able to write nontrivial stuff functionally?

    I use functional style a huge amount all over (by that I mean I prefer immutable types and pure functions and strategy patterns), but it is always found in the implementation details of an essentially OO application. (I use the term OO loosely enough to include Go, which does not support inheritance. I hate inheritance. Let us not speak of it.)

    I didn't even understand what functional programming was until recently. I thought all programmers wrote their code in the functional programming way, but I think I was taught CS in a particularly math-heavy way, so it's naturally how I think about things.

    I have never understood why people like inheritance. Composition solves almost all problems in a way that's easily understandable to me. Inheritance solves some problems at the cost of readability, and readability is king.

    I think it's just that everyone's brain works differently. Inheritance makes absolute sense to me and I had trouble thinking outside that "box" when I learned functional programming. Now that I understand both, I can be more flexible on the types of projects I work on.

  • Options
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    edited October 2019
    One reason people like inheritance (I thought I said we were not to speak of it!) is that most languages make composition and delegation very inelegant relative to inheritance, assuming you are already comfortable with inheritance. So, for example, when I first started writing Java professionally, I tried to write it like Go code. But that was ... very tedious and awkward, because Java is just not designed that way. You can avoid inheritance to an extent (And you should!), but you do have to use it eventually because completely avoiding it isn't worth the hassle. The language just gets in the way.

    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
    Ear3nd1lEar3nd1l Eärendil the Mariner, father of Elrond Registered User regular
    I think part of my "issue" is that I went to school for Art, not CS. So I didn't learn software development in the same way that a lot of you guys did. 90% of what I know, I taught myself based on what I needed to accomplish my goal. Plus, I started this in 1995 which was still very much OOP driven.

  • Options
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    I was taught Java in school, but I didn't want to become a generic Java dev (... look how that turned out) so I tended to rewrite interesting assignments in Go (which was a fairly new, immature language at the time). This forced me to recognize that inheritance is not required, and the power of interfaces, composition, and delegation.

    So that's how I got to where I understand inheritance quite well, but hate it anyway.

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • Options
    Ear3nd1lEar3nd1l Eärendil the Mariner, father of Elrond Registered User regular
    edited October 2019
    The thing I didn't like about Go (and this was likely the environment, not the language) is that everything is global to the package rather than contained in a class.

    But then again, I learned it over a weekend so I could start a project that Monday. So it wasn't exactly the typical experience.

    Ear3nd1l on
  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    basic web architecture problem.... hoping someone who actually knows webservers can field this question

    Let's say I have a server with two high performance CPU cores. The server runs two instances of my web application, one per core. In front of each of these web application instances is a web server instance (in this case, gunicorn) which have a single worker each.

    I have an application bottleneck where a client attempting to reach and transact with my application is *severely throttled* by poor wireless traffic. Therefore, a request which may take one second to complete in fact takes 2 minutes due to poor network speed.

    I theorize that in this current setup, the client's slowness is bottlenecking my server's ability to handle requests, not because of a CPU limitation, but a configuration limitation at the webserver level, which causes subsequent requests to timeout and bounce.

    Do I address this by increasing the number of gunicorn workers? Or is there some other configuration tool I can use to basically increase the number of lanes... so that other, faster requests can cut ahead of the slow ones?

  • Options
    InfidelInfidel Heretic Registered User regular
    Jasconius wrote: »
    basic web architecture problem.... hoping someone who actually knows webservers can field this question

    Let's say I have a server with two high performance CPU cores. The server runs two instances of my web application, one per core. In front of each of these web application instances is a web server instance (in this case, gunicorn) which have a single worker each.

    I have an application bottleneck where a client attempting to reach and transact with my application is *severely throttled* by poor wireless traffic. Therefore, a request which may take one second to complete in fact takes 2 minutes due to poor network speed.

    I theorize that in this current setup, the client's slowness is bottlenecking my server's ability to handle requests, not because of a CPU limitation, but a configuration limitation at the webserver level, which causes subsequent requests to timeout and bounce.

    Do I address this by increasing the number of gunicorn workers? Or is there some other configuration tool I can use to basically increase the number of lanes... so that other, faster requests can cut ahead of the slow ones?

    Generally you don't need more workers but just more connections available, so you turn up the connection limit.

    That has other ramifications, but it is the "answer" to someone clogging up all your available connections. Long-term you may need to address this another way, such as limiting connections for that particular client so that they only saturate themselves.

    OrokosPA.png
  • Options
    InfidelInfidel Heretic Registered User regular
    Never used gunicorn but their setting for that appears to be stuff like "--worker-connections=1000"

    OrokosPA.png
  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    hmm, yes i have connections at 1000... I'll explore further and see if there's any other factor in how gunicorn deals with this

    I do feel strongly at this point that at some level, the slow connections are causing a problem

  • Options
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    edited October 2019
    Ear3nd1l wrote: »
    The thing I didn't like about Go (and this was likely the environment, not the language) is that everything is global to the package rather than contained in a class.

    But then again, I learned it over a weekend so I could start a project that Monday. So it wasn't exactly the typical experience.

    Yeh, in Go it is tempting to throw global var's around. Sometimes it is somewhere between almost and actually unavoidable. But it should be super rare, such that in a complex app there might have one or maybe two, and even then it really is usually avoidable.

    edit: I think I misread that. This is more about scoping in general without "classes", not global var's per se.

    So, you have either unexported types, or types with unexported fields and/or methods, combined with interfaces, to accomplish encapsulation/implementation hiding. Doing it this way takes some adjustment if you are coming from classes.

    edit: Hiding implementations: https://play.golang.org/p/pwfCYcrfeNb

    I should have exported the new* functions (should be New*), but you get the idea.

    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
    Ear3nd1lEar3nd1l Eärendil the Mariner, father of Elrond Registered User regular
    edited October 2019
    Cool thanks. I don't know when/if I'll use Go again, but I'm always happy for pointers (pun intended).

    Ear3nd1l on
  • Options
    Jimmy KingJimmy King Registered User regular
    Jasconius wrote: »
    hmm, yes i have connections at 1000... I'll explore further and see if there's any other factor in how gunicorn deals with this

    I do feel strongly at this point that at some level, the slow connections are causing a problem
    Are you using eventlet or gevent? Or the prefork workers? The --worker-connections flag only effects eventlet and gevent workers, which may be why it's not solving your problems since the default is to use sync workers.

    I've been running gunicorn in production for years on several projects and have found that with prefork workers it's been beneficial to run signifcantly more than the default 1 per core. Even on AWS m3.medium instances and/or smaller ECS docker containers (ie. 1 cpu) 6-9 workers has generally been the sweet spot.

  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    Jimmy King wrote: »
    Jasconius wrote: »
    hmm, yes i have connections at 1000... I'll explore further and see if there's any other factor in how gunicorn deals with this

    I do feel strongly at this point that at some level, the slow connections are causing a problem
    Are you using eventlet or gevent? Or the prefork workers? The --worker-connections flag only effects eventlet and gevent workers, which may be why it's not solving your problems since the default is to use sync workers.

    I've been running gunicorn in production for years on several projects and have found that with prefork workers it's been beneficial to run signifcantly more than the default 1 per core. Even on AWS m3.medium instances and/or smaller ECS docker containers (ie. 1 cpu) 6-9 workers has generally been the sweet spot.

    yup that's what I came to yesterday in my reading. I am using standard sync workers, and I am currently only using one worker per instance... so I expect my bottleneck is there. Going to be upping this to 4 workers soon and hopefully that yields something nice. I'll report back.... in another few weeks when I deploy it :P

  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    ok. i have a race condition in my iOS database somewhere

    it only occurs in about 1 in 1000 user sessions

    but it is ruining my life

    AFAIK it's the only materially significant bug left in my application after 2 years of development

    it is time to equip..... THE DEBUGGING HELMET

  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    712Uij79O0L._SX466_.jpg
    ?

  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    yes, but with medium roast coffee

This discussion has been closed.