• Breaking News

    Friday, May 15, 2020

    Time estimates & always feeling rushed Ask Programming

    Time estimates & always feeling rushed Ask Programming


    Time estimates & always feeling rushed

    Posted: 15 May 2020 02:08 PM PDT

    At my work I'm always asked to give time estimates.

    When I try to give a good one with enough padding I get told it's too long and I see a lot of frowns all around.

    If I give into a small estimate I often find myself rushing and doing a bad job.

    At this point I'm feeling like I'm bad at this. Clearly it's just me because other devs seem to navigate these waters fine but I feel to be disappointing the team sometimes.

    Could really use some advice on this!

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

    Best way to go about fixing bugs where the only information you have about a crash is the stack trace logged by the crash report?

    Posted: 15 May 2020 06:32 PM PDT

    This would go more specifically for iOS and Android where the crashes aren't necessarily reproducible or consistently reproducible. I can best guess from a stack trace where something is wrong with a ListView or an API call. But kinda just want some advice generally from developers who have more experience and can solve issues/tickets purely from (mostly) non-reproducible stack traces.

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

    I've seen people recommend building a website demonstrating your skills, and seen some amazing examples. What technologies, framework and design would seriously impress if I started building something today?

    Posted: 15 May 2020 09:10 AM PDT

    I'm looking for jobs and anything that makes me look better

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

    Making a repetitive task at work easier.

    Posted: 15 May 2020 07:35 PM PDT

    Hi, I have a repetitive task at work that I do everyday which can easily be made quicker and less of a pain in the ass by some small program that hopefully exists somewhere?

    Explenation: So basically throughout the day I get an output of information in text based format. I then only use a sellected amount of that information that I copy into the notepad template I currently use and then send that template where ever it needs to go. This is how the template looks:

    Copied info

    Heading: copied info Heading: copied info Heading: copied info

    Heading: copied info Heading: copied info Heading: copied info

    Heading: copied info Heading: copied info Heading: copied info

    Heading: copied info

    Kind regards, Name

    Is it possible to create something similar to a sign up form you see on website for example that I can use to create the headings and then leave space open next to that to quickly paste the needed info and then at the buttom click generate and it throws everything in text form like the template I used which I can then copy and paste in the email?

    I know the only thing that will be changed from my current way of doing things is that I will copy the info into a set open space compared to in a notepad, but trust me trying to click and hilight my previous info to paste in the new info really get frustrating very quickly.

    If anyone knows a program that I can use or has another idea it will be much appreciated! Thanks.

    submitted by /u/101Retro
    [link] [comments]

    Do modern cars really have 100 million lines of code?

    Posted: 15 May 2020 10:25 PM PDT

    There are many websites that state the average modern car needs 100 million lines of code (these aren't referring to self driving cars). How does this make any sense? The F35 fighter jet only uses 8 million, and it displays data from hundreds of sensors to a VR helmet, guides missiles to moving targets, and can fly semi-autonomously. The CERN hardon collider uses less than 5 million, and it collides and scans millions of particles moving at relativistic speeds. What does my car need 100 million lines of code for? The computer's only functions I can think of is to run a simple radio UI, display the backup camera when in reverse, calculate the fuel economy, disable the airbag when there isn't enough weight in a seat, and set the AC and fan speed. I have some coding experience but I am completely oblivious as too how this could possibly require 100 million lines when you can fly a spaceship to the moon with just 145,000. Also, even if the car company had 100 programmers writing 1,000 bug free lines a day, it would take three years with no breaks to finish. Also, what is the original source of the 100 million lines claim?

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

    I'm working on making a virtual assistant, and I want it to sound more real

    Posted: 15 May 2020 10:12 PM PDT

    ya know like siri or cortana (except built in a way I'd have a use for), I got the basic idea of how to do it already programmed in python but it's kinda slow so I was going to re program it possibly in a different language, what's a way I can make it sound, ya know, less robotic, I don't know if this would be something i'd do in code (like changing to a different library instead of gTTS) or if there is some other way to do it.

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

    Why do modern browsers use so much RAM?

    Posted: 15 May 2020 09:21 PM PDT

    Why do modern browsers require so much RAM? Pretty sure in the AOL days my total system used significantly less RAM than my browser alone does today, what's different?

    Could a really low footprint browser be made with the functionality of your standard browser? Have people just got sloppy because RAM is cheap?

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

    NODE-JS HELP. Info sent to views page from router file returns undefined error, but when I send it from index, the info is displayed.

    Posted: 15 May 2020 09:10 PM PDT

    router.js file

    router.route('/home').post([check('username').isLength({ max: 20 }).withMessage('Max Length is 20'),check('password').isLength({ max: 20 }).withMessage('Max Length is 20'),check('confirm__password').equals('password').withMessage('Password do not match'),], (req, res) => {const error = validationResult(req);if (!error.isEmpty()) {res.render(('home'), {errors: 'hello', }); }});

    I put the hello just for testing purposes.

    structure is

    PROJECT FOLDER

    -PUBLIC

    -ROUTES

    ----homeRoute.js

    -VIEWS

    ----home.ejs

    -index.js

    const express = require('express');
    const app = express();
    const path = require('path');
    let homeRoute = require('./routes/homeRoute.js');
    app.use(express.urlencoded({ extended: true }));
    app.use(express.json());
    app.set('views', path.join(__dirname, 'views'));
    app.set('view engine', 'ejs');
    app.use(express.static(path.join(__dirname, '/public')));
    app.use('/home', homeRoute);
    app.get('/', (req, res) => {
    });
    app.get('/home', (req, res) => {
    res.render('home');
    });
    app.listen(3000);

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

    Building a “Master Profile” from questionnaires

    Posted: 15 May 2020 09:07 PM PDT

    We're working on trying to automate building a "master profile" from 5 different questionnaires, that change often, with no duplicate questions in the master. Is there some type of plugin or build for something like that?

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

    Best way to include code in a paper?

    Posted: 15 May 2020 08:49 PM PDT

    I'm writing a paper and was considering putting a screenshot, but it all comes out different sizes.

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

    How to get data using AJAX/jquery? (CSS/HTML/JS)

    Posted: 15 May 2020 04:51 PM PDT

    So i am trying to build a coronavirus website that shows all of the cases (like cov19.cc). I currently have the basis for the website made with html/css. Currently i have this code that displays the info i need to the console in my .js file

    var settings = { "async": true, "crossDomain": true, "url": "https://coronavirus-monitor.p.rapidapi.com/coronavirus/worldstat.php", "method": "GET", "headers": { "x-rapidapi-host": "coronavirus-monitor.p.rapidapi.com", "x-rapidapi-key": "2cc07998c6msh9d0c37970bc8310p11898cjsn6dd5c980726c" } } $.ajax(settings).done(function (response) { console.log(response); }); 

    i copied this from the rapid api website. When i go to the console on the website it will show me this:

    {"total_cases":"4,619,709","new_cases":"97,720","total_deaths":"308,116","new_deaths":"5,034","total_recovered":"1,754,925","active_cases":"2,556,668","serious_critical":"45,004","total_cases_per_1m_population":"593","deaths_per_1m_population":"39.5","statistic_taken_at":"2020-05-15 23:48:01"}

    How can i store these variables(the number of cases) and use them in my .html file? ive been stuck on this for a while, im still new to JS/jquery/ajax. how can i also have it so that it updates automatically? thanks!

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

    Inspecting things on chrome

    Posted: 15 May 2020 07:11 PM PDT

    This might not be the right place to ask this.. basically I want to know what language/whatever I can learn to understand the info when I 'inspect' a photo/page on google chrome. I'm mostly just curious about what kinds of interesting information (if any) I could learn from inspecting pages and how to do that

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

    Thinking about changing careers

    Posted: 15 May 2020 06:00 PM PDT

    Hello,

    I am 28 years old and currently run the operations (everything from real estate transactions, to branding, client interfacing, all software, office computers/printers, leads/data, marketing.. the works) for a mid sized realty company/investment firm in the Washington, DC area. Over the past few years I have taken up programming in my free time and it has become a passion for me. I am considering what a switch in careers would look like. So far I have gotten quite good at:

    • python
    • linux/bash
    • git
    • jquery/js/css/html
    • flask
    • gunicorn
    • socketio
    • jinja2
    • sqlalchemy (mostly just with sqlite)
    • REST APIs
    • nginx
    • docker
    • materialize css
    • more I cant think of
    • google/stackoverflow

    I have a popular open source application called DashMachine that is still somewhat early in development, but has gotten quite popular with over 1m pulls on docker hub alone, and 350+ stars on github. And it's only been out for a few months.

    I also have 2 similar(in terms of stack) private repo applications that DashMachine was spun off, that are much more impressive in terms of their functionality, that I could also show as a demo.

    I guess my question is, if I were to consider switching careers, is that enough to show to get a job? If so, what kind of salary/position would I be looking at?

    If this isn't enough, what should I be doing to further my credentials? Any certifications or like bootcamps that are worth the time/money?

    Thanks in advance.

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

    What are the historical alternatives to the Berkeley Sockets API? How did BSD Sockets become the standard?

    Posted: 15 May 2020 01:38 PM PDT

    ive recently come across Oracle XTI and TLI and brought back up a recurring question I've always had. There's seemingly no specific reason we use the programming model we do when interfacing with lower level network protocols. Was there a time when there were competing API's? Does anyone have any experience with any others?

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

    Would it be possible to create a bot that flags links using your stolen copyright/IP? Similar to the way record labels are able to immediately flag youtube videos with their songs, but for the whole internet instead of just one site.

    Posted: 15 May 2020 04:36 PM PDT

    General stuff and designs might be hard, but imagine I made something that became popular enough that people started putting it on their merch or making videos of it, something that included like "TheRadHatter9 from Reddit is super cool" or just "TheRadHatter9 merch." Could I make a bot that searches the internet for those words, or combination of words, and sends me the links to all the sites that have those words every day? And only sends new ones each day, so it doesn't keep sending me the same links over and over.

    I'm just trying to think of a way to help mitigate all the stealing and scamming that goes on with sites like RedBubble, Teespring, e.t.c..... Obviously you'd still have to manually contact those places to get things removed, but being able to send RedBubble 100 links to stores on their site that are violating your copyright/IP instead of doing it 1 at a time as you find them manually, would be of some help I think?

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

    What resources/tools can I use to scrape .aspx webpage data from 15 years ago?

    Posted: 15 May 2020 12:36 PM PDT

    Long story short, with the re-release of Halo 2 on PC, friends and I have been visiting our old stats on bungie.net from 2004-2008.

    Example - http://halo.bungie.net/Stats/PlayerStatsHalo2.aspx?player=Agnt%20007

    I have over 13,000 games, and would love to get data such as number of 1st places, and even more in depth parsing each map for opponents. I feel like if I just got some basic examples, I could tie together the rest.

    I've found:

    https://python-forum.io/Thread-Scraping-aspx-page

    [Python] Bungie.Net API Scraper for Last Played Time - Pastebin.com

    https://bungie-net.github.io/

    Any ideas on where to get started?

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

    Doubt won't let me sleep!

    Posted: 15 May 2020 06:59 AM PDT

    Good day programmers, I have a question if anyone can enlighten me.

    Context:

    More than 3 months ago I have been scoring on paper and making sketches of my "million dollar app", I think it is ready to start development to see the shortcomings live and direct but when I was going to start I did not decide on the stack to use, I don't know if it is a decision about comfort, scalability or performance, I know this will probably take me 1 year or more to do and I don't want to start by laying the foundations wrong. So I thought well we are going to make it easier, api in django and vuejs in the front end, but then I said no, because if it works and you have to scale it is impractical, better react and node that is booming, but if nodejs falters in performance ? I think it would be better to go for C # with react mmm but since the app is complex, wouldn't it be better to use C # with angular so I have everything more structured? On the other hand it could do it with deno and svelte or C # and Blazor are new technologies but they can bear fruit. And the database? its like a e commerce, should go for sql or nosql?

    Personally I do not find difficulties in any of the technologies that I mention because I have practice in them, but I do not have experience working to understand how these decisions are made, any help would be good and would help me sleep.

    My idea is to start with a web app, then take it with electron / js to a desktop application and then a phone application with xamarin / reactnative / ionic (another decision that I will have to deal with but is when the application is working )

    English is not my native language, my apologies if u suffer reading. Have a good day, all of you.

    submitted by /u/Harry-Postre
    [link] [comments]

    Unity C# pickup object on key press and play sound, please help

    Posted: 15 May 2020 03:23 PM PDT

    For starters, I've been trying to make this horror game and so far everything is going well, the only issue is that I'm sort of new to programming and have been looking up on internet how to make this code. I can't seem to find a tutorial that explains clearly how to do this step by step. For the script I would like it when the player comes in close proximity to a game object (the box collider around the object) and presses a key, for example, pressing the 'E' key on the keyboard, and then once the player presses the E key, the object will play a sound only one time and the object that is picked up will disappear the moment the key is pressed. Here is my script so far I have it able to play the sound effect, this script is attached the pickup object in my scene.

    public class CassetteTapeOne : MonoBehaviour {

    1. void OnTriggerEnter(Collider other)
    2. {
    3. AudioSource source = GetComponent<AudioSource>();
    4. if (other.gameObject.tag == "Player")
    5. {
    6. KeyCode key = KeyCode.E;
    7. if (Input.GetKeyDown( key )){
    8. source.Play();
    9. }
    10. }
    11. }

    }

    I'm simply asking for help on here, if you know how to write this script please let me know, I would really appreciate the help.

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

    Developing an API. Best Approach?

    Posted: 15 May 2020 03:05 PM PDT

    So, I'm looking to develop an API/library which 3rd parties can use to integrate a number of sensors my company develops.

    Primarily, these sensors are used on x86/64/ARM platforms running either Windows or a flavour of embedded Linux.

    Looking at libraries/API for sensors I've used previously in other projects, they have all been written in C. There appears to be some kind of device handle returned in a "connect" type function, this handle is then passed into the various control functions for the sensor.

    My questions are thus:

    1. Is there any reason I should consider exposing my own API as C functions, rather than as C++ classes?

    2. The sensors in question all depend on some for of communication interface (USB, RS232, Ethernet, etc) so should I wrap up this interface layer in my API and deal with the comms internally or should I only expose functions to decode sensor data and leave it up to the developer to write the communication interfaces?

    3. If C is the language I should be looking towards, is there a reason why many callback functions vs one main callback with a "type" parameter would be preferred? From an end user perspective, would one be more advantageous over the other?

    4. Has anyone developed such an API previously and, if so, can you offer any advice or pointers for good design vs pitfalls to avoid?

    Thanks in advance.

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

    Defining a method in Abstract Class vs Concrete Class

    Posted: 15 May 2020 02:09 PM PDT

    I'm doing Functional Programming Principles in Scala and an assignment gives us the freedom to decide when to implement a method in the abstract class vs two posible subclasses. What factors are considered when deciding this?

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

    How does MinGW handle loading inherited Windows environment variables ? Why do changes to %PATH% require logout and login...

    Posted: 15 May 2020 02:02 PM PDT

    So I recently discovered scoop.sh the linux style package manager for windows which I love.

    I also love MinGW via git-bash terminal and use it exclusively for everything. I never use PowerShell (except to install scoop...) or the Windows CMD shell.

    One thing that I can't figure out and that drives me nuts is that scoop updates the User environment PATH variable in Windows. What you see when you open a windows cmd shell and type "echo %PATH%". I can see the updates to this in the CMD shell right away.

    Unfortunately in order for my MinGW "$PATH" variable to get updated (even if I exit and spawn a new git-bash terminal) echoing $PATH does not reflect changes to the Windows User %PATH% variable. The only way it sees the change is if I logout and log back into Windows.

    It's really annoying to have to do that if you have a full dev environment running and you want to install a new tool using scoop that doesn't have a shim but rather gets added to the Windows User's %PATH%.

    Is there any way to force MinGW/git-bash to pickup the new without the logout and login ??

    I've downloaded the MinGW source code to try to better understand how it loads and manages Windows inherited environment variables but I could easily lose days trying to understand this code base.

    Any thoughts ?

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

    Has there ever been a case where a first-time game developer with zero prior coding experience has knocked it out of the park on their first try and been able to quit their day job?

    Posted: 15 May 2020 12:32 AM PDT

    Project managers

    Posted: 15 May 2020 01:50 PM PDT

    A month back I quit my job, first of al I don't like the team but the most important thing that I don't like the job is because the project manager. I think we as personalities don't like each other. He was more on the money and time side and because I am junior developer I am not that fast some times I completely get stuck . Now i want to know of programmers who worked with various of project managers do they all suck? Or is just me who have completely miss understanding of project managers?

    P.S. I got a new job.

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

    Can you explain when you would use a piece of code with named arguments like this one?

    Posted: 15 May 2020 01:18 PM PDT

    static void MyMethod(string child1 = "Liam", string child2 = "Jenny", string child3 = "John") { Console.WriteLine(child3); } static void Main(string[] args) { MyMethod("child3"); } // John 

    Calling MyMethod() with "child3" seems redundant as we say WriteLine(child3) anyway

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

    Generating numbers in the form (3^a)*(5^b)*(7^c)

    Posted: 15 May 2020 05:46 AM PDT

    I was wondering if there is a way to write a javascript function that takes in a positive integer n and returns the nth smallest number that can be expressed in the form (3^a)*(5^b)*(7^c). where a,b and c are positive integers

    For example,

    bNumber(1)===1//(3^0)*(5^0)*(7^0)

    bNumber(2)===3//(3^1)*(5^0)*(7^0)

    bNumber(3)===5//(3^0)*(5^1)*(7^0)

    bNumber(4)===7//(3^0)*(5^0)*(7^1)

    bNumber(20)===175//(3^0)*(5^2)*(7^1)

    bNumber(100)===33075//(3^3)*(5^2)*(7^2)

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

    No comments:

    Post a Comment