• Breaking News

    Wednesday, April 15, 2020

    The Learning Loop is Dangerous learn programming

    The Learning Loop is Dangerous learn programming


    The Learning Loop is Dangerous

    Posted: 14 Apr 2020 10:03 AM PDT

    As programmers we all know what are loops.This post is about a special type of loop.Almost every newbie trying to learn programming will come across this phase in his programming pathway. Yes the learning loop is dangerous try not to get stuck in it.

    Yes we all love to learn new stuff in tech Yeah I agree its cool.But binging online courses like Netflix series is not the way to do it.It is not going to be beneficial for you.

    Once you learned programming language.You are no longer a newbie.You can and you should start building something immediately.Maybe a simple application to calculate something.Or just use your skills to light some LEDs using an arduino.

    You should take your time and build something with the knowledge you gained before moving on to a new technology.Find your interests stay focused.

    I've seen people taking courses over and over ML,React,Flutter,Django .I had a friend who's hobby is completing online courses. But at the end of the day He had learnt something about those technology but he have no practical knowledge in it.He hasn't built anything in it. Never be like him.

    Learn something build something. Learn and Build that should be your slogan as a Newbie programmer.

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

    Why we do this

    Posted: 14 Apr 2020 10:08 PM PDT

    I turned 33 this year.

    When I was in college, I had no idea what I wanted to do. I came from a SUPER religious background, and I struggled to disconnect from all of that, find my footing, and figure out a purpose.

    I changed majors a bunch of times, and I ended up picking physics after a few years of flip-flopping -- I guess because I wanted to torture myself.

    I always felt weird and out of place because when I finally landed in physics, I basically had to start over.

    I was a few years older than everyone else, and I didn't really connect with many people.

    Amazingly, a year and a half before I graduated, I met an international student through the exchange program who eventually became my wife. Something happened to me when I realized that the relationship was going to be serious.

    I realized that I needed to get laser focused my future in a way that I hadn't before.

    I decided that since I'd need the flexibility to travel and work remotely, tech made the most sense. So, I started checking out massive stacks of books on Java and C++ from the university library. (BTW - not a great place to start IMO).

    I got up at 5AM everyday before class and studied programming before hitting my regular classes.

    It sucked.

    What's funny is that I still do that to this day. At some point, you end up being OK with things sucking. As guys in the military say, you need to "embrace the suck."

    I'm not rich, but I've made a few million dollars since I graduated -- writing code for clients and running a small business. Most of that went to paying expenses and employees over the years, but we have a pretty decent savings.

    During this whole COVID thing, I haven't been completely freaked out, because I know we have a bit put back that we can lean into if we need it.

    During this global crisis though, I've been rethinking a few things.

    I've been refocusing and getting more serious about our future. I've decided to commit to new things at new levels.

    One reason I'm writing this is to remind myself to persevere. The beginning and middle parts of learning anything always feel bad because you just don't know what you're doing yet.

    I don't know why you started learning to code, but I'm sure you have a reason. I just wanted to pass along my story and say two other things.

    First, even if it sucks right now, just keep going. It gets better the longer you stick with it. Most people quit in the middle... right before they reach the other side. You can do it. I did it, and I felt like shit the entire time I was learning. At some point, things started to click, and then there was no looking back.

    Second, no matter how you feel, remember this: it's actually quite courageous to ignore your imposter syndrome and try to tackle something new. Most people never do that.

    Right now I'm looking at some things I started years ago and thinking to myself, "What if I'd stuck with it everyday for the past X years?"

    That's not to say you should get bogged down with regret.

    But you absolutely want to seize every day that you have to the best of your ability. To do that, you've got to believe in yourself.

    Hope that helps somebody.

    Peace.

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

    For the people who are into listening music while coding (in this case, studying how to code)...

    Posted: 14 Apr 2020 06:31 PM PDT

    ... try my personal coding playlist: 30 hours of synthwave, spacewave and darksynth. Hope you enjoy it and help you focus!

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

    I'm so terrible. I've understood all the basics coding. The loops, arrays, vector3 all that but I'm still having trouble understanding all those methods and lines cooked up. For example, like this code below

    Posted: 14 Apr 2020 10:32 PM PDT

    Like i understand simple things like this

     Vector3 originalPosition = transform.position; Vector3 dirToTarget = (target.position - transform.position).normalized; Vector3 attackPosition = target.position - dirToTarget * (mycollisionRadius); float atkspeed = 3; float percent = 0; 

    but for this.... i was like Huh?

     while (percent <= 1) { if (percent >= .5f && !hasAppliedDamage) { hasAppliedDamage = true; TargetEntity.TakeDamage(damage); } percent += Time.deltaTime * atkspeed; float interpolation = (-Mathf.Pow(percent, 2) + percent) * 4; transform.position = Vector3.Lerp(originalPosition, attackPosition, interpolation); yield return null; } 

    or something like this

     void Update() { if(enemiesRemainingSpawn > 0 && Time.time > nextSpawnTime) { enemiesRemainingSpawn--; nextSpawnTime = Time.time + currentWave.timeBetweenSpawn; Enemy SpawnedEnemy = Instantiate(enemy, Vector3.zero, Quaternion.identity) as Enemy; SpawnedEnemy.OnDeath += OnEnemyDeath; } } void OnEnemyDeath() { enemiesRemainingAlive--; if (enemiesRemainingAlive ==0) { NextWave(); } } 

    How do you guys cope with this? like how you guys break it down? i know im not the only one suffer from this. I did try to break it down like how i did with the basic method structure but i still can't fathom

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

    Every Goal I Have Has Been Done or is Useless - Motivation Killer

    Posted: 14 Apr 2020 10:45 PM PDT

    Hello, I spent 2012-2013 learning C++ programming and have since on and off done reading and some minor programming exercises. I have never made a project and find myself in this trap I need help getting out of.

    I find that I am stuck between two paths and I can't step forward at all. On one side, I want to make useful programs like simulations that can help optimize and develop society and on the other I want to make useless junk like video games and some little GUI tools.

    I find motivation in the first path (simulators) but feel like everything I want to do there has already been done before and much better than I could hope to. The second path of useless junk I find motivation but feel like there is no purpose in the programs so it would be a waste of life.

    I really need help trying to cross this mental barrier that has been plaguing me for many years. I want to look back on programming with fondness when I die, not with regret. Can someone help guide me through this?

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

    Job Opportunities in Coding

    Posted: 14 Apr 2020 02:32 PM PDT

    I am recently getting into coding due to being stuck in my home thanks to COVID-19. Does anyone have any suggestions for any places or ideas on how I can get my foot in the door with a beginner level job that will help me learn as well?

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

    Should I Go for Codecamp pro?

    Posted: 14 Apr 2020 10:58 PM PDT

    Hey! I am just a beginner in programming and the first language I've picked up is Java. I started learning through Codecamp and I'm almost done with the free course on Java. So far it's been great and I've learned a lot. But I want to know if i should go forward and purchase the pro subscription for further practice. Please give your suggestions. Also, if you do know some other resources which are at the same level or better than codecademy then please let me know! Thanks a lot!

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

    How do you remove the node with the largest data item in a LLL in C++ using one traversal?

    Posted: 14 Apr 2020 10:33 PM PDT

    I was able to do it using two traversals, one to find the largest, and another to delete the largest. How would you do this problem using just one traversal? I am guessing having one function to find the largest item and pass that function into a function to delete the item? Thanks in advance.

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

    I want to learn to program, but with a focus on a specific market or niche, but I don't know what. More inside.

    Posted: 14 Apr 2020 05:22 PM PDT

    So I've dabbled with a bit of html/css and very intro level JS and I didn't like it. I don't have a strong interested in building websites or web apps in a traditional sense.

    It's very broad. I want to learn a language or a technology that's a little more niche. Not 'small' specifically just more focused.

    I've dabbled a bit with Python but my research leads me mostly to AI / Machine learning, academic research and in some cases infosec. There's some back-end web use but you can say that with half the main languages out there. Those domains don't really interest me too strongly. (which is ashame, python 3 was really enjoyable)

    I also learn best when involved in something that's very community-centric. Having a positive feedback loop seems to be one of the best things that drive me to learn. (I trained for a Marathon simply by having a group of e-friends online who all started at the same place and motivated each other.) I've read that Ruby has a pretty tight community behind it however again, as far as I know anyway, it's mostly used as the key driver for Rails - web apps.

    What are languages that typically have (or can be used in) a specific application or use that I can also learn online without spending a ton of money (codecademy, udemy, youtube, whatever) that also has great resources to access a supportive social group of mentors and other students?

    the closest thing I was able to find (sort of) was the Helsinki MOOC for Java and an unofficial discord server dedicated to it. (they use some other chat server app but I forget what it is.)

    I'm interested in a whole lot of things, but also admit to being pretty ignorant to what else is likely out there.

    I'm not looking to 'self study for 3 months and find a whole new career!' here, I'm realistic. I just want to work my brain, learn something exciting and useful and eventually contribute to something that interests me in whatever domain I'm studying in.

    Thoughts? Ideas?

    If it matters, I will have to do this on a windows based laptop that's fairly low spec (but still modern so only thing off limits is probably heavy game development stuff which is fine.)

    Thanks!

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

    Did anyone participate in a Covid-19 Hackathon? If so, what did you build?

    Posted: 14 Apr 2020 08:47 PM PDT

    During the pandemic, a multitude of Covid-19 Hackathon have popped up all over the internet.

    Did you participate in one? Respond to the poll and leave a comment including:

    1)What you built

    2)What place you got

    3)What technologies you used

    4)What hackathon did you participate in

    5)Who did you do it with

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

    Are replicas for backup and redundancy or are they for parallelism?

    Posted: 15 Apr 2020 12:26 AM PDT

    When sharding, you distribute a table in your database across multiple servers to improve performance through horizontal scaling. We also tend to create replicas of these nodes, but I wasn't clear whether or not this was for the purpose of redundancy or load balancing purposes. Also I'm not sure where the master-slave pattern fits into all of this, does it imply that we use replicas for read and have a master copy do the writes?

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

    Is there a better method for prime factorising a number ?

    Posted: 15 Apr 2020 12:21 AM PDT

    this is the code that I wrote :

    int x,c=0;

    cout<<"Enter a number :";

    cin>>x;

    for(int i=2;i<=x;i++)

    { c=0;

    for(int j=1;j<=i;j++)

    {

    if(i%j==0)

    c++;

    }

    if(c==2 && x%i==0)

    cout<<i;

    }

    This method fails when you enter really large numbers. What are some better alternatives ? Also , is the code I wrote good ?

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

    Making stuff with GUI programming

    Posted: 15 Apr 2020 12:14 AM PDT

    I am a newbie programmer, and I think that the best way to even learn more is through making applications and projects.

    I'm currently trying to learn GUI programming, and I thought about making some sort of database to store my favorite songs with a custom UI for viewing/adding/modifying...

    How should I go about it, what do I use and what are the main and basic things I should look into.

    (I know basics in Python, C# and MySQL)

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

    [Java] finding if a number is a power of three

    Posted: 14 Apr 2020 11:35 PM PDT

    public class Solution { public boolean isPowerOfThree(int n) { if (n < 1) { return false; } while (n % 3 == 0) { n /= 3; //divide by 3 while n%3 == 0?? } return n == 1; } } 

    How is this code working? It's the right solution, but doesn't seem like it.

    If I input n = 10, then 10 isn't triggered by the n<1 if statement, and it doesn't trigger the n%3 == 0 while loop either.

    We just get return n == 1, which is 'true', isn't it?

    But 10 isn't a power of 3. So this is false!!!

    What am I missing?

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

    Rock Paper Scissor in C#

    Posted: 14 Apr 2020 11:11 PM PDT

    // so to start off I'm super new to programming and I'm having trouble with adding another switch to PlayerTwo at the bottom of the code. I need to add another random like PlayerOne.

    using System;

    namespace RockPaperScissors { class Program { static int LIMIT = 1000; // the number of games static void Main(string[] args) { int playerOneWins = 0; // number of PlayerOne wins int playerTwoWins = 0; // number of PlayerTwo wins int numberOfDraws = 0; // number of draws

     string playerOneHand = ""; // choice of PlayerOne string playerTwoHand = ""; // choice of PlayerTwo for (int i = 0; i < LIMIT; ++i) { playerOneHand = PlayerOne(); playerTwoHand = PlayerTwo(); switch (playerOneHand+playerTwoHand) // MAIN SWITCH all possible outcomes, some obsolete for the current strategies { case "ROCKROCK": numberOfDraws++; break; case "ROCKPAPER": playerTwoWins++; break; case "ROCKSCISSORS": playerOneWins++; break; case "PAPERROCK": playerOneWins++; break; case "PAPERPAPER": numberOfDraws++; break; case "PAPERSCISSORS": playerTwoWins++; break; case "SCISSORSROCK": playerTwoWins++; break; case "SCISSORSPAPER": playerOneWins++; break; case "SCISSORSSCISSORS": numberOfDraws++; break; default: break; } } if (playerOneWins > playerTwoWins) // Report PlayerOne win { Console.WriteLine($"PlayerOne Wins {playerOneWins} to {playerTwoWins}, with #draws= {numberOfDraws}"); } else if (playerOneWins < playerTwoWins) // Report PlayerTwo win { Console.WriteLine($"PlayerTwo Wins {playerTwoWins} to {playerOneWins}, with #draws= {numberOfDraws}"); } else // Report the draw { Console.WriteLine($"There was a draw with #draws= {numberOfDraws}, #playerOne wins= {playerOneWins}, and #playerTwo wins= {playerTwoWins}"); } } static string PlayerOne() // PlayerOne randomly chooses ROCK, PAPER or SCISSORS { Random random = new Random(); int hand = random.Next(0, 3); switch (hand) { case 0: return ("ROCK"); case 1: return ("PAPER"); case 2: return ("SCISSORS"); default: return("!! ERROR !!"); } } // End of PlayerOne static string PlayerTwo() // PlayerTwo always chooses PAPER*disregard* { return ("PAPER"); } // End of PlayerTwo } 

    }

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

    How do you get into coding flow?

    Posted: 14 Apr 2020 03:32 PM PDT

    Hi I've been wondering how programmers can code for hours? Is there something specific that you do before coding?

    Thanks

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

    How much frontend should a backend developer need to learn ?

    Posted: 14 Apr 2020 10:52 PM PDT

    I want to get into backend development but I'm stuck on the things what to learn and the right path to take. I knew python so I tried Django but building only backend and connecting it with someone else's frontend was difficult for me I end up editing everything becasue django uses templates.

    So I'm thinking of getting into javascript and node.js, how much frontend should i know and learn to get into this backend technology. If anyone got any right path please share.

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

    What is the advantage of JWT? Why do some developers prefer it over traditional tokens?

    Posted: 14 Apr 2020 10:42 PM PDT

    I'm trying to understand its advantages over the traditional tokens, why do some developers prefer it over regular tokens. How does it benefits the application basically that's what am willing to understand.

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

    Help with a pointer practice program c++

    Posted: 14 Apr 2020 06:34 PM PDT

    I really can't figure out what I'm doing wrong because I'm having trouble understanding pointers. So the program is supposed to take in an array size from the user and allocate a pointer of that size. The user is then asked to enter positive numbers to store in the array or a negative number to end the program and display the arrays contents. If the user enters more positive numbers than the original array size a resize function is called to double the size, create a new array of that size and store the original values in that array. The old array is then set to the new array. My problem comes in when I resize the array. The values are copied correctly however, new random values are added to the end.

    Example:

    if I set the array size to 1 and begin entering numbers 1-10. On number 2 the function is resized to hold 2 numbers so far so good. When I enter number 3 the function is resized to hold 4 numbers but the arrays contents are now {1, 2, 3, 0} even though I never entered a 0. On 4 its now {1,2,3,4,0,6543536} and so on. I'm certain my problem is when I dynamically deallocate the old array so it can hold the new size. Here is my resize function that's causing me problems any help is appreciated.

    void resize(int* &arr, int &size)

    {

    `int *newArr = new int[size * 2];` `for(int i = 0; i < size; i++)` `{` `*(newArr+i) = arr[i];` `}` `delete [ ] arr;` `size *= 2;` `*arr = *newArr;` 

    }

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

    IOS/Android App development

    Posted: 14 Apr 2020 04:20 PM PDT

    I am currently taking object oriented programming in java at college. I can say that I know decent amount of coding but I am not a computer science major, so I won't be able take all the CS classes at college. I want to learn IOS/Android development and build legit app business. What are the suggestions you could give to me ? What else I need to learn other object oriented programming? TLDR what are the general tips you could give to me?

    Thanks

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

    Portfolios

    Posted: 14 Apr 2020 06:29 PM PDT

    I've read a couple posts asking about getting jobs off of online learning alone, and one factor stays consistent, portfolios, will anyone be willing to let me have a look at their portfolio or good examples just so I can get a feel for what to expect when I'll have to make my own.

    Any help will be much appreciated. Thanks and stay safe.

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

    Brush up on Discrete Math and Stats

    Posted: 14 Apr 2020 10:09 PM PDT

    It's been awhile since I've taken Discrete Math, Stats, and really any math class for that matter. I thought I could brush off the cobwebs with a few math and database practice questions in HackerRank, but it turns out I've permanently forgotten a lot of things. Do y'all know any good resources (books, youtube vids, websites) to relearn a lot of these concepts?

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

    Need a place to review as well as learn more Python 3

    Posted: 14 Apr 2020 09:48 PM PDT

    I recently decided to dive further into computer science due to the extensive quarantine, and am interested in reviewing Python as well as going deeper into it. I took a basic Python course a few years back and I remember virtually nothing. Currently, I am taking a basic Java course, if that helps at all.

    What would be some good sites or platforms to review Python? I am interested in machine learning, competitive programming, and hacking/cyber security. Any tips on what I should do after reviewing Python, course recommendations, things to learn, etc. would all be appreciated. A side note is that I prefer interactive courses over lectures as I can't seem to focus or sit through long videos.

    I really would like to go further into comp sci over this break period as opposed to just brushing the surface of multiple languages. Any advice would be appreciated, thanks in advance!

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

    Best free course online for algorithms and data structures in python

    Posted: 14 Apr 2020 09:47 AM PDT

    So I started python a month ago, and I'm learning web scraping with beautiful soup and selenium atm,

    And i feel like I have a lack of real knowledge about algorithms, can anyone suggest me one course that'd satisfy my thirst for knowledge, and I want to be able to solve exercises in leet code about new data structures like linked lists and etc since I have no clue what they are.

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

    No comments:

    Post a Comment