|
jeffrey won't put the site's tagline back, but it was one of like 3 absolutely true things lowtax said
|
# ? May 18, 2024 04:14 |
|
|
# ? Jun 10, 2024 03:35 |
|
bob dobbs is dead posted:jeffrey won't put the site's tagline back, but it was one of like 3 absolutely true things lowtax said lines two and three: ~*fartz*~ and "hello, there!"
|
# ? May 18, 2024 04:18 |
|
Subjunctive posted:you used a very confident tone for someone coming from a place of inexperience! Carthag Tuek posted:hell yeah, promotion comin up
|
# ? May 18, 2024 13:45 |
|
bob dobbs is dead posted:jeffrey won't put the site's tagline back, but it was one of like 3 absolutely true things lowtax said the internet makes you stupid is gone?
|
# ? May 18, 2024 14:43 |
|
Jabor posted:the reason you have cors in web browsers is that without it, site a would get to make requests to site b with the user's site b credentials. that's not a problem with apps at all - the webview in an app doesn't share state with the standalone web browser or the webviews in any other app. how dare you teach me something in THIS, the awfulest of threads heresy
|
# ? May 18, 2024 14:49 |
|
Hed posted:the internet makes you stupid is gone? can you find it? I can't find it anymore. its gone from where it was
|
# ? May 18, 2024 15:01 |
|
its on something called a "front page"
|
# ? May 18, 2024 18:01 |
|
RPATDO_LAMD posted:its on something called a "front page" you know that ain't a thing anymore
|
# ? May 18, 2024 19:10 |
|
https://www.somethingawful.com/frontpage/
|
# ? May 18, 2024 19:45 |
|
you know that it existing doesn't mean it's still a thing
|
# ? May 18, 2024 19:47 |
|
bob dobbs is dead posted:can you find it? I can't find it anymore. its gone from where it was It's still there! Sorta... HTML code:
|
# ? May 19, 2024 20:36 |
|
Jabor posted:this is the only one that cors is supposed to protect against. why then does it prevent requests being sent at all by default, rather than just excluding cookies by default?
|
# ? May 19, 2024 21:29 |
|
cool av posted:why then does it prevent requests being sent at all by default, rather than just excluding cookies by default? the client’s authentication could be a cookie, or an Authorization header token, or a client certificate for TLS, or simply being on an internal network for some cases
|
# ? May 20, 2024 02:03 |
|
without resorting to java-level "one thing per file" organization, at what point do you figure you should put something in its own module? just keep code that deals with the same stuff together? i'm refactoring two python projects and i really feel like i can better organize and label things than what i currently do, which is just by feel, where code that deals with the same sort of operations/apis or datatypes are in their own module
|
# ? May 20, 2024 17:13 |
|
every act of modularity is a bet about correlation, a bet about the future changes you're making in the code. you can write down the bets but you're just making bets. there's no oracle that can tell where the roulette wheel lands, you're just guessing in the first place, but you can look at the history of things to see what the odds are, at least
|
# ? May 20, 2024 17:18 |
|
every project should simply have a utils.[filetype] with 12,000 lines of code tbh, a lot of modern code organization is defined by unit testing needs. this means there's a lot of advice about how to split things up by "layer": separate your routes, your logic ("service" sometimes), your data access into separate modules, so that you can unit test them individually. if you're not doing this (and in 2024 i am more inclined than ever to say "computers got loving fast and layer abstractoins have gotten more complicated to reason about, just integration test everything you can and use unit tests for weird poo poo"), then it really is kinda just up to you. i think most web services wind up with "handler" (http routes/grpc stub/etc), "logic", and "data" layers, with the bulk of the code being under "logic." usually you have one module per "handler theme" (here's all the user profile endpoints) and one module per database access type (here's the DAO for getting user objects), and then "logic" just ends up being whatever is convenient. maybe you have a shared UserLogic module all your endpoints use some calls from, and then a UserProfileLogic module that just the profile endpoints use, that kinda thing.
|
# ? May 20, 2024 17:27 |
|
bob dobbs is dead posted:every act of modularity is a bet about correlation, a bet about the future changes you're making in the code. you can write down the bets but you're just making bets. there's no oracle that can tell where the roulette wheel lands, you're just guessing in the first place, but you can look at the history of things to see what the odds are, at least the Oracle roulette wheel always lands on Oracle
|
# ? May 20, 2024 17:28 |
|
abraham linksys posted:every project should simply have a utils.[filetype] with 12,000 lines of code utils.filetype always has 12000 sloc and is always like 11000 of sometimes-actually-tested pure functions and therefore is often the least poo poo code in the entire system
|
# ? May 20, 2024 17:36 |
|
I couldn't figure out why my Spring controller that was trying to return just a String or just a byte[] kept wrapping everything in JSON, encoding as base64, etc. Then I found a bit of converter configuration code that was applying a certain date format and unintentionally unregistering all the other default converters. I commented that out and my stuff started working as expected. Then I ran the tests and noticed that no tests failed. So now I have to figure out what the hell actually needed this converter and why turning it off didn't break anything. Whee!
|
# ? May 20, 2024 17:40 |
|
over the last decade i've deleted something like 20k lines of code from our utilities.hpp because it was stuff that got added to the standard library
|
# ? May 20, 2024 17:54 |
|
Plorkyeran posted:over the last decade i've deleted something like 20k lines of code from our utilities.hpp because it was stuff that got added to the standard library negative loc contributors stay winning
|
# ? May 20, 2024 21:27 |
|
bob dobbs is dead posted:every act of modularity is a bet about correlation, a bet about the future changes you're making in the code yeah, for me the guiding principle of software layout (module boundaries, repo layout, etc) is “things that often need to change together should live together”. you can make a lot of good architectural proposals just by looking at PR file correlation it’s also a fun lens for looking at your engineering organization: what sorts of changes require multiple teams to coordinate? should the team boundaries be drawn differently? yes
|
# ? May 20, 2024 23:50 |
|
d. l. parnas has 51 years on you, too (and me) https://www.win.tue.nl/~wstomv/edu/2ip30/references/criteria_for_modularization.pdf
|
# ? May 21, 2024 01:42 |
|
hrmmmmm tests fail on travis-ci because the app cant connect to the test db (php_network_getaddresses: getaddrinfo for mysql-tests failed: Name does not resolve) so i run a debug build and do the travis actions manually, but works fine. no problems! theres a sleep 45 between docker-compose up -d and docker-compose tests, which i even skipped when running manually wtf gives
|
# ? May 21, 2024 08:37 |
|
Share Bear posted:without resorting to java-level "one thing per file" organization, at what point do you figure you should put something in its own module? just keep code that deals with the same stuff together? Java doesn’t enforce one thing per file, that’s a myth. it just enforces one public, top-level thing per file. you can have a bunch of public things if some of them are nested, or a bunch of top-level things if some of them are not public. why yes, I have seen awful programmers abuse this to have an entire complex gui application in a single Java file …
|
# ? May 21, 2024 08:50 |
|
I am used to writing Python 3.1x code, but now I need to implement a few trivial things in an environment where I am locked into Javascript ES5 and limited to the stdlib and nothing else. I need the equivalent of the Python set operation "a & b" and it looks like I need to write my own? This is like banging rocks together, but not in the kind of fun way that is ASM.
|
# ? May 21, 2024 09:58 |
Antigravitas posted:I am used to writing Python 3.1x code, but now I need to implement a few trivial things in an environment where I am locked into Javascript ES5 and limited to the stdlib and nothing else. e: I may have my JS versions mixed up e2: Yep, I was thinking of ES6, rip op. Osmosisch fucked around with this message at 10:12 on May 21, 2024 |
|
# ? May 21, 2024 10:06 |
|
what do you mean by “limited to the stdlib and nothing else”? libraries aren’t specially constructed language forms, they’re just code in a different file. why can’t you copy one of the many Set polyfills, or just drop core-js’s minified 1.2KB file into your project?
|
# ? May 21, 2024 10:13 |
|
Antigravitas posted:I am used to writing Python 3.1x code, but now I need to implement a few trivial things in an environment where I am locked into Javascript ES5 and limited to the stdlib and nothing else. what’s crazy is this is true for the latest release of golang too in tyool 2024
|
# ? May 21, 2024 10:52 |
|
python sets are substandard too tho. why does set.add not return a bool indicating whether or not the value was already in the set?
|
# ? May 21, 2024 11:12 |
|
cmon dog, how you gonna bring that up? pretty big gulf between sets — the most basic collection — having an obscure api issue and not existing at all
|
# ? May 21, 2024 12:52 |
|
Subjunctive posted:what do you mean by “limited to the stdlib and nothing else”? libraries aren’t specially constructed language forms, they’re just code in a different file. why can’t you copy one of the many Set polyfills, or just drop core-js’s minified 1.2KB file into your project? You are thinking far too big. It's a single file, 16 lines of code, 9 lines of comment. I'm not inlining 1.2KB of minified javascript to get the intersection of two arrays. Comedy option: I could spawn a helper script that uses Python. I have Python 3.12 available to me.
|
# ? May 21, 2024 13:12 |
|
Antigravitas posted:You are thinking far too big. It's a single file, 16 lines of code, 9 lines of comment. I'm not inlining 1.2KB of minified javascript to get the intersection of two arrays. that's not how javascript peeps roll, to make a vast understatement but that's an argument in your favor, lol
|
# ? May 21, 2024 13:17 |
|
Antigravitas posted:You are thinking far too big. It's a single file, 16 lines of code, 9 lines of comment. I'm not inlining 1.2KB of minified javascript to get the intersection of two arrays. code:
|
# ? May 21, 2024 13:23 |
|
If you're limited to ES5 It's a bit unreasonable to blame javascript in general imo. Like I guess in terms of how old it is it's not technically as bad as saying something like "I'm stuck on python 1.5 and wow python sucks" but javascript changed a ton after ES5 so it's kind of similar.
mystes fucked around with this message at 13:27 on May 21, 2024 |
# ? May 21, 2024 13:25 |
|
Subjunctive posted:
I did something similar. This thing doesn't even have "let" yet. I resent polkit quite a lot tbh.
|
# ? May 21, 2024 13:42 |
|
you could probably transpile down to it, but yeah, 17 lines of code, probably not worth it
|
# ? May 21, 2024 13:46 |
|
my homie dhall posted:cmon dog, how you gonna bring that up? pretty big gulf between sets — the most basic collection — having an obscure api issue and not existing at all the most basic collection is unarguably the array unless you're some flang nerd, in which case it's probably some sort of immutable copy-on-write freakshow implemented using two trees, a deque, and a bloom filter
|
# ? May 22, 2024 01:26 |
|
what is an array but a set with the added complexity of ordering?
|
# ? May 22, 2024 01:57 |
|
|
# ? Jun 10, 2024 03:35 |
my homie dhall posted:what is an array but a set with the added complexity of ordering? A miserable block of memory. But enough premature optimization, have at you!
|
|
# ? May 22, 2024 07:25 |