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.
 
  • Post
  • Reply
Dominoes
Sep 20, 2007

I don't like the idea of Jetbrains having a monopoly on smart code editors but... no matter how much I try, I can't find anything approaching its level of convenience and language-understanding. (For Python, Rust, and JS/TS)

Adbot
ADBOT LOVES YOU

Volguus
Mar 3, 2009

Dominoes posted:

I don't like the idea of Jetbrains having a monopoly on smart code editors but... no matter how much I try, I can't find anything approaching its level of convenience and language-understanding. (For Python, Rust, and JS/TS)

For JS/TS I found VSCode to be superior. Neither of them are amazing if performance is a concern though. One is Java the other is Typescript. If you can do your job with the editor of your choice, that's all that matters. Emacs of course rules them all, but that's no performance king either. If performance is a concern, then I can only recommend ed, the standard text editor

OtspIII
Sep 22, 2002

I'm running into a bug that's roundabout enough that I'm not even sure how to google it effectively.

So I'm using a React frontend and an Express backend, both currently running on localhost. All information about the website is stored on a local SQLite database (although I had this bug when I was using a local MongoDB one as well). The website is built around being extremely editable, with lots of different components potentially getting updated back to back by the user.

When I'm doing mass data input on the site it'll just silently stop making POSTs to the server until I refresh the page after I update 6 or so elements. What's the cause of this and is there a way to prevent it?

I think it's on the React end, since refreshing immediately resets it and lets me start making edits again, but I'm really not sure. Does anyone have an idea as to what's going on here? I can give more info on how things are structured if needed, but this feels like it's probably less of a thing with my code and more of an unspoken design choice in how React works that I'm not aware of

OtspIII fucked around with this message at 01:58 on Aug 28, 2020

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Are you sure the requests are completing?

Macichne Leainig
Jul 26, 2012

by VG

Volguus posted:

For JS/TS I found VSCode to be superior. Neither of them are amazing if performance is a concern though. One is Java the other is Typescript. If you can do your job with the editor of your choice, that's all that matters. Emacs of course rules them all, but that's no performance king either. If performance is a concern, then I can only recommend ed, the standard text editor

I have been paying Jetbrains the $150 a year for everything, but I still use VSCode for web projects a lot of the time. The IntelliSense there for web development - especially with TS - is second to none.

OtspIII
Sep 22, 2002

Munkeymon posted:

Are you sure the requests are completing?

Oh man, I figured it out.

So I was doing a bunch of fetches from my client, but not all of my server-side POST handlers were sending confirmation messages back to the client after the POST was handled (which, in retrospect, was a dumb mistake on my part even unrelated to this bug). I guess React must have a queue or something of fetches to process, and if there are six fetches still waiting on a response it won't send out any more until those have been handled. So I'd make six edits, never get confirmations from the server that they went smoothly, and then the queue would clog up and everything would stop working

redleader
Aug 18, 2005

Engage according to operational parameters
ah, good ol' setTimeout(0, function () {...})

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

OtspIII posted:

Oh man, I figured it out.

So I was doing a bunch of fetches from my client, but not all of my server-side POST handlers were sending confirmation messages back to the client after the POST was handled (which, in retrospect, was a dumb mistake on my part even unrelated to this bug). I guess React must have a queue or something of fetches to process, and if there are six fetches still waiting on a response it won't send out any more until those have been handled. So I'd make six edits, never get confirmations from the server that they went smoothly, and then the queue would clog up and everything would stop working

That 6-requests-at-a-time is a browser restriction

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Is there a data structure analogous to a binary search tree for partially ordered data?

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

ultrafilter posted:

Is there a data structure analogous to a binary search tree for partially ordered data?

I don't think there's an exactly-analogous general-case one. Depending on what exactly you're after, there might be some data structure that has the specific properties you care about.

There also might be something more directly analogous if your partial ordering has specific structure to it.

Volmarias
Dec 31, 2002
Probation
Can't post for 19 minutes!

OtspIII posted:

Oh man, I figured it out.

So I was doing a bunch of fetches from my client, but not all of my server-side POST handlers were sending confirmation messages back to the client after the POST was handled (which, in retrospect, was a dumb mistake on my part even unrelated to this bug). I guess React must have a queue or something of fetches to process, and if there are six fetches still waiting on a response it won't send out any more until those have been handled. So I'd make six edits, never get confirmations from the server that they went smoothly, and then the queue would clog up and everything would stop working

Consider also batching your mutations rather than sending them one at a time.

OtspIII
Sep 22, 2002

Volmarias posted:

Consider also batching your mutations rather than sending them one at a time.

Including if the mutations are from different user inputs? Like...

Case A: hitting this button once spawns six new boxes and send six posts to the server. It sounds like I should set this up to batch messages

Case B: there are five text boxes the user can edit on screen. I figure I shouldn't batch these since there's likely to be a big time delay between edits

Case C: there are six boxes on the screen, and each has a red button that deletes it from there screen/DB. This is the case I'm not sure on--odds are decent the user might close all six in rapid succession. Should there be a little timer that collects messages and batches them in that case, or is it better practice to still just send six posts?

Volmarias
Dec 31, 2002
Probation
Can't post for 19 minutes!

OtspIII posted:

Including if the mutations are from different user inputs? Like...

Case A: hitting this button once spawns six new boxes and send six posts to the server. It sounds like I should set this up to batch messages

Case B: there are five text boxes the user can edit on screen. I figure I shouldn't batch these since there's likely to be a big time delay between edits

Case C: there are six boxes on the screen, and each has a red button that deletes it from there screen/DB. This is the case I'm not sure on--odds are decent the user might close all six in rapid succession. Should there be a little timer that collects messages and batches them in that case, or is it better practice to still just send six posts?

It's sort of a decision you have to make. You could take the super simple approach of "until the last request returns or times out, just add every mutation to a queue, them send the contents of the queue as a whole as the next request, rinse and repeat. If you expect high latency but good throughput, you probably want to let multiple concurrent requests.

I'm sure there's frameworks that can do all of this for you, I haven't done real web dev since Web One Point Oh.

AgentCow007
May 20, 2004
TITLE TEXT
So I've started learning web development and I wanted to start accepting Stripe payments on some apps. Is it advisable to create some sort of business entity? These are pretty small crappy apps for now and I don't expect a ton of customers. Also, if I'm going to do a lot of smaller sites, does each one need to be a separate business or could I just make an overarching one like "Agentcow Services, LLC"?

Rahu
Feb 14, 2009


let me just check my figures real quick here
Grimey Drawer
Hey all, I develop a small freeware windows application and I'm looking into getting a code signing cert to make the scary windows defender warning go away.

I was looking around and found https://codesigncert.com/ which sells a 3-year Comodo cert for the same price that Comodo sells a 1-year cert for. I understand windows code signing is mostly a racket so the prices are completely made up, but that seems too cheap compared to everywhere else I'm looking. I'm curious if anyone here has experience using them.

It also says that Comodo provides "extremely complacent solutions", which really makes me think.

Alternatively, does anyone know a reliable cheap vendor for this sort of thing?

Macichne Leainig
Jul 26, 2012

by VG

AgentCow007 posted:

So I've started learning web development and I wanted to start accepting Stripe payments on some apps. Is it advisable to create some sort of business entity? These are pretty small crappy apps for now and I don't expect a ton of customers. Also, if I'm going to do a lot of smaller sites, does each one need to be a separate business or could I just make an overarching one like "Agentcow Services, LLC"?

I hold an LLC strictly for the limited liability part of things. The way it was explained to me is that if you do work through an LLC then the business goes south for whatever reason and someone takes legal action against you, since you were working through an LLC it prevents them from being able to take action against your personal property. Like only the assets of the business can be considered, not any assets you own personally.

I've probably butchered the explanation somehow, but basically in my case it was a $50 or so filing fee with my state government to cover my rear end a bit.

Plus I think you can writeoff things like PC purchases for something like 2-3 years as business expenses, if that's your thing. I've never bothered, I just use a CPA to file my taxes and help me maximize returns.

Macichne Leainig fucked around with this message at 15:02 on Sep 2, 2020

CarForumPoster
Jun 26, 2013

⚡POWER⚡

AgentCow007 posted:

So I've started learning web development and I wanted to start accepting Stripe payments on some apps. Is it advisable to create some sort of business entity? These are pretty small crappy apps for now and I don't expect a ton of customers. Also, if I'm going to do a lot of smaller sites, does each one need to be a separate business or could I just make an overarching one like "Agentcow Services, LLC"?

I'm not a lawyer and this is not legal advice but I do work at a legal tech startup that does litigation and, occasionally, corporate formations.

If I was freelancing I'd definitely start a protective business entity, most likely an LLC. In my state its cheap ( wanna say $150), fast, easy, allows you to have employees if things start to go well and has many protections for your personal assets. Be aware though, there's plenty you can do that risks "piercing the veil" and some laws which hold the members/managers liable, for example unpaid wages under the FLSA. You can google "piercing the veil" for more info about when your personal stuff might not be protected. In my state I'd need to file paperwork each year that takes about 15 minutes to keep it active.

Websites get sued pretty frequently where I live for ADA violations. You wouldnt want that website you built for some hotel 3 years ago to end up with you getting shook down for $10K.

CarForumPoster fucked around with this message at 17:46 on Sep 2, 2020

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
I loving hate Visual Foxpro.

That is all.

IuniusBrutus
Jul 24, 2010

There used to be a thread to request small apps/programming projects - does this still exist?

BrianBoitano
Nov 15, 2006

this is fine



Heya once upon a time a poster gave me this code which I use as a bookmarklet to help skim picture threads / skip derails:

code:
javascript:(function(){ $('table.post').filter(function() { return $(this).find('.postbody > div.tweet, .postbody > img:not([src*="somethingawful.com"])
, .postbody > a:not([href*="somethingawful.com"]), .postbody > .timg_container > img:not([src*="somethingawful.com"]), .postbody > url.container
, .postbody > .gifv_video, .postbody > iframe').length === 0 }).hide() })()
How would I add something that keeps posts which are only text but contain a certain word or phrase? Something like this I'd think, but I'm not a coder and I can't find the original helpfulgoon to assist:

quote:

java script:(function(){ $('table.post').filter(function() { return $(this).find('.postbody > div.tweet, .postbody > img, .postbody > a:not([href*="somethingawful.com"]), .postbody > .timg_container, .postbody > url.container, .postbody > .gifv_video, .postbody > iframe',.postbody > str.includes(“KEEP THIS POST”)).length === 0 }).hide() })()

I turned it into a quote instead of code so bolding could happen. In this case, I'd like it to also show posts where the text of KEEP THIS POST is included somewhere. I keep trying things but honestly I'm just flailing.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Probably .postbody:contains("KEEP THIS POST") which is a case-sensitive match

BrianBoitano
Nov 15, 2006

this is fine



That did it! Thank you! What language is that? I can't find contains() in any JavaScript googling I do and I'd like to stumble my way through this stuff in general.

nielsm
Jun 1, 2009



That's a CSS selector.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



nielsm posted:

That's a CSS selector.

:science: jQuery https://api.jquery.com/contains-selector/

Pure CSS doesn't support it, AFAIK. XPath should, though, but it's already using jQuery.

frogbs
May 5, 2004
Well well well
I have what I think is a pretty simple machine learning project I want to work on, but everytime I sit down to start, I get bogged down by finding a good tutorial/place to start. There’s ton of tutorials out there for this stuff, but I haven’t found one that tells me why i’m doing some of this stuff.

Basically, I have a MYSQL database that I want to use to train a model. There’s a column (color) that I want to predict based on data from the other columns (time of day, temperature). Does anyone have any recommendations for a good starting point, or even a tutorial?

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


What are some tutorials that you've looked at and found unsatisfactory, and why?

AgentCow007
May 20, 2004
TITLE TEXT
What do I need to do to create subdomain DNS entries quickly? I have a web app that adds subdomains through Namecheap API (so the customer gets a vm at user.example.com), but it takes forever (10+ minutes) to go live. Do I need my own DNS server? I always thought they were large-scale infrastructure, not something you'd roll up on your own. What am I missing?

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
DNS is hierarchical, you would provide your own authoritative DNS server, but it only covers your particular site and subdomains. Namecheap probably does this for you as one of the services they provide along with your domain registration right now, but (as you've found) their goals for that service aren't necessarily in line with what you need.

You could use something like Cloudflare DNS, if you didn't want to stand up and manage an actual server.

Alternatively, if all your subdomains are one level deep, you could register a wildcard DNS entry and have your own infrastructure handle it from there.

Jabor fucked around with this message at 03:35 on Sep 8, 2020

KillHour
Oct 28, 2007


The Fool posted:

There is literally no reason to use Atom while VS Code exists.

Sublime would have better performance if that’s a concern, but if performance is a concern you should be using a jetbrains ide.

Sublime is my go to for opening massive (multi gigabyte) files. Other than that, VS Code all day long.

The DPRK
Nov 18, 2006

Lipstick Apathy
I've made a discord bot for my one friendship group's discord and I host it on my PC. I am a cheapskate that doesn't want to pay even a measly £5 a month for hosting (cos it will add up ya know).

I do however have access to web hosting. Is it possible to host it from something like Siteground? If so, how would I go about that?

NB: I have tried the glitch.me thing but apparently it's banned now.

Polio Vax Scene
Apr 5, 2009



Our documentation is poo. It's files in sharepoint.
We're looking at new options and I wanted to see what all your favorite documentation sites are?
Best case scenario is a wiki-like thing where stuff can be linked around and have version & author history.

lifg
Dec 4, 2000
<this tag left blank>
Muldoon
If you're using Jira, you may as well use Confluence for documentation; they work well together.

But who's the documentation for? End users? Developers? Managers? External API developers?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
One giant google doc.

It sucked but at least everyone knew the one place to look, and we're never gonna be rid of google docs.

Polio Vax Scene
Apr 5, 2009



lifg posted:

If you're using Jira, you may as well use Confluence for documentation; they work well together.

But who's the documentation for? End users? Developers? Managers? External API developers?

We are no longer using Jira. We're using Azure DevOps, but, this documentation is intended for end users. We're not open source so exposing the DevOps wiki isn't an option AFAIK

The Fool
Oct 16, 2003


Polio Vax Scene posted:

We are no longer using Jira. We're using Azure DevOps, but, this documentation is intended for end users. We're not open source so exposing the DevOps wiki isn't an option AFAIK

I've never used this from a providing documentation point of view, but a couple products I've used have used https://readme.com/documentation for their end-user documentation and it felt like a good experience.

frogbs
May 5, 2004
Well well well

ultrafilter posted:

What are some tutorials that you've looked at and found unsatisfactory, and why?

I've been going through this one, and there's a bunch of syntax errors in his example code which has been annoying: https://thedatamage.com/machine-learning-with-python/

I think I just need to keep trying others, seems like there's no shortage of similar ones out there.

RPATDO_LAMD
Mar 22, 2013

🐘🪠🍆
Might not be the issue but are you using the same version of python as the guide? Python2 and Python3 have enough differences that you'd run into a bunch of syntax errors if there was a mismatch

frogbs
May 5, 2004
Well well well

RPATDO_LAMD posted:

Might not be the issue but are you using the same version of python as the guide? Python2 and Python3 have enough differences that you'd run into a bunch of syntax errors if there was a mismatch

I'm on 3.8.5, and I think he specifically mentions 3.6+ in the guide. Unless i'm an idiot and Jupyter is somehow still using Python 2, or whatever was installed by default in OSX. I installed Python 3 via Brew, then changed the Python version used via a symlink. 'python --version' returns 3.8.5 in the terminal, and 'which python' returns /usr/local/bin/python which also shows 3.8.5, so I think i'm good, right?

Super-NintendoUser
Jan 16, 2004

COWABUNGERDER COMPADRES
Soiled Meat

Polio Vax Scene posted:

Our documentation is poo. It's files in sharepoint.
We're looking at new options and I wanted to see what all your favorite documentation sites are?
Best case scenario is a wiki-like thing where stuff can be linked around and have version & author history.

Any doc provider you choose will be poo if you don't actively support it. Make sure you address that as well. No tech solution will help if your culture is bad.

Adbot
ADBOT LOVES YOU

Hadlock
Nov 9, 2004

Jerk McJerkface posted:

No tech solution will help if your culture is bad.

New thread title?

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