• Breaking News

    Thursday, June 20, 2019

    Taking notes while learning programming. learn programming

    Taking notes while learning programming. learn programming


    Taking notes while learning programming.

    Posted: 20 Jun 2019 10:44 AM PDT

    I feel like my clogged brain is somehow free. I used to spent so much time on taking notes while learning. It assured me that things I might forget will always be in my notes. But it didn't give me any confidence to solve a problem independently. I felt like there is still so much to learn. Today is the the day I said f**k it. I took 2 pages long notes for 3 hours long content. Normally that would have been around 10-15 pages long. Notes make me feel secure but they are time consuming and they slowe me down and it is boring process too. But focusing more in material and less on notes is so much fun. It cultivates more attention to programming. I can connect past section of the course. But the doubt that I might forget is still there.

    TLDR: What are your opinions on taking notes? How do you review/revise what you have learned?

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

    I Want To Learn. Whatever it takes.

    Posted: 20 Jun 2019 09:26 PM PDT

    Hello!

    I want to learn how to code. I have no experience in coding, didn't learn it in school, and don't have coding friends. But still... I want to learn how to code so badly. Please help me.

    So I slowly started to learn a couple months ago.

    Naturally, I started by doing some Googling into programming languages. I decided to learn Python. I watched a few videos on Youtube and downloaded PyCharm at the suggestion of one of those videos. Completed my rite of passage: print("Hello World"). I assigned a few variables, used a few operators, all that stuff. Next, I wanted to learn some theory so I read a book called "Learn Python in One Day and Learn it Well". After that, I completed the Python 3 course on CodeAcademy. Then I did a Google search for beginner Python projects and wrote a few programs. Roll a dice, do MadLibs, play hangman, and a couple other things. Now I'm here.

    I don't feel like I've actually learned anything. All of the projects were essentially a copy&paste of code. I mean, I don't even really understand how my terminal works. What are the best practices?

    Eventually I want to do some Machine Learning or Data Science but right now I can barely open a clean sheet to start a new project. I tried to download pandas but that was so confusing. I still don't have it. I didn't even know what to download.

    I feel so defeated already. But I'm not giving up. I won't give up on this. I just need a bit of help.

    So for anyone so inclined to help a newbie, here are just a fav questions I have:

    • I have Windows 10 PC, how do I download and install pandas? • What are Python best practices? • How do I approach a new project? • What are the best ways to learn? • Is there a better terminal to use?

    Or anything else that you think that I'll need to know?

    Thanks

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

    My code is always really long and sometimes redundant and I'd like to learn how to fix that

    Posted: 20 Jun 2019 04:56 PM PDT

    I've been learning python for about 8 months or so, I recently started a CS degree and finished my first semester a month ago and even though I feel much more comfortable tackling problems with python I've noticed that every time I finish writing something and look for other solutions to compare my code to, my code is always longer than the solutions I'm finding. Sometimes it's simply a matter of many solutions using list comprehensions while I did not ( don't know much about those at the moment ) but sometimes I just seem to take the longest and least efficient way to arrive at the same solution as others I find online.

    Is this a normal problem with new programmers? Should I just keep doing what I'm doing and keep practicing and eventually I'll start finding quicker, more efficient solutions? Is there a book or a blog I can read that will help me condense my code and not be so redundant and inefficient?

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

    Are programmers good at working with different languages?

    Posted: 20 Jun 2019 08:42 PM PDT

    So I'm a beginning programmer with basic experience in Javascript but just recently started school and am required to learn a fair bit of java. I'm a little worried that as I progress with experience with java that I will somehow mix up what I learned from js and apply in Java and vice versa. Does this happen often? If so, how does one differentiate between what language they are using?

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

    How to learn data structures and algorithm??

    Posted: 20 Jun 2019 10:11 AM PDT

    I want learn data structures and algorithms. But I don't know how to begin with. What are the prerequisites for that? And do you recommend any special course or tutorial? Any help would be appreciated....

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

    Total beginner with no background in Maths: should I recognise my limitations?

    Posted: 20 Jun 2019 08:07 PM PDT

    I'm really interested in game development and have been since I was young. The tricky part is: I'm in my mid 20s and the last time I did Math/s it was a GCSE (16 years old). I got an A but I struggled - it's not a subject that I necessarily understand intuitively.

    My passions were music and literature, the latter of which I studied at uni. I won a monetary prize for a short story this year. I was in band for many years and now teach guitar lessons.

    I think I could apply this music and writing knowledge to game ideas that I have, but I feel that programming is possibly beyond me. Most good programmers seem to have been going for years, and have a Computer Science degree. Comparatively any understanding I can get in a few hours a week might be infantile.

    If I want to start making Unity games, where should I start - maths again? Computer science? C Sharp? Unity itself? The whole thing seems very daunting. Perhaps I should team up with a programmer or two instead. I'd really appreciate some guidance here.

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

    What does calling a function (with a return value) do if you don't assign it to anything? (C++)

    Posted: 20 Jun 2019 12:12 PM PDT

    For example, let's say I have a class square, and square has a member function size() that returns an int and takes no arguments. Let's also say I have a pointer called sp to an object of type square. I've been able to just write sp->size(); without assigning the int returned by the size() function to anything...is this bad to do? Where exactly is the int that got returned? Are there potential any memory-related problems here?

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

    How to run someone else's code from github?

    Posted: 20 Jun 2019 07:06 PM PDT

    Sometimes in my learning process I like to use github and find code that sounds interesting and see how it works. But there are often a few problems, such as the code doesn't have a running website to "see how it works" so I have to run it off my local server, but that also doesn't seem to work.

    Is it just a problem with versions? or is it a problem with my knowledge? Just feels like often times things are missing to run it.

    Ideally I'd like to just direct copy all kinds of code long hand and I think it can help expedite my learning. But if I can't get it to work in the first place it seems useless as a learning tool.

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

    Securing a web api with google authentication?

    Posted: 20 Jun 2019 06:52 PM PDT

    I want to create an app that uses google to log in and out. My plan was to have separate front end and backend. Both being dot net core, but I am having trouble finding a way to secure the api separately from the front end. All of the guides I have seen use dotnet core MVC with the authentication all happening in one application, not in a separate api. Any guidance is appreciated... I'm assuming JWTs need to be used.

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

    How can I learn quickly and efficiently this summer?

    Posted: 20 Jun 2019 06:49 PM PDT

    So, I will be taking an introductory data science course at a local university this summer (taught in Python). I always wanted to get into data science ever since I took my first introductory stats course, and I'm really excited for it. I'm not TOO worried about conceptual stuff, 'cause I've been exposed to code for a few years now. My question is, how can I learn efficiently?

    I won't have much time to 'study' and practice like I'd like to, and I'd like to do well in the course. What are the best strategies for that? I'll have to memorize a lot of functions, their uses, the parameters they take, etc. I'll be using a module called 'datascience' and 'numpy'. Should I take short notes? Should I make a sort of 'cheatsheet' with the functions and what they do, their docs, etc. ? Should I follow along in lecture with the code and keep note-taking to a minimum? What will help me the most? Thanks!

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

    How and when did you know you're no more a junior dev?

    Posted: 20 Jun 2019 08:15 PM PDT

    A question mostly for intermediate/senior developers

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

    Want to learn webdev to create my own website

    Posted: 20 Jun 2019 08:02 PM PDT

    Title. I know C# and been using it for making games over 5 months now. Not a long time, but i feel somewhat comfortable with it. I decided I want to learn more than just making games and I want to start by learning to code a website. What languages do i have to learn and how do I begin?

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

    Trying to understand how to pass methods and variables between classes, stuck.

    Posted: 20 Jun 2019 11:40 PM PDT

    I've been trying this for a while but can't get it working.

    So I have a superclass Duck with subclasses MallardDuck and RubberDuck in python. I can understand these lines of code:

    class Duck: def display(): pass class MallardDuck(Duck): def display(): print("I'm a Mallard!!") class RubberDuck(Duck): def display(): print("I'm not a duck...") 

    So, when I call MallardDuck.display() I see "I'm a Mallard!!". Very good.

    Task 1.) Now, what I want is for functions defined in Duck to be available for use in both subclasses.

    class Duck: def display(): pass def performQuack() #Added print("Quack! Quack!") class MallardDuck(Duck): def display(): print("I'm a Mallard!!") class RubberDuck(Duck): def display(): print("I'm not a duck...") 

    I thought that when I passed Duck as an argument to MallardDuck I could use functions defined in Duck? However, MallardDuck.performQuack() does not seem to work (AttributeError: type object 'MallardDuck' has no attribute 'performFly').

    Task 2.) RubberDucks don't quack, they squeak! I want to add variables to performQuack() that will set what sound the duck makes, and this variable will be defined when I create the ducks.

    How it works in my head: performQuack() is inherited by all ducks (the first problem), and when say RubberDuck.performQuack() is called performQuack() sees sound = Squeak() in the RubberDuck()subclass and makes the substitution quackBehavior.Squeak().makeSound(). Final output on screen is "Squeak! Squeak!". So,

    class Duck: def display(): pass def performQuack(quackBehavior) # I want to pass this method quackBehavior and variable quackBehavior.sound.makeSound() # 'sound' (defined in the duck class) between other classes class MallardDuck(Duck): sound = Quack() def display(): print("I'm a Mallard!!") class RubberDuck(Duck): sound = Squeak() def display(): print("I'm not a duck...") class quackBehavior: def Quack(): def makeSound(): print("Quack! Quack!") def Squeak(): def makeSound(): print("Squeak! Squeak!") 

    This doesn't work either. I don't think I'm making it clear enough to python what it is I'm wanting to do.

    How it works in reality: Doesn't work :/

    I'm actually trying out the strategy design pattern from the Head First Design Patterns book. Their code is written in Java, and I'm trying to convert it into python to test my understanding of it. Now, I know python doesn't really need or use many design patterns and that there's a simpler way to do this, but the above questions are not about the design patterns but about the limitations in my understanding of how python works.

    If it helps, this is how they do it in Java:

    public abstract class Duck { FlyBehavior flyBehavior; } public Duck { } public abstract void display (); public void performQuack() { quackBehavior.quack(); } _______________________________________________________________ public interface QuackBehavior { public void quack(); } _______________________________________________________________ public class Quack implements QuackBehavior { public void quack() { System.out.println("Quack"); } } _______________________________________________________________ public class Squeak implements QuackBehavior { public void quack() { System.out.println("Squeak"); } } _______________________________________________________________ public class MallardDuck extends Duck { public MallardDuck() { quackBehavior = new Quack(); } public void display() { system.out.println("I'm a real Mallard duck") } } 

    I know this is a lot to ask, but I'd really like some help. Any help is welcome!! Thanks for reading and giving me your time, it's really appreciated.

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

    Worked on branch experimental, squashed commits and merged to master, continued working on experimental... now not sure how to merge to master again

    Posted: 20 Jun 2019 07:47 PM PDT

    So experimental is a branch from master. I made some commits to experimental, then I squashed these commits and merged to master. I continued to work on experimental, and I'm ready to merge again, but... I'm not sure how.

    Git says experimental is 2 commits behind master - but those 2 commits are 'v0.0.x', which is the squashed commits, and 'merge branch experimental into master'. So all of those changes are actually already in experimental, just as separate commits rather than one squashed commit.

    But also, several of the commits that experimental is ahead by are already in master - they're just squashed, so they're inside a single commit instead of individual commits.

    It's hard to explain, but here's the relevant part of the branch: https://i.imgur.com/FlTuY2l.png

    I know about rebasing, but not sure how that would work in this situation. If I rebased master into experimental, wouldn't those individual commits in experimental (that were squashed and merged into master) still be treated as ahead of master?

    I'd really appreciate any insight.

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

    Is my solution truly awful or merely bad? (web stack, detecting client info)

    Posted: 20 Jun 2019 01:48 PM PDT

    The dilemna

    I created a webapp (internet) for my company (only responds to white-listed IPs). I want that webapp to determine access level / content based on which computer is being used inside our facility.


    that's an awful idea.. what is wrong with you

    • We deal with expensive materials and physical access to various rooms is heavily restricted. If someone is defeating our multiple levels of security... they certainly don't care about my app.

    • The tools/reports/forms don't have sensitive data anyway (that wouldn't be on the internet in the first place); I wouldn't care if everybody saw it. The filtering is almost entirely for convenience.


    so... what is your 'solution'

    1) Install extremely obscure fonts onto various computers. There's a handful of atrocious and commerically free fonts at 1001freefonts.com that nobody in our company will ever ask to have installed.

    2) Use Javascript to detect which fonts are installed. By picking 3 fonts I have 8 configurations of "what do I show this person" (0, any 1, any 2, or 3 of them).


    Is there a better way?

    • I wanted to use internal IP but some machines have dynamic IPs and that's beyond my control.

    • I considered cookies, but they're much more likely to be cleared than a font is deleted/added (in this companies entire existence, nobody has ever requested a font be installed. Ever).

    • I COULD use ActiveX to get the computer client name (everyone is on Win7) but ... then I'd be using ActiveX...

    Any ideas, or ... am I about to write some corporate software that uses javascript font detection?

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

    I need a JSON file of color objects with the name, hex code, and RGB values.

    Posted: 20 Jun 2019 07:39 PM PDT

    So I'm working on a project that lets a user enter an image or color and it compares with a list of JSON values to find a closest match.

    I have the logic of the program complete but the problem is that my current JSON file only has 256 color objects. I need a larger file to make the match more accurate.

    I have searched on google for some time but none of the lists are in the right format, thanks.

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

    Has anyone self-studied MIT's 6.01?

    Posted: 20 Jun 2019 07:06 PM PDT

    I am starting the course on MIT's OCW, but I found that the labs require special hardware. So I am wondering if anyone has self-studied the course and how he/she dealt with the labs. How did you compensate for the labs?

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

    Cool application of the BERT natural language model (state-of-the-art) to rate cities in term of happiness

    Posted: 20 Jun 2019 06:45 PM PDT

    BERT is a state-of-the-art natural language processing model released by TensorFlow earlier this year, breaking many records of NLP tasks! Using a simple wrapper around BERT called Fast-Bert, I was able to classify Tweets of various cities in terms of their positive / negative tweets! I'd love it if you guys checked it out!

    https://medium.com/@vdyagilev5/determining-the-happiest-cities-using-twitter-sentiment-analysis-with-bert-67b7591e593

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

    Type code using voice on windows or linux?

    Posted: 20 Jun 2019 06:37 PM PDT

    I was watching this great video from a few days ago https://www.reddit.com/r/programming/comments/c2ap9f/perl_out_loud_programming_with_voice_dictation/

    I was wondering how I'd get a similar setup for windows or linux? Talon voice is on mac only

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

    Java sidr project suggestions

    Posted: 20 Jun 2019 10:16 PM PDT

    Does anyone have any java side project suggestions other than Android Applications?

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

    Question about static fields/methods

    Posted: 20 Jun 2019 10:12 PM PDT

    Hello all,

    Quick question, im learning about static methods/fields and I have two questions. My first is, static fields can be public access AND private access correct? My second question is which type of fields can static methods have access to? Ive looked it up on google and I couldn't find a striaght answer. Thanks in advance

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

    Rest API for CPP

    Posted: 20 Jun 2019 10:03 PM PDT

    Hi,

    i am new to rest API and one of the requirements i got is to implement restAPI either in C++ or C#. But I am not sure which one to use and how.

    Can anyone tell me which is best to use?

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

    Why can't I view these images in my cpanel?(not a caching issue)

    Posted: 20 Jun 2019 05:38 PM PDT

    So Im fixing the gallery page on this website https://gilbertmovingandstorage.com/gallery.html as you can see certain images aren't loading? I uploaded them in the img folder on the cpanel.I'm looking in the cpanel file manager and I can see them right next to those images that are visible in the gallery? The img src has no typos and its not a caching issue because I can't see these images in incognito either? Please someone help me I'm sick of all these issues! This project is taking me too long

    here's proof that the images are in the folder https://imgur.com/a/dkfqYq5

    and here's a pic of two images and there src url. One can be viewed on the site and the other one can't? Even though there's no typo https://imgur.com/a/GmdPP0z

    Also looking at the source in the devtools then opening the img folder then the gallery_img folder I don't see the images there? I only see the ones that are visible on the site? So does that mean iit is a caching issue, and if it is why then can't I see it in incognito or when I clear the cache??

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

    Help with program

    Posted: 20 Jun 2019 05:15 PM PDT

    //Preprocessor Directives

    #include <stdio.h>

    //Main function

    int main(){

    //Declare variables

    int donations, investments, menu;

    double initial_fund, actual_fund, donated, invested;

    //Prompt user for initial fund

    printf("What is the initial fund?\n");

    scanf("%.2lf", &initial_fund);

    //Present menu

    printf("What would you like to do?\n");

    printf("\t1- Make a donation.\n");

    printf("\t2- Make an investment.\n");

    printf("\t3- Print balance of fund.\n");

    printf("\t4- Quit\n");

    scanf("%d", &menu);

    while (menu != 4){

    switch (menu){

    case 1:

    printf("How much would you like to donate?\n");

    scanf("%.2lf", &donated);

    actual_fund = initial_fund + donated;

    donations++;

    break;

    case 2:

    printf("How much would you like to invest?\n");

    scanf("%.2lf", &invested);

    actual_fund = initial_fund - investments;

    if (actual_fund > initial_fund){

    printf("Sorry you can't make that investment\n.");

    actual_fund = initial_fund + investments;

    break;

    }

    investments++;

    break;

    case 3:

    printf("The current balance is %.2lf\n", actual_fund);

    printf("There have been %d donations and %d investments", donations, investments);

    break;

    //Reloop menu

    printf("What would you like to do?\n");

    printf("\t1- Make a donation.\n");

    printf("\t2- Make an investment.\n");

    printf("\t3- Print balance of fund.\n");

    printf("\t4- Quit\n");

    scanf("%d", &menu);

    }

    //End of loop

    }

    //Quit option

    if (menu = 4){

    printf("The final balance was %.2lf\n", actual_fund);

    printf("There were %d donations and %d investments.\n", donations, investments);

    }

    //End of main function

    return 0;

    }

    When I try and run this program the menu will pop up but i won't be able to type anything once it gets to scanf("%d", &menu). I've tried googling it but haven't been able to find anything could anybody give me a hand?

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

    No comments:

    Post a Comment