• Breaking News

    Tuesday, September 15, 2020

    Lessons for beginners and junior developers after 11 years of coding. Some of these are things I wish I knew at the beginning so I could stress less. learn programming

    Lessons for beginners and junior developers after 11 years of coding. Some of these are things I wish I knew at the beginning so I could stress less. learn programming


    Lessons for beginners and junior developers after 11 years of coding. Some of these are things I wish I knew at the beginning so I could stress less.

    Posted: 15 Sep 2020 09:12 AM PDT

    Let's jump into it.

    All tutorials are not created equal

    Imagine yourself as a lab rat.

    As you learn and experiment, pay attention to the kinds of tutorials that work for you. Many will not work. That's fine. In fact, that's exactly how experiments work until you find a solution.

    After you strike gold, stick to it, consume it voraciously and then find similar tutorials like that to continue rapid growth.

    When I started, I used to bang my head against Head First Java, the book. But after studying for many hours, I just wasn't getting anywhere. Yet, everyone online said it was the best book ever. But an old java youtube tutorials did it for me.

    I wish I could say this stopped after my 1st year.

    Fast forward 2 years down the line when I started learning algorithms and ALL the blog tutorials I followed just didn't make sense until I watched Youtube videos on Hungarian folk dance teaching algorithms.

    And it just clicked.

    Since then, my approach to learning has been to learn the same thing from multiple places until I find the instructor and style that works for me.

    Work within fear; not against it

    I'll admit: this one is easier than done.

    But you have to master this if you want to last long.

    There's this temptation to fix your fear first before you continue to learn. Unfortunately, it doesn't work like that.

    In fact, you'll spend a lot of time trying to make your fear disappear that it'll only double your anxiety. You have to find a way – your way – to acknowledge that you're afraid, and frankly will continue to be afraid for a long time, then work within that realization. No need to fight it.

    Sometimes, this fear disappears as you become more proficient.

    Other times, it vanishes for a while and comes back when you get into a new environment, work with smart people, or move to a completely new stack.

    It's okay.

    This IS the life.

    It's a sinusoidal wave – endlessly going up and down. Don't take it too seriously or you'll lose yourself.

    You'll forget a lot of things

    Deeply understanding this will change how you learn.

    I can't can't the number of times I took Introduction to Python programming on Udacity, Coursera, etc and still forgot everything.

    It's so annoying.

    But I've since learned that you'll forget anything you learn in isolated exercises because they are stored in short term memory. Neuroscience research shows that this is just how the brain works.

    If you don't want to forget, test your knowledge using spaced repetitions. To do this, build projects.

    I'll give you a concrete example: len(myList) will give you the length of a list in Python. You'll learn this in Udacity's intro course.

    Come back a month later and you might not remember if it's len, length() or myList.size( ).

    But with spaced repetition through a project, the outcome is different. For example, you work on a 2-month long Django app for new coders where you need to count multiple times the number of users, the number of exercises done, the number of chats, etc. Imagine doing this throughout the span of the project, for two months. it's hard to forget what len( ) does.

    This is a trivial example, but hopefully you get the idea.

    New learners can start with simple, isolated examples.

    But if you're not practicing within the scope of a project that makes you use and reuse what you've learned, nothing is going into your long term memory; it's all short-term. And you'll forget.

    Consistency > hard work

    Consistency is king.

    When you start learning, you lay down neural pathways that make it easier to retrieve information. According to Neuroscience research, these pathways only get strong through frequency of use, not just intensity.

    This means 30 minutes a day, for 5 days a week is way better than 2.5 hours one day, only once a week.

    Same hours; Different impact.

    Don't just work hard, apply wisdom here.

    Talent = hidden practice

    It's easy to dismiss progress as talent.

    My first programming class was in C++ and my classmates refused to believe I had never coded before because I was just-so-talented.

    But what they also refused to accept was that right after class, I would spend five hours typing cout << "this is my first program", realize it didn't run because I forgot a semicolon; retype it and realize it didn't print out my statement on a new line because I didn't add endl.

    This deliberate practice built perceived talent.

    Talent is sexier than hustle so no one wants to hear that you worked hard and got here. Just tell me you were born this way - it's more believable.

    But becoming a proficient developer is like playing an instrument.

    Only a tiny few are born talented.

    The majority can only get as good as the amount of practice they put in. And you can immediately tell a student hasn't been practicing the moment they sit at the keyboard.

    You'll meet a**holes

    I'm not sure what it is about this field that attracts a**holes. Maybe because coding gives the feeling of having a super-power or a rare skill.

    If you're a newbie, you'll meet those who've been coding for years and think no one else should come in.

    A windows developer only? You'll meet linux fanatics that think you're mediocre.

    If you're a woman, you'll immediately be dismissed because of your gender. I know this from personal stories from colleagues over the years.

    If you're a minority, you'll meet people who think you should only fetch coffee; not code.

    If you're coming from another field (particularly not STEM), you'll meet people who automatically make themselves gatekeepers of the programming community. "We don't want social scientists here; we're purists!"

    They're online. At work. And sadly sometimes in your family.

    It's not if you'll meet them, it's when.

    Learn to move on.

    Things are getting better but there's still a lot to do to educate people.

    But don't let this deter you. Build your resilience so you don't quit after you meet these people.

    And when you get to the top don't be an a**hole.

    Master 1 thing

    New devs tend to jump around learning a lot of things.

    Okay, it's not just new devs; it's also experienced folks.

    You learned React for one week.

    Then Django for two weeks.

    Laravel for three.

    Stop.

    You need to wake up and realize that the harsh truth is that you're simply extending the time it'll take you to truly learn anything.

    "If one is a master of one thing and understands one thing well, one has at the same time, insight into and understanding of many things." - Vincent Van Gogh

    Pick one thing.

    Stick with it for a few months – ideally 6 to 12 months before you move to something else.

    This has two benefits:

    1. You'll go deep enough and hit critical mass that moves you towards mastery.
    2. After you master one domain, you can transfer knowledge to another.Learn Flask and you can easily walk into Django. Learn React deeply, and you can quickly identify the pros and cons of Laravel within a few days.

    Software dev is an ever evolving field.

    It's exciting.

    It's frustrating.

    It's intimidating.

    But if I had to, I'd do it all over again.

    Thanks for reading

    If you have any questions, let me know.

    I'm trying out a new initiative to help new developers feel less overwhelmed and learn smarter.

    To be honest, I'm not sure what this looks like yet. But I'm putting together some resources and write-ups based on what people need the most help with.

    If you're interested, I'm @LifeTechPsych on Twitter. Feel free to DM me what you'd need help with.

    Heads up - I love research so I tend to back my advice and approach with concepts from Behavioral Psychology and Neuroscience.

    Edit: removed mention of old java youtube tutorial I used back in the day but I see is now discouraged.

    submitted by /u/a-gentility
    [link] [comments]

    Is this just a math question or some tricky computer/coding question?

    Posted: 15 Sep 2020 08:13 PM PDT

    Here's the link the the question. So I did part 1 and wrote the program. Of course, it gives an answer that doesn't match with the real derivative. This is just because h changes the accuracy of the result right? Because as h approaches 0, the number gets closer to the value of the actual derivative. Is there something I'm missing?

    submitted by /u/4ust1n0-
    [link] [comments]

    I feel like I'm never going to make it

    Posted: 15 Sep 2020 06:23 PM PDT

    I'm learning Python, I'm on the OOP part, inheritance, data abstraction, encapsulation.

    I've been watching videos for like 3 hours now and I find it complicated. I don't want to quit but I feel like I'm never going to make it, I first understand the beginning but then when they move to the exercises I start having issues where I don't understand them, I sometimes feel like I lack logic.

    I just finished watching some videos and I decided to close the laptop and distract myself as I felt like it was too much information. I'm new to programming and I actually need to learn it because I like it but also because I'm sick and tired of low end jobs and I need a change in my life. I have been in a very dark place in my life and I believe Programming can put an end to this and that's why I'm not quitting but damn, this is so difficult right now, I want to be like the people I see on the subreddit, or the you tubers who code really fast. I just feel slow and retarded atm.

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

    Logistic Regression Help

    Posted: 15 Sep 2020 09:11 PM PDT

    Hi, I've been trying to implement machine learning algorithms and practices from scratch, and after linear regression, multivariate linear regression, normalization, and regularization, I figured logistic regression should be next.

    I've managed fine with the general structure, sigmoid function, and cost, but I really cannot figure out how to update the gradient; it just doesn't seem to come out correctly no matter what I do. I also suspect that I'm not using MatPlotLib correctly, but that may just be because it's not updating correctly.

    I'm posting my notebook here: https://colab.research.google.com/drive/1ohBUpLEZAbhspZnIwVokkmznhHnlQfEl#scrollTo=Vq94v07LlLDo. If you'd be willing to take a look at it, I'd really appreciate it. The dataset I'm using is also found at the bottom of the notebook. Thank you.

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

    Where to store programs?

    Posted: 15 Sep 2020 10:54 PM PDT

    Currently a Comp Sci student, where should I store my programs? Whether it be my own practice/projects or school assignments. Should I just save all of them on a folder on my macbook?

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

    What does “path variable” mean?

    Posted: 15 Sep 2020 10:48 PM PDT

    I'm installing Pycharm and in the process it asks to update path variable (add lauchers dir to path) what does this mean? And should it be toggled on if I'm using pycharm to submit work?

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

    Small accomplishment...

    Posted: 15 Sep 2020 10:27 PM PDT

    I just finished the basic html module on freecodecamp and afterwards opened up notepad and wrote myself a little "site" using what I learned and it was so cool being able to open it up in chrome and see what I wrote displayed! I actually put an input field for text, made buttons with text besides it that could be clicked, and even hyperlinked something by nesting the href element! I hope I remember this all by tomorrow lol.

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

    Best IP geolocation for a map based web app

    Posted: 15 Sep 2020 08:06 PM PDT

    Hey there,

    I am currently using the HTML IP geolocation API for a webapp. However I'm finding the accuracy to be woefully bad. Is there a better API to use to better pinpoint the users location on both computer or mobile?

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

    I've an interview scheduled in 2 hours, most probably they are going to ask questions on dotNet, c#. I don't know anything.

    Posted: 15 Sep 2020 11:43 PM PDT

    What should I do? Should I call them and save time for them? Or just not attend the zoom call?

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

    Why isn't HTML/CSS used for the UI of desktop and mobile apps?

    Posted: 15 Sep 2020 11:34 PM PDT

    UI applications for desktop seem so difficult to develop compared to web UI. Why don't we have some technology which lets us use HTML/CSS for UI of desktop applications?

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

    meaning of FMT in this code

    Posted: 15 Sep 2020 11:21 PM PDT

    Hi I'm a beginner and I'm learning by book called "C primer plus" by Addison Wesley.

    And there's a sample code in the book at page 713 following:

    /*preproc.c -- simple preprocessor examples*/ #include <stdio.h> #define TWO 2 /*you can use comments if you like*/ #define OW "Consistency is the last refuge of the unimagina\ tive. - Oscar Wilde" /* a backslash continues a definition*/ /* to the next line*/ #define FOUR TWO*TWO #define PX printf("X is %d.\n",x) int main(void) { int x = TWO; PX; x = FOUR; printf(FMT, x); printf("%s\n,OW"); printf("TWO: OW\n"); return 0; } 

    It seems it works well as the author explains "In the next line

    printf (FMT, x);

    becomes

    printf("X is %d.\n",x);

    as FMT is replaced by the corresponding string."

    but it doesn't work on my visual studio and since 'FMT' is not defined and I think so too.

    Where does FMT come from? and why does the author not mention any error and explain the code like it works fine?

    If anyone knows this and comments, it'll be very much appreciated, Thank you!

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

    Can't understand the concept of polymorphism

    Posted: 15 Sep 2020 11:10 PM PDT

    I have read a lot of articles about polymorphism but can't wrap my head around because they all use the same analogy same name different implementation and use those eli5 examples like Car , animals etc. But when I see there code , it feels like it can be happen through inheritance why would you use polymorphism for that. So the programmer of reddit , if you have used polymorphism anywhere where other approach were not suitable then please share , so that I can learn what is exactly happening in polymorphism. What problems do polymorphism solve?Or you can redirect me to any article if you like.

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

    need some help learning java

    Posted: 15 Sep 2020 10:57 PM PDT

    Can someone please help me write a code for this?

    Write a complete java program in a class named Difference that prints the following output:

    What is the difference between a ' and a "? Or between a " and a \"?

    One is what we see when we're typing our program. The other is what appears on the "console."

    If someone would assist me it would be very appreciated it is BJP4 Exercize 1.4 in my book.

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

    Paginate jinja template items with Javascript on the frontend?

    Posted: 15 Sep 2020 10:56 PM PDT

    Does anyone know if there is a method to paginate items that aren't being stored in a database or are part of a model? I would like to do this on the frontend with javascript, but this project is being done in Flask. Im using this route below to make an api call and then passing the response object directly to my jinja template and creating bootstrap cards for each item in the response object. This data updates daily from the api, so I dont want to save it in a db. I have about 100 cards on each page, so it'd be nice to be able to paginate this info into 20 cards per page. Everything I've seen however seems to show pagination with queried items. My flask route is below

    @app.route('/search/member/<member_id>') def get_member_info(member_id): """Retrieve individual government official data on link click""" res_object = [] offset = 0 while offset <= 60: res = requests.get( f"{MEMBER_VOTE_POSITION_API}{member_id}/votes.json?offset={offset}", headers={'X-API-Key': key}) data = res.json() res_object.append(data) offset += 20 members_data = res_object return render_template('search/officials_voting.html', members_data=members_data, member_id=member_id ) 

    And my jinja template where I'm creating the cards for each item.

    <nav aria-label="Voting Records navigation"> <ul class="pagination justify-content-center"> <li class="page-item disabled"> <a class="page-link" href="#" tabindex="-1">Previous</a> </li> <li class="page-item"><a class="page-link" href="#">1</a></li> <li class="page-item"><a class="page-link" href="#">2</a></li> <li class="page-item"><a class="page-link" href="#">3</a></li> <li class="page-item"> <a class="page-link" href="#">Next</a> </li> </ul> </nav> {% for record in members_data %} {% for item in record['results'][0]['votes'] %} <div class="row justify-content-center mt-3"> <div class="card bg-white w-75 my-4"> <div class="card-header font-weight-bold"> <a href="/search/bill/{{item['bill']['bill_id']}}">{{item['bill']['bill_id']}}</a> </div> <div class="card-body bg-info"> <h5 class="card-title">Bill info - <span class="text-primary">{{item['bill']['title']}}</span></h5> <p class="card-text"><strong>Vote description: </strong>{{item['description']}}</p> <p class="card-text"><strong>Date of vote: </strong>{{item['date']}}</p> <p class="card-text"><strong>Vote result: </strong>{{item['result']}}</p> <p class="card-text"><strong>Latest action: </strong>{{item['bill']['latest_action']}}</p> <p class="card-text"><strong>Voting position: </strong><strong><u>{{item['position']}}</u></strong></p> </div> </div> </div> {% endfor %} {% endfor %} 

    I already have pagination links from bootstrap above the card element. Is there a simple way to handle this on the frontend with Javascript? Sorry for the long message

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

    Should I learn Data Structure and Algorithm using C?

    Posted: 15 Sep 2020 10:50 PM PDT

    I am a frontend developer. I learn JavaScript and currently learning React. I tried to improve my problem-solving skills and found that I am weak in logic building and the use of Algorithms. One of my friends suggested me to improve Data Structure and Algorithm using C programming.

    I am on a dilemma, should I learn to start learning C? if so can u suggest me a good source that I can improve.

    Thanks

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

    Working with API and VueJS resources

    Posted: 15 Sep 2020 10:42 PM PDT

    Hello!

    I have a interview in two weeks for a front end position. The technologies I've worked with are html, css and a little bit of javascript. My friend who works there told me that they will ask me about working with APIs, JSON data and my knowledge about VueJS and after that give me a home assignment. I have some theoretical knowledge but never worked with that stuff. I was wondering could someone link resources to learn about this? I know there is much resources but I don't wanna spend time finding the right one.

    I know two weeks is not enough but I wanna give it a shot. Thanks!

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

    Is there something like "hyperskill" but for C?

    Posted: 15 Sep 2020 10:16 PM PDT

    I like the idea of learning by working on a project so I was looking for a website that has different projects with different levels for beginners to learn

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

    Why do I find algorithm problems so difficult? Is it a matter of practice, theoretical background, or pure intelligence?

    Posted: 15 Sep 2020 02:19 AM PDT

    I don't have any formal training in algorithms and data structures. I'm currently looking for a job, but have failed all of my timed Leetcode-style coding challenges. I do have some activity on HackerRank, and have managed to solve a decent number of easy and medium problems, but it takes me 2+ hours rather than the typical 30-40 minutes.

    I have some basic experience with linked lists and binary trees, I've managed to implement some merge sort / quicksort, but that's about it. I'm aware of the existence of backtracking / divide & conquer / greedy / dynamic programming, but I don't know the respective algorithms per se, and can't identify which problems belong to which algorithm paradigms, upon seeing one. I'm good at language knowledge, OOP and that other stuff, and have junior-level working experience, but the algorithm stuff has always held me back from getting non-code monkey jobs. So that's where I'm at, roughly.

    I feel like I'm struggling inordinately with these problems. I need to reinvent the wheel for every problem. Sometimes I don't understand what I'm being asked to do. I tend to start with a naive and inefficient solution and then try to improve upon it, but I get stumped even trying to find the naive solution, and find myself staring blankly at the screen a lot. I can't easily figure out what my code does and why I haven't thought it out correctly.

    Would I have an easier time if I studied the theoretical underpinnings of algorithms? Do I simply need to grind Leetcode/HackerRank until I can do algorithms in my sleep? Or is it just a matter of intelligence, and any person with enough brainpower for this task would figure it out even in the absence of experience and formal training? (I've always thought I'm clearly at the high end of the intelligence spectrum, which is apparent in every other area of my life except this, but I'm fully prepared to accept the hypothesis that maybe it's a matter of innate capability. I wouldn't want to get myself into a career I'm neurologically not cut out for.)

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

    how to get rid of spacing when comparing 2 Strings?

    Posted: 15 Sep 2020 09:52 PM PDT

    So, I have learnt to use OrdinalIgnoreCase that is use in C# but now if there is a space in between the string, how should I go about comparing both String?

    Here's my attempt :

    string.Equals(a.Trim(), Target.Trim(), StringComparision.OrdinalIgnoreCase || a.Equals(Target, StringComparision.InvariantCultureCase 

    Target = Blah a

    String a = Blah a

    I have been working on this for many hours but this like any some other exercise I did, really stumped me.

    Would appreciate some help on above.

    Tks.

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

    Why wont my "Hello World" code work?

    Posted: 15 Sep 2020 09:36 PM PDT

    Whenever the user inputs their name, the program wont greet them by their name. Instead it just prints a 0. However if you input a integer in the variable, it prints the same value. Please help quick :( Thanks guys.

    #include <iostream>

    using namespace std;

    int main()

    {

    cout << "Hello! My name is Hector!\\n"; cout << "What is your name?"; int UserName; cin >> UserName; cout << "Hello!" << UserName; return 0; 

    }

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

    Where to learn about Neural Networks

    Posted: 15 Sep 2020 09:29 PM PDT

    So, I don't know if the Neural Network lessons online work... I'm curious about how effective they are.

    Also, do they teach Neural Networks in University CS courses? Or does one have to learn it elsewhere?

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

    File I/O for structs how to differentiate? (In C)

    Posted: 15 Sep 2020 09:26 PM PDT

    input looks something like this:

    2 fruitsapplesbananas

    2 vegetablescarrotbrocoli

    etcI have structs <fruits> and <vegetables>, I can read the whole file, but I only understand how to read what Im given into <fruits> with:

    fgets(string, string_length, fp);sscanf(string, "%d", &header); // where header is the total number of fruits/vegetables I have

    Im not sure how to stop reading fruits and start reading vegetables when they're separately declared but there doesn't seem to exist a function where I can just start or stop reading at a certain line, if I say wanted to determine the amount of vegetables how could i do that?

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

    I wrote a checklist for beginners designing their first database schema or ORM models. Useful?

    Posted: 15 Sep 2020 01:48 PM PDT

    Hey all,

    I've advised quite a few novice or intermediate coders on the topic of designing the first database schema (or ORM data model). Let me know if these are useful, or if you have any of your own ideas or checklists when designing a brand new database schema, or picking out what objects you want for your ORM / MVC framework's Models.

    I assembled these tips as a "check list" to use when you are designing your database:

    1. Think about "nouns" - your models (tables) should be the main "nouns" of data that you have to keep track of (e.g. Book, Author, BlogPost, etc). The methods (functions) should be the "verbs" (e.g. get_latest or update_messages) and the properties (columns) should be adjectives or relationships (e.g. popularity or color for adjectives, or creator for a relationship)
    2. Combine similar models - If two models (tables) seem almost the same, with maybe just one or two fields (columns) that are used only on one but not the other, just make them the same, and just skip using the fields (columns) that are specific to one when adding data for the other. For example, when developing the LiveSyllabus LMS, I was originally going to have separate models for Homework Assignments and for Reading Assignments.... but pretty quickly I realized they are almost identical, so it makes sense to store them in the same model (table) and have a category field to distinguish them.
    3. Simple and stable - No one likes lots of database migrations. So, try to design your models to last and not have to be changed often.
    4. Think visually - If it helps, think about how your application might function if it were in a spreadsheet. What columns do you need? Which values could be computed from other values?
    5. Compute what you can - Avoid storing things that change or are computed in your models. For example, even if the design requirements need to show "how many days until we want this to be published", what we really want to store is the unchanging "publish date". The publish date doesn't ever change, it simply is used to show or hide the article depending on the current time.
    6. Closely match what you present - Think in terms of "data" vs "presentation" -- what's stored in your models might be pretty close to what's presented, but it doesn't have to be. You are putting on a "show" for the user.
    7. Don't over-engineer it - Start small. Don't think of every possibility, just cover the top ones. Avoid Many To Many relationships if they are not needed -- at least at first. For example, while maybe theoretically think of a scenario where a Tweet might have many User accounts (Many to Many or n:n), but if possible start with each Tweet having only one User (One to Many or 1:n) until you finish other aspects of your software. Keep your product's design spec short and sweet. Also, avoid "Generic Foreign Keys" if you can!

    (Originally posted here, with slightly different formatting and a silly Star Trek-related GIF)

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

    How do I keep from being discouraged about not doing well in my first computer science class when the professor is unsatisfactory?

    Posted: 15 Sep 2020 09:06 PM PDT

    Please be kind. I've been in college long enough now to know a good professor from an unsatisfactory one.

    I'm taking computer science 1010 online. I would've done that with or without covid. I have minimal programming experience through work and I get the basis of it but I'm barely holding my head above water in my class.

    My professor is barely present and doesn't even use his own material to teach. The last two quizzes have averaged F's for the whole class and the last quiz specifically, only 2 people scored above a 50%. I've had the person I'm learning under at work take a look at my assignments with me and he cannot get them to execute properly either and the documents they're on are horrendous to read and follow. It's evident it's not just me but this class is the pathway for the rest of my degree. We're learning C++ through Linux and honestly, none of it makes any sense to me.

    How in the world am I supposed to make it through this class without getting totally discouraged?

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

    No comments:

    Post a Comment