• Breaking News

    Saturday, January 23, 2021

    What have you been working on recently? [January 23, 2021] learn programming

    What have you been working on recently? [January 23, 2021] learn programming


    What have you been working on recently? [January 23, 2021]

    Posted: 22 Jan 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]

    Spend 1 minute a day to improve your coding skills

    Posted: 22 Jan 2021 04:56 AM PST

    I have a youtube channel called Python in 1 Minute where I publish a short Python tutorial every day. My goal is to teach a common pattern or technique in under 60 seconds.

    I try to be respectful of the viewers time and make the videos terse and clear with as little unnecessary fluff as possible. The content is mostly aimed at beginners, I hope it can help some of you to get into the habit of learning something new every day.

    As I'm just starting out with this youtube thing, I'd love to hear your feedback regarding the format, content, anything... (topic suggestions are highly appreciated as well).

    (Sorry for the crosspost, I've already posted this in r/python a few days ago, but as the feedback was overwhelmingly positive I guess some people over here would find it useful as well.)

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

    What to learn after HTML/CSS/JS?

    Posted: 22 Jan 2021 05:18 PM PST

    New to coding! I'm working several hours a day to learn and I think I'm catching on pretty quickly. What should be the next thing I learn after those in the title if I would like to stay on the front end? Thanks!

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

    How do you guys prep for a new job? Just got my first real job and I'm so excited! And a little bit nervous!

    Posted: 22 Jan 2021 04:44 PM PST

    So I got a job with a company that I actually used to work with around 4 years ago.

    I just did coding bootcamp last year and finished and with a twist of fate I ended up in contact with their old CEO I used to work closely with.

    The first interview went great with their coding team, cool ass dudes where we just got to know each other.

    The technical interview also went well, very basic JavaScript toy problems, add some functionality to a shopping cart, and data base design talk.

    I was informed that I got the job and I can't wait to start, they're working on awesome tools that I honestly wished I had when I was working at my old gig, now I get to build them!

    I start in two months and asked what their tech stack was and oh boy, it's pretty big, I said I'd take the in between time to get familiar with some of the things.

    But their backend is coded in C #, they use Azure / .Net Core MVC / Razor View Engine - things I've never even touched.

    So while I'm teaching myself the basics of C# these days before I start with a few other tutorials. I just wanted to ask you guys how you get ready for a new gig? Is it totally normal to walk in on the first day and be dumbfounded? Any recommendations?

    Again, so excited, so happy to help contribute. Thanks for any input!

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

    It is so hard to contribute to an open source project. How can I overcome that?

    Posted: 22 Jan 2021 10:27 PM PST

    4 days ago, I tried to contribute to .NET Runtime for practicing. I found issues with easy label so hard and complex. I tried to read the section that relates to the issue also in vain. Until today, I can't type a single line of code in the project or solve an issue although I can build console applications and can do testing and debugging and can break the problem to tiny solvable pieces.

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

    Do RGB cubic-coordinate and HSL cylindrical-coordinate systems both support same colors?

    Posted: 22 Jan 2021 08:05 PM PST

    Do RGB cubic-coordinate and HSL cylindrical-coordinate systems both support same colors? Does one system support more or less colors than the other, or does one system support a color that cannot be achieved with the other system?

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

    How would you go about referencing this element in your code? (jupyter notebook + selenium)

    Posted: 22 Jan 2021 09:00 PM PST

    For a hopefully more detailed explanation to my problem, here is the stack overflow thread and will gladly take any help. (the pictures I reference a few times below is on there + for the pictures, you need to zoom in at least once for some reason or its blurry)

    Long story short, I am trying to scrape the table you see on a site called barchart that displays a bunch of information about options, having to do with stocks (but that's not the point so moving on). So I got around to scraping with selenium the contents of the whole page (not desired) in an unformatted mumble jumble mess (refer to "Code:").

    Now, the problem is that when I go to inspect the element to find the that table and all the contents I need, the elements that define my desired section boggle my mind. If you go to the stack overflow thread I have pictures of the lines that I assume are the elements I need to reference to get what I want but I haven't had any feedback yet so I've been stuck. Normally when I am practicing on places like Wiki or any other less complex site the element is simply defined with a 'div' or 'table' followed by referencing the 'class' then whatever its name is. In this case, the barchart elements have a whole paragraph behind them, though I assume for good reason since this data is dynamic, and I have no idea how to go about using .findALL or any other function to process said table. Just wondering if anyone could help, thanks!

    Code:

    !pip install selenium from bs4 import BeautifulSoup from urllib.request import urlopen, Request from selenium import webdriver import pandas as pd driver = webdriver.Chrome("D:/chromedriver/chromedriver.exe") driver.get('https://www.barchart.com/options/unusual-activity/stocks') soup = BeautifulSoup(driver.page_source, 'html.parser') # get text text = soup.get_text() print(text) 
    submitted by /u/AtariPEWPEW
    [link] [comments]

    How to get better at leetcode?

    Posted: 22 Jan 2021 08:53 PM PST

    I just started doing leetcode and started with the problem Two Sums

    https://leetcode.com/problems/two-sum/

    I spent a really long time and eventually had to look at the solution. I then spent time studying the solution and then recently started another problem and I have no idea how to do it. How can I get better? I heard some people say it's sort of conditioning and you kind of learn to pick up on it as you go along. Is this true? I have no idea where to start or what to do. If you've done leetcode, how did you get started?

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

    Turn on LED on ESP8266 via Android App

    Posted: 22 Jan 2021 11:45 PM PST

    So I've been researching on how I can do this for some days now (without using any 3rd party applications) and I can't seem to find anything. I was able to get the LED to light through a web server but what I really want is this to be done through an App made in Android Studio. I've tried using volley but I was not able to get it to work, I think that only makes requests to a website but In order for the LED to turn on I need to visit the website, is there anyway I can visit a website in the background without actually going through a browser?

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

    How to efficiently solve the (seat || time-slot) reservation problem for high traffic site?

    Posted: 22 Jan 2021 11:40 PM PST

    We are running a SaaS solution to reserve time-slots in a location. I think it's similar to an airline seat reservation system, just that we stack multiple people on one seat (= time-slot) of an airplane (= location). As we are already out of the single-instance and single-server mode, we need a solution that works with multiple nodes.

    At the moment, technically, we construct the possible slots of a location from the settings (open days and times) and then check each possible slot with already booked slots. This was fine when we had only few (concurrent) bookings, but now growth increases and it's (of course) getting really slow.

    What are potential solutions? Instead of constructing the possible slots and checking with booked slots, we could establish the possible slots up front in a key-value-store and attach the availability with it (2021-02-21T09:00 = 10 available). Then every time a slot is booked, we just decrease the number, it just needs to be transaction save. Challenge: We show available slots, but it may be gone by the time the user selects it, so we need to show an error message. Not very nice customer experience. Furthermore on any configuration change (like opening times) we need to re-create the lookup.

    Alternatively we reserve all slots which are shown to the user with the usual count-down timer, and then release them back to the available pool when not booked. Challenge: few people in booking mode will block all slots. So if 1000 people visit the site, the first 10 will see and reserve all slots, the other 990 will see nothing available. Furthermore if the app-instance dies, we still need to have a mechanism to reserve/release the slots.

    Finally we have the multi angle approach to available slots (= seats on flights): show which days are available, then zoom in and show which time-slots are available. This should also be efficient, like check day until you find first available slot.

    What is the best approach from your experience? Which structure and technology? In-Memory database, key-value-store, sharding by location (= airplane)?

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

    Made a really simple calculator.

    Posted: 22 Jan 2021 07:19 PM PST

    Here is the code, if you got any tips or criticism please let me know.

    print('Welcome to the calculator') print('7 __ 8 __ 9') print('4 __ 5 __ 6') print('1 __ 2 __ 3') print('Please choose the first number') num1 = input() print('Please choose the second number') num2 = input() print('Please choose the operator (type in "a" (for add) or "s" (for sub) or "d" (for division) or "m" (for multiplication) or "p" (for (num1)^(num2))') operator = input() def add(): numAdd = int(num1) + int(num2) return(numAdd) def sub(): numSub = int(num1) - int(num2) return(numSub) def div(): numDiv = int(num1) // int(num2) return(numDiv) def mul(): numMul = int(num1) * int(num2) return(numMul) def squared(): numSquared = int(num1) ** int(num2) return(numSquared) if operator == 'a': print(add()) if operator == 's': print(sub()) if operator == 'm': print(mul()) if operator == 'd': print(div()) if operator == 'p': print(squared()) input() 

    The input() at the end is to not have the program shut down as soon as they give the answer. Honestly, I was impressed how fast python gave me the answers to complicated equations (like for example 2434234234 * 342532432423423, it did something like this in less than a second).

    I still don't know how to add a UI (like, to create an app or at least working buttons), if you have any material for me to learn from that'd be appreciated.

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

    Realloc in Visual Studio

    Posted: 22 Jan 2021 11:05 PM PST

    Hi, I'm currently doing homework with C and would really appreciate some insight or hints on this issue when using realloc in Visual Studio.

    This part of the assignment basically tells me to expand the capacity of an array. However, whenever I try to use realloc, I would get an error saying: 'realloc' undefined, assuming extern returning int and unresolved external symbol.

    From my understanding, the stdlib.h header should include realloc, malloc and calloc already? I've been searching for an hour now but I have yet to find anything helpful on this. I've tried to initialize a temp integer, put realloc on it then pass it back to the array but it gives me the same error.

    I would greatly appreciate any insight, thank you!

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

    MVC implementation on desktop app

    Posted: 22 Jan 2021 11:01 PM PST

    Hi, I am currently new to programming and I am developing a desktop app for my personal project. I am planning to use MVC pattern to make my code more organize. But, as I do research about it, I am confused whether to make view and model directly communicate to each other, because some references says that they must be communicating through controller, but I see some examples that the view is directly querying from model. I would like to ask if what are the basic description of MVC. Is MVC implementation varies depending on the application (whether desktop app, web app, etc)?

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

    Sending large amounts of data through REST

    Posted: 22 Jan 2021 07:07 PM PST

    I am building a web app: Flask (python) backend, Vue (javascript) frontend.

    I would like to send data from the backend to the frontend, and am using a GET request to do so. However, I want to send roughly 50-100MB of data. GET will not send that large of data through, so how do I go about sending the frontend this data?

    For reference, I am reading in 10-20 CSV files that are roughly 4-5KB each, stitching them all into one big pandas dataframe, and trying to send that through to the frontend.

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

    Setting up email with a server

    Posted: 22 Jan 2021 10:24 PM PST

    Hi, I am trying to set up my website on a hosting service, but don't know how to do it since it is my first time. I have developed a website using php, javascript, and bootstrap and am wanting to host my website with AWS(but if there is something better I will use it). I need to implement an email feature and am wondering how to set it up so after a form is submitted it sends an email to me. I don't quite understand how to have a email hosting on a server(I figured out how to do it locally). Can I create a custom email with my domain with AWS? Would lightsail be the best hosting service? Any help to help me find which technologies to get would be really appreciated. Thanks!

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

    Help an newbie how to learn

    Posted: 22 Jan 2021 06:35 PM PST

    Hello everyone. I am currently trying to learn to program for the web. I am employed in a company that uses Angular.js technologies for the front-end and Java for the back-end. The company provided me with the opportunity to work in a support area while I study these programming languages, but sometimes I have a lot of difficulty not in 'WHAT' to learn, but 'HOW' to learn.

    I imagine that there are many programs here in this community and that's why I decided to post here, my sincere doubt to all devs, from beginner to master, how do you usually learn programming? I think I can improve the question: how did you actually START learning programming?

    PS: I already have an 'ok' base on html and css, and a little on Javascript, and I have already taken a complete Angular.js course, so I have a reasonable knowledge of this framework, but internally I feel that I am not learning from correct way to program at the same time that I don't know what a beginner like me should learn, or I don't know exactly what is expected of a beginner dev.

    I would very much appreciate any and all help you can provide me, I would like to talk to as many more experienced people as I (which should be almost everyone in this community) so that I learn as much as I can. I sincerely thank everyone for reading so far and I would appreciate it more if you can help me. Thanks!

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

    As a beginner programmer, is it worth trying specifically to get into the iOS development industry? Or is learning other more generally used tools a better path?

    Posted: 22 Jan 2021 10:10 PM PST

    I am most interested in the programming niche of iOS development, so I am thinking about learning Swift, but I have been told that it would be better for me to start with learning a language that is more widely used, such as JavaScript. I have applied and been accepted to a coding boot camp, Hack Reactor. Before I commit to this boot camp, I would like to explore whether it would be worth trying to start with iOS, since that is where my greatest interest lies. I would also greatly appreciate an suggestions for how to get started as an iOS developer, such as any boot camps that specialize in iOS, or any other paths that would lead to a job as an iOS developer. Thanks

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

    Beginner friendly AR resources

    Posted: 22 Jan 2021 10:04 PM PST

    I want to learn AR in Python but am intimidated with some of the results that come up when I search.

    What are some good (free) resources for a beginner to learn and perhaps complete a small project in this area ?

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

    Programming for adults with disabilities

    Posted: 22 Jan 2021 12:18 PM PST

    I work with a company that helps adults with disabilities learn and practice various skills. We're in the beginning stages of planning some "introduction to STEM stuff" content, and I'd like to include programming.

    There are tons of great programming resources out there, for every skill level... But does anyone have a favorite resource that's absolutely-dirt-simple but not explicitly directed at children?

    Keeping things accessible without infantilizing is the goal here: think grade-school-level explanations, without grade-school-level cartoon characters and constant references to that stage of life.

    In terms of focus, we're still brainstorming, so it could be anything from Python to Scratch to pseudocode.

    Thanks!

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

    Before I go to Sleep

    Posted: 22 Jan 2021 10:00 PM PST

    How can I create a system, with code or hardware, which replicates whatever the walky talkie mechanism does?

    Particularly, I want to know about the local connections required for this mechanism. It is intended to store sound by placing the tech or code and listening to the client.

    Any suggestions or a starting point would be appreciated. Even if it is beyond common.

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

    Learn melee within my JavaScript game engine

    Posted: 22 Jan 2021 06:03 PM PST

    Still working hard on my javascript 2d game engine. Tonight I want to correctley Implement melee!! come join in on the fun and learn some stuff. https://Twitch.tv/codingbutter

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

    I just failed my first React technical Interview and here are the lessons I learned from it.

    Posted: 22 Jan 2021 07:23 AM PST

    Hello friends, a week ago I asked here on reddit this: [https://www.reddit.com/r/learnprogramming/comments/kvrk05/how_to_answer_tell_me_about_yourself_in_an/]() It was a question that I had no idea how to answer and I am so thankful for the huge amount of awesome responses I got from the Reddit community - you peeps are amazing! And today I got a chance to have a face-to-face interview with the company that has asked me this question through a phone interview. But the thing is, I honestly did not perform well at all, and by the half end of the interview, my confidence level dropped down by 90%. But here are some of the lessons that I learned today:

    1. When you enter the room, always smile, be pleasant and greet them Goodmorning or GoodAfternoon. This just ensures that you have the basic courtesy of greeting a human being. Period.

    2. Always be prepared with the question: "Tell me about yourself". WHY ? Because if you can nail this question without any sweat, I feel like you have a kind of head start already. So refer to the above link on how to answer it in a cool way.

    3. If they give you a take-home project with a figma link or any design that they want you to build ALWAYS STICK TO THE DAMN DESIGN.I REPEAT - STICK WITH IT.I think this is where I felt like "oh goddamn it, I really messed up here".So I was given a basic design and was told to design that basic app with that UI plus add some other features following the same design. But guess what I did ? I didn't follow almost 95% of the design.I added shadows,I added border-radius and all that crap just to boast my CSS skills and when they asked me why I deviated from the design, I had to say that I thought my design was better than theirs which was a very foolish answer to say.

    4. If the interviewer is asking a question, make sure you give some time to think and then answer. Process the question being asked.What I did was just abruptly jump in and answered it and then when they counter-questioned me whether I was 100% sure of the answer - I went into this state of self-doubt I cannot even explain.

    5.If they ask a question and you have zero idea what the hell that thing is, you can say I dont know. OR if you know what it is by at least 10% of it, but don't know how to say it due to lack of accurate knowledge never say I dont know, instead you could say - "I am still learning on X topic", OR "It is something that I am considering to learn" OR "I have not figured out what it is YET". These just shows that you are willing to learn and shows some form of positive attitude.But on the other hand if you are comfortable telling honestly that "You dont know X something" that's is also fine. But I personally prefer the former.

    1. At the end of the interview, they might ask you "Do you have any questions for us ?". Here are some questions that you can ask:

      • "How is it like working at X company?"
      • "What will be some of the tech stacks which I will working on in the coming years".
      • "What all learning opportunities will I receive".
      • "What is the process like to go from an intern to being your permanent developer?" (this only applies if you are applying for an internship".
      • "What would be some of the expectations from a junior developer like me?".
    2. Last but not the least, end interview with this golden question. This is one of the questions which I really love to ask, because I believe that every human brain works well with a feedback system.Ask the interviewer: "Could you please give me any valuable feedback on how I performed. If so, could you also specify which areas I did not perform well. Also I would really appreciate if you recommend some resources or books that you think would help me increase my knowledge of X subject?"
      If I was the interviewer, I would 100% appreciate the effort that the person is putting to know more about a subject matter even though the person did not do well in an interview. I might also remember this purticular person well - because I had given him some form of advice.

    Well, these are some of the pointers. At the end of the day, even if you didn't perform well - you will feel like you don't know anything or you'd feel like you are a dissapointment especially if you are a beginner like me. But the truth is, we all have a potential to learn and succeed in life. If not this interview, your lucky one will be your 5th interview, or your 20th interview. Never give up and keep learning and building projects!

    I'm sure this list is not exhaustive,so if any one of you have any other lessons that you have gained after your first technical interview, please leave it in the comments as damn sure its gonna help other beginner programmers a lot. :)

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

    Creating a Directory for ".txt" Files

    Posted: 22 Jan 2021 09:19 PM PST

    Currently, I'm starting to learn more about handling other kinds of files for my code and I want to ask a question from the experienced coders here:

    Let say in my program, I made a ".txt" file using a chain of juicy commands and I want to store it in a specific folder, how can I do it?

    Follow up: What should I do in order to access that same ".txt" file from that directory?

    Your response would be highly appreciated. This subreddit helped me a lot in resolving my C++ errors, so thanks a lot for that.

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

    Limit folder access

    Posted: 22 Jan 2021 09:19 PM PST

    It is possible to limit folder access to only open through a program? Ex i have a calibration DB that uploads the file to DB/EQ/calcert/filename.pdf

    By default when someone clicks on the current cal cert it will open the most recent but there is an option to open the folder incase something errors or an auditor needs to see old certs. Is it possible to limit opening say DB/EQ2 to only open if accessed through the DB to keep from someone browsing all the stored files?

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

    Head First Javascript Battleship Project Issues

    Posted: 22 Jan 2021 09:09 PM PST

    Hey all, I'm extremely new to programming and just trying to get used to Javascript syntax at the moment. If any of you could please help me with the following issue, it would be greatly appreciated. Very essentially I'm trying to build a Javascript Battleship Game per the instructions in Chapter 8 of Head First Javascript. I've run into an issue that the book doesn't troubleshoot for.

    Very essentially, I am trying to figure out why my table ID is returning null when I utilize the document.getElementById("00") . What follows is my html and javascript for the project thus far, minus some repetitive copy/pasting of table cells/rows. Again, any help in regards to this matter would be greatly appreciated. Thanks for your time and consideration.

    HTML

    <!doctype = html>
    <html lang = "en">
    <head>
    <meta charset="utf-8">
    <title>Head First BattleShip</title>
    <link rel="stylesheet" href="style.css">
    <script src = "code.js"></script>
    </head>
    <body>
    <div id = "board">
    <div id ="messageArea"></div>
    <table>
    <tr>

    <!--this is where I'm having some issues-->
    <td id ="00">Some text</td><td id ="01"></td><td id ="02"></td><td id ="03"></td><td id ="04"></td><td id ="05"><td id ="06"></td></td>
    </tr>
    </table>
    <form>
    <input type="text" id="guessInput" placeholder="A0">
    <input type="button" id="fireButton" value="Fire!">
    </form>
    </body>
    </html>

    JAVASCRIPT

    var view = {
    //this method takes a string message and displays it in the message display area//

    displayMessage: function (msg) {
    var messageArea = document.getElementById("messageArea");
    messageArea.innerHTML = msg;
    },

    //And here I have the problem, I'm trying to assign a new class to the table cell above with the ID of "00" and it returns the ID as having the value of "null"//
    displayHit: function (A0) {
    var cell = document.getElementById("00");
    cell.className = "hit";
    },
    displayMiss: function (location) {
    var cell = document.getElementById(location);
    cell.setAttribute("class", "miss");
    }
    };
    //Console displays "Cannot set property 'className' of null at Object.displayHit"//
    view.displayHit("00");

    //Here I just was trying to pinpoint what the problem, and lo and behold, the console returns "null"//

    var cell = document.getElementById("00");
    console.log(cell)

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

    No comments:

    Post a Comment