• Breaking News

    Thursday, February 13, 2020

    Why "Do a project" may not be the best advice for beginners. learn programming

    Why "Do a project" may not be the best advice for beginners. learn programming


    Why "Do a project" may not be the best advice for beginners.

    Posted: 12 Feb 2020 05:16 AM PST

    Lately, I've been tutoring a colleague who is a mainframe programmer on Java as much of the code he maintained has now been converted to Java.

    Quite frequently, I read advice that says "Do a project". These are for beginning programmers who are finding tutorials tedious or finding it hard to motivate themselves.

    Many programmers have programmed long enough that they can't really conceive of what it was like when the first started to program. Quite frequently, you hear them say "Programming is easy. Anyone can learn". To them, it is easy. It doesn't seem to require deep mathematical knowledge. A few if-statements and loops and functions, and the code does what you say. How could anyone find these concepts difficult.

    So, naturally, they say things like "build a project" as if the person they're talking to finds if-statements and loops and functions easy.

    I've had to explain what parameter passing mean, what a stack is, how the stack the heap differ. I've had to explain how a Java for-loop works. The difference between primitive and object types. Yesterday, I answered a question in the subreddit of the difference between static and non-static Java methods. The difference between local variables, instance variables, function parameters. The difference between a function call and a function definition.

    To program, you need to be able to mentally follow the code, step by step. You should know how the values changes as each line runs. I recently explained to my colleague how naming your variables well helps you understand your program. Because he named the variable badly, he ended up thinking the variable stored a certain kind of data, when it stored a different kind of data. Had he traced out the code (meaning, followed it step by step), he would have known better, but that is a level of tedium not everyone masters, so they rely on variable names to tell them what it does, rather than what the code is actually doing.

    An analogy might be that someone is new to a country, and wants to see the country, but they've never seen a car, a paved road, traffic lights, a gas station, and so forth, and they're asked "Plan a trip" as if learning to drive, learning to figure out traffic laws, etc. is pretty straight forward, and the interesting part is the traveling.

    If you don't understand the fundamentals of programming in a language, then you'll find yourself frustrated with whatever project you do. And the project that a beginner picks is often a little too difficult ("I want to make a Facebook clone" or even "I want to be able to take pizza orders"), esp. if the person is still struggling with writing basic programs (how do I find the maximum value in an array) or organizing a lot of code. It's just like how early AI researchers used to think things that are easy for humans (recognizing faces) would be easy to achieve in AI, only to discover that they are really difficult (where as chess playing programs are easier to program for, but hard for humans).

    So for those of you that have been told to "build a project" and find you are not able to do so, it may just be that you haven't learned to walk, but you've been told to run.

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

    What are some blogs/podcasts/YT channels you enjoy following on programming?

    Posted: 12 Feb 2020 09:17 PM PST

    Hey all. I've recently wanted to get more into curating content on topics that I'm interested in. Usually, my way of finding new content is to scroll through Reddit and YouTube hoping to find something that seems like it'll be enjoyable to read/listen/watch. While this does tend to get the job done, I sometimes find that I'll spend more time scrolling than actually looking at content. While Googling could lead me to plenty of resources; I'm wanting to hear from people on Reddit, and why you enjoy whatever you decide to list out. I'm hoping that this will be useful for more people than just myself!

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

    How are GUIs built in the industry

    Posted: 12 Feb 2020 09:39 PM PST

    I've used things like Swing and JavaFX, but are these really what professionals use to built programs. Are widely used programs' UI built in tools like Swing or is their other tools which the industry prefers

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

    Is there an issue with always having to look up how to do something? Is coding just not for me?

    Posted: 12 Feb 2020 07:36 PM PST

    I've been learning how to code sense high school and I am in my mid 20's and I still to this day have to look up things. And when I say look up something I mean even the most basic things. But here's the thing. I KNOW how to read code really well. If you give me code I can read that shit and understand it but if you tell me to type up something I'll look up the correct way to write an if statement 30x's over!

    Is this bad?

    I've always been like this mind you. I always had trouble learning the "exact" way of doing something; like vocab. Vocab was and still is my worst subject as my memory is just shit. And hell, it's not just learning my memory is shit in general! Someone will give me their name/number and I'll forget in the next 10 minutes. Even if I was devoting my 100% attention.

    And at first I didn't think this was an issue, but finding a job in the field is becoming such a pain as when I need to take these "programming tests" I feel I am just doing god awful in them!

    So, what can I do? Should I just keep at it and one day hope it sticks? Is this not that big of a deal? And, should I just give up in general? I actually have another programming test for a game company and I am freaking out because I really don't want to fuck this up but probably will...

    Sorry if this doesn't belong here and if it seems ranty. I just don't know what to do at this point.

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

    If I clone an entire server’s tech stack will I have my own developers environment?

    Posted: 12 Feb 2020 09:58 PM PST

    If a server is running a LAMP stack and I clone the stack, by spinning up a CentOS 7, downloading and running Apache, mariaDB, PHP (symfony and compose) then scp all the relevant directories of the server and just have the conf.d folder point to a different URL, would this in practice be my own developers environment?

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

    Looking for an accountability partner for programming.

    Posted: 12 Feb 2020 11:48 PM PST

    I am 27 years old looking to get a career in software engineering. I'm just looking for an accountability partner who's on the same path as mine. I want someone with preferably the same skill levels in regards to code and computer science. Due to working 40-50 hours/week in a bs job that gets me by, it's not easy to get the amount of studying I want into the day. I get off of work the latest 5-6pm PST and we will keep each other accountable every night and go through what have we done to make progress that day. The goal is to get in 2.5-3 hrs of work on a weekday and more on the weekends. The track is full-stack javascript web-development, with no exceptions. Let's change our lives and get rid of the excuses. I am sick of making them.

    A little bit about me. I was born in China but raised in New York City. I moved to the Bay Area to pursue a career in tech.

    Age: 27

    Location: San Francisco, California

    Hobbies outside of Programming: Boxing/combat sports, functional training, Stand-up comedy, cooking homemade meals, reading books off my kindle

    Right now I am currently reviewing code academy, getting more certs on freecodecamp, and doing bootcamp prep courses. I do not plan on attending a bootcamp though.

    Thank you, I hope to hear from you.

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

    Need advice - Do the big companies like FAANG care about your projects/personal portfolio if you already have guarantee of a first round through various recruiters?

    Posted: 12 Feb 2020 07:54 PM PST

    For background, I have a Masters in CS from a reputed university in USA and have 1+ year of experience now working for a retail giant (not Amazon) as an Android Developer in Bay Area. I also have 2 years of prior experience as a backend developer before moving to US.

    I'm now preparing for the FAAN(M?)G companies and want to join as a software engineer, preferably not in Android (I feel like I perform better on backend roles). I'm already studying on the DS&A + system design part of interview prep, but confused on what I highlight as my interests.

    Should I take advantage of my Android experience in a giant tech company, where I've been fortunate to roll out some really cool features, or should I go back to preparing for backend roles(lot has been updated since, MEAN stack, MERN stack, Postgresql etc. it's a lot to catch up on, albeit I'd love to). Do I even need to focus on tech stack that much? I've heard companies like Google don't even ask anything other than DS&A + system designing - they extend the offer and then decide on the teams we could be a good fit for. But if I need to, and preparing for more backend engineering roles, how do I show that in my portfolio/profile?

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

    Can someone explain this to me? [JavaScript]

    Posted: 12 Feb 2020 09:13 PM PST

    I don't understand how I have a "Bad Path" when clicking the start button. I have no bugs in my console as the page changes as soon as I click the start button so I can't figure this out. Any help would be much appreciated :)

    https://codepen.io/pearlslugs/pen/NWqGJjK

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

    Teaching Little Brother to Code

    Posted: 12 Feb 2020 11:21 PM PST

    Hi all,

    I am assisting my brother in finishing some high school credits his senior year and he will have about 10 hours a week for 6-8 weeks to continue my "tech-themed mentorship".

    He said he found his first experience writing Python functions to be fun, so I want to find some sort of cohesive project or online course to stick him in. I'm not looking for videos on YouTube, but rather a good beginner project for complete coding nubes and/or a video course that holds your hand.

    Thanks!

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

    Practicing logical thinking

    Posted: 12 Feb 2020 09:04 PM PST

    Hello everyone! I am currently in HS freshman year, studying CS 1 (Visual Basic) in school and python outside of school. My main problem is solving the problem in the code. I am really good with memorizing how to do everything about coding, but I always had problem with "thinking outside of the box". Outside of classic "do more projects" Are there any books, courses, lectures, classes, exercises etc. to fix this problem? Thanks to everyone who will and will not respond!

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

    Lacking motivation . Please help

    Posted: 12 Feb 2020 06:59 PM PST

    Hi guys , I'm currently in college (CC) 2 year and about to earn my AS in computer science next semester . To be completely honest I don't like school never was good at it especially math and I always have trouble being motivated for coding. It's honestly just hard for me to really get into something and love it. I truly only did computer science because I found it pretty cool learning different languages. I just wanna know , what do you guys do for motivation to continue coding, what can I do to improve my motivation and how can I get better, should I even continue at this point, if not what are some options that you think would interest me. Please someone help me out here .

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

    Java: Trying to create an abstract class with a subclass

    Posted: 12 Feb 2020 08:26 PM PST

    It's saying I need a return type in my class b method.

    package packageTest;

    // Abstract class

    abstract class a{

    int num; abstract int eat(); 

    }

    // Subclass

    class b extends a{

    int eat(){ System.out.print(num); 

    } 

    }

    public class Test8 {

    public static void main(String\[\] args) { } 

    }

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

    How do I understand a git repo when trying to contribute?

    Posted: 12 Feb 2020 09:56 PM PST

    Hello. I've been wanting to help in open source programs to get experience, but every repo I find is way too big for me to understand.

    I read the readme, I read the Contributing.md, I go to the issues page..... and I get lost. Most issues are short sentences with no way to comprehend where to start if you've never contributed to said repo.

    Can someone give me a complete tutorial on how to understand issues to start contributing?

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

    Word File Program

    Posted: 12 Feb 2020 09:50 PM PST

    Hey guys,

    My program is supposed to read of a word puzzle file and use a dictionary file to output the unscrambled words. However, it gets stuck after only two words.

    #include <iostream>
    #include <fstream>
    #include <string>
    #include <iomanip>

    using namespace std;

    int main()
    {
    int position = 0, counter = 0;;
    bool found = false;

    string scramble = "";
    string test_word = "";
    string word = "";
    ifstream dictionary("dictionary_four_letter_words.txt");
    ifstream wp("word_puzzle.txt");

    while (!wp.eof())
    {
    getline(wp, scramble);

    while (position <= scramble.length() - 4)
    {
    test_word = scramble.substr(position, 4);

    while (!dictionary.eof())
    {

    dictionary >> word;
    counter++;
    if (word == test_word)
    {
    cout << test_word;
    cout << endl;
    found = true;
    }
    }

    dictionary.clear();
    dictionary.seekg(0, ios::beg);
    position++;
    counter = 0;
    found = false;
    }
    }
    }

    Any advice?

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

    C# List Vs ArrayList

    Posted: 12 Feb 2020 09:18 PM PST

    What's the difference between List and ArrayList in C#?

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

    [Java] Polynomial Addition, Evaluation, and Multiplication using a Singly-Linked List

    Posted: 12 Feb 2020 09:06 PM PST

    Hi, everyone. I don't usually like to go around begging for people's time and effort for little in return, but I'm really at my wit's end over this project and could really use some help. Looking around on this subreddit gave some hints as to where I should go to resolve this issue, but this current assignment is kind of different than what previous posts have described.

    I need help with the following Java data structures exercise. I have been working on this assignment for about a week-and-a-half nonstop and have exhausted every other resource available to me. I need to write methods that add, multiply, and evaluate a polynomial, represented by a singly-linked-list with two fields:

    • a Term object, which in turn consists of:
      • coeff, the coefficient of a polynomial term, which is a float
      • degree, the exponent of a term, which is an int
    • a Node object, which acts just as a pointer to another Node

    The code in the Polynomial.java class I have written so far is here: https://pastebin.com/PXYrN7A6

    The documentation reads:

    A polynomial may be represented using a linked list as follows: for every term in the polynomial there is one entry in the linked list consisting of the term's coefficient and degree. The entries are ordered according to ASCENDING values of degree, i.e. lowest degree term first, then next lowest degree term and so on, all the way up to the highest degree term. IMPORTANT: Zero-coefficient terms are NOT stored.

    For example, the following polynomial

    4x^5 - 2x^3 + 2x + 3

    can be represented as the linked list of terms:

    (3,0) -> (2,1) -> (-2,3) -> (4,5)

    You will see a project called Polynomial with the following classes in package poly:

    Node ( https://pastebin.com/U4ej5dJt )

    Term ( https://pastebin.com/sgGa7Qea )

    Polynomial ( https://pastebin.com/PXYrN7A6 )

    Polytest ( https://pastebin.com/pgKZD9BD )

    Full documentation is available here: https://www.scribd.com/document/446843379/Instructions?secret_password=wWDt4fQ2pk5Df0RKXxEj

    Also provided are three sample .TXT files, which are to be loaded in using Polytest: https://gofile.io/?c=r4lKqs

    Most of my troubles come from multiplying and simplifying the product. The program will output a polynomial where the last term is randomly added to every other term, or it might just skip a term at random - it's really kind of a mess and I could use more major scrutiny over what exactly I'm doing wrong. Tracing over and over hasn't revealed anything so far.

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

    How do you solve the problem that you face when you program?

    Posted: 12 Feb 2020 06:19 PM PST

    I assume the google is the best friend for all programmers from beginner to advanced, and it is the place I always go to find the answers.

    However, when I read the questions and answers that pops up, normally it is always filled with the code that I don't understand. I don't know because it has to do with the fact that I can't understand other's code well.

    So my question is...

    - What should you do when you don't understand the answers at stackoverflow or google, that contains the code you don't understand? You can feel it's the right solution but only thing is I don't understand that code in the answer

    This maybe related to the general problem solving as well.

    If you guys could give me some helpful tips it will be appreciated.

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

    Help me to understand what instantiating means - Java

    Posted: 12 Feb 2020 04:38 PM PST

    First correct me if I am wrong.

    Instantiating just means creating an instance of a class, right?

    If I have a class Pets, and I create a new pet object - this means I just instantiated, right? I created an instance, in this case an object, of the class Pets.

    Can I instantiate other things other than objects? Does that mean when I call a method from Pets class, that means I created an instance of that Class, in this case a method?

    If my above is correct, my deeper question is below.

    I can't understand when it says,

    Let's first create the superclass. Note the usage of abstract keyword in class definition. This marks the class to be abstract, which means it can not be instantiated directly." 

    This is from the site, https://javatutorial.net/java-abstraction-example, a couple paragraphs down.

    You can instantiate a class? How?

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

    cross border payment dapp (decentralised application)

    Posted: 12 Feb 2020 05:46 PM PST

    I am trying to implement a cross border payment dapp using smart contracts. However, I have recently learnt that this may not be possible because fiat currency cannot be convert to or from ether. But I would like to know if there is a way to "simulate" this as it is part of my final year project so it doesn't have to be production ready or anything.

    Any suggestions as to how i could implement this so I can show peer to peer transactions with currency conversions?

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

    Unsure which language to learn first.

    Posted: 12 Feb 2020 11:42 PM PST

    I'm still in highschool and I just started getting interested in programming and computer science. I feel motivated to learn and spend a lot of time on some languages but I'm not sure where to start. I'm interested in C++ and have learned a little but I'm not sure if I really want to commit to C++. I have heard that Python is easier so I feel conflicted on which one to start off with.

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

    How do I tell my teammate multithreading is completely unnecessary for a simple game?

    Posted: 12 Feb 2020 11:32 PM PST

    We're making a trading game in JavaFX for a class. Our game has a dashboard with three elements that update when one element changes. My initial plan was to use an update function, but we ran into some issues.

    The teammate implemented a timer system, which brings multithreading to the table. However, his implementation is extremely inefficient, as it updates the elements every tick, even when it doesn't need to.

    I found a fix for my plan and I am confident it will work, but the only hurdle is the fact that my teammate is stubborn about using multithreading because he thinks it's cool and it's helping us.

    I want to tell him that his method is inefficient and will be more cumbersome in the future, but I know he's just going to say that we already implemented his way (and this is supposed to be a class about agile methodology).

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

    Getter/Setter in Java

    Posted: 12 Feb 2020 05:32 PM PST

    Can someone explain why getters and setters are ordered the way they are? Say there is something like this:

    public int getNumberOfYears() { return numberOfYears; }

    public void setNumberOfYears(int numberOfYears) { this.numberOfYears = numberOfYears; }

    From my understanding, numberOfYears is returned to the main method by the getter, and then a new value is set by the setter afterward. Is that the right order? I'm confused why numberOfYears would be returned to the main method before its value gets set by the setter. How does the new value get returned to the main method if that is the case?

    Hopefully my questions make sense. Thanks for any help you can offer.

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

    Creating binary files (incorrectly)?

    Posted: 12 Feb 2020 11:11 PM PST

    I'm writing a program that deals with some basic binary files and I'm not sure if I'm on the right track. Basically, the program takes these binary files as input, but don't know if I'm forming them correctly. Here's an example from the spec (modified):

    file.bin contains these bytes: 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 hexdump file.bin gives this output: 00000000 20 21 22 23 24 25 26 27 |........| 00000008 

    I'm pretty far into my CS career so I get how bytes and chars are effectively the same, but the actual code for creating the bins is giving me issues because I don't have much experience with low-level stuff like this. I've just been writing a rudimentary C++ program that uses filestreams to print the raw bytes 0x20, 0x21, etc. to a text file. But a hexdump of this bin file yields

    00000000 2120 2322 2524 2726 |........| 00000008 

    This doesn't seem too crazy to me, it looks like hexdump is confusing the grouping/endianness of these bytes. But my question is: am I using hexdump wrong? Am I misinterpreting the spec?

    Sorry for the late-night, semi-vague question. Going a bit crazy lol

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

    What is agile development?

    Posted: 12 Feb 2020 11:09 PM PST

    I'm just seeing this textbook it seems like its full of just flurry words.

    Is agile development same as " lets just freaking develop an app and lets see how it goes"?

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

    responsive web pages- followed guide and it isn't working?

    Posted: 12 Feb 2020 11:09 PM PST

    so i followed this youtube video that basically said all you have to do is give your elements 1. a min height and 2. margin-left:10%; and margin-right: 10%; and it will scale to phone screens or pc screens automatically. so i tried it on one of my recently finished freecodecamp project sites and it didnt work. here is the video guide im talking about. he shows you how it works at about the 2:10 mark.

    i only did the body and the main elements, because i figured every other element is within those two elements. is that the problem? do i have to do literally every element? if so, what is the most efficient way to do this? do i need to create id's for literally every element?

    his example is super oversimplified, and as you can see in my project, i have a lot more elements

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

    No comments:

    Post a Comment