• Breaking News

    Wednesday, September 16, 2020

    Top factors that cause a project to fail. Ask Programming

    Top factors that cause a project to fail. Ask Programming


    Top factors that cause a project to fail.

    Posted: 16 Sep 2020 11:12 AM PDT

    According to a study by Standish these are the top factors for a project to fail.

    1. Incomplete Requirements 13.1%
    2. Lack of User Involvement 12.4%
    3. Lack of Resources 10.6%
    4. Unrealistic Expectations 9.9%
    5. Lack of Executive Support 9.3%
    6. Changing Requirements & Specifications 8.7%
    7. Lack of Planning 8.1%
    8. No longer required 7.5%
    9. Lack of IT Management 6.2%
    10. Technology Illiteracy 4.3%
    11. Other 9.9%

    In a question though these are the options i have to put in order:

    • Implement the wrong operations
    • Changes in requirements
    • Use of insufficient/problematic external libraries and other ingredients
    • Non realistic time planning and budget
    • lack of staff

    how you put in order those 5?

    P.s it's not for h/w I just study Software Engineering for my exams.

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

    How do I convince my team that this is bad API output?

    Posted: 16 Sep 2020 09:41 PM PDT

    I recently joined a large tech company. I was thrown on to a project that is almost completed and that has developers with a wide range of development experience. We're working on rolling out a new app. We're behind schedule and people up the chain are anxious that we haven't finished development and completed QA yet. However, today, I noticed that one of the APIs returns JSON that is just terrible to consume. I don't think anyone has ever consumed this API before. I think it needs to be changed as we are going to have 30+ services that will use and consume this API output. Currently we only have 1 service consuming it. That is the service I'm writing now. However, we will be having about 3-4 new services a year that will use the API.

    I think this API output needs to be updated before go live. But the team is reluctant to change it as we are already behind schedule and have already finished testing this API and all other components besides my service that uses it and a couple others. We're trying to wrap everything up by EOW.

    For simplicity, let's just say that this API, with the bad JSON output, is responsible for taking in a list of names and adds them to a database table. It then returns a JSON output that details the names that failed to be added or updated.

     { "Database Updates": "", "failed to update the table with these records" : { failedNames: [ ] }, "Name(s) failed to insert into the table": { [ ] } } 

    My issues with it:

    1. The JSON keys are literally just messages/sentences.
      1. This makes consuming this API awful. I have to write stuff like output["Name(s) failed to insert into the table"] just to read the array.
    2. The structure makes no sense. Why does one have "failedNames" and the other doesn't?
    3. The array fields in the output are only arrays if there is more than one value. If there is no value, it is null. If there is one value, it's a string.
      1. Perhaps this isn't a huge issue, but IMO, the output of the API should be consistent. It should either be null, or an array. But I should never have some other value like a string. So that would mean having an array with only one value if only one value is listed. But that's the contract IMO. I shouldn't ever have that value change types other than null.

    Am I crazy? Or overacting to this?

    Any other reasons why I should push to have this API updated with a better output?

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

    What are things that a senior .NET developer should understand over a mid-level?

    Posted: 16 Sep 2020 04:36 PM PDT

    Sort Meshes By Distance Without STL

    Posted: 16 Sep 2020 09:18 PM PDT

    My problem is implement a function SortMeshesByDistance() (function signature is given) that takes an array of meshes and to sort them by their distance to a given position. The catch is that I cannot use any STL functionality. I have to explain my choice and possible problems.

    My approach was to store the distances of the meshes to the position in an array. I then used an implementation of quicksort to sort the distances array (a temp one) and whenever I did a swap in distances array, I'd also do the swap in the MeshListOut mesh array.

    So far the biggest I see are firstly the Vector3 struct being way more complex that it needed to be and having an array of values which I assume are for xyz coordinates in a union, when it already gives you a struct with 3 floats.

    • I was wondering if there was a better approach if any?
    • What possible problems have I missed that will the given code create?
    • Lastly, I'm assuming that MeshListOut already has initialized and assigned members (that why I'm checking for the count to be equal), is this correct or should I initialize it myself inside SortMeshesByDistance()?

    Here's my code so far, I separated the code we were given to be on top, and my helper functions below for the sake of readability in this post:

    #include <iostream> #include <cmath> using namespace std; /**** GIVEN CODE ****/ struct Vector3 { union { float values[3]; struct { float x; float y; float z; }; }; }; class Mesh { public: Vector3 position; }; struct MeshList { Mesh* meshArray = nullptr; unsigned int meshCount = 0; }; // GIVEN SIGNATURE void SortMeshesByDistance(const Vector3& position, const MeshList& meshListIn, MeshList& meshListOut) { // MY IMPLEMENTATION BELOW if(meshListIn.meshCount != meshListOut.meshCount) { cout << "MeshCounts in MeshLists are different. They much be equal." << endl; } // Assuming meshListOut has an empty meshArray and meshCount is 0 CopyList(meshListIn, meshListOut); float distances[meshListIn.meshCount]; // Calculate and store distance from starting position to all actors for(size_t i {0}; i < meshListIn.meshCount; ++i) { distances[i] = Distance(position, meshListOut.meshArray[i].position); } QuickSort(meshListOut, distances, 0, meshListOut.meshCount-1); } /***** GIVEN CODE *****/ // ***** Helper Functions *****/ void Swap(float* a, float* b) { float t = *a; *a = *b; *b = t; } // Swap two elements - Utility function void Swap(Mesh* a, Mesh* b) { Mesh t = *a; *a = *b; *b = t; } // Partition the array using last element as pivot unsigned int Partition (MeshList& actorList, float* distancesArr, int low, int high) { float pivot = distancesArr[high]; int i = (low - 1); for (unsigned int j = low; j <= high- 1; j++) { if (distancesArr[j] <= pivot) { i++; // increment index of smaller element Swap(&distancesArr[i], &distancesArr[j]); Swap(&actorList.meshArray[i + 1], &actorList.meshArray[high]); } } Swap(&distancesArr[i + 1], &distancesArr[high]); Swap(&actorList.meshArray[i + 1], &actorList.meshArray[high]); return (i + 1); } //quicksort algorithm void QuickSort(MeshList& actorList, float* distancesArr, int low, int high) { if (low < high) { unsigned int pivot = Partition(actorList, distancesArr, low, high); QuickSort(actorList, distancesArr, low, pivot - 1); QuickSort(actorList, distancesArr, pivot + 1, high); } } // Deep copy list of actors void CopyList(const MeshList& source, MeshList& copy) { for(size_t i {0}; i < source.meshCount; ++i) { copy.meshArray[i].position.x = source.meshArray[i].position.x; copy.meshArray[i].position.y = source.meshArray[i].position.y; copy.meshArray[i].position.z = source.meshArray[i].position.z; } return; } float Distance(const Vector3& startPoint, const Vector3& destPoint) { return sqrt( pow((destPoint.x - startPoint.x), 2) + pow((destPoint.y - startPoint.y), 2) + pow((destPoint.z - startPoint.z), 2) ); } 
    submitted by /u/NULLstalgic
    [link] [comments]

    Object Oriented Programming -- polymorphisms? overloading?

    Posted: 16 Sep 2020 11:25 AM PDT

    I'm not that familiar with object oriented yet and also using Java. I'm trying to use a method with an object, but the object is changing in value.

    For example: If I'm trying to determine the type of leaf on a tree that has many different leaves, I just want to use the object "leaf". The leaf can have different values pertaining to the type of leaf. Then I want to be able to pass that object to a method that counts the number of leaves. Overall, the program would analyze each leaf on by one and determine the type, then pass that type to a method so it can add one to the count the number of that type of leaf.

    What is that called? A polymorphism? Some type of overloading?

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

    Visual libraries for any language you could advice to me?

    Posted: 16 Sep 2020 01:58 PM PDT

    I've been working with p5.js, proccessing, manim,Unity and had TON OF fun experimenting with them creating stuff and share or just improve my coding abilities. If there is other GUI UI Visual whatever you call libraries I would like to hear them.

    A good documentation would be excellent, manim was really hard to learn for example. Doesn't matter which language I want to learn it!!

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

    Real life scenarios

    Posted: 16 Sep 2020 03:52 PM PDT

    I've been learning C++ as a part of my course work at school. Is there anyone on here who uses C++ or has used C++ in their career? If so, what did you use it for?

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

    Will passing large objects around as a convenience cause memory issues?

    Posted: 16 Sep 2020 03:12 PM PDT

    (Using Javascript)

    I am making a discord radio bot with multiple broadcasts. I am passing all the text channels and voice connections around with the Broadcasts as a 'convenience accessor'. When the broadcast dispatcher emits finish, all it has to do is call the data I have attached to the broadcast upon a user connecting and it has access to ALL the available voice connections and text channels.

    Would it be more memory efficient to just carry the names around and then reference them from their manager files? Or is it okay to pass those huge objects around all the time? It's just a reference to the object right? Or is attaching every single voice and text channel connection a bad idea?

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

    C++ can be 1,2 or 3

    Posted: 16 Sep 2020 06:16 PM PDT

    how to write a code that each variable will be either 1 2 or 3

    Ex if variableA = 1 variableB = 2 Then variableC will be 3 But if variableA = 3 and variableB = 2 then variableC should be 1

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

    How to generate art files (.pdf, .ai) from data in an Excel spreadsheet

    Posted: 16 Sep 2020 06:07 PM PDT

    I'm not sure where else to start or what type of programmer to ask...

    I am producing signage for client. I have a library of art. When we send art as .pdf's to print makers I need to input certain data in this art file like the quantity, client name, a place for notes, etc. This information is held in an Excel spreadsheet. Currently, I have to take the info from the spreadsheet and input it to the art files manually via Adobe Illustrator.

    IDEALLY, I would be able to generate the artwork just by completing the spreadsheet, thus 'automating' the filling out and exporting of art files.

    I'm willing to hire and pay for this if anybody can propose a solution!

    submitted by /u/Future-self
    [link] [comments]

    Need help with Matlab

    Posted: 16 Sep 2020 06:03 PM PDT

    So, I had to manually import the file that my teacher sent me instead of doing load('barData', 'tiBarData');

    Now, I'm reading through the lecture and no where does it explain the instructions he was giving for us to do. I tried looking it up but it didn't work out. So, I'm in need of some help. (Please use a random number or 2 for the data. I need help trying to write what he asked)

    the average length, average width, and average height of the bars that meet the

    manufacturing standards for sale.

    The quality control data from the titanium bar forging run was stored in the MATLAB

    workspace file. barData.mat.The data is stored in a 2D array named tiBarData: the first column contains the bar lengths in mm, the second column contains the bar widths in mm, the third column contains the bar heights in mm, and the fourth column contains the bar weights in g. The MATLAB statement load('barData.mat','tiBarData'); will load the variable named tiBarData from the barData.mat file into the MATLAB workspace. Make sure the barData.mat

    file is in the same folder ads your program.

    Bars have a nominal length of 10 cm, a nominal width of 4 cm and a nominal height of 2cm.

    Bars that meet the manufacturing standards for sale should meet all of the following

    criteria:

    Length within 0.5% of the nominal length.

    Width within 0.5% of the nominal width.

    Height within 0.25% of the nominal height.

    Weight should not exceed 362 g.

    The program should clearly display the following:

    Number of bars that meet the manufacturing standard

    Average length, width, and height of the bars that meet the manufacturing standard.

    Minimum weight of the bars that meet the manufacturing standard

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

    Why do the 2 variables store different values(i.e sum & sum2)? (c++)

    Posted: 16 Sep 2020 10:11 AM PDT

    #include <bits/stdc++.h>

    using namespace std;

    int main()

    {

    int arr[]={256741038 ,623958417 ,467905213 ,714532089, 938071625};

    long long int sum=0;

    for(int i=0; i<5; i++)

    {

    sum+=arr[i];

    }

    long long int sum2= arr[0]+arr[1]+arr[2]+arr[3]+arr[4];

    cout<<sum<<endl<<sum2;

    return 0;

    }

    //output

    //3001208382

    //-1293758914

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

    Java Temperature Converter

    Posted: 16 Sep 2020 05:16 PM PDT

    Hi, I would like my program to calculate fahrenheit into celcius and celcius into fahrenheit. The output needs to be like

    Here is my current code: https://pastebin.com/1aS2qYXg

    Give a temperature in Celsius or Fahrenheit or type q to quit
    >20.0 C
    >20.0 degrees celcius = 68.0 degrees Fahrenheit
    Give a temperature in Celsius or Fahrenheit or type q to quit
    >68 F
    >68.0 degrees Fahrenheit = 20 degrees Celcius
    Give a temperature in Celsius or Fahrenheit or type q to quit
    >q
    > (quits the program)

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

    Can I access the camera stream from a Racelogic VBox Video HD2 without the official software?

    Posted: 16 Sep 2020 06:33 AM PDT

    I have in my hands a VBox Video HD2 from Racelogic. VBOX Video HD2 is a dual camera, 1080p, 30 or 60 fps video system including 10 Hz GPS data-logging and a live graphical overlay. It's core functionality is data adquisition from racetracks for performance optimization in car races. Here is a datasheet of the system

    The system can be connected with an Android app or windows program that, through WiFi communication, let you see the live stream from both cameras. Since I actually dont want to use it for it's intended purpose but for computer vision and image processing, I guessed that you could get that same stream the same way as any other IP Camera, all in python.

    But I could not find a solution for this problem. I guess its similar to a GoPro cam, but those actually have specific libraries for accessing that camera model (in Python).

    My question is, Is there a way I can get the video stream from a system that have very specific software and hardware like this one? If all its information is encoded, can I decode it in some way (through the console propmt)? I connected to the Vbox wifi with my PC and I was able to see its IP address, but I dont know what to do with that information since its not only receiving camera stream, but more information from the system (I guess).

    Thank you and have a good day.

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

    Am I allowed to jus straight up copy and use the "Scrobbling" feature from last.fm for something else? I am currently designing an education app.

    Posted: 16 Sep 2020 12:24 PM PDT

    Modifying A* Algorithm and Visualizing Path

    Posted: 16 Sep 2020 11:55 AM PDT

    Hello everyone. I want to use the A* algorithm on grids where each cell can have the values -1(wall), 1,2,3 or 4. A higher number indicates a higher cost to reach the cell, and -1 indicates that the cell is not walkable. I've been trying to modify the following algorithm, which works for grids with cell values 0 or 1(wall). Here is a link to the algorithm which I have also pasted below: https://gist.githubusercontent.com/Nicholas-Swift/003e1932ef2804bebef2710527008f44/raw/dfa6699f04a77c598daf8562d12cbb7fa2660263/astar.py

    class Node(): """A node class for A* Pathfinding""" def __init__(self, parent=None, position=None): self.parent = parent self.position = position self.g = 0 self.h = 0 self.f = 0 def __eq__(self, other): return self.position == other.position def astar(maze, start, end): """Returns a list of tuples as a path from the given start to the given end in the given maze""" # Create start and end node start_node = Node(None, start) start_node.g = start_node.h = start_node.f = 0 end_node = Node(None, end) end_node.g = end_node.h = end_node.f = 0 # Initialize both open and closed list open_list = [] closed_list = [] # Add the start node open_list.append(start_node) # Loop until you find the end while len(open_list) > 0: # Get the current node current_node = open_list[0] current_index = 0 for index, item in enumerate(open_list): if item.f < current_node.f: current_node = item current_index = index # Pop current off open list, add to closed list open_list.pop(current_index) closed_list.append(current_node) # Found the goal if current_node == end_node: path = [] current = current_node while current is not None: path.append(current.position) current = current.parent return path[::-1] # Return reversed path # Generate children children = [] for new_position in [(0, -1), (0, 1), (-1, 0), (1, 0), (-1, -1), (-1, 1), (1, -1), (1, 1)]: # Adjacent squares # Get node position node_position = (current_node.position[0] + new_position[0], current_node.position[1] + new_position[1]) # Make sure within range if node_position[0] > (len(maze) - 1) or node_position[0] < 0 or node_position[1] > (len(maze[len(maze)-1]) -1) or node_position[1] < 0: continue # Make sure walkable terrain if maze[node_position[0]][node_position[1]] != 0: continue # Create new node new_node = Node(current_node, node_position) # Append children.append(new_node) # Loop through children for child in children: # Child is on the closed list for closed_child in closed_list: if child == closed_child: continue # Create the f, g, and h values child.g = current_node.g + 1 child.h = ((child.position[0] - end_node.position[0]) ** 2) + ((child.position[1] - end_node.position[1]) ** 2) child.f = child.g + child.h # Child is already in the open list for open_node in open_list: if child == open_node and child.g > open_node.g: continue # Add the child to the open list open_list.append(child) 

    I know I at least need to change

     if maze[node_position[0]][node_position[1]] != 0: 

    to

     if maze[node_position[0]][node_position[1]] < 0: 

    to indicate that -1 is a wall. In addtion I changed

     child.g = current_node.g + 1 

    to

     child.g = current_node.g + maze[child.position[0]][child.position[1]] 

    Since cells can have higher cost than one. However I don't know what else needs to be changed? If I only change these two things the algorithm just keeps running and never returns a path.

    Im also wondering how I can visualize the path the algorithm found? I know there are several options, I just want one that is simple to implement and displays the path in a clear manner.

    Appreciate any help.

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

    [Homework Help] Is this the correct way?

    Posted: 16 Sep 2020 06:51 AM PDT

    Reading large code bases

    Posted: 16 Sep 2020 10:29 AM PDT

    Hello,

    I'm using C++ since a few years now and I know and understand most of the C++11 Standard. I would call myself decently competent and experienced in writing C++ programs from scratch. But now, I'm working on someone else's code for the first time in my life (680 k lines of code and 270 k lines of header code, not that much documentation, called OpenFOAM). I still can write self-contained code, but I'm completely unable to read and understand that code and writing new code that interacts with the old code is extremely hard for me. What is the best way to learn to read and understand large codebases?

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

    Resume question: An application running on the web is a webapp, an application on a phone is a mobile app, what is an application running on a desktop / laptop?

    Posted: 16 Sep 2020 07:43 AM PDT

    Is it a desktop application? A console application? Sorry if it's a stupid question. Thanks in advance for any help in this.

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

    Large, popular applications written in C# / .NET (that isn't corporate data entry)

    Posted: 16 Sep 2020 09:46 AM PDT

    About 10 years ago, I collected a list of large, successful C# applications: StackOverflow, Bing, and Paint.NET. When I revisit this question, the answer is pretty much the same.

    While C# developers are in high demand, most developers I know write what is effectively data-entry applications. Mostly in the insurance, medical, real-estate, and banking fields.

    Does .NET / C# have a presence outside of corporate data entry software? What are some large, popular applications written on top of C# and .NET?

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

    Java web development. I need to understand a proper logical way to use servlets with jsp.

    Posted: 16 Sep 2020 12:50 PM PDT

    I have a homework where i need to create i small server that i can use to register users, login and use some simple functionality of the site. However i do not understand how to implement servlets with jsp. Does every jsp need to have a servlet. If so does servlet need to send to the jsp it is refering to or it needs to redirect from one jsp to another.
    And a side question, i do not really understand how a session is maintained and what breaks it.

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

    c++ std out problem

    Posted: 16 Sep 2020 12:26 PM PDT

    Question: https://i.imgur.com/SZTd8XT.png

    My Code: https://i.imgur.com/MELq1SC.png

    Error: https://i.imgur.com/9rmxMNA.png

    Now I'm too new to really understand what I should change here, so any help appreciated.

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

    Visual Studio C++ runs cl.exe a second time after build finishes

    Posted: 16 Sep 2020 12:04 PM PDT

    Something odd I've just noticed - when I build my project, cl.exe appears in Task Manager, as you'd expected. My project only takes a second or two to build, and when it's done cl.exe closes. But a few seconds after Visual Studio reports "Build: 1 succeeded", cl.exe reappears in Task Manager, this time for several seconds longer, before disappearing again.

    Does anyone know what it's doing?

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

    Can we use any language we like for solving technical coding interviews ?

    Posted: 16 Sep 2020 12:42 AM PDT

    I see a lot of people using python. But I really like the idea of mastering one language even though I've worked in C Cpp Java and even python. My choice of language is always javascript, but it freaks me out how rarely it is used to solve data structures or for any of the example solutions online

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

    No comments:

    Post a Comment