|
echinopsis posted:I feel like I need to know about this It's just khan academy's online js tutorial , which uses the processing.js libraries. They start you out making lines and colors so it's like playing around with logowriter back in the day.
|
# ? Jan 28, 2019 15:59 |
|
|
# ? Apr 24, 2024 09:13 |
|
leper khan posted:is “loc lines” better than compacting it into “klocks” oh most definitely
|
# ? Jan 28, 2019 18:16 |
|
code locs
|
# ? Jan 28, 2019 18:32 |
|
there are 5 if statements checking a variable in this controller and all of them then call the exact same piece of code which just passes the value of the variable in as a filter what the gently caress
|
# ? Jan 28, 2019 20:13 |
|
Powerful Two-Hander posted:there are 5 if statements checking a variable in this controller and all of them then call the exact same piece of code which just passes the value of the variable in as a filter what the gently caress 10 years of refactoring by fresh devs after the previous person left imo. If its the work of one dev in a relatively recent time period then uhhh Although having said that if you do refactor it watch out for side effects! if(x.foo() == butt) kind of thing
|
# ? Jan 28, 2019 20:26 |
|
Krankenstyle posted:more like triple fail amirite and you’re interferon with our good time
|
# ? Jan 28, 2019 20:31 |
|
count_von_count posted:It's just khan academy's online js tutorial , which uses the processing.js libraries. They start you out making lines and colors so it's like playing around with logowriter back in the day. but does it have a turtle
|
# ? Jan 28, 2019 20:32 |
|
bob dobbs is dead posted:do some examples on paper first, use them as test cases, when you make mistakes on the paper examples, those are the negative test cases. bam done. math code is easy code. von neumann invented the current architecture of computers to do monte carlos for nukes ya its what i ended up doing also i just renamed a function to generate_confusion() to more clearly reflect what it does lol
|
# ? Jan 28, 2019 22:56 |
|
count_von_count posted:It's just khan academy's online js tutorial , which uses the processing.js libraries. They start you out making lines and colors so it's like playing around with logowriter back in the day. so dope can it process pictures?
|
# ? Jan 28, 2019 23:47 |
|
gonadic io posted:10 years of refactoring by fresh devs after the previous person left imo. If its the work of one dev in a relatively recent time period then uhhh good news everyone, it's the latter! i think they've written it using lovely switch statements then refactored it so that those no longer do anything and judging by the mess of commented out code and test stuff in there, left all their "working out" in place
|
# ? Jan 29, 2019 01:27 |
|
I love me some great swaths of commented code. There are projects at work with hundreds of lines of code, that have been commented out, but were originally copy pasted from another project 15 years ago. The top of the file is a 100 line comment marked with names and a half rear end change log which is just insanely useless
|
# ? Jan 29, 2019 01:51 |
|
What, you don't like comments like this?code:
|
# ? Jan 29, 2019 01:56 |
|
AggressivelyStupid posted:I love me some great swaths of commented code. There are projects at work with hundreds of lines of code, that have been commented out, but were originally copy pasted from another project 15 years ago. one ex dev would continuously copy and paste commented out code it was maddening. also comment commits with just "changes"
|
# ? Jan 29, 2019 02:03 |
|
lol I deny pull requests with commented out code. gently caress you that’s not going in there.
|
# ? Jan 29, 2019 02:04 |
|
CPColin posted:What, you don't like comments like this? git, what is that
|
# ? Jan 29, 2019 02:10 |
|
ratbert90 posted:lol I deny pull requests with commented out code. gently caress you that’s not going in there. lol as if we're doing pull requests and not just yoloing changes into the dev branch
|
# ? Jan 29, 2019 02:11 |
|
git push -f origin master
|
# ? Jan 29, 2019 02:13 |
|
Powerful Two-Hander posted:lol as if we're doing pull requests and not just yoloing changes into the dev branch We used to. Then I was hired.
|
# ? Jan 29, 2019 02:20 |
|
Soricidus posted:git push -f origin master bro don't steal my $RPROMPT
|
# ? Jan 29, 2019 02:36 |
|
Powerful Two-Hander posted:lol as if we're doing pull requests and not just yoloing changes into the dev branch use a git hook ya fuckin pelican
|
# ? Jan 29, 2019 02:39 |
|
DaTroof posted:use a git hook ya fuckin pelican How do you git hook for commented-out code? I could specifically use it for C but it's a general question Is there some parsing library for it? I'm sure there is but no seriously
|
# ? Jan 29, 2019 12:22 |
|
python has a ton of things that will return nonzero exit codes if your formatting is bad or contains errors that can be detected with static analysis like unused imports and etc i feel like it is a guaranteed certainty that they stole this idea from existing lang communities because it is too good to have come from pythonistos
|
# ? Jan 29, 2019 12:29 |
|
Corla Plankun posted:python has a ton of things that will return nonzero exit codes if your formatting is bad or contains errors that can be detected with static analysis like unused imports and etc thanks that reminded me that linters exist, and yeah that would work and yeah it's been around for older plangs for quite a while, the original lint was for C e: actually no thinking about it it wouldn't work, it's not trivial to decide which comments are C code e2: the best I can find is a grep for semicolons in comments, which is ehh Private Speech fucked around with this message at 12:53 on Jan 29, 2019 |
# ? Jan 29, 2019 12:40 |
|
Private Speech posted:How do you git hook for commented-out code? I could specifically use it for C but it's a general question serious answer, yeah, it's probably not possible to do with 100% accuracy you could kinda sorta get partway there with a regexp to detect when a diff stubs existing code
|
# ? Jan 29, 2019 13:38 |
|
Just lol if you don't have at a minimum a Jenkins server + sonarqube. I even have a docker-compose to bring them both up in only a few minutes.
|
# ? Jan 29, 2019 13:47 |
|
ratbert90 posted:Just lol if you don't have at a minimum a Jenkins server + sonarqube. I even have a docker-compose to bring them both up in only a few minutes. how many containers do you have for blowing your own horn
|
# ? Jan 29, 2019 13:49 |
|
carry on then posted:how many containers do you have for blowing your own horn in the context of SA we usually call them threads e: and lots
|
# ? Jan 29, 2019 13:58 |
|
are docker containers monads?
|
# ? Jan 29, 2019 14:10 |
|
pokeyman posted:are docker containers monads? Can you use a docker container as a host for its own set of containers? One of the requirements is to be able to have a function of type Docker<Docker<Butt>> to Docker<Butt>
|
# ? Jan 29, 2019 14:29 |
|
gonadic io posted:Can you use a docker container as a host for its own set of containers? One of the requirements is to be able to have a function of type Docker<Docker<Butt>> to Docker<Butt> You can
|
# ? Jan 29, 2019 14:30 |
|
Private Speech posted:thanks that reminded me that linters exist, and yeah that would work test if code compiles with any of n! combinations of comment lines uncommented.
|
# ? Jan 29, 2019 14:42 |
|
Krankenstyle posted:test if code compiles with any of n! combinations of comment lines uncommented. Mutation compilation ratbert90 posted:You can Then I would say probably yes, at least in theory. It's not really clear what a type Docker<int> would actually be
|
# ? Jan 29, 2019 15:30 |
|
gonadic io posted:Can you use a docker container as a host for its own set of containers? One of the requirements is to be able to have a function of type Docker<Docker<Butt>> to Docker<Butt> https://hub.docker.com/_/docker
|
# ? Jan 29, 2019 15:32 |
|
pokeyman posted:are docker containers monads? lol
|
# ? Jan 29, 2019 15:47 |
|
*through sobs* Please...you can't just call anything you want a monad *points at docker* "monad"
|
# ? Jan 29, 2019 16:15 |
|
Ctps: I have an acyclic graph in DOT format with about 8000 edges. Graphviz chokes on it. (maybe would be okay if I just left it longer?) What I want is to label each node with a depth of 1 (ie all nodes just below the root) with a count of its children (and children's children etc) Is there a thing I can use to do this, or should I just build a bespoke one-off app for it?
|
# ? Jan 29, 2019 16:19 |
|
gonadic io posted:Ctps: I have an acyclic graph in DOT format with about 8000 edges. Graphviz chokes on it. (maybe would be okay if I just left it longer?) i would progbably write a one-off script yeah also just got another idea for determining if comments are code: frequency count a bunch of code, then see if a comment is nearer to that feature vector than to one from an english prose corpus (english has much less punctuation & fewer brackets, etc)
|
# ? Jan 29, 2019 16:24 |
|
gonadic io posted:Ctps: I have an acyclic graph in DOT format with about 8000 edges. Graphviz chokes on it. (maybe would be okay if I just left it longer?) networkx is good for this, iirc. can read dot, anyhow. it might even not choke in visualizing, i've done 20k nodes on it
|
# ? Jan 29, 2019 16:26 |
|
Krankenstyle posted:i would progbably write a one-off script yeah grab a parser for your lang of choice, grab the commented text, remove the comments themselves from that selection, and check if the comment parses as code.
|
# ? Jan 29, 2019 16:33 |
|
|
# ? Apr 24, 2024 09:13 |
|
MononcQc posted:grab a parser for your lang of choice, grab the commented text, remove the comments themselves from that selection, and check if the comment parses as code. This is pretty much the only correct answer to "is text code". Trouble comes when people have edited the comment to make the parse fail, would you still count that as code? Also c++ is difficult to parse but something about made beds and lying in them imo
|
# ? Jan 29, 2019 16:45 |