• Breaking News

    Saturday, May 16, 2020

    Learn to code TODAY! (Seriously) learn programming

    Learn to code TODAY! (Seriously) learn programming


    Learn to code TODAY! (Seriously)

    Posted: 15 May 2020 05:04 AM PDT

    Hi guys, I'd like to share my story with coding and when it really started. I know a lot of you guys is having the same struggles I did and I hope this helps.

    At first, I didn't understand how some letters on a screen became a whole web store system. It was mystical to me. After some researches, I was told to learn HTML/CSS/SQL/JS/PHP. The starter kit for web development.

    So I did, started to learn theories, syntax and when I (thought) finished, I was hopeless. Thinking: "ok, so now I know what is these things and how it works, but how the hell am I supposed to mix it up together and build something meaningful?".

    I was stuck. I quit for some time, I didn't knew what was the next step, and searching on the web it looked to me that was a jump from the basics to building complex systems, and I was too dumb for this.

    But then, the day that made me a true programmer became! And this is the tip that I thought it might help you guys:

    To become a programmer, you have to program. Oh yeah, you already read this on other posts, but it sounds pretentious, right? Like, shut up dude, you already code, it's easy for you to say. Yes, I agree.

    The thing is, besides learning syntax and other stuff, do an analysis of yourself. Where are you now? What you already know? What are the things you always see around but have no clue what it is? OOP? API? AWS? What is this? Take notes, search what it is, just to clear your mind. If you have all this information that is kinda blank on your head, it's just overwhelming you. Sounds more difficult than it actually is.

    Then when you know what is your level at programming, start taking your own challenges, compatible to that level. Example: I was trying to create a CRUD (Create/Read/Update/Delete) system in Java with SQL, I tried to jump steps and went to youtube tutorials without knowing the basic syntax of both languages, it was frustrating. Then I got back to my "make-a-sum" console programs. After I learned the basics, I finally was able to understand that tutorials properly and then when I watched it again, became natural. It has a lot of things that I didn't knew, but having a solid background for what the tutor was speaking, I was able to study it afterwards.

    So, to program: program (but not any or every challenge you found on the internet, but your own challenges, what you are capable to do).

    The more I study the more I see is an endless road. The only point you can say: "Ok, now I'm am a programmer!" is when you take challenges and don't give up on them, and make it works. No matter how small is your project.

    Search for the zone where is always slightly difficult.

    You can become a programmer today, maybe a bad one, but you can start it today! Now, go build something with what you are capable, you'll be a great programmer soon. :)

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

    Had a lot of time during quarantine so I made Google Drive Desktop, a Google Drive desktop app made with Electron

    Posted: 15 May 2020 03:59 PM PDT

    https://github.com/alexkim205/Google-Drive-Desktop

    I had a lot of time on my hands during quarantine, so I figured I'd revive an old project of mine.

    Google Drive Desktop v.conscious-club/0.2.0 comes with some sorely needed updates and the most important update of all ... DARK MODE!

    Give it a try, and if you like what you see, please share it with your friends. Improvements, help, and/or suggestions are also very welcome.

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

    I am learning html/css/javascript for front end. Should I learn Node.js or Python/Django for back end on a data management project?

    Posted: 15 May 2020 09:52 PM PDT

    so basically my "teaching myself" project will be making a site where you can make lists, relatively simple. I know that the standard HTML>CSS>JavaScript path is the go-to for front end, but should I be learning Node.js for the back end to handle the data because im already learning JS, or should I learn Python/Django because I hears its better for back end?

    or is there something else I should be using all together? I hear django has a TON of tools built in and I am totally green

    thanks!

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

    Programming Help

    Posted: 15 May 2020 07:18 PM PDT

    Hello everyone,

    I created a coding youtube channel where I solve codeforces problems to try and help people! Please take a look at it and tell me what you think. Here is the link: https://www.youtube.com/channel/UC1tUZGomBFOC_VX0yO-RRXQ

    I have made a few videos where I solve some simple problems. Again, feel free to let me know what you think about the channel!

    Thanks!

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

    How do I quit a python console script by using an input variable? (Trying to use 'quit' as input to return False and quit the script.

    Posted: 15 May 2020 09:37 PM PDT

    Good evening:

    I am writing a small script to try to keep track of the tasks completed in a task list. As a total noob, I am using what I know so far. I have part of the functionality I want from the program, and the other half is a problem for another day. I am struggling though with quitting the script/program from the terminal after I called the program. It keeps giving me a programmed response as "response not valid" when I try to type in the input I designated to quit the program. I could be wrong, but I am trying to use a "quit" input string and an if statement to return run = False. Which btw was how I attempted to keep the program running for as long as I needed it. Basically used

    while run: some_func() 

    and I am trying to use an if statement to close the function. Here is the entire script. Beware, I doubt it is all that "pythonic" given that I am a total noob.

    task_1 = "Cut Corn" run = True print("Welcome to our checklist app") print("To exit type 'quit'") def checklist_func(): comp_task1_check = input("Have you comp. task 1?") global task_1 task_list = [] if comp_task1_check == "Complete": task_list.append((task_1, comp_task1_check)) return print(task_list) elif comp_task1_check == "Not complete": task_list.append((task_1, comp_task1_check)) return print(task_list) elif comp_task1_check == "quit": run = False else: print("Response not valid") while run: checklist_func() 

    So I am trying to use the input value quit to close the script. But I think its not on the right area, because my else statement is overriding the quit value with "not valid" what I am doing wrong?

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

    Need help writing efficient code.

    Posted: 15 May 2020 11:05 PM PDT

    I am relatively new to java and programming, I've been learning for a few weeks and got an assignments as followings:Minesweeper. Minesweeper is a 1960s era video game played on an m-by-n grid of cells. The goal is to deduce which cells contain hidden mines using clues about the number of mines in neighboring cells. Write a program that takes three integer command-line arguments m, n, and k and prints an m-by-n grid of cells with k mines, using asterisks for mines and integers for the neighboring mine counts (with two space characters between each cell). To do so,

    • Generate an m-by-n grid of cells, with exactly k of the mn cells containing mines, uniformly at random.
    • For each cell not containing a mine, count the number of neighboring mines (above, below, left, right, or diagonal).

    I've already tried a code and it worked but when tested it was said to be too slow. Can someone please give me ideas of a different algorithm I can try? I'll post the code I tried down below but please don't read it. It's quite a nightmare. Sorry for the wall of text and thank you for anyone who helps me out.

    int m= Integer.parseInt(args[0]); int n=Integer.parseInt(args[1]); int k=Integer.parseInt(args[2]); int[][]a=new int[m][n]; int[]i=new int[2*k]; for(int mines=0,minenum=0;mines<k;mines++,minenum=minenum+2) { int xmines=(int)(Math.random()*(n-1)); int ymines=(int)(Math.random()*(m-1)); if(a[ymines][xmines]==-1) { mines=mines-1; }else { a[ymines][xmines]=-1; i[minenum]=ymines; i[minenum+1]=xmines; } }//xy mines for(int mines1=0;mines1<2*k;mines1=mines1+2) { if(i[mines1]-1<0) {}else {if(a[i[mines1]-1][i[mines1+1]]==-1) {}else{a[i[mines1]-1][mines1+1]+=1;}} if(i[mines1]+1>m-1) {}else {if(a[i[mines1]+1][i[mines1+1]]==-1) {}else{a[i[mines1]+1][i[mines1+1]]+=1;}} if(i[mines1+1]-1<0) {}else {if(a[i[mines1]][i[mines1+1]-1]==-1) {}else{a[i[mines1]][i[mines1+1]-1]+=1;}} if(i[mines1+1]+1>n-1) {}else {if(a[i[mines1]][i[mines1+1]+1]==-1) {}else {a[i[mines1]][i[mines1+1]+1]+=1;}} if((i[mines1]+1>m-1)||(i[mines1+1]+1>n-1)) {}else {if(a[i[mines1]+1][i[mines1+1]+1]==-1) {}else{a[i[mines1]+1][i[mines1+1]+1]+=1;}} if((i[mines1]-1<0)||(i[mines1+1]-1<0)) {}else {if(a[i[mines1]-1][i[mines1+1]-1]==-1) {}else {a[i[mines1]-1][i[mines1+1]-1]+=1;}} if((i[mines1]+1>m)||(i[mines1+1]-1<0)) {}else {if(a[i[mines1]+1][i[mines1+1]-1]==-1) {}else {a[i[mines1]+1][i[mines1+1]-1]+=1;}} if((i[mines1]-1<0)||(i[mines1+1]+1>n-1)) {}else {if(a[i[mines1]-1][i[mines1+1]+1]==-1) {}else {a[i[mines1]-1][i[mines1+1]+1]+=1;}} }//mines loop String[][]b=new String[m][n]; for(int y1=0;y1<n;y1++) { for(int x1=0;x1<m;x1++) { if(a[y1][x1]==-1) {b[y1][x1]="* "; System.out.print(b[y1][x1]); }else { b[y1][x1]=Integer.toString(a[y1][x1])+" "; System.out.print(b[y1][x1]);} } System.out.println();} }//end } 
    submitted by /u/jamescleelayuvat
    [link] [comments]

    Question regarding functions function (req, res , next, err)

    Posted: 15 May 2020 09:56 PM PDT

    Hello fellow learners.

    I have been trying to learn programming for sometime. specially the Express Js & Node framework. My question is regarding functions

    I have seen functions written as

    1)function = ( req, res) ,

    2) function = (err, req, res)

    3) function = (req, res, next)

    My question is how does javascript know that req is for ( on position 1) &

    in case (ERR) is showing on first position, how does javascript know to identify errors and store them in "err"

    My next question is " How does a developer know what parameters should he be getting into the () for the given function.

    its total noob question. any explanation with real world human example would be great help for me .

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

    Need help starting out

    Posted: 15 May 2020 11:45 PM PDT

    Hello, I endeavour to teach myself how to program. This is a hobby that I would like to learn as much as I can about, I don't think this will be a career path for me. I am wondering where I should start. My main interest in particular is AI but I know I'll need to learn the basics first. I have heard good things about SICP and I think I will learn python as well. If I do work through sicp is there any complimentary material I should learn? I don't have all day to dedicate to this as I am in school and have other things I need to learn/complete. Thankyou for reading this.

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

    This may seem like a stupid question but I am looking to get into learning a programming language and I want to play around with NFC Tags. What language does NFC use and how can I write custom commands for them?

    Posted: 15 May 2020 07:44 PM PDT

    I've searched around on the web and couldn't find anything useful. I don't want to be limited to using NFC Tasks and NFC Tools.

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

    Struggling with pricing

    Posted: 15 May 2020 11:03 PM PDT

    Hey! I am a aspiring web developer but struggling with these freelancing marketplaces regarding pricing and orders.

    I mostly do my work on up work and Fiverr. I just couldn't get going. People are asking for very cheap rates.

    And if I am increasing the pricing, the orders are going down. What should I do please guide me.

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

    Every time I try to learn something, I lose faith and feel disappointed.

    Posted: 15 May 2020 08:57 PM PDT

    Posts like this I've seen time and time again, but I can't find one that resonates with me.

    I love everything computers; ever since I was a kid up until now that I'm 19.

    I finished a course in JS; I've taken classes in Python; and - given the current situation that I had to suspend my degree - I'm self learning (I'm not even sure I'm doing it correctly).

    The thing is: I've accomplished great things - succeeded in programming contests, "interned" at big tech, but the truth is,

    I feel like I actually don't know anything - like all I've succeeded in I don't actually understand what I did, like I can't (and haven't) actually build anything. I feel like I've wasted the past 3 years ~trying to learn to code~ when ultimately I feel like a blank canvas. Like I'm falling behind from my peers.

    It sucks because this feeling hinders every step I try to take to learn. Has anyone been through the same?

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

    While-try-except help

    Posted: 15 May 2020 08:34 PM PDT

    Hello, I have to code a program that asks people to input switch or stay for a game that i am making, however I am very confused about how to do that and was wondering if any of you could help me.

    My goal is to use while loops, try & except to ask the user for their switch or stay strategy for the Monty Hall game.

    Rules are:

    • The acceptable inputs are "switch" and "stay", and any variation of capitalization is acceptable.
    • The user entering 'q' or 'Q' will end the loop
    • The user hitting "CTRL + C' will end the loop
    • There is only one line of code with an input statement
    • You may not use any "if" statements or "break"

    Any and all help would be greatly appreciated!

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

    University of Helsinki's "Java programming" MOOC (2020) review thread

    Posted: 15 May 2020 09:15 AM PDT

    Post your own thoughts/impressions/reviews in the comments!

    Below is my review. I'm now on part 4 of the 14 part course; I will keep this updated as I go through the course.

    First of all, quickly about me: I'm currently a 2nd year Computer Science student, from London UK. From reviews and rankings, my course is one of the top full-time CS courses in London; student satisfaction is great, it's very international and a huge percentage of students get a job afterwards. However, how they teach Java (even with all teaching assistants available and ability to discuss everything with tutors, one-on-one) is worse than how Helsinki's MOOC does it.

    I've did the old Java MOOC by Helsinki's University before - OOP Programming, Part I (2013). Comparing to their old course, here's the list of what is better in the new 2020 course:

    • Step-by-step, interactive code explanations for important/complex examples (like, what variables are created, execution stacks etc.): you can now see what's happening behind the scenes when running the code, something I believe serious beginners will find very useful in the long run.
    • Better structure: each part is separated into topics, each having it's own web-page. Previously, the whole week was clumped together on one very long page.
    • New self-assessment tools: quizzes, lesson plans, progress questionnaires, quick button to track your week's progress. All of it helped me notice holes in my understanding much better.

    The old 2013 course was already very good, probably one of the best free Java resources at the time. Below are the top points that both the old and current courses have:

    • EXERCISES with CODE CHECKS - I can't stress enough how useful those are. They have an integrated with IDE system that tests your solutions. Once you solved them, see model solutions. This is the point that made my Java understanding so much better than the one I received from uni. Needless to say, I aced my university's tests on Java.
    • Great curriculum - they don't just go through Java, they periodically explain how programming works in general; they introduce you to main concepts. They explain it very well too.
    • Netbeans IDE as main tool - it's an IDE that is used in industry, making you instantly familiar with actual tools used for app making.*

    Downsides:

    • The course is still in alpha phase, expect:
      • bugs in the exercise-checkers
      • text errors
      • incompleteness (at the time of writing, last 3 parts are not yet available)
      • videos in Finnish (they didn't translate them yet)**
    • Nerbeans IDE can be slow. The way they implemented code-checking makes the IDE freeze when submitting exercises - which wasn't an issue before***. Netbeans is generally slower than Eclipse and is made even slower with their current integration. (My setup is mid-range, i7 4th gen, 8GB RAM)

    All in all, I'm in love with this course so far. I've been waiting for this course and it's not disappointing at all! Downsides are pretty minor. I'm very excited to see what kind of things they will teach in later parts!

    *There is constant debate whether it's better to use a full-fledged, relatively hard-to-setup IDE, or an easy-to-setup, intuitive "code playground" when start learning to program. IMO, if you are serious about programming, definitely go with IDE - you will avoid future set-up and transitioning process.

    **absolute majority of the course is in text format and videos serve as a supplement, so it's not a big issue.

    ***on the other hand, the current exercise-checking is better than 2013 one: it allows minor, unrelated to the exercise errors in your code (like, misspelling something in a string). It even checks code formatting!

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

    Google's foobar strange bug

    Posted: 15 May 2020 11:27 PM PDT

    I just started google's foo.bar recently, and currently on level 3. So I finished the challenge on my computer, and when I verify it in foo.bar, all tests result in failure. So, I tried to figure out what is wrong with my code and I found something interesting. So I when I copy the output of the code I got from my PC, and return it instead of the answer, there is one test that I passed. So somehow the output from my code is right, but foo.bar can't seem to read it.

    I would like to post some screenshot, so I will link to a Stackoverflow post if you guys want to see more clearly what happened.

    https://stackoverflow.com/questions/61832602/googles-foobar-strange-bug

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

    I want some programmer friends!

    Posted: 15 May 2020 11:26 PM PDT

    I am a development student and I have a lot of ideas for projects and stuff, I have clues of coding in C++, C#, java and a bit of php but the thing is, I just want to make some friends, maybe to teach me or to share my ideas with them and sure to work together as well and maybe some occasional gaming :p I hope someone finds it cool to join me, have a great day everyone!

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

    The University of Hertfordshire - MSc CS Online

    Posted: 15 May 2020 11:17 PM PDT

    Hi all,

    I am looking into an online Masters degree in CS and came across this degree (listed in the title).

    https://www.herts.ac.uk/courses/msc-computer-science-online

    I am wondering if anyone has taken this program and can give any insights?

    It is geared towards non-cs majors, so my next question is if this program is an accredited Masters?

    I know York University (UK) offers a similar program and I e-mailed them and asked this question and they did inform me that their online MSc CS is not an accredited degree.

    The program is appealing because it doesn't have strict pre-reqs such as a CS Bachelor's degree or specific Calculus courses and such. But I am skeptical of paying 15k for a potential non-accredited degree.

    Any input is helpful.

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

    Looking for people to learn Functional Programming with

    Posted: 15 May 2020 05:07 PM PDT

    I want to learn programming more seriously. But I've noticied I have trouble doing it on my own. Sometimes I feel lonely.

    So I want to start an small study group. We can explore Lisp, Scheme, Haskell and even functional Javascript!

    I want to do it for fun and not focused on getting a job. Just for the joy of learning.

    I use only Free Software, so for communication we'll be using: Jitsi Meet, Mumble and Matrix. Instead of privacy invasive software like Zoom, Discord and Slack.

    Let me know if you are interested so we can set up everything.

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

    How long would it take to learn Webdev having previous programming experience?

    Posted: 15 May 2020 07:15 PM PDT

    Hi, I was wondering how long it would take to learn HTML, CSS, Javascript, and React having no prior web related experience but already knowing Python, C, Java, and SQL. I'm trying to plan out my goals for the summer, and having a good estimate of how many hours I should roughly dedicate to each one would help. Thanks in advance!

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

    Which course should I choose?

    Posted: 15 May 2020 12:52 PM PDT

    I am thinking of taking a course on edx but am confused between the following: CS for Mobile Apps with react native CS for AI with Python CS for game development CS for web programming with Python and JavaScript -- I know the basics of Python and C. So what would you suggest?

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

    What is WORA in java ?

    Posted: 15 May 2020 10:35 PM PDT

    Do you know ?

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

    Are while loops and break statements necessary

    Posted: 15 May 2020 06:19 PM PDT

    I'm very new to coding and I have been learning to code in python. I have been watching CD dojo's tutorial on how to code and have just finished the while loop and break statement episode and I was wondering are they really necessary. Is there anything an if loop can't do that a while loop can and why do we need a break statement if I have an "if" statement

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

    How can I manipulate state object in react in following way

    Posted: 15 May 2020 09:33 PM PDT

    My state is a list (say list A) of objects and each object contains a list (say list B).

    I need to pull out some selected objects from list A, add a new object to list A and the selected objects to lost B of newly added object.

    I also need to do the inverse of this that is: I need to pull out objects in list B of selected object, out those in list A and delete the selected object.

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

    Python TCP/IP Chat App Question -- Running a server and client on 2 VMs

    Posted: 15 May 2020 05:36 PM PDT

    I want to create a simple Python 3 client/sever program on two VMs.

    VM 1 IP Address = 10.0.0.3

    VM 2 IP Address = 10.0.0.2

    The goal: Is to have VM 1 and VM 2 be able to communicate between each other -- i.e. send messages from VM 1 to VM 2 and VM 2 to VM 1

    My issue: Is that I don't know/understand how VM 1 can communicate back to VM 2. I mean, how does communication happen on both sides.

    My understanding is that I need a server.py file on VM 2 and a client.py file on VM 1 as well right?

    But when I tried to the server.py file on VM 1 and client.py file on VM 2 it works perfectly. I am able to send messages from VM 1 to VM 2. The issue arises when I start server.py on VM 2 and client.py on VM 1. As soon as I start client.py on VM 1, both the client.py processes quit and the servers are still running.

    I changed the port numbers so VM 2 -> VM 1 is communicating on port 4455, and VM 1 -> VM 2 is communicating on 4456 but that didn't work either.

    Any suggestions? Am I doing this completely wrong?

    Here is the code

    server.py on VM 1

    import socket import sys sockethost = "" socketport = 4455 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.connect((SOCKETHOST, SOCKETPORT)) s.listen() while True: connection, address = s.accept() print("Connected to -> " + str(address[0]) + " on port -> " + str(address[1])) message = input(str("Input -> ")) message = message.encode() connection.send(message) 

    client.py on VM 2

    import socket import sys sockethost = "10.0.0.3" SOCKETPORT = 4455 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.connect((sockethost, SOCKETPORT)) while True: incoming_mess = s.recv(2048) incoming_mess = incoming_mess.decode() print("Server -> ", incoming_mess) print() 

    server.py on VM 2

    import socket import sys sockethost = "" socketport = 4456 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.connect((SOCKETHOST, SOCKETPORT)) s.listen() while True: connection, address = s.accept() print("Connected to -> " + str(address[0]) + " on port -> " + str(address[1])) message = input(str("Input -> ")) message = message.encode() connection.send(message) 

    client.py on VM 1

    import socket import sys sockethost = "10.0.0.2" SOCKETPORT = 4456 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.connect((sockethost, SOCKETPORT)) while True: incoming_mess = s.recv(2048) incoming_mess = incoming_mess.decode() print("Server -> ", incoming_mess) print() 

    Again, any suggestions/solutions would be greatly appreciated. Thanks.

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

    What is the proper phrase for this scenario?

    Posted: 15 May 2020 09:13 PM PDT

    I don't know what to google to learn how to do this so I hope someone reads this and knows what I can google to learn.

    Let's say I have a website with a publisher & subscriber as a user. Let's say I'm logged in as a subscriber and I go to the page that displays my subscriptions. How do I learn to display those subscriptions on html? once the user enters the page, there could be 0-many subscriptions displayed on the page.

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

    No comments:

    Post a Comment