|
Ihmemies posted:So our software creates charts. Data requests are asynchronous and they return data with metadata to which chart they belong to. If data requests fail, they return no data, only an exception. ... Can you not just see that an exception was returned, instead of polling?
|
# ? Oct 18, 2023 23:01 |
|
|
# ? May 30, 2024 06:58 |
|
Volmarias posted:... Can you not just see that an exception was returned, instead of polling? From the sound of it a “bus” of some sort manages the requests and the chartID in the response is how it’s paired back up. No chartID in an error means no match up. Not doing that approach would be way better, but may not be viable for whatever reason (such as “you have three days to change this”) But if you can change it away from whatever the hell disconnects requests from their source… yeah do that.
|
# ? Oct 18, 2023 23:42 |
|
In the 80s, there was at least one British video game publisher which basically bought games off of kids, slapped some artwork on and started publishing/selling them. This publisher had absolutely crappy practices, they basically exploited the kids. Now, there was some 13-yo kid who sent them babby's first videogame. For a project from someone with no experience it was... quite good. Too hard to really be playable, but the graphics were nice for the time and the game ran well. They asked him to port it to another console. He refused. So they got some 15-yo kid who had sent in some other games to do it. Except they never sent this other kid a copy of the source game, he'd basically only seen a demo. And yet they kept badgering him constantly over the deadline they had put in the contract. At some point he was sick of it and he sat down to write the most unplayable mess of code ever conceived. Just something that vaguely looked like the original game. He sent it to them uncompiled and he called it a day, assuming the publisher would take one look and throw it out. Nope, the publisher apparently never even tested it and started selling it. They even added it to a collection set a few years later. https://www.youtube.com/watch?v=PWy_3kMOuMA This video tells the entire story including a "play" demo and explanation in which ways the game is broken. Someone also posted the code online and annotated it for our reading pleasure: https://drive.google.com/file/d/0B1lIWldt8I1edUo4ZHBkRXdNVjA/view?resourcekey=0-ZUDlF7nVFbOvTli_Gg0JGw I suggest watching the vid first, the code might not make much sense without having an idea of what the game was supposed to be. This kid is a legend.
|
# ? Oct 21, 2023 06:57 |
|
Absolute magnificence.
|
# ? Oct 21, 2023 07:23 |
|
necrotic posted:From the sound of it a “bus” of some sort manages the requests and the chartID in the response is how it’s paired back up. No chartID in an error means no match up. I could not get a comment from anyone from our team, so I took silence as acceptance and just refactored it, took only one day… Now it returns the id and also the requests, which are tagged based on success/failure. It is a bit better now at least. I don’t know how these things are ideally implemented of course.
|
# ? Oct 21, 2023 07:41 |
|
Carbon dioxide posted:In the 80s, there was at least one British video game publisher which basically bought games off of kids, slapped some artwork on and started publishing/selling them. Today they are called Roblox and worth billions
|
# ? Oct 21, 2023 20:40 |
|
Doesn't Roblox skip the step of paying them actual money, though?
|
# ? Oct 21, 2023 22:38 |
|
Plorkyeran posted:Doesn't Roblox skip the step of paying them actual money, though? it pays them in "robux", which can technically be cashed for real money but only for around 1/4th the amount it costs to buy robux.
|
# ? Oct 21, 2023 22:51 |
|
Bruegels Fuckbooks posted:this is what code from programmers who "don't like to be tied down to types" actually looks like in the wild. dynamic and the expandoobject have enabled some really bad c# code. we inherited an angular+netcore app with plenty of dynamic and any, it was a nightmare.
|
# ? Oct 22, 2023 03:16 |
|
gnatalie posted:we inherited an angular+netcore app with plenty of dynamic and any, it was a nightmare. We're in a similar position, minus the dynamic types, but lots of manual JSON touching to make up for it. As I've started converting those to use real types I've learned that the real horror is Snaplogic giving people with a bit of SQL knowledge a low code way to produce some truly bizarre APIs.
|
# ? Oct 22, 2023 06:00 |
|
Plorkyeran posted:Doesn't Roblox skip the step of paying them actual money, though? No, they just make them jump through fuckton of hoops to discourage them from taking the money, and if that fails they get them with lovely exchange ratios. They aren't lying that it is technically possible to get paid
|
# ? Oct 22, 2023 22:15 |
|
https://sadservers.com/ Some of these are great and some of them belong here. Anyone caught messing with raw iptables and then asking why webserver no worky will be launched into the sun.
|
# ? Oct 29, 2023 22:14 |
|
https://twitter.com/defunkt/status/1719421402867204537 Thread Not strictly coding related, but it absolutely goes here.
|
# ? Nov 1, 2023 18:51 |
|
ultrafilter posted:https://twitter.com/defunkt/status/1719421402867204537 I have a coworker who once forgot to check his Perforce environment variables before doing a p4 obliterate on a no-longer-needed depot. We had a depot called rolling_vendor that periodically took merges from Epic's UE3 depot, so that we always had latest to compare against locally. The central tech group had started running their own rolling_vendor, so we didn't need ours anymore. Unfortunately they had just cloned the entire configuration from ours, including permissions, so my coworker apparently had full admin rights, and the obliterate went through just fine. At least it was relatively easy to get back, because there weren't any backups. He has an Irish last name that starts with an O', so he's been known as O'Bliterate for the last... 17 years
|
# ? Nov 1, 2023 19:04 |
|
ultrafilter posted:https://twitter.com/defunkt/status/1719421402867204537 Thanks! The best part of the thread is definitely well after the initial post. It's worth reading the whole thing. "Don't let anything access production except production." This is one of those statements that seems so obvious that it should be regarded as a truism. And yet it's so often not the case.
|
# ? Nov 1, 2023 20:02 |
|
Tequila Bob posted:Thanks! The best part of the thread is definitely well after the initial post. It's worth reading the whole thing. Also "don't work weekends".
|
# ? Nov 1, 2023 20:06 |
|
"Don't let anything access production except production.", or the generalized variant of "use minimal possible access rights" is indeed very obvious, and yet my team has to keep pushing rest of the company to use read-only accesses where possible, to not just give out rights to the whole file share when only one folder is needed, and to generate write tokens with actual expiration dates, instead of expiring them in year 9999. The twist is that we are the R&D team we should be the ones causing issues by hacking things apart to get results ffs
|
# ? Nov 2, 2023 00:04 |
|
Tequila Bob posted:Thanks! The best part of the thread is definitely well after the initial post. It's worth reading the whole thing. I test in production. Since the tests are in production, they're fine, right? Seems like everyone's making a big deal about nothing!!
|
# ? Nov 2, 2023 00:30 |
|
I have determined that our university’s webdev1 course is pure coding horror. Plain ES5/6 mixed haphazardly, mongodb, age old node packages. I tried to swim against the tide, using ES6 features like modules, and import/export, until a test in this week’s assignments banned them. [-] /submission/user/src/public/js/adminUsers.js1 problem (1 error, 0 warnings) 4:1 Error Parsing error: 'import' and 'export' may appear only with 'sourceType: module' [-] /submission/user/src/public/js/cart.js1 problem (1 error, 0 warnings) 4:1 Error Parsing error: 'import' and 'export' may appear only with 'sourceType: module' [-] /submission/user/src/public/js/products.js1 problem (1 error, 0 warnings) 4:1 Error Parsing error: 'import' and 'export' may appear only with 'sourceType: module' [-] /submission/user/src/public/js/register.js1 problem (1 error, 0 warnings) 4:1 Error Parsing error: 'import' and 'export' may appear only with 'sourceType: module' Well, I thought I’d just convert our project to typescript and transpile to ES5. … the functional programming tester checks for “for” loops, which typescript auto generates when transpiling. /home/user/study/tuni/webdev1proj/dist/index.js 21:22 error Unallowed use of `for` loop fp/no-loops /home/user/study/tuni/webdev1proj/dist/models/user.js 21:22 error Unallowed use of `for` loop fp/no-loops /home/user/study/tuni/webdev1proj/dist/routes.js 21:22 error Unallowed use of `for` loop fp/no-loops /home/user/study/tuni/webdev1proj/index.js 21:22 error Unallowed use of `for` loop fp/no-loops /home/user/study/tuni/webdev1proj/models/user.js 21:22 error Unallowed use of `for` loop fp/no-loops /home/user/study/tuni/webdev1proj/routes.js 21:22 error Unallowed use of `for` loop fp/no-loops I give up. I am making Internet Explorer compatible webpages with pure ECMASCRIPT 5 in TYOOL 2023. And I don’t have a choice if I want a grade from the course. gently caress. gently caress this horseshit. 2nd largest uni in Finland btw, don’t come here to get your CS degree.
|
# ? Nov 18, 2023 00:01 |
|
Most Samsung and LG TVs still only support ECMAScript 5, there's a whole market out there for outdated tech.
|
# ? Nov 18, 2023 00:10 |
|
"no for loops" is a pretty strange rule.
|
# ? Nov 18, 2023 00:24 |
|
OddObserver posted:"no for loops" is a pretty strange rule. They want to enforce functional style of programming. So all loops are verboten. I don’t really care what kind of garbage the typescript compiler spits out. My major problem is that there is no way do the course assignment with anything newer than ES5. At least I can’t figure this out. Maybe there is a tool which transpiles modern ES to ES5, and doesn’t add loops to the code?
|
# ? Nov 18, 2023 00:30 |
|
Ihmemies posted:They want to enforce functional style of programming. So all loops are verboten. Just use the methods on the array instead of a for loop and it will transpile to the method calls.
|
# ? Nov 18, 2023 00:45 |
|
necrotic posted:Just use the methods on the array instead of a for loop and it will transpile to the method calls. Given that the lint errors occur on the same line of every file, the for loops are probably part of the boilerplate code that the typescript compiler is inserting to support polyfilling modern JS features in ES5, not the original source code. Ihmemies posted:Maybe there is a tool which transpiles modern ES to ES5, and doesn’t add loops to the code? I think every solution that transpiles down to ES5 is probably going to add polyfill code with loops in it. Though, if some ES6 code works, you could probably target at least ES2015 instead of ES5 and possibly avoid the polyfill code altogether. The first set of errors you got is because your eslint parser isn't configured for esmodules. If you're able to adjust the eslint configuration that's testing your code, then can probably set parserOptions.sourceType to "module" and then just write plain esmodules with import/export syntax without any compilation/transpilation step. Ima Computer fucked around with this message at 01:52 on Nov 18, 2023 |
# ? Nov 18, 2023 01:48 |
|
i would really not recommend turning in transpiled or otherwise machine-generated code for a school assignment assuming the professor is even the smallest bit competent they will have some level of human-beings-actually-looking-at-the-code (even if it's just TAs) beyond just automatic grading.
|
# ? Nov 18, 2023 02:43 |
|
It's really a privilege to be able to "modern" code. There's so many times when you're stuck with ES5 or Java 8 or C89 even due to aging infrastructure and requirements. And being able to meet those requirements--even if they're ridiculous--is still important. Also I wouldn't really evaluate a CS program based on their webdev course unless it's required form some reason.
|
# ? Nov 18, 2023 05:33 |
|
Ihmemies posted:I have determined that our university’s webdev1 course is pure coding horror. Plain ES5/6 mixed haphazardly, mongodb, age old node packages. I tried to swim against the tide, using ES6 features like modules, and import/export, until a test in this week’s assignments banned them. Academia is usually outdated. The material for the course need effort to be created, and that effort is not dumped every time new stuff appears (that with javascript is every hour of the clock). And sometimes the teachers are people that have never been out in the real world, but instead where students of the matter or come from a connected field, like math.
|
# ? Nov 18, 2023 08:58 |
|
Ima Computer posted:Given that the lint errors occur on the same line of every file, the for loops are probably part of the boilerplate code that the typescript compiler is inserting to support polyfilling modern JS features in ES5, not the original source code. It is this. quote:I think every solution that transpiles down to ES5 is probably going to add polyfill code with loops in it. Though, if some ES6 code works, you could probably target at least ES2015 instead of ES5 and possibly avoid the polyfill code altogether. I also tried this first, but the linter runs on school’s servers and the config file can not be edited. I asked them to consider allowing modules in the config but got no answer. Then I tried transpiling, and the linter gave a 0 because of the compiler added for loops. I understand keeping courses up to date is hard, but it is extremely annoying to be disallowed to use any kind of workarounds. I have never seen worse spaghetti than the codebase we were given by the course for this project. I have rewritten it from all the allowed parts, and use typescript checks for my plain JavaScript. It has made it somewhat tolerable, but these newest linter tests nearly make me give up this crap RPATDO_LAMD posted:i would really not recommend turning in transpiled or otherwise machine-generated code for a school assignment They could just look at the /src folder of the git repository. I wish a real human looked at these instead of lovely automated tests. I have spent maybe 20% time on actual productive code, 80% trying to deal with the automated tests and figuring out workarounds for them. Ihmemies fucked around with this message at 09:27 on Nov 18, 2023 |
# ? Nov 18, 2023 09:23 |
|
So the webdev course has you working around lovely opaque technical restrictions and outdated server setups?
|
# ? Nov 18, 2023 09:48 |
|
Athas posted:So the webdev course has you working around lovely opaque technical restrictions and outdated server setups? Such is life. After this course there are 2 follow-up courses, but I think I will just skip them and do https://fullstackopen.com/en/ + the project instead. I heard everyone complain about the web dev course but I wanted to give it a chance. My own fault…
|
# ? Nov 18, 2023 10:15 |
|
ExcessBLarg! posted:It's really a privilege to be able to "modern" code. There's so many times when you're stuck with ES5 or Java 8 or C89 even due to aging infrastructure and requirements. And being able to meet those requirements--even if they're ridiculous--is still important. C89 is a fine language as long as you're single threaded.
|
# ? Nov 18, 2023 13:45 |
|
I’d rather write C89 than ES5, after writing both. Maybe I need to start looking at C++ front end frameworks.
|
# ? Nov 18, 2023 13:48 |
|
Ima Computer posted:Given that the lint errors occur on the same line of every file, the for loops are probably part of the boilerplate code that the typescript compiler is inserting to support polyfilling modern JS features in ES5, not the original source code. I could’ve sworn Array forEach and friends were around back in ES5. I guess it could be dumbly including a polyfill though even thought it’s not needed for that?
|
# ? Nov 18, 2023 17:02 |
|
necrotic posted:I could’ve sworn Array forEach and friends were around back in ES5. I guess it could be dumbly including a polyfill though even thought it’s not needed for that? It's probably not polyfilling forEach that's a problem, but some ES6+ language feature. For example, if you use object spreading syntax, it compiles down to a call to Object.assign(). But, no version of Internet Explorer supports that method, so it also means bringing in a polyfill for Object.assign(), which includes a for loop. JavaScript code:
JavaScript code:
|
# ? Nov 18, 2023 18:06 |
|
Oh, yeah I didn’t consider extra features like that. Easy enough to avoid them if the class is (stupidly) strict on ES5 only.
|
# ? Nov 18, 2023 18:22 |
|
I think you need to take a step back and work within the parameters provided to you. You won’t always have full control over your tech stack and I would guess that most workplaces will have some sort of limitations like this. Perhaps these are on the extreme end of things, but such is life. The sooner you accept your reality and stop banging your head against it, the sooner you can complete your assignment, and probably with less headache at the end of the day. Or just keep banging your head against the wall, you do you. Apex Rogers fucked around with this message at 18:38 on Nov 18, 2023 |
# ? Nov 18, 2023 18:24 |
|
This is sounding like the most realistic intro dev course around. Possibly unintentionally. Also flashing back to failing an assignment because I used java.util.Scanner when that was next week's assignment.
|
# ? Nov 18, 2023 18:34 |
|
I first completed the assignment by ripping out all 😓the advanced features. Next I spent 6 hours trying to figure workarounds, then two more complaining when none worked. The course is done enough for me, I have enough points for grade 4 where 0 is fail and 5 is best. In the full stack open course I linked earlier there doesn’t seem to be version restrictions. It uses Vite+react and does not have automatic testers, so I am going to use .tsx instead of .jsx because no one is stopping me! I wish webdev went back to server side rendering. Server provides static HTML and CSS and that’s it.
|
# ? Nov 18, 2023 18:35 |
|
Ihmemies posted:
Careful what you wish for, friend. Server Side rendering of React and the like is big now, but you still end up with a whole React front end after it all loads. And so many use awful CSS in JS frameworks that do insane things like mutate a style sheet a thousand times on page load, each being a repaint.
|
# ? Nov 18, 2023 18:40 |
|
|
# ? May 30, 2024 06:58 |
|
pokeyman posted:This is sounding like the most realistic intro dev course around. Possibly unintentionally. Yup. This reeks of junior dev coming in and trying to change the world on day 1, not realizing the restrictions that are in place, for good or bad.
|
# ? Nov 18, 2023 18:42 |