I can't get my head wrapped around this algorithm, it's driving me crazy. Can someone please ELI5? learn programming |
- I can't get my head wrapped around this algorithm, it's driving me crazy. Can someone please ELI5?
- Do you want to help others learn to code?
- Short prefix: I graduated high school with honors, then completed my bachelor’s in psych/philosophy with over 150 hours in research experience.
- Learning to program from scratch and changing career paths.
- I'm unhappy with my job, and I really enjoy programming. How do I pursue it, and am I making a mistake for doing it?
- Udacity nano degrees? Did the employer even care
- How do I get better at Programming tests?
- Any fairly new programmers want to work together?
- How necessary is it to take online sites with dedicated courses (like DataCamp and Codeacademy)?
- In ML, by "center the dataset" what does it mean?
- Does anyone mind explaining this to me?
- [Java] Trying to make a rectangle with perimeter an area methods [homework]
- Javascript Environment
- Currently struggling
- Python - Scrapy Login in
- Polymorphism Clarification
- [C++] Why do we need to overload the assignment operator along with the copy constructor?
- How to know when your ready for a programming internship?
- [C++] Question about Destructor
- Can I get access to hardware IO ports in Win10?
- I need help embracing algorithms
- php - logging in as the username in the database rather then the username entered.
- Need Some Help
I can't get my head wrapped around this algorithm, it's driving me crazy. Can someone please ELI5? Posted: 18 Oct 2018 07:42 PM PDT The exercise problem is that the user enters a positive number n, and for that number the program should print a square of n. And for that n, it should print a pattern of smaller and smaller n's. For example if the user input 7, the output should look like. It makes a "L" pattern with O's and #'s, with the L's overlapping: The code that my professor conjured and the one that I can't seem to understand why it works (C++): The variable r is the row number and c is the column. Now I understand what he is doing up to where x=c when c<=r, however once c is greater than the current value of r, the value of r stays the same and so by assignment x stays the same, right? Therefore, for each column in the row, the value of x stays the same, right? So why does it work? The question is feels dumb, but I really don't understand. Edit: Formatting [link] [comments] |
Do you want to help others learn to code? Posted: 18 Oct 2018 08:02 PM PDT I have created a new medium to guide others through code examples. I am looking for others to use the tool I created to write tutorials and books where code is the main focus. Here are some programming 'books' that I have written: https://ourcodestories.com/markm208/Playlist/All I use them in the CS classes that I teach and my students really like them. They said they prefer them to books (no surprise there) and videos. If you are looking to help others learn there are many topics that can be covered with the animated code playbacks. The tool is free and open source. It is a plugin to the visual studio code editor. If you share your code on the site I created, Our Code Stories, you can make it free or charge others a fee to access it. I am willing to help anyone get started! Message or email me if your interested. Please share. [link] [comments] |
Posted: 18 Oct 2018 09:33 PM PDT I couldn't find a job to make a living (after three years of bouncing around). I gave programming a shot and was pretty good at it. I'm two semesters in, and I have encountered the devil that is calculus 2. I've heard horror stories about coding jobs, alongside my difficulty with the math. Is IT a better option for me? [link] [comments] |
Learning to program from scratch and changing career paths. Posted: 18 Oct 2018 02:35 PM PDT Hey everyone, Quick backstory - 27 years old, graduated with B.A. in marketing and have no previous CS skills. I'm finding out that the career path I'm on is not really leading anywhere. Time is going by and I'm not any more marketable than I was when I graduated. My brother in law who is a cloud solutions architect recommended I learn how to program. He says technology is the future and knowing how to program will make me infinitely more marketable. He suggested I focus on web development; html, css and JavaScript first. My question is: how often do companies hire people with no education or experience in CS/programming but have proven they have learned the subject? What would be some good projects or certifications that would mean something to a potential employer? I want to make sure I hit the ground running. Thanks for any and all advice. [link] [comments] |
Posted: 18 Oct 2018 11:03 PM PDT I've worked in a construction store for 3 or so years. It's an alright job, but I'm not really happy with it. I've programmed on and off for 4 years, but I still consider myself a novice. I haven't really sat down and focused on any perticular area yet, pretty much just explored the basics of a handful of languages. I know htlm/css well enough to construct static responsive websites, with some very basic javascript. I've toyed around with Python and Arduino. I made a small backup device to copy files from one USB device to another without needing to press a button. I unsuccessfully made a mod in minecraft using Java. (I don't really understand what OOP is yet, and what benefits it brings) I've learnt basic SQL and noSQL. (Not even sure I'm using these words right). Lately I've toyed around with C++ until I found the edx cs50 guide on this subreddit, which use C. So far C and C++ is what I enjoy the most. I really want to stick with it, but I'm afraid I won't be able to get a job in this area for a long time. Short story long, I often "binge-code" for several hours over a few days until I get discouraged because I either lack the maths, logic experience or just a general feeling of "not being good enough" or "I'll never be able to work with this without an education". Often times I end up quitting for weeks because I'm ashamed I'm even attempting to be something I don't think I can be. I quit school 3 times because I didn't enjoy what I did and mistook it for being tired of school. I quit mechanics (education for car mechanic, oil drilling etc.), service (hotel receptionist, flight attendant etc.) and finished the first of two years in construction (carpenter, plumber etc.). After quitting the third time I worked a variety of jobs, eventually ending up in a construction store. I never really cared much for school until a few years after I quit. I hated maths, languages, history and everything. When I turned 20 I very suddenly developed a very strong hunger for knowledge. I learnt math on my own on Khanacademy, I started reading, I've been wanting to write, I got an interest for psychology and biology, drawing became fun, I started enjoying learning about cars, woodworking, gardening etc. I've been wanting to go back to school to study programming for years. I believe it will make me feel much better about myself if I knew my time spent programming is worth something. I'm just afraid to fail that too or be too overwhelmed. One problem with this is that I need 3 years of school before I can start actually studying programming in a university. A workaround is to first work with programming and then applying to university on the basis that I already have worked with it. I'm writing here because I'm unsure if all of this is just dumb. I'm afraid to spend too much time chasing something that I'll never end up doing. When I'm not working, socializing or playing games I'm mostly doing something related to programming. Even the games I play is often related to programming or logical thinking, and when they're not I spend more time making tools to optimize my game, such as calculators to optimize gear on character etc. I think what I love the most with programming is being stuck on a problem and thinking about it when doing other stuff. Nothing really bores me anymore when having a programming problem stuck in my head. I can literally sit still on a chair and entertain myself with potential solutions. Enough rambling, is this just wishful thinking for me? Should I take the leap of faith and apply for school and spend 6 years for a bachellors degree? Or are there other ways? I'm very insecure about this, especially going back to school. I don't consider myself dumb, but I'm definitely uneducated next to an average person who finished school. I'd say I'm more experienced than average in many areas, but not good at any. Jack of all trades if you will. Thanks. [link] [comments] |
Udacity nano degrees? Did the employer even care Posted: 18 Oct 2018 03:22 PM PDT Ya just got the add for it, maybe its what i need becuase i dont have a cs degree. So curious if anyone's done one of them? Was it better than a online bootcamp? Did an employer actually comment on it or recognize it as valid? Would you recomend it? [link] [comments] |
How do I get better at Programming tests? Posted: 18 Oct 2018 11:51 PM PDT I'm currently in a Data structures course. We are given problem sets and such and have daily problems that help us keep thinking about cs and coding everyday. We ALSO have programming exams that are given and are autograded. People say that the former two should help, however, we had our first programming exam and I absolutely bombed it. My problem is: how do I get better at times coding tests. Are there any specific exercises other than just "doing it"? ALSO I'm having a hard time coming up with things from scratch. For psets or our daily programming exercises, I normally start by ripping things from other resources and using it as a skeleton, but with the exams you start completely from scratch. Even if I get it logically correct or a right algorithm, I have a real tough time turning it into code. Any ideas would be appreciated and thank you! [link] [comments] |
Any fairly new programmers want to work together? Posted: 18 Oct 2018 01:54 PM PDT Hey guys, Been teaching myself programming for around 2 years now and never worked with anyone on a project before. Was thinking it would be cool to work with like 3-6 new coders like myself on a project, learning from each other and making something fun in the process ! [link] [comments] |
How necessary is it to take online sites with dedicated courses (like DataCamp and Codeacademy)? Posted: 18 Oct 2018 11:13 PM PDT I am an early PhD student in psychology with an eye on a position in data science where I am able to apply my knowledge of behavior and psychological theory on big data. I am familiar with a lot of the stats background I will require which will come naturally through exposure to the courses in my program but when it comes to learning languages it is something that requires a lot more independent work. I am already familiar with the basics of R and I know I need to become familiar with Python and other languages. However, how essential is it or has it been for any of you to utilize dedicated sites like Codeacademy or DataCamp to acquire your skills and experience? As a graduate student I am limited by my lower income and these sites seem much more beneficial when you have access to the whole slew of tutorials, practice problems, and other material. For anyone who has been in my position as a graduate student or still are, or even if you are just someone outside of academics on the path towards a job in industry, data, or statistics: 1. If you have used these sites before, what was your experience with them? 2. Do you feel they were invaluable assets towards the development of your skills and expertise and overall made you stronger and (if applicable) a more competitive job applicant? Thank you so much for any suggestions you are able to give. Anything in regards to big data, data science, learning new languages, or psychology that you are able to provide insight on will be greatly appreciated! [link] [comments] |
In ML, by "center the dataset" what does it mean? Posted: 18 Oct 2018 08:55 PM PDT Hi all if the dataset are already vectorized into 1D numpy.array. by centering the dataset, does it mean to compute the mean of the dataset? suppose this array[] has 80 arrays, each array contains 40 elements. so to get the mean, just get the sum of 80 arrays and divide by 80 without considering any elements in it ? the array sum and divide broadcast already did that? [link] [comments] |
Does anyone mind explaining this to me? Posted: 18 Oct 2018 09:53 PM PDT I wasn't hear my teacher showed this. It is not programming, but truth tables. https://imgur.com/a/o6HgBYK I don't understand any of this really. I know what truth tables are and I did it in discrete math However can someone tell me this. Is 0 true or is 0 false? This is python 3.7. I understand in python 0 is true and 1 is false but is that different here? What output is my teacher even looking for? True or false? Again I wasn't here when he explained this so i'm very confused. Example for the first one 0 0, would the output be false or true and for what reason? Or does the output have to be something else? Would anyone mind just explaining? Would I have to put a 0 or 1 in the boxes? Thank you. [link] [comments] |
[Java] Trying to make a rectangle with perimeter an area methods [homework] Posted: 18 Oct 2018 03:43 PM PDT Hello everyone. I'm trying to study for a test and only now realized how far behind I am. I'm a little more used to C++ and am having a difficult time with an practice test. First I'll list the steps I did so far and post my code and I'd appreciate if you let me know if I did it correctly. 1) Create a class named rectangle an store it in a rectangle package. 2) In the rectangle class, add instance variables for length and width. Then, code the get and set methods for these instance variables. 3) Add a zero argument constructor that initializes the length and width to 0. 4) Add get methods to calculate the area and perimeter of the rectangle and returns a double value for the result. 6) Open the main class. Then add code that creates a rectangle object and sets its width and length. Quick question, I'm used to setting the integers in the parenthesis when making an object. For example in C++ it would just be Rectangle rec1(5, 6);. However, when I leave the parenthesis empty it gives me an error and if I put some integers there, it always returns 0 for the perimeter until I use my setters. Am I doing something wrong here? Anyway, here are the steps I'm really not sure about. 5) Add get methods that return the area and perimeter as a String object with standard numeric formatting and a minimum of three decimal places. To make it easy to refer to the Numberformat class, you should add an import statement for it. 7) Modify the code that displays the calculations so it uses the methods of the rectangle object to get the area and perimeter of the rectangle. (I would appreciate some clarification on what this is asking for). Overload the constructor 8) Open the rectangle class, then overload the constructor by supplying a second constructor that accepts two arguments: length and width. This constructor should get the length and width of the rectangle to the values supplied by these arguments. 9) Open the main class. Then modify the code so it uses this constructor instead of the zero argument constructor. 10) Add try and catch statements as needed. Thank you in advance! [link] [comments] |
Posted: 19 Oct 2018 12:14 AM PDT How do I get a Javascript Environment. I am using VS Code on Windows 10. I have downloaded Node.js but when I run the program in VS Code. It runs with python standards and when I went to change the environments, I couldn't find a java script environment. Can anyone help me? [link] [comments] |
Posted: 19 Oct 2018 12:13 AM PDT Probably a lot of these around here, so I apologize for that, but I've never really asked this sort of question. To keep it short, I started 3 weeks ago with mostly Python for my university course. I don't learn at all in lectures (for that reason I self study and skip lectures) and depending on how people package their words, I can often miss out on important information which lends to even more difficulty to cope. I gave a few exercises a go during the week and I couldn't complete a single one on my own. I'm not basing my competence in this field from a few weeks of course, but I'm curious for any advice on coping and possibly suggestions for online materials too. [link] [comments] |
Posted: 19 Oct 2018 12:12 AM PDT Hello guys...i need your help...i was messing with the scrapy earlier, but for some reason my script doesnt work Here is the results: [link] [comments] |
Posted: 19 Oct 2018 12:06 AM PDT Let's say you have the following classes: Vehicle, Car, Bike Vehicle is the super-class and Car/Bike inherit from it, such that they are both siblings. I know the difference between these lines of code: Vehicle obj1 = new Vehicle(); Vehicle obj2 = new Car(); Vehicle obj3 = new Bike(); The object being instantiated in each line above is different. What I don't understand is what the difference is between these 2 lines of code: Car obj4 = new Car(); Vehicle obj5 = new Car(); To create a Car object in either case, the constructor of the parent class Vehicle ends up being called. I don't see any behavioral changes. A common example of this situation in code you have probably seen: List<String> lst = new ArrayList<>(); ArrayList<String> lst = new ArrayList<>(); What would be the difference in this case? I think this has something to do with run-time vs compile-time identity of the object, but I'm kinda lost with that. [link] [comments] |
[C++] Why do we need to overload the assignment operator along with the copy constructor? Posted: 18 Oct 2018 11:29 PM PDT I am learning about the rule of 3. The destructor and the copy constructor makes sense, but why the assignment operator? What would happen if I only overload my copy constructor and create destructor but do not overload my assignment operator? *not sure if this also pertains to other languages, I am primarily working with C++ [link] [comments] |
How to know when your ready for a programming internship? Posted: 18 Oct 2018 03:30 PM PDT So I've been self studying for a little over a year now. I don't any experience but I know the basics of HTML5, CSS3, JavaScript, PHP, SQL and MySQL. I've gotten to the point where I've worked on a few personal projects but I feel like I can only get so far on my own. I would love an opportunity to intern somewhere and gain experience and mentorship. I just don't know if I'm ready. I've recently started to get deeper into OOP and writing abstract code and more advanced concepts in Js and PHP. But I haven't had a reason in my project to use PHP interfaces or traits for example. And I've dipped my toes in debugging. I also find it hard to understand other peoples code. Should I learn how to write more abstract and advanced code first? or focus on studying other peoples projects and contribute to open source. Idk what do you guys think? [link] [comments] |
[C++] Question about Destructor Posted: 18 Oct 2018 10:37 PM PDT Not sure if this relates to other languages as well.... but im primarily working with C++ I understand what a destructor does for the most part. You create an object that has a dynamic array, that array gets allocated, we delete the object and the memory stays behind if we dont have our destructor. What im mosly confused about is, the "object goes away part" im doing mainly small programs so in these programs i have not had to use temporary objects. When is an example where a constructor would be useful? when will I ever use a temporary object? [link] [comments] |
Can I get access to hardware IO ports in Win10? Posted: 18 Oct 2018 10:26 PM PDT For example 0x40-0x43 for integrated timer circuit. Normally OS denies direct access, but I know that in Linux there's system call ioperm at 0x65, which allows it. done as root gives direct access to ports 40h - 70h. I couldn't find anything for Windows, google is all about network ports. Is it even possible? [link] [comments] |
I need help embracing algorithms Posted: 18 Oct 2018 10:22 PM PDT My programming skills aren't the best and need real polishing as I am beginner. Right now I am reading introduction to Algorithms: by Thomas H. cormen, Charles E. Leiserson, Ronald l. Riverst and CLifford Stein Third edition . I've also decided to dedicated myself to learning C++ and SQL mainly for my first semester at uni. Also these are the type of questions I am dealing with for algorithms exam based .I really want to enhance my skills this year advice is really appreciated. One of the weekly tasks I have been given is included in the link with the Algorithm questions I am dealing with . I need help with breaking it down, writing the code and finding its solution.Get me into the mindset I need to be at . Obviously I know what I am looking for is the most affective way of breaking it down for code step by step.The link can be found below in my comment. [link] [comments] |
php - logging in as the username in the database rather then the username entered. Posted: 18 Oct 2018 10:18 PM PDT Not at my computer right now so I can't supply code but I was wondering what the best method of doing this would be? The current login script I'm using doesn't store the database value it finds to a variable, it just logs you in as whatever you entered your username as, case and all, which causes problems later on as functions like following and favoriting come in to play. What would be the best command to log my user in as the username in the database rather then the one they entered? [link] [comments] |
Posted: 18 Oct 2018 06:30 PM PDT I'm leaning c and its my first time using arrays, i was trying to assign the values in the array to integers so that i could print them. Sorry if you get angered by my post, just trying to get some help. The problem is that, while it compiles and runs up till it hits this code and then says it hit an exception(?) and asks me to break Also I'm restricted to using stdio.h time.h and stdlib.h [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