Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

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 $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Maximum Leader posted:

put debugger instead of console.log, it will trigger the debugger and break.

woohoo

still feels like kind of a wart, but way better than before. thanks

Adbot
ADBOT LOVES YOU

Eleeleth
Jun 21, 2009

Damn, that is one suave eel.

DaTroof posted:

i just asked another developer about running this angular app in a debugger. i was hoping there was a way to hook it into vscode. his recommendation: add a console.log line, open the chrome developer tool, search for the log line in the compiled code, and add a breakpoint there to get to the same location in the sourcemaps

that can't be my only option, can it? someone please tell me there's a better loving way

If you're talking angular 2+ then following this from the vscode docs worked for my angular shitshow of an app: https://code.visualstudio.com/docs/nodejs/angular-tutorial#_debugging-angular

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Eleeleth posted:

If you're talking angular 2+ then following this from the vscode docs worked for my angular shitshow of an app: https://code.visualstudio.com/docs/nodejs/angular-tutorial#_debugging-angular

even better, thanks. this is exactly how i was hoping to use debug from vscode

Shaggar
Apr 26, 2006

NEED MORE MILK posted:

okay so with WPF and MVVP how the gently caress is the ViewModel supposed to report stuff to the View?

so for example in my ViewModel

code:
public class ViewModel
{
     public SaveItem saveItem;

     public SaveCommand saveCommand { get; private set; } // implements ICommand

     public ViewModel()
     {
          saveItem = new SaveItem(@"poop", @"fart");
     
          saveCommand = new SaveCommand(Save);
     }

     private void Save()
     {
          try
          {
               saveItem.Save();
          
               // I need to report that things actually went according to plan here, but I can't apparently!
          }
          catch
          {
                // I need to report that things didnt save because some poo poo happened, what the gently caress microsoft
          }
     }
}
i could just loving show a messagebox in the ViewModel but that violates MVVM so how the hell

You should have properties on the view model (or another view model) that represent the state you're trying to change. When you update those properties after the save you need to do a property change notification for wpf to update them. lookup inotifypropertychanged.

If you have an auto property WPF should automatically notify and there are some frameworks that simplify this process as well.

Sapozhnik
Jan 2, 2005

Nap Ghost

Maximum Leader posted:

I like vuejs for this very simple spa I'm putting together, it's a little bit strange but I've been able to work with it. React is pretty good and anything is better than angular. I was involved in putting together an ecommerce thing in angular and that thing is the stuff of loving nightmares.


put debugger instead of console.log, it will trigger the debugger and break.

I am genuinely curious why you chose to use vue

jesus WEP
Oct 17, 2004


was there any reason knockout fell out of fashion after like 2015 other than it had been around for a year already

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

St Evan Echoes posted:

was there any reason knockout fell out of fashion after like 2015 other than it had been around for a year already

It's been around since like 2011. According to this, it peaked in 2013, i.e. it's old af

https://stackoverflow.blog/2018/01/11/brutal-lifecycle-javascript-frameworks/

redleader
Aug 18, 2005

Engage according to operational parameters

St Evan Echoes posted:

was there any reason knockout fell out of fashion after like 2015 other than it had been around for a year already

yep, it's poo poo

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

St Evan Echoes posted:

was there any reason knockout fell out of fashion after like 2015 other than it had been around for a year already

web “developers” have the attention span of a gnat so they forgot it exists about three months after it was released and moved on to something else

you shouldn’t care because web pages don’t need to run code

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

St Evan Echoes posted:

was there any reason knockout fell out of fashion after like 2015 other than it had been around for a year already

react killed all the databinding-based frameworks except for angular

Notorious b.s.d.
Jan 25, 2003

by Reene

eschaton posted:

I think they also had a PC on a VME card in the Sun 2/3/4 days and on an SBus card in the SPARCstation era; many workstation vendors did, specifically because of the “people shouldn’t need something besides the workstation for productivity apps” issue

i never saw these things

they wouldn't have been that useful, anyway, since back in the sbus era things like office suites and email were routinely made available for solaris

eschaton posted:

Sun also produced the 386i workstation, of course, which in addition to being a little more end user focused than other Suns of the day would also let you run DOS under a VM in a window or even just from the a command shell, and they cancelled the 486i very shortly before it would’ve shipped

the 386i was a cool product but it was expensive, and sunos 4 compatibility on a new cpu wasn't a killer opportunity for ISVs, who didn't get on board

i can hardly blame them for canceling roadrunner

Luigi Thirty
Apr 30, 2006

Emergency confection port.

lol i thought the sunpci software was pos that crashed randomly in windows 98 but it turns out it was the netbios driver crashing due to windows being a pos and the PC board spitting the BSOD out of the VGA port instead of to the desktop lol

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
wasted an hour because i .toLeft on an option when i shoulda .toRight

redleader
Aug 18, 2005

Engage according to operational parameters
wasted most of the day due to me fundamentally misunderstanding when and where iis and asp.net use different windows user contexts

figured out the root cause 5 minutes before home time. now i need to understand why the site is working when it really shouldn't be, and how to unfuck the different users and their permissions

i have no idea how grown-up companies manage this poo poo

silvergoose
Mar 18, 2006

IT IS SAID THE TEARS OF THE BWEENIX CAN HEAL ALL WOUNDS




python 2 has such trash http stuff

by which I mean why the gently caress are our servers still using python 2

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


turns out when I thought "I'm sure I fixed this ages ago" I was right but the branch didn't get merged into the trunk so the fixes all got removed by a later branch, oops!

nobody noticed for 18 months

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

silvergoose posted:

python has such trash http stuff

by which I mean why the gently caress are our servers still using python

silvergoose
Mar 18, 2006

IT IS SAID THE TEARS OF THE BWEENIX CAN HEAL ALL WOUNDS




well yeah it's really that I'm inheriting a python script and I should just rewrite it in something not-trash

Luigi Thirty
Apr 30, 2006

Emergency confection port.

silvergoose posted:

well yeah it's really that I'm inheriting a python script and I should just rewrite it in something not-trash

Common Lisp, op

silvergoose
Mar 18, 2006

IT IS SAID THE TEARS OF THE BWEENIX CAN HEAL ALL WOUNDS




Luigi Thirty posted:

Common Lisp, op

that sounds fun, maybe I'll give it a shoh wait it needs to be done today not "when I learn lisp"

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
(((lisp)))

Luigi Thirty
Apr 30, 2006

Emergency confection port.

silvergoose posted:

that sounds fun, maybe I'll give it a shoh wait it needs to be done today not "when I learn lisp"

2to3.exe problem solved ticket closed

silvergoose
Mar 18, 2006

IT IS SAID THE TEARS OF THE BWEENIX CAN HEAL ALL WOUNDS




FAT32 SHAMER
Aug 16, 2012



i really really really hate python and i enjoy java and swift and c# (the little bit ive learned, anyways)

i know it was from a dumb comic somewhere but i like the verbosity and the ability to write spaghetti code is much harder than in python, at least in my experience

Xarn
Jun 26, 2015
As much as I wouldn't want to have a large codebase in Python (you can pry static typing from cold dead hands), in my experience Java and C# make spaghetti more common. I blame the "everything must be an object! FREE FUNCTIONS? WHAT HERESY IS THIS? MAKE IT A STATIC METHOD ON A STATIC CLASS" approach. :shrug:

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

Xarn posted:

As much as I wouldn't want to have a large codebase in Python (you can pry static typing from cold dead hands), in my experience Java and C# make spaghetti more common. I blame the "everything must be an object! FREE FUNCTIONS? WHAT HERESY IS THIS? MAKE IT A STATIC METHOD ON A STATIC CLASS" approach. :shrug:

Yeah but that's a problem with OOP... which ends up being a billion times worse in OOP python (just look at any OOP python codebase). If given a choice between lovely c# object code and lovely python object code for pete's sake give me the c# every single time

FAT32 SHAMER
Aug 16, 2012



Xarn posted:

As much as I wouldn't want to have a large codebase in Python (you can pry static typing from cold dead hands), in my experience Java and C# make spaghetti more common. I blame the "everything must be an object! FREE FUNCTIONS? WHAT HERESY IS THIS? MAKE IT A STATIC METHOD ON A STATIC CLASS" approach. :shrug:

that could also be part of my reason for hating python, i really like OOP even with all of its flaws because it's [supposed] to be very organized and even if it means writing a lot of extra code, it's like organizing things into little boxes and it soothes my autism

scripting langs or things like lisp/haskell break my puny brain

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

we need a dead-simple service in the butt that will take users' first logins and tell them 'here's the actual services you can to use, and where you can find them',

so instead of writing a mini-app i decided to try postgREST with a four-table db. opinion 1) it's super cool; opinion 2) now i want to rewrite the actual services in postgrest

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

NihilCredo posted:

we need a dead-simple service in the butt that will take users' first logins and tell them 'here's the actual services you can to use, and where you can find them',

so instead of writing a mini-app i decided to try postgREST with a four-table db. opinion 1) it's super cool; opinion 2) now i want to rewrite the actual services in postgrest

never seen that, but at a glance it looks really useful

Xarn
Jun 26, 2015

Finster Dexter posted:

Yeah but that's a problem with OOP... which ends up being a billion times worse in OOP python (just look at any OOP python codebase). If given a choice between lovely c# object code and lovely python object code for pete's sake give me the c# every single time

Python does much less to force you into overusing OOP though. Introspection and dynamically created properties on the other hand... :devil:

HoboMan
Nov 4, 2010

terrible programmer status: the idea of making an in-house messaging app was floated as a serious idea up for real consideration. i suggested some ways we could easily build it into what we already have :unsmigghh:

HoboMan fucked around with this message at 17:37 on Jan 18, 2018

Sapozhnik
Jan 2, 2005

Nap Ghost

NihilCredo posted:

we need a dead-simple service in the butt that will take users' first logins and tell them 'here's the actual services you can to use, and where you can find them',

so instead of writing a mini-app i decided to try postgREST with a four-table db. opinion 1) it's super cool; opinion 2) now i want to rewrite the actual services in postgrest

this is like some poo poo out of a microsoft marketing glossy, please don't tell me people actually use this

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
remember microsoft access? its back, in postgres form!

Sapozhnik
Jan 2, 2005

Nap Ghost
just because a task is tedious does not mean it is unnecessary. there are so many things a hand-written rest service needs to interpose between a database and external clients:

validation and business logic. no, you can and should not loving do this in the database server using stored procedures.
interface version insulation between the db and external clients, providing versioned endpoints if needs be.
augmenting certain collection views with lists of related entities so that your clients don't sit there fetching individual entities in a loop.
sending notifications to downstream systems.
http caching directives, which requires an understanding of each entity's expected life cycle.
auditing.

all issues you eventually realize you do need to actually care about well after going hurr durr fart automate the boilerplate!

a rest server is an organizational boundary, not a fashionable alpha-conversion of jdbc/dbapi/whatever for your loving webshit trash fire

Sapozhnik fucked around with this message at 18:51 on Jan 18, 2018

gonadic io
Feb 16, 2011

>>=

HoboMan posted:

terrible programmer status: the idea of making an in-house messaging app was floated as a serious idea up for real consideration. i suggested some ways we could easily build it into what we already have :unsmigghh:

Now do an email client

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Sapozhnik posted:

just because a task is tedious does not mean it is unnecessary. there are so many things a hand-written rest service needs to interpose between a database and external clients:

validation and business logic. no, you can and should not loving do this in the database server using stored procedures.
interface version insulation between the db and external clients, providing versioned endpoints if needs be.
augmenting certain collection views with lists of related entities so that your clients don't sit there fetching individual entities in a loop.
sending notifications to downstream systems.
http caching directives, which requires an understanding of each entity's expected life cycle.
auditing.

all issues you eventually realize you do need to actually care about well after going hurr durr fart automate the boilerplate!

a rest server is an organizational boundary, not a fashionable alpha-conversion of jdbc/dbapi/whatever for your loving webshit trash fire

but its so easy i can just

POST /api/db HTTP/1.1

SELECT * FROM foo WHERE bar = 'yospos bitch';

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

CRIP EATIN BREAD posted:

but its so easy i can just

POST /api/db HTTP/1.1

SELECT * FROM foo WHERE bar = 'yospos bitch';

maybe i missed something but from what i saw postgrest is intended to inhibit that kind of poo poo

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Sapozhnik posted:

just because a task is tedious does not mean it is unnecessary. there are so many things a hand-written rest service needs to interpose between a database and external clients:

these are all good and valid points, thanks. but can i please have like 72 hours of starry-eyed enthusiasm before going back to the usual jaded pragmatic skepticism

e: except the list of related entitled part. postgrest can do that

NihilCredo fucked around with this message at 19:39 on Jan 18, 2018

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo
postgrest supports a lot of those things

I wonder how far you can get with just adding a small layer on top. like Postgrest + Kong api gateway or something similar

Adbot
ADBOT LOVES YOU

comedyblissoption
Mar 15, 2006

Xarn posted:

As much as I wouldn't want to have a large codebase in Python (you can pry static typing from cold dead hands), in my experience Java and C# make spaghetti more common. I blame the "everything must be an object! FREE FUNCTIONS? WHAT HERESY IS THIS? MAKE IT A STATIC METHOD ON A STATIC CLASS" approach. :shrug:
The primary reason code in Java/C#/C++/javascript/whatever devolves into spaghetti is unnecessary pervasive use of global mutable state. Pervasive use of global mutable state defeats localized understanding of code. To understand code in the context of global mutable state requires looking at how that state is used everywhere. To modify code correctly in the context of global mutable state, you often must maintain implicit global invariants. Even though function Foo might not have global mutable state under the hood now, in the future it silently may.

Java/whatever programmers will create contorted buzzword constructs so they can kid themselves they do not suffer from global mutable state defeating localized understanding. A current example of this delusion is the usage of dependency injection frameworks to put a curtain around global mutable state. Pervasive unnecessary global mutable state is idiomatic in all of the industry C#/C++/Java/javascript codebases I have worked on.

Mutability of variables and parameters is fine as long as you can notate the scope of mutability. Java/C# do not allow you to do this meaningfully for function parameters. Notating and enforcing mutability scope is important to productively maintain invariants without programmer error.

  • Locked thread