• Breaking News

    Sunday, October 4, 2020

    What have you been working on recently? [October 03, 2020] learn programming

    What have you been working on recently? [October 03, 2020] learn programming


    What have you been working on recently? [October 03, 2020]

    Posted: 03 Oct 2020 09:04 AM PDT

    What have you been working on recently? Feel free to share updates on projects you're working on, brag about any major milestones you've hit, grouse about a challenge you've ran into recently... Any sort of "progress report" is fair game!

    A few requests:

    1. If possible, include a link to your source code when sharing a project update. That way, others can learn from your work!

    2. If you've shared something, try commenting on at least one other update -- ask a question, give feedback, compliment something cool... We encourage discussion!

    3. If you don't consider yourself to be a beginner, include about how many years of experience you have.

    This thread will remained stickied over the weekend. Link to past threads here.

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

    Didn’t do very well in my first interview, but happy nonetheless!

    Posted: 03 Oct 2020 11:13 AM PDT

    Hi guys, I'm a self taught developer & been a long time lurker here. It's always great to read motivational/success posts, especially when I'm feeling down so here's one for u guys.

    After six months of self-learning, got my first interview today (with a startup). I didn't spend much time preparing bcos I was sort of burned out from working on my projects the weeks before, so I just read up & did some research on the company, and brush up some basic JS knowledge.

    It was really nerve-wrecking at first, because it was a 3 to 1 interview. The tech lead, co-founder & HR. They started with simple get to know u questions, and then it was time for the technical interview.

    The tech lead briefly asked about my background & summary of my skills. He then proceeded to ask me concept questions (eg. async await , multithreading, event loops), and then gave me a "simple" coding question, of which I couldn't solve. After which, we talked abit about my projects (design decisions/ project structure / deployment decisions).

    I was definitively very nervous, and had my mind go blank at several instances. I was honest and told them it was my first technical interview & they laughed it off.

    Overall, I don't think I did very well & to be very honest I am obviously not knowledgeable enough. But it was a really great experience, and it definitely showed me what I don't know, and where I should be improving moving further.

    I have a lot of work to be done, but I feel like this is a good milestone! So for those of u out there who's frustrated after long hours of coding. Take a break, grab a beer, watch some movies & let's keep grinding!

    Edit: wow thanks for all the response! I feel the love Here's the coding question:

    Given a list(array) of distinct n numbers, you need to randomly pick k distinct numbers from the list but you are only given k chances to pick the number. Note: Time complexity maximum: o(k), number of random() call: k, you are not allowed to have temporary storage(like another list).

    Eg: [1,6,5,3] n=4, k=2

    Result: [1,6] or [1,5] or [5,6] etc

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

    Arrays and pointers doubt

    Posted: 03 Oct 2020 09:00 PM PDT

    int x[3][5]= { {1,2,3,4,5}, {6,7,8,9,10}, {11,12,13,14,15} } int *n= &x; 

    What does n point to? and (n+2).

    I understand *(*(x+2)+1) and all but I don't understand that

    submitted by /u/Open-Cause3272
    [link] [comments]

    I got my first Junior dev interview

    Posted: 03 Oct 2020 03:25 PM PDT

    So after less than a year of self taught programming, finally I got my first interview. I need to prepare, but I don't know what/how to prepare(about technical interview). The only thing I know is that they want someone who knows OOP fundamentals, have basic knowledge about databases.. I am most familiar with Java, I know a little C programming and JavaScript, also html css. Also I have knowledge about MySQL . I know basic of algorithms and data structures. But because its my first interview I really don't know where to start, so any advice would be helpful for me :)

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

    Can anyone suggest a good source for learning generic things about programming?

    Posted: 03 Oct 2020 11:08 PM PDT

    To learn a topic, we can get a lot of resources if we search for it. But is there any source out there to learn about majority of programming concepts, not necessarily at a deeper level.

    Like immutability, token management, cookie alternatives, which all are not connected.

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

    Chess Bots where can I learn to make them

    Posted: 03 Oct 2020 07:49 AM PDT

    So I was trying to think of a relatively big project to focus on while in school. I know they're two completely different things and I'd assume the stock trading bot would be a lot more work. Was just wondering where to get started

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

    Just wanted to share my crappy Scratch game

    Posted: 03 Oct 2020 03:18 PM PDT

    https://scratch.mit.edu/projects/432278319/

    Coding is tough. I felt like a God when I figured out how to make the bullet bread move -5 further each 3 points the player gets. I just wanted to share my small accomplishment with the 1 person who might see this.

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

    Is this a valid/efficient insertion sort method?

    Posted: 03 Oct 2020 11:55 PM PDT

    const insertionSort = (arr) => { for (let i = 1; i < arr.length; i++) { if (i === 1 && arr[0] > arr[1]) { let temp = arr[0]; arr[0] = arr[1]; arr[1] = temp; continue; } if (arr[i] < arr[i - 1]) { for (let j = i - 1; j >= 0; j--) { if (arr[j] <= arr[i]) { arr.splice(j+1, 0, arr[i]); arr.splice(i+1, 1); break; } } } } return arr; } 

    I am not sure where I first learned how to do insertion sort in this method, I believe it was some youtube video. But now I am taking a Udemy course on Data Science and algorithms, and the author is using a completely different method that doesn't seem as simple, and when I Google search insertion sort, many of them use while loops which I am not a fan of (The udemy course does not though). That being said if this way is inefficient, I would be willing to learn the other methods. I am just not sure if I should focus on the method above and study it, or not.

    Tested array: [3,1,5,7,8,3,9,3,1,5,6,1,3,9,4,1,6]

    Returned array: [1,1,1,1,3,3,3,3,4,5,5,6,6,7,8,9,9]

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

    Binary Numbers Explained in 3 minutes!

    Posted: 03 Oct 2020 11:54 PM PDT

    Have you ever wondered how all the 1's and 0's that computers use can represent an actual number?

    Check out this video to learn how to decode binary numbers in 3 minutes!

    https://youtu.be/y7MMWCSRymE

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

    How can I check to see if a vertex in a graph is connected to another vertex within k edges?

    Posted: 03 Oct 2020 11:40 PM PDT

    For an algorithm that I'm trying to program I need to check if two vertices are connected by a path of at most k edges. I was thinking of using a breadth-first search with a counter, but I realized that wouldn't work. How would I go about this?

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

    Advice for a designer/developer who has to teach English to kids

    Posted: 03 Oct 2020 11:39 PM PDT

    Hey everyone,

    I would like some advice. I have worked in I.T for about 5 years now, mostly in System administration. I worked for two small company's which allowed me to learn multiple things in the I.T services industry but I never really specialized in anything.

    I decided a year and a half ago to go traveling around Asia and then head to Oz where I could continue working in I.T there. During my time in traveling around in Asia I met my girlfriend and decided to stay here. Unfortunately I can't really work in I.T here due to money and not speaking the Language. As a native English speaker I can only teach English. So what ever spare time i have i put into learning web design and web development. I find my self focusing more on the design side of things as i really like the creative side of it, which I also find a little annoying due to working in I.T I feel like I should be more focused on programming.

    I don't really know what to do I keep making design projects in figma and create my designs using HTML CSS and JS and update my portfolio as much as I can.

    I have spoken to some friends who own small businesses back home and have created some websites for them for free but they have not hosted them yet, so I just have to put pictures of the projects on my portfolio.

    I want to keep making projects either for myself or for clients so i can build my portfolio up, with the hope of when moving back home I have something to show to possible jobs, or being able to work for myself as a web designer or developer.

    I would really like some feed back on my portfolio. Any advice on what to focus on or which direction to go in my current circumstance.

    Thank you

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

    Is it expected to code every single day in the 100 Days of Code challenge?

    Posted: 03 Oct 2020 11:31 PM PDT

    Or can I take breaks in between and say finish it in 120 days?

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

    Using docs and other resources for Oracle Learning Library

    Posted: 03 Oct 2020 11:21 PM PDT

    For the quizzes in the learning library, since we have to make an oracle account, are we allowed to use other resources to do them? There was some documentation for a question I didn't learn about before.

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

    How to get a 4th and 5th word using substr in c++?

    Posted: 03 Oct 2020 11:14 PM PDT

    Can someone help with a syntax for this problem, so i have a line:

    4343,Sara,Williams,sara4343,williams9382

    And i need to get line with only sara4343,williams9382

    I tried this:

    string line;
    line = line.substr(0,line.find(",", line.find(",")+1));

    But it does not work even if the sara4343,williams9382 were in the first place(beginning of the line)

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

    need your opinion: what programming language should my 14 year old younger brother learn?

    Posted: 03 Oct 2020 10:41 PM PDT

    Hi guys,

    My younger brother has been learning swift on Udemy for the past 6 months, and he's doing really well. He rarely encounters problems, and if he does, he can usually google and figure it out.

    I have zero knowledge in programming, so i want to know what you guys think my brother should learn after finishing swift.

    I like programming languages that people can interact with. For example, with swift, he can now make a simple app to have fun with. So I was thinking something related to web development? Maybe he could build a little website and have fun.

    I also thought about C#, C++ as people said those give a good foundation.

    Tell me what you guys think! Thank you.

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

    What are some good resources for learning assembly?

    Posted: 03 Oct 2020 10:22 PM PDT

    I haven't really been able to find any solid, comprehensive tutorials. Additionally is there a good ide I should be using? Thanks

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

    In need of advice: Misread codepen.io forking info, accidentally submitted blank templates as final projects

    Posted: 03 Oct 2020 10:22 PM PDT

    About a week ago, bored out of my tree with online college in a tiny town and being required to be reachable 8am-11pm Monday-Friday for impromptu Zoom lectures + meetings, I decided to take on the challenge of completing all of freeCodeCamp's certificates before I go back home in June.

    Armed with my HTML knowledge from my 2014 emo kid tumblr days, I got through the course fairly quickly but then found myself in codepen.io struggling to fork FCC's template into my own pens (if that's even right, no idea).

    I thought I figured it out, and I was stoked to get the certificate, but as it turns out, I'm ineligible for the certificate. I ended up resubmitting FCC's blank templates thinking it was my code, and I'm finding that my own stuff isn't even saved to my account. Any ways to recover my code or will I have to redo the codepen challenges again?

    TL;DR - Couldn't figure out codepen.io, accidentally submitted blank templates for a freeCodeCamp certificate- can I recover my code or do I have to restart?

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

    Do runtime matter in competitive programming, even if I passed all the test cases?

    Posted: 03 Oct 2020 10:11 PM PDT

    I am preparing for college placement screening tests. I often try to optimise my code as much as I can and sometimes waste time doing that. I try to optimise even if does not change the time complexity of the code. Do people with less runtime get better ranks as runtime also depends on server load.

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

    How should I set up my MySQL database tables?

    Posted: 03 Oct 2020 06:07 PM PDT

    I'm trying to build a database of NFL data.

    So far I have Player Table of all active player in the NFL.

    id name age dob etc...
    301 John Doe 100 1/1/11 ...

    I'm going to gathering data from nfl.com. They have stats broken down into passing, rushing, catching, defense, fumbles. I'm thinking of creating a table for each category, and I will have an playerID field as a foreign key that links to the ID field in the Player table.

    So a typical entry into the Passing Table will look like this:

    playerID year team game att comp etc...
    301 2020 Falcons 3 128 80 ...

    Passsing table will contain everyone's yearly passing statline.

    I guess my question is: Is there a better way to set this up? My goal is to have everyone's career stats, and current year stats, as neatly as possible.

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

    Python Refusing to Open File to read

    Posted: 03 Oct 2020 09:48 PM PDT

    So, I need to get Python to read a file. I'm literally using the exact syntax, and the paths are fine.

    My code is:

    test = open ("Raw_Scores.txt","r")
    print test

    and the output is:

    <open file 'Raw\_Scores.txt', mode 'r' at 0x1036a84b0>

    I asked the Teacher, and she sent me this:

    #load file containing numerical grade values.
    userGrades_list = []
    #Users filename
    userFile = input("\nEnter the name of the file:")

    with open(userFile, 'r') as file:
    for line in file:
    temp = line.strip()
    userGrades_list+=[temp]

    But that outputs this:

    "NameError: name 'Raw_Scores' is not defined"

    I literally used this exact same code snippet like 4 hours previous to make my last program, but the moment I started working on this assignment, python threw a hissy fit.

    Any ideas?

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

    Taking a course in programming with Mathematica, any tips?

    Posted: 03 Oct 2020 06:00 PM PDT

    I've taken a programming course in Java which went ok (B+). Now I'm taking a course in mathematica but im having a hard time. I can write out my algorithm but I'm having difficulty making it work. Any tips?

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

    Is there a discord to get real time help?

    Posted: 03 Oct 2020 05:59 PM PDT

    I was wondering if there is a discord where people are willing to talk you through your questions. I'm a college student and I need help with some of the stuff my professor has been teaching me

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

    Where do I start?

    Posted: 03 Oct 2020 09:44 PM PDT

    I want to make a program that will monitor a website. It will send me a notification every time it changes. But, I do not know where to start and how to approach this I was wondering If anyone can point me in the right direction. Thank you

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

    Code::Blocks obj/debug/main.o in Linux

    Posted: 03 Oct 2020 09:40 PM PDT

    I had a problem with my windows, so I had to install code blocks in my ubuntu, but for some reason, it keeps showing the message: error: obj/Debug/main.o and it says that couldn't find the directory, etc. Any ideas of what should I do?

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

    Function Call in C?

    Posted: 03 Oct 2020 03:29 PM PDT

    I have a program that uses the Vigenere Cipher to encrypt/decrypt text from the user by having them input a phrase and a keyword. The program uses a 2d array to act as the Vigenere cipher and has 2 functions findRow & findColumn to find the intersection of the text. I'm struggling to call these 2 functions into my main function correctly and output the encrypted text. what is the correct way to call these 2 functions?

    Example of my current output:

    You have chosen the encryption path Young Padawan Enter Plaintext For Encryption: santa is coming to town Enter Key: ho Plaintext:santa is coming to town Mapped Key:hohohohohohohohohoh Cipher Text: ░ 

    When my goal output is:

    You have chosen the encryption path Young Padawan Enter Plaintext For Encryption: santa is coming to town Enter Key: ho Plaintext:santa is coming to town Mapped Key:hohohohohohohohohoh Cipher Text:zouhhwzqvapbnhvhvku 

    Here is part of my code(bit long due to my 2d array):

    #include<stdio.h> #include<string.h> int findRow(char vigSquare[][27], char ksub){ int i; while(vigSquare[i][0] != ksub){ i++; if(i==27){ return -1; } } return i; } int findColumn(char vigSquare[][27], char psub){ int j; while(vigSquare[0][j] != psub){ j++; if(j==27){ return -1; } } return j; } int main(){ char vigSquare[27][27]= { {' ','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}, {'a','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}, {'b','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a'}, {'c','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b'}, {'d','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c'}, {'e','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d'}, {'f','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e'}, {'g','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f'}, {'h','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g'}, {'i','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h'}, {'j','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h'}, {'k','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j'}, {'l','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k'}, {'m','m','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l'}, {'n','n','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m'}, {'o','o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n'}, {'p','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o'}, {'q','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p'}, {'r','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q'}, {'s','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r'}, {'t','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s'}, {'u','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t'}, {'v','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u'}, {'w','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v'}, {'x','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w'}, {'y','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x'}, {'z','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y'}, }; char plaintext[50]; char key[40]; char ciphertext[50]; int i, j, l=0; int fRow,fColumn; int plainLength, keyLength; printf("You have chosen the encryption path Young Padawan\n"); printf("Enter Plaintext For Encryption:\n"); gets(plaintext); printf("Enter Key:\n"); gets(key); plainLength = strlen(plaintext); char mappedKey[plainLength]; keyLength = strlen(key); for(i = 0;i < plainLength; i++){ if(plaintext[i] !=' '){ //f it's not a space add 1 to l l++; } } //l is now how many non-space characters are in the string for(i = 0,j = 0;i < l; i++,j++){ if(j==keyLength){ j = 0; } mappedKey[i]= key[j]; } char ksub,psub; fRow = findRow(vigSquare,ksub); fColumn=findColumn(vigSquare,psub); ciphertext[i]= vigSquare[fRow][fColumn]; printf("Plaintext:%s\nMapped Key:%s\nCipher Text: %s\n", plaintext, mappedKey, ciphertext); return 0; } 
    submitted by /u/DynasticINF
    [link] [comments]

    No comments:

    Post a Comment