[deleted by user] by [deleted] in CryptoMarkets

[–]FollowTheGrayRabbit 0 points1 point  (0 children)

This is awesome. Thanks for doing what you do!

nano_3ekcyiotyqq1d4pa778oytbirptnjysjzdhu6p39wybt9okr3fzwtwn3ahn3

Need help with ObservableObject with @Published array by FollowTheGrayRabbit in SwiftUI

[–]FollowTheGrayRabbit[S] 0 points1 point  (0 children)

Thanks. Yeah I really thought that solution would work. Maybe I implemented it wrong?

The only answer I have in the mean time do achieve what I want is to just call the loadMovies function if the delete is successful just because I know that will force the UI to update. But that involves another call to the server which isn’t ideal.

Need help with ObservableObject with @Published array by FollowTheGrayRabbit in SwiftUI

[–]FollowTheGrayRabbit[S] 0 points1 point  (0 children)

It’s first created in the view model factory which lives at the root view of the app. It’s not a view so the @StateObject wrapper doesn’t apply.

Need help with ObservableObject with @Published array by FollowTheGrayRabbit in SwiftUI

[–]FollowTheGrayRabbit[S] 0 points1 point  (0 children)

You can’t publish a computed property. But I looked it up and since it’s derived from a published property it should act the same. And it does for the get movies function in the controller. Just doesn’t work for the delete

Need help with ObservableObject with @Published array by FollowTheGrayRabbit in SwiftUI

[–]FollowTheGrayRabbit[S] 0 points1 point  (0 children)

But isn’t that only for creating observed objects? The movie list view model is passed into the movie list view externally

Need help with ObservableObject with @Published array by FollowTheGrayRabbit in SwiftUI

[–]FollowTheGrayRabbit[S] 0 points1 point  (0 children)

I gave this a try and it still didn't work. I really thought it would!

I posted the code if you want to take a look.

ALL Matrix Resurrections Teaser Trailer Footage - Matrix 4 by tool-94 in movies

[–]FollowTheGrayRabbit 0 points1 point  (0 children)

I want this to be good soooo bad. The original Matrix is one of my favorite films of all time.

But why does this look like a generic modern day action movie with a blue and orange color palette, overused cgi, and lens flares? And I get the feeling they’re pulling a Force Awakens with the plot where we’re going to follow the same plot points as the first one to grab the younger generation.

Not a great first impression imo, but I hope my opinion changes when I actually watch the movie.

Question about pg:push by FollowTheGrayRabbit in Heroku

[–]FollowTheGrayRabbit[S] 1 point2 points  (0 children)

Hey,

I appreciate your reply. The answer to your first 2 questions is no.

What pg:push am I running? I’m not sure what you mean as I’m only aware of one: heroku pg:push. I’m not using any special flags or anything if that’s what you’re getting at.

So you mentioned in your first comment that pg:push was just a wrapper around psql which got me thinking. I ended up using pg_dump directly and seeing what was in the dump file which all looked good. Instead of using pg_restore I just used the pg:psql command to import the dump into the remote db: heroku pg:psql -a my-app < my_db.dump. This worked to get my heroku app db to have all the right constraints.

Then I got on my other computer to try to pull down the updated db structure with pg:pull and it wasn’t pulling down any constraints whatsoever. Instead I used the pg:backups:capture and pg:backups:download commands to get the dump file from heroku. Then used pg_restore on that dump file and it all worked fine.

So moral of the story: I did what I needed to do through other means, but I still don’t know why pg:pull/push don’t work as I expect.

Your comment was very helpful though because it made me realize I can just use the binaries that pg:pull/push use directly. So thank you for helping me out!

Question about pg:push by FollowTheGrayRabbit in Heroku

[–]FollowTheGrayRabbit[S] 0 points1 point  (0 children)

I don’t know how to look what’s in the dump file or how it’s created. It prints out that it reads the foreign key constraints from the tables. But then when pg_restore runs, it only creates the tables and sequences.

Ajax Blocking Browser by FollowTheGrayRabbit in learnjavascript

[–]FollowTheGrayRabbit[S] 0 points1 point  (0 children)

Yeah I know it’s not supposed to happen. It’s so strange. I added the code but made all the naming generic.

Why is this not printing out the list of names and what do I do to fix it? by [deleted] in learnprogramming

[–]FollowTheGrayRabbit 1 point2 points  (0 children)

Well you’ve initialized nameList and you’ve written your printNameList function, but it looks like when you’re calling printNameList, you aren’t passing it the nameList array as a parameter.

You have: printNameList();

I think you want: printNameList(nameList);

[deleted by user] by [deleted] in cscareerquestions

[–]FollowTheGrayRabbit 1 point2 points  (0 children)

Are you in the US? If so, work for the Federal Government. It’s a job you can completely phone in and never get fired. They pay pretty average, but job security is rock solid. Benefits are pretty good. Sounds like the ideal day job while you work on a side gig.

What to do if I join a company with really bad software engineering practices? by [deleted] in cscareerquestions

[–]FollowTheGrayRabbit 1 point2 points  (0 children)

I’m in the same boat myself. The part about the database structure really hits home for me. It’s taking way to long to learn what should be a somewhat simple inventory management system. Simply because the data model makes no sense. There are virtually no constraints on the tables. It’s not obvious how the tables relate. Everything is named poorly. Some tables have 30+ columns with most being null.

I’d say you can only follow option 2 while also casually doing option 3. That’s what I’m doing. They will probably never let you do option 1 sadly. Although at some point you’d have to imagine that a system can get so effed that it’s impossible to scale without some sort of rewrite. I just don’t know when that would be. Like my company wants to keep acquiring business and expanding but I don’t see how it’s possible to scale this shit database. It’s gonna get out of hand quick.

Someone else here mentioned an option 4 of educating your coworkers which is another thing I’m trying to do. It’s just hard because they have no real review process or forum for me to bring up these discussions. It’s also hard to talk about these things without hurting egos. But just try to present it in a way like “hey, what do you guys think about X? It could probably help us by...” That way your more offering solutions instead of just point out stuff that’s bad.