• Breaking News

    Monday, March 22, 2021

    Was feeling super confident about my programming abilities until I opened up cracking the coding interview learn programming

    Was feeling super confident about my programming abilities until I opened up cracking the coding interview learn programming


    Was feeling super confident about my programming abilities until I opened up cracking the coding interview

    Posted: 21 Mar 2021 07:24 AM PDT

    I was doing fricken great (went the self-study route). I've been proudly building my own full-stack personal projects, learning concepts left and right, and started to feel like I'm close to being where I need to be to get a job. Then I opened up cracking the coding interview and now I feel like I'm still a year+ away from understanding all of these concepts.

    Obviously not every job requires all of this knowledge because there's no way people learn all this in 3 months at bootcamp, but now I'm starting to feel like going to big-tech is just so far out of reach still. Maybe I'll get there someday. Not really anything else to this post, just wanted to share what was on my mind.

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

    Backend Developer Cheatsheet

    Posted: 21 Mar 2021 07:18 AM PDT

    Backend Developer Cheatsheet by Twitter Sunil Kumar @Sunilc_

    Enjoy.

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

    Calculating Big O and time complexity of code as a linked list vs array based

    Posted: 21 Mar 2021 09:18 PM PDT

    Hi I'm trying to calculate the big O notation of this code, assuming the list that is being used is a linked list

    public static void update(List<Star> list) { // compute and apply acceleration for (int i = 0; i < list.size(); i++) { Star s1 = list.get(i); for (int j = i + 1; j < list.size(); j++) { Star s2 = list.get(j); Vector acceleration = attractionAcceleration(s1, s2); s1.velocity.add(acceleration); acceleration.negate(); s2.velocity.add(acceleration); } } // apply velocity for (int i = 0; i < list.size(); i++) { Star s = list.get(i); s.location.add(s.velocity); } } } 

    I was also asked to calculate the big O assuming the list is an array based list and I got O(N^2) due to it being 2 nested loops. I have been told that the answer for it as a linked list is O(N^4), i'm just not sure how I explain either of these calculations completely, any help would be appreciated

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

    To those who went from self taught to their first coding job: What are 1 or 2 things do you think you did to separate yourself and get the job? I would like to create a list and share to help others.

    Posted: 21 Mar 2021 01:01 PM PDT

    Hey everyone.

    Too often when I see people post advice on how they got their first coding job it very much seems to be the standard: build projects, keep applying to jobs, learn new languages/frameworks/etc, and so on. While that is pretty much true as to what you should be doing, I don't believe that the advice goes far in helping in those looking for their foot in the door. If the same thing you are doing is being done by those that are more experience, why would anyone bother to take a chance on your potential?

    I think that there is more to it. For those that were able to make it past the "gatekeepers" so to speak, What specific thing (or two) did you do/or think you did that you believe help land the job? From what I can see, there seems to be 4 different components to an application: cover letter, resume, projects, languages.

    1. Cover letters - What did you include, not include? How much personality did you show or not show? Was it even worth the time to make one? etc.
    2. Resume - How did you strengthen your resume? What are some overlooked things that you included in your resume, programming related or not? Did you think the formatting matter? etc.
    3. Projects - Were your personal projects large in scope or small? Did the type of apps/projects and their complexity matter? What were some of the things you did to describe/showcase your apps/scripts? Screenshots? Videos? etc.
    4. Languages - Should you be a jack of all trades (languages) or master of 1-2/3? Stick to popular libraries/modules or include more niche-y ones? etc.

    I'm sure there are more but these are the 4 areas that I see as the most common. I have also been told to work on other areas such as your social media presence. One recommendation was to create a youtube channel and use that as a platform to display your work and show know and can do.

    So yeah. Any little tidbits or tips that you think could be useful to aspiring developers for their first opportunity would be greatly appreciated :). While it may not work for everyone, I think it will give people more opportunities to experiment and find what works for them. All I ask now is if you could right your advice/tip like this:

    > [Application Component (ex. Cover letter)] - "your advice/tip"

    This will help me organize and create a more comprehensive list!

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

    Great tips on software development and living life writing software.

    Posted: 21 Mar 2021 04:55 PM PDT

    Great tips on software development and living life writing software.

    • Soft skills - Thank you Dániel Moka (@DMokafa)

    Tweet from Dániel Moka

    "Soft skills are equally important to hard skills!

    Tips to improve your soft skills:
    - encourage self-reflection.
    - emphasize teamwork.
    - build positive relationships.
    - be open to feedback.
    - step outside of your comfort zone.
    - take on a leadership role.

    What else would you add?"

    • How To live when you are a software developer professionally - Thank you Danny Thompson (@DThompsonDev)

    Tweet from Danny Thompson

    "Your goal should never be to code all day & night.

    You should code.
    Enjoy time with the family.
    Go for a walk.
    Breathe.
    I don't live to code, I code to live.
    Very big distinction.

    Avoid burn out.
    The balance gives you longevity in this industry."

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

    [Help] I'm a newborn to the programming and coding world so forgive me if this is a dumb question. How do I get my python code to run in terminal? why does it say, "No such file directory"?

    Posted: 21 Mar 2021 07:46 PM PDT

    I get an error message in the terminal,

    "dariansingh@LAPTOP-NRCK5MDI:/mnt/c/Users/daria/Desktop/work$ C:/Users/daria/AppData/Local/Programs/Python/Python39/python.exe c:/Users/daria/Desktop/work/test.py-bash: C:/Users/daria/AppData/Local/Programs/Python/Python39/python.exe: No such file or directory

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

    Pluralsight And C#

    Posted: 21 Mar 2021 07:23 PM PDT

    Hopefully this is okay to ask.

    Pluralsight was the best resource for C# a year or 2 ago just want to confirm they are still one of the best paid for C#? Updated material. I fell off right when .NET Core was starting up so a lot has changed.

    Need to freshen up and taping Udemy and YouTube videos together isn't worth the hassle. $30 a month if worth it for me.

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

    c# UI designing

    Posted: 22 Mar 2021 12:47 AM PDT

    I want to display a spectogram and a frequency spectrum on c# windows form application. any tutorials or advice highly appreciated.

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

    [C++] I want to run a function that requires two arguments on all combinations that are not repetitive, is there any way to do that?

    Posted: 22 Mar 2021 12:36 AM PDT

    I have a list of x number of objects from a class, and a function called function(object, object) that I want to run every cycle with every combination of these objects.

    The simple way to do this would be to just iterate all combinations, meaning it would run x2 times, the problem is that many combinations would be redundant, such as function(object1, object2) and function(object2, object1), and while my code wouldn't be very heavy regardless I still want to optimize as much as I can.

    Is there a way to parse only unique combinations that is less computationally intensive than just iterating all of them?

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

    Documentation question

    Posted: 22 Mar 2021 12:35 AM PDT

    So as I've been working on my capstone project for grad, I realize that a lot of what I now know can be easily found in the documentation. I've found that if I can find the location in the documentation that will help me solve my problem, I can figure it out just by reading... however the issue I find is properly determining what thing in the documentation I need to look at, do y'all have any tips for that? I've had a lot of experience with google but apart from that I'm not really sure as to how to make it so I find said things much quicker. If it helps, I've basically been working on a sticky notes app with extra features, web based. I'm using node js, express, and I've also been using tinyMCE which was for the text editor portion of the sticky notes. I don't think I'm allowed to post the link but if it helps for me to provide the GitHub repo and the heroku link to provide advice, let me know although I'm sure it won't make much of a difference if at all based on what I'm asking.

    Thanks for any comments!

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

    How to compete for ICPC World Finals?

    Posted: 22 Mar 2021 12:26 AM PDT

    What stage I'll face in order to get into final,can somebody tell the whole process?

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

    Game programming interview task

    Posted: 21 Mar 2021 11:48 PM PDT

    I passed my initial Coding exam and now I have a coding task. I am honestly lost and overwhelmed with the task. I can see whats wrong but I don't know how to fix it. I feel depressed that I cannot solve this issue alone and stupid that maybe the solution is simple. I don't want to blow this opportunity so I'm lost.

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

    Trying to create a right align triangle with height =2

    Posted: 21 Mar 2021 08:00 PM PDT

    I'm doing a base case of height = 2. And I'm trying to get it to look like this:

    . X

    XX

    aka a right align triangle.

    int main( ) {

    for (int i = 0; i is less than 2 ; i++) { for (int m= 1; m is greater than 0,m - -) { printf("."); for (int j = 0; j is greater than or equal to i; j++) { printf("#"); } printf("\n"); } 
    submitted by /u/Mind-Objective
    [link] [comments]

    I want to build up my portfolio by posting python projects to GitHub but will that really help?

    Posted: 21 Mar 2021 07:47 AM PDT

    So I am 13 and my plan is to have a good portfolio by the time I apply for a job, right now I am building it up by making mobile games (https://play.google.com/store/apps/dev?id=8186313019301448070) and posting projects to GitHub https://github.com/IronHead43/python but I feel like if I have hundreds of small projects it will look unprofessional. Can I have some advise?

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

    How readwise app integrate with kindle api to fetch book highlights? [Help]

    Posted: 21 Mar 2021 11:22 PM PDT

    I was checking the readwise web app where they have an option to sync highlights from kindle. When i checked there is no kindle api available to fetch the highlights. So i want to know how they are doing it, the integration of kindle with their platform and fetching the highlights of kindle books?

    It will be helpful if someone guide me on this?

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

    Error when working with cheerio

    Posted: 21 Mar 2021 10:44 PM PDT

    Hi I'm new with working with cheerio, I have the following code :

    import * as functions from "firebase-functions";
    import * as cheerio from "cheerio";
    import fetch from "node-fetch";
    export const helloWorld = functions
    .runWith({ timeoutSeconds: 120 })
    .https.onRequest(async (req, res) => {
    try {
    const response = await fetch(
    "https://www.readmng.com/black-clover/286/1"
    );
    const html = response.text();
    const $ = cheerio.load(html);
    const chapters_count = Array.from($(".form-control input-sm jump-menu"))
    .length;
    res.send(chapters_count);
    } catch (error) {
    res.send("error: " + error);
    }
    // let chapter_list: any[] = [];
    // let chapters_count;
    // // for (let index = 0; index < chapters_count; index++) {
    // await page.goto("https://www.readmng.com/black-clover/286/" + index, {
    // waitUntil: "networkidle0",
    // });
    // await page.evaluate(() => {
    // chapter_list.push(
    // document.getElementById("chapter_img")?.getAttribute("src")
    // );
    // });
    // }
    });
    when I make request with post man to this cloud function locally it give the weird following error;

    error: TypeError: content.forEach is not a function

    the status code is 200

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

    Python program to move images from a single folder into multiple folders based on multiple csv lists containing file names. Can't correctly pass expected errors and/or programs skips certain images it shouldn't. Help please.

    Posted: 21 Mar 2021 10:35 PM PDT

    I'm trying to write a program that sorts out my GoogleTakeout photos into different directories based on a file structure i've extracted from a corrupted SD card from my phone. I have only recently started learning Python and as life decided to corrupt my SD card with all my organised images on it, I decided to make this into a practical learning exercise for Python! However I cannot for the life of me find my mistake in the code.

    Essentially i've got a "Folder ALL" which contains all my photos and i've got various csv files which list the names of files found in Folder All. I want to move images in Folder ALL to Folder Alpha based on list found in Alpha.csv, Beta.csv and so on.

    I expect the following two scenarios in my code;

    1. There is an image reference in my csv files list which isn't found in Folder ALL.
    2. There are images in Folder ALL which isn't present in any of my csv files list, but the way the code is written, these images should remain in Folder ALL after running the code.

    I've tried to use the "try: except" function to pass the above expected issues. I want to log these issues into a txt file as well so I know what's what.

    However for some reason, my code just stops running on the 6th of 10th folder. What's more, when I check in the folder my program has run through, whilst there are some images, it is incomplete. I can manually randomly check for an image name in my .csv list and look into the Folder ALL and find the image but for some reason my program hasn't copied it over.

    Here's my code below:

    import shutil,os from csv import reader with open("C:\Local\Gphotos\Folder_List.csv", "r") as Folder_list: csv_reader = reader(Folder_list) Fldr_list = list(csv_reader).pop(0) # print(Fldr_list) prefix = "C:\Local\Gphotos\Directories\\" prefix2 = "C:\Local\Gphotos\PyOutput\\" prefix3 = "C:\Local\Gphotos\GOutput\\" suffix = ".csv" for x in Fldr_list: # print(prefix+str([x].pop(0))+suffix) with open(prefix + str([x].pop(0)) + suffix, "r") as indi_list: csv_reader = reader(indi_list) File_list = list(csv_reader).pop(0) # print(File_list) dest_folder = prefix2 + str([x].pop(0)) + "\\" # print(dest_folder) try: for f in File_list: shutil.move(prefix3 + str([f].pop(0)), dest_folder) print(prefix3 + str([f].pop(0))) print(dest_folder) print() except Exception as e: logf = open ("Error2.log","a") logf.write("An Image not found error %s\n" %e) logf.close() print("Error - Image not found "+f) pass 

    Here's the last part of my output on Mu.1.1.0.alpha2:

    .... C:\Local\Gphotos\GOutput\20200229_140916.jpg C:\Local\Gphotos\PyOutput\Folder Charlie\ C:\Local\Gphotos\GOutput\20200228_205734.jpg C:\Local\Gphotos\PyOutput\Folder Charlie\ Error - Image not found IMG-20190508-WA0001.jpg Error - Image not found IMG_20170817_093725.jpg Error - Image not found IMG-20190615-WA0000.jpg Error - Image not found 17258440.png >>> 

    Here's my error log:

    An Image not found error [Errno 2] No such file or directory: 'C:\\Local\\Gphotos\\GOutput\\IMG-20190508-WA0001.jpg' An Image not found error [Errno 2] No such file or directory: 'C:\\Local\\Gphotos\\GOutput\\IMG_20170817_093725.jpg' An Image not found error [Errno 2] No such file or directory: 'C:\\Local\\Gphotos\\GOutput\\IMG-20190615-WA0000.jpg' An Image not found error [Errno 2] No such file or directory: 'C:\\Local\\Gphotos\\GOutput\\17258440.png' 
    submitted by /u/psychomantis11
    [link] [comments]

    Help with a Binary Search problem

    Posted: 21 Mar 2021 06:38 PM PDT

    This is a binary search problem mixed with greedy.

    My solution binary searches on the number of soldiers to bring. I then select the weakest soldier. I then find the farthest trap that can kill the weakest soldier. It takes 2 * farthest + n. + 1 seconds to do this. I then return if this is under the game time limit.However, my program is wrong on test case 4.

    http://codeforces.com/problemset/problem/1260/D

    Here is my code

    struct Trap { int l, r, d; }; int m, n, k, t; int a[INF]; Trap lrd[INF]; bool ok(int soldiers) { int weakest = a[soldiers - 1]; int farthest = 0; FOR(i, 0, k) { if (lrd[i].d > weakest) { farthest = max(farthest, lrd[i].r); } } int time = 2 * farthest + n + 1; return time <= t; } int main() { ios_base::sync_with_stdio(false); cin.tie(0), cout.tie(0); // ifstream fin(".in"); // ofstream fout(".out"); cin >> m >> n >> k >> t; FOR(i, 0, m) { cin >> a[i]; } FOR(i, 0, k) { cin >> lrd[i].l >> lrd[i].r >> lrd[i].d; } sort(a, a + m); reverse(a, a + m); int ans = 0; int left = 1, right = m; while (left <= right) { int middle = (left + right) / 2; if (ok(middle)) { ans = middle; left = middle + 1; } else { right = middle - 1; } } cout << ans << endl; return 0; } 

    Any help would be greatly appreciated :)

    submitted by /u/Confidence-Diligent
    [link] [comments]

    Why cant i parse excel web??

    Posted: 21 Mar 2021 06:26 PM PDT

    Hello i am trying to return the div tags from Excel web. However i can only seem to return the title and nothing else. Inside the inspector there are many many div tags yet i just get an empty list...

    Here is the code:

    from bs4 import BeautifulSoup as bs import requests from selenium import webdriver import time import cssutils url = 'https://onedrive.live.com/edit.aspx?action=editnew&resid=B49E87A49F3D50BA!113&ithint=file%2cxlsx&action=editnew&wdNewAndOpenCt=1615591580425&wdPreviousSession=a47460e3-20ca-496b-b4aa-480ac769459d&wdOrigin=OFFICECOM-WEB.START.NEW' r = requests.get(url) soup = bs(r.content, 'lxml') div = soup.find_all('div') print(div) 
    submitted by /u/sirreginaldpoopypot
    [link] [comments]

    DDR Game Input Help

    Posted: 21 Mar 2021 06:15 PM PDT

    https://pastebin.com/hskAwQhr

    I have this piece of code where essentially it is supposed to calculate the score of the player depending on how close they are when hitting a note going sideways (i.e. perfect, good, miss,etc) to the activator. However, it always reads as perfect no matter how off I am or if I miss. I honestly do not know how to calculate the note input on how close to the activator it was when destroyed. Any suggestions?

    submitted by /u/Porygonic-Z
    [link] [comments]

    If am learning from video tutorials, How should I make most out of it?

    Posted: 21 Mar 2021 02:22 PM PDT

    I took a Udemy course on web development. I want to not just watch videos and get stuck in tutorial hell. What should be my approach to get most out of it ?

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

    If you had to to pick between Java and C++, which would you learn?

    Posted: 21 Mar 2021 09:50 PM PDT

    I've become interested in learning some IoT development and these are the 2 languages I see pop up over & over with that sphere. I did a little bit with Django and really enjoyed working with databases (even though all those database errors/ corruptions still haunt me), so my understanding is that Java seems to be a better choice in case I decide I'd like to switch gears a little bit. What do you think is the more capable language? Which one is more marketable?

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

    How to initialize members in classes.

    Posted: 21 Mar 2021 05:57 PM PDT

    Im working on classes and theyre kind of confusing. Im trying to initialize the members numer and denom in a function but they still arent being initialized. Kind of lost. Some help would be appreciated.

    class Fraction { public: void set(int, int); Fraction addedTo(Fraction fraction); Fraction subtract(Fraction fraction); Fraction multipliedBy(Fraction fraction); Fraction dividedBy(Fraction fraction); bool isEqualTo(Fraction fraction); void print(); private: int numer; int denom; }; void Fraction::set(int n, int d) { numer = 0; denom = 0; } 
    submitted by /u/HousePappas
    [link] [comments]

    How does packaging a solution with a local database work?

    Posted: 21 Mar 2021 09:41 PM PDT

    After so much searching, I really feel like this might just be a really stupid/basic question and I've never had to do this. I just have not been able to find an answer online.

    I'm needing to package up my solution and pass it on. The problem is the database is a local one and the credentials to the server on my local box is obviously not going to be the same as the person who receives the package. How does this work?

    I've seen some solution packages have the .mdf and .ldf files in the App_Data folder, but what about the connection strings? Do I leave everything blank and let them enter the needed information?

    The idea is I pass a .zip file with my solution and files in it, so they can open the solution and run it. I'm just not sure how to also get them the database. Maybe all it is, is just passing the script that they run on their local machine and edit the connection strings themselves?

    Assuming a few things: They have Visual Studio 2019 to run it.

    They have a database server of some kind (likely Microsoft Sql Server).

    I want to assume they are looking for the least amount of setup as possible (i.e. I'm moving my solution to another PC and need to get the database running locally and don't want to have to run scripts; is that possible?).

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

    No comments:

    Post a Comment