• Breaking News

    Tuesday, May 4, 2021

    Is a book from 2015 too old to learn from? Ask Programming

    Is a book from 2015 too old to learn from? Ask Programming


    Is a book from 2015 too old to learn from?

    Posted: 04 May 2021 12:09 PM PDT

    Hello all. I have in my possession a book on JavaScript coding, but it's from 2015. Could I learn from this book, or should I seek something more up to date? Thanks for any help.

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

    Will backend development and operations actually "merge"? And if so: are you comfortable with this?

    Posted: 04 May 2021 01:16 PM PDT

    I'm a backend developer closing in on 6 years in the field. I don't think that I'm a great developer, but I don't think that I'm bad either. I've always felt that I'm a bit different from the typical developer when it comes to personality traits and interests outside of work, but one thing I have in common with most of my colleagues is that I like to write code.

    I love it when I can spend most of my time in my favorite editor with my favorite language. I like making the code look clean and readable. I like writing small unit tests. I like the satisfaction you get when everything runs smoothly and all tests are checked. I like starting new projects and slowly seeing all the parts coming together. I like it when a new functionality is delivered and peoples' work or even life is made easier because of it.

    But something seems to have changed with the backend developer role over the last few years. The role of the backend developer is slowly merging with the operations role. You spend more and more time inside terminals, config files and logs. If you don't know Docker and Kubernetes really well at this stage, then you are practically considered a joke on the job market. You should also be a cloud wizard. Oh and you should definitely know Apache Kafka. And most things related to security.

    Has it always been like this or am I still too fresh to see the big picture? 6 years of experience isn't that long after all.

    It seems to me like the roles were a lot more defined before. That it was OK to "just" be a good backend coder. On the last project I was assigned to, one of my colleagues was a man in his mid 60's. I was blown away over how little he knew technically beyond Java and Hibernate. But in return, he was really good at both. I thought to myself: "that's how I want to be like when I'm close to retirement. Just writing code and doing what I feel comfortable with, while still being able to improve my skills daily"

    Maybe I should just suck it up and accept that the job I signed up for isn't what I thought that it was. But I can't help but feel like a plumber who's suddenly forced to work as a car mechanic as well. I never thought that I'd say this, but frontend development is suddenly starting to look interesting. I know basic HTML, CSS, JavaScript and React, so a part of me is actually considering jumping ships, as frontend developers seem to be allowed to "just" code. Then again, I like backend code a lot more. It's just cleaner and more elegant to me.

    Am I alone in having these thoughts?

    submitted by /u/t-away_hey_hey_hey
    [link] [comments]

    How did online video games maintain a persistent connection with the server before WebSockets?

    Posted: 04 May 2021 03:12 PM PDT

    WebSockets didn't come around until after 2010. Online gaming has been around since the late 1990's.

    How did online games allow clients to maintain a persistent connection with the server, in the early days of the Internet? Did each online game engine have its own system for persistent connection or something like that? What technology did they use?

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

    Why is it not advisable for a developer to start his career as a full time remote worker for a company or a freelancer?

    Posted: 04 May 2021 09:31 PM PDT

    What are the cons?

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

    Recently started a new job as a Full stack intern, but I'm so damn confused

    Posted: 04 May 2021 09:08 PM PDT

    Hey everyone,

    So second day into my internship, and I'm supposed to be working on a ticket

    The problem is, I have no goddamn idea what this code base does. Everything is a php file, and I have no idea how to even start the Live Server to view my work / change stuff

    I was trying to set up a virtual host through Apache 2, and for some reason, I just cant seem to understand how the directory works.

    Where am I supposed to start if theres no damn index.html? What can the live server even load?

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

    Google Cloud Run Question

    Posted: 04 May 2021 09:03 PM PDT

    Does anyone use Cloud Run with Cloud SQL? Really need some advice from a senior... I am trying to set up test environment. I am using a Mac and am thinking about connecting to my local postgresql during testing. How do you do it?

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

    Is there an API/SDK that enables publishing an article on multiple platforms? (medium, wordpress, etc...)

    Posted: 04 May 2021 08:37 PM PDT

    I've been perusing and surprised that there's no API/ SDK that enables publishing of an article/ document on multiple platforms (medium/ blog/ Webflow/ Wordpress pages/ standard html)

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

    Want user input of exactly “(x,y)” Including parentheses and comma

    Posted: 04 May 2021 08:35 PM PDT

    [deleted]

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

    What are some good independent courses or books on the applications of AI?

    Posted: 04 May 2021 08:20 PM PDT

    I finished a tutorial series on how a neural network works and how to make one (I watched the Nature of Code series. It is on YouTube). Now I want to move on to learning how to apply an ai to different scenarios.

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

    Can you trigger a post request upon receiving a Gmail email, that contains that email's content?

    Posted: 04 May 2021 08:08 PM PDT

    The only way it seems straightforward to do this seems to be to use a program like Zapier - is there any way at all to configure this from gmail automatically?

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

    I'd like to make a program for my laptop that notifies me on screen when my battery hits 40%. Can I only do this with certain programming languages?

    Posted: 04 May 2021 01:06 PM PDT

    noob question

    Posted: 04 May 2021 04:41 PM PDT

    I have a visual novel/choice game idea. I have all the scripts and art set out but I CANNOT PROGRAM. I'm a teenager and have no money to pay a programmer to develop the game for me, and I live in Australia, what do I do?

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

    n00b here: I've spent all day trying to do something I bet Is extremely simple

    Posted: 04 May 2021 04:29 PM PDT

    Hi Everyone, here we go with embarrassing myself.

    So, I have a google form where I would like one of the questions to populate based on a list I have in a google sheet. I was able to do that, YAY! However, I can't get it to remove duplicates before populating the the options in the form. The list in google sheets is going to be constantly added to over time. Below is the code that I have written. Any help would be greatly appreciated.

    function getDataFromGoogleSheets() {
    const ss = SpreadsheetApp.getActiveSpreadsheet();
    const sheet = ss.getSheetByName("Inventory Data");
    const [header, ...data] = sheet.getDataRange().getDisplayValues();
    const choices = {}
    header.forEach(function(title, index) {choices[title] = data.map(row =>row[index]).filter(e => e !== "");});
    return choices;
    }

    function populateGoogleForms() {
    const Google_Form_ID = "1Bu-sdLlxM2KzGZTqPdxNgv23lS-iGIPLa6KPr4uQU74";
    const googleForm = FormApp.openById("1Bu-sdLlxM2KzGZTqPdxNgv23lS-iGIPLa6KPr4uQU74");
    const items = googleForm.getItems();
    const choices = getDataFromGoogleSheets();
    items.forEach(function(item) {
    const itemTitle = item.getTitle();
    if (itemTitle in choices) {
    const itemType = item.getType();
    switch (itemType) {
    case FormApp.ItemType.CHECKBOX:
    item.asCheckboxItem().setChoiceValues(choices[itemTitle]);
    break;
    case FormApp.ItemType.LIST:item.asListItem().setChoiceValues(choices[itemTitle]);
    break;
    case FormApp.ItemType.MULTIPLE_CHOICE:
    item.asMultipleChoiceItem().setChoiceValues(choices[itemTitle]);
    break;
    default:
    Logger.log("Ignore question", itemTitle);
    }
    }
    });
    }

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

    Naming conventions for functions, should_render_UI(bool)?

    Posted: 04 May 2021 03:58 PM PDT

    I'm doing some code cleanup, and I'm trying to figure out the language convention for condensing if statements into a function. I've simplified my code base for discussion purposes. Say my code looks like:

    function helloworld(){ if (bool){ render_ui(); } } 

    Updated to:

    function helloworld(){ should_render_ui(bool); } function should_render_ui(bool){ if (bool){ render_ui(); } } 

    Is there a better prefix than "should"? "should" feels like it would return a boolean value, so maybe there's a better word for it. At the moment I've come up with a blank. Is there convention for this type of function?

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

    Need some small advice for designing a rest api / backend

    Posted: 04 May 2021 03:54 PM PDT

    Hey so I've been experimenting with creating a backend server and I have the following tables: user and post. The post has a foreign key user_id referencing the id of user. Every user and post has a name and you can get a specific post from a user via this http request:

    GET /posts/{username}/{postname}

    Now my question is, since I have username and postname as path variables, I need to find a user with the username to get the user id and then I can get the post with the matching user_id and postname because posts can have the same title when created by different users.

    It feels kind of weird that I have to fetch a user every time first just to get the user id, is there some kind of other way to do this more cleanly? Should I rather just use the ids as path variables to avoid this? Or is that a standard procedure that is considered okay?

    Thx in advance

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

    Posting data to a website

    Posted: 04 May 2021 03:50 PM PDT

    So I have a use case where i would like to pass data to a website on click and have it show up. A user clicks a confirmation button and an iframe pops up on the next slide and shows that data on that site prefilled from what I just sent. There are complicated reasons behind why i'm using an iframe, but it has to do with the default behavior of a redirect (and not being able to post data without it). Anyway, Im trying to send that data but am getting errors:

    Access to XMLHttpRequest at 'https://unbouncepages.com/test-example/' from origin 'https://app.unbouncepreview.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    This is my code:

    <script>

    var formData = document.getElementById("Form4");

    let data = {formData: formData};

    var xhr = new XMLHttpRequest();

    xhr.withCredentials = false;

    xhr.open("POST", 'https://unbouncepages.com/test-example/', true);

    xhr.setRequestHeader('Content-Type', 'application/json', 'Access-Control-Allow-Origin: *');

    xhr.send(JSON.stringify({

    value: data

    }));

    </script>

    Im not sure why its telling me the Access Control Allow Origin parameter isnt on the resource. Am I not adding it correctly?

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

    Web development - Smooth transition or clean cut?

    Posted: 04 May 2021 02:38 PM PDT

    Hi everyone,

    I am in a kind of "luxury situation" and would appreciate different opinions on my situation in order to make a sound decision.

    I worked as a sneior it project manager at a big e-commerce company and right now I am doing a full-time web developer coding bootcamp, which is ending in around 5 weeks. I am having an offer from my old company to start again as a senior it project manager. My ultimate long-term goal would be to work remotely as ruby/JS backend developer.

    Should I take the job and transition slowly (doing code wars and own projects on the side), advancing my skills only in my freetime and search a new job on the side or do a clean cut and search a jr dev. position (probably earning 40% less money for the next years) and having more time to focus on advancing my skills as my day-to-day job?

    Thanks fo your support girls and guys :)

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

    Learned Java from scratch to multidimensional arrays, ArrayLists, and String methods. What would be the next few topic I should be focusing on while in this learning journey?

    Posted: 04 May 2021 09:38 AM PDT

    does anyone know where i can find a list of electronics manufacturers APIs?

    Posted: 04 May 2021 05:41 AM PDT

    phones,laptops,TVs or even blenders and and electrical appliances! does anyone have a list of APIs that cover at least the big names?

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

    Helping a newbie way over his head

    Posted: 04 May 2021 12:49 PM PDT

    So, i have a huge amount of txt file, and i need to find 1 element in them
    98% of this file have a similarity, so i'm using this function

    FormData.Where(function(x) String.Equals(x.key.toString().Trim(),"Numero :")).ToList().FirstOrDefault().Value 

    That let me take the number after the word "Numero :"

    But there that 2%
    I need to take the number on raw 45 of this 2% document, since is the data i need.

    (Is needed for a cross reference on a databse, when i find that number it start a different process somewhere else to print some data in a place)

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

    Data is being rendered twice

    Posted: 04 May 2021 09:03 AM PDT

    So I am collecting some data from the firebase firestore and i wanted to display it. I managed to get the data through the .get() method. But for some reason the data is being displayed twice.
    JS

     function renderList(doc) { let li = document.createElement('li') let name = document.createElement('span') let bloodGroup = document.createElement('span') let district = document.createElement('span') let phoneNumber = document.createElement('span') let vaccineDays = document.createElement('span') li.setAttribute('data-id', doc.id) name.textContent = doc.data().name; bloodGroup.textContent = doc.data().bloodGroup; district.textContent = doc.data().district; phoneNumber.textContent = doc.data().phoneNumber vaccineDays.textContent = doc.data().vaccineDays li.appendChild(name); li.appendChild(bloodGroup); li.appendChild(district); li.appendChild(vaccineDays); document.getElementById("donator-list").appendChild(li) } db.collection("donators").get().then((snapshot) => { snapshot.docs.forEach(doc => { renderList(doc) }) }) return ( <div> <ul id="donator-list"> </ul> </div> ) 
    submitted by /u/SoulAssassin95
    [link] [comments]

    When is it ok to use *args and **kwargs?

    Posted: 04 May 2021 08:55 AM PDT

    I've made a small program that imitates a database by gathering data from Excel files. I'm aware this is a terrible way to store data, but this is the restriction placed on me by the employer.

    I am the only one in my department and the only one using this code. I imagine there will only ever be one person using this code when I leave.

    I use openpyxl for working with these Excel files. It's come to my attention that I could remove around 1/2 of the code and make future code incredibly easy to write provided I use *args. I am documenting heavily to but I don't want to make this change because it's dangerous to have variable arg numbers,

    So when is it ok to use *args?

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

    Programming Stress and General Advice

    Posted: 04 May 2021 06:16 AM PDT

    Hi all, I just started as a programmer for a research project (yesterday). However, I'm still a student and still don't know a lot. I woke up this morning drowning in my own sorrow because I feel like I don't know how to do what they want and won't be able to deliver anything. Initially (after the interview), I thought I could make a GUI and program on Python and have a Python app. But now they say they definitely need it to be a web app hosted on a server. I don't even know how to do that to the extent they need. Like a basic web app like a personal website I've done before with HTML, CSS, and JS. But this program requires a login interface, stock trading interface (game), and needs to provide files for users to look at, and also needs to save the data the user is inputting. Like ?? This seems like a full scale production to me that requires more than 1 programmer?

    How do people deal with this kind of stress and worry? And if you have any advice on programming this I would humbly be open to it.

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

    Is Python the right language for this?

    Posted: 04 May 2021 05:52 AM PDT

    I'm looking to retrieve results from a query on Autotrader and dump that into a csv file (or some other delimited file).

    I'm looking for a particular vehicle and want to automate the search.

    The entire URL would be something like this

    https://www.autotrader.com/cars-for-sale/lexus/gs-f/san-antonio-tx-78222?dma=&listingTypes=CERTIFIED%2C3P_CERT%2CUSED&searchRadius=0&location=&marketExtension=include&endYear=2019&isNewSearch=true&showAccelerateBanner=false&sortBy=derivedpriceDESC&numRecords=25

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

    No comments:

    Post a Comment