• Breaking News

    Sunday, July 19, 2020

    Made my first MERN full stack e-commerce app after 7 months of learning learn programming

    Made my first MERN full stack e-commerce app after 7 months of learning learn programming


    Made my first MERN full stack e-commerce app after 7 months of learning

    Posted: 19 Jul 2020 08:04 PM PDT

    TLDR; i studied MERN full stack from The Odin Project for 6 months and made my first app, link for repo and demo at the end.

    Before i start doing anything i was so confused, what to start, where to start, etc..., i wasted enough time comparing and reading "the difference between "bla" and "bla bla bla".

    I never had interest in web dev, but after trying android dev for one months i didn't like, then i came by This thread which was a treasure for me and i read the comments and asked some people in the field then i started with "The Odin Project" which i think it's really amazing and got me through a lot.

    and i finished it (MERN full stack) in like 6 months (not really committed)

    what i learned through all this time:

    - Don't waste time comparing between languages or technologies, just start away

    - You will learn more by doing not only reading or watching videos

    - stackoverflow or (google) is your best friend

    - you will never stop learning, cause that field (CS) is really huge like omg

    - i always used existing libraries cause i don't wanna reinvent the wheel

    - literally i found library for everything i wanted

    - I really know nothing lol

    I made this app which I'm really happy about as a newbie started from 0

    i will be glad if you take a look and evaluate my work (just ignore the ugly design lol)

    and give me a review about my code.

    ***Should i start looking for a job now or just wait and finish other big projects?

    and This is the Github Repo and this is the LIVE demo

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

    How do I become a better problem solver?

    Posted: 19 Jul 2020 02:38 PM PDT

    So in my summer course, I'm really struggling in terms of solving problems. It often takes me hours just to complete one or two problems on the labs/hw/projects. Our exams are entirely fill in the blank coding problems and given that there's a time cap on each problem I absolutely failed my midterm. I feel like I have a good comprehension of the material I just feel like my problem-solving skills/creatvity is extremely lacking. I'm starting to think maybe I'm not smart enough to be a CS major. Here's an example of the types of problems I'm talking about (#5 and onwards) https://inst.eecs.berkeley.edu/~cs61a/su18/assets/pdfs/61a-su18-mt.pdf

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

    Important concepts taught at College/University, but not at Coding bootcamps?

    Posted: 19 Jul 2020 02:06 AM PDT

    I'm a graduate of a coding bootcamp, and have been working in industry for around 7-8 months.

    I feel like things are going pretty well, but I know there are definitely components of software engineering, and CS fundamentals that aren't taught in bootcamps.

    I'm wanting to fill in the gaps of missed knowledge, and was wondering how I should be going about this?

    I know there's resources like MIT OpenCourseWare where you can watch lectures, and take subjects from previous years, but I wouldn't exactly know the subjects which would be most beneficial?

    Any thoughts/other resources are much appreciated :)

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

    Book for beginners of C programming language

    Posted: 19 Jul 2020 10:36 PM PDT

    I want to know that, which book would be great for beginners to learn C programming language. A very little or no programming experience.

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

    Next Steps after APCS A

    Posted: 19 Jul 2020 08:46 PM PDT

    Hi guys, I'm curious as to what courses to take after apcsa. School doesn't offer principles and cant self study for that since it needs a portfolio so I'm not sure where to go.

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

    Dash/Plotly and external CSS question

    Posted: 19 Jul 2020 06:16 PM PDT

    Hi. I'm working on building a Dash/Plotly App and was wondering if anyone could tell me what I'm doing wrong here. I'm not new to Python, but I'm new to web development and CSS. I went online to a CSS generator and created a custom toggle switch and saved the .css file in a directory called "assets" within my main app directory.

    I tried reading the plotly documentation on linking external CSS, but I'm clearly not able to understand what the documentation is saying.

    Here is the code:

    import dash import dash_core_components as dcc import dash_html_components as html import dash_bootstrap_components as dbc from dash.dependencies import Output, Input, State import plotly import plotly.graph_objs as go #css_files = {'href': '/assets/toggle_switch.css', 'rel': 'stylesheet'} css_files = '/assets/toggle_switch.css' app = dash.Dash(__name__, external_stylesheets=[dbc.themes.DARKLY, css_files]) switches = dbc.Checklist( id="switches-input", className='onoffswitch-checkbox:checked + onoffswitch-label onoffswitch-switch' ) app.layout = dbc.Container( fluid=True, children=[ switches ] ) if __name__ == '__main__': app.run_server(debug=True) 

    The stylesheet looks like this:

    .onoffswitch { position: relative; width: 97px; -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none; } .onoffswitch-checkbox { position: absolute; opacity: 0; pointer-events: none; } .onoffswitch-label { display: block; overflow: hidden; cursor: pointer; border: 2px solid #999999; border-radius: 20px; } .onoffswitch-inner { display: block; width: 200%; margin-left: -100%; transition: margin 0.3s ease-in 0s; } .onoffswitch-inner:before, .onoffswitch-inner:after { display: block; float: left; width: 50%; height: 44px; padding: 0; line-height: 44px; font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold; box-sizing: border-box; } .onoffswitch-inner:before { content: "ON"; padding-left: 10px; background-color: #34A7C1; color: #FFFFFF; } .onoffswitch-inner:after { content: "OFF"; padding-right: 10px; background-color: #EEEEEE; color: #999999; text-align: right; } .onoffswitch-switch { display: block; width: 46px; margin: -1px; background: #FFFFFF; position: absolute; top: 0; bottom: 0; right: 49px; border: 2px solid #999999; border-radius: 20px; transition: all 0.3s ease-in 0s; } .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner { margin-left: 0; } .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch { right: 0px; } 

    What am I doing wrong in my code? I thought you were supposed to add "className" to the property of the component, and then pass the CSS class name to it, and it should automatically pull the styling information to the object, but it's not working as intended. I can definitely see a change in the web page, but it's completely jacked up with the margins, sizing, and pretty much everything else.

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

    Getting Better At Deconstructing/Planning a Project

    Posted: 19 Jul 2020 03:50 PM PDT

    I posted this in /r/learnjavascript but I figured I'd try here because it's not just an exclusively JS issue.

    Since the lockdown started, I've been going through Colt Steele's web dev bootcamp on Udemy in an effort to learn full stack web development. I'm currently on the final capstone project and while I have a few other courses/learnings planned to do after (Stephen Grider's React course is one I'm especially looking forward to), I want to actually put the skills I learned in Colt's course to good use.

    However, whenever I try and build something, even something simple like a Pomodoro clock, I always get frustrated and start to stumble at the start. I know that the key to building something is breaking it down into smaller more manageable components. And in fact, doing the Colour Guessing Game in Colt's course is a great example, where Colt breaks down each piece into a nice small little mini task. In fact, I could nearly complete that section without watching Colt because he broke it down small enough that I was like, "Oh yeah that's how you would do that".

    I know the material is in my head and my researching is good, but actually breaking a project down into small pieces of work is where I always fail. I'll add in some comments into my code or use a text file with some bullet points but it's always something way too vague like:

    Build HTML structure

    Declare variables

    Add logic

    ....profit?

    This kinda turned a bit long winded but basically, how do I get better at breaking a project down into bite size pieces that I know I can definitely do. One of the things I want to build is a simple app using Spotify's API to tell me what albums are being released on Spotify this week (I have no idea if this is possible yet, I've only briefly skimmed their documentation). I know that should be a simple project and I know how to make get requests with Express and how to take that data and send it to a webpage, but when it comes to actually breaking the work down into manageable quantities, I just struggle.

    TL;DR: How do you break a large project goal down into smaller more manageable tasks that you can accomplish, rather than just "building something"?

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

    Tattoos in programming jobs

    Posted: 19 Jul 2020 01:43 PM PDT

    Hi, wanted to know if it's common for people with tattoos being declined programming jobs, especially with lots of arm tattoos. Thanks

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

    Am I ready for Unity?

    Posted: 19 Jul 2020 09:26 PM PDT

    I started learning C# basics 2-3 weeks ago and I learned :

    Data Types, conditions,loops, variables, syntax, clssses , objects, methods/ functions.

    Would you guys say I'm ready for unity tutorials now?

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

    Socket.io communication between native android app and an electron desktop app

    Posted: 19 Jul 2020 11:44 PM PDT

    I made an electron desktop app that allows me to monitor my PC stats (such as CPU usage, memory usage etc). It uses a nodejs module to collect these stats and I am using a setInterval function that reads my PC stats every 2 seconds and emits the data via socket.io to the node.js backend. My goal is to remotely monitor those stats on an android app that I am making using android studio and java. I already successfully established a connection between my desktop app and my node.js backend using socket.io. However, I am not sure where to go from here.

    My understanding is that socket.io only allows communication between one type of app and the server (like the electron app and my node.js backend), not among several different apps (like an android app, electron app and the server) and I have to establish a separate connection between my android app and the server. Is my understanding correct? In that case what would be the next logical step?

    I want the electron app to only emit data when my android app switches to the monitor screen, and allow my android app to monitor the data in real-time. How I do that? I am extremely stuck at this stage. Should I use a database to store the monitoring data and emit them to the android app? Or should I have a variable that when my android app switches to the monitoring screen, it emits an event which in turn sets a flag in my nodejs backend to be true which in turn notifies the electron app to start emitting data? Or something else?

    Thanks

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

    How come I can't package this repo's Electron App into an exe?

    Posted: 19 Jul 2020 11:38 PM PDT

    https://github.com/KeziahMoselle/tempus

    I found a cool repo (above link) recently with an electron app for a Pomodoro Timer. I got it to run just fine when running it through the cli, but I wanted to build it into an exe. I tried the command mentioned:

    yarn build:electron 

    but when I open the unpacked exe on my Windows 10 machine, I get errors like:

    https://user-images.githubusercontent.com/8894156/87900803-3d96d400-ca0a-11ea-8027-07b9b1307190.png

    Judging by the error, it seems like it might be a pathing issue or the app having trouble finding the npm modules perhaps. Any advice on how I can get a useable exe of that app working would be very appreciated!

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

    Can anyone learn advanced programming? (ie: neural networks and AI)

    Posted: 19 Jul 2020 05:24 PM PDT

    Hey, is anyone able to go that far in learning programming that they can learn advanced topics such as neural networks and creating an AI to solve problems, or does it take someone who's already an advanced mathematician as well?

    I was looking at a video on how neural networks work and linear algebra was mentioned. I haven't finished high school and I wonder if there's any point aiming in that direction if someone's not exactly especially smart?

    People always say how you don't need to be very smart to learn to code, but does that hold true for more complex topics or are there practices involved in problem solving that require more advanced methods on the human level?

    submitted by /u/69-420-1337
    [link] [comments]

    Applying the Pareto Principle on Learning ReactJS and ASP.net

    Posted: 19 Jul 2020 11:22 PM PDT

    Pareto Principle states that 20% of the causes is the 80% of the effect. Is it possible to apply the Pareto Principle in learning the said languages? If so, what are the 20% of ReactJS and ASP.net that I only need to learn?

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

    Leetcode 564 Closest Palindrome - Why is the brute force time complexity sq_rt(n)?

    Posted: 19 Jul 2020 07:25 PM PDT

    see the brute force solution (approach 1) here: https://leetcode.com/problems/find-the-closest-palindrome/solution/

    Approach 1 says upto 2 * sqrt{n} numbers could be generated in the worst case. I get that it is multiplied by 2 because you are both incrementing and decrementing but how do we know that the closest palindrome is within sqrt{n} distance of the input?

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

    Why is list comprehension so much faster? (Python3)

    Posted: 19 Jul 2020 06:44 PM PDT

    Working through twoSum problem; I've implemented different approaches; and measured execution times. Code below.

    • 1st approach: brute force. Obviously slow, about 1.1 s to execute 3333 searches (and fail, worst-case scenario)
    • 2nd approach: create hash-table with dictionary comprehension, two-pass search to find solution. About 0.00065 s to execute.
    • 3rd approach: hash-table without dictionary comprehension, two-pass search. About 0.0012 s to execute.
    • 4th approach: hang-table without dictionary comprehension, one-pass search. Calculation performed in-situ before storing to dictionary. About 0.0012 s to execute.

    So 4th approach is "supposed" to be substantively faster, but is not. Perhaps average case is faster and worst case is same. But Dictionary Comprehension is 1/2 order of magnitude faster than either supposedly "optimized" solution.

    Why?

    Also, I am not skilled with comprehensions yet; it took me long time to figure out how to write it. But seems to be worth it? I do not like syntax of comprehensions, hard for me to read and debug.

    Is there way to single-pass search for solution within dict comprehension?

    Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1]. 

    import time def twoSum_bf(nums, target): # naive, bruteforce, very slow, 157000% slower than hashtable optimization # O(n^2) numslen = len(nums) for i in range(numslen): for j in range(numslen): if nums[i] + nums[j] == target and i != j: return [i,j] def twoSum_1(nums, target): # optimized to use hash table(dictionary). Two-pass solution with dict comprehension. # O(n) # benchmark numsdict = {nums[i]:i for i in range(len(nums))} #dict comprehension speeds this up substantially for i in numsdict: c = target-i if c in numsdict: return [numsdict[i], numsdict[c]] def twoSum_1_2(nums, target): # optimized to use hash table, two-pass solution without dict comprehension # converted dict comprehension to more standard code, 95% slower than benchmark numsdict = {} for i in range(len(nums)): numsdict.update({nums[i]:i}) for i in numsdict: c = target-i if c in numsdict: return [numsdict[i], numsdict[c]] def twoSum_2(nums, target): # optimized to use hash table, single-pass solution # calculation performed in situ saves time but not as much as list comprehension (71% slower benchmark) numsdict = {} for i in range(len(nums)): c = target - nums[i] if c in numsdict: return [numsdict[c], i] else: numsdict.update({nums[i]: i}) def test(available, target, func): t0=time.time() x = func(available, target) tf=time.time() print(func, x, tf-t0) ac = [] for i in range(1, 10000, 3): ac.append(i) print(len(ac)) tv = 10000 test(ac, tv, twoSum_bf) test(ac, tv, twoSum_1) test(ac, tv, twoSum_1_2) test(ac, tv, twoSum_2) 

    3333 <function twoSum_bf at 0x7fc1dd25e4c0> None 1.1531572341918945 <function twoSum_1 at 0x7fc1dd25e550> None 0.0006499290466308594 <function twoSum_1_2 at 0x7fc1dd25e5e0> None 0.0012097358703613281 <function twoSum_2 at 0x7fc1dd25e670> None 0.001194000244140625 
    submitted by /u/butylka_zavtraka
    [link] [comments]

    Where are literal arguments kept in memory and for how long do they exist in Java?

    Posted: 19 Jul 2020 10:10 PM PDT

    If I pass in a String literal as an argument, I assume that the String literal is made in the String pool right as a String object? Does this this mean that the literal is somewhere in the heap without a reference of course? And once the method is done executing would the String in the pool be gone?

    The same question I would like to ask for primitive type literal values, are they just put on the stack when the method is executed and then they are removed from the stack once the method is done executing?

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

    Stuck on how to improve

    Posted: 19 Jul 2020 10:05 PM PDT

    So in college I had OOP course that basically taught C++, and than another course that transfers those skills to Java and C#. Basically, if you type in C++/Java/C# tutorial for beginners, I can apply all stuff from those videos, so I guess I have peaked in beginner stage.

    But the question comes, what now? How can I further improve my skills in these languages?

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

    How do I publish this as a PIP package

    Posted: 19 Jul 2020 03:52 PM PDT

    I am seeing a scope for this script I wrote, I want to publish to a PIP. Can anyone guide me through this?

    yt2spotify

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

    Are my goals realistic?

    Posted: 19 Jul 2020 05:59 PM PDT

    I want to create a game as a project for myself ( my first project and game ) to learn and understand coding better. I wanted to know is spending two hours on it daily enough, less or (unlikely possibility) comfortable?

    Clarification: A lot of people are thinking that I want to learn game development to get a job. I actually don't. I am a school kid and this year I am applying to university programs to get there. I just wanted to learn it as a hobby / skill. I simply like learning and want to do that.

    submitted by /u/Anxious-Job8485
    [link] [comments]

    Should I write a neural network in javascript or php?

    Posted: 19 Jul 2020 09:38 PM PDT

    During school I tried to create a neural network for a project in javascript with the help of a library for neural networks (ml5), however I couldn't get it to work. I am now again trying to create a neural network but this time I want to build it without the help of libraries. My question is if I should write in php or javascript, because I read that javascript is faster at mathematical computation but when I used the library for the neural network I read that they used tensorflow.js which makes it more efficient to create a neural network in the computer, however I'd like to avoid using tensorflow.js since it's complicated.

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

    Was told I’ll always be playing catch up?

    Posted: 19 Jul 2020 02:01 PM PDT

    I just recently got into web developing within the past month and I'm still very, very new to it. For personal reasons, I likely (this could change but doubtful) won't be able to work full time as a developer for two to three years from now. I was talking to someone who said that by then, I probably won't know any of the new stuff and everything will have changed, and everything I'm learning now will be irrelevant by then. I'm feeling discouraged and am thinking of not pursuing it. Any opinions?

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

    Examples of large state machines?

    Posted: 19 Jul 2020 09:13 PM PDT

    I'm trying to find examples of large state machines, to understand what a large state machine may be used for.

    A state machine doesn't use much RAM, so if you have a program that has a very large state machine, you can probably still implement it on a memory-constrained device, which would be pretty cool.

    e.g. Does anyone know of a state machine with more than 100 values for an enum? Thanks.

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

    This seems like a stupid question--what data type should I use?

    Posted: 19 Jul 2020 01:35 PM PDT

    I need to store a value that has a range of [0,2^86).

    Long, long long, unsigned long long, double long, double, all are too short...

    How do I store this? (I need to store the whole number, as I need to do operations on it)

    Edit: C/C++ is the language

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

    Transactional DB operations without violating domain driven design

    Posted: 19 Jul 2020 05:10 PM PDT

    For the sake of explaining, let's say we have a books collection and a pages collection!

    In domain driven design, one might split handing book meta data, e.g author, title, cover images, etc into one domain, and pages into another. As both clearly have their own set of responsibilities.

    If we are cloning a book, we need to ensure that every single page and the parent object itself, e.g the book, are all cloned and inserted into the database. If one of these operations fail, everything needs to be reverted (which a transaction would automatically handle!)

    However, if the infrastructure layer for the books collection and the infrastructure layer for the pages collection don't know about each other... there is no way to handle this kind of case without programming it yourself. Even in the case, you risk corruption if your application crashes.

    How do you execute on something like this, while keeping your business logic and various layers isolated to improve code quality.

    Thanks!

    Edit: coming for the assumption that you might handle a book update/insert and a page update/insert in separate contexts

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

    No comments:

    Post a Comment