• Breaking News

    Tuesday, December 1, 2020

    Quick Poll: Should we host daily Advent Of Code threads? learn programming

    Quick Poll: Should we host daily Advent Of Code threads? learn programming


    Quick Poll: Should we host daily Advent Of Code threads?

    Posted: 01 Dec 2020 05:23 AM PST

    Hello Community!

    As of today, December 1st the annual Advent Of Code challenge has started. It is a nice competition throughout the Advent season.

    Should we here in /r/learnprogramming host daily treads similar to the ones in /r/javahelp (Example)?

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

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

    Posted: 01 Dec 2020 11:22 AM PST

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

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

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

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

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

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

    Frequently Asked Questions: (read this before posting questions)

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

    How to overcome initial development anxiety?

    Posted: 01 Dec 2020 04:00 PM PST

    I have this really bad issue that when I have to learn something new it takes me ages to approach the problem before I get to it, any hard concept freaks me the hell out and I postpone it until the last minute, with an added level of pressure.
    Now that I'm working I really need to be productive, and cannot afford waisting time delaying the inevitable, and resort to asking for help from other engineers.
    what is your process in researching a solution to a complex problem, where you may very well have to learn a new framework or language. I do not have a CS degree so I cannot fall back on my cs knowledge.
    I can easily waste a day finding the optimal 12h web course that is overkill, or 30 different tabs that never lead me anywhere.
    Essentially when it comes to writing code form scratch ( and not maintaining) I just get paralyzed.
    Obviously it's something I need to fix soon if I want to be good at my job.
    Anyone encounter this?
    An example:
    2 weeks to learn back-end frameworks using tools and languages like python, node.is, express etc.. it's so much I get overwhelmed

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

    Should be Easy... Right

    Posted: 01 Dec 2020 04:57 PM PST

    Hey guys! So here's the Situation, my grandma recently lost her eyesight and feels sad because she can't see the family pictures anymore. So my father and I came up with the idea to replace the Pictures with buttons which, when pressed, will then play a mp3 voice recording stored on an SD card of the family member whos picture used to be there. My grandma has those big multiframes with three pictures, so a three button to one speaker setup would be ideal. I was thinking of using a Node mcu, a micro SD adapter and the buttons to build this project. I could store the sound files on node direktly but the free space is probably going to be to small and I want to replicate this project for other family members so a SD is the best to use. I don't quite know how to set up a button to trigger a specific audio file on the SD or even if it's possible... I know how to solder and have beginner experience in c programming, however I am still first semester and don't know how to Programm the Node or how to wire everything up (but I'd like to learn).

    Hope I can find some help here since I'd really like to do my granny this favor!

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

    [C++] Missing edge cases in palindrome question?

    Posted: 01 Dec 2020 10:50 PM PST

    This is a question on CodeSignal I seem to be missing. I just need to check if a word is a palindrome or not. I created this program but it seems to be missing some cases, for "aaabaaaa" and "zzzazzazz". I thought of everything but it seems I am stuck. Any hints? If I could optimize my code, that would be appreciated.

    bool checkPalindrome(string inputString) { for(int i = 0; i<inputString.length()/2; i++) { if(inputString[i]!=(inputString[inputString.length()-1-i])) { return false; } else { return true; } } } 
    submitted by /u/gamefaqs_god
    [link] [comments]

    Made a tutorial series about Computational Biology with Python

    Posted: 01 Dec 2020 09:56 PM PST

    If anyone is interested in learning about computational biology, I made a Youtube channel where I'm going to be making tutorials about some basic concepts using Python.

    The video series up there now is about how to model and simulate a gene regulatory network, beginning with a basic ODE simulation of the transcription of one gene, and adding complexity step by step until we have a stochastic simulation of a gene network. And I'm planning to make some more videos about different introductory topics in the field (if there are specific topics people would like to hear about please let me know).

    Also I don't have any experience with teaching this stuff and am trying to improve, so I would really appreciate any advice, criticism, or feedback you guys have. Thanks!

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

    A picture book written in Python code

    Posted: 01 Dec 2020 04:21 PM PST

    I'm writing a Python book for beginners called A Day in Code: Python. The picture book's story is described with simple Python programs (with code explanations!). I just launched it today on Kickstarter: https://www.kickstarter.com/projects/914595512/a-day-in-code-python. I hope this book makes it fun to learn Python! I'd love to hear your feedback. :)

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

    Bootcamp didn't teach me how to get things up and running or about security, and now i'm sort of paranoid

    Posted: 01 Dec 2020 04:05 PM PST

    I went to a weird bootcamp and did pretty well when it came to actual programming, but the issue was that they would have PCs, servers, databases, all running and never explained about them. Like sure, we could run things and design sites but only learned the logic and languages, not the rest of the important stuff, so when working in a project involving the internet or some security features it aways seems like things will cone crashing down any minute and i'm using all the tools wrong.

    I'm trying to get into programming seriously again so this is something i'm paranoid about and i'm not sure what to even search for since everyone seems to have no issues with this , any help would be appreciated.

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

    Going to be building an online turn based game using the MERN stack, have a question about online gameplay

    Posted: 01 Dec 2020 04:59 PM PST

    My goal is to make an online game sort of like Naruto Arena or Final Fantasy with an online match system. I can probably handle match making just using my current javascript skills on the back end, but I guess what i'm curious about is how I should store online-match data. For example, should I use my Mongo Database to store the current stats of the characters/field information for each online match, or should I just have one client 'post' their move and game id, store it somewhere, then wait until the other client 'gets' the data?

    If anyone has any guides or resources that might help with making a 1v1 online game using mongoDB/Express, i'd be super grateful.

    submitted by /u/AndreThompson-Atlow
    [link] [comments]

    C# User inputs numbers to a max sum of 5 using basic loops. My code works, but on the last loop when the user reaches Sum = 5, it asks for a number one more time. Tried <, <=, < && != ... same issue every time? Thanks.

    Posted: 01 Dec 2020 11:30 PM PST

    Here is my code:

    ``` public int entry; public int Sum { get { return entry; } set { if (value >= 0) entry = value; } } public void EnterNumbersA() { Console.Write("Please enter a number: "); Console.WriteLine();

     try { var n = Console.ReadLine(); var number = int.Parse(n); int max = 5; if (number < 0 || number > max) { Console.Write("You must enter a different number.\n"); EnterNumbersA(); } else if (Sum >= max) { Console.WriteLine("You have reached or surpassed the maximum sum {0}", max); Console.WriteLine("Thanks for playing.\n"); } else // I believe this line (while) to be the source of the problem... // tried many operations but they all give the same result, // what am I missing? while (Sum < max && Sum != max) // problem line { Sum += number; Console.WriteLine("Total sum: {0}", Sum); EnterNumbersA(); } } catch (FormatException) { Console.Write("You must enter a whole number.\n"); EnterNumbersA(); } 

    ```

    Example:

    • User enters 1

    Total Sum = 1

    • User enters 3

    Total Sum = 4

    • User enters 1 or 4 or 100 (anything equal to or over 5)

    [ CODE SHOULD STOP HERE AND EXECUTE 'Thanks for playing' message]

    Instead...

    It asks for a number one more time, then executes.

    So effectively, it has to reach or go over 5 TWICE to execute... what am I missing/doing wrong??

    Thanks!

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

    Looking for a youtube channel for professional programmers (w/o side/passive income interest)

    Posted: 01 Dec 2020 10:50 PM PST

    Recommend me some of the channels professional devs would like.

    Some of the channel I like -

    Semicolon & Sons

    This is an awesome channel where the guy goes quite in-depth in developing his profitable web application entirely from the ground up. The only issue is that the full series of videos is paywalled.

    Context Free

    Another awesome channel that explores programming languages in-depth.

    Andreas Kling

    Follow his journey of building an operating system from scratch.

    Mentionable but not exactly recommendable category

    In case anyone recommends them here is the channel that I am familiar of but don't fit the bill.

    I would have recommended Luke Smith but he nowadays seldom upload good linux videos. ThePrimeagen uploads vim content but his videos are a bit out there. Similiar channel is Commaai/Geohotz

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

    Binary heap:down_Heapify bug

    Posted: 01 Dec 2020 10:42 PM PST

    So I have completed a question of parallel processing to schedule jobs.

    As I trying to narrow down the bug, I figured it was in the down_Heapify code since my code did not build a proper heap when I gave an input: {4 , 3 , 2, 1}. From the debugger, I need 1 more down_Heapify to make it perfect.

    When I cross-reference my Implementation of down_Heapify with some on the Internets', it seems pretty much the same.

    Input:

    {4 , 3 , 2, 1} 

    Expected output:

    {1, 2, 3, 4} 

    My wrong output:

    {2, 1, 4, 3} //need 1 more down_heapify call on element 2 to make it correct 

    ----------------------------------------------

    Here is where the bug happens:

    private Heap(List<T> list,Comparator<T> comparator) { this.comparator=comparator; this.list=list; build_Heap(this.list); } public void build_Heap(List<T> list) { //I'm using a 1-based list, index 0 is null for(int idx=(list.size()-1)/2;idx>=1;idx--) { down_Heapify(idx, list.size()-1); } } //The culprit of the bug? private void down_Heapify(int parentIndex,int limit) { int parent=parentIndex; int leftChild=2*parentIndex; int rightChild=2*parentIndex+1; //Recursion ends when no swaps occur,ie, heap property is maintained at root //General cases if(leftChild<=limit && comparator.compare(list.get(leftChild), list.get(parentIndex) )>0) { parent=leftChild; } if(rightChild<=limit && comparator.compare(list.get(rightChild), list.get(parentIndex) )>0) { parent=rightChild; } //ie index has changed because min/max property was violated if(parent!=parentIndex) { //Swap the elements swap(parent,parentIndex); down_Heapify(parent, limit); } } //In case you wanna take a look a the comparator(which is pretty basic; I used anonymous inner type) new Comparator<Integer>() { @Override public int compare(Integer o1, Integer o2) { //I want it in descending order return o2-o1; } } 

    As always, appreciate it!

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

    What projects should I do?

    Posted: 01 Dec 2020 06:52 PM PST

    I recently completed intro to C++ and some of its concepts. I would like to get better at it by doing some projects now.

    What are some project/s that require strong basics so that I can confirm that I actually understood what I studied and then dive into more complex things.

    Thanks

    submitted by /u/--mohit--
    [link] [comments]

    Print indices of objects from list

    Posted: 01 Dec 2020 06:35 PM PST

    for obtaining the indices of every object in a list is there another way to do it besides what I did here?

    ids=[5563, 8876, 1781, 0911, 890, 1000]

    for x in ids:

    print(ids.index(x))

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

    Do you regret being a programmer?

    Posted: 01 Dec 2020 09:48 PM PST

    In your opinion, what are the drawbacks of the I.T. career? Do you consider shifting careers?

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

    your own eye of the tiger

    Posted: 01 Dec 2020 09:44 PM PST

    i wanted to ask about how everyone starts building their projects. like how do you come up with the idea and how do you start coding your project.

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

    Should I improve my home programming setup? [Junior Dev]

    Posted: 01 Dec 2020 09:16 PM PST

    A very different post but there is a really sweet deal on a 34'' inch ultrawide monitor thanks to black friday and cyber monday and all that. I'm really tempted to get it, I can afford it and it will no doubt improve my productivity. Most of the senior programers at work have 3 monitors setup. And I also want to be really good at what I do and if it takes buying another monitor to improve my productivity then I'm happy to do so in theory. But at the same time, I'm really hesitated.

    Do I really need this? I'm currently working from home, but I will have a different setup when we are back in the office in a couple of months. Still I want a decent setup at home because I'm planing to build my own things, programming at home in the future. And I don't want anything to be limiting my creativity. But I already have 2 monitors at home. One 27'' 1440p screen and an old 24'' 1080p screen(with broken buttons), which works really well but I still feel like I need more real estate occasionally for work. Sometimes, I feel like I have too many tech things, while people, friends at my age with different occupations mostly just have their laptop. And I feel guilty about this. I'm also at a stage in my life in which I'd probably move house a lot. Am I being too materialistic? Maybe I should just save that money. Maybe I don't deserve another screen yet.

    Should I get this new monitor or nah?

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

    Do you guys know any application in windows to get the coordinates of the mouse on the screen?

    Posted: 01 Dec 2020 09:11 PM PST

    trying to do some automation with pyautogui.

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

    i am having trouble with visual studio 2019

    Posted: 01 Dec 2020 08:55 PM PST

    hi i am new to c++ and am trying to run hello world but whenever i put <iostream> in it says that there is no <crtdbg.h> . if i try and edit the place the error is coming from i get the error that my access is denied. Thanks

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

    Christmas presents for a newbie programmer

    Posted: 01 Dec 2020 02:18 PM PST

    Hello all!

    My partner has just started learning python. so far he is self taught ,however, he is about to start a learning program aimed at teach python for those who want to go into data science.
    My questions is what learning materials can I buy him that would help?
    Is there anything else that I could get him that all programmers have? ( e.g. software, computer upgrades)
    I have no knowledge in the area so have no idea where to start. So far he has no textbooks/reading material whatsoever

    Thanks in advance

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

    LeetCode, am I doing it right?

    Posted: 01 Dec 2020 08:08 PM PST

    I'm currently in the process of learning JS, data structures and algorithms. I've been going through leetcode easy questions and so far have been focusing on Arrays, Hashmaps, and dynamic programming. Easy questions are still difficult for me and I'll spend a few hours trying to develop a solution that ultimately doesn't work. I will then look at an explainstion video on YouTube, analyze the solution until I understand exactly what is happening and then move on to the next problem.

    I'm not sure if this is the best approach or if others can recommend tips. My ultimate goal is to perform well enough to pass a FAANG interview in 1.5 years

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

    Reddit I CALL OUT TO THEE, I've NEVER needed YOU more than I do right now! I've been coding on and off as a hobby for a couple years and I want to get serious, JOB SERIOUS. I'm calling out to the Open Source Wizards to grant me Wisdom and knowledge.

    Posted: 01 Dec 2020 08:05 PM PST

    // What I know?: Javascript, HTML, CSS, and Python

    // What level?: Beginner

    // What Is my goal?: Full Stack Software Developer

    // Why do I need you guys?: To lend me your wisdom, knowledge and resources to reach my goal.

    // How long do I have?: One year 8 hours a day every day minus every other weekend.

    Here is the wall of text if you would like to read this instead

    Hey! I know the fundamentals of HTML, CSS, Javascript, and Python.

    GOAL: I want to pursue a job as a Full Stack Developer and I need YOUR HELP (pretty please) to grant me the guidance of your thousands of years of collective experience. I want to go from beginner to "job ready" as quickly as it is possible.

    YOUR HELP? Please give me tips and list topics and concepts I need to learn, supporting languages I need to master, and what the heck is AWS and Docker that is listed in so many job application requirements? I need to master libraries and frameworks, I've never coded with a library or a framework before. Help me learn things like React.js and Angular and whatever else I need to add to my repertoire of skills.

    HANZ ZIMMER: I know you may think I'm a mad lad but by quickly as possible I mean a year, I have a year before I'm out on my own and I want to wake up and work doing something I love. I know it sounds crazy but I have all day (8 hours) every day for a year (minus every other weekend so whatever 11/14*365 is) and I'm very committed and have friends who support me.

    EXPERIENCE: The only projects I've completed are a couple crappy websites, thepythonchallenge.com, and a copy of the Windows 10 Calendar. I know I need to contribute to opensource but I'm kind of scared and I've never done it before. Please guys guide me through this process! I want to create a portfolio website in the future and blog about my progress but I have no portfolio.

    PASSSION: I'm not into computers because there's lots of money in the business. I'm into them because I'm passionate about them. Please I how much can I learn in 11*24(/14)*365 hours. Is it enough?

    THANKS GUYS! I finished high school early so I have this extra year before my parents give me the boot. I'm not asking you to hold my hand, I'm simply asking for you guys to lend a helping hand. I want to put in not only the most work, but the best work, and you guys are the Professionals.

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

    Trying to replace certain characters with other characters in a string in TypeScript

    Posted: 01 Dec 2020 08:04 PM PST

    I am learning TypeScript and for this particular problem, I am trying to replace certain characters in a string with another character. So if there is an A, I want to replace it with a T. If there is a T, I want to replace it with an A. If there is a C, I want to replace it with a G. If there is a G, I want to replace it with a C.

    The outputs would be something like this:

     dnaStrand("ATTGC") // return "TAACG" dnaStrand("GTAT") // return "CATA" 

    Below is my code. I decided to add an if/else statement to the static method by incorporating the include and replace method for strings. Unfortunately, it is not working. The errors I am getting seem to be syntax related. As you can see below. Can somebody help?

     export class Kata { static dnaStrand(dna: string) { if(dna.includes('A')){ dna.replace('A', 'T') } else if (dna.includes('T')){ dna.replace('T', 'A'){ else if (dna.includes('C')){ dna.replace('C', 'G') }else(dna.includes('G')){ dna.replace('G', 'C') } } } } } Kata.dnaStrand("ATTGC") 
    submitted by /u/odillini83
    [link] [comments]

    No comments:

    Post a Comment