• Breaking News

    Monday, February 3, 2020

    When do people start to git their projects? Ask Programming

    When do people start to git their projects? Ask Programming


    When do people start to git their projects?

    Posted: 03 Feb 2020 10:57 AM PST

    Do you start with commit "added first line of code" or later, maybe when you have something working? I know it''s a stupid question but I'm curious to know the best practice.

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

    Why do people hate on php?

    Posted: 03 Feb 2020 09:51 PM PST

    Usually when I write a website I find php to be the go-to but recently I have been told that I should stop using it so what I'm asking is: - is php bad (if so why) - what is a replacement that is similar to php

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

    Are there any websites that collect interesting post-mortems?

    Posted: 03 Feb 2020 05:48 AM PST

    The title says it all really. I love reading through long-form dissections like this

    https://labs.spotify.com/2013/06/18/creative-usernames/

    where you get to learn how bugs were discovered, analysed and fixed.

    The closest thing I know of is https://thedailywtf.com/ or https://blog.codinghorror.com/. But I need more! :D

    submitted by /u/-1__1-
    [link] [comments]

    Running python functions on the backend with a React front-end

    Posted: 03 Feb 2020 06:16 PM PST

    Hey I'm unsure about what technologies I'll need to use in my web development stack if I wanna accept a .csv file from my user, make changes using the pandas library in Python and then let them download an updated .csv file of all the changes made to the dataframe

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

    Why are my vectors not passing values?

    Posted: 03 Feb 2020 08:49 PM PST

    #include <iostream> #include <vector> using namespace std; vector<string>courseCodes; vector<string>courseNames; string cl_code; string cl_name; int viewSchedule(string &cl_code, string &cl_name) { vector<string>courseNames; vector<string>courseCodes; if (courseCodes.empty()) { cout << "You have no classes! Go add some!" << endl; } else { for (int i = 0; i < courseCodes.size(); i++) { cout << courseCodes.at(i) + courseNames.at(i) << ""; } } } int addClass (string &cl_code, string &cl_name) { cout << "Please enter the course code (4 digits): " << endl; cin >> cl_code; if (cl_code.length() != 4) { cout << "Error. Try Again." << endl; return 1; } else { courseCodes.push_back(cl_code); cout << "Please enter the course name: " << endl; cin >> cl_name; courseNames.push_back(cl_name); return 0; } } int removeClass(string &cl_code, string &cl_name) { } int main () { int response; do { cout << "Welcome to your Class Scheduler, what would you like to do?\n"; cout << "View Schedule: (Press 1)\nAdd Class: (Press 2)\nRemove Class: (Press 3)\nExit: (Press 4)\n"; cin >> response; if (response == 1) { viewSchedule(cl_code, cl_name); } else if (response == 2) { addClass(cl_code, cl_name); } else if (response == 3) { } else if (response == 4) { exit (0); } else { cout << "That is not a valid option, please try again.\n"; } }while (response > 0 || response <= 4); return 0; } 
    submitted by /u/MrDoctorJunior
    [link] [comments]

    Minikanren in J, implementing minikanren 'appendo' in J

    Posted: 03 Feb 2020 07:55 PM PST

    Why does my C++ while loop not loop after a function call?

    Posted: 03 Feb 2020 07:02 PM PST

    I'm calling functions into the main function but after they execute the program exits instead of looping again in the main function's while loop.

    #include <iostream> #include <vector> using namespace std; vector<string>mySchedule; string cl_code; string cl_name; int viewSchedule() { vector<string>mySchedule; if (mySchedule.empty()) { cout << "You have no classes! Go add some!"; } else { for (int i = 0; i < mySchedule.size(); i++) { cout << mySchedule.at(i) << ""; } } } int addClass (string cl_code, string cl_name) { cl_code; cl_name; cin.ignore(); cout << "Please enter the course code (4 digits): " << endl; getline(cin, cl_code); if (cl_code.length() != 4) { cout << "Error. Try Again." << endl; } mySchedule.push_back(cl_code); cout << "Please enter the course name: " << endl; getline(cin, cl_name); mySchedule.push_back(cl_name); } int main () { int response; do { cout << "Welcome to your Class Scheduler, what would you like to do?\n"; cout << "View Schedule: (Press 1)\nAdd Class: (Press 2)\nRemove Class: (Press 3)\nExit: (Press 4)\n"; cin >> response; if (response == 1) { viewSchedule(); } else if (response == 2) { addClass(cl_code, cl_name); } else if (response == 3) { } else if (response == 4) { exit (0); } else { cout << "That is not a valid option, please try again.\n"; } }while (response < 0 || response > 4); return 0; } 
    submitted by /u/MrDoctorJunior
    [link] [comments]

    How to handle git for projects over 2gb

    Posted: 03 Feb 2020 06:55 PM PST

    Hey all, novice git user here. I've got a couple personal projects at the moment, and I've set them up with git as pretty much the first thing I do. For every project I do some pretty thorough searches of recommended .gitignore setup so I don't think there's much more I can add to those.

    Inevitably, after about a week of development, I can't push anymore due to the project reaching the 2gb threshold.

    Two main questions:

    1. Does anyone elses projects typically reach that threshold or am I somehow accidentally making huge projects?

    2. What strategies do you all use to prevent projects from getting bloated/keep projects at a reasonable size

    Thanks!

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

    Smoothing/normalizing heat map based on sample size at each location

    Posted: 03 Feb 2020 06:18 PM PST

    Looking for help normalizing the weights of a heatmap based on the sample sizes found at each location. To elaborate, each square of the heatmap has a weight that is calculated and skewed based on a sample size metric. Anyone know of any smoothing or normalizing functions that would fix the skewing of locations with high sample sizes vs locations with low sample sizes?

    Tldr: normalize weights of a heatmap based on an array of values for each location

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

    Is there a guide/article/ instruction on how to convert a .NET Core 3.1 WebApp into a .NET Core WebAPI?

    Posted: 03 Feb 2020 12:27 PM PST

    The reason for this is that the web app has all the built in Scaffolding that can be done for alot of the basics. Like setting up user accounts, login, password recovery, ect... I want the same functionality for my web api but scaffolding is different for an api so I am trying to find a way to convert it other than having an app and api solution and rip stuff from the app to the api.

    Any help would be appreciated!

    *EDIT: If there is info about integrating Identity into a .net core webAPI, I'll take that as well!

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

    Quantum Computers breaking encryption

    Posted: 03 Feb 2020 02:10 PM PST

    I understand that quantum computers will be able to do an insane amount of combinations, but couldn't companies just use different hashing algorithms? Then hackers would not be able to generate and compare leaked hashes.

    submitted by /u/siberia-
    [link] [comments]

    Looking for a job as a cloud architect but want to show I have a baseline understanding of how to read/write code in Python

    Posted: 03 Feb 2020 01:52 PM PST

    I'm not trying to claim I'm an expert or anything I just want to show I can write/read it.

    So I hear I need to make a "GitHub portfolio" and I had some questions

    • I can't imagine anywhere close to 50% of coders having/maintaining a GitHub, is this really a widespread thing?
      • Or is this like LinkedIn where you just do it when you're applying somewhere else?
    • If it isn't bullshit, what do you put in there?
      • I can't put work shit cause I'd get sued, and I don't want to be accused of copying and pasting someone else's shit
    • Is there any respected Python cert? I hear the Java ones are respected.
    submitted by /u/POEthrowaway-2019
    [link] [comments]

    Looking for sites / tools that will let me create my own online Form Calculator

    Posted: 03 Feb 2020 12:43 PM PST

    Hello,

    I am a developer, but i don't do much web development.

    I am trying to help a friend that wans to create an online form calculator:

    Requirements: - user can enter in data into various input fields (text/number/drop down/ calendar) - user hits submit, and on that web page, which then generates results for them with the input they provided . The results would be calculated on the spot and updated on that page. - will trigger an email with the data.

    Is there a framework in place today that i can utilize? i feel like writing it all from scratch in html / css will be a lot of work.

    I looked at sites that offer survey services like Zoho and Survey Monkey, and they seem like they can do most of what i want, but they don't look like they support updating your current web page with results. They just send out emails.

    Hope someone with some expertise in the area can point me on the right path.

    thanks in advance!

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

    How to think of good, self-explanatory variable names?

    Posted: 03 Feb 2020 12:13 PM PST

    I think maybe 15% of my coding time goes to thinking about a good name for variables and functions, and then I change it 3 more times after that because I thought of a better name. Is there some trick or shortcut to get a good name? Like, maybe write a sentence about what the variable holds, and then pick a noun and a verb or something? Some trick, anything. Any advice. If I could write all the info that I want to relay into a variable, it would be 45 characters long.

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

    I know each language has it pros and cons but which language would you recommend (I already know python)

    Posted: 03 Feb 2020 05:47 AM PST

    Java Algorithm

    Posted: 03 Feb 2020 07:52 AM PST

    I am trying to solve this problem:

    Given three lists of N names each, devise a linearithmic algorithm

    to determine if there is any name common to all three lists, and if so, return the first

    such name.

    Now I know how to do a quadratic version but have no clue how to make it linearithmic. Sorting the arrays is linearithmic but how do I then search through 3 arrays without making it quadratic?

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

    Overwhelmed by Stacks and Frameworks.

    Posted: 03 Feb 2020 11:19 AM PST

    "Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime."

    As a novice programmer, the endless choices of frameworks out there are overwhelming. It's so intimidating that I feel I am getting nowhere in my learning. I am sure I am not alone to feel this way.

    I want to learn not what to pick, but how to pick. So, instead of just recommending a stack, please teach me how to weigh my options. How do you pick a stack? And for that part, is the stack of choice even important... or would anything that serves its purpose suffice?

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

    What are some tips for beginning to open-source software as a company?

    Posted: 03 Feb 2020 11:08 AM PST

    My company is looking to open-source some repositories we have written. We don't have prior experience managing open-source software. For anyone who works at a company who has a solid open-sourcing policy, what kinds of tips or learned pieces of wisdom can you share?

    Looking for tips on how to present the repo (docs, structure, etc.), how to manage issues and pull requests from the community, and anything else that may be overlooked.

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

    I'm there to learn and my boss expresses strong disappointment at how slowly I deliver

    Posted: 03 Feb 2020 10:22 AM PST

    Hi all,

    Bit of a long post, TLDR is in the title I guess. I'm wondering if I'm the a**hole in this story, any feedback would be appreciated.

    I'm a self-taught Java developper, been learning Java SE on and off since the Summer of 2017. Got some knowledge of web development as well. With enough time and an internet connection, I feel like I can do anything -- I can research effectively, my English is fine, I like coding, and I love that feeling when you finally understand a problem as you discover a solution to it. If I'm not eating or sleeping, you can bet I'm on my IDE and most of the time you'd be right.

    That said, I'm having trouble not feeling like a doofus lately. 3 months ago, I started working my first job as a junior fullstack dev at a startup in my area. It's a work/training program, so I'm basically a student who works there four days a week, and I study and do projects the rest of the time.

    I've been handed a project that was started before I arrived, and I have another colleague who works on it with me. Backend is Spring, Frontend is Angular. As the closest thing to a framework I had ever used was jQuery back in 2016, you could say I had to learn quite a lot before I could even touch the code.

    My boss took me aside a month or so ago and explained he was worried about how slow I was to deliver the features I was tasked with developping during our briefings. He'd like to see me ask more questions to my colleague who's more experienced, and keep him with me until any problem is solved. He'd like to see me arrive earlier at the office too (I have a tendency to arrive late and leave late, though I'm putting in more than I'm obligated to on the whole). In short, he'd like to see more signs of my motivation, and he's having trouble believing that I'm comitted.

    So you know, fair enough I guess. I've started arriving earlier, leaving just as late, putting other things on the backburner (including my studies), and spending more time on our project. I ask more questions, even though I prefer doing my research online or checking out the documentation. I comply. Deadlines, budgets, all that; I wanna help. I'm getting a lot out of this too, learning more than I ever had on my own actually, so I do wanna preserve this job.

    The latest sprint turned into kind of a marathon when a refactoring job went awry, which I had to rollback, before we could merge our various new features on a staging branch. Merge conflicts, different approaches, etc. I spent a week adapting my existing code to what my colleague had done. Edit: I wanna add that I should have communicated more on what I was doing rather than embark on that refactoring job; I'm at fault here, and I've learned from that. Then I spent a week doing a task that was supposed to take two days, for various reasons: one is that the task was evaluated without knowing that the code on which it was going to be built would have to be modified too; another is that I'm not very experienced with SQL queries and databases in general, and I had issues with that when dealing with the backend. As a result, my assigned tasks were only partially done when my boss asked for a demonstration of the new feature today.

    He took it like I'd been doing very little, which I don't think is fair; but what do I know? He repeated how worried and disappointed he was, did not really acknowledge the unexpected issues I had faced, and added he could have done my one-week task in half-an-hour. Again, I don't think it's fair, but I don't really know. I'm not delivering the way a developer should. I'm also not an experienced fullstack developer. I sold my application by saying that my comitment would make up for my lack of experience, and that's not exactly how it went. Not to say I'm not involved, but I mean that it doesn't seem to actually make up for it.

    At that stage, I'm ready to just pack up and go, continue my studies full time, do some personnal projects, work on open source software, that sort of stuff. I'm kinda sick of being seen that way I guess. On the other hand, I acknowledge that the rationnal thing to do may well be to stay there and endure the scorn; they're probably not gonna fire me (it's quite uncommon in France), and I'm getting my first year of work experience out of it, as well as slightly more money than I would get if I were unemployed. I like most of my coworkers, I think I like Angular and Spring. I don't hate the project we're working on. It's just a bunch of bad stress.

    Anyone ever been in a similar situation? Either way, does anyone have any feedback or advice for me? And I'll take criticism too, by the way; I can take it.

    Frenchie out.

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

    JLabel/JTextField database confusion

    Posted: 03 Feb 2020 10:08 AM PST

    I am currently making sample project where i want to display the values stored in the database display on JLabels or JTextFields, however I'm having difficulty on how to make it works. Seeing examples on the web, there are alot of gimmicks like search functions, jcombobox, JTables and more. I want the program to only the values on JLabels/JTextFields without gimmicks. Any help given is very much appreciated.

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

    is it worth learning web development before any other language like python or java?

    Posted: 03 Feb 2020 04:03 AM PST

    is it worth learning web development before any other language like python or java?

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

    [HTML JS] How to toggle disabling a input type radio if another input type radio is selected?

    Posted: 03 Feb 2020 09:43 AM PST

    Hello!

    I made a little example for you:

    https://www.w3schools.com/code/tryit.asp?filename=GBJQGCPXKNLT

    <p>Please select your destination:</p> <input type="radio" name="a" checked> Canada<br> <input type="radio" name="a"> France<br> <p>Please select your means of transport:</p> <input type="radio" name="b" checked> Car<br> <input type="radio" name="b"> Walking<br> <input type="radio" name="b"> Airplane<br> 

    If the user picks the "Walking" option, and then picks "France":
    - the "Walking" option gets disabled because we live in america.
    - "Walking" gets unchecked, and the default means of transport ("Car") gets checked.
    - then, after that, if the user checks "Canada", everything returns back to normal, and he may check "Walking" if he wants

    How would one go about making this happen?

    Tnx!

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

    Anyone know of any thesaurus solutions? Preferably self hosted.

    Posted: 03 Feb 2020 09:37 AM PST

    I'm working on a project where the client wants to incorporate thesaurus terms in a search but they would prefer not to query an API service. Has anyone worked with thesaurus's as part of their projects? What are my options? Because so far I just found a lot of APIs that people use. Even on github, the APIs use datasets hosted by a 3rd party.

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

    Which gcc flags for printf overflow warning?

    Posted: 03 Feb 2020 09:35 AM PST

    Hello,

    consider the following C program:

    /* foo.c */ #include <stdio.h> #include <stdint.h> int main() { uint32_t x; x = 0x7fffffff; x++; printf("%d\n", x); printf("%u\n", x); } 

    Compiling it with gcc -Wall -Wextra -o foo foo.c gives no warnings, but I think it should! Is there some gcc flag for turning on warnings when I use printf with the wrong speficier (%d for an unsigned int in this case)?

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

    No comments:

    Post a Comment