New around here? Register your SA Forums Account here!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $10! We charge money because it costs us money per month for bills alone, and since we don't believe in shady internet advertising, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Main Paineframe
Oct 27, 2010

argh, javascript canvas images are complete bullshit to work with as media files

who in the gently caress thought this would be an acceptable replacement for flash or literally any other media format

Adbot
ADBOT LOVES YOU

Main Paineframe
Oct 27, 2010

prisoner of waffles posted:

what are you trying to do that's giving you trouble? I assume you're talking about consuming an image that was generated by a canvas? there are definitely some APIs where it's like, "give me a URL, an <img>, or a <canvas>" where I'm pretty sure that option 3 works more jankily.

like one escape hatch is to create a blob URL for your image and then use that

this guy: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob

blob URLs: a way to take javascript-generated content and get your browser to use it in a sane fashion

1) imagine using canvas stuff as a replacement for Flash, by coding interactive or animated "images" in javascript

2) now imagine a webpage that pulls in arbitrary user-supplied media of any type via AJAX and then displays it on the page. this includes animated or interactive media, like Flash and various obscure plugin poo poo

3) now remember that browsers are killing plugins and even Flash is on the chopping block, and thus that page was in need of the ability to support "modern, web-compliant" media formats that can accomplish the same things Flash does but with native browser support

combine those three things and you have a roadmap to the circle of hell i'm currently in

the worst part is that i probably could have stopped it if i'd pushed back much harder and much earlier, but i took way too long to realize just how bad it was going to be

Main Paineframe
Oct 27, 2010

prisoner of waffles posted:

I'm sure the actual requirements for your task were way more concrete than your quick sketch description but yeah, push push push back hard

its already been implemented. at the time, it seemed weird but manageable

now it's been tested and I have to fix the bugs

turns out just slamming arbitrary user-supplied javascript into the global context can cause weird phantombugs that are nigh-impossible to debug

Main Paineframe
Oct 27, 2010

prisoner of waffles posted:

can do a lot worse than

oh, absolutely. but that's the only part I actually have to give a poo poo about

i don't think anyone is ever actually going to use this feature in its current form and the environment is somewhat limited, so I'm not really worried about the horrid risks to security, performance, etc. it just has to work well enough for demos

if you've ever wondered why enterprise software sucks, it's because of people like me

Main Paineframe
Oct 27, 2010

terrible programmer status: writing code to scan dynamically-loaded javascript files for their function names at load time and recording them, so that I can get rid of them later by overwriting them all with undefined

Main Paineframe
Oct 27, 2010

CRIP EATIN BREAD posted:

help i cut my fingers off with this tool because i lacked the basic understanding of how it works, and i spent no effort to learn it. the tool must be bad!

i love deliberately wasting my own time by choosing the tool that's far more difficult to learn and use well because of its insanely bad interface, even though it's not really faster or more powerful than any of the other choices

like, vim is fine. if you're good at it and already used to it, it's probably comparable to any other text editor. but there's no reason to go out of your way to learn it in 2018

Main Paineframe
Oct 27, 2010

current terrible programmer status: for OO practice and refreshing my vague memories of Java, i made a little card game engine

and then when i got it mostly working, i realized i hadn't given any thought at all to giving it a user interface

so now i have to either learn Java graphics or learn how to turn this thing into a web application in Java

the scope of my little practice project is rapidly expanding

Main Paineframe
Oct 27, 2010

Soricidus posted:

make a text-mode ui, there must be java bindings for ncurses or w/e

good idea. splashing text around randomly sounds way easier than that other poo poo

found an pure-java terminal output library. i'll throw together a basic abstraction layer so i can easily change the UI later, and then toss that library on top

Main Paineframe
Oct 27, 2010

perl is good if you're writing something that you know someone you hate will have to maintain

Main Paineframe
Oct 27, 2010

anatoliy pltkrvkay posted:

i assume react is probably not any better, but my knowledge of vue is that it turns any js traceback into a giant pile of inscrutable utility loader functions, half of which are anonymous. trying to figure out which levels are poo poo i should care about (our code rather than vue's poo poo) is a painful and tedious process, and the sentiment of our frontend devs is that they have no idea what to pay attention to either.

i do not understand how or why the stack that arguably has the best live debugging tools around has apparently gone out of their way to then make those tools unusable

this is basically every js framework and library

on the other hand, if you don't use frameworks or libraries, then you're writing entirely in vanilla javascript

the grass is always greener on the other side

Main Paineframe
Oct 27, 2010

ratbert90 posted:

Node is trash and I haven't found a compelling reason to ever use it.

basically every javascript tool these days requires it

Main Paineframe
Oct 27, 2010


single-page (web) applications, presumably

this is the first i've heard of them dying out, though

Main Paineframe
Oct 27, 2010


It actually has gotten drastically better than it used to be*

*as bad as it is now, it used to be a lot worse

Main Paineframe
Oct 27, 2010

mystes posted:

Isn't the whole reason that SPAs are so popular that it's much easier to be lazy and keep the state in the browser? At least SPAs are less horrible than that Seaside continuation bullshit that people keep reinventing.

nah, it's just because they think it looks nicer

Main Paineframe
Oct 27, 2010

reminds me of the time i was told to see what i could do to improve the performance of a web frontend because everyone thought the javascript was taking too long to load and display stuff

after i examined it to see what was going on, i responded that i wasn't going to bust my rear end cutting a few ms off the javascript when the server was taking literally ten full seconds to respond to requests

Main Paineframe
Oct 27, 2010

Space Whale posted:

I also somehow on my own frankenstein's monster'd a website together except it's two 'branches' that diverged some 2 years ago. And it's an ancient ASP.NET and jQuery as gently caress monster mash of a web app.

Fuckin Spooky.

Also it's going to become customer facing when it really wasn't before except in minimal ways and there's basically no manpower to do security audits or even get security requirements :psyduck:

Did I mention this is aviation related?

high-five, garbage aviation-related software buddy

hopefully you'll get lucky and it'll take the customers a couple years to realize there's no security

Main Paineframe
Oct 27, 2010

aardvaard posted:

the problem is web, not js. you can write your frontend code in whatever language you want and it'll still be unmaintainable garbage because it's web dev and that's just how it be.

too bad it's basically the only reasonable way to write something that works cross-platform these days

Main Paineframe
Oct 27, 2010

the marketing department desperately wants an app because having your company name and logo in someone's home screen or app drawer is way more prominent than having it in the bookmarks section of the browser

it's got nothing to do with what users want

Main Paineframe
Oct 27, 2010

Powerful Two-Hander posted:

rude

pretty sure that's how this actually used to work but with added batshit around the edges. xml would have one advantage which is that the model binder wouldn't need specific id/name values to work

i have like four layers of prefix wrappers going on now, it's crazy.

i envy the fact that you can talk about xslt in the past tense

it's unquestionably the worst thing I have to deal with at my job

although with "cram xml into a database" coming up soon, the title of worst might end up with some real competition

Main Paineframe
Oct 27, 2010

CRIP EATIN BREAD posted:

we have a javascript application that runs on the front-end, and a java backend (which is a wayyyy larger).

javascript app takes 15 minutes to compile.

java app, with all the unit tests, integration tests and acceptance tests: 3 minutes.



javascript (and javascript programmers) was a mistake.

javascript doesn't need to be compiled

go yell at your front-end developers for introducing some dumb garbage to their setup

Main Paineframe
Oct 27, 2010

maintaining a large xslt-based project is living hell

unless there's some kind of tooling that makes it easier to deal with, but if so, we don't use it here

it's just notepad++ and "find in file" all the way down

Main Paineframe
Oct 27, 2010

today i discovered an empty value somehow getting read into a variable as "undefined"

no, not undefined. a string whose value was "undefined"

thanks, javascript

Main Paineframe
Oct 27, 2010

Chalks posted:

js string concatenation does this for some dumb reason. i'd love to know who genuinely wants undefined + "" to result in "undefined".

nice

the best part is that it's a huge pain to debug because even if you check the value of the variable, the only thing to indicate that anything is amiss is the quotes

Main Paineframe
Oct 27, 2010

ultimately, the only correct search results are the ones the user actually wants to see. but it's impossible for a user to directly beam their actual intentions into a system, and even if it was, it's impossible for the system to understand whatever vague unbounded poo poo is going through the user's head

sometimes i want to search for a specific citation from a specific source on a specific date. sometimes I want to search for "I vaguely remember hearing about an article on this subject five years ago, I'm going to mash somewhat-related half-remembered search terms in until I see something that looks familiar"

the ideal search system depends on what kind of information you store, what kind of user you expect to be using the system, and so on. it's a UX decision first and foremost, not really a code decision...if you live in a magical utopia where everyone does what makes sense and managers always stop to think things through

Main Paineframe
Oct 27, 2010

AggressivelyStupid posted:

what is the actual use case for SharePoint, because I'm like 90% certain what we're doing isn't it

it's when a company wants to create a little internal website for the company intranet, but wants to spend as little effort on it as possible and doesn't care if it's actually useful or even usable

Main Paineframe
Oct 27, 2010

TheFluff posted:

why do people not use interactive debuggers? literally my first instinct when i'm asking myself "hey hold on what's going on here" is to launch a debugger on it. meanwhile when i'm pairing with my coworkers they, like, start running tests and adding print() statements to poo poo, and when i ask them "hey can you run it in a debugger" they go "uuuuh, haven't really gotten around to setting that up...". even really experienced people who are definitely better programmers than me do it. weirds me the gently caress out.

in my experience, a lot of people just haven't ever learned to use one. and once people start actually coding, they think they're too busy (trying to fix their broken code) to set aside some time to learn how to use helpful tools

programming classes and programming courses and programming books will all teach someone how to sling lovely code, but I've never seen one even mention debuggers. debugging with log statements or whatever is simple enough that most people can come up with the idea on their own the first time they ever have to debug something, but in order to realize the power of the debugger you need to either look it up or exercise some basic intellectual curiosity

Main Paineframe
Oct 27, 2010

when I get roped into helping people debug something, I teach them to use the debugger first thing, because gently caress you if you think I'm going to puzzle out what your loving pile of lovely javascript does without it. if they want my help, they're gonna have to press f12, because I'm not going to figure anything out by looking over their shoulder at the single function that's misbehaving

Main Paineframe
Oct 27, 2010

at least the graphql website does a decent job of telling you what it does and why you might want to use it

usually it takes a while to figure out what the point of these flavor-of-the-month js libraries even is

who in the gently caress even has the free time to keep up with all these new tools. are most front-end devs unemployed or something?

Main Paineframe
Oct 27, 2010

eschaton posted:

uh, the web browser itself makes a transition when a user clicks a link

why would there need to be JavaScript involved in that at all

because javascript is the future, maaaaaaan

Main Paineframe
Oct 27, 2010

just learned about functional css/atomic css

holy poo poo, it is absolutely the worst css-related idea I've ever heard

though now that I think about it, I can't think of any good css-related ideas

Main Paineframe
Oct 27, 2010

it sucks that webkit is literally the closest thing to a good, actually-cross-platform environment to write a cross-platform app in, but when it's the best we've got it shouldn't be shocking that people use it

especially considering the rise of mobile

Main Paineframe
Oct 27, 2010

that's how I felt dealing with git at all for the longest time, before I realized that it was just completely unsuitable for small projects and massively overcomplicates simple tasks

Main Paineframe
Oct 27, 2010

ie gave us border-box sizing, css grid, and a bunch of other sensible css layout stuff long before the other browsers reluctantly adopted them

Main Paineframe
Oct 27, 2010

oE))O((3 is the one you really have to watch out for

Main Paineframe
Oct 27, 2010

hackbunny posted:

if anyone thinks I've been insulting them, their work or their tools, they should stop being insecure little fucklets and maybe try to learn something from my posts, starting from the idea that if your job requires programming you should get better at programming

the thing is that i never want to get better at the kind of programming i actually do for my job, because that's the poo poo i already slog through all day long. if i'm going to do something with my spare time besides play video games, i want it to be new and interesting. also, maybe i'll learn enough that i won't have to be a fuckin Javascript jockey my whole life

that's why i spent half the day yesterday buried in 6502 manuals trying to learn assembly language via NES homebrew

Main Paineframe
Oct 27, 2010

gonadic io posted:

perhaps i'm revealing that i'm not old enough to have seen this before, but it feels different to me. actual programming with actual programming languages (mostly python) is being taught in the 11-16 schools. yes this could have happened before but it was rare and not part of the actual curriculum. i did turtle graphics then, and some poo poo with office and SQL. the first time I actually write real code was only in uni. idk we'll see.

i took visual basic, C, and webdev classes in high school, and a 3d graphics course in middle school

stuff like that was usually small, limited enrollment, and tended to be in special programs, though

but i grew up in the deep South, so I don't know what it was like in New England or California. it's hard to make sweeping statements about US schools because the system is insanely decentralized, so curriculum can vary widely by state or even by district

Main Paineframe
Oct 27, 2010

Quackles posted:

Wouldn't the code escrow service ask for a docker container?

the contracts are being written by MBAs and lawyers, neither of whom are smart enough to ask for this

it's just source code, how hard could it possibly be to use? if the programmers ask for anything more than that they're probably just being lazy whiners who aren't team players

Main Paineframe
Oct 27, 2010

my experience with the lawyers who write contracts for buying enterprise stuff is that they don't get anything right ever, and get completely savaged by the sellers every time when it comes time to actually try to enforce the contract they wrote

Main Paineframe
Oct 27, 2010

Votskomit posted:

What is a consultant anyway? It could mean a coding consultant or a McKinsey consultant?

management doesn't think anyone currently on payroll knows the answer to the questions they have, and they don't want to hire someone permanently to answer those questions, so they hire someone on contract (either a freelancer or via a consulting company) for several times what they'd pay an actual employee

usually it's either
1) a former employee who got laid off only for management to later realize that they had critical knowledge no one else had, or
2) some MBA dumbass who's getting paid five times your annual salary to say poo poo like "have the coders adopted ChatGPT? it can increase their productivity by 5 to 10 percent" or "has the team tried being more agile?". and it's basically guaranteed the bosses will listen to their poo poo since they're paying so much for the answers, and since the answers are coming back in standard business terminology

Adbot
ADBOT LOVES YOU

Main Paineframe
Oct 27, 2010

Powerful Two-Hander posted:

I barely opened a textbook doing my entire degree I'm sure as hell not gonna open one now to learn about how "it is important to know what you're doing but understand that nobody does" or "organise yourself into houses based on the sorting hat, that hat is your product owner now" or "make sure chairs are banned, because meetings can't happen unless you're floating" and finally ending up with "all estimates are wrong, but if you do the equivalent of the area under a curve model for integration you will Zeno's paradox your way to a functioning system"

90% of agile and safe are just made-up meaningless nonsense to hide the fact that the other 10% is "all those missed deadlines are the team's fault for failing to flexibly self-organize, management is never the responsible party"

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply