• Breaking News

    Thursday, March 4, 2021

    As a CS student, I'm tired of the way the programming world is and I feel overwhelmed. [RANT] learn programming

    As a CS student, I'm tired of the way the programming world is and I feel overwhelmed. [RANT] learn programming


    As a CS student, I'm tired of the way the programming world is and I feel overwhelmed. [RANT]

    Posted: 03 Mar 2021 08:29 AM PST

    No matter what it's about, a course, a project, a hobby, whatever, everyone you talk to spews out new terminology left and right as if you are just magically supposed to know about it. It just seems impossible to learn because it feels like the entire online development world is built on a huge impossible spider web of stuff.

    We have a course where we need to build a web app for a company, so we started learning javascript on our own time. Great, I did some basic codeacademy stuff, know the syntax, then someone mentions React. Alright, what's that? I guess I'll start learning it, but oh obiously without ever hearing about it, you need something called NodeJs, oh and what's JSX, oh btw "NPM" is something as well, and you need to download "create-react-app" whatever that is etc etc.

    And nothing is ever explained in detailed step by step, everything is just "ok let's learn how to draw an owl, you first draw the entire owl, done". It's just a given that you should already know all the tools, all the processes, methods..

    So tired of this, I love programming but as soon as you leave your comfortable IDE for creating simple Java stuff for fun assignments, it just turns into a huge mess where 50% of the words you hear are just new shit you've never heard about.

    NodeJs with React, react-native to the moon and Redux library for the p19rejvxsk4 holy fuck how am I supposed to understand anything. And somehow EVERYBODY ELSE understands it?!

    I just don't understand how you do ANYTHING outside of the stuff you do in courses in isolated environments. I actually pass all my classes with top marks and help others but only because it's an isolated thing, we have this database, in this class, where we just use a terminal to shoot SQL commands, easy as hell. Ok now we just code a fibonacci sequence in Java or Haskell or whatever, easy.

    But as soon as it's something outside of these isolated envrionments you just get swarmed with a million new things that are all connected, but start nowhere, and end nowhere, and nothing is black and white, and you feel like an imbecile not knowing it, and yet everyone knows everything somehow.

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

    "Automate the Boring Stuff with Python" online course is free to sign up for the next few days with code MAR2021FREE

    Posted: 03 Mar 2021 01:26 PM PST

    https://inventwithpython.com/automateudemy (This link will automatically redirect you to the latest discount code.)

    You can also click this link or manually enter the code: MAR2021FREE

    https://www.udemy.com/course/automate/?couponCode=MAR2021FREE

    This promo code works until the 4th (I can't extend it past that). Sometimes it takes an hour or so for the code to become active just after I create it, so if it doesn't work, go ahead and try again a while later. I'll change it to MAR2021FREE2 in three days.

    Udemy has changed their coupon policies, and I'm now only allowed to make 3 coupon codes each month with several restrictions. Hence why each code only lasts 3 days. I won't be able to make codes after this period, but I will be making free codes next month. Meanwhile, the first 15 of the course's 50 videos are free on YouTube.

    You can also purchase the course at a discount using my code JAN2021CODE or FEB2021CODE (try both if one doesn't work) or clicking https://inventwithpython.com/automateudemy to redirect to the latest discount code. I have to manually renew this each month (until I get that automation script done). And the cheapest I can offer the course is about $16 to $18. (Meanwhile, this lets Udemy undercut my discount by offering it for $12, and I don't get the credit for those referral signups. Blerg.)

    Frequently Asked Questions: (read this before posting questions)

    • This course is for beginners and assumes no previous programming experience, but the second half is useful for experienced programmers who want to learn about various third-party Python modules.
    • If you don't have time to take the course now, that's fine. Signing up gives you lifetime access so you can work on it at your own pace.
    • This Udemy course covers roughly the same content as the 1st edition book (the book has a little bit more, but all the basics are covered in the online course), which you can read for free online at https://inventwithpython.com
    • The 2nd edition of Automate the Boring Stuff with Python is free online: https://automatetheboringstuff.com/2e/
    • I do plan on updating the Udemy course for the second edition, but it'll take a while because I have other book projects I'm working on. Expect that update to happen in mid-2021. If you sign up for this Udemy course, you'll get the updated content automatically once I finish it. It won't be a separate course.
    • It's totally fine to start on the first edition and then read the second edition later. I'll be writing a blog post to guide first edition readers to the parts of the second edition they should read.
    • I wrote a blog post to cover what's new in the second edition
    • You're not too old to learn to code. You don't need to be "good at math" to be good at coding.
    • Signing up is the first step. Actually finishing the course is the next. :) There are several ways to get/stay motivated. I suggest getting a "gym buddy" to learn with. Check out /r/ProgrammingBuddies
    submitted by /u/AlSweigart
    [link] [comments]

    Going back to college at 35, smart or dumb?

    Posted: 03 Mar 2021 05:26 AM PST

    A little background info...I've never known what I wanted to do as a career, I went through several different computer-related majors in college but nothing really stuck. I ended up working full time at age 21 and dropping out of school without a degree. I have worked in Accounting/Finance for the past 10 years. I am our department's "IT" person, any type of Excel question or problem would come to me. I absolutely love coding in Excel's VBA and using Data Queries. I can spend hours upon hours trying to solve a problem. I had an epiphany recently, if I'm this passionate about Microsoft Excel, maybe I should become a Coder? I got really excited, and went through the process of applying and I've been accepted to a college. Classes start next month.

    But this is when my fear starts setting in. The college debt, I'm a single mom, my tendencies to procrastinate, my test anxiety, and the fact that I may be close to 40 when/if I get my Bachelors degree, so all of this to ask this group....is this crazy?! 😬

    submitted by /u/Zealousideal-Pin-887
    [link] [comments]

    Does it hurt you to switch languages?

    Posted: 03 Mar 2021 08:56 PM PST

    A little background, I've been back and forth with college and as of right now I'm not enrolled, so I've been taking some online courses in the meantime. First I did the FreeCodeAcademy Python YouTube tutorial, then I enrolled in a course on Udemy that gives a more thorough understanding (100 Days of Code with Angela Yu)

    Its been fun and pretty simple so far and I love the projects, but I keep wondering if my time would be better spent learning a front-end stack then coming back to Python later. I have a bunch of more ambitious project ideas I wanna complete later on and ultimately I want to learn a few languages anyway so it's not a matter of what I want to learn, but rather the order in which to learn it and how I can make the best use of my time given I don't have a degree.

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

    Advice/Assistance coding in C# (Building projects and applications)

    Posted: 03 Mar 2021 10:32 PM PST

    I guess this doesn't just apply to C# but I'm in need of some help...so I have been coding with python and been busy with C# and.NET framework for a few months now and feel I am pretty good with fixing algorithmic problems...But now when it comes to actually coding out a project with a interface and not just on console, I am getting so overwhelmed and when I watch a tutorial, they help you with building the project but not much with understanding what's going on.

    So I just need advice on how I can develop my skills in the actual building of functioning applications...

    Weather it be advice or possible resources that I could look at, any input will be very much appreciated.

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

    Need Help With Array Of Objects

    Posted: 03 Mar 2021 09:06 PM PST

    Hello! I am making a program currently in eclipse IDE using inheritance and array of objects and I'm running into some problems. My program is designed to be a character builder where a user can add, edit, view or delete 1 out of 3 characters available to them (I'm running the program through a GUI). My problem is that once I have stored the user's data from when they add a new character into my array (For example, if the user creates a new assassin and saves, my array will store the user's chosen name, gender and health for that assassin), I don't know how to find and fill this data back into my program for the edit and view function (What I mean is that if the user makes 5 assassins, I don't know how to pull up the assassin that they have selected from the given combobox and show it's stats like it's name, gender and health). Would I use a .read command? And if yes, how would I then store the name, gender and health into a variable.

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

    Learning how to become a software developer from the ground up

    Posted: 03 Mar 2021 11:30 AM PST

    It has been 10 months since I have started coding. I made some small projects and learnt python, HTML, CSS, c and CPP.

    I am not perfect in all the languages I have mentioned above. I have to start learning DSA and contribute to open source.

    But whenever I try to code, I face many roadblocks. I still have to learn a lot more like git, etc (can't think of anything else)

    Basically, I want to start from scratch. A fresh start for my programming journey. I have a few internships and job interviews in the coming months and I want to have a basic knowledge of computers, computer science and programming.

    What should I learn from the ground up and what steps should I take to do so?

    TL;DR: What should I learn from scratch as a beginner/intermediate programmer?

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

    Do you re-build projects already on your portfolio when you learn something new?

    Posted: 04 Mar 2021 12:19 AM PST

    I've been learning JS for around 6 months, and React for a couple of weeks, and have built a basic version of a project I want on my Portfolio in Vanilla.

    Now that I've got a few a React tools under my belt, I'm going to build it with React, before adding this version to my portfolio site.

    I know that I'll learn plenty of new things in the future that I can use to improve it, but don't want to completely rebuild it each and every time I learn a new useful technique.

    So, it got my thinking... What's the normal way to go about this?

    Build it with what I have now, add to my portfolio, and then replace it with a new version in the future? Or wait until I've got some more skills (such as back-end) before building it?

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

    Beginner

    Posted: 03 Mar 2021 08:24 PM PST

    Hey, I'm 14 years old and I want to start learning python, I have tried to teach myself using internet resources, but I couldn't... I'm looking for a good free course that teaches python, in order to learn, I search for courses that give tasks and assignments or homework because it helps a lot, also if the course has tests along the way it will be very helpful. Thanks for anyone who helps and sorry for my bad English.. (English is my second language)

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

    Anyone notice the advertisements on programming tutorial YouTube videos are super long?

    Posted: 03 Mar 2021 08:21 PM PST

    I've been watching YouTube videos about machine learning all day and every ad break is an ad that's at least 30+ minutes long. If you don't hit "skip ad" you are fucked.

    I noticed this when I was learning basic web development and watching those videos too. Same shit. I never see hour long ads on other types of videos.

    Is it just me? Anybody else notice this? Why are programming videos targets for super long advertisements?

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

    Don’t really know if this is the best place but figure I would drop this here

    Posted: 03 Mar 2021 08:14 PM PST

    I'm exposed to Python code in my daily setting. I can kind of read it, and I have a general sense of what each piece of a script does (There are also comments of course). In some cases I actually have to execute the code in Jupyter notebooks.

    Here's the issue. I didn't write it, and I wouldn't know where to start to modify it.

    Some people on my team either helped write it, or are extremely good at Python.

    I'm not really sure what to do, I feel like I'm almost in the way or holding up on progressing a task. I'm still learning Python, I mean I was able to pull keys from a JSON file, set some global variables that were there, but in terms of solving or editing I wouldn't even know where to begin.

    What can I do? In some ways I love the learning aspect, but I feel like the only place/position where I'm at isn't the right time or place to be learning these things.

    I've taken DataCamp beginner and intermediate Python, but also I just feel like it doesn't really help with problem solving at all. More so with just syntax, and learning how to read Python code.

    When it comes to actually solving or fixing something, I struggle to grasp it. That goes for other programs as well. Data studio calculated fields trying to write a CASE WHEN formula to combine YYYY into a new column name...I'm banging my head against the wall. Trying to get data formatted properly for analysis, my columns are fu*ked. Looking to blend data in GDS, my filters don't work.

    I know the questions that I have and want to answer, but I have no idea what the next move is sometimes.

    This may be Python related but also problem solving related so apologies if this isn't the right place.

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

    bug in simple python program

    Posted: 03 Mar 2021 11:53 PM PST

    in this python program computer will guess random no and i will tell that weather guess is correct or high or low...if high then computer will reguess it by subtracting -1 from guessed no and similarly +1 for low guessed no

    but problem is that

    it is not reguessing no correctly(here is code below)

    import random 

    def computer_guess(x): low = 1 high = x feedback = "" guess = random.randint(low, high) while feedback != "C": feedback = (input(f"Is {guess} too high(H), too low(L), OR CORRECT(C)?")) if feedback == "H": guess - 1 elif feedback == "L": guess + 1 else: print(f"Yay! The computer guessed your number, {guess}, correctly!")

    computer_guess(10)

    input()

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

    AngularJS is what HTML would have been, had it been designed for applications.

    Posted: 03 Mar 2021 11:53 PM PST

    What are your thoughts on this statement?

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

    Authentication, Authorization, API Calls and Their Impact on UX, Security, and Architecture

    Posted: 03 Mar 2021 05:32 PM PST

    I'm struggling with the full Oauth2 and similar processes. I get lost in the full dance between a user entering a username and password, what exactly happens in the subsequent steps and how to manage all the issues that arise as a result.

    As I see it, when a user logs in with uname and pass, a networking request is made. However, as a former mobile dev, no networking request should be trusted as there are so many things that can go wrong - how do you manage the list of 20 or so things that can create an error for the user? How do you bubble up these errors in the UX so that they can be handled in the user flow?

    I have not fully internalized the full Oauth2 flow, but there exists some challenges there as well. Once a token is received, originally we'd just store in the browser and make API calls. Mobile and cloud change that. If you're running a cloud-based app, do you still store the token in the browser or in the mobile client or do you store in the cloud? If it's a public key, why store in a database? Once the key expires, does the app exist to the user in a logged in state or do you automatically log out?

    How do you deal with API calls to third parties and the resulting flows with URI redirect addresses and storing that token as well? It usually creates a terrible flow for the user and is there any way to mitigate that? What are some strategies you have used to hide that complexity from the user?

    Finally, simply managing user logged in states seems to be super challenging. This seems super trivial for most apps, but for me, all I see are huge areas where errors could occur. To me, every network request is a gamble and mitigating everything that could go wrong seems like a never-ending battle. I stress about it because it's the basics you have to get right. Is there any easy way?

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

    Need some help to understand what AI really is

    Posted: 03 Mar 2021 07:26 PM PST

    I'm a hobbyist programmer and I've been looking into AI and what I've found on the one hand is articles and/or people saying that programs powered by it learn human behavior or something like that, and on the other hand some attribute AI to chat bots and/or automated actions which makes it unclear to me as you can make a program do "human stuff" with just a couple of conditional statements and/or macros so I can't see the innovation. So I want to ask you guys what separates AI from macros and conditionals and if you could name some AI libraries or show me some code snippets, I don't know, just to understand what this is for once and for all, thanks.

    submitted by /u/0XFUL
    [link] [comments]

    Need help reading data from a JSON file using Java

    Posted: 03 Mar 2021 05:08 PM PST

    I'm working on a Java project that reads quiz questions and answers from a JSON file. It's a small file, less than 100 words.

    Can anyone point me in the right direction in terms of what library or tutorial I should use? Do I have to use a build tool, such as Maven or Gradle? This was a lot harder than I expected.

    This was REALLY easy to do in Python. "import json" and "json.load(data)" was all I needed.

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

    Urgently need an app idea for my AP test

    Posted: 03 Mar 2021 05:03 PM PST

    I need to code an app that has an input and an output, at least one list, a procedure with a parameter and a loop. I need to use MIT App Inventor. It doesnt need to be something complex, simple as possible but i really cant think of a concept. It'd be great if you guys can give me some basic ideas!

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

    [C] Fantasy Football Draft pick randomizer results in unexpected distribution

    Posted: 03 Mar 2021 04:56 PM PST

    Hello and thank you in advance for your help,

    I created a program that sets the draft order for my fantasy football league based on the prior year results. I've used it for 2 seasons now and it works, but I wanted to see what the likelihood was of each seeded team being awarded each pick. So I created a similar program that simulated the draft results 10,000 times, and got some results that I didn't expect.

    The need to know on how the program functions:

    -Each seed gets a number of 'chances' to be selected for the next pick in the draft (think Hunger Games). Order from most chances to least goes 7,8,9,10,6,5,4,3,2,1 (to avoid tanking).

    ex. (this is clearer when looking at more of the code, but here is the jist)

     //example: 2 players have 11 chances and 9 chances (20 total). //if random r between 1 and 20 is 15, 15 < 11 (player 1's chances) is false, r is reduced by 11 to 4. //next player's turn - 4 < 9 (player 2's chances) is true //player has not received a draft position yet, so he is awarded that draft slot. 

    -The exact amount of chances of each team are:

    Seed Chances %Chance
    1 2 .73%
    2 4 1.5%
    3 6 2.2%
    4 12 4.4%
    5 15 5.5%
    6 24 8.8%
    7 70 25.5%
    8 56 20.4%
    9 45 16.4%
    10 40 14.6%

    Under this structure, one would assume that the team with more chances would ALWAYS have a higher likelihood of being awarded the next pick. However, when I ran the 10,000x simulation, the %output I got was...

    Columns are the draft pick, Rows are the team seed, bolded is the most likely result for the seed:

    1st pick 2nd pick 3rd pick 4th pick 5th pick 6th pick 7th pick 8th pick 9th pick 10th pick
    1st Seed 0.70% 0.94% 1.07% 1.54% 2.21% 2.68% 4.87% 9.26% 19.02% 57.71%
    2nd Seed 1.4% 1.63% 2.12% 2.99% 4.37% 6.56% 9.00% 17.85% 32.99% 21.06%
    3rd Seed 2.0% 2.37% 3.11% 4.41% 6.21% 8.73% 13.71% 24.84% 21.76% 12.83%
    4th Seed 4.0% 4.92% 6.24% 8.46% 11.21% 14.25% 21.17% 16.02% 9.80% 3.94%
    5th Seed 5.5% 6.70% 8.16% 10.24% 13.76% 18.27% 16.16% 11.38% 7.42% 2.42%
    6th Seed 8.5% 10.49% 11.85% 14.52% 17.51% 15.06% 10.46% 7.03% 3.64% 09.5%
    7th Seed 25.6% 23.13% 19.33% 15.90% 9.11% 4.49% 1.85% 0.51% 0.09% 0.03%
    8th Seed 20.4% 26.78% 22.84% 13.85% 8.42% 4.73% 1.92% 0.77% 0.22% 0.04%
    9th Seed 16.9% 17.20% 18.38% 16.29% 13.31% 9.37% 5.41% 2.27% 0.72% 0.17%
    10th Seed 15.0% 5.84% 6.90% 11.80% 13.89% 15.86% 15.45% 10.07% 4.34% 0.85%

    Most of this distribution looks fine at first glance, if you look specifically at the 10th seed compared to the 6th seed, however, there's something unexpected. Whereas the 10th seed, with the 4th most chances, should most often get the 4th pick, it instead most frequently gets the 6th pick. It also has an illogically low likelihood of getting the 2nd or 3rd pick.

    I cannot fathom why the distribution for the 10th seed would be this way except for if there was an error, which leads me to believe that either:

    a) My program has a logical error that I am struggling to discover. I do find it interesting that it is the last team to be assigned values/characteristics, etc., perhaps there is something related to unintentionally omitting or reducing this team's chances? Or,

    b) The RNG methodology that I am using is far enough from truly random that it results in this weird skewness in distribution. Or,

    c) Some weird statistically anomaly

    Below is my program, I'll let you know now that I am a casual programmer, and so I apologize in advance for any structure/design that is less than optimal, which I am sure is cluttered throughout. I did my best and I'm proud of it regardless.

    // // main.c // weightedDraftCalculator Simulation // // Created by Sean Tamboer on 03/03/2021 // Copyright B) 2021 Sean Tamboer. All rights reserved. // #include <stdio.h> #include <time.h> #include <stdlib.h> #include <unistd.h> struct player { //creating structure for player char name[30]; int prevPlace; int scaleFactor; int chances; int draftPos; }; struct draftResults { //creating structure for draft results int first; int second; int third; int fourth; int fifth; int sixth; int seventh; int eighth; int ninth; int tenth; }; int main (int argc, const char *argv[]) { //setting players details int num_players = 0; printf ("How many players in the draft?: "); scanf ("%d", &num_players); struct draftResults resultSummary[num_players]; struct player allPlayers[num_players]; for (int j = 0; j < num_players; j++) { //requesting player details printf ("What is player %d's name?: ", j + 1); scanf ("%s", allPlayers[j].name); printf ("In what place did %s finish last season?: ", allPlayers[j].name); scanf ("%d", &allPlayers[j].prevPlace); switch (allPlayers[j].prevPlace) { //allows for weighting of last yr standings case 10: allPlayers[j].scaleFactor = 4; break; //last yr standing is multiplied by scaleFactor (ex. 10th * 4 = 40) case 9: allPlayers[j].scaleFactor = 5; break; case 8: allPlayers[j].scaleFactor = 7; break; case 7: allPlayers[j].scaleFactor = 10; break; case 6: allPlayers[j].scaleFactor = 4; break; case 5: allPlayers[j].scaleFactor = 3; break; case 4: allPlayers[j].scaleFactor = 3; break; case 3: allPlayers[j].scaleFactor = 2; break; case 2: allPlayers[j].scaleFactor = 2; break; case 1: allPlayers[j].scaleFactor = 2; break; } allPlayers[j].chances = allPlayers[j].scaleFactor * allPlayers[j].prevPlace; //continuation of calculation, ex. above } //printf("Ready for the draft? Press [ENTER] to continue.\n"); //getchar(); //getchar(); //draft int simNum = 10000; //simulating through 10000 drafts srand (time (NULL)); //seed for number randomizer based on time for (int i = 0; i < num_players; i++) { resultSummary[i].first = 0; resultSummary[i].second = 0; resultSummary[i].third = 0; resultSummary[i].fourth = 0; resultSummary[i].fifth = 0; resultSummary[i].sixth = 0; resultSummary[i].seventh = 0; resultSummary[i].eighth = 0; resultSummary[i].ninth = 0; resultSummary[i].tenth = 0; } for (int l = 0; l < simNum; l++) { int totalChances = 0; for (int i = 0; i < num_players; i++) { //adding together every player's chances totalChances = totalChances + allPlayers[i].chances; } for (int i = 0; i < num_players; i++) { //sets initial draft position of all players to 0 allPlayers[i].draftPos = 0; } for (int k = 1; k <= num_players; k++) { //k = draft position/slot int r = rand () % totalChances; //random number between 0 and sum of all player's chances //printf("The team with the number %d overall draft pick is", k); //printf("."); //sleep(1); //printf("."); //sleep(1); //printf("."); //sleep(1); for (int i = 0; i < num_players; i++) { //going through each player if (r < allPlayers[i].chances) { //if random number is less than player i's chances, then you are awarded draft slot if (allPlayers[i].draftPos == 0) { //checking to see if player has already received a draft slot allPlayers[i].draftPos = k; //sets player's draft slot //printf("%s\n",allPlayers[i].name); totalChances = totalChances - allPlayers[i].chances; //reducing total chances by awarded player's chances break; //returns to next draft position } else if (allPlayers[i].draftPos != 0) { //if player has a draft slot, loop continues through rest of players continue; } } r = r - allPlayers[i].chances; //r is reduced by the previous player's chances //example: 2 players have 11 chances and 9 chances (20 total). //if r is 15, 15 < 11 (player 1's chances) is false, r is reduced by 11 to 4. //next player's turn - 4 < 9 (player 2's chances) is true //player has not received a draft position yet, so he is awarded that draft slot. } } for (int i = 0; i < num_players; i++) { switch (allPlayers[i].draftPos) { case 1: resultSummary[i].first = resultSummary[i].first + 1; break; case 2: resultSummary[i].second = resultSummary[i].second + 1; break; case 3: resultSummary[i].third = resultSummary[i].third + 1; break; case 4: resultSummary[i].fourth = resultSummary[i].fourth + 1; break; case 5: resultSummary[i].fifth = resultSummary[i].fifth + 1; break; case 6: resultSummary[i].sixth = resultSummary[i].sixth + 1; break; case 7: resultSummary[i].seventh = resultSummary[i].seventh + 1; break; case 8: resultSummary[i].eighth = resultSummary[i].eighth + 1; break; case 9: resultSummary[i].ninth = resultSummary[i].ninth + 1; break; case 10: resultSummary[i].tenth = resultSummary[i].tenth + 1; break; } } } for (int i = 0; i < num_players; i++) { printf ("Team: %s\n", allPlayers[i].name); printf ("1st picks: %d\n", resultSummary[i].first); printf ("2nd picks: %d\n", resultSummary[i].second); printf ("3rd picks: %d\n", resultSummary[i].third); printf ("4th picks: %d\n", resultSummary[i].fourth); printf ("5th picks: %d\n", resultSummary[i].fifth); printf ("6th picks: %d\n", resultSummary[i].sixth); printf ("7th picks: %d\n", resultSummary[i].seventh); printf ("8th picks: %d\n", resultSummary[i].eighth); printf ("9th picks: %d\n", resultSummary[i].ninth); printf ("10th picks: %d\n", resultSummary[i].tenth); } //sleep(1); //for (int i = 0; i < num_players; i++) { //restating each player's draft position. //printf("%s's draft position: %d\n",allPlayers[i].name,allPlayers[i].draftPos); //sleep(1); return 0; } 
    submitted by /u/stamboer13
    [link] [comments]

    Which online course should I take - beginner trying to learn Javascript for production

    Posted: 03 Mar 2021 10:51 PM PST

    I have no foundation whatsoever (I'm a UX designer) but I already got comfortable with git, command line, npm, CSS and HTML, and Jquery. My project is a large (Shopify clone) app written in Nest JS, Vue, Mysql, Sequelize, all in typescript. It's not a personal project but I lost a lot of staff, so I want to help push it. It's not trivial and somewhat OOP.

    I feel that I am missing some foundation and doing a lot of copy and pasting code and as soon as the vuetify work template was done I felt stuck.

    What course should I take? Is it possible to take a different path of what people do in C or Python and go directly into Javascript?

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

    How to name a function that calls a function?

    Posted: 03 Mar 2021 10:41 PM PST

    This happens to me quite often when I write a function following the single-responsibility principle (one function does one thing), but I end up needing to call a higher level "middle man" function from main() that does some data prepping. I'm tempted to name that function the same thing, then I wonder what I'll name the lower level function and I'm confused.

    What do I name them??

    There are a few alternatives: I could do is to move all the operations from the high level function into the main(), but then it can become copy-paste programming. Another thing I could do is make a class and make the high level methods public and the "real deal" private.

    But I can't help think I'll need to learn to name functions properly when this cascading thing happens.

    Example where I encrypt a phrase and when calling encrypt() I really need another function that... well.. encrypts, but for real:

    main() {

    secret_phrase = "Hello World!"

    encrypted_phrase = encrypt(secret_phrase)

    }

    encrypt(data) {

    valid_data = verifydata(data)

    if valid_data is True {

    data = data.lower()code_and_key = encrypt_for_reals(data)
    save_key_to_file(code_and_key[1])
    return code_and_key[0]

    }}

    encrypt_for_reals(data) {

    # cryptographic stuff

    return [encrypted_data, private_key]

    }

    save_key_to_file(key) {

    file.open(privatek.key)
    file.write(key)
    file.close()

    }

    submitted by /u/r-nck-51
    [link] [comments]

    Outfit generator

    Posted: 03 Mar 2021 10:33 PM PST

    Does anyone know where I can find an outfit generator JavaScript tutorial?

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

    How do you ACTUALLY LEARN from Udemy tutorials? Code along the instructor what he is typing/ watch the tut., understand and rewrite in your own/make a similar project to your instructor but change the colours/positions etc/make a completely new random project with every section you learn?

    Posted: 03 Mar 2021 10:28 PM PST

    I would think the most beneficial is to watch the tutorial, try to understand everything and why they do it then make a similar code to your instructor on your own(without rewatching) but change some things a bit so it's not exactly the same? But at the same time idk how good would that be bc the info is still fresh so what am I gonna remember in the long run?

    Idk how to go about this the best way. Everyone says to apply what you learn to your projects, but what if I don't have any projects in mind or dont feel comfortable enough to start one on my own after watching everything, should I take notes while watching then try to recreate the instructor's site without watching?

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

    How to rate limit api calls? nodejs

    Posted: 03 Mar 2021 10:25 PM PST

    I need to rate limit my api calls to the riot api: https://developer.riotgames.com/docs/portal#:~:text=The%20starting%20rate%20limit%20of,30%2C000%20requests%20every%2010%20minutes

    My program works fine as is.

    When I install a rate limiter the fetch() calls stop executing after a bit and they don't finish.

    How can I solve this problem?

    rate limiter: https://www.npmjs.com/package/@fightmegg/riot-rate-limiter

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

    Pursuing a qualification in IT with courses that involve back and front-end development languages (Java, HTML, CSS, JavaScript etc.). We have a test every Friday. Any advice on study/revision tips?

    Posted: 03 Mar 2021 10:08 PM PST

    I'm doing a postgrad "bootcamp" in Software engineering and while I'm absolutely loving it, the workload is very high. I'm not afraid of hard work, rather I'd like to work hard and smart.

    My background is a BSc in Biochemistry so I know the study process is probably a little different for programming. My aim is to augment this degree with my background to get into Bioinformatics or become a software engineer for a Healthcare company.

    I've heard Anki is really useful so I've got that up and running but any further tips, tricks or advice would be incredible and thank you in advance!

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

    No comments:

    Post a Comment