• Breaking News

    Friday, February 7, 2020

    Book recommendations for large development projects Ask Programming

    Book recommendations for large development projects Ask Programming


    Book recommendations for large development projects

    Posted: 07 Feb 2020 10:10 AM PST

    Hi all! Do any of you have good book recommendations about large scale development projects written from the standpoint of a head developer? Or books about good development principles? Even autobiographies?

    I've been coding for a while and need some perspective on designing beyond the day to day as well as dealing with a team and other human factors.

    I'm thinking books like Mythical Man Month or Clean Code. Thanks in advance!

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

    Can code that uses new instructions be compiled on an older CPU?

    Posted: 07 Feb 2020 07:03 AM PST

    I know trying to execute compiled code which uses an instruction not supported by the CPU will not work.

    But if I have a bit of code that say, uses AVX instructions and I compile it on a build server that has a CPU pre AVX, would it compile?

    I have a feeling it's down to the compiler support, rather than the CPU?

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

    Why are languages built the way they are and where are they going?

    Posted: 07 Feb 2020 06:44 PM PST

    I have three questions regarding programming languages in broad terms.

    1. Often when I see a new language it's always described as a general purpose language. Typically they can be used for just about anything. Would it not be better to make a language for one specific purpose, say CLI's, and have it do that one thing very well rather than more things all mediocre - ly.
    2. Do we really need new languages? Is there any real benefit besides convenience? I'd struggle to believe there isn't a thing we can't do with the current line up of languages. Most of the languages I see have an example saying "you can use 5 lines of C++ or just 2 lines of XLang". Or similarly "it's faster". Well these are nice is there any new things coming out that we couldn't do before?
    3. Is it likely we will see and new ways of writing languages in the future? Nearly every language follows the same broad syntax. Obviously ones like Python do away with common things like semi-colons and curly braces but fundamentally it's the same idea. I've yet to see a non-esoteric language that steps away from the common function(){} sort of layout that you'd see from say C (again, languages like Python don't have the same syntax but still have the same idea behind it). I know this is very speculative, but I hope it makes sense.

    I feel that 3 brings up the point of "do we really have the 'perfect' way to make a language" and 2 says "don't we have the perfect languages".

    Not the most concrete questions but I love some good theoretical discussion. : )

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

    Software programming equivalent to the Unreal Engine blueprints?

    Posted: 07 Feb 2020 01:48 PM PST

    Are there any programs out there for creating windows/android/iOS applications like how the Unreal Engine blueprints system works?

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

    Programmers who've used Docker or Kubernetes, What has your experience been like?

    Posted: 07 Feb 2020 04:42 PM PST

    If you have time, please take this quick survey: https://forms.gle/fSKVUzZZ5iYeugDB8

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

    How does your team handle PR notifications? Would an open-source slack bot be useful to you?

    Posted: 07 Feb 2020 04:01 PM PST

    I wanted a slack integration that would send me DMs when I had a PR that needed review, when people commented on one of my PRs, or when one of my PRs was approved -- and was surprised to find I couldn't get the GitHub slack integration to do that. I didn't see a lot of other solutions for the problem either, except for pullreminders.com, which was shut down after GitHub purchased it, and still hasn't been folded into GitHub proper.

    I wrote a bot in Typescript that does this with the GitHub webhooks and API. It's written to run in a serverless environment, and it doesn't need a database; you just configure it with a few env variables. It's threadbare, but I'm finding that it's saved my team and I a lot of time. Would that be useful to any of you? If so, I'd be happy to clean it up and share it.

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

    A question about probability: If have 1 in 100 chance and this happens n times, it is possible for me to get the result directly instead of a loop?

    Posted: 07 Feb 2020 07:02 AM PST

    Hello! I need help with something that I imagine it is simple, but with my poor skills I couldn't figure out and failed in finding it searching.

    Here what I need/have for a little game:

    There is this "roll" system and the player has 1/100 chance of getting 1 coin. But, sometimes, the player could possibly roll huge amount of times. In a loop, this gets out of hand and costs me a lot of performance. 1 roll is nothing, 10 nothing, 100 nothing. But billions, and trillions and so on, becomes a problem.

    So I want to know if I can solve this not with a loop, but with some formula. If the player has 1/100 chance in one roll to get one coin, how do I do for 2x rolls? The player could get none, one or two in these 2 rolls.

    I tried using two math.random. One from 1 to 200. If it was <= 2, I would then do a math.random between 1 and 2. But it sounds whack, so I don't know what I doing.

    Sorry if I couldn't explain very well and thanks in advance.

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

    Prevent function from timing out

    Posted: 07 Feb 2020 02:53 PM PST

    So here's the problem: I have X threads to to process Z items (Z >> X). My function can only run for a maximum of 15 minutes. The maximum time it will take to process an item in Z is 3 seconds - but the processing could fail so it will need to be retried in that case. Lets say I have a function that tells me how much time I have remaining in my function: timeRemaining(). Is there a way I could dynamically try to process all items and retry in cases where it needs to be retried - possibly multiple times, but not time out my function at 15 minutes? If the function is about to timeout, I'd just save the ones that haven't been processed in a Queue to be processed later.

    My current solution: Try to process all Z items with X threads. Keep a list of items that failed, - try to process the ones that failed with X threads - keep a list that failed - repeat. How do I do this same process but make sure I don't timeout my function. This involves putting concurrent.futures within a while loop, would this be advisable?

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

    I want to buy a google play console for my account and publish my game to google play store. If I publish it, will the name of the publisher be my first name + last name? If so, how can I change it?

    Posted: 07 Feb 2020 02:50 PM PST

    Programmers who use Docker, could you take this survey?

    Posted: 07 Feb 2020 01:28 PM PST

    Programming strong basics - what to learn / learning path

    Posted: 07 Feb 2020 09:41 AM PST

    To be more specific. What should good engineer know to effectively learn new frameworks / languages / tools etc. What books do you recommend, what part of math should I be familiar most, any important tips?

    For little backgroud. I dropped from college and went to work. I have 2 years experience with salesforce. I would like to finally change job to something more interesting/harder but I am worried that my lack of algorithm/math knowledge will prevent me from finding one

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

    What's faster, "if not a == b" or "if a != b"?

    Posted: 07 Feb 2020 12:57 PM PST

    I made a python program to test for this and both came out as 0.0s, so what's faster?

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

    How do you build from source code?

    Posted: 07 Feb 2020 12:57 PM PST

    I'm not very experienced in programming. But being able to build code from source on github seems something really basic that everyone should know how to do.

    Similar to when you're starting out learning how computers work - that you need to learn how to download and unzip .zip archive files in order to use the downloaded files.

    So when I'm looking at the Building instructions for a github file...

    git clone --recursive https://github.com/0xd4d/dnSpy.git

    cd dnSpy

    # or dotnet build

    ./build.ps1 -NoMsbuild

    This is all complete gibberish to me. I have no idea where I am supposed to input this information in order to actually build the file. Help?

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

    Help please

    Posted: 07 Feb 2020 11:22 AM PST

    In need of some assistance

    So I have no idea how to even think about writing a line of code! Decided I want to try it a while back just got myself a laptop and tried to download java everything looked good but when I go to my command prompt it tells me it's not there ( ...batch file) I've tried the offline download nothing, checked my anti virus software says everything with the download was allowed to pass so I'm at a loss! Advice or alternative ideas please!!!

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

    Is this safe?

    Posted: 07 Feb 2020 11:20 AM PST

    I know nothing about coding. Looked up a quick copy-paste script for something, just wanna know if this is generally looking safe?

    var before = 'LAST_MESSAGE_ID';

    clearMessages = function(){

    const authToken = document.body.appendChild(document.createElement\`iframe\`).contentWindow.localStorage.token.replace(/"/g, ""); const channel = window.location.href.split('/').pop(); const baseURL = \`https://discordapp.com/api/channels/${channel}/messages\`; const headers = {"Authorization": authToken }; 

    let clock = 0; let interval = 500; 

    function delay(duration) { return new Promise((resolve, reject) => { setTimeout(() => resolve(), duration); }); } 

    fetch(baseURL + '?before=' + before + '&limit=100', {headers}) .then(resp => resp.json()) .then(messages => { return Promise.all(messages.map((message) => { before = [message.id](https://message.id); return delay(clock += interval).then(() => fetch(\`${baseURL}/${[message.id](https://message.id)}\`, {headers, method: 'DELETE'})); })); }).then(() => clearMessages()); 

    }

    clearMessages();

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

    Any suggested mechanisms to hide underlying database implementation?

    Posted: 07 Feb 2020 10:54 AM PST

    A group I am working with has thus far not been able to settle on whether or not to use a SQL or NoSQL database solution for a future product. (BTW, we are using JAVA)

    Is there an effective way we can abstract that away from the code that needs the data? Like perhaps JPA? Does that work on both SQL and NoSQL databases?

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

    How to export WaveSurfer js as audio file?

    Posted: 07 Feb 2020 10:45 AM PST

    Hi 🖐,

    I'm using WaveSurfer js for my project where we can edit an audio. For that i use the region plugin.

    When the users clicks the button finish, I want to export the result in a audio file (mp3/wav)

    To get the peaks of the audio where the user selected his audio, I do:

    var json = wavesurfer.backend.getPeaks(960, wavesurfer.regions.list["wavesurfer_j99v7ophop8"].start, wavesurfer.regions.list["wavesurfer_j99v7ophop8"].end) 

    This works but i want to export it as an audio file and not a json

    Thanks in advance

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

    Quick question on list filtering

    Posted: 07 Feb 2020 06:43 AM PST

    So i have a list in python with numerical values. I need to get average of that list but some of those values are several orders of magnitude higher or lower, so they are messing with result and i want to remove them. So basically idea i came up with is getting nominal average first and then compare each element of the list with this value, removing them if they are way off. But that would be really inaccurate. What else can i do? Is there some standard way?

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

    Java If Else Statements Help

    Posted: 07 Feb 2020 09:58 AM PST

    I am working on my Java programming homework and I am completely confused. So I wanted to seek some clarity about why my IF, ELSE IF, ELSE statements are not "working". I type in a userInput to be LOL and no matter what, my result is always "Unknown". I just do not know why its not executing like I think it normally would? I don't know if it has anything to do with Strings but I just want to understand before I continue my assignment. Any advice is greatly appreciated!

    import java.util.Scanner; class Main { public static void main(String args[]) { Scanner scnr = new Scanner(System.in); String userInput; String LOL = "laughing out loud"; String IDK = "I don't know"; String BFF = "best friends forever"; String IMHO = "in my humble opinion"; String TMI = "too much information"; System.out.println("Input an abbreviation:"); userInput = scnr.next(); if (userInput == "LOL") { System.out.println(LOL); } else if (userInput == "IDK") { System.out.println(IDK); } else if (userInput == "BFF") { System.out.println(BFF); } else if (userInput == "IMHO") { System.out.println(IMHO); } else if (userInput == "TMI") { System.out.println(TMI); } else { System.out.println("Unknown"); } } } 
    submitted by /u/MarlinsBB
    [link] [comments]

    Implementing the Gaussian algorithm in Js

    Posted: 07 Feb 2020 08:18 AM PST

    Hey, guys I recently got homework from school in which I need to implement the gaussian algorithm in Js. It should be ina website where you can write down the three equations.

    The homework states that I should create an input "mask" for entering the equations and those equations should be converted into a 2d array.

    So this is where I am stuck. I have looked up what a 2d array is but I can't really figure out how to create an input "mask" and then convert that into a 2d array.

    Sorry for my bad English.

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

    [JS] Trying to reinvent the wheel by making a database-structure with json and objects. Put me out of my misery.

    Posted: 07 Feb 2020 08:17 AM PST

    I thought a lot about databases and stuff, and how I should make it all work, and this is what I came up with:

    var tables = { data: [ //redundant, but I need the outer wrapper to be an object for json { table_name: "table_1", table_data: [ { column_name: "column_1-1", column_data: ["data111", "data112", "data113"] }, { column_name: "column_1-2", column_data: ["data121", "data122", "data123"] } ] }, { table_name: "table_2", table_data: [ { column_name: "column_2-1", column_data: ["data211", "data212", "data213"] }, { column_name: "column_2-2", column_data: ["data221", "data222", "data223"] } ] } ] } 

    Ok, so first we need an array to hold the tables because we don't know how many tables we want to generate, so we can't have keys.

    Then we go one layer deeper, and make an object so we have some keys to name the table and so we can store the table data. I recon this could be also a regular array if we wanted.

    Then we go one layer deeper and make sub-objects in the table-data array because we don't know how many columns we will have.

    Then again, like the first layer, we again have a name key, and a data key for each column.

    Right now, I am realizing that this is stupid because the whole day I was trying to flip my data so I have all the row data in one array, and not all the column data in one array. But either way, I will now demonstrate why everything looks like it does, and you can tell me why this is stupid and wrong and how it can be better:

    1. Delete table easily by:
      tables.data[0]

    2. Delete column easily by:
      tables.data[0].table_data[0]

    3. Delete rows easily by: Nothing. This is actually hard now because I did everything upside down.

    Well, either way, I am aiming for a system that works regardless of how many tables, columns or rows you add. I don't really need keys, although they are super cool for readability later, and you can access them even by their name with object["key"].value

    If someone knows how this actually works in real life, like, in a database (they probably know how to do it properly), please tell me.


    PS: Tried to lean it out a bit and switch the rows and columns:

    var tables = { data: [ //redundant, but I need the outer wrapper to be an object for json { table_names: ["table_1", "table_2"], table_data: [ { column_names: ["column_1-1", "column_1-2"] row_data: [ ["data111", "data121"], ["data112", "data122"], ["data113", "data123"] ] } ] } ] } 
    submitted by /u/awwwes
    [link] [comments]

    Small Project Ideas for learning Lavarel

    Posted: 07 Feb 2020 05:42 AM PST

    Hello, i need some Project Ideas for learning lavarel I have quite a good understanding of PHP. I want something harder than a simple blog website. Do you have any Ideas for me?

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

    How using two different languages for webserver and the actual code will affect the performance in comparison with using the same language for both?

    Posted: 07 Feb 2020 03:06 AM PST

    I know that for example go (or other languages) can call another file with parameters internally, for example: ```go package main

    import ( "log" "os" "os/exec" )

    func main() { cmd := exec.Command("script.py") cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr log.Println(cmd.Run()) } ```

    But I am wondering if this is the best way? How it will affect the performance?

    I am thinking about having a single webserver in front for different languages, something that we configured to be very efficient and then reuse it every time in different projects. Now I am wondering how it will affect the performance in comparison with using a single language?

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

    Is flutter better than android studio?

    Posted: 07 Feb 2020 02:31 AM PST

    I'm into UI designs and have made a few prototypes of apps I plan to make. I don't want to try and approach developers for front end development. I would like to make my own. I'm confused as to what will be the best available option for me to implement this design into reality. Is flutter a better option than android studio? I'm really not good at coding, but I beleive if I am consistent for a period of time I might make it through.

    What do you suggest me to do? I would love to have advice from those who've been on this platform. Thank you very much.

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

    No comments:

    Post a Comment