• Breaking News

    Thursday, July 4, 2019

    Resume tips from an ex-google tech lead Ask Programming

    Resume tips from an ex-google tech lead Ask Programming


    Resume tips from an ex-google tech lead

    Posted: 04 Jul 2019 10:46 AM PDT

    I've reviewed probably 100+ resumes in my career at Google. I no longer work there, but I wanted to share some of my top tips for those of you lucky enough to find this post. There's no catch, enjoy and learn: https://drive.google.com/file/d/10b9NZDhPbUOW_C7108IKe9ev6Ed2UG7F/view Cheers, TechLead

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

    What question to ask a recruiter/hiring manager during the job interview?

    Posted: 04 Jul 2019 09:00 AM PDT

    Do you usually ask questions during your job interviews?

    I never did so, until I realized that it gives me extra information about the company and helps me express my interest in the vacancy.

    Here is a nice list of sample questions for tech specialists to ask during the interview.

    Do you ask these or other questions on your job interviews? How do the interviewers react to it?

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

    What Design Patterns are you using?

    Posted: 04 Jul 2019 10:08 PM PDT

    Hey AskProgramming,

    I'm curious! What Object Oriented Design Patterns are you most commonly using?

    Bonus!

    I will try to guess what kind of developer you are from said patterns (Web, Mobile, Desktop)

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

    Is there a way to recursively check if a string is a palindrome that excludes single characters and empty strings?

    Posted: 04 Jul 2019 06:22 PM PDT

    I figured out of to recursively check for palindromes, but I can't see a way to select for strings longer than length 1. Of course I could just select outside of the method, but I wonder if there is a better way?

    def palindrome?(string) string.length <= 1 || string[0] == string[-1] && palindrome?(string[1..-2]) end 
    submitted by /u/shoegazefan
    [link] [comments]

    Help determining fair price for a project

    Posted: 04 Jul 2019 06:03 PM PDT

    I need to hire a developer to write a script for me but I don't know how much I should pay. What do you think would be a fair price for the following project?

    I need a Google App Script to score and match people based on the results of a personality test in Google Sheets.

    Each row of the Google Sheet contains a unique user and their survey results. I want the script to:

    1. Iterate through each row and compare it against every other row
    2. Score each comparison based on the set criteria of the personality test (e.g. the users share one or more types of humor in common)
    3. Create a new sheet and log the matches and scores for each user (see example below).

    User First Match Name First Match Score
    James Kevin 80%
    submitted by /u/AlmostEloquent
    [link] [comments]

    I have a question from Structure and Interpretation of Computer Programs book

    Posted: 04 Jul 2019 12:50 PM PDT

    So I heard Robert Martin AKA Uncle Bob talk about this book and how they establish principles about how programs should be made so they can be easy to read.

    As I am reading it (2nd edition), I also solve exercises given in book.

    I got stuck on a problem where it gives a function definition in algebraic form and ask to create a recursive as well as iterative approach for this problem, I was able to create recursive solution since its quite easy, maybe because we are taught recursion and give it importance, but can't quite come up with iterative solution.

    If you have read this book or maybe just want to help me solve this solution. Here it is.

    f(n) such that

    • n if n <= 3
    • f(n - 1) + 2f(n - 2) + 3f(n - 3)

    It would be good if you have already solved it and can give some hints to solve this as me and my friend took some time and can't solve it.

    Thanks

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

    C# Restricting type parameter base class through polymorphis

    Posted: 04 Jul 2019 07:05 PM PDT

    This is my inheritence chain. There are two of them. One for animals and the other one for animal behaviour.

    |-AnimalBaseClass

    |-- Reptile

    |----- Crocodile

    |-----Snake

    |-

    |-- Mammals

    |----- Apes

    |----- Felines

    |-AnimalBehaviourBaseClass

    |--- ReptileBehaviour

    |--- MammalBehaviour

    AnimalBaseClass has a method called SetCurrentBehaviour with a type parameter.

    I would want to have a AnimalBehaviourBaseClass that has methods that all behaviours have in common. This is inherited by both ReptileBehaviour and MammalBehaviour classes.

    The classes inheriting from AnimalBaseClass should only be able to set behaviours of its animal class. So Crocodile and snake can only accept ReptileBehaviour and classes derived from it. And Apes and Felines can only accept MammalBehaviour and classes deriving from it.

    But the actual SetCurrentBehaviour method is the same for all animals. Is it somehow possibly to through polymorphism change the type requirement so that this is enforced? In the AnimalBaseClass it should the SetCurrentBehaviour

    in Reptile it should be SetCurrentBehaviour and in Mammals SetCurrentBehaviour

    Of cours i could add methods to Reptile and Mammal classes but then the original SetCurrentBehaviour från AnimalBaseClass would still be there.

    Maybe i am not thinking about this correctly according to OOP and C#?

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

    Could you please recommend tutorials that can help me transfer my simple C++ game to HTML?

    Posted: 04 Jul 2019 02:56 AM PDT

    I created a number guessing game based on the one mentioned in freecodecamp tutorials (but also added features like random number generator, select the difficulty, hints whether to go lower or higher)

    Now I want to give it a web interface where the system will take the user's input and give output accordingly. I know basic HTML, but no CSS or no JS. What should I do?

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

    How do you evaluate your knowledge of programming languages in CVs ?

    Posted: 04 Jul 2019 01:18 PM PDT

    For example what do you usually use when describing a language you only used for college projects?

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

    Need help with a sweepline algorithm

    Posted: 04 Jul 2019 12:22 PM PDT

    I need to write a sweepline algorithm for school using a splay tree and a treemap as data structures.

    It is limited to finding intercepting lines that are either horizontal or vertical. I keep running into a timeout error.

    This is what I have so far:

    private static void planeSweep() {
    SplayTree tree = new SplayTree(null);
    map.descendingMap();
    for (Map.Entry<Float, Line> entry : map.entrySet()) {
    Line line = entry.getValue();
    float y = entry.getKey();
    if (line.isVertical() && line.startsAt(y)) {
    tree.insert(line.getKey(), line);
    } else if (line.isVertical() && line.endsAt(y)) {
    tree.delete(line.getKey());
    } else {
    float start = line.getStart().getX();
    float end = line.getEnd().getX();
    float x = start;
    while (x <= end) {
    if (tree.search(x) != null) {
    Line intersected = tree.search(x).getLine();
    Coordinates coordinates = new Coordinates(line.getStart().getX(),
    intersected.getStart().getY());
    String intersect = line.getCh() + " "
    + intersected.getCh() + " # ";
    output.put(intersect, coordinates);
    if (tree.search(x).getRight() != null) {
    x = tree.search(x).getRight().getKey();
    } else {
    x = end + 1;
    }
    }
    }
    }
    }
    }

    If anyone could help it would be great. I need to hand this in by tomorrow and I'm starting to panick.

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

    Is their an algorithm for finding continous blocks of time that stretch from one day to early next morning?

    Posted: 04 Jul 2019 08:30 AM PDT

    This is what I tried initially

     def find_gaps(): """ Assume the bulk of a session's videos are in the correct location but the head or tail may not be 12567 12,567 567, 123 """ for session in db.Session.query.order_by(db.Session.date.asc()): videos = list(session.videos) blocks = list() block = [videos.pop(0)] for video in videos: delta = video.datetime - block[-1].datetime minutes = delta.seconds / 60 print(delta.days, minutes) if minutes > 15: print(video.name, minutes) blocks.append(block) block = [video] else: block.append(video) if block: blocks.append(block) if len(blocks) > 1: print(len(blocks)) 

    I have over a month of record video where the videos are in yyyy_mm_dd_hh_mm_ss format. Generally the bulk of videos are from 1300 to 1700-1900 but sometimes I have a day/session that looks like

    session 20180712 2018_07_12_17_30_00 and run to 2018_07_13_0200 

    Besides above I was thinking of a brute force script that looked for a session ending at 2018_07_23_59_00 and the next day/session starts at 2018_07_00_01_00. From there I would copy the overlap until there was a large enough gap (similar to the function above).

    The video files are from a dash cam that creates a new video every minute and they're either recordings of me as a Lyft driver or more important is an annual trip I make from Denver, Colorado to Anchorage, Alaska.

    I intended to make a time lapse of each "day" along with an animated gif tracing my path. Unfortunately the Lyft data is absolute massive @ 3 terabytes @ 80Mb per video and it would take a long time to manually sort these.

    The GPS data isn't an issue and its fairly immaculate because I am using GNS with GLONASS, Galileo, and GPS to pin point me down to a meter accuracy (far beyond good enough). I've converted and started graphing the position data as UTM (meters) to track distance/average speed per day. If I can't automatically sort the data, the graphs would show obvious breaks (/ in one day / and then /_/\ spikes in the next day).

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

    Blockchain topic: I think SmartSwap overcomes AtomicSwaps downfalls, thoughts?

    Posted: 04 Jul 2019 06:47 AM PDT

    SmartSwap is a P2P trading technology built on the Ethereum network. SmartSwap is 100% decentralized, eliminates the need for trust between the parties, overcomes some of the Atomic Swap disadvantages, and is a face value exchange. It's secure, easy to implement, protects the user against losses in case of currency rate changes and it doesn't require blockchains involvement to have code abilities and the same Hash algorithm (like Atomic Swap does). Using SmartSwap, a user is able to exchange crypto-for-crypto without the risk, hassle or expense or volatility that exists on other cryptocurrency exchanges.

    What I consider to be the benefits of the Smart Swap functionality

    When a user needs to change one crypto for another, they must have an account on an exchange. In order to make their exchange, they must accept the best price they can find from other traders. Further, if a coin changes in value, the exchange does not adjust the trade to accommodate this; users are constantly exposed to a risk of losing in trades because of a market shift. Currently, users must watch the market to make sure that their trades are not impacted by fluctuations.

    SmartSwap improves the way in which exchanges are carried out. Currently, exchanges work in the following way:

    • At the time of creating the order the trade is BTC is valued at $4,000 and will trade for 30 ETH (~$133 each).
    • If the ETH drop value by 5% user will receive 30 ETH, but the value is now $3,800 (~$126 each) - user lost $200.
    • Or If BTC increases in value by 5% (to $4,200) the user loses this gain in the trade as they will still only receive 30 ETH (~$133 each), the increase in value is not applied at time of trade - user has lost $200 in value in the swap.

    Exchanges on the Element zero SmartSwap, example; Trade 1 BTC to ETH:

    • At the time of creating the order the trade is BTC is valued at $4,000 and will trade for same value, $4,000 in ETH
    • If ETH drops in value by 5%, the user will receive 31.578 ETH ($4,000) - same face value equal to $4,000 of BTC
    • If BTC increased value +5% user will end up with 31.5 ETH (equal to $4,000) - same face value equal to $4,000

    Using SmartSwap, users trade will always be exact value:value match. If the prices of either coin fluctuate by the time the trade occurs, users will still receive the exact value of their coin in the traded coin.

    Reference

    Element Zero Smart Swap Testnet (n.d) Retrieved from https://www.elementzero.network/ezo-beta/

    Element Zero White Paper Update.pdf. (n.d.). Retrieved from https://drive.google.com/file/d/1StAHmFU-kGnCQ7YLUKR5S9HssjYPyz2t/view

    Smart Swap: Face Value P2P With Element Zero CTO. (2019, May 08). Retrieved fromhttps://blokt.com/guides/blockchain-guides/smart-swap-face-value-p2p-with-element-zero-cto

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

    JavaScript: Best Way to Create Re-usuable Functions That Rely on Global Variables

    Posted: 04 Jul 2019 01:33 AM PDT

    I'm trying to build a web application where a certain dynamic "module" will show up several times in the application, but with different content.

    I would like to simply write one set of code, which consists of several functions and variables, one time, and then somehow group them together (perhaps in a function or object). I would then call the function/object for each instance the module needs to appear on the page.

    However, the code I am using currently relies on global variables. For instance there is a scroll function that updates a global variable with the current scroll position, every time the user scrolls.

    Is there a way I can re-use this code for multiple instances, without having to create separate global variables for each instance?

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

    Is Competitive Programming worth it?

    Posted: 03 Jul 2019 11:27 PM PDT

    So I've been practicing Competitive programming for a while now on the codeforces site . And honestly im having fun solving these problems . But i prefer practical over fun . So should i continue or find something else to do like learning AI or machine learning . Iam a third year CS student .

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

    No comments:

    Post a Comment