• Breaking News

    Monday, August 30, 2021

    Is it normal to hate visual studio? Ask Programming

    Is it normal to hate visual studio? Ask Programming


    Is it normal to hate visual studio?

    Posted: 30 Aug 2021 10:10 AM PDT

    I keep hearing praise for it.

    I hate it but im a junior so that means nothing, but veterans at my work place hate it aswell.

    One of them at a previous job hated it so much that he just decided to code all his C# stuff using Vi

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

    How do you refresh your memory?

    Posted: 30 Aug 2021 09:08 PM PDT

    I started learning how to code but decided to stop due to covid (I was going to an achademy but couldn´t adapt to the online classes). Now, I would like to resume where I left off however I realized that I forgot a lot of things. Does anyone have any advice on how to refresh my memory? Do you have a method to review what you know? Do you start a new project and look for what you don´t remember? Do you reread your older projects? Or do you read books about the subject?

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

    How else can I access a marketplace's product information via code, preferably Python?

    Posted: 30 Aug 2021 08:33 PM PDT

    In order to scrape products off Ali Express, I can run window.runParams.data in Chrome's console to access all of the information very easily. Knowing this, I used regex to scrape product information directly from Ali Express's HTML without having to simulate a million clicks to make the information appear in my screen and only then extract it.

    I am trying to do the same thing for another website called Mercado Livre. The thing is, each product can have variations, each of which may or may not have a whole other set of frequently more than 10 images. It's a lot of images and, unfortunately, I can't access window.runParams.data as I did for AliExpress. This is the error I get when I try:

    VM228:1 Uncaught TypeError: Cannot read property 'data' of undefined at <anonymous>:1:18 

    It probably doesn't matter but the variations section comes in buttons:

    https://produto.mercadolivre.com.br/MLB-1870995603-brinquedos-sensoriais-popit-bubble-fidget-52-pecas-_JM

    Or dropdowns:

    https://produto.mercadolivre.com.br/MLB-1862560460-kit-brinquedos-sensoriais-fidget-push-pop-it-49-pcs-_JM

    What is the easiest way to scrape all of these images' URLs using Python without having to simulat clicking? I looked at the code but I got very confused because many of the images are shared between variations so using Ctrl + F to look for URLs and try to find the location of each variation was impossible.

    All of the thumbnail ones (for example this one) would suffice as I can just replace the R by an F at the end of the URL and it becomes large, like this.

    Thank you very much!

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

    Divide Two Integers without multiplication, division, and mod operators solution clarification (leetcode)

    Posted: 30 Aug 2021 08:00 PM PDT

    Problem description: https://leetcode.com/problems/divide-two-integers/

    I'm having trouble getting one part of this solution. I duplicated the most basic solution that uses repeated subtraction.

    To summarize, the algorithm repeatedly subtracts the divisor from the dividend until the dividend reaches 0 to find the quotient. It works from the negative side because of issues with -232 having no equivalent on the positive side.

    What I don't completely understand is the negatives part (the counting and the final conditional).

    int negatives = 2; 

    ...

    if (dividend > 0) { negatives--; dividend = -dividend; } if (divisor > 0) { negatives--; divisor = -divisor; } 

    ...

    if (negatives != 1) { quotient = -quotient; } return quotient; 

    Why does it start at 2? Why does it decrement negatives when it's making another negative? And the final conditional?

    Full Java solution is below.

    public int divide(int dividend, int divisor) { // Special case: overflow. if (dividend == Integer.MIN_VALUE && divisor == -1) { return Integer.MAX_VALUE; } /* We need to convert both numbers to negatives * for the reasons explained above. * Also, we count the number of negatives signs. */ int negatives = 2; if (dividend > 0) { negatives--; dividend = -dividend; } if (divisor > 0) { negatives--; divisor = -divisor; } /* Count how many times the divisor has to be added * to get the dividend. This is the quotient. */ int quotient = 0; while (dividend - divisor <= 0) { quotient--; dividend -= divisor; } /* If there was originally one negative sign, then * the quotient remains negative. Otherwise, switch * it to positive. */ if (negatives != 1) { quotient = -quotient; } return quotient; } 
    submitted by /u/kreses
    [link] [comments]

    A question for Kotlin developers...

    Posted: 30 Aug 2021 06:54 PM PDT

    My aim is Android development with Kotlin, I have a low-end pc thus I can't afford using Android Studio or IntelliJ thus the last option infront of me is Eclipse, Can u share your experiences of Eclipse as a Kotlin dev? Can I create intermediate level kotlin projects with it? 𝐓𝐇𝐀𝐍𝐊𝐒

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

    Tips to stay motivated as a solo dev?

    Posted: 30 Aug 2021 12:21 PM PDT

    I've been in and out of teams for a long time and I feel like I'm super motivated when I'm working with other devs. Now I'm back to solo contracting and it's hard to keep myself going. I wonder what other solo devs do to keep focus and motivation.

    Also how do you deal with QA and Code Reviews?

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

    People who prefer functional programming, are there positives for OOP that you acknowledge? Or cases you think OOP would be better for?

    Posted: 30 Aug 2021 09:30 AM PDT

    As a self-learned developer, I've found my home to be with functional programming. It just makes a lot more sense to me and easier to debug. But I am afraid of my bias, having not experienced OOP enough. I am trying to keep an open mind and consider the positives of OOP.

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

    Taming a lot of vba

    Posted: 30 Aug 2021 06:13 PM PDT

    I'm working with a control system (GE's ifix) that uses old school vba. I've written a lot of excel vba myself and it can be fine when fit to purpose. The issue is I have a lot of it in the system I'm working with, and I need to clean it up. As such, I need it in a text file (diffs, control it, deal with the large amount of code)...

    So, um, I know vba is old but why are there no basic ways to control it other than copy-paste? I mean really.

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

    what technology is used to create this gallery that a user can "walk-around"? (link is NSFW)

    Posted: 30 Aug 2021 11:41 AM PDT

    https://gallery.cumrocket.io/

    sorry for the crass link, but it's the only example I can find of a website where the user can "walk-around" and observe different images.

    I'm a month into learning web dev and would like to work on a project with similar functionality.

    Can you steer me in a direction to learn how to make something like the link? Thanks!

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

    You open a code file. How do you read it? What order do you follow?

    Posted: 30 Aug 2021 11:26 AM PDT

    please mention the language/framework you usually use.

    For me, I tend to scroll to find the main exported unit (function, class, etc). If none exist, such that it runs like a script, I find the top level code, slipping all function and class definitions.

    If the main unit references or invokes other units (function calls, etc.), I try to deduce the functionality from the name of the referenced unit. Sometimes, the name is not clear enough, and I have to pause reading the main unit and to read the referenced unit. But in general, I try to read the main unit until the end first, building a mental structure of the algorithm step by step, and trying to deduce its potential input and output.

    From there on out, I go to the referenced units that have me curious about their implementation and read them similarly. If they reference yet other units, I do the same as above.

    One difference is when I'm using frontend code. With frontend, if it's a framework like react, I look at the HTML (or JSX, etc) markup first, treating it like the "exported unit" above, and reading referenced JavaScript units after. I tend to ignore CSS unless I specifically need it.

    Would love to know how others do this!

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

    How do I create UI's like this?

    Posted: 30 Aug 2021 11:19 AM PDT

    I often see beautiful UIs like this: https://webdesigntips.blog/web-design/javascript/28-best-react-js-admin-dashboard-templates/#1Endless_8211_React_Admin_Template

    Since these are "react templates", obviously I'll need to know some react. But what I'm more interested is the look/feel of the application, the modern design. I've been a back end developer for years now, and I've always wanted to try my hand the more creative aspect to development. I have a few applications I've written such as a journal application in python that I would LOVE to give a UI to but I just don't really know how.

    So I'm wondering, what are some core technologies I need to do "UI work"? Are these templates more react knowledge or, CSS? Or even Javascript? Every time I try to start I just don't even know where to start. Any guidance is much appreciated.

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

    Do I need a wordpress plugin or a webapp?

    Posted: 30 Aug 2021 01:29 PM PDT

    I have a website where people learn German. The CMS is WordPress.

    I would like users to be able to practice the lessons via Flashcards.

    I want the Flashcards to have pictures, text, and audio.

    The Flashcards need to follow a spaced repetition.

    I also want to see how students use the flashcards solution.

    I quite like Anki and would like to have a similar flashcards solution on my website.

    So, I want to contact a developer and ask him/her to create such a solution that can be integrated into the website.

    The only problem is that I don't know whether to ask him/her to make a WordPress plugin or to make a webapp.

    I don't know that much about programming to see which one is more appropriate.

    Can you give me any advice as to which is better?

    Perhaps something else is even better?

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

    Should I put that I use the VIM extension on VS code on my resume?

    Posted: 30 Aug 2021 04:50 PM PDT

    What does it take, and how does it work to change the geometry in a game?

    Posted: 30 Aug 2021 04:28 PM PDT

    Like GTA, or even NFS for example. How does it work to change the geometry of an aspect of a game? Like the map, or a car, or character model etc.

    I see these people doing all the time but I never knew how they pull it off? I know you may need knowledge on the programming language it was written in in order to make it work, or learning what file type the map is example so you can open it. But it's always made me so curious.

    For example, porting a map from a Need for Speed game into another. (Like World to Carbon like the new one recently.) How do they make it work? I know they make a tool for the purpose, but what are these tools actually doing?

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

    Writing an app that interacts with a dial up connection.. any software telephony experts out there?

    Posted: 30 Aug 2021 04:18 PM PDT

    I have a Shark MX for the Gameboy that I'd like to write a server for. The Shark MX was a cartridge for Gameboy that contained a modem and would allow you to dial in to a remote network in order to send or receive email. As you may guess, the company and service has long since been defunct.

    I'd like to interact with this device. I believe this would involve simulating a dial-tone and phone system that would allow me to connect the Shark MX so that it can "dial in" to its server (which would be my custom app at this point), capture the phone number that was dialed, as well as receive data and send data back. I believe I need at least the following:

    1. USB modem
    2. Laptop/desktop to act as a hardware server
    3. Software PBX to provide some routing and log information
    4. A custom application that I will write that can listen for data coming in and respond in kind

    I have extensive software development experience but very little dial-up / phone comms experience other than memories of using AOL dial-up a long long time ago.

    I have created a simple diagram of how I'd imagine this would look like, please see here:

    https://imgur.com/a/HkDDrtw

    I have some questions about this implementation:

    1. Is this diagram accurate in what I need? Is it missing components that I'll need to actually get this working?
    2. How would I use a software PBX (e.g. Asterisk, FreePBX, etc) that can forward the bytes sent from the device to a custom app and then take bytes from the app as a response to send back to the cartridge in the gameboy?

    Thanks, fellow redditors!

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

    How did you get rid of technical debt?

    Posted: 30 Aug 2021 12:08 PM PDT

    With technical debt being an ever present in most software industries. How did you fix/replace it? Did you migrate and what did you migrate too?

    I'll start, we had a PHP queue consumer for SMS messages, it was running really CPU heavy and scaling constantly to 4-6 containers. We wrote another service to the same job in Golang. Because it was queue based our transition was relatively easy.

    We filtered a small number of events on prod to a test queue to make sure the system was wired up correctly. Then stopped the PHP listener. Finally we switch the queue to the golang service that was running relatively low CPU capacity on just 2 containers. Pretty satisfying all in all.

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

    Python - Which GUI framework to use for these 2 small projects?

    Posted: 30 Aug 2021 05:17 AM PDT

    Hey everyone,

    never did anything with GUIs, but I figured it'd be fun to try to get into it a little. Not sure if what I plan on doing is actually harder than it sounds, but won't know until I try.

    1. Diablo 2 Rune(word) "Calculator"
      I'm not sure if you're familiar with the game, but I had something like this in mind (but a lot more amateurish!): https://www.diablo2runecalculator.com/

    You have pictures of runes in a window.. and by clicking on them it shows you which runewords you can craft/create with those.

    2) Phone-Keypad

    like this: https://youtu.be/yrqyol4B1RU?t=429 (I believe this one was made with pygame)

    You should be able to input numbers by simply clicking on them (+ have them show up in a small window above). A few extra buttons with additional functionality, like adding a name to it + saving it to a shelf via the shelve module or just in a regular txt file etc.

    Assuming this won't prove too hard for me, can I do all this just fine with Tkinter? People often say it's the easiest one to get into/use. Or would a different one be better?

    Thanks!

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

    When you start working at a new job, what things build your confidence what are some red flags?

    Posted: 30 Aug 2021 07:25 AM PDT

    Tech oriented jobs of course.coding, testing, ops, infrastructure, etc... doesn't matter much.
    Looking to help build out our own dev practices to help us land on the good side of things.

    Looking for some things your looking to confirm/deny that the team is doing or not doing.

    Basically looking for the things you could see on "day 1" that help you either feel good about moving to the new place or things that make you go "Oh Crap WTF did I just get into?".

    e.g.If you come into a team and none of the repos have documentation to help you get started.. how big of a problem is that for you?

    What if the company didn't have any production monitoring. (red flag?)

    failing tests in CI? but we still move forward with production deploys? (red flag?)

    Team holds design sessions with product, UX and engineers.. (good sign?)

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

    multiples react projects within one

    Posted: 30 Aug 2021 11:10 AM PDT

    let's say we have a react project X (which is going to run with electron) broke down in parts small react projects A, B, C to reduce complexity. What's a good way to reuse those A, B, C components into X? I thought into making it modules and just install it in X but it doesn't seem so simple if you want to make them private(like need to host it on my own instead of node js web site). I thought in just put the sources codes in a root folder and refer to them from the X project. How is that usually done?

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

    Excel - Does anyone know how to pull variables from another sheet with a key that have been inserted manually?

    Posted: 30 Aug 2021 11:08 AM PDT

    so the problem is, i have a table of data and from that data i want to pull the variabels to make some sort of receipt. the receipt have a much different layout that the table, and i've been trying to use vlookup but always doesn't work. does anyone know how to solve this problem?

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

    courses to learn java?

    Posted: 30 Aug 2021 02:51 PM PDT

    i have studied c (data structure couldn't continue it cause of corona) and python if someone already know java can you send me where i can learn it easily

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

    Why does this C++ code have a redundant modulo?

    Posted: 30 Aug 2021 12:07 AM PDT

    I'm looking at some code for ElectroSmith Daisy (and Arduino-like device but for digital instruments) that handles scrolling through onboard menu items. I encountered the following:

    menuPos = (menuPos % 10 + 10) % 10;

    I don't understand why the code doesn't just do this:

    menuPos = menuPos % 10"?

    For context, the hardware has an oled screen and and endless encoder. menuPos is incremented every time the user scrolls right and decremented every time they scroll left. My guess is that the purpose of the aforementioned code is to keep menuPos from becoming arbitrarily large.

    Source code: https://github.com/electro-smith/DaisyExamples/blob/master/patch/Sequencer/Sequencer.cpp#L57

    Thank you!

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

    What's the best strategy for building an identification string (for a QR Code)?

    Posted: 30 Aug 2021 08:01 AM PDT

    Hey everyone!

    I have a situation which I hope to get some advice on. We want to generate QR codes to paste on equipment, for consumers to scan with our app. The QR code will allow us to start a session on the equipment, and the backend API call we need to make to another service providers requires three parameters from us:

    1. Equipment provider name (ep_id)
    2. Equipment location ID (el_id)
    3. Equipment ID (e_id)

    We want the information in the QR code to be as short as possible, as there are some use cases where we need users to manually type it in instead of scanning the QR code.

    The solutions we are toying with:

    1. Concatenate the three and use it as the QR code (i.e. string = [ep_id]-[el_id]--[e_id] ), but the length of these strings is dependent on the equipment providers.
    2. Generate a short unique random string (i.e. HT0K3, G4RFC ...) and map that to each combination of ep_id, el_id and e_id in a mapping table.
    3. Combine both approaches by hashing the concatenated string from (1) using an algorithm that generates the shortest possible hash (SHA1 or possibly truncated SHA256 hash), and pray that collision never happens.

    Ideally 2 would avoid collision and allow for consumers to type it easily at the same time, but a big challenge we have is that the service providers refreshes their list of equipment monthly, and every refresh (GET request) will involve both deletion and replacement of existing equipment ids (and there are thousands in each list). Furthermore, as we generate and maintain the mappings, we will always have to be the ones generating the string and the QR codes, which can be operationally tricky if we ever want to allow partners to generate and distribute these QR code stickers for us.

    In case we ever get totally confused about which equipment are active or not, Solutions 1 and 3 allows us to do a blanket clear-and-refresh from our providers. Even if we ever experience total data loss, we can recover everything using info from the providers and not have to worry about duplicates or outdated data. The QR stickers in the field will also continue to work, and only new ones have to be added.

    Anybody dealt with similar situations before and have some golden advice to dispense? :)

    TL;DR: I know shortened URL generators mostly use Solution 2, but the logistics of printing, maintaining and updating physical QR code stickers makes 1 and 3 much more preferable. I would love to use 3 but the chance of collision makes me worry. Advice needed!

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

    usb_hid_keys was not declared in this scope

    Posted: 30 Aug 2021 11:38 AM PDT

    i keep getting the message 'usb_hid_keys' was not declared in this scope but at the start of the command is written #include "usb_hid_keys.h"

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

    How you care for your eyes especially on long hours of screen time

    Posted: 30 Aug 2021 04:08 AM PDT

    I'm curious what you use that helps you focus and care for your eyes, especially on long hours of programming. Nowadays I get easily tired and some blur when looking at the screen.

    submitted by /u/Chips-more
    [link] [comments]

    No comments:

    Post a Comment