• Breaking News

    Monday, April 5, 2021

    How should a student learn to be great at coding/software development? learn programming

    How should a student learn to be great at coding/software development? learn programming


    How should a student learn to be great at coding/software development?

    Posted: 04 Apr 2021 02:07 PM PDT

    I'm a Computer Science student who's in my third year, and I still feel like a beginner. I think the reason for this is stagnation; I feel that my CS program does not promote the skill-sets nrcessary to make students effective programmers. How does one go about transforming from a fledgling programmer into a professional?

    TLDR - how can I increase the quantity (# of projects) and quality of my programming?

    At my school there is absolutely zero code-reviewing of any sort. I have never once received any constructive criticism on my programming, and I've seen some other students with AWFUL code that still "passes the test cases." How can I go about improving the quality of my code?

    How do you get in consistent practice? The only code I write during the school year is for assignments, and I really don't think that's enough. How do you both come up with personal projects and make a schedule for developing said projects? Do you recommend things like Hackathons and Game Jams?

    Feel free to add any advice that wasn't specifically asked for if you'd like :)

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

    I made an IDE

    Posted: 04 Apr 2021 10:02 AM PDT

    Can you guys check it out? Maybe give a review on how the code looks? A commit would be even better!

    https://github.com/AOSXAP/RAX

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

    How to get more practice of programming in less time.What strategies do you guys use.

    Posted: 04 Apr 2021 07:28 PM PDT

    I need to learn enough programming to get a good job.

    submitted by /u/Phantom-coder
    [link] [comments]

    What are the advantages of native mobile apps that justify companies forcing users to use them?

    Posted: 04 Apr 2021 10:16 PM PDT

    My background is mostly on web development, so I'm definitely biased towards the advantages of a progressive web app. Providing the service to both desktop and mobile users with a single stack seems like a huge advantage. It cuts costs, centralizes the development, avoid rework/redundancy. Also if your brand is not so strong, it's more likely that the user will enter your website than download (another) unknown app.

    However, most big companies today aggressively prefer apps towards PWAS. Reddit almost forces you to download it, Instagram limits functionalities, etc.

    I know that with recent technologies such as flutter/react native it's possible to distribute apps to both android and ios with a single source code. However it doesn't seem to be the case for big techs, they stick to the native languages. And they still need to keep their websites functional anyway.

    So WHY is that? Are apps more lucrative somehow?

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

    Can anyone share their experience with switching from accounting to programming?

    Posted: 04 Apr 2021 12:54 PM PDT

    Hi there, I am currently starting my programming journey. I have signed up to a reputable bootcamp where I am learning front end and back end programming (HTML5, CSS3, Python, JavaScript etc...). Anyway, my background is finance, I was an accountant for 20 years, so needless to say that I am as nervous as I am excited ! Is anyone here come from an accounting background like me ? I would love to know how you've felt about switching career and how was your journey like (learning, first job etc...)

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

    Pluralsight Skills is Free for the full month of April

    Posted: 04 Apr 2021 11:55 PM PDT

    Pluralsight is offering free access to Pluralsight Skills for the month of April. You can get access to 7000+ video courses for free with no credit card required.

    You can sign up and get started right away.

    Here's more about the offer.

    Link to actual offer page.

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

    How do you get rid of the feeling that your way to code isn't good enough?

    Posted: 04 Apr 2021 05:04 PM PDT

    Apologies if this isn't the correct subreddit for this kind of question.

    I've been coding for years and it's probably my favourite thing to do in my free time. I usually code in Typescript, ocassionally I do some stuff in C# or Python but that's mostly small projects intended for personal use, so I don't care as much about the quality of those. I have one issue though, I've had it for a long time now and I can't seem to get rid of it.

    Whenever I start a project that's intended to be public, I make some good progress and get most of the functionality working, but at some point I keep asking myself the same questions. Do these interfaces belong here? Should they be single files rather than multiple? Does this folder structure even make sense? Does this class name make any sense or should it be changed? Should this even be a class or should it just be a collection of exported methods? Am I using to many internal methods to find a solution? Things like that.

    I end up in a constant cycle of refactoring - and I'm never happy with it. It feels like it could always be better, or rather, it feels like the way I do it isn't the right way. Everytime I look at established projects or repositories I get a little discouraged, because it seems so thought out and I feel like my repos won't ever reach that stage.

    It just seems like I get stuck on very minor (almost meaningless) problems, which demotivate me more than they should. I often find myself dropping projects because I believe that while the code does what it should, the quality isn't good enough as a whole package.

    Does anyone else have or had this issue? If so, how did you get rid of it?

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

    How should a function return the reason of its failure?

    Posted: 04 Apr 2021 04:15 PM PDT

    My coffee machine contains a method brew() that checks if the levels of coffee beans, water, and filter clogging are appropriate before filling a cup. This method currently returns true if it succeeds, and false if it fails.

    However, I now want to be aware of the reason of failures. How should I modify the method to accomodate this? (general OOP, e.g. Java)

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

    How to add an app to your portfolio while only showing some code of it on github and not the entire sourcecode.

    Posted: 04 Apr 2021 10:40 PM PDT

    Im currently building an app that I'm trying to add to my portfolio. I want to make money out of it so I don't want to share the entire code on github but I still want to add it to my portfolio. How can I go about this?

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

    How could I go about writing my own file type converter in c++?

    Posted: 04 Apr 2021 10:12 PM PDT

    Before someone says find a library. Honestly I just want to do this to build my understanding of how things actually work and it seems really interesting based on the small amount of research I've done on a few file formats. I've started reading up on a few different file types and how they work (PDF, png, cbz, epub ...) but I am still completely clueless on how I could read and translate the data from one format to another let alone put it into code. If anyone has any really in depth resource I can look to or anywhere else that I could be pointed that might be useful to me that would be Amazing

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

    The Odin Project or Colt Steele's Bootcamp for a complete beginner?

    Posted: 04 Apr 2021 02:57 PM PDT

    Hey everyone,

    I'm looking to dive deep into web development (as a total beginner) for about 3-4 hours a day and I'm currently window-shopping for MOOCs.

    So far I liked The Odin Project and Colt Steele's Bootcamp the most. Both have very good reviews and testimonies from previous students, but both seem to take very different teaching methods (The Odin Project uses a lot of documentation and Colt Steele uses a lot of examples on video).

    I'm on the fence about picking one, so I'm in need of some help. I'm also open to other options as long as they are not ridiculously expensive. Thanks!

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

    Former CS Graduate That Wants To Get Back Into Programming

    Posted: 04 Apr 2021 06:53 PM PDT

    I was a computer science major that graduated back in 2017. I'd love to get back into programming, but I'm not really sure where to...resume? I'll say resume here because I'm not new to programming by any stretch of the imagination.

    While in school, I took classes in C++ Java, Android development, iOS development, databases, and because I was on the web track, a whole lot of web stuff (HTML, php, JavaScript).

    I really enjoyed Java, Android, and the web development classes. The iOS class, I didn't really enjoy. I could never seem to align those anchor points.

    I don't have a "goal" per say, but I'd love to make it a hobby that may lead to a potential employment opportunity way down the road.

    What would you recommend for someone like me?

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

    OOP - any advice on when to create objects?

    Posted: 04 Apr 2021 04:02 PM PDT

    Hi everyone,

    There are A LOT of amazing posts here on Reddit explaining in simple terms what OOP is, what classes are etc and I constantly learn a lot from it, so massive thank you to each of you contributing.

    But what I struggle now the most is how to know something should have it's own class. Literally I have no idea. Is there a rule when you should use just functions and variables, and when it should be a class?

    I've been coding along some tutorials on simple games such as card game and quiz game. My first thought when starting is "alright I'll write some functions to try to get this to work". But then instructor uses classes. Ok, I'll do a class then. What should the class be? And then he creates a few - one for a single card, one for the whole deck, I think one for something else as well, then they all interact with each other... And that's a ridiculously simple (for you experienced folks out there) card game.

    What are your advices on how to know when to create them and how many?

    I will add that I get the concept of what class is, methods and attributes, inheritance too. (If it matters, I'm learning Python)

    Thank you!

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

    Learning by trial and error

    Posted: 04 Apr 2021 08:35 PM PDT

    When solving questions for programming (eg. Making a pattern using loops), is it correct if I don't do it in one go, but through trial and error multiple times?

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

    Why is DigitalOcean more popular than EC2 for small projects?

    Posted: 05 Apr 2021 12:20 AM PDT

    Why does it seem like a DigitalOcean is much more popular when compared to AWS, at least for small projects when they do the exact same thing? Granted I haven't used DigitalOcean before, but I'm having trouble why it's more popular when it a similarly priced EC2 instance is more powerful?

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

    Time Complexity if statement

    Posted: 04 Apr 2021 08:20 PM PDT

    How do if statements affect time complexity?

    Consider the following loop:

    For(int i=0, I < n2, i++) if(I % n == 0) for(int j = 0; j <= n2; j++) //do something

    The way I approached it was that I removed the if statement by changing the first loop to: For(int I = 0; I < n2; I *= n)

    Honestly don't know how to continue from here

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

    Windows Forms app (.net framework) error

    Posted: 05 Apr 2021 12:00 AM PDT

    I am following a tutorial on youtube of windows forms app (.net framework) for making an attendance system...... I have downloaded Metro Framework by jens thiel from Nuget packages on visual studio 2019 i am getting an error System.ObjectDisposedException: 'Cannot access a disposed object. object name:MetroAeroDrop shadow....if you know any fix please help me i am trying to make a project but due to this error can't go any further

    Pics:

    https://imgur.com/a/VryDACG

    main form: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Attendance_System { public partial class MainFrm : MetroFramework.Forms.MetroForm { public int loggedIn { get; set; } public MainFrm() { InitializeComponent(); loggedIn = 0; } private void MainFrm_Load(object sender, EventArgs e) { } private void MainFrm_Activated(object sender, EventArgs e) { if(loggedIn == 0) { //open login form LoginFrm newLogin = new LoginFrm(); newLogin.ShowDialog(); if (newLogin.loginFlag == false) { Close(); } else { loggedIn = 1; } } } } } Login Form: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Attendance_System { public partial class LoginFrm : Form { public bool loginFlag { get; set; } public LoginFrm() { InitializeComponent(); loginFlag = false; } private void metroButtonLogin_Click(object sender, EventArgs e) { DataSet1TableAdapters.UsersTableAdapter userAda = new DataSet1TableAdapters.UsersTableAdapter(); DataTable dt = userAda.GetDataByUserAndPass(metroTextBoxPass.Text, metroTextBoxPass.Text); if(dt.Rows.Count > 0) { //valid loginFlag = true; } else { //not valid loginFlag = false; } Close(); } } } program.cs using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; namespace Attendance_System { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainFrm()); } } } 

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

    Do most websites write their own authentication?

    Posted: 04 Apr 2021 11:49 PM PDT

    Or is it more common for them to use something like cognito or auth0? Is it generally a bad idea to try to write your own authentication?

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

    Tips: functional components react

    Posted: 04 Apr 2021 03:56 PM PDT

    Is it fine if I use a lot of functions within a functional component in REACT? I tend to create 4-5 functions that do something with the useState hooks so I'm wondering if it's a good practice to create many functions within a React component.

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

    [C#] For loop does not execute after Console.ReadLine()

    Posted: 04 Apr 2021 11:03 PM PDT

    I am using hacker ranks 30 days of code and am currently on day 5.

    The program is should accept a number and multiply it from 1 to 10, printing each problem;

    An example being:

    1 x 1 = 1 1 x 2 = 2 1 x 3 = 3 etc... 

    The issue I'm having is that my for loop is never touched before the program terminates (first code block).

    I enter a random number, hit enter, and the command prompt closes without any errors.

    However, if I use a do-while loop (second code block), it works just fine. To me, it doesn't make sense. Can someone explain what's happening?

    Code that doesn't work:

    using System.CodeDom.Compiler; using System.Collections.Generic; using System.Collections; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.Serialization; using System.Text.RegularExpressions; using System.Text; using System; class Solution { public static void Main(string[] args) { int n = Convert.ToInt32(Console.ReadLine()); int sum = 0; for (int i = 0; i > 9; i++) { sum = n * i; Console.WriteLine(n + " x " + i + " = " + sum); } } } 

    Code that does work:

    using System.CodeDom.Compiler; using System.Collections.Generic; using System.Collections; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.Serialization; using System.Text.RegularExpressions; using System.Text; using System; class Solution { public static void Main(string[] args) { int n = Convert.ToInt32(Console.ReadLine()); int sum; int counter = 1; do { sum = n * counter; Console.WriteLine(n + " x " + counter + " = " + sum); counter++; } while(counter != 11); } } 
    submitted by /u/foxesarezuper
    [link] [comments]

    Is there a heuristic way to find the longest simple cycle from a particular node in a directed graph?

    Posted: 04 Apr 2021 10:48 PM PDT

    So far ,I could only think of a brute force method using networkx. However , for a large dataset , execution takes a very long time. I am aware that this a NP-hard problem so is there a heuristic solution that gives a near optimal solution ?

    adj_list refers to a 2d-list of nodes labelled as integers

    eg. [[1,2],[3,4],[3],[4],[]]

    In the graph , each node is labelled as an integer where nodes are from 0 and above in increasing order

    if adj_list is [[1,2],[3,4],[3],[4],[]] , then the nodes present are 0,1,2,3,4,

    import networkx as nx

    def create_graph(adj_list):
    length = len(adj_list)
    g = nx.DiGraph()
    for node in range(length):
    for towards in adj_list[node]:
    g.add_edge(node, towards)
    return g

    def get_longest_cycle(adj_list, s):
    g = create_graph(adj_list)
    cycles = nx.simple_cycles(g)
    # print(cycles)
    largest = 0
    to_return = []
    for c in cycles:
    if s in c:
    if len(c)>largest:
    to_return=list(c)
    largest=len(c)

    return to_return

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

    Error with Deploying Android App to Heroku

    Posted: 04 Apr 2021 10:43 PM PDT

    Hello all! I am attempting to deploy an Android app to heroku and I am getting this error (will attach full git bash image once I figure out how). This is my first time ever attempting to deploy an app of any kind to heroku for reference. Error is:

    Could not determine the dependencies of task ':app:assemble'. > Could not create task ':app:assembleRelease'. > Could not create task ':app:lintVitalRelease'. > SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/tmp/build_d977a619/local. 

    Things I've done so far to attempt a fix:- I followed getting started tutorial and set up heroku CLI. App is already versioned in GitHub, no issues there.

    - I'm aware this is a gradle based app. Followed instructions here: https://devcenter.heroku.com/articles/deploying-gradle-apps-on-heroku

    - Tried the following command per the instructions, and also tried ="stage" and ="build - x test". Did not resolve.

    heroku config:set GRADLE_TASK="build" 

    - Attempted to code a stage task in the build.gradle.app file (java). No idea if that's correct but the app synced and successfully built. Commit/push completed before deployment attempt. Did not resolve.

    task stage(dependsOn: ['build', 'clean']) build.mustRunAfter clean task copyToLib(type: Copy) { into "$buildDir/libs" from(configurations.compile) } stage.dependsOn(copyToLib) 

    Thoughts:

    - I have not created a procfile yet. Do I need to? It seemed optional and only if you want greater control over how the app launches. If that is the issue, how do I create that file in Android Studio?

    - The error response mentioned trying to deploy from the wrong branch. Could that be the issue?

    - Did I totally screw up the task stage code?

    I am at a total loss at this point and have scoured stackoverflow for solutions with no luck. Help! lol

    Disclaimer: I am a very new developer. I am a veterinarian on an adventure and I just learned what heroku was last week. I may be missing something very basic.

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

    Creating object in another class

    Posted: 04 Apr 2021 06:48 PM PDT

    I am trying to create a object of the Player class that I can use throughout the Wheel class. Is what I did allowed or is there a better way to do this.

     private Player player1; /** * Constructor for objects of class Wheel */ public Wheel() { Player player1 = new Player("John"); } 
    submitted by /u/NikTebow
    [link] [comments]

    I need advice. I will have to apply for university soon.

    Posted: 04 Apr 2021 06:33 PM PDT

    I'm thinking about studying programming and IT, but I don't know if I will be good at it or if I will enjoy it. Do you know how I can test myself? Perhaps what can I try learning as an absolute beginner to see if it is going to work out for me?

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

    No comments:

    Post a Comment