|
Bruegels Fuckbooks posted:You could just write a bunch of test scripts for postman that run through your api calls and verify that you're getting the expected results - this could act as an integration level test for your API. There are other tools that work similarly but postman comes to mind as widely available. This is fine to a point, but reality never matches expectations. There's a high likelihood you don't cover everything, think you have with this approach (which you can do with regular testing anyway?), and then deploy it only to find the million edge cases with real data. If you can capture the requests themselves for a period of time you could replay them in a test environment against both the old and new and verify that both databases match at the end. There's obviously a lot riding on being able to do that, but if possible its better than hand-crafting anything in a situation like this. necrotic fucked around with this message at 00:59 on Jun 19, 2020 |
# ? Jun 19, 2020 00:55 |
|
|
# ? May 30, 2024 11:40 |
|
this is a dumb question, but it came up at my job a few days ago and just wanted opinions: We have a controller that's called "coupons" and looks like /api/accounts/coupons. Coupons are associatd with customers - a customer can have a coupon. We wanted expose an endpoint to void a coupon by customer id. a pr was submitted by person 1 with the endpoint being code:
person 2 says it should be: code:
person 3 says: code:
which one seems to make the most sense?
|
# ? Jun 19, 2020 01:15 |
|
Pollyanna posted:We have an application that's behind a load balancer. We want to replace this application with one that responds identically, and therefore should behave identically, but that is based off of a completely different codebase and is otherwise a total rewrite. There's a particular approach I want to take in validating that our rewrite is a perfect drop-in replacement, but I don't recall the name. I can't speak to whether this is sensible at the load balancer level or how to do it, but at the code level I've heard this called "experimenting" and there are libraries for it.
|
# ? Jun 19, 2020 01:19 |
|
sausage king of Chicago posted:this is a dumb question, but it came up at my job a few days ago and just wanted opinions: Classic case of bike shedding. None of these are more correct, just pick one. Although if I had to pick I'd go with the first, or the third, and not the middle. Who doesn't love a little bike shedding?
|
# ? Jun 19, 2020 02:15 |
|
sausage king of Chicago posted:this is a dumb question, but it came up at my job a few days ago and just wanted opinions: Paint it red. "More RESTful" isn't a thing.
|
# ? Jun 19, 2020 02:21 |
|
edit: nevermind, I found the source of my problem
Kilson fucked around with this message at 03:45 on Jun 19, 2020 |
# ? Jun 19, 2020 02:23 |
|
sausage king of Chicago posted:this is a dumb question, but it came up at my job a few days ago and just wanted opinions: code:
|
# ? Jun 19, 2020 03:44 |
|
sausage king of Chicago posted:this is a dumb question, but it came up at my job a few days ago and just wanted opinions: Option 3. If at some point you need to void specific coupons by id, you’d just slap it on the end.
|
# ? Jun 19, 2020 03:49 |
|
Kilson posted:edit: nevermind, I found the source of my problem I think the point is that you can't game the system by figuring out what the inputs are and then coding directly to them. Good that you found it though!
|
# ? Jun 19, 2020 07:43 |
|
I’m currently learning React through Codecademy but, having previously learned Python through Codecademy and been unimpressed with where it left me once I finished the course, is there a better resource people recommend for learning React? I ultimately want to build a little text based card game if that matters. Maybe a little personal todo app with no login etc gubbins.
|
# ? Jun 22, 2020 11:25 |
|
Maybe try https://www.freecodecamp.org ? Their front end section does react and ends with some projects that give you a better grasp of how to build something.
|
# ? Jun 22, 2020 13:09 |
|
Nigel Tufnel posted:I’m currently learning React through Codecademy but, having previously learned Python through Codecademy and been unimpressed with where it left me once I finished the course, is there a better resource people recommend for learning React? I've always thought pretty highly of the official React docs and tutorials, and it looks like they might have improved the later
|
# ? Jun 22, 2020 13:54 |
|
I get in the rut of watching videos of learning a language then totally forgetting. But udemy has some decent react tutorials
|
# ? Jun 22, 2020 14:24 |
|
Maybe I’m doing it wrong but I’ve never used code academies or anything like that. I just use official docs and maybe google to find (textual) sites explaining stuff. I can’t watch videos about programming, it just doesn’t work for me.
|
# ? Jun 22, 2020 16:17 |
|
Yeah I don't know why i watch videos I don't seem to retain the knowledge, but I never do when it comes to programming lol
|
# ? Jun 22, 2020 16:47 |
|
I think I've asked about Markdown-based note taking stuff in here before since it fits with programmer culture, but I wanted to check in again after playing around with it a little more. I've particularly been trying Boost Note. It reached a point where I think I want to have my stuff show up on my phone so I'm looking at the synchronization alternatives. It looks like all the tools that synchronize support either/and/or a proprietary cloud system and one or more general cloud services (Dropbox). I'm wondering if there's any support a non-cloud, network-based solution? I'm talking, like, SSH. It doesn't seem like it. Furthermore, I get the strong message that I should stop being a grandpa and just sync on Dropbox.
|
# ? Jun 23, 2020 19:10 |
|
Syncthing is available on Android I think, not sure about iOS. It’s sort of DropBox but peer-to-peer between your devices. Edit: Oh wait I think you might’ve meant a markdown editor that supports syncing. I’ll leave this suggestion here anyway. ArcticZombie fucked around with this message at 22:07 on Jun 23, 2020 |
# ? Jun 23, 2020 22:05 |
|
I'm just going to leave an invite link to the GDN CoC Discord here for no particular reason https://discord.gg/G8Rb6T
Munkeymon fucked around with this message at 13:55 on Jun 25, 2020 |
# ? Jun 24, 2020 15:07 |
|
Munkeymon posted:I'm just going to leave an invite link to the GDN CoC Discord here for no particular reason https://discord.gg/G8Rb6T Thanks, I was wondering about this.
|
# ? Jun 25, 2020 08:42 |
|
Munkeymon posted:I'm just going to leave an invite link to the GDN CoC Discord here for no particular reason https://discord.gg/G8Rb6T Link's dead
|
# ? Jun 25, 2020 21:49 |
|
New to this but I want to send SMS to users, just a couple, mostly for notification type stuff. What are some cheap/free options out there? (USA if it matters)
|
# ? Jun 26, 2020 00:17 |
|
cr0y posted:New to this but I want to send SMS to users, just a couple, mostly for notification type stuff. What are some cheap/free options out there? (USA if it matters) AWS sns is free for 100 messages a month
|
# ? Jun 26, 2020 00:31 |
|
Twilio pricing is quite reasonable I thought
|
# ? Jun 26, 2020 00:35 |
|
AgentCow007 posted:Link's dead https://discord.gg/hBV4Vk
|
# ? Jun 26, 2020 14:03 |
|
Not sure what keywords to look up, but let's say I had a 3d globe model, and a UV mapping that looked like: If I wanted to place an image for example across the atlantic ocean, how would I derive the warping needed to fit it across the seam? Looking to do this programatically outside of a 3d editor, i.e. given a point on the globe and an image, place a 10x10 image at that point on it and unwrap to texture. Any pointers to things to look up would be appreciated, in an endless google loop of the basics of UV mapping but not sure how to articulate the reverse case.
|
# ? Jun 26, 2020 16:03 |
|
The easiest way is to compute the inverse of the Mercator projection, but there's a pretty big caveat. There's no way to map a flat image onto the surface of a sphere while preserving distances, so you're going to have to either mess with the source image or accept some distortion.
|
# ? Jun 26, 2020 16:22 |
Plank Walker posted:Not sure what keywords to look up, but let's say I had a 3d globe model, and a UV mapping that looked like: Assuming you're working with triangulated meshes and not mathematical spheres, what you'd do is map each vertex in your model onto a position on the texture. Some shared vertices can have the same coordinate, while in other places you'd have to have "seams" in the model with adjacent triangles not sharing vertices. There's probably a clever way to do it without manually mapping everything.
|
|
# ? Jun 26, 2020 17:34 |
|
What is under your control here? There are a lot of ways to map from the plane to the sphere. I wouldn't use an orange peel projection like that one if I had a choice specifically because it's quite complicated to map between the sphere and the projection. If that's what you're stuck with then that is specifically the "interrupted Goode homolosine projection". It consists of a sinusoidal and Mollweide projection joined at 40°44′ latitude, and each hemisphere split at specific longitudes. It is analytically reversible by using those things, but doing all that does not sound like huge fun to me. You can also map a triangulated sphere to it and then project your splat texture triangle-by-triangle, but that sounds even more painful. If you can choose your mapping freely then the easiest mapping to work with is the Equirectangular projection, commonly called "latlong" in CG, where you basically just rescale latitude and longitude to be in [0, 1] and use them directly as UV coordinates. The problem with latlong images are that they have extreme distortion as you get near the poles. There are a bunch of more complex projections that distort less, but they're varying degrees more annoying to work with. Mappings between Sphere, Disc, and Square is a paper from a few years back with a few classes of projection that are reasonably low distortion, plus code for projecting and deprojecting. To handle splatting an image into a UV space texture, you're basically looking at projecting a hull of the image onto the sphere -- it doesn't need to be a fancy hull, a subdivided rectangle will do -- cutting the hull polygons at the UV seam lines and then projecting the hull into UV-space by projecting each vertex of it. Then you draw the image onto your projected hull and presto. How well subdivided your hull needs to be depends on how big your image is and how distorting the mapping is. All that said: are you sure you need to project the image onto the texture? For interactive applications this sort of thing would usually be done with decals, which has the added benefit of avoiding filtering artifacts as you project the splat image into UV space. Another possible simplification if you're stuck with some horrid hard-to-reverse map projection is to use a separate, more easily computed UV space for the splats with a transparent default image.
|
# ? Jun 26, 2020 18:50 |
|
I'm working on a project for a network security course and I'm hoping goons might be able to provide some guidance. Tools to use: SNORT, Wireshark I've been given a large (nearly 1gb) PCAP file for which I'm supposed to write a few SNORT rules that do the following: 1) A rule that simply catches all connections. (To be labeled "Other") code:
code:
code:
code:
Total unique cnc connections: 80 (catching 75 with my rules) Total unique ddos connections: 185 (catching 177 with my rules) Total unique scan connections: 14004 (catching more than 14004, but false positives are allowed) Total unique other connections: 16274 Total unique connections: 30543 Full points are awarded for identifying at least 80% of each type of connection. Figured it out. Huzzah. Batterypowered7 fucked around with this message at 01:55 on Jul 5, 2020 |
# ? Jul 3, 2020 20:00 |
|
how can I use programming to make better things happen in my community? I'm actually thinking about gun violence, or even voting, or relief during covid.but everything I think of comes down to data collecting and I wonder if I'm not thinking of something. gun violence - no idea. I noticed a lot of organizations try to get the youth interested in something other than guns (like music) but I guess I'm more concerned of guns in circulation and getting them out. or gang violence? voting - if the state has a list of registered voters, you could somehow collect who has been removed over time. I know a lot of States are flushing users out. covid - I can only imagine data collection, but of course the data is hosed anyways.
|
# ? Jul 4, 2020 17:25 |
|
Edgar Allan Pwned posted:how can I use programming to make better things happen in my community? I'm actually thinking about gun violence, or even voting, or relief during covid.but everything I think of comes down to data collecting and I wonder if I'm not thinking of something. Volunteer for a nonprofit that has goals similar to yours. They always need people to do boring IT monkey poo poo and they can never afford it. If you're looking for something big and splashy like "I made an algorithm to solve X!", you're basically looking at getting a PhD in computational sociology and going into a field that doesn't pay squat, so good luck. KillHour fucked around with this message at 17:37 on Jul 4, 2020 |
# ? Jul 4, 2020 17:35 |
|
Make an army of bots to turn the tide in the favor of your cause, or counter opposite bots. I mean this partly jokingly, but I speculate this will be an increasing ubiquitous factor in public sentiment over the next few years/decades.
|
# ? Jul 4, 2020 18:18 |
|
yeah or like, advanced distributed k-pop video submission systems
|
# ? Jul 4, 2020 18:21 |
|
Edgar Allan Pwned posted:how can I use programming to make better things happen in my community? I'm actually thinking about gun violence, or even voting, or relief during covid.but everything I think of comes down to data collecting and I wonder if I'm not thinking of something. Go outside and talk to people.
|
# ? Jul 5, 2020 09:36 |
|
Edgar Allan Pwned posted:how can I use programming to make better things happen in my community? Take a look at Code for Social Good. There are probably some projects there you can contribute to.
|
# ? Jul 5, 2020 14:57 |
|
Edgar Allan Pwned posted:how can I use programming to make better things happen in my community? I'm actually thinking about gun violence, or even voting, or relief during covid.but everything I think of comes down to data collecting and I wonder if I'm not thinking of something. Seconding the nonprofit idea, as well as any community orgs that align with your interests. These places already have problems that need tech solutions. Keep in mind a lot of it may be fairly routine, such as “we need someone to maintain our website” or a programmatic way to get a cut of data.
|
# ? Jul 5, 2020 15:12 |
|
Edgar Allan Pwned posted:how can I use programming to make better things happen in my community? I'm actually thinking about gun violence, or even voting, or relief during covid.but everything I think of comes down to data collecting and I wonder if I'm not thinking of something. Last time I wondered about this, more specifically along the lines of "let's do a hackathon to make apps that help <causes>", it was pointed out to me that anything requiring any maintenance whatsoever is probably just going to be a burden, unless you're also signing up to perpetually maintain the thing. That shut down the idea pretty quick. The correct answer is to find an org you want to help and go ask them what they need. Let them know your particular talents. The most helpful thing might be "make an app" or at least "can you make a spreadsheet that does X", but it might just be "carry these reams of paper to the office upstairs".
|
# ? Jul 5, 2020 15:46 |
|
pokeyman posted:"carry these reams of paper to the office upstairs". Goons do have a particular talent for carrying printers...
|
# ? Jul 5, 2020 20:02 |
|
csammis posted:Goons do have a particular talent for carrying printers... Really, goons would be very effective at digging wells.
|
# ? Jul 5, 2020 21:48 |
|
|
# ? May 30, 2024 11:40 |
|
What might be involved in writing a backend for a service that rents game servers? I followed a SaaS tutorial for express and mongo for basic login/payment functionality, but I'm not really sure where to start with automatic server provisioning, scheduling, etc.
|
# ? Jul 6, 2020 21:44 |