• Breaking News

    Saturday, March 13, 2021

    What have you been working on recently? [March 13, 2021] learn programming

    What have you been working on recently? [March 13, 2021] learn programming


    What have you been working on recently? [March 13, 2021]

    Posted: 12 Mar 2021 09:00 PM PST

    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]

    I’ve been learning for 8 months and I still can’t build a full-stack app on my own.. feel like a failure.

    Posted: 12 Mar 2021 05:14 AM PST

    I thought I would be further than this.

    Trying to build a react frontend with an express api connected to a MySQL database and I can't even understand the fetching done in react let alone how complicated the backend routes are and to query a database inside express.... unreal.

    I try to tell myself to keep it up but every month goes by I feel like I've learned nothing.

    tell me it gets better.

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

    REST API game? Great for learning how to consume server payloads for your frontend applications

    Posted: 12 Mar 2021 11:15 AM PST

    Much like the weather api, Chuck Norris jokes or Pokédex api, except you can buy a space ship, trade exotic goods and explore the galaxy along with hundreds of other developers in this MMOAPI. It's free, only donation based.

    https://spacetraders.io

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

    HackerRank or Codewars

    Posted: 12 Mar 2021 06:30 PM PST

    What's the best site to keep practicing and learning at the same time in your opinion?

    Note: Python oriented

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

    What's the best books to learn artificial intelligence?

    Posted: 12 Mar 2021 03:02 PM PST

    Hello folks.

    I said on the title I'm looking for some good books to start learning artificial intelligence especially the Deep learning

    Thank.

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

    Need help printing out the age of the oldest person in an array.

    Posted: 12 Mar 2021 05:44 PM PST

    This is the prompt:

    Write a program that reads names and ages from the user until an empty line is entered. The name and age are separated by a comma.

    After reading all user input, the program prints the age of the oldest person. You can assume that the user enters at least one person, and that one of the users is older than the others.

    I am confused on how I am supposed to compare the ages with each other. This is what I have so far.

    import java.util.Scanner;

    public class AgeOfTheOldest {

    public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (true) { String input = scanner.nextLine(); if (input.equals("")) { break; } String[] split = input.split(","); int age = Integer.valueOf(split[1]); int greatest = age; if(age > greatest){ age = greatest; } System.out.println(greatest); } } 

    }

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

    Build App for Local School

    Posted: 13 Mar 2021 12:05 AM PST

    This is my first post eek here goes....

    I'm in my second in Digital Tech Solutions degree and as part of one of the modules were are required to develop a technical solution or proof of concept. My initial thought was to build an app given majority of people interact easily with apps. So have decided to build an app for my local school.

    My question is what is the best language to use?

    I have signed up to Azure dev ops and trying to get my head round that.

    Any advice would be greatly appreciated.

    Thanks in advance.

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

    is there an absolute consensus about how code should be organized in JS?

    Posted: 12 Mar 2021 07:43 PM PST

    Hi.

    I'm building a simple rock paper scissors game in javascript as a project in the odin project.

    The code is divided in three parts:

    1) the one where the user inputs the option

    2) the one where the computer randomly chooses an option

    3) the one where the script decides the winner

    I've been learning programming in different languages for the couple past years inconsistently and in python for example I used to put all the functions first, then the global variables and then I'd call the functions. Although, now I've been told to separate the problem in subproblems (I already knew this) so I separated the actual code in different parts (the three mentioned above), but this means that the parts where I call the functions is distributed between the three sections and the code seems messy, like the three sections contain both function declarations and function callings.

    Is there a consensus about this? Am I doing it right? or should I be doing it the same way I did it in python in the early days of learning how to code?

    Please any advice on this topic is appreciated, even if it's more general instead of Javascript related.

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

    [C++] What's the difference between an array and a string?

    Posted: 12 Mar 2021 10:12 AM PST

    I'm having trouble understanding the difference between the two as of right now, could you please explain it to me? I'm not very new and i've basically just started learning C++, so please go easy on me.

    submitted by /u/siri-hehe
    [link] [comments]

    UML beginners question about an association class in a ternary-association with the {non-unique} property at one end

    Posted: 12 Mar 2021 06:39 PM PST

    So, I'm not quite sure if this would be the correct subreddit to post this question, but I couldn't really find a big enough subreddit dedicated to UML, so please excuse me, if this is the wrong place to ask this.

    I was tasked with creating a UML class diagram for the following system:

    Every films title and length and every actors name as well as, whether they make Bollywood films, is stored. Every roles character name is saved as well. One actor can portray one role in multiple films. One role in one film is always portrayed by exactly one actor. One actor in one film can portray multiple roles. An actors wage for a film (independent of how many roles he/she plays) is also stored.

    It was quite easy to model the classes and the ternary-association with its multiplicities. My problem is that last sentence: "An actors wage for a film (independent of how many roles he/she plays) is also stored.". The way I understand it, this means that an actor still only gets one wage, even if he/she portrays multiple roles in a film. Now, we can't add the wage as an attribute to the actor, because that would mean an actor always earns the same wage regardless of which film and roles. We also can't add it to the role, because then an actor would get multiple wages in a film, if he/she portrays multiple roles. Finally, we also can't add it to the film class, because then everyone in the film would get the same wage.

    I tried adding an association class to the ternary-association and I made the association end at the role class {non-unique} so that the wage would be independent from the role, because duplicates wouldn't be counted twice (right?), which is what you see here:

    https://imgur.com/jEbEwZQ

    Now, since I'm still quite a beginner I don't really know if this is correct and there may be a different easier way to do this, so I would really appreciate it if someone could help me here.

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

    University after starting to work

    Posted: 12 Mar 2021 10:17 PM PST

    Hi there, Idk if this is the best sub to post this, but if you guys know a better suited one please tell me. I've programming for about 4 years now, never went to university but I think about doing one while I'm working. Not exactly to boost my career or anything, I just really like the field and I would like to study more about the theoretical stuff that don't come in to play in the job. So my main point would be expand my knowledge. I think about doing a remote university that is not in my country ,like Uopeople, since most unis here are pretty bad (if someone can explain me what classical mechanic has to do with CS please do). So the main point in this post is to gather opnions about it, what do you guys think?

    Should I just not go to uni and try to learn those theoretical stuff by myself?

    do you know any type of remote uni that you find pretty good?

    Even if it's not my main point, does a degree really matter at all at some point? Should I get one?

    Any opnion will be gladly accepted. Thank you.

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

    Almost 36 and I'm interested in learning Web Development. I found a career pathway for a Emerging Media & Digital Arts BA/BS. Is this my best option?

    Posted: 12 Mar 2021 10:04 AM PST

    I'm working as a PTA (Physical Therapist Assistant (Associate of Applied Science Degree.)) which makes OK money. Working at Outpatient Clinics I have found their websites lacking (confusing/out of date) or non-existent and when I say something like "Maybe I can build/work on your website someday" they light up. I also meet people in my circle that don't have websites contractors/stay at home moms that sell Macramé and they want help too. I thought maybe building a contractors website pro bono would be a great learning/experience opportunity.

    I found a career pathway for a Emerging Media & Digital Arts BA/BS. http://www.roguecc.edu/Programs/CareerPathways/roadmap.asp?map=GRAPHICS (it's a PDF download here is its parent https://www.roguecc.edu/landing/designDigitalMedia.html). It looks time consuming and expensive but I can make it work. Plus most if not all jobs seem to require it. 1) Is this my best option?

    I've been working through the videos from the highest post on this sub https://www.reddit.com/r/learnprogramming/comments/5ed4xg/ive_taught_30000_students_how_to_code_now_im/?utm_medium=android_app&utm_source=share and am really enjoying it. 2) Is this a where I should be starting?

    My wife is an RN and makes good money. She is starting her Masters in Midwifery which is spreading her time and energy a bit thin. I may not be able to start right away for this reason.

    Aging out doesn't really concern me too much. 3) If my work is good it can speak for me right?

    Thanks for any advice.

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

    How to get better at interpreting complex code

    Posted: 12 Mar 2021 05:47 PM PST

    I just got my ass handed to me in a technical interview where I was asked to explain a really complicated, poorly written function.I bombed the interview, but the interviewer offered me some really great advice on how to deal with problems like that in the future. His whole thing was about breaking down and refactoring the code in to simpler smaller functions, to determine what was happening.Does anyone out there have some good resources where I can practice stuff like this? I'm a little at a loss as to how to improve on this.

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

    JavaFX help

    Posted: 12 Mar 2021 09:27 PM PST

    Hello,

    I am making a java application where the user can open an app that he has pre-installed on his computer. I want my javaFX application to always be in full screen which I already did but every time the user presses the button to open the external app it quits my full screen java fx app and open the external app on the desktop. Is there a way I can make my external app open on top of the javafx application in fullscreen instead of it opening on the desktop?

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

    how can i pursue a career in software development?

    Posted: 12 Mar 2021 09:27 PM PST

    so quick info about me, i'm 15 about to be 16 in april, i go to an online school which allows me to graduate early and i was wondering what steps i could take to get started in this field.

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

    Planetary life expectency calculator.. can not seem to get the last timeleft() function to work properly.. it keeps saying "mercuryAge" is undefined.. even tho i have mercuryAge defined as an output in an earlier function. Please help!

    Posted: 12 Mar 2021 09:08 PM PST

    Person.js

    export default class Person { constructor(name1, age, gender, race) { this.name = name1; this.age = age; this.gender = gender; this.race = race; this.lifeExpectency = 76 }

    earthAge() { return this.age } mercuryAge() { let mercuryAge = (this.age * .24).toFixed(2); return mercuryAge; }; venusAge() { let venusAge = (this.age * .62).toFixed(2); return venusAge; }; marsAge() { let marsAge = (this.age * 1.88).toFixed(2); return marsAge; }; jupiterAge() { let jupiterAge = (this.age * 11.86).toFixed(2); return jupiterAge; };

    displayAges() { let concactedPlanets = "Mercury age is: " + mercuryAge + ". " + "Venus age is: " + venusAge + ". " + "Mars age is: " + marsAge + ". " + "Jupiter age is: " + jupiterAge + "."; return concactedPlanets; }

    lifeGender () { if (this.gender === "female") { this.lifeExpectency += 5 return this.lifeExpectency; } else return this.lifeExpectency; }

    lifeRace () { if (this.race === "asian") { } else if (this.race === "native american") { this.lifeExpectency -= 5; return this.lifeExpectency } else if (this.race === "african") { this.lifeExpectency -= 4; return this.lifeExpectency } else if (this.race === "caucasian") { this.lifeExpectency += 3; return this.lifeExpectency } else if (this.race === "hispanic") { this.lifeExpectency -= 5; return this.lifeExpectency } else if (this.race === "asian") { this.lifeExpectency -= 8; return this.lifeExpectency } else return alert("ERROR: Please enter one of the following races: native american, asian, african, caucasian or hispanic") }

    timeLeft(mercuryAge, marsAge, venusAge, jupiterAge) { let timeLeftEarth = this.lifeExpectency - this.age; let timeLeftMercury = mercuryAge; let timeLeftMars = (this.lifeExpectency * .62) - marsAge; let timeLeftVenus = (this.lifeExpectency * 1.88) - venusAge; let timeLeftJupiter = (this.lifeExpectency * 11.86) - jupiterAge; let concactedTime = "You have: " + timeLeftEarth + " years left on Earth " + timeLeftMercury + " years left on Mercury, " + timeLeftVenus + " years left on Venus, " + timeLeftMars + " years left on Mars, " + timeLeftJupiter + " years left on Jupiter!"; return timeLeftMercury; }

    };

    Tests.js

    import Person from './../src/person.js';

    describe('Person', () => { let person1;

    beforeEach(() => { person1 = new Person("Faisal", 34, "female", "hispanic"); });

    test('Test should create an person object with their name, age, gender and race', () => { expect(person1).toEqual({"age": 34, "gender": "female", "lifeExpectency": 76, "name": "Faisal", "race": "hispanic"}); });

    test('Test should return the Earth age of a person', () => { expect(person1.earthAge()).toEqual(34);
    }); test('Test should return the Mercury age of a person', () => { expect(person1.mercuryAge()).toEqual("8.16");
    }); test('Test should return the Mars age of a person', () => { expect(person1.marsAge()).toEqual("63.92");
    }); test('Test should return the Venus age of a person', () => { expect(person1.venusAge()).toEqual("21.08");
    });

    test('Test should return the Age for Jupiter age of a person', () => { expect(person1.jupiterAge()).toEqual("403.24");
    }); test('Test should return the life exptency adjusted for gender', () => { expect(person1.lifeGender()).toEqual(81);
    }); test('Test should return the life exptency adjusted for race', () => { person1.lifeGender(); expect(person1.lifeRace()).toEqual(76);
    });

    test('Test should return the number of years left on earth and each planet', () => { person1.mercuryAge(); person1.earthAge(); person1.lifeRace(); person1.lifeGender(); expect(person1.timeLeft()).toEqual("You have: NaN years left on Earth NaN years left on Mercury, NaN years left on Venus, NaN years left on Mars, NaN years left on Jupiter!");
    });

    });

    Hey everyone!! im having trouble getting the last test to work. I use separate functions to return the variables for each planets age.. yet I can not read mercuryAge in my last function. I dunno if that makes sense.. please help.

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

    I am watching a youtube tutorial in flask and am having trouble understanding two lines of the code. Can someone explain them? More detail below.

    Posted: 12 Mar 2021 09:01 PM PST

    Here is the video I am watching.https://www.youtube.com/watch?v=cYWiDiIUxQc

    Here is all the code so far.

    https://github.com/CoreyMSchafer/code_snippets/tree/master/Python/Flask_Blog/04-Database

    class User(db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(20), unique=True, nullable=False) email = db.Column(db.String(120), unique=True, nullable=False) image_file = db.Column(db.String(20), nullable=False, default='default.jpg') password = db.Column(db.String(60), nullable=False) posts = db.relationship('Post', backref='author', lazy=True) def __repr__(self): return f"User('{self.username}', '{self.email}', '{self.image_file}')" class Post(db.Model): id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String(100), nullable=False) date_posted = db.Column(db.DateTime, nullable=False, default=datetime.utcnow) content = db.Column(db.Text, nullable=False) user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False) def __repr__(self): return f"Post('{self.title}', '{self.date_posted}')" 

    I understand most of the code I just am confused by 2 lines.

    posts = db.relationship('Post', backref='author', lazy=True) 

    and

    user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False) 

    First I will start with the questions about the posts variable.

    What does db.relationship mean?

    I assume 'Post' just means the data is sent in POST, is this correct?What is backref = 'author' and lazy=True?

    Next I will start with the question about the user_id variable.

    What is db.ForeignKey('user.id')?

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

    Help needed with spring

    Posted: 12 Mar 2021 08:43 PM PST

    I just started learning spring. I am having trouble setting it up. Here is a link to my github repository :https://github.com/Anm0l3/springcore.git

    Error says:

    Caused by: java.io.FileNotFoundException: class path resource [config.xml] cannot be opened because it does not exist

    at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:333)

    ... 13 more

    Any feedback will be greatly appreciated!!!!!!!!!!!

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

    Automating a tedious daily work task with maps.

    Posted: 12 Mar 2021 04:38 PM PST

    I have been trying to create a program to automate a super tedious task I have to do at work. A little background, I work in the supply chain and I coordinate drivers to move a lot of elevation sensitive product. For every shipment I have to create an excel sheet (then export as pdf) with a route our drivers have to take as they cannot drive on high elevation routes due to potentially damaging the product. I started with an excel sheet where I listed the most common routes we take(about 1000+) and got it to basically reference and combine the data across the entire spreadsheet. The tedious part now is I have to Google the entire route, screenshot the trip and then paste it onto the spreadsheet. I'm really trying to automate this and don't know where to start. I assume I'd have to use something like a Google maps API? My last resort is just mapping out all 1000+ routes and just having the spreadsheet reference the specific screenshot if it meets the criteria... I have the current file in Google sheets below. Any advice?

    https://docs.google.com/spreadsheets/d/11X63XW19D4jZ_KjyumX8XRUXx_qlWz3JaCTh_K6_me0/edit

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

    Starting point for young learner

    Posted: 12 Mar 2021 12:40 PM PST

    I am unsure what resources would be best place to start for a younger sibling (10-13 years)

    I was thinking something like codecademy JavaScript? Maybe something like scrimba?

    But resources that would be good starting point to introduce programming concepts in an engaging way for children

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

    Are there ways to find side-work for a learning developer with no experience?

    Posted: 12 Mar 2021 04:16 PM PST

    I'm looking for some sort of small side gig that will allow me to get some experience under my belt and get my hands dirty while learning programming. For me, the main goal here is to learn real-world skills outside of doing my own projects. Making some extra money on the side would be a bonus too, but not needed. I've been learning Javascript for the past 4 months, and I think that doing some kind of work for someone else will force me to learn much faster.

    I probably need to learn a lot more before this could become a reality (and this might be a dumb/vague question), but if anyone could point me in a direction for some work like this, I'd really appreciate it. Thanks!

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

    stuck on making an animated pendulum on matplot. python! ======='<~ hssss

    Posted: 12 Mar 2021 08:00 PM PST

    Hey im learning matplot and all its possible functions. But confused on specifically how to make animated pendulums. lets say its 3 units long let go at some angle idk 90 degrees. i think i have to use sin and cos but i dont know how to integrate them in : ( and then what?

    what i have now is the foundation stuff.

    length = 3

    gravity= 9.8

    time = 10

    initialvelocity=0

    i checked the matplot website but it only has double pendulums and trying to turn a double into a single is tricky xd

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

    Manipulate env vars with login credentials?

    Posted: 12 Mar 2021 07:43 PM PST

    I'm building a speculative MERN app for a retail environment that could function for multiple stores, each with unique inventories.

    const db = `${MONGO_URI}/${MONGO_DB_NAME}`; 

    db pulls two env vars from config and they form the base from which various CRUD requests are called.
    I was wondering if there is a way to manipulate MONGO_DB_NAME based on the log in credentials.

    For example, I log in with my email and password, and then select my store from a dropdown or enter it into a text input.

    When I log in, it would set MONGO_DB_NAME according to that store. Or would it be better to access a STORE_NUMBER variable in the routes?

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

    Beginning python dev, just started using WSL2 and VS Code, my $PATH environment variable is full of lots of junk from years of not knowing what I'm doing. How do I know what to get rid of, what to keep, and which file goes first in the $PATH?

    Posted: 12 Mar 2021 03:47 PM PST

    I have like 5 windows Anaconda references, other stuff from the mnt/c Windows, some random software that has nothing to do with development that I used a long time ago, along with my home/username stuff. The reason this has become a problem is that I'm using VS Code with a remote server and it's asking which python I want to use and there's lots of dependency issues, I'm never sure what I'm using and when I'm going to run into my next problem.. TLDR how do I set up a WSL python development environment using VS Code, in particular what exactly should go in my $PATH?

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

    I need help making a decision... ( any and all feedback is welcomed :) )

    Posted: 12 Mar 2021 03:39 PM PST

    So I have stopped my path of software development for a day now because I keep on bouncing around tools and learning front end and back end and all in all I know I need a place to focus. My goal is to freelance as a software developer mainly in the realm of web development. I have had my foot in HTML, CSS, JavaScript, for front and and for back end I have learned Python, Django, and a little bit of SQL. When I say this I mean I have only learned this knowledge and have yet to apply/focus myself on a big project to put on my portfolio so I am still a total newb, comparing myself to a professional, with the software and frameworks.

    I also have knowledge and used git and version control, web scraping and automation/botting with Selenium, Beautiful soup, requests, pandas, regex, CSV, proxies, command line, Linux, Unix, and have created a small project with bots and automation but without total success. Also a little bit of Django experience too. I am also learning more advanced algorithms right now on Leetcode. If there is anything I should add or learn more in depth on or focus on let me know. I am open to all considerations.

    My goal is to freelance in a portion of web development either front end or back end. Now my question for y'all is what is the best market to be in? is there a best market? I am trying to figure out where to focus on instead of bouncing around everywhere. Would back end be ideal with Django, databases and data modeling with PostgreSQL or another SQL language? What was your experience? and what tips would you give to someone that hasn't had any real world adventures in software development and freelancing?

    I am interested in everything involving software and want to try everything out and that's a part of why its been so hard to stay focused. Another thing is I get stuck and think oooh I should try that and then completely lose focus on where I got stuck and jump the boat. Its a bad habit lol. But this is the now! I am going to focus on one set of tasks until I become a master. I am just having a hard time making a choice.

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

    No comments:

    Post a Comment