• Breaking News

    Monday, March 8, 2021

    Just wanted to thank you lovely people learn programming

    Just wanted to thank you lovely people learn programming


    Just wanted to thank you lovely people

    Posted: 07 Mar 2021 06:05 PM PST

    I just wanted to write a quick note here to thank all of the people here who take the time to contribute to the FAQs, answer the questions and just participate here. I'm looking at making a big career change at 34 and get in to computers (something I've always wanted to do) but I had absolutely zero idea where to start and a lot of Google searches on the topic just want to sell you something. Thanks to this community and its resources I've started the learning process and I'm really enjoying it. Don't get me wrong, I'm terrified about starting a new career in my 30s but this has certainly taken the edge off. I know this is going to be a long process (that I want to be done yesterday) but I know it'll be worth it in the end. Thanks again and here's to being a newbie at any age.

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

    N00bie breakthrough! Aka If your brain says it could / should work, JUST GIVE IT A GO.

    Posted: 07 Mar 2021 01:01 AM PST

    I'd been stuck for two days on a little JavaScript project of mine. The reason I was stuck is that I had a function return undefined. It was returning undefined because it couldn't get to the variables I was passing as parameters. Even tho they were declared globally. I was stumped. I just couldn't understand why the thing wasn't working if those variables were global and declared at the top of the script.

    I tried declaring them locally, at the top of the code block were the function was.

    Still no go. I tried moving those declarations back and forth between the top of the script and the top of the block, and nothing changed or was solved by that (duh).

    Then I paused. Read the script. ACTUALLY read again what it was I was trying to have it do and what it needed to do it. Rubber duck debugged, if you will. And then I realized that the logical position of those variables would have been within an IF statement a bit down the code block.

    Problem was, I had NEVER seen anyone, or any tutorial, any book, any THING show that you could declare variables within an if statement.

    But I thought: 'you know what? what's stopping me from trying? worse could happen, doesn't run. I suppose?'.

    It just seemed unorthodox because I'd never seen it and in every tutorial / book I'd always seen variables declared either at the top of a script or at the top of a block.

    But guess what?! In that if statement, is exactly where they were supposed to go and it solved my issue.

    I guess the breakthrough I had is: sometimes what may be holding you back is what you don't know. But if logically IT SHOULD, trust your brain power and if you can, give it a go.

    Try as many angles as possible before you throw up your hands in defeat.

    The satisfaction of solving a problem just because you actually thought it through step by step more than makes up for any pent up frustration 😂

    /=================/ EDIT: as some of you asked: code below! :) Just the JS.

    EDIT (2): If anyone's interested, here's a screenshot of how this looks 'to the public' :D

    document.addEventListener('DOMContentLoaded', function() { const paper = document.getElementById('paper-emoji'); const rock = document.getElementById('rock-emoji'); const scissors = document.getElementById('scissors-emoji'); paper.addEventListener("click", selected); rock.addEventListener("click", selected); scissors.addEventListener("click", selected); /*============*/ /* FUNCTIONS */ /*======================*/ /* Change appeareance of human selection */ function selected() { let humanChoice = document.getElementById('human-msg').innerHTML; let computerChoice = document.getElementById('machine-msg').innerHTML; if (this === paper) { this.classList.add('selected'); this.classList.remove('hovering'); rock.classList.remove('selected'); rock.classList.add('hovering'); scissors.classList.remove('selected'); scissors.classList.add('hovering'); document.getElementById('human-msg').innerHTML = 'PAPER'; document.getElementById('machine-msg').innerHTML = getComputerChoice(); let humanChoice = document.getElementById('human-msg').innerHTML; let computerChoice = document.getElementById('machine-msg').innerHTML; document.getElementById('winner').innerHTML = determineWinner(humanChoice, computerChoice); } else if (this === rock) { this.classList.add('selected'); this.classList.remove('hovering'); paper.classList.remove('selected'); paper.classList.add('hovering'); scissors.classList.remove('selected'); scissors.classList.add('hovering'); document.getElementById('human-msg').innerHTML = 'ROCK'; document.getElementById('machine-msg').innerHTML = getComputerChoice(); let humanChoice = document.getElementById('human-msg').innerHTML; let computerChoice = document.getElementById('machine-msg').innerHTML; document.getElementById('winner').innerHTML = determineWinner(humanChoice, computerChoice); } else if (this === scissors) { this.classList.add('selected'); this.classList.remove('hovering'); paper.classList.remove('selected'); paper.classList.add('hovering'); rock.classList.remove('selected'); rock.classList.add('hovering'); document.getElementById('human-msg').innerHTML = 'SCISSORS'; document.getElementById('machine-msg').innerHTML = getComputerChoice(); let humanChoice = document.getElementById('human-msg').innerHTML; let computerChoice = document.getElementById('machine-msg').innerHTML; document.getElementById('winner').innerHTML = determineWinner(humanChoice, computerChoice); } } function getComputerChoice() { let randomNumber = Math.floor(Math.random() * 3); switch(randomNumber) { case 0: result = 'ROCK'; return result; case 1: result = 'PAPER'; return result; case 2: result = 'SCISSORS'; return result; } } function determineWinner(humanChoice, computerChoice) { if (humanChoice === computerChoice) { return 'It\'s a tie <br> 🪢'; } if (humanChoice === 'ROCK') { if (computerChoice === 'PAPER') { return 'Computer wins! 🤖'; } return 'You win! <br> 🥳' } if (humanChoice === 'SCISSORS') { if (computerChoice === 'PAPER') { return 'You win! <br> 🥳' } return 'Computer wins! 🤖'; } if (humanChoice === 'PAPER') { if (computerChoice === 'ROCK') { return 'You win! <br> 🥳'; } return 'Computer wins! 🤖'; } } 

    }) // DOM loaded

    submitted by /u/moist--robot
    [link] [comments]

    Why do people make their variable names so cryptic and short?

    Posted: 08 Mar 2021 01:40 AM PST

    Hi. I've been coding for a while and am largely self-taught. For some background information, I'm currently an MSCS student doing research in machine learning. When I say I'm "self-taught" I mean that my undergrad wasn't in computer science and I therefore had to teach myself how to code to even get into this master's program.

    Dealing with a lot of open-source libraries and other people's code has led me to an observation that the majority of people like to code in an extremely unclear way.

    To illustrate, I personally like to write out the full name of the role that a variable does. One example would be that I like to write length_of_total_documents in order to define a Python list (or dictionary or set) to hold the lengths of various documents. However, I've noticed that, for example, many people would write len_docs or even (god forbid) ld.

    Why does this kind of behavior exist? Is it because this is formally taught in courses? Does this have some kind of tradition that dates back to the days where you're essentially being charged in terms of memory for how long your variables are?

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

    Best resources for learning AWS. Also, are certs worthwhile for someone trying to land a junior dev role?

    Posted: 07 Mar 2021 01:12 PM PST

    I'm a bootcamp grad trying to learn more about cloud services and architectures, and I'm looking for some good resources for learning. I found this https://learn.cantrill.io/ and it seems to get some good reviews. Any advice/suggestions greatly appreciated!

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

    [Python] How do I package or "release" a GUI application I made with TKinter?

    Posted: 08 Mar 2021 01:35 AM PST

    Example: for android apps, we would put it on the app store. For websites we run it on some server. What do we do for GUI apps?

    I want to give it to a friend so they can use it, but right now my best plan is to just give him the python file. What's the procedure to package it up into something more user friendly?

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

    Should I learn JavaScript before college

    Posted: 08 Mar 2021 12:26 AM PST

    I am starting classes in University of The People and they teaches JavaScript in their program. I have about 1 month time before starting the course. Should I take JavaScript course in udemy right now or should I just wait for my college to start.

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

    Programming, and loss of motivation

    Posted: 08 Mar 2021 12:56 AM PST

    I'm 16, and I am not like the other kids trying to brag with their super programming skills at a young age (no offence), in fact I feel like I am so basic. I am not good at Math either, and I just came here to ask you something. Lately I feel like I am having absolutely no motivation for programming, I am trying to think of projects that can make me feel motivated so I can continue, but its not helping... Do you think this is normal, and am I thinking the right way about how I can motivate myself? I really feel lost, and the fact that I have no one to teach me is kinda hard, but I love it.

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

    How to continue

    Posted: 07 Mar 2021 08:08 PM PST

    I am an amateur coder, at the basic level of c++ and python. I feel stuck and don't seem to going anywhere. I want to try other languages and do some projects in c++, python, javascript etc. I also want to learn web dev, but stuck in tutorial hell. Can anyone please tell me how should i continue? Shall i continue with c++, or learn web dev, or data science in python or anything?? Anything at all to make me move forward

    submitted by /u/ark-tge1
    [link] [comments]

    How do I not give up?

    Posted: 07 Mar 2021 07:58 PM PST

    I've tried like, at least half a dozen times to learn coding. I took a basic class, and learned some stuff, although it wasn't completely focused on learning a specific language or anything. I've used youtube and some of the other resources recommended, but I find myself either A. Getting Bored/Distracted 2. Getting frustrated and quitting every time I try to learn.

    I love the prospects of what I could do with code, especially game design, but even creating office-like software seems exciting to me. So it's not like I'm not interested in being able to use it or do something with it if I were to learn it, but I just feel so stuck of not being able to get over this initial barrier. It's not even about getting a job, but I 'm a creative person and I feel like nothing can express creativity more than code and even more so code and art combined.

    I just would like some advice, tips, whatever you have on how to grind through and get past that initial barrier which is dreadful to me.

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

    Best university courses that are put up for free?

    Posted: 07 Mar 2021 11:31 AM PST

    Hi,

    I'm looking for recommendations for specific university lectures/courses that have been put up for the public like https://see.stanford.edu/Course/CS106A.

    Specifically, I am looking for ones that either use Java or are language neutral, like a math related or purely conceptual class that would help with CS. I don't want to get mixed up having the class be in C++, or something, since I am doing some projects and some other programs in Java at the time.

    I know MIT has their OpenCourseWare and some other universities have other similar ones, but there are too many choices so I'm not sure exactly which ones would be helpful.

    Thanks for any help.

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

    I'm tired of javascript learning without purpose

    Posted: 07 Mar 2021 12:13 PM PST

    I use FreeCodeCamp for learning.

    I love it. but:

    I want to use js to make actual things. not the next youtube. but a little PhaserJs game. maybe ThreeJs. maybe Processing with P5.js.

    But i don't know if I'm ready. i learned all the basic part. I'm in the middle of ES6. i need to learn regular expression, debugging, basic data structure, basic algorithm scripting, object oriented programming, functional programming and intermediate algorithm programming. that's a lot.

    i thought maybe if i will make something that I'm proud of, maybe it will give me motivation to keep with the FreeCodeCamp course. but i don't know if its to early.

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

    Which free hosting service is reliable?

    Posted: 07 Mar 2021 10:40 PM PST

    I want to host few php scripts and some static files on a free host and use them for demonstration purpose, which free hosting service is reliable?

    I like netlify but it only allows static files.

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

    How to make sure a condition is met between the element inside a list

    Posted: 07 Mar 2021 10:39 PM PST

    I have a doubt and was hoping someone could help me. Programming is not my strong suit but I am learning.

    So here's the question

    I am making a room and have a 3 coordinate system

    I need to have 5 sources and 1 receiver in the room. Distance between every one of the receiver and source points with one another should be say 1 m.

    What i do now is. Receiver(x,y,z) generated randomly. And then using while loop make a list which has source coordinates at distance.eucludean = 1m from source. (scipy spatial) But now I need to also make sure every point within this list is also at a certain distance between each other.

    So basically every element in list is a list of three numbers that is coordinates of the point.

    My list now makes sure that every point is at a certain distance from receiver.

    Within the list I need a certain condition met.

    How can I make sure that every point is equidistant from the other using same distance.euclidean?

    I hope you were able to follow and understand what I am asking here

    Thanks in advance if someone can help :)

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

    What is the quickest way to revise programming before an interview in a few days?

    Posted: 07 Mar 2021 07:20 PM PST

    I am familiar with algorithms, and am not that bad at programming although I don't have much practice (I can typically solve 2/6 questions on Codeforces rounds). I was thinking of coding up many of the "standard" types of questions in Python (some greedy, divide and conquer, dynamic problems + graph problems) before the interview. I'm looking for advice on how to quickly get up to speed on the standard kinds of questions they ask in coding rounds.

    Thanks!

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

    If I have 2 fxml files in JavaFx how do I get them to point to the same Controller Class

    Posted: 08 Mar 2021 12:08 AM PST

    Right now one works but the other just gives an error

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

    Need help

    Posted: 08 Mar 2021 03:35 AM PST

    Hi, guys thank you very much for this platform. I'm in dire need of your help I'm busy building an Android app. This App's about scheduling employees like their work time table I've been building it now but I don't see any progress as much as I know I'm a beginner but I do believe I have a basic understanding of how programming works. But now I'm stuck, please help.

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

    Is it bad if I am not having fun on leetcode?

    Posted: 07 Mar 2021 08:01 PM PST

    leetcode has been making me feel demotivated lately. I feel like when I'm on leetcode I'm not thinking about coding, I'm thinking about algorithm design. I guess that is hand in glove, but I feel like im really bad at it.

    When I'm on leetcode I feel like I'm not spending time coding but I'm spending time trying to figure out some obscure challenge question? If I find these to be difficult should I consider a different career path?

    I've really enjoyed making a discord bot lately and playing with selenium. I love coding when I can think of my own projects. Should I run back to Udemy for a few more hours before I try leetcode? Maybe leetcode is just too advanced for me right now?

    :[

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

    Steps To Learn Data Science In A Quick Infographic

    Posted: 08 Mar 2021 03:18 AM PST

    I made a quick 16 second infographic on steps to becoming a data scientist!

    Steps To Learn Data Science In A Quick Infographic - YouTube

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

    mobile apps vs websites at hackathons

    Posted: 07 Mar 2021 07:45 PM PST

    I'm struggling to find the answer to this on the Internet. Which one is recommended at hackathons: app development or web development? Do judges favor one over the other?

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

    beginners who code 6-12 hours a day, what do you do

    Posted: 07 Mar 2021 01:44 PM PST

    sorry if this is a stupid question, but what do you code that could take that long, i'm trying to improve my skills and i have no idea what to do, thanks in advance

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

    New Programmers: Beware of C++

    Posted: 07 Mar 2021 10:38 AM PST

    I have been a software developer for quite some time now. I have sort of a unique upbringing into programming by means of Geospatial Technology (which mainly uses Python & JavaScript) via the time I served in the Army.

    With that being said I have worked in a multitude of projects that range from Web Development to intense detection based AI software. Since then I have taken to learning C++.

    With all of this experience you would think that I should be flying online tutorials and documentation, but you would be wrong. As it turns out I only had a superficial understanding of the more advanced OOP topics.

    I am not writing this to scare anyone away from learning C++, because it is one the fastest and most versatile languages used to this day (despite its age). I am writing this more so because I have not seen it said anywhere else besides a few Youtube comments.

    Understand that C++ was created with the intention of being extremely versatile, essentially giving developers infinite resources to create anything they want (ie. Adobe Apps, Video Games, etc), and because of this there is a steeper learning curve. In the case of understanding the core of OOP topics, there are many things that Python and Java keep "under the hood", like the concept of passing variables as a reference or by value.

    This concept is not really talked about in regards to other languages because (Python) programmers do not have the ability to manipulate the method in which their variables are passed as parameters and arguments to other functions.

    As a C++ developer you have complete and total control of "Scope" within your program, and this idea evolves into so many more concepts like pointers, inheritance and polymorphism. Python certainly has these functionalities, but not in the same way C++ implements them.

    My advice to anyone looking to learn their first programming language, is to pick up Python, since again, it keeps a lot of "stuff" under the hood. This will allow you to understand the basics of OOP and begin building programs more fluidly without the headache of having to understand the "nitty-gritty".

    If you have already started learning C++, first off, I understand your pain, and secondly, give me a shout if you're stuck I may be able to help you.

    EDIT: Learning C or C++ will provide you with substantial knowledge of OOP. Ultimately knowledge is power and learning this language will provide you with a greater ability to problem solve. I am not recommending to never learn C++. If you don't, you'll be missing out on the many of the fundamentals of OOP that could help you debug. I know that if I were to learn C++ first, I would have grown exceedingly frustrated with the "nitty gritty", and could have potentially quit programming. My recommendation to the impatient type of person (like myself) is to learn Python or JavaScript first because it can get you building quicker.

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

    Resources for React Native

    Posted: 08 Mar 2021 03:04 AM PST

    I need to build an ecommerce app using React native for my final semester project. I have some experience of developing android apps using java but I know very little about javascript/react . What are some resources you guys found helpful as a beginner ?

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

    how to layout classes?

    Posted: 08 Mar 2021 02:44 AM PST

    When developing your program or if you're in that job which way do you set up a program?

    Do you do this?

    GUI <-----> Coordinating class(es) or file(s) <--------------> core program

    So that everytinh is divided into its section and has to send everything back or forth.

    Or do you make the everything one file?

    Having never working in the sector I was curious to what people done because in university we were encouraged to use to top method.

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

    How to stop cmd from showing up when clicking the .exe?

    Posted: 08 Mar 2021 02:33 AM PST

    Hi,

    I am developing an application using VSCode, cl (x64), GLFW and C.

    The app runs fine but whenever i click on the .exe file, the GLFW window opens together with an empty command line window.

    What should I do to stop the command line window from showing up?

    Thanks!

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

    Android Introduction

    Posted: 08 Mar 2021 02:33 AM PST

    Hi all,

    Please do watch to learn basics of android app development session 1..

    https://youtu.be/Z0cynqbZQc0

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

    No comments:

    Post a Comment