|
Data Graham posted:What I really enjoy is big robust APIs that sporadically return loving 500 errors. AdWords I'm looking at you Man don't even talk to me about AdWords. The supposed bread and butter of Google's entire massive empire and the API is unusable. I spent at least a year of my life trying to automate a big Adwords related thing. I can't remember which random deeply nested endpoint it was expects a value in 1 millionth of a penny. Do that math wrong, use 0.1 millionth of a penny like an idiot, and get charged $ out the bum.
|
# ¿ Oct 2, 2017 23:57 |
|
|
# ¿ Apr 29, 2024 18:07 |
|
I really liked the Google Maps API, I used that recently. Works pretty well but the radius stuff is a bit suspect. No way to get visible results, some math is required and then you have to loop through the results to see if they're really on the screen. Also the radius is more like an oval.
|
# ¿ Oct 3, 2017 17:48 |
|
Wait a minute that was the Yelp api.
|
# ¿ Oct 3, 2017 17:55 |
|
Grump posted:at work we have a coding test for interview candidates. The hard part of that test is trying to figure out what different jQuery functions used to do.
|
# ¿ Oct 12, 2017 07:25 |
|
Lumpy posted:Yeah, I'd fail the "do it w/ jQuery" part because it's been so long. Doing it with jQuery is easy, you just pretend jQuery in't on the page.
|
# ¿ Oct 12, 2017 21:03 |
|
The Dave posted:Current Status: Sitting on a demo review of a new product for a large company and stakeholder is questioning the limited scope for the MVP when we're a month out from release and he's known the scope for months. Assert that you are on track for release despite numerous challenges with a product at a high level of quality. Risking a change to the target scope could result in delays, re-assessment should occur in one months time. Tell them Nolgthorn from the internet said so.
|
# ¿ Oct 18, 2017 03:17 |
|
kedo posted:So my first real-world React app has reached its first functional milestone It will certainly remain clean and fast and organised as the codebase grows. I'm being sarcastic! Congratulations on the milestone, feels good. You might check out the modern framework thread if you aren't there already.
|
# ¿ Oct 18, 2017 21:52 |
|
I prefer to structure my components into areas of functionality and pages. Directories such as 'page-messages', 'page-accounts', and subdirectories within those. I feel like there's too much emphasis made on component re-usability. When in 90% of cases I've experienced, they are never re-used anywhere.
|
# ¿ Oct 18, 2017 22:24 |
|
The best part about open source software are all the wonderful feature requests you receive. Therefore allow me to contribute the idea, not code mind you, that I be able to monitor multiple groups at the same time with the same process.
|
# ¿ Oct 25, 2017 14:39 |
|
Looks basically like the job description of a professional blogger, there's tons of people who do that kind of work. I bet many would enjoy $17/hr to do it too.
|
# ¿ Oct 27, 2017 19:16 |
|
I'm trying to get secure Websockets working, it's a Node project and I'm using the ws library along with express.code:
But the ws library doesn't let me do that, I have to provide it an https `server` option to get secure websockets. I know I can also declare a second http version of the site as well. Then I've got both an http and https version running, and my host is handling http->https on top of that? I'm imagining the number of `if (env === 'production')` `if (env !== 'production')` statements I'm going to have to use and the whole thing feels wrong in the first place. I'm starting to have fever dreams about forking the ws library and making some hacky version out of it. Please tell me where the stupid happened to me.
|
# ¿ Dec 22, 2017 21:01 |
|
kedo posted:Why do :before and :after pseudo elements need a content:""; to be displayed, even if they don't actually have any content? What's the answer to this one? It seems like it wouldn't break anything for the browser to just assume an empty string.
|
# ¿ Jan 3, 2018 22:42 |
|
Grump posted:I just started working on my personal site, and I've been playing around with the idea to make every part of the site have an icon with a small description that can be clicked on and will pop-up a modal with more information. All the changes you made is worse than the original design. Looking at the icons it seems clear to me I can click in those areas, when I hover I would expect the cursor to change around a wide area, a huge area, as big as possible for each of them so that they are touching each other. I now see that what was clickable is actually a relatively small area, since you changed them to buttons. The buttons look harder to click and makes it feel unappealing to do so. I'm not submitting a form every time I click on something so why are they buttons. Not being able to click on the icon as well as the text looks strange since they are related. When an accent was suggested, I don't think they meant use two wildly different colours at once. But instead use a shade and a colour or two shades of the same colour. I'm concerned about your page now.
|
# ¿ Jan 16, 2018 05:25 |
|
There should have been a checkbox or a confirm alert something
|
# ¿ Jan 16, 2018 20:03 |
|
I'm not gonna get all conspiracy here but there's no way a missile alert for an entire state could have been triggered by a single person acting alone. That whole thing was theatre done on purpose by the reptilians and deep state and you know it.
|
# ¿ Jan 17, 2018 01:03 |
|
I've built a whole API based on Websockets. I built loosely around some specification I found online about a best practice for communication. Where if you wanted to wait for a response you sent an `id` attribute along with the request. Then there was also a `method` attribute which was required. There was some other stuff like how to format error responses and how I should allow arrays of requests, which could be run in any order. What was I looking at. Because at the time there was no javascript library available that did all that stuff, and I'd like to either check again or build one.
|
# ¿ Jan 21, 2018 18:51 |
|
In this case it's a notification api, so I had to either use HTTP and poll the server all the time, or use Websockets. Websockets are pretty sweet rear end at handling idle connections, nearly the same as no connection at all, and I get to send data to the client. So I'm poo-pooing HTTP.
|
# ¿ Jan 21, 2018 19:11 |
|
WAMP! I was looking at WAMP. http://wamp-proto.org/ http://wamp-proto.org/static/rfc/draft-oberstet-hybi-crossbar-wamp.html On second thought, I was looking at a different subprotocol before I think because this is nothing like my API. Actually I think it's JSON-RPC and now I'm conflicted about what I should be using. http://www.jsonrpc.org/specification Nolgthorn fucked around with this message at 01:31 on Jan 22, 2018 |
# ¿ Jan 21, 2018 19:26 |
|
PantsBandit posted:Hey guys, I am VERY fresh with html, but I find it really fascinating so far. I think your question is about bundled javascript, which can look more complicated in its final form than it is in the source code. There are many bundlers, they are synonymous with writing client side javascript these days. Popular ones include Webpack, Browserify, and (my personal pick) Rollup. Jquery is very outdated and should almost be considered an antipattern at this point. It was from a time when Javascript was a lot harder to write and ran a lot less reliably across browsers than it does now. Most javascript libraries can be found on https://www.npmjs.com/ though technically mostly it's for server side Javascript instead of client side. There's a lot that build their own webpages or just host their code on Github. So it's best to use web search and read stackoverflow if you're looking for something. On second thought; Jquery might be awesome if all you want is to plug and play something because there is a hell ton of Jquery plugins out there, way too many. Nolgthorn fucked around with this message at 17:27 on Jan 27, 2018 |
# ¿ Jan 27, 2018 17:22 |
|
I like CSS. I can't imagine what could be done to make it a lot better, 'less' is better, but it's awful when you try and set up a watcher on it, or use middleware to render it live which causes all kinds of complications once you want to go to production. 'sass' isn't any good when used in node because it doesn't have a javascript implementation. People complain about CSS but I can't figure out what they want instead. Variables and some sort of modular architecture is all I need. You don't need BEM, you don't need computed namespaces. The language itself is built on namespaces.
|
# ¿ Jan 28, 2018 22:29 |
|
Ape Fist posted:I think some very basic variables and if statements would really help a lot tbh. CSS variables are here and there's a really really awesome calc function. I'm just not sure how backwards compatible those things are... not at all I suspect. Probably have to continue compiling less for a while. Less isn't as good you can't do `width: calc(100% - 100px);` for example. I've been thinking about trying http://www.myth.io/ instead of less.
|
# ¿ Jan 28, 2018 23:52 |
|
What makes me feel like I can't live without less is nested styles.
|
# ¿ Jan 29, 2018 12:31 |
|
huhu posted:Met a guy at a meetup last night who was building a full stack JavaScript site. He had a chart he wanted to group the data by month and I said just do a SQL query... Pretty straight forward I thought. He wants his database to be "dumb" and just fetch the data from it. So he's using vanilla JS with Moment to write queries. Is this actually a thing now? He was also against stuff like Django with its orm. Tell him he should make the data grouping into a microservice with an API.
|
# ¿ Jan 31, 2018 19:28 |
|
kedo posted:In the future there is only one language and that language is Javascript. All y'all just wasting time and energy worrying about snakes and Jamie Foxx. True. But it's rude to point out.
|
# ¿ Feb 1, 2018 00:54 |
|
I've got a sweet web based email reader. It loads the html email client side, parses it, traverses everything to ensure scripts are stripped out/links are `target="_blank"` stuff like that. Inserts some default styles into the top of the thing, then dumps it all into an iframe. I'm wondering if there's no better way than this: code:
I've looked all over the place and can't figure out how to say "hey iframe, use this document instance." I could dump the html into the iframe directly and mess around with it there but I can't have it load until I've finished sanitizing. I could use `createElement('iframe')` I think and then insert that element onto the page. But I'm using some fancy client side framework called Vue and I think using `appendChild` to dump something into the DOM myself would be frowned on.
|
# ¿ Feb 1, 2018 22:52 |
|
Tei posted:Stripping HTML so is safe is not a trivial task. I would not write my own code to do it, and would use a very good library for it. It's cool to do it if you have a dom parser turn it into element nodes, then you can traverse the element nodes and know exactly how everything will render. Especially if you're doing it in the browser where it is rendered. So it's no problem. If you're doing it server side then you should also pay attention to comment nodes, because there are some browser tricks that can hide stuff in them, mostly for ie6. Nolgthorn fucked around with this message at 13:38 on Feb 2, 2018 |
# ¿ Feb 2, 2018 13:36 |
|
Best piece of advice I heard for UI was carefully consider or research exactly what the user wants to do and make it basically the absolute only thing on the page.
|
# ¿ Feb 2, 2018 16:12 |
|
I had experience trying to put something out on the open market, and I way way way way way overestimated both the visual comprehension skills of the average user and their resolve to figure anything out. After several revisions the final product was literally one button and that helped a lot. I'm not sure how websites that even force users to 'sign in' make it anymore. Probably helped a lot by single sign on. I'd be curious to find out the stats regarding how many users sign in with single sign on vs how many create an account using email. For websites that offer both. Nolgthorn fucked around with this message at 19:02 on Feb 2, 2018 |
# ¿ Feb 2, 2018 18:59 |
|
It's mainly that layout design and programming are very different skills, one being purely logical and the other purely artistic/creative. There are people out there who can do both though it's rare and those people should be hired immediately. Also someone please hire me.
|
# ¿ Feb 2, 2018 21:33 |
|
Everyone stopped using them to avoid arguments with their coworkers about where they're appropriate to use.
|
# ¿ Feb 4, 2018 16:52 |
|
Using HAML and then PUG all my elements look like `.header` `.article.is-unread` `#content` it's nice. The new named elements aren't as versatile as a div, I can't put them where I want. I can't see much difference between `section` and `.section` it feels like a bot would ignore all that stuff. I think Google mostly cares about linkbacks and adwords. When I am on a large project with a bunch of devs it's element soup, too. With what seems like hundreds of nested divs, would putting a `section` or `nav` element in make a difference? Nolgthorn fucked around with this message at 09:48 on Feb 7, 2018 |
# ¿ Feb 7, 2018 08:13 |
|
No client side validation at all, there are enough pointless queries made to servers that one out of ten failing isn't a big deal. Just do validation on the server and return a bad request response.
|
# ¿ Feb 8, 2018 03:16 |
|
It sounds like the crux of the exercise is the polygon mapping behaviour. You may need to union your own polygons, before drawing them into maps? It does seem possible that as someone else mentioned clockwise/counter-clockwise might be the trick.
Nolgthorn fucked around with this message at 18:38 on Feb 9, 2018 |
# ¿ Feb 9, 2018 18:36 |
|
It's Javascript heavy but you need a list of all polygons and then output one polygon. It's an interesting challenge but it's possible that we're making the solution out to be more complex than it is supposed to be. This solution won't help at all if the problem is related to your 2d polygon being face-down. These guys are talking about polygon merging here. https://stackoverflow.com/questions/2667748/how-do-i-combine-complex-polygons
|
# ¿ Feb 9, 2018 18:45 |
|
I had challenges for jobs where it ended up being exceedingly complex and I thought while writing it "maybe they just want to see how far I get" so I'd sit down and write a bit about what I was thinking and where I got stuck. I never got those jobs.
|
# ¿ Feb 9, 2018 20:31 |
|
Yesterday I was developing something and I added a `setTimeout` to my code. Compilation started warning about how `timers` was not defined and when running it in my browser it didn't work. It took quite a bit of frustration before discovering that Visual Studio Code had automatically placed `import timers from 'timers';` at the top of my file. I have no idea why. Anyone have any clue, is that a new feature? How and what is `timers` and why is it related to `setTimeout` it looks like a node thing? I couldn't find any setting I could turn off.
|
# ¿ Feb 13, 2018 02:06 |
|
I tried to learn Python, once for a job challenge and another that I wanted to develop an application for raspberry pi. I was struck by how the language doesn't let you break up lines. Gimme my brackets back.
|
# ¿ Feb 14, 2018 16:54 |
|
PHP/Perl CGI all these things are still very popular although not for any actual programming. right?
|
# ¿ Feb 14, 2018 18:35 |
|
What I meant is those tools are used commonly as a delivery layer, for an application. Such as a single page application to the client, or as a proxy to an application located more deep inside the network as suggested earlier. I'm pretty sure something like that is how my host is able to offer TLS without much effort for me.
|
# ¿ Feb 14, 2018 20:04 |
|
|
# ¿ Apr 29, 2024 18:07 |
|
geeves posted:Facebook stuck with PHP because some psycho wrote a PHP -> C++ transpiler that majorly increased the performance. I hope they are rich now and living on an island because they destroyed humanity
|
# ¿ Feb 15, 2018 06:22 |