After many failed attempts at picking up programming, this is the most consistent I've been so far and the main that thing I've changed is that I'm now taking my time. learn programming |
- After many failed attempts at picking up programming, this is the most consistent I've been so far and the main that thing I've changed is that I'm now taking my time.
- Are there any people here whose open-source projects are looking for contributors?
- I built a website where you can experiment with javascript by building Minecraft-like worlds!
- C# vs C++
- Showing work with just Javascript in a webdev portfolio?
- Should beginners learn hashsets, hashmaps, interfaces or enumerators?
- My first program
- Combine Programming, Gaming and ML - Starcraft 2 edition
- In Java, how do you assign values to variables?
- I only have access to python anaconda - is there a way to merge multiple PDF files in a directory into a single PDF ?
- I'm thinking I need some advice folks-
- same output
- Breakout Game (CodeHS) 11.1.2
- Is submitting a coding challenge in multiple languages advised?
- Hoe to open a website, and execute a JavaScript code in a specific website console automatically
- libcurl program help
- Does anyone recommend PluralSight?
- Any Tips for Working on Being More Patient?
- Newtonian Orbit Simulation in C++ Program Calculates Incorrect Orbit
- Ron Jefferies said "clean code expresses all the design ideas that are in the system". What did he mean by that?
- Can anyone tell me what is this function calling convention?
- The use of Java's Reverse() method
- Is there a way to randomly distribute 9 numbers to an array with no repeats?
- This might be it for me...
Posted: 15 Jul 2020 06:45 AM PDT The main difference between what I was doing before and what I am doing now, is that I'm taking my time. Take your time!!The last 3 or 4 times I've always been in a massive hurry to learn as much as I can in as little time as possible. I would sign up for CS50 or some other programming course and watch 6 videos back to back and take as much notes as possible, thinking I was actually learning this stuff. I thought "If I finish this beginner course, I can move on to an intermediate course, and then an expert course!!! I'll be able to do I have had to be realistic with myself. I have done the same thing multiple times and failed each time because I am not a prodigy. Can you teach yourself calculus in a week? All of computer science? Probably not. Learning an entire programming language is not going to happen. I am in MITs introduction to python and computer science course (again) and I'm actually farther along with it than I ever have been, I have absorbed a lot more information by doing the problem sets maybe the day after I watch the video lecture. I also pause the video a lot so the full 45 minute lecture maybe takes up about an hour and a half of my time. When I pause the video, I'm looking at the code that comes with the lecture notes. I'm maybe editing it a bit to make it do something else. Which brings me to my next point. Play around with what you've learned.This also comes under taking your time. Yes, at first it looks like you can "only" do some basic mathematics and maybe print some stuff out, get some input etc. Maybe you might think to yourself, "this stuff is too basic, I can't do anything with this". You can. Take your time and get creative. Perhaps read a little bit of documentation (yes, documentation looks a bit daunting at first. You'll have to take your time with that too.) Nothing else to say here. If you're on a course, don't get tunnel vision.I have done this every single time. It's boring and overwhelming as fuck. There's a lot of new information to learn on beginner courses, so I think it's normal to feel bad about not understanding something the first time (fucking for loops!!) don't just rewatch or reread the same content and wait for an epiphany. Use it to learn it. There are beginner level exercises out there on the internet, which you may feel bad about not knowing how to do because you just watched a video on it, it's all good. Just give it a go. I personally have liked ProjectEuler's problems. I had to sleep on the second problem only to realise I had a variable where it shouldn't have been. I honestly needed to look up the solution for the first one because I USED A FOR LOOP WRONG. I had to use the loop to learn how to actually use it. Seriously, you need to practice. Dont feel guilty for taking time out to do something else!!!Self explanatory, although I think it's normal to feel guilty. The thing is, you're not a Edit: For some practice (outside of MIT's free course problem sets)I've been using these two websites. Pynative (Python) This helped a lot for Edit 2: Would be really cool if anyone posted their websites with exercises for other languages! [link] [comments] |
Are there any people here whose open-source projects are looking for contributors? Posted: 15 Jul 2020 03:30 AM PDT Working on open source projects is a pretty good way for novice software developers to dip their toes into real-world software development. In this spirit, I was wondering if there are any open source project maintainers here that are looking for contributors to work on their project? If so, leave a comment with a link to your project/software and maybe a brief description about it. Programmers browsing this thread could then take a look at your project and maybe contribute to it if it's suitable for them. [link] [comments] |
I built a website where you can experiment with javascript by building Minecraft-like worlds! Posted: 15 Jul 2020 12:04 PM PDT It's called Learn3D, try it here! Hey Reddit! I wanted to make a tool that made it easy to experiment with code concepts in a friendly way. With Learn3D, you can use either coding blocks or javascript to make Minecraft-style worlds, all from your browser! You can also save your creations and share them with the world! Here are some examples: There are other cool things you could build too, such as mazes, random terrain generation, mathematical formula visualizations, etc. And finally, if you're interested in how Learn3D itself is built, the code is open source! Let me know if you have any questions in the comments. [link] [comments] |
Posted: 15 Jul 2020 03:40 PM PDT |
Showing work with just Javascript in a webdev portfolio? Posted: 15 Jul 2020 01:56 PM PDT Hi! So I understand having a portfolio is a must and there are a number of different ways to show what you can make like Github pages, codepen, or having a VPS (please correct me if I'm wrong). But I am curious if there is a need to show what you're capable of doing with just vanilla JS (no html or css). And if there is, besides having a repo on github to show your awesome scripting skills, is there a way to show it professionally while on a live server so it's interactive? I've seen jsfiddle floating around, but am not sure as to whether or not that is the right tool to showcase JS skills. Thanks for your time and answers :) [link] [comments] |
Should beginners learn hashsets, hashmaps, interfaces or enumerators? Posted: 15 Jul 2020 09:24 PM PDT This is my first summer truly diving into programming with Java. As I continue to learn, I'm confused on whether I should be learning all the things I mentioned in the title. For example, what is the difference between me using hashsets and me using ArrayLists? I just don't want to practice things that aren't necessary at my level, so I want to make sure what I'm learning is relevant. Thoughts? [link] [comments] |
Posted: 15 Jul 2020 02:36 PM PDT here is a little program i worked on this morning using python. I was watching the 4 hour python course on youtube by codecamp and got to the while loops and took inspiration. It is not the best and i am sure there is allot of room for improvement. i hope one day to incorporate images or buttons to select choices eventually. My only test group has been my children (4, 9, 10). Any input is welcome! [link] [comments] |
Combine Programming, Gaming and ML - Starcraft 2 edition Posted: 16 Jul 2020 12:48 AM PDT Combine your interest in Programming(Python), Gaming(Starcraft 2) and ML. For those interested in such, I have made a Python coding tutorial which go through the early building phase of a Starcraft 2 AI. The series is currently divided into the following four videos: Machine Learning - StarCraft 2 Python AI part 1 - https://youtu.be/WFugpcvIil4 Machine Learning - StarCraft 2 Python AI part 2 - Barracks - https://youtu.be/O1fwJgjfh1w Machine Learning - StarCraft 2 Python AI part 3 - Build Marines - https://youtu.be/XzjLwMwhd_Y Machine Learning - StarCraft 2 Python AI part 4 - Attack [link] [comments] |
In Java, how do you assign values to variables? Posted: 16 Jul 2020 12:35 AM PDT Node head; Node nodeToAdd = new Node(); if (head == null) { nodeToAdd = head; } Which one is correct? Can someone explain how it works in the memory with the references and stuff [link] [comments] |
Posted: 15 Jul 2020 11:59 PM PDT Hi all I ONLY have access to python anaconda and the default packages that come installed with it, at work I cannot install additional python packages. I know you can merge multiple PDF files using PyPDF - is there a way of doing this using the default packages that come with anaconda ? I regularly have 20+ PDF files that all need to be merged together, I'm looking to automate this if possible Thanks in advance [link] [comments] |
I'm thinking I need some advice folks- Posted: 15 Jul 2020 11:50 PM PDT Okay, so, I have no idea how this is going to look by the end but I'm going to just type out what's going on and what my concerns are and hope for feedback. A few weeks ago I picked up a part time job writing Python code to automate some office tasks. I am also supposed to be piecing together a system that will allow my employer to keep track of business inspections they do or need to do. That system doesn't intimidate me terribly much as I'll mostly be using already-made software. The Python bit of this job is very intimidating though. I am currently working with Selenium, gspread, and pandas at the moment, which are self-selected technologies, but I had no clue how to utilize any of them before hopping into this position. In the interview I did not claim to know Python, and did not claim to be a programming whiz of any sort. I said I have a small amount of scripting experience, which to me meant sql and excel, but I think these guys heard I am a software developer. Anyways, I'm stressed because this is on top of a full time job which I plan to keep for another 5 weeks before I leave to go back to school and I hope to continue with this new job through my next term, though I expect my position to change by then as my current position is only possible due to grant money, but who knows? I'll cut to the chase though- I'm struggling to learn fast enough to keep up with the bar I see for myself and am worried I'll disappoint. I hit a wall with selenium today I was not expecting while trying to visit a list of links and scrape data behind them, and my program is becoming long, ugly, and hard to conceptualize. Aside from that, I tried to consolidate much of my code today by putting repeating code into functions and trying to organize them inside of classes which I placed in an outside file, but was not understanding an initialization error I got when attempting to run it. I am the only person in-house willing to look at code, and really wouldn't mind that if I wasn't being expected to be able to write applications lmao I feel like I need a mentor, but at the moment I don't see that as a possibility, so do any of you have a good Python3 learning resource which is brief and easy to reference? I'm in way over my head- It takes me basically full 12 hour shifts to write ~100 lines of code that connects. Any tips welcome- I have been able to learn the basics of (and utilize) loops, if else, switch statements, and variables. TL;DR: Please send Python3 learning resources and ideas which helped to solidify your understanding of programming. I'm treading in choppy waters but want to do well. Also, want to briefly clarify, I know there is no quick cheaty route to being a proficient programmer, I just want tips to smooth the process :) Thank you for listening to my stress-induced rant! Hope your next cup of joe hits the spot. Cheers! [link] [comments] |
Posted: 15 Jul 2020 11:49 PM PDT #include<stdio.h> #include<cs50.h> #include<string.h> #include<ctype.h> #include<math.h> int main(void) { int sentence_count=0; int word_count=0; int letter_count=0; string s = get_string("enter the text\n"); for (int i=0,n = strlen(s);i<strlen(s);i++) { printf("%c", tolower(s[i])); if(s[i]!=' ') { letter_count++; } if(s[i]==' ') { word_count++; } if(s[i]=='.' || s[i]=='?' || s[i]=='!') { sentence_count++; } } printf("\nsentence is %i\n",sentence_count); printf("words is %i\n",word_count+1); printf("letter is %i\n ",letter_count); printf("\n"); float L; float S; L=(letter_count/word_count)*100; S=(sentence_count/word_count)*100; float index; index = 0.0588 * L - 0.296 * S - 15.8; printf("grade is %f",round(index)); } i am getting the output as 8 all the time there is something wrong with the calculation part but i am unable to identify it. rest of the code is proper i guess grade i am getting is 8 for any text i input [link] [comments] |
Posted: 15 Jul 2020 11:48 PM PDT (Javascript) So my code works pretty well so far as I'm coding an entire breakout game. So far, I have coded the bricks and I'm onto the paddle, but one issue I've run into is that the paddle keeps sort of multiplying when in the very edges of the restricted zones (end of brick zone and walls of canvas). Any help is seriously appreciated! Here is my code: /* Constants for bricks */ var NUM_ROWS = 8; var BRICK_TOP_OFFSET = 10; var BRICK_SPACING = 2; var NUM_BRICKS_PER_ROW = 10; var BRICK_HEIGHT = 10; var SPACE_FOR_BRICKS = getWidth() - (NUM_BRICKS_PER_ROW + 1) * BRICK_SPACING; var BRICK_WIDTH = SPACE_FOR_BRICKS / NUM_BRICKS_PER_ROW; /* Constants for ball and paddle */ var PADDLE_WIDTH = 80; var PADDLE_HEIGHT = 15; var PADDLE_OFFSET = 10; var paddle; var BALL_RADIUS = 15; var counter = 0; var x=2; var y=0; function start(){ x=2; counter++; rowChecker(counter); y += BRICK_HEIGHT+BRICK_SPACING; } function rowChecker(counter){ if(counter%8==1||counter%8==2){ drawBrickRow("#ff6961"); }else if(counter%8==3||counter%8==4){ drawBrickRow("#ffb347"); }else if(counter%8==5||counter%8==6){ drawBrickRow("#77dd77"); }else if(counter%8==7||counter%8==0){ drawBrickRow("#779ecb"); } } function drawBrickRow(color){ for(var i = 0; i < NUM_BRICKS_PER_ROW; i++){ var brick = new Rectangle(BRICK_WIDTH, BRICK_HEIGHT); brick.setPosition(x, y); brick.setColor(color); add(brick); x += BRICK_WIDTH+BRICK_SPACING; } } function movePaddle(e){ var paddleX = e.getX()-PADDLE_WIDTH/2; var paddleY = e.getY()-PADDLE_HEIGHT/2; var wallX = paddleX>0 && paddleX+PADDLE_WIDTH<getWidth(); var wallY = paddleY>y && paddleY+PADDLE_HEIGHT<getHeight(); if(wallX&&wallY){ remove(paddle); } paddle = new Rectangle(PADDLE_WIDTH, PADDLE_HEIGHT); paddle.setPosition(paddleX, paddleY); paddle.setColor("#008080"); if(wallX&&wallY){ remove(paddle); add(paddle); } } [link] [comments] |
Is submitting a coding challenge in multiple languages advised? Posted: 15 Jul 2020 11:45 PM PDT Apologies if this isn't the right subreddit but I've seen some career related posts here. I was given a coding challenge the other day to work at one of the best companies in my market. The problem is, it's a Java role and apart from 9 weeks of Ruby in the boot camp I attended, I have only ever worked with Python (1.5 years). The brief said I could do it in any language I wanted but said Java was the preferred (obviously). So my question is for those who have hired people before, would you see an attempt in two languages as somehow negative? My thinking is that I know I can do a very good version in Python and therefore can show the level I have managed to achieve in 1.5 years, and consequently what I might be able to achieve with Java (I understand they are very different languages). Then my Java attempt can be something which shows my abilities/willingness to learn the required technology ahead of time. It might be a bit more basic, but my python attempt can be the showcase of my ability to understand more abstract principles. There is however, a part of my brain that thinks they might just see it as me writing the program in Python and then essentially "translating" it to Java which might not come off so well. What do you guys think? Thanks in advance!! [link] [comments] |
Hoe to open a website, and execute a JavaScript code in a specific website console automatically Posted: 15 Jul 2020 11:38 PM PDT I have the code to run on the website. I just need it to be executed automatically every day [link] [comments] |
Posted: 15 Jul 2020 11:05 PM PDT Here's the assignment, the program needs to be in C: https://gist.github.com/rodedwin/61a7cb9c1479664b52b3c9128fb9f742 I am pretty new to this and really dont know where to start. I kind of decided to start at figuring out how to write a program that accepts command line arguments then progress to figuring out how to work curl. Ive been looking at this site for examples but I only get more confused. https://curl.haxx.se/libcurl/c/example.html [link] [comments] |
Does anyone recommend PluralSight? Posted: 15 Jul 2020 06:53 PM PDT I get PluralSight for free with my university; however, I don't know whether I should devote time there or somewhere else such as FreeCodeCamp (free) since I'm intrigued about web dev and python. Is there anyone here that has used PluralSight a lot and can tell me whether PluralSight is worth devoting time? [link] [comments] |
Any Tips for Working on Being More Patient? Posted: 15 Jul 2020 06:51 PM PDT Sometimes I get frustrated because I can't easily make leaps from A to Z, programming is very formal and I have to get good at A to B to C... instead of making huge intuitive leaps. Do you have any tips for how I could increase my patience? Thanks [link] [comments] |
Newtonian Orbit Simulation in C++ Program Calculates Incorrect Orbit Posted: 15 Jul 2020 06:30 PM PDT I am learning how to program in C++ and am writing an orbital simulator for a satellite. I've made other gravitational simulations in Java and Python, but those were using arbitrary units for calculations. This program is using SI units. The program is still early on in its development, mostly because I have run into an error for simulating a circular orbit. For the past two days, I have been debugging the program and doing calculations by hand to ensure my assumptions are correct. The orbit in question is a 250km equatorial circular orbit with a velocity of 7756.7m/s. For the earth, I am using 5.972e24kg as the mass and 6371km as the radius. Also, G is 6.674e-11 in the program. Here's how the program is calculating the force on the satellite during a time period (dt):
Note: All variables are declared as doubles When I run the simulation using 0.01s time steps, the satellite reaches a maximum altitude of 351.4km at 2723.44s into the orbit and is roughly periodic with 5446.88s. What I am confused about is why the apogee is ~100km off and why the orbit seems to be periodic with roughly twice the expected value (2681.63s). Is there something wrong with my calculations and physics equations? Or is it something with C++ where the precision of the double is lost through calculation? I also posted this in r/AskPhysics to encompass both parts of my question. I can also give source code if that would be helpful. Thanks! [link] [comments] |
Posted: 15 Jul 2020 10:14 PM PDT I am reading "clean code" and came across that quote. I understood the ideas about "expressive code" and "readable naming" but did not understand this one. I also did not understand why Uncle Bob dislikes abstraction. [link] [comments] |
Can anyone tell me what is this function calling convention? Posted: 15 Jul 2020 10:12 PM PDT Its the ws2_32.dll sendTo function. Is it a thiscall? Please help: ----------------------------------------------------------------------------------------------------- https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-sendto ------------------------------------------------------------------------------------------------- [link] [comments] |
The use of Java's Reverse() method Posted: 15 Jul 2020 06:11 PM PDT I was looking for a method that would make it easy for me to reverse an integer. i.e 123 becomes 321. While searching for a method I came across the reverse() method that seems to reverse bit as seen in this Article . i am curious on the real life use case of that method [link] [comments] |
Is there a way to randomly distribute 9 numbers to an array with no repeats? Posted: 15 Jul 2020 01:24 AM PDT I got the idea a few minutes ago that a sudoku creator program might be a neat little project to do, and the approach that first came to mind was to create a 2d array and just randomly generate each sub array then run the program through a check method to see if the puzzle was valid or not and then only to move onto later steps if the puzzle was good; and that seems simple and like it would work but at the same time it seems inefficent; who knows how many iteration of something like that you'd have to run before you got a valid puzzle so one way I thought to trim things down was to try and put some extra constraints on the initial generation to make it closer to what I'm looking for. Any ideas? [link] [comments] |
Posted: 15 Jul 2020 08:54 PM PDT I've been studying programming 10 ten months now, 8 were self study, and 2 are in a university bachelor certificate program. I failed to solve this problem: 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. This is considered to be an easy problem, I can't get it right. I've heard it said programming isn't for everyone, I denied that and thought if I worked hard, read, practiced, I would get it. I've dedicated the last 10 months of my life and can't even solve what's considered to be an easy problem. [link] [comments] |
You are subscribed to email updates from learn programming. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment