|
Shaggar posted:razor components razor components are neat, but they aren't going to save you from the ternary operator
|
# ? Apr 3, 2019 14:50 |
|
|
# ? Apr 26, 2024 19:20 |
|
akadajet posted:lol I had to explain observables to a jr backend dev messing with angular for the first time yesterday I feel fairly strongly in Angular there are like 3 different ways to do everything so you need someone who actually knows what they're doing to write down how you are going to do it and make everyone do that. Otherwise someone is going to go wild with Observables and create huge memory leaks. One my juniors wrote something like this the other day though code:
|
# ? Apr 3, 2019 15:05 |
|
ah yes, the developer who is "obsessed with performance" and will happily write a bunch of horrible code to make everything more efficient you end up with just the horrible code
|
# ? Apr 3, 2019 15:07 |
|
Symbolic Butt posted:actually the more correct terminology is conditional operator I wish somebody would popularize another ternary operator so pedants like us could even harder about it!
|
# ? Apr 3, 2019 15:10 |
|
CPColin posted:I wish somebody would popularize another ternary operator so pedants like us could even harder about it! (,,)
|
# ? Apr 3, 2019 15:16 |
|
akadajet posted:razor components are neat, but they aren't going to save you from the ternary operator ternary operator is fine
|
# ? Apr 3, 2019 15:17 |
|
gonadic io posted:(,,) This operator needs a bra that lifts and separates
|
# ? Apr 3, 2019 15:28 |
|
Sagacity posted:ah yes, the developer who is "obsessed with performance" and will happily write a bunch of horrible code to make everything more efficient is it actually any faster though I'd assume there's l->r evaluation for anded conditionals but maybe that's not a thing in angular, maybe, too lazy to look it up
|
# ? Apr 3, 2019 15:38 |
|
CPColin posted:I wish somebody would popularize another ternary operator so pedants like us could even harder about it! i think perl's regex substitution operator (s/pattern/replacement/) is technically sorta ternary, but the first argument is implicit (it substitutes on the default variable $_ unless you use an other operator to tell it what variable to substitute on). or you could consider the options that come after the last / to be the third argument, i guess. sql has a few of them too, like "poop BETWEEN fart AND butts". perl6 (which is arguably an operator-oriented programming language) also has meta-operators, some of which take another operator as the first operand and then two regular operands, but unfortunately nobody cares about perl6, which is sad because it seems loving hilarious. just look at this poo poo: https://docs.perl6.org/language/operators
|
# ? Apr 3, 2019 15:38 |
|
Sordicius' posting gimmick, from 1995, is that every internet service should come with a Windows client application written in C++ using MFC React is very good and Angular is fuckawful. The reason you see those conditional operators everywhere in React code is because JSX defines expressions and not statements, and the conditional operator is what you use when you want an if-statement but can only use expressions. That being said if a JSX expression is getting gnarly you can factor out parts of it into functions and variables, just like you would with any other sort of expression. There's nothing magical about a function that returns JSX elements, nor is there nothing magical about JSX elements as a data type for that matter, they're just JS objects ultimately. The syntax is weird yes, but weird syntax being the biggest problem with a UI toolkit is a very nice problem to have, particularly since it is much more consistent and predictable than every other toolkit due to its unique design. Also make sure you use TypeScript and Parcel in your project as well. Don't use Redux though it is terrible. Sapozhnik fucked around with this message at 15:42 on Apr 3, 2019 |
# ? Apr 3, 2019 15:40 |
|
Angular is fine.
|
# ? Apr 3, 2019 15:57 |
|
our company colors are shades of blue like most companies with no originality i bring this up because our ba/pm just asked if we can make the visited links on our website bright red so customers can clearly tell they already went to that page
|
# ? Apr 3, 2019 16:02 |
|
Aramoro posted:Angular is fine. Angular 1, 2, or 4?
|
# ? Apr 3, 2019 16:04 |
|
Sapozhnik posted:Sordicius' posting gimmick, from 1995, is that every internet service should come with a Windows client application written in C++ using MFC I believe the gui clients should be written in java actually. swing and javafx are both acceptable. except on phones where they should use the native gui toolkit. I realise this makes me overlap with a bunch of better posters’ gimmicks but I didn’t choose these opinions they’re what I actually believe
|
# ? Apr 3, 2019 16:11 |
|
Sapozhnik posted:Angular 1, 2, or 4? 7+ Maybe fewer breaking changes! Well I can dream anyway.
|
# ? Apr 3, 2019 16:17 |
|
the web stack should only be used for online apps in case an online app makes sense, and also only because it's the only available tech to make apps that run in a browser. web developers should not be allowed to make desktop apps
|
# ? Apr 3, 2019 16:24 |
|
use a native client or a browser client, whatever, but follow the god damned ui conventions of your environment ! ! !
|
# ? Apr 3, 2019 16:25 |
|
Zlodo posted:the web stack should only be used for online apps in case an online app makes sense, and also only because it's the only available tech to make apps that run in a browser. web developers should not be allowed to make desktop apps We're very much in the 'delivering a desktop app in a browser' kinda area which is where a lot of our pain comes from. But it's also the only way a lot of our customer will accept an application now, one of our recent contract wins specifies no installed components on the client which is a massive pain in the rear end for some of our legacy components and CTI etc.
|
# ? Apr 3, 2019 16:29 |
|
Soricidus posted:I believe the gui clients should be written in java actually. swing and javafx are both acceptable. thread title checks out
|
# ? Apr 3, 2019 16:59 |
|
TheFluff posted:just look at this poo poo: https://docs.perl6.org/language/operators
|
# ? Apr 3, 2019 17:08 |
|
someone give a chutzpah award to my pm who just wrote the following to the client: "we will not go into detail about how this feature will work, in order to avoid ambiguities"
|
# ? Apr 3, 2019 17:32 |
NihilCredo posted:someone give a chutzpah award to my pm who just wrote the following to the client: lol
|
|
# ? Apr 3, 2019 17:40 |
|
NihilCredo posted:someone give a chutzpah award to my pm who just wrote the following to the client: that's incredible
|
# ? Apr 3, 2019 18:29 |
|
Private Speech posted:is it actually any faster though Yeah, short-circuit evaluation. That's an idiomatic way to skip writing "if (node.elem.turds) { buttPermission = node.elem.turds.length > 0; }". OTOH, all that saves you AFAIK is a line or two of code or the possibility of NPEs from checking node.elem.turds.length before checking if node.elem.turds is even defined, I don't think it's significantly faster.
|
# ? Apr 3, 2019 19:00 |
|
redleader posted:use amber, you sick freak
|
# ? Apr 3, 2019 19:00 |
|
the best ternary operator is ?: in php
|
# ? Apr 3, 2019 20:25 |
|
welp, I've sent out eight remote Django job applications on Ziprecruiter (edit: and one on LinkedIn). Now all I have to do is wait and fill time with leisure activities I guess if I don't hear anything by a week, I'll settle for remote call center work or something instead. I could learn NumPy and SciPy, but I don't really want to do it unless I can get a job doing it and which sounds interesting since I have a math minor and there don't seem to be any remote jobs available on Ziprecruiter that don't require a master's in analytics or statistics, or they require four years of experience to start with If I can't find anything, I could launch my business anyway even though I can't get a Home Occupation License and see if I can make enough money to move out galenanorth fucked around with this message at 23:46 on Apr 3, 2019 |
# ? Apr 3, 2019 20:48 |
|
Sapozhnik posted:Angular 1, 2, or 4? Angular 1 is a real piece of work. It boggles my mind that anybody voluntarily used it, or achieved anything with it, prior to the 1.5 release. After that it was possible to retain a bit of sanity by exclusively using components and one-way bindings but it still has a hopelessly overengineered architecture and the absolute worst documentation. Every page in the AngularJS docs makes perfect sense if and only if you already understand everything about AngularJS. Every example is so convoluted that it's impossible to grasp what they're actually trying to demonstrate. To this day I have still not been able to find the page in the docs where they explain the full list of possible binding sigils and what they all do. And I love how the module system is perfectly designed to flummox any bundling system more complicated than "manually concatenate all the source files in the right order". E: Angular 2+ might be great, I don't know, we've moved to React. Doom Mathematic fucked around with this message at 20:59 on Apr 3, 2019 |
# ? Apr 3, 2019 20:57 |
|
Yeah I had the "pleasure" of using angular 1 to build a mobile app using ionic. Would not recommend.
|
# ? Apr 3, 2019 21:38 |
|
i've said it before, and i'll say it again react is cool and good typescript is cool and good angular is flaming hot garbage. idc what version you're talking about
|
# ? Apr 4, 2019 01:20 |
|
typescript's type system is stupidly powerful. honestly i've never used another language with nicer unions:code:
of course, it's still javascript, so it'll run slow and have weird edge cases. and also the type system is full of unsafe holes. but it works well enough for what it is
|
# ? Apr 4, 2019 01:34 |
|
I'm not 100% sure about why React is useful. This Packt textbook starts by talking about the view, or the template in Django, and reduction of boilerplate code, but Django already has a template inheritance system built in for that. Maybe it's that it binds the inheritance of the HTML, the inheritance of the JavaScript, and the inheritance of the CSS into one inheritable app or widget. If that's true, I can see how that might be useful for something like creating custom form widgets without having the code in three separate documents. I see a lot of job listings with React in combination with Django, though, so I'll probably try it anyway and see where I end up.
galenanorth fucked around with this message at 01:47 on Apr 4, 2019 |
# ? Apr 4, 2019 01:42 |
|
galenanorth posted:I'm not 100% sure about why React is useful. This Packt textbook starts by talking about the view, or the template in Django, and reduction of boilerplate code, but Django already has a template inheritance system built in for that. I see a lot of job listings with React in combination with Django, though, so I'll probably try it anyway and see where I end up if you're building a boring data munging application based on the fundamental concept of forms in and tables out, it's really not an improvement over django at all, especially since you get a metric fuckton of boring poo poo (looking at you, rendering of forms/validation of forms/etc) for free with django that you don't get out of the box with react. django is very good at forms and viewing the stuff that you input with those forms as static html, while react is more of a general-purpose gui toolkit. so, as soon as you want to start having any kind of dynamic elements on the page that require some kind of javascript logic (like almost any kind of interactive UI element that isn't a html builtin one), then you should switch from django templates to react. don't try to mix the two; having two different gui frameworks is far worse than either one is on its own. just replace your django serializers/forms and views with ones from rest framework and you get almost as much nice poo poo for free as you do with plain old serverside rendered django. your models and managers can stay the same.
|
# ? Apr 4, 2019 01:52 |
|
Surprisingly little knowledge about the basics of SSL for some developers, my banky client is deploying to AWS ECS with a load balancer with a public cert on that is ok but the upstream connection to Docker is using self signed certs with no attempt at following RFC2812 and setting subjectAltName properly. The main TCP connection appears to function but the HTTPS health check is failing in many different forms. A bit weird though, the TCP connection should be rejected too. In TV news I've upgraded from BSODs to RSODs for device issues on initial startup, Microsoft doesn't have a smiley for those so I picked one randomly. LG TV's are basically a giant QT.io app with QtWebEngine running CEF for the browser engine. I wonder if their app is coded like their examples with half of everything commented out multiple times. There was reported instability with some signage campaigns after a few hours, I see random APIs just stop working. They presumably are using Chrome's MessagePort interface to create an asynchronous API from JavaScript to the main app, instead of using Promises as their code is ancient they have a pair of callbacks for success and failure. After a hour or so the callbacks for some modules just don't bother getting called at all. Yay, wrapping every single drat API call in a timeout is awful. I have a callWithTimeout() wrapped for use with fetch() but the juggling with Promises makes the code just as awful when simply inlined. JavaScript code:
MrMoo fucked around with this message at 01:59 on Apr 4, 2019 |
# ? Apr 4, 2019 01:53 |
|
angular 1 sucks much rear end -signed
|
# ? Apr 4, 2019 01:59 |
|
ime react is cool because it provides dirt simple integration between application state and the user interface, and jsx is a reasonable way to model it you kinda gotta buy into react's conventions to make it work, but it can be worth the effort. use it right, it can make a lot of glue code go away ymmv ofc
|
# ? Apr 4, 2019 02:00 |
|
angular 7 works just fine vue looks reasonable as well blazor looks like something you'd hit some brick walls real fast with
|
# ? Apr 4, 2019 02:05 |
|
you know. like a tesla
|
# ? Apr 4, 2019 02:06 |
|
DaTroof posted:ime react is cool because it provides dirt simple integration between application state and the user interface, and jsx is a reasonable way to model it I was talkin trash on React but realistically I accomplished more with it in two days than I did over a much longer time period with jquery years ago when I was using that so it must be ok also I'm poo poo at javascript so that probably doesn't help
|
# ? Apr 4, 2019 02:19 |
|
|
# ? Apr 26, 2024 19:20 |
|
abigserve posted:I was talkin trash on React but realistically I accomplished more with it in two days than I did over a much longer time period with jquery years ago when I was using that so it must be ok being good at javascript doesn't help either. i'm not totally convinced that such a thing even exists. douglas crockford comes closest, and just look at how miserable it makes him as a general rule, anything that abstracts the javascript away from you is a good thing. back in the day it was jquery. today it's react and typescript. (today it's also still jquery if you want to avoid node toolchains, which is a reasonable thing to want)
|
# ? Apr 4, 2019 02:47 |