• Breaking News

    Monday, February 21, 2022

    If you were to start your coding journey from zero, what would be your plan? learn programming

    If you were to start your coding journey from zero, what would be your plan? learn programming


    If you were to start your coding journey from zero, what would be your plan?

    Posted: 20 Feb 2022 12:22 PM PST

    I'm interested in seeing what other people here have in mind! I'm currently working on my plan to get more into coding :)

    EDIT: I'll add a github repo I've just found: https://github.com/jwasham/coding-interview-university 210k stars so it must be pretty good

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

    What’s a fair hourly rate for freelance work?

    Posted: 20 Feb 2022 06:01 PM PST

    Hi all,

    A friend just approached me and asked for a basic website that I'll do strategy, copywriting, wireframing, and use my rough coding skills to build out. So, I'll essentially take his idea from zero to a rough mvp without user research.

    Do you all know a decent hourly rate for a project like this? I was thinking $25 an hour, but I think all of the other stuff I'll add on top of coding should command more.

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

    Can someone review my simple Rock, Paper, Scissors game from TOP

    Posted: 20 Feb 2022 07:24 PM PST

    It's pretty humble and I'm new to JS. I'm coming from JS so there's quite a few adjustments.

     /* * ROCK = 0 * PAPER = 1 * SCISSORS = 2 */ let userSelection = () => { // Will continuously loop unti user chooses a correct option for (;;) { // User Input let userInput = prompt("Rock, Paper, or Scissors").toUpperCase(); switch (userInput) { case 'ROCK': return 0; case 'PAPER': return 1; case 'SCISSORS': return 2; default: console.log("Not a valid option"); } } } // Randomly returns 0, 1, 2 let computerSelection = () => Math.floor(Math.random() * 10) % 3; function game(user, computer) { if (user === 0 && computer === 2) return "You win! Rock beats scissors"; else if(user === 0 && computer === 1) return "You lose! Paper beats rock"; else if(user === 1 && computer === 0) return "You win! Paper beats rock"; else if(user === 1 && computer === 2) return "You lose! Paper loses to rock"; else if(user === 2 && computer === 0) return "You lose! Scissor loses to paper"; else if(user === 2 && computer === 1) return "You Win! Scissors beats paper"; else return "Tie game"; } 

    Edit:

    Changed Math.floor(Math.random() * 10) % 3 to getRandomInt(3)

    Changed the if statements to:

    if (user === computer) return "Tie!"; else if ( user === 0 && computer !== 1) return You win! ${user} beats ${computer}; else if ( user === 1 && computer !== 2) return You win! ${user} beats ${computer}; else if ( user === 2 && computer !== 0) return You win! ${user} beats ${computer}; else return You lose! ${user} loses to ${computer}; 
    submitted by /u/Old-Hamster2441
    [link] [comments]

    What's the best way to search for beginner issues to try and solve on github open-source projects that aren't abandoned?

    Posted: 20 Feb 2022 10:19 PM PST

    When I search for things like "good beginner issue" I come across hundreds of issues that were raised years ago or have no details in them and no further activity.

    I'd love to contribute but I'm having a lot of difficulties finding projects.

    For reference, I'm a beginner in javascript (though not in coding generally), so I want to help with javascript projects. I'm sure it's just my poor searching and any help would be greatly appreciated.

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

    Anyone knows an odin project esque course for game development?

    Posted: 20 Feb 2022 10:45 PM PST

    So I recently was going through the odin project and was impressed on how it was structured. I am trying to find a similar course but to no avail. CS50 game dev course doesn't start from scratch and instead only requires edits to the source code provided. Please give me recommendations for this :D

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

    How do you test your code?

    Posted: 20 Feb 2022 06:52 PM PST

    After you write code, how do you test it?

    While researching JavaScript and Python, I came across a term called unit testing. What is it? How is it different from other types of testing?

    How do you perform unit testing? How does unit testing differ between languages?

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

    I have decided to face my fear and start learning programming for real. And here is the reason why.

    Posted: 20 Feb 2022 08:14 PM PST

    The title sounds cliché. I know!!

    I will be graduating soon with a bachelors degree in IT and with a really good gpa. Despite having a good GPA and being a tech student, it is a shame for me to say that I do not know programming. As an IT student, I only had to take about 4 classes that required programming (2 semester of python, 1 semester of PHP, 1 semester of SQL). We could choose from python or Java and I chose python. Since I took most of my programming classes online and during the pandemic, I barely learned anything from these classes. My Professors made these classes easier and made majority of programming assignments into multiple choice. For my python class, my Professor did not even hold a single lecture ever. He would just upload the PPT to blackboard and that was pretty much it. When asked for help, he would barely reply to emails. This made me lose interest in programming and I was more concerned in getting good grades rather than learning. I googled many stuffs, used stack overflow for help, and ended all these classes with A, barely learning anything. I would rate my programming skill as 3/10.

    I was not much concerned about not knowing programming because I was always told that as an IT student, I only need to know the basics of programming. However, now that I have started looking for tech job, I have come to realize that programming is just unavoidable. Its an important and respected skill. If I have knowledge of programming or can think how to solve programming problems, I have millions of opportunities. My 3.8 GPA and bachelors degree is not enough to land a job, not even entry level. I need to know programming for literally any tech related job.

    Having a good resume, I get lots of responses from companies. I do really well on behavioral interviews and always get called back for second rounds (which is usually technical interviews). Majority of technical interviews involve coding. Technical interviews especially one that involves coding scare the hell out of me. I have had pretty embarrassing moments during interviews just because I did not know to code. I have also lost many good opportunities because of my lack of programming knowledge.

    I always have had this determination that there's nothing that I can't learn. Thus, I have actually decided to start learning programming esp Python and Java from the scratch. It might be hard at the beginning but I got this.

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

    How to study Graphs and Dynamic Programming?

    Posted: 20 Feb 2022 10:06 PM PST

    I have done some basic data structures but don't know anything about graphs and dynamic programming. Can you suggest some sources from where can I learn these in best possible way. Because lot of time we keep on searching for articles and video sources and get confused more and more.

    submitted by /u/No-Leader5646
    [link] [comments]

    Better tutorials for someone who knows some basics?

    Posted: 20 Feb 2022 06:44 PM PST

    Hey reddit. I've been learning web development on and off for some time. I know the basics of JavaScript, CSS, and HTML. With HTML I'm familiar with most of it and with CSS I'm getting somewhat comfortable with Flexbox for instance. With JavaScript I'm learning about objects and JSON. I seem to be stuck now though. I'm to a point where I feel working on projects is the best way to go but then when I sit down to do anything I get stuck easily. So then I decide to look for more tutorials but it has been a struggle because many tutorials and sites like freecodecamp.com have me covering all the things I already know and I get bored. When I look for Udemy courses they all seem drastically inflated with 48 hours of video that drags on and never just gets to the point. That or they seem really outdated where they aren't even using "let" to declare variables.

    What would you all recommend I try to get out of the place I'm in currently and continue to progress with my learning?

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

    What are some of the best books to learn C# programming?

    Posted: 20 Feb 2022 03:26 PM PST

    Do you guys have some good books to learn C# for a beginner, stuff I learn in school is pretty bad and I actually wanna learn something before I go to collage.

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

    c - return and exit numbers for errors and exceptions (newbie question)

    Posted: 20 Feb 2022 07:45 PM PST

    Hi!

    In the coding examples I have learned and been provided with for c (my university professors use c to teach the fundamentals), there have, of course, often been error handlers/exception/error if-branches.

    I have already found out that there's a difference between exit and return, but I have not found out more about different numbers and NULL.

    For example, I have a code that at one point says (I didn't change anything except the printed message from my language to English)

    if(queue->count==queue->length){ printf("error: maximum reached \n"); return NULL; } 

    and later on has this:

    if(queue->count==0){ printf("error: list empty\n"); return -1; } 

    What is the difference between return NULL (is it the same as return 0 from other functions, and of course, main?) and return -1? I have also seen return 1.

    I also know NULL from pointers and references (the example here, is, in fact, from code implementing a queue as ring buffer).

    Thanks a lot in advance!

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

    How are transpilers possible?

    Posted: 20 Feb 2022 11:13 PM PST

    Different programming languages have different features like garbage collection, memory structure, etc, so how is transpiling possible? For example, how would it transpile pointer arithmetic into Java?

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

    This Rock, Paper, Scissor mini-game works, but I'm sure it can be done better. Where can I improve?

    Posted: 20 Feb 2022 10:45 PM PST

    #include <iostream> #include <time.h> using namespace std; int main() { srand(time(NULL)); string jankenpon[3] = {"ROCK","PAPER","SCISSOR"}; string applause[3] = {"Yes!! ","Nice!! ","Awesome!! "}; string hardLuck[3] = {"OH NO!! ","Yikes!! ","Ouch!! "}; int playerScore = 0; int cpuScore = 0; cout << "Welcome to HELL!! We will play a game with the DEVIL and actually die if you lose!\nPress 1 for ROCK, 2 for PAPER and 3 for SCISSOR. "; bool session = true; while(session){ int playerInput; string cpuChoice = jankenpon[rand() % 3]; cout << "\n\nChoose your fate! \n"; cin >> playerInput; cout << "You have chosen " << jankenpon[playerInput-1] << " let's see what the DEVIL have chosen. \n"; cout << "The DEVIL have chosen " << cpuChoice << "\n"; if((playerInput == 1 && cpuChoice == jankenpon[2])||(playerInput == 2 && cpuChoice == jankenpon[0])||(playerInput == 3 && cpuChoice == jankenpon[1])){ cout << applause[rand() % 3]; playerScore++; } else if((playerInput == 1 && cpuChoice == jankenpon[1])||(playerInput == 2 && cpuChoice == jankenpon[2])||(playerInput == 3 && cpuChoice == jankenpon[0])){ cout << hardLuck[rand() % 3]; cpuScore++; } else{ cout << "IT'S A TIE!!!"; } if(playerScore == 3){ session = false; cout << "\nPlayer WIN!!! You live to die another day..."; } else if(cpuScore == 3){ session = false; cout << "\nYOU LOSE!! Bow down and get beheaded! \n*player dies*\nx_x"; } } return 0; } 
    submitted by /u/11Warlock11
    [link] [comments]

    FileNotFoundError: [Errno 2] No such file or directory: 'direct/call.csv'

    Posted: 20 Feb 2022 08:15 PM PST

    from csv import writer with open('direct/call.csv', 'a', newline='') as f_object: # Pass this file object to csv.writer() # and get a writer object writer_object = writer(f_object) # Pass the list as an argument into # the writerow() writer_object.writerow("asdasd") #Close the file object f_object.close() print("Fin") 

    this python code is within the directory of the direct folder which contains the csv file. this code has worked before, but now it seems to give me the error message on the title.

    any help is appreaciated.

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

    Python or PHP?

    Posted: 20 Feb 2022 06:23 PM PST

    I want to create a web based app that reads in CSV files and processes the data to give an output of a single modified CSV of what's been uploaded. So, for example... a user will upload 10 CSV files and get one modified CSV output.

    After, I want to be able to edit and modify PDF files and insert graphics.

    After, I need to connect to ecommerce websites API and download data directly instead of CSV upload (CSV upload will always be a choice.) These websites will be like Amazon, ebay, Shopify and others.

    The website needs to have users who can register and then use the service offered. I was thinking of using Wordpress for the membership part as free or paid.

    I'm thinking of learning Python.

    But is that the best choice?

    Should I go for PHP instead?

    Are there others that I should consider?

    Thanks.

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

    How to check if a file is ASCII file?

    Posted: 20 Feb 2022 09:54 PM PST

    Hi r/learnprogramming,

    I've been trying to understand how to detect files. The best way, from what i've heard, is by checking the file signature(magic numbers). Now, this is something which i fully agree.

    BUT, in plaintext ASCII files, then if if start the file with these characters: "abcd", then the first 4 bytes will be the decimal of these ASCII characters right? as far as i understood, plain text files don't have a set of magic number and these first set of bytes depend on the content of the text file.

    Is there anyway to detect if a file is plaintext vs numerous amounts binary file types.

    edit 1: i am working on an android app, and i'm looking for a way to do this in java.

    thank you.

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

    As one who just started learning Python, can anyone help explain to me what I did wrong here?

    Posted: 20 Feb 2022 09:31 PM PST

    #This is a Python test

    x = 1

    if x == 1:

    print("Hello World")

    print("I just wanted to say the number x is cool")

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

    regex problems with Kotlin

    Posted: 20 Feb 2022 09:24 PM PST

    I'm looking at masking json data, so I have a list of attributes: eg, firstName, lastName, that I want to replace with "*****"

    This code works fine:

     private val privateAttributes = setOf("firstName", "lastName" val maskedMessage = "{"firstName":"Jack"}" for (attribute in privateAttributes) { val regex = "(?i)(?<=$attribute\\\":\\s?\\\")(.*?)(?=\\\")".toRegex() maskedMessage = maskedMessage.replace(regex, "*****") } 

    2 things I've been asked to do.

    1 - pre-compile regex. No idea how to do that as [attribute] is part of the regex.

    2 - remove the look behind

    If I remove the lookbehind
    val regex = "(?i)(details)(\":\s?\")(.*?)(?=\")".toRegex()

    I get 

    {"**"} instead of {"firstName":"**"}

    in my output. I cannot figure out how to replace by groups in Kotlin :/

    TIA.

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

    Am I asking too many questions while trying to fix an issue in an Open Source Project?

    Posted: 20 Feb 2022 09:06 PM PST

    Hi, I just got into Open Source Contribution and have started trying to fix an issue that I found. Even though I spent tons of time trying to understand the codebase and googling a lot, I still have been struggling to write codes that fixes the issues, so I ask a lots of questions like what a variable does or how to build the project in my local environment, basically asking another question about how is my codes after I write some new codes even though they're just 1- 2 lines, and this makes me feel somewhat guilty. Like, I was supposed to help fix the issues, but I feel like that I'm the one getting helped. The owner spends tons of time answering my questions and I haven't made any contribution, and I just want to say sorry for wasting so much of their time. Is this normal when starting contributing to Open Source Project?

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

    Overcoming imposter syndrome as mid level dev

    Posted: 21 Feb 2022 12:28 AM PST

    Hi,

    I finished my degree, I work in IT for about 2 years and few months ago I was promoted to mid level developer. Shortly after getting the promotion, I got a job offer with much better salary and I accepted it. My new employer was so happy, they told me I really shined on the interview.

    Getting to the point... Since I started working full time, I don't really have time/motivation for self-learning. Because of that, I feel that I am not improving my skills and recently I started getting panic attacks whenever any new task pops up. It doesn't matter if it's developing new feature or setting up vpn account. I am afraid that I will fail.

    I also feel like a enormous imposter when someone mentions library, tool etc. I haven't heard about. I think it may be related to the fact that I am backend female dev and I faced a lot of discrimination since I started coding. Every day I had to prove that I really do like programming, because colleagues and lecturers were trying to prove that women do not belong to the IT world.

    I don't believe that I am the only one with such problems. How do you stay up-to-date and motivated? How do you overcome problems at work when you cannot constantly ask stupid questions, because you are not a junior anymore? You cannot master everything, so how do you choose what is worth learning? How do you deal with imposter syndrome?

    I'm Java+spring dev, idk if this is relevant.

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

    About TOP JavaScript section

    Posted: 21 Feb 2022 12:26 AM PST

    I'm writing's this after spending literally three hours thinking in the 4th exercise of JavaScript section, and quite salty with the statement they let in the readme: "the first part should be easy".

    At this point I just gave up for today wondering if I didn't understand anything about functions, loops and arrays or if I should go check other places since looks like provided information and something extra isn't enough.

    People who did TOP, how much time took for you to complete just the JavaScript fundamentals? And did you stick with their attached links to finish everything? Last question, did you check in internet code? (Say, if exercise asks for a reverse string, did you think how to do all by yourselves or wrote in internet how to do?)

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

    Number of Elements in an Array

    Posted: 20 Feb 2022 11:52 PM PST

    int[ , , ] array = new int[4, 5, 3];

    Supposedly, this array can store up to 60 elements.
    Can someone explain to me how that is? How can I determine the number of elements an array can store from the given information above.

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

    What is the best course if i'm learning Laravel w/ Xampp, Composer, NPM, PHP?

    Posted: 20 Feb 2022 11:44 PM PST

    The one I found uses React which im not sure what the Laravel equivelent would be.

    Thank you

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

    No comments:

    Post a Comment