|
Krankenstyle posted:hrmm you can also use chain, it's somewhat more convenient in some situations... probably not in this one though code:
|
# ? Feb 18, 2019 14:41 |
|
|
# ? Apr 23, 2024 17:43 |
|
oh neat, I'll keep it in mind. thx!
|
# ? Feb 18, 2019 14:46 |
the fast solution to that, just fyi, is an .expand() for loop
|
|
# ? Feb 18, 2019 15:11 |
|
Fatty Crabcakes posted:4) brief description, ISSUE-42069 This. It's super useful when a super long time later you modify some code and it does something puzzling that you need to remove or modify and you can look up the jira that this was fixing and verify that your changes are not making the bug reappear we have a perforce commit plugin where we can reference the bug we're fixing so it automatically gets closed and cross referenced with the changelist number, it's super useful
|
# ? Feb 18, 2019 15:47 |
|
Zlodo posted:This. It's super useful when a super long time later you modify some code and it does something puzzling that you need to remove or modify and you can look up the jira that this was fixing and verify that your changes are not making the bug reappear That's what the tests are for? I agree with auto linking between commit message body and an issue tracker being useful though.
|
# ? Feb 18, 2019 16:04 |
|
cinci zoo sniper posted:the fast solution to that, just fyi, is an .expand() for loop you mean .extend()?
|
# ? Feb 18, 2019 16:05 |
|
Are there any alternatives to SonarQube that are remotely good?
|
# ? Feb 18, 2019 16:16 |
Krankenstyle posted:you mean .extend()? yeah Zlodo posted:This. It's super useful when a super long time later you modify some code and it does something puzzling that you need to remove or modify and you can look up the jira that this was fixing and verify that your changes are not making the bug reappear i thought this went without saying regardless. mine usually here are “Does a thing. Resolves FOO-69.”
|
|
# ? Feb 18, 2019 16:21 |
|
if you're commiting a list comprehension that is more complicated than something like code:
if you don't, you're gonna be real mad at yourself later for being so clever
|
# ? Feb 18, 2019 16:25 |
|
Corla Plankun posted:if you're commiting a list comprehension that is more complicated than something like my team is loving awful at this and i have to constantly remind them that "pythonic" means readable and comprehensible not code golf
|
# ? Feb 18, 2019 16:29 |
|
Xarn posted:That's what the tests are for? Our qa team have a smoke test procedure to test the major features of the game every time they get a new build, but it's easy to break something that no one will notice - the combinatorial complexity of our features and game flows and game states and the data that it all feeds from is just too much to cover everything. Some unit testing might help, but the humongous code base was absolutely not designed with unit testing in mind. And then there's the fact that most of our bugs are caused not by individual modules but by the interactions between multiple modules and what the player have in their save and what designers have setup in the data.
|
# ? Feb 18, 2019 16:44 |
|
Corla Plankun posted:if you're commiting a list comprehension that is more complicated than something like my rule of thumb is if it's something very rote and dumb then I write whatever muscle memory brings me if it's likely to be extended with say a lot more business logic eventually then it should be a for-loop for sure so what cinci zoo sniper said about using extend is a good call for the second case code:
|
# ? Feb 18, 2019 16:47 |
|
Zlodo posted:We do little to no automated testing unfortunately. And what we do is very high level testing, things like automatically running AIs in the various racing events of our game and see if they get stuck. well, that sounds like a nightmare
|
# ? Feb 18, 2019 16:47 |
|
btw I'm surprised python never introduced a special flatten syntax for stuff like that. maybe something that looked a lot like unpacking. I guess it's one of those python committee arbitrary choices, like having sum() but not product()
|
# ? Feb 18, 2019 16:51 |
|
DONT THREAD ON ME posted:well, that sounds like a nightmare It's not as bad as I make it sound, we take our time, take the time to analyze the technical feasability of new features, do extensive code reviews and build a ton of in-game debugging tools to help us troubleshoot problems but our biggest force is that we have lot of experienced people who are able to correctly anticipate development costs, so we rarely end up having to rush things
|
# ? Feb 18, 2019 16:54 |
|
what the gently caress why does this method pass an instance of a class to itself as a parameter for its own save method
|
# ? Feb 18, 2019 17:33 |
|
Because you touch yourself at night.
|
# ? Feb 18, 2019 17:47 |
|
Fatty Crabcakes posted:Because you touch yourself at night. do not expose my private methods tyvm bonus: all the methods on the class are set to internal because.....no wait there's no reason at all.
|
# ? Feb 18, 2019 17:49 |
|
Powerful Two-Hander posted:what the gently caress why does this method pass an instance of a class to itself as a parameter for its own save method that’s upsetting
|
# ? Feb 18, 2019 17:58 |
|
Powerful Two-Hander posted:what the gently caress why does this method pass an instance of a class to itself as a parameter for its own save method oh so there’s this rule of software development that also holds true for devops, sre, security engineering, and occasionally life. the fundamental law is: because gently caress you, that’s why
|
# ? Feb 18, 2019 18:06 |
|
Powerful Two-Hander posted:what the gently caress why does this method pass an instance of a class to itself as a parameter for its own save method if i had to guess someone probably wrote a dal abstraction layer that uses the class type as an entity to pass into a factory that saves the right object type but then forgot what they were doing and gently caress you that's why
|
# ? Feb 18, 2019 18:11 |
|
Blinkz0rz posted:if i had to guess someone probably wrote a dal abstraction layer that uses the class type as an entity to pass into a factory that saves the right object type but then forgot what they were doing and gently caress you that's why you're giving the devs involved far too much credit here. i think it's some stupidity involving changing the execution path from "iterate over a list saving each object (regardless of whether it had actually changed) " to "save an individual object when that object is explicitly changed" and rather than, you know, refractor anything to be vaguely logical they just took away the iteration without bothering to change its methods. even then though I can't quite figure out what the gently caress was going on before... an object that has a list of itself as a property and also has a method that saves an individual instance of itself or something hosed up like that.
|
# ? Feb 18, 2019 18:19 |
|
weird that list comprehensions are slower than for-loops. youd think theyd be at least the same speed
|
# ? Feb 18, 2019 18:24 |
Krankenstyle posted:weird that list comprehensions are slower than for-loops. youd think theyd be at least the same speed i meant to say that this is definitely faster than itertools.chain, though i wouldn’t be surprised if in general case extend still is the fastest - im not familiar with its implementation
|
|
# ? Feb 18, 2019 18:55 |
|
Krankenstyle posted:weird that list comprehensions are slower than for-loops. youd think theyd be at least the same speed It's because lol interpreted langs. Does adding comments inside a loop still slow it down?
|
# ? Feb 18, 2019 19:07 |
|
I'm running the last CSV-creating program, for all the Fifth Third Bank branch locations and ATMs, before I register as an official business. It's got 3 days to go until it finishes running because the FCC's API for adding county data given lat-long data is slow and I've been putting off learning to do client-side GIS with Python In the meanwhile I'm getting started on scraping data from Kroger, a grocery store chain which has its data available as a JSON object buried in the HTML source code of its store locator page. After I list my business on Google Ads for a month, if it doesn't bring in enough money, I'll get a full-time job and switch to working on the project on weekends. My parents have been sick and my mom is getting colon surgery soon. The project is the only reason I haven't gotten a job yet, but I can always quit the job if I need to in order to take care of my mom when she gets back from surgery. galenanorth fucked around with this message at 19:21 on Feb 18, 2019 |
# ? Feb 18, 2019 19:11 |
|
Blinkz0rz posted:dal abstraction layer a dalal if you will
|
# ? Feb 18, 2019 19:15 |
|
Lol python Remember that time Guido got up in someone's face during that guy's presentation about how their company tried to optimize some hot paths in cpython so it wasn't quite so poo poo slow
|
# ? Feb 18, 2019 19:16 |
|
Achmed Jones posted:oh so there’s this rule of software development that also holds true for devops, sre, security engineering, and occasionally life. the fundamental law is: because gently caress you, that’s why
|
# ? Feb 18, 2019 19:21 |
|
Private Speech posted:a dalal if you will
|
# ? Feb 18, 2019 19:33 |
|
id like to say 'i know' but really my eyes glazed over halfway through that post
|
# ? Feb 18, 2019 19:38 |
|
cinci zoo sniper posted:i meant to say that this is definitely faster than itertools.chain, though i wouldn’t be surprised if in general case extend still is the fastest - im not familiar with its implementation oh, right. turns out list comps are actually faster than for loops anyway lol
|
# ? Feb 18, 2019 19:40 |
|
galenanorth posted:I'm running the last CSV-creating program, for all the Fifth Third Bank branch locations and ATMs, before I register as an official business. It's got 3 days to go until it finishes running because the FCC's API for adding county data given lat-long data is slow and I've been putting off learning to do client-side GIS with Python how’s the weather in kentucky
|
# ? Feb 18, 2019 21:52 |
|
cinci zoo sniper posted:i meant to say that this is definitely faster than itertools.chain, though i wouldn’t be surprised if in general case extend still is the fastest - im not familiar with its implementation is it? I mean, it is if you're converting the iterable to a list sure but... well, if you're working with lists you shouldn't be worrying about speed really tbh
|
# ? Feb 18, 2019 22:11 |
|
lol at the very idea of having to care about iterator performance in a plang perhaps if performance mattered to you you should choose a language with zero cost abstractions, like rust
|
# ? Feb 18, 2019 22:33 |
Symbolic Butt posted:is it? I mean, it is if you're converting the iterable to a list sure but... well, if you're working with lists you shouldn't be worrying about speed really tbh about twice faster iirc. i sometimes have this problem at the scale of 10^7 lists, where that is an appreciable improvement
|
|
# ? Feb 18, 2019 22:34 |
|
DONT THREAD ON ME posted:lol at the very idea of having to care about iterator performance in a plang i'm interviewing at a company that claims to be doing HFT ...in f#
|
# ? Feb 18, 2019 22:49 |
|
gonadic io posted:i'm interviewing at a company that claims to be doing HFT ...in f# yeah that sounds difficult. i havent used f# but one of the most difficult parts of scala for me was reasoning about memory performance. what's going on in memory is really not exposed via the language. i guess you can say this for any managed language but scala is functional and complicated. coming back to a managed langs after working on unmanaged is weird. DONT THREAD ON ME fucked around with this message at 23:26 on Feb 18, 2019 |
# ? Feb 18, 2019 22:58 |
|
.net is pushing towards giving devs finer-grained control over allocations for perf-sensitive applications - e.g. with Span<T> being a stack-allocated type, things like ref structs
|
# ? Feb 18, 2019 23:25 |
|
|
# ? Apr 23, 2024 17:43 |
|
DONT THREAD ON ME posted:coming back to a managed langs after working on unmanaged is weird. honestly the biggest issue i have is that rust has "match foo {" and scala has "foo match {" well that and my hobby laptop is a surface book and work is a mac so the \" and the @ keep swapping places, also backslash
|
# ? Feb 19, 2019 00:19 |