• Breaking News

    Sunday, June 13, 2021

    Is it normal to be regularly checking back on previous projects to remember how to do things? learn programming

    Is it normal to be regularly checking back on previous projects to remember how to do things? learn programming


    Is it normal to be regularly checking back on previous projects to remember how to do things?

    Posted: 13 Jun 2021 08:34 AM PDT

    I've started trying to learn how to code, and while I'm doing pretty well understanding the concepts, I find myself regularly checking back on previous projects to see how to do things.

    For example, I recently made a checkerboard using Python, html, and CSS where the url input could change the size of the board and colors of spaces. And several times I felt stumped on syntax and have to go back and look at previous ways I implemented similar code and rework it to fit.

    Is this pretty normal among developers or should I really focus on memorizing code?

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

    Do you memorize code ?

    Posted: 13 Jun 2021 04:00 AM PDT

    Hello , i am a relatively new programmer but having problems remembering syntax. However, when given the syntax i easily understand the concept and the function behind it. Is this the ideal approach ? should i focus on the concept and function rather then memorizing the syntax ?

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

    Basic CS for a full-stack developer without any math background.

    Posted: 13 Jun 2021 05:18 AM PDT

    Hello all, I hope you are doing great!

    I started my journey as a developer, and I want to take a 6 month learning "vacation" to improve my developing skills and learn only the CS concepts that are necessary to write a solid application.

    My goal is simple - I want to be able to write a software, a product, just like a "startup".
    I am not necessarily want to start a "startup", but I want to be able to have not only the technical skills and the languages (HTML,css,JS,nodeJS,etc), but also the CS background.

    So my question is - what are the core CS fundamentals that are going help me to create a better product?
    (for example, SAAS like Wix or webflow).

    I have no math background, but I am fine with learning the basic and advanced from there.
    I do want to note - I want to focus on the core, I only take 6 months to focus on the core of CS.
    A lot of people recommend this - https://teachyourselfcs.com/
    But I want help to distinguish what is actually use day to day, what used more commonly - and what is just "nice to have" stuff.

    I want to focus learning what is basically the most important stuff, the stuff that actually being used every day and make a change.
    And this is why I need you!

    Thanks, folks!

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

    Having hard making a flowchart and pseudo code of this scenario. Any suggestions on how to approach this?

    Posted: 13 Jun 2021 07:36 AM PDT

    1. You were given five cubes and you were tasked by your Physics course instructor to determine the one cube that weighs greater than the rest. Four of the cubes have the same weight. You are only given to chances to weigh a set of cubes. After the second weigh, you need to accurately discern the one cube that weighs more.

    [Hint]

    o To weigh the five cubes only up to two times to determine which one weighs more, you will need to weigh for the 1st round four cubes by twos and leave one cube aside.

    o If the two parts of weighed cubes are equal, then the cube we need to determine is the fifth cube – the one we set aside.

    o If not, then one of the four cubes we weighed is the one we need. To do this, we will disregard the pair that weighs lesser and focus on the pair that weighs more. We will weigh that pair for our 2nd round, and the cube that weighs more than the other is the cube that we need.

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

    How might you go about coding a random world map generator?

    Posted: 13 Jun 2021 11:08 AM PDT

    I would like to make a basic 2D map generator, like a fantasy map. Something that will essentially create random noise and then maybe randomly assign points of interest (that I can refine later) like cities and such on land tiles. My first thought was that I'll need to make a grid of points, assigns weights, and use marching squares and then separate the shapes as land/water/etc. However, I've only used Perlin noise for marching squares and in my experience it tends to end up in weird looking archipelagos or just a single continent depending on the allowance. Is there a better noise function I could use or is there a more optimal way I should try first?

    submitted by /u/Pleasant-String6715
    [link] [comments]

    Do online code-compilers use my internet to download packages?

    Posted: 13 Jun 2021 06:53 AM PDT

    I apologize if this sounds like a stupid question. I come from a place with very bad internet connection but I have to work on a project which requires tensorflow or pytorch both of which I know has very large size with respect to what my internet can handle. So if I use something like repl.it and import the packages there, will they still use my internet to download the packages?

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

    [Ruby] What is the convention for returns in Ruby?

    Posted: 13 Jun 2021 11:31 AM PDT

    I come from Java and Python, it's second nature to use return. But in Ruby this isn't required. And from what I've seen, it's sometimes even discouraged because then the code isn't "clean" or "elegant", which I totally disagree with. Using return when you want to return is unelegant? that's dumb

    what's the convention for this sort of thing? It honestly feels sort of silly to just omit the word return

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

    Feasibility of a credit card/bank account dashboard?

    Posted: 13 Jun 2021 11:05 AM PDT

    I would like to build a platform that displays all of my credit cards and their balances (I think the app Mint pretty much does this?) in one platform and offers the option to pay these balances off. It seems like it would be challenging/filled with red tape to go through the process of having access to the account details to so many different vendors?

    I'd also like to create my own "credit card" I could submit purchases through to act as middleware before going through one of my cards like it normally would.

    Having never worked with purchasing or how credit cards work behind the scenes I have no idea how challenging this could be as an individual. Anyone's thoughts would be appreciated!

    The stack I was going to go with would probably be the MEAN stack unless there is something that a specific language would help me accomplish towards my goal with this credit card platform.

    Edit: this platform would really just be for me to test out an idea I have and if it worked out at all I do think others would find it useful.

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

    Unable to get CORS to work with a Vue.js app and a socket.io server

    Posted: 13 Jun 2021 08:51 AM PDT

    I have a Vue.js front end app on a S3 bucket and am trying to get it to connect to my backend socket.io server. My front end runs on "dash.mydomain.com" and my socket.io server runs on "socket.mydomain.com"

    I am hoping someone can take a look at the below and help me figure out why the front end is giving me the error message below. It all seems to match up to me. Do note that I have tried "socket.mydomain.com" as "VUE_APP_FE_URL" before with no luck there and it giving me the same error message

    Current code snippet

    import io from 'socket.io-client' const socket = io.connect(process.env.VUE_APP_FE_URL) 

    In my .env file

    VUE_APP_FE_URL=https://dash.mydomain.com 

    Error message

    Access to XMLHttpRequest at 'https://socket.mydomain.com/socket.io/?EIO=4&transport=polling&t=Ne63R2m' from origin 'https://dash.mydomain.ca' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. 

    Backend app.js

    const io = require("socket.io")(server, { cors: { origin: process.env.CORS_SOCKET, }, adapter: require("socket.io-redis")({ pubClient: redisClient, subClient: redisClient.duplicate(), }), }); 

    env from container

    CORS_SOCKET=https://dash.mydomain.com 
    submitted by /u/jsdfkljdsafdsu980p
    [link] [comments]

    Help! I have no idea what to do after my bachelor's in computer science engg.

    Posted: 13 Jun 2021 08:43 AM PDT

    So for starters, I am a month away from graduating and I have no idea what I've done these four years. I have no idea how to program and to be fair, I really don't think programming is my cup of tea. Is there any other field I can experiment that comes under computer science but is not necessarily too technical? Idk if I'm making any sense. Any advice would help.

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

    Is there a framework that lets you run line by line in Assembly showing you important data?

    Posted: 13 Jun 2021 10:08 AM PDT

    Hey there. I remember I saw a glimpse of a framework like that a few days ago. The guy was coding in assembly and had some boxes that showed the state of flags and other things. I might be wrong though.

    I tried looking online but found nothing. Any help?

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

    What are some things that you have done outside programming sessions (studying, creating projects) to help you become a better programmer?

    Posted: 13 Jun 2021 05:59 AM PDT

    And how effective do you think doing this was to improving your programming skills?

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

    Should linked list be avoided unless absolutely necessary?

    Posted: 13 Jun 2021 08:52 AM PDT

    The stuff I've been reading on them lately states that utilizing linked list often times isn't a great idea. If this is true... why?

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

    python error about a column that exists!

    Posted: 13 Jun 2021 11:52 AM PDT

    so I'm new to python and ML. i wanted to indicate a prediction target from my dataframe.

    the target is the "price" column in the data frame(which exists!!)

    but I get so many errors from for example 8764 line which doesn't exist! and the last line of error is KeyError: 'price'

    plz help sigh~

    BTW i have done .dropna(axis=0) for my dataframe too

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

    [Asking Advice] [Beginner] Creating a Simple Inventory System

    Posted: 13 Jun 2021 11:39 AM PDT

    I know there are paid and possibly even free solutions, but I thought that perhaps I could start this as a learner project. Preferably a project that takes a more similar process to that of real software development. Starting with defining the project scope, UML diagrams, ... Not that I am actually knowledgeable in this matter. I know little to nothing.

    I hope someone can put me in the right direction. Just brief (chronological) instructions that I could use to look more into would be greatly appreciated. Anything more is absolutely welcome!

    Objective: An inventory system used exclusively for keeping track of construction supplies in a work van.

    Issue: Loss of valuable time due to a halt in productivity, caused by insufficient quantities of essential construction supplies on site. Inability to continue work related duties until the required items are in presence. It's the boss's responsibility as the sole driver and stock replenisher of the vehicle on each work day. Boss's return to the warehouse causes valuable time to be lost.

    Methods of establishing existing stock: Eyesight and an infrequently used, often overlooked and not taken seriously tiny whiteboard in the loading compartment, on the wall of the driver's cabin, in clear view next to the side doors.

    No adequate system is in use for managing stock in the vehicle. A simple digital inventory system could alleviate some issues.

    No fancy pansy software. Don't need a whole ERP system. There are no orders, sales, suppliers or analytics.

    Requirements
    Easily accessible by (iOS) phone as it's the main device for input and output. (Web Based?)
    Accessible through login system (Security & Complexity?)
    Database
    GUI
    Employee: Add, Remove, Edit
    Product: Add, Remove, Edit, Mark
    Ability to create lists with products of different categories

    Product
    ID (unique identifier)
    Category (water, gas, electrical, ...)
    Name
    Quantity

    Employee
    ID (unique identifier)
    First name
    Last name
    Email
    Password

    Questions
    Where and how do I start?
    What programming languages and tools are recommended? (Very little familiarity with C# from a few classes years ago)
    Too much and severely complex for beginner level?
    If that's the case, how about something simpler. Inventory system and just products

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

    Knowing JS to move to React

    Posted: 13 Jun 2021 11:36 AM PDT

    How do you know if you are good with Javascript to move onto building react apps. I've been studying html, CSS and JS for a month now but I can't start a project from scratch. Does that mean I don't know as much as I think or is it normal to just go on youtube and Google to search up how to add features you want? It's abit of a dilemma

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

    Writing an Algorithm - help needed [urgent]

    Posted: 13 Jun 2021 11:22 AM PDT

    Hello!

    I am working on a problem that is asking me to write an algorithm with the following specifics.

    There is a combination locking mechanism that has four wheels, each marked with 5 digits (0…4), as shown here https://imgur.com/a/LToAHS2

    We are given the current 4-digit combination on the lock (which is not correct), the desired combination (is correct), and a list of n forbidden combinations.

    We have to create an algorithm with these inputs that outputs the count of the fewest steps required to rotate the wheels to get the correct combination without ever landing on a forbidden combination.

    We also have to use general variables for the given inputs. For example, the number of wheels could be w, the number of consecutive digits on the wheels, d and so on.

    Knowing the running time would also be nice.

    Here's an example if the above was a bit confusing.

    Example: Starting combination 0424, desired combination 1410, forbidden combinations: 1420, 4300, 1242. Required turns = 3. The turns would be wheel 1 left to 1424, wheel 3 right to 1414, wheel 4 left to 1410.

    Note: You could NOT move from 0424 to 1424 to 1420 to 1410 because you would have to stop at 1420 which is a forbidden combination.

    I'm not exactly sure if this is needed, but we've been learning about graphs (adjacency matrix / list), BFS and DFS if any of those help.

    If anyone has any guidance for how to begin or more that would be incredible :D

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

    solving top 20 ( top k ) sold items in the past hour in python3

    Posted: 13 Jun 2021 11:07 AM PDT

    I am trying to solve a problem in python to get the top items sold within the past hour. The time range can be variable ( Eg: get top sold items in the last 3 hours etc ). My dictionary looks something like this:

    dic["item_id_3"] = [timestamp1, timestamp2, timestamp5]

    dic["item_id_4"] = [timestamp3, timestamp22, timestamp30]

    ...

    I can also add an entry to the dictionary when an item is sold , say curr_timestamp = timestamp32 and we sold item_id_3 at this timestamp, dic now becomes

    dic["item_id_3"] = [timestamp1, timestamp2, timestamp5, timestamp32]

    dic["item_id_4"] = [timestamp3, timestamp22, timestamp30]

    ...

    What is the most efficient way of getting the top items sold by count in the last hour ? My current plan is to maintain a heap but I need to re heapify each time a new item is added and then check if each timestamp is within the last hour for each item - which is very inefficient. I was wondering if there is cleaner way to solve this

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

    Binary numbers and common operations illustrated and animated

    Posted: 13 Jun 2021 11:07 AM PDT

    I wrote an intro to binary numbers with lots of visualizations and animations a few months back and thought it may be helpful to anyone getting started with programming or looking for a deeper understanding of binary numbers (all code samples are in Python): https://csanim.com/tutorials/intro-binary-numbers-bitwise-operations-ultimate-visual-guide

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

    Online Courses With Scheduled Class Meeting Times

    Posted: 13 Jun 2021 11:03 AM PDT

    I think when it comes to learning anything or picking up a skill, consistency is key. The problem that I have with learning to program is finding a consistent schedule to actually sit down and learn.

    Do any of you know if there is a thread for courses with scheduled class meeting times? (Something akin to an online classroom.) Hopefully one in which i could collaborate with other students.

    I've taken a look at college courses but in my experience I've found it difficult to gain any real world / real scenario programming skills, regardless of what my grades say I know.

    I'm aiming to learn python but any info would be greatly appreciated

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

    Is Python easier than C#

    Posted: 13 Jun 2021 10:55 AM PDT

    I have been learning CS for 2 months and I suck

    Is python easier?

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

    No comments:

    Post a Comment