• Breaking News

    Monday, June 21, 2021

    I am not sure what I should expect for a developer test environment for my new job. Ask Programming

    I am not sure what I should expect for a developer test environment for my new job. Ask Programming


    I am not sure what I should expect for a developer test environment for my new job.

    Posted: 21 Jun 2021 04:07 PM PDT

    I am at a new job, and I am having a very difficult time testing my changes or debugging issues.

    At my previous job, our entire software system was designed to be run on premises on LAN. When developing, each developer would spin up an entire isloated system with their own local instance of backend, database, and client mobile devices. I was VERY used to having complete and total control of my entire development enviroment, and I could safely hack around in an area of the system as needed to test, debug, or develope new features, and could populate the database with whatever data I wanted.

    I am at a new job now, and I am quite lost. I am brought on to inherit the mobile app (only mobile dev). The backend is almost all serverless (very new to this). They utilize Firebase (FCM + Firestore) Google Cloud Functions, and a node.js backend running in App Engine. They have no sandboxed test deployment (I don't know if this should be expected or not).

    I am not very experienced with backend, and cloud serverless deployments. But I find it very concerning that there is no way for a developer to spin up an isolated sandbox enviroment to test with. For example, I made a change to push notifications logic on the mobile app and want to test it. I wanted to authetically as possible have a notification propagate through the system and end up at the client. I was given a script that another dev had that connects to the production firebase project, and sends notifications to a special "dev" channel. This felt wrong to me.

    I feel like I don't have any solid ground to test my mobile app changes. Because of my lack of experience with all of the serverless tech at play here, I am apprehensive about going in and tinkering with the production enviroment to test things. I feel immobilized.

    Is it wrong to assume that a developer should be able to spin up an isloated instance of Firestore + Cloud Functions + App Engine, so they could test and tinker with the mobile app in isolation?

    Can any provide some sort of guidance in this scenario?

    submitted by /u/scorr204
    [link] [comments]

    Java (Eclipse) Program that Replaces the Prior Word into a Parenthetical?

    Posted: 21 Jun 2021 07:58 PM PDT

    This is actually a very complicated program, and I can't figure out how to do it. Could anyone figure out how to do this in eclipse? I feel like it might be a simple 10 lines of code, but I could be wrong. Let me start with our sample paragraph:

    "This is an example paragraph for showing how this program should work. There will be common words in this text that the program will look for, and I want to replace it with new text in an encompassing parenthetical. It is kind of like an auto generated program so that one does not have to go in manually and replace everything."

    So in the above paragraph, I want to Find all "an" words and place it in a parenthetical, BUT here's the hard part.. I also want to place the preceding word in the parenthetical, and I want the text to be exactly the same except "an" and the preceding word are now in parentheticals. So the above text should become this:

    "This (is an) example paragraph for showing how this program should work. There will be common words in this text that the program will look for, and I want to replace it with new text (in an) encompassing parenthetical. It is kind of (like an) auto generated program so that one does not have to go in manually and replace everything."

    See what happened with the parentheticals? Anyone know how to make a program that would do this?

    Thanks my friends!

    submitted by /u/makeit234
    [link] [comments]

    How would you go about scraping Twitch for game genre meta data?

    Posted: 21 Jun 2021 09:57 PM PDT

    I'm looking through the twitch API but I can't find anything about genres. I thought about scraping the website but only the top games are displayed, so it wouldn't be a complete list.

    Does anybody here have any suggestions on how to proceed?

    submitted by /u/KumichoSensei
    [link] [comments]

    How to make the 360 viewer on the web?, I'm trying with.. React threejs.

    Posted: 21 Jun 2021 09:20 PM PDT

    Hi guys, I'm wondering how to create this kind of immersive website uwing threejs.

    Pretty much appreciated on your helps!

    https://360store.sothebys.com/en/edit/cspecialistsedit

    submitted by /u/leahryu
    [link] [comments]

    Who to first detect an exception?

    Posted: 21 Jun 2021 07:41 PM PDT

    Hi, I understand that exception are a set of runtime events that whenever happen require a special handling code or hardware mechanism.

    However, I wonder who to first detect such event, is it necessarily the processor itself, meaning the exception is a direct result of an event actually happening at the instruction level (like for example asking the ALU to divide by zero, asking to de-reference a pointer with a null value address).

    Or, is it possible to also happen at the binary executable level itself being checking for exceptions, like for instance when trying to access beyond an array limit, which looks to me, on the processor instruction level, an event that could go just fine theoretically and only lead to unreliable memory readings, so long we're within the allowed memory area of addresses for the running process.

    I understand that there are different types of exception, and my question is about who to first detect various types of exceptions while executing a binary.

    submitted by /u/ZaherDev
    [link] [comments]

    Knapsack problem

    Posted: 21 Jun 2021 09:46 PM PDT

    Is there a way one can run the knapsack algorithm for a large given weight (4000000) and large number of items(3700)? I keep running into out of memory errors by using the usual algorithm. Also, i need to print the selected elements.

    submitted by /u/Prince__1
    [link] [comments]

    I need Help !! Confused about certificate pinning

    Posted: 21 Jun 2021 09:46 PM PDT

    Hey,

    I am working on an API Backend for a Mobile Application using NodeJs . My client asked me to add certificate pinning to the backend and I am not sure how this can be implemented.

    The API should be deployed to work well with Desktop and Mobile applications . So does adding certificate pinning affect the desktop version in any manner?

    submitted by /u/littlegeekboy
    [link] [comments]

    Is there a "standard" to create microservices architectures?

    Posted: 21 Jun 2021 09:38 PM PDT

    So, I am very confused about how this works. I've received suggestions from a lot of places and googled stuff about this but in general it seems like there really isn't some standard way of designing a microservices architecture.

    For instance, I asked about how you would break up a CRUD into microservices. I was told to create a small REST API for each service. Basically:

    Table A -> Microservice A -> Database A

    Table B -> Microservice B -> Database B

    That seemed unorthodox to me, and I don't know how you'd handle relationships within such an architecture. On the other hand, I've also been told to compartmentalize a section of tables for a microservice. So say something like this:

    Recipes/Ingredients -> Microservice A

    Users/Schedules -> Microservice B

    However, I've also been told to do that it would be easier to put all CRUD logic into one API, and then allow it to be used as a general purpose application to which other microservices connect to. Like say, I don't know having some fault tolerant app that creates cron jobs to notify users based on their schedules. This app would then call that main CRUD to fetch some data or something. However, doesn't this kind of break the utility of microservices. AKA their independence? If all my microservices depend on a CRUD, and there is a point in which this CRUD API has to be updated and redeployed, then everyone is pretty much screwed there until this CRUD comes back into play.

    Then there's also stuff like Kafka which works to create streams and other stuff to which other microservices can connect to.

    So, I'm very confused by all of this because I'm really not sure what to follow. In addition to this, there's also musings about whether each service needs its own database. Some people say you should work with on DB, others say each microservice needs its own DB. But what does this mean?

    Does it mean you have replicas of a DB for every service? Do you have a database that just includes the tables that a service needs?

    Again, this is all very confusing.

    submitted by /u/Tarsonis444
    [link] [comments]

    Random question I cannot find the answer to. Is the difference between languages just the different compilers used?

    Posted: 21 Jun 2021 09:22 PM PDT

    Hey all, I am a computer science student and I was just having a strange thought. Since we are able to code our own compilers for whatever language we want from scratch (hypothetically speaking, clearly this is extremely hard and outside of being an education experience, a waste of time), we can hypothetically change the rules of how the code is compiled down into assembly.

    So if this logic is correct, then if we can change the compilers, could I not program my own c++ compiler to need to follow the syntax for Java? So essentially when I initially tried to create a c++ compiler I actually created a Java compiler.

    So following this logic track, in my brain I realized I had this question, is the difference between coding languages not the languages themselves, but actually the compilers / interpreters that convert them into assembly?

    I know this was a weird tangent, but I have adhd and when I have a random shower thought like this I need to know the answer or I won't sleep, and since I couldn't find the answer from a quick Google search I thought I'd ask here. Thanks all!

    submitted by /u/BasedJayyy
    [link] [comments]

    Verbose documentation: my ADHD brings all the devs to therapy (and bonus question)

    Posted: 21 Jun 2021 08:02 PM PDT

    I have reading comprehension issues. It's not fun. man(ual) pages tend to make me nauseated because I fear not understanding them as they're laid out. I hear "RTFM" and I mentally want to respond "I tried, I'm just dumb." And so when I write something, I go overboard. I overshare. An introspective on my anxieties with code:

    So what I am to understand is that good code is self-documenting - to say that if you write decent code, it should make sense what it does merely from reading it. If there are tough mechanisms or decisions made about why a choice was made to do something, then bust out the in-line documentation.

    I suck at this, because mentally (and indeed verbally as this post may demonstrate) I get verbose about things because A, I feel like I have to explain each piece and B, I'm fearful of forgetting how to read my own code later on.

    So I over-document. My github has only a few exercise projects on it, but in three of the four projects I have up there I have documented the crap out of nearly every line to remind myself what I'm doing (because I know how my mind works for the most part, I know what I'll forget)

    So what would be better? Detailed in-line documentation, or a detailed readme and leave the in-line comments few and far between?

    Bonus question:

    If you want to r/RoastMe over my verbose comments, check out this exercise in messing around with ascii representation at https://github.com/ecdestro/ascii_decode

    I bring this particular exercise up because I have a genuine question about a mechanism in my code at line 24. I wish I could find the Stack Overflow thread where I found that snippet to see if there was documentation on what !!((char << iterator) & 0x80) actually does. I've tried to speculate, but that resulted in a paragraph of in-line comments in my code.

    Is my documentation correct? Am I understanding that expression correctly? And would it be better to explain it in the readme, or for an expression like that do you need a degree of in-line commentary?

    Thank you for following me this far, I'm grateful for commentary and constructive criticism.

    submitted by /u/ecdestro
    [link] [comments]

    What are the kinda or Goals an out of college graduate should have in a big company?

    Posted: 21 Jun 2021 02:50 AM PDT

    Just started last week and I have a meeting with my manager I think next week, to talk about my goals. Any recommendations?

    submitted by /u/greywolf_18
    [link] [comments]

    Question on client-server interaction based on ping

    Posted: 21 Jun 2021 05:35 PM PDT

    hi there.

    Since my question is not "specific" enough for stack overflow as I am told by moderators, on the matter that I am trying to understand something rather then having a clear problem to be solved, I am asking here.

    To have a context: I am a software developer myself. I think the correct term is Fullstack since I do anything from programming Front-, to Back-end and Server maintenance (being the only one IT guy comes with such "perks"...). In case of this question I don't do much in this matter of "real-time" interaction.

    The topic in question:

    Following scenario (loosely based on my real experience in Modern Warfare MP):

    Two players move onto the same corner from different directions and about to collide on said corner. Player 1 (P1) has a ping of 30ms.
    Player 2 (P2) has a ping of 180ms.

    As far as I understand this: if any other factors are identical P1 must win this engagement 10/10.

    If we apply some simple math (given that reaction time on both players is ~40ms)
    from
    "being able to see enemy"
    over
    "reaction"
    to
    "reaction received by server"
    we get:

    P1 > 30ms + 40ms + 30ms = 100ms

    P2 > 180ms + 40ms + 180ms = 400ms

    Based on that the whole action chain by P1 is finished and should be resolved by the server even before P2 has gotten his first item in his chain. Which further implies that before P2 even has time to react he already lost the engagement due to his 6-times higher ping?

    And if this is true, how is it so common that players with 3-8 times higher ping tend to be the "best" (fastest) player by score?

    How would a server even handle the time gap between the majorly different time "zones" without "cheating" in some form and without any party having lag in any form in game?

    Based on the high ping P2 should be literally ~1/5 of a second behind the reality on the server.

    It boogles my mind bc this whole thing seems to violate the cause-effect chain.

    Any suggestions are appreciated.

    Thanks for reading.

    submitted by /u/enracor
    [link] [comments]

    Need advice on database schema for storing complex json

    Posted: 21 Jun 2021 03:01 PM PDT

    the json collection is like this [{ id: name: year: credits: [{id: "", name: "", role: ""}...] genres: [{id: "", name: ""}...] seasons: [ { id: name: season_number: episodes: [ {id: "", name: "", season_number: "", episode_number: ""}, ...] }, ...] }, ...]

    submitted by /u/Bulbasaur2015
    [link] [comments]

    const char * and char[] in C

    Posted: 21 Jun 2021 01:38 PM PDT

    This question might seem dumb but bear with me. I know that a pointer is a variable that holds the memory address of another variable, but I don't understand how it could point to an array of characters (char *p = "hello"), since an array holds multiple values, the pointer would only be able to point to one of them. I appreciate any help.

    submitted by /u/ZED_118
    [link] [comments]

    Style xlsx programmatically with javascript

    Posted: 21 Jun 2021 07:27 AM PDT

    I'm trying to figure out how to programmatically style xlsx files using javascript but having trouble finding info about it. I found SheetsJS but it's not free to use it for styles. Any suggestions people have used in the past? Thanks!

    submitted by /u/motel_one_sun
    [link] [comments]

    Split string by uneven character counts

    Posted: 21 Jun 2021 01:12 PM PDT

    Hello,

    I am trying to take a long string of characters and split them into separate fields. I have found ways to split them evenly using various languages and by using Excel's Power Query but I can't seem to find a way to split them by various character counts.

    For Example, if I had the line below:

    FHEU84390KJ 000FYU78DJ JF**3JOWD837700 000 000 0000

    I want to be able to grab the first 3 characters, the next 8, the next 1, the next 3, and so on. There wouldn't be a particular pattern.

    The only way that I have come close so far is to throw the entire string into a cell in Excel and then manually grab the characters like:

    =MID(A1,1,3) =MID(A1,4,11)

    But with a sting that contains over 1,000 characters there has to be an easier way.

    Any help is much appreciated! I'm also willing to use any language that this makes the most sense in. Thanks!

    submitted by /u/jclarkeftw
    [link] [comments]

    Best programming language to start my journey in app development

    Posted: 21 Jun 2021 12:32 AM PDT

    Hello there!

    I am college student majoring in computer science. I would like to focus on app development once I graduate. So, I want to start practicing now to have more confidence and experience when making an internship or graduate.

    I already know the basics of Java, python, and C++. But I have understood the three are used for app development.

    I would like to focus on the most versatile for all kind of apps.

    So, which one do you recommend me? Also, do you know some good books for app development?

    Thank you!

    submitted by /u/Jaaavsss
    [link] [comments]

    Convert UTC Time to PST Time Ruby

    Posted: 21 Jun 2021 01:01 PM PDT

    I have a time in the format 2020-03-15 02:00:00 UTC, and I was curious how in Ruby I could convert this into something readable and in PST time, such as March 15th, 2020 7:00:00 PM PST? Preferably without any gems in plain Ruby.

    submitted by /u/InvictusJoker
    [link] [comments]

    How to get a prompt for a particular phrase/keyword posted on Twitter?

    Posted: 21 Jun 2021 12:43 PM PDT

    Non-coder here. I want to know if I can receive a prompt Everytime a phrase is posted on Twitter and LinkedIn to help my job search and automate this process.

    Is there any way this can be done?

    Thanks

    submitted by /u/Scarcity_Lopsided
    [link] [comments]

    Trying to program an input-output calculator that I can embed on my website

    Posted: 21 Jun 2021 05:55 AM PDT

    I am trying to figure out a way to embed code onto my website that will allow the end-user to input a value into one field, and then return a value in another field based on an underlying lookup table.

    Here's a mock version of the lookup table I'm using (my data is different of course), and I've included a simple sketch of what I am hoping the end result to look like.

    Thanks in advance for any assistance!

    Note: The actual lookup table has about 200 rows.

    LOOKUP TABLE

    1 10
    2 20
    3 30
    4 40
    5 50

    SKETCH

    INPUT (User-Generated) OUTPUT (Program-Generated)
    3 30
    submitted by /u/learningtoexcel
    [link] [comments]

    What makes you bad at your job?

    Posted: 21 Jun 2021 08:01 AM PDT

    A beginner's doubt in programming

    Posted: 21 Jun 2021 07:58 AM PDT

    I have just started to learn cpp. The video series that I am following introduced me to lot header files like string, ctime, cstdlib, and their associative functions/methods for strings.

    My doubt is do I need to remember all these things to crack that coding interview or solve the competitive problems? Pls help me in this regard.

    submitted by /u/newton_VK
    [link] [comments]

    I have an app idea but don't know where to start.

    Posted: 21 Jun 2021 11:19 AM PDT

    I am a Computer Science major (Freshman) and I want to make an app/website but I don't know what skills I need to develop it or where should I start.

    submitted by /u/toilented
    [link] [comments]

    Best websocket option

    Posted: 21 Jun 2021 10:43 AM PDT

    Hi all!

    I'm developing an Electron web-app which uses Python for backend and vue.js for frontend. The backend and the frontend communicate through websocket(s). However, I'm wondering which of the following is the best option:

    • Have a single websocket for all communications and use a communication protocol in a json so that the backend and the frontend understand each other (e.g., send commands to backend, send data to frontend, etc)
    • Have several websockets, and use the websocket endpoints to pass messages (e.g., 192.168.1.100:9000/ws/acquisition/send_data and 192.168.1.100:9000/ws/acquisition/start_acquisition)

    What you guys think it's the best option? Having the routs in HTTPs makes all sense - but so does it for websockets?

    Thanks!

    submitted by /u/Resident_Slide6705
    [link] [comments]

    [Javascript] How can I download an HTML document from Firefox console?

    Posted: 21 Jun 2021 02:38 AM PDT

    Hi,

    I have this code which attempts to collect solutions of a textbook on Chegg into an html document newDoc.

    The code works. It browses through every solution on Chegg and extracts the solutions into the said variable. Problem is, I do not know how to actually download the contents of this variable into an .html document which can be viewed in a browser or converted into a PDF.

    Can anyone shed light on this? I am javascript noob, so I might be asking something obvious.

    I have tried browser.downloads.download(newDoc ) but did not work.

    https://github.com/stefan-lacatus/chegg_downloader/blob/master/index.js

    submitted by /u/giorgi3092
    [link] [comments]

    No comments:

    Post a Comment