• Breaking News

    Saturday, February 1, 2020

    Do you ever feel overwhelmed by the sheer amount of programming you have to learn? How do you get over this feeling of being inadequate and that it will take a very long time to get to a point where you’re good? Ask Programming

    Do you ever feel overwhelmed by the sheer amount of programming you have to learn? How do you get over this feeling of being inadequate and that it will take a very long time to get to a point where you’re good? Ask Programming


    Do you ever feel overwhelmed by the sheer amount of programming you have to learn? How do you get over this feeling of being inadequate and that it will take a very long time to get to a point where you’re good?

    Posted: 01 Feb 2020 10:47 AM PST

    I've been reading over programming related subreddits and I feel at time overwhelmed by the sheer amount of stuff to learn. I'm currently learning web development but when I'm reading what others have done or the job posting requirements for the skills to learn, I feel like there is so much to learn that at times I feel discouraged or overwhelmed that I will never be able to be good. People are posting the things they made and I'm sure it took them a while to get to that point but I feel like it's night and day compared to where I am and where these people are

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

    Anyone else find themselves being more productive by limiting themselves to only one monitor?

    Posted: 01 Feb 2020 09:24 PM PST

    These days, whenever I have more than one monitor, I end up having at least one of those monitors doing something non-productive, like having a Netflix show on while I code. It's become really distracting, and I've actually found that I'm much more productive having only one screen. Sure, it's really annoying to have to drag full-screen windows side to side (I use a MBP), but at least I can't watch Netflix, haha

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

    How to focus within such a diverse industry?

    Posted: 01 Feb 2020 04:22 PM PST

    HI all,

    I'm a programmer with nearly 2 years experience in software, mainly around Linux development/tools/packaging/CI/CD.

    I love my job, but constantly wonder what i could be doing to be better.

    My question is how do you stay relevant in a industry that is so diverse? Whenever i find myself wanting to update my skills and learn new things, i fall down the rabbit hole of wanting to build an 8-bit computer from scratch whilst also learning REACT and creating a Django web app.

    I find all areas of computing interesting, which was fine whilst at university, but i find myself never getting anywhere because i can't find a place to start and learn new things within the now limited time i have after work.

    Does anyone have any tips on how they keep their skills current without falling into this trap?

    Thanks

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

    How to keep test suites manageable?

    Posted: 01 Feb 2020 10:54 AM PST

    I'm expanding and refactoring some legacy code by breaking monoliths into functions. This codebase is currently devoid of unit tests and the logic I'm working on is fickle and important, so I'm trying to introduce unit tests as best as I can.

    The issue I'm having is that Function A calls B which calls C which calls D. D has two parameters of which the first can be one of 4 values, and the other is basically any string but is expecting certain formats. I wrote tests for D and now I have ~25 tests spread across 200+ lines. Well C, you can imagine, is going to have more variation in parameters. C has the potential to mutate the output of D so at the very least I feel like I need to repeat those tests for C. Then I need to add more.

    I feel like I'm doing something wrong. If I keep this up, my test class is going to be a few thousand lines and building it is slow, repetitive, eye straining work.

    Should I maybe forget about testing B/C and go straight for A? Add cases to B/C as I need to when debugging A? I'm thinking about fixing C/D so that C can't mutate the output of D but that is a lot easier said than done and then I feel like I'm in a catch 22 where I need to make tests to prove that the refactor there is correct.

    FWIW this is PHP and I can't use 3rd party code. The output is not HTML.

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

    How can I go to cyber security?

    Posted: 01 Feb 2020 06:25 PM PST

    Hi,

    I started with front end, I'm a junior and I like everything from programming but my real love is cyber security and I want to go to it and make a career in this area.

    I think I neglected my interest in this area for thinking it's too hard to get started and make a career, but now I have a job as a front end developer at an ecommerce agency and want to start studying cyber security and later get a job in the area.

    So I'm here to ask you for everything you know about this and how to get started, I don't want to do a bachelor's degree, so is it still possible for me to get a job even studying by myself?

    Please help me, I don't know shit about how ti get started in this area and really want to study it.

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

    Does the “get” keyword only apply when returning an instance variable?

    Posted: 01 Feb 2020 04:15 PM PST

    Let's say that there is a method called getNumber but there no instance variable that has the name Number.

    If the method getNumber computes the Number by using ONLY other instance variables (information that is available to the class) then is it appropriate to use the get keyword?

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

    How to avoid overflow in Java programming?

    Posted: 01 Feb 2020 03:49 PM PST

    I keep multiplying these big positive integers and receiving a negative number. I know the result is just too big and I need to make it a long number but everything I have tried has not worked. Any advice to produce a positive 3000000000000000000000.000?

    import java.util.Scanner; public class LabProgram { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int num1; int num2; int num3; int num4; num1 = scnr.nextInt(); num2 = scnr.nextInt(); num3 = scnr.nextInt(); num4 = scnr.nextInt(); int product = num1 * num2 * num3 * num4; int sum = num1 + num2 + num3 + num4; int average = sum / 4; System.out.print(product + " "); System.out.print(average + "\n"); double product_1 = num1 * num2 * num3 * num4; double average_1 = (double) (num1 + num2 + num3 + num4) / 4; long product_2 = (long) product_2; // This conversion doesnt work System.out.printf("%.3f ", product_1); // This keeps producing negative System.out.printf("%.3f\n", average_1); } } 
    submitted by /u/MarlinsBB
    [link] [comments]

    OAuth own database registration / login flow

    Posted: 01 Feb 2020 02:34 PM PST

    Currently my application only supports email & password login and I would like to implement support for google and Facebook.

    Problem here is that I'm not sure how I should handle the registration / login process.

    Ideas for the process: When the user starts the registration process user authenticates to google, I get the needed data from Google (name, age, email) and after retrieving the data I will add them into database.

    Next time when user logins with Google sign-in how do I identify if the user already exists in database?

    Should I add a provider_Id property column into my database?

    So the user table would look like: user_id, provider_Id, name, age, gender.

    user_id is the I'd which is generated by me (1, 2, 3 etc) and the provider_id would be the uuid which is the Google user uuid.

    Now when user logins with Google I could check if the given uuid matches the uuid in the database?

    Those who have implemented similar registration / login could you share some process flows and what kind of data models you have.

    Thanks in advance!

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

    Switching from GameDev to something else.

    Posted: 01 Feb 2020 11:35 AM PST

    Okay so I've been a professional game developer for few years now, and although there is so much for me to learn here, I'm starting to feel I'm not belonging in the gamedev so much , and would like to try mobile development, since I've tried web dev and only the backend seemed okay to me, I hated frontend with all of my heart. I really like how swift and the entire apple ecosystem works, and would like to try it, but I have no idea how much that thing is going to be in-demand skill since lots of companies are switching to cross-platform frameworks. I'm open to suggestions :) maybe going ASP.NET core doesn't seem like a bad choice also, since I'm really good with C#, but still don't like it as much as I liked developing non-game mechanic parts in games.

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

    Is there a simple way to count all descendents of a DOM node in the browser console?

    Posted: 01 Feb 2020 07:17 AM PST

    I can select a DOM node and count the direct children, but there doesn't seem to be any straightforward way of getting a total count of all descendants, without writing some kind of recursive function.

    Is there any way in the browser I can select a DOM node and get the total count of all its descendants?

    This is really useful information when trying to lower total DOM nodes in a page.

    Thanks

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

    How can the Rust language compiler be written in Rust?

    Posted: 01 Feb 2020 07:06 AM PST

    Send copy of database or JSON?

    Posted: 01 Feb 2020 06:28 AM PST

    Beginner here, trying to decide whether to send JSON responses in my REST api or just send a copy of the database. The frontend app will need offline access to the data anyway so if I send JSON from the server I'll need to decode it and add it to the local database anyway, so I thought "wouldn't it be easier to just send the whole database?"

    Now, of course I would first do a check if there's any new data in the server's database and only send a new copy when there is. I think I could implement this by calculating the hash of the local database, then sending it in HTTP and then just compare it to the database on the backend. If match = no new data, else send over the database.

    The database is sqlite3 and it doesn't contain any images or files, just strings, integers and floats. I don't think the filesize will get very large even with a year's worth of data.

    I'm thinking the benefits of doing it that way are:

    • Easier for a beginner like me (no json decoding, parsing, object type x is not JSON-serializable errors, etc.)

    • Less HTTP requests since everything is already on the device once the database is downloaded

    So which is better and why?

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

    Would you use Gradle for .NET Visual Studio solutions?

    Posted: 01 Feb 2020 05:56 AM PST

    This comes from a discussion I had.

    Some people swear by Gradle in every situation, but so far I am not unconvinced that the added complexity has value for projects that are already defined in MSBuild through Visual Studio solutions, where things like dependencies and NuGet packaging can already be defined, much of it through the UI.

    Does anyone have experiences with this? I'd be happy to hear any arguments as to why you would or would not do this.

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

    Can I use javascript to send 10 messages from the LinkedIn Search page?

    Posted: 01 Feb 2020 12:43 AM PST

    I'm looking for a job and would like to send all 10 contacts on a specific LinkedIn search page a message:

    https://i.imgur.com/3JMPkxd.jpg

    Ideally, the message would have the person's first name included, e.g.

    Hi {FirstName}! Can you check if there's any ...-role or any similar roles available that would be open to hiring ...-role?

    Is this possible in javascript?

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

    How do instructors say "cvtsi2ss" while teaching class?

    Posted: 01 Feb 2020 12:04 AM PST

    Seems like it would get annoying...

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

    react with rails API: user stays logged in when testing on localhost but does not work on deploy

    Posted: 01 Feb 2020 12:44 AM PST

    https://nicktohzyu-tdlv6-front.netlify.com/ When testing, I can refresh/navigate to sub pages while staying logged in, but this doesn't work in deployment.

    In front end (react): Log in: ``` axios .post( this.props.api_url+"/sessions", { user: { email: email, password: password } }, { withCredentials: true } ) .then(response => { if (response.data.logged_in) { this.props.handleSuccessfulAuth(response.data); } else{ this.setState({ loginErrors: response.data.errorMessage }); //console.log("login error, " + response.data.errorMessage); } }) .catch(error => { console.log("login error", error); }); event.preventDefault(); }

    handleSuccessfulAuth(data) { this.props.handleLogin(data); this.props.history.push("/dashboard"); }

    handleLogin(data) { this.setState({ loggedInStatus: "LOGGED_IN", user: data.user }); } ```

    check log in: checkLoginStatus() { axios .get(this.state.api_url + "/logged_in", { withCredentials: true })

    Backend (rails with bcrypt): Sessions controller: class SessionsController < ApplicationController include CurrentUserConcern ... def logged_in if @current_user render json: { logged_in: true, user: @current_user } else render json: { logged_in: false } end end end current user concern ``` module CurrentUserConcern extend ActiveSupport::Concern

    included do before_action :set_current_user end

    def set_current_user if session[:user_id] @current_user = User.find(session[:user_id]) end end end `` It seems to be sending empty credentials in deployment, because the heroku logs for the rails API show error undefined method 'id' for nil:NilClass)`

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

    Can I automate woocommerce products import ?

    Posted: 31 Jan 2020 11:32 PM PST

    I am on the process of making a website for my bookshop to start taking online orders too.

    Is there a way to automate the process of adding books to the website without having to fill the details of each book ? there are thousands of them ...

    Like for example connecting the website with a database and just writing the ISBN of the book and it's automatically takes the details from the data base ?

    Or at least at least some way to organize everything in an excel and import it ? Filling the details in woocomerce is impossibly time consuming lol

    I'm by no means a programer, I hope this is the right place to ask ? Please help me and I'm open for every other idea, thank you !!

    submitted by /u/6bootysurfer9
    [link] [comments]

    I learned of 50% code in CSS, HTML, Python. Can I create a website now?

    Posted: 01 Feb 2020 12:51 AM PST

    CSS - 50% learned

    Python - 50% learned

    HTML - 90% learned

    not yet studied enough? Do i need to fully learn before webdeveloping?

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

    No comments:

    Post a Comment