• Breaking News

    Monday, July 13, 2020

    Trying to solve a problem for hours or more and you finally solve it learn programming

    Trying to solve a problem for hours or more and you finally solve it learn programming


    Trying to solve a problem for hours or more and you finally solve it

    Posted: 12 Jul 2020 04:51 AM PDT

    such a cathartic feeling. Just started learning python at 29 and yesterday when i finally solved a problem by myself after hours of thinking about it i shouted fucking yes into the air

    this is probably going to be an addiction for me .....

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

    Javascript Courses are like bad minecraft tutorials

    Posted: 12 Jul 2020 07:25 PM PDT

    This is what I feel like going through Traversy Medias Udemy course, but I think it applies to most other tutorials on youtube where you try to start building projects, it feels just like watching a typical minecraft tutorial!

    The guy in the tutorial is there to show us how to build a giant castle made out of thousands upon thousands of block. We are ready to take on this challenge. Lets go.

    So here it goes: You watch the guy on the tutorial place out one block, then you stop the video, and put out the same block on the right spot, and this process goes on and on for hours until WOALA!

    Here stands an en epic castle right in front of you, and hopefully, when you turn a small lever, all the torches will light up. You hold your breath and push it. It works. Everything feels great. You feel proud for a small moment... But then it dawns upon you. You haven't learned anything. And you are just left standing there, having no idea how it was built and sure as hell you will never be able to build it again without a tutorial

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

    Introduction to Git and GitHub for Absolute Beginners

    Posted: 12 Jul 2020 08:29 AM PDT

    LONG POST - Part1

    Hello fellow programmers! Today I am going to talk about one of the most important resources in the programming community i.e Git and Github. They are widely used by developers all around the world. This blog is focused on absolute beginners who are not able to grasp the concept as I am going to talk about them in very simple words. Once you learn Git and Github, you will be able to save your work and organise the different versions fluently without any hassle. So without wasting any further time let's get started.

    What is Git?

    Definition: "Git is a distributed version control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes on any set of files. Its goals include speed, data integrity, and support for distributed, non-linear workflows."

    Let it sink in and don't worry if you are quite confused what above statement means. Let us assume that we are creating an application and we are adding features only when the previous feature works. Now there might be a time (believe me it will come a lot) when we add a feature and it doesn't work. Let's say while debugging the code we messed it up. Now What? How do we go back to the initial file state and start all over? Now that's when Git comes in the play. Git was made for this situation. As the definition says Git is a Version Control System which means it allows us to store multiple versions of the same file. Whenever we want to shift from one version to another version of the same file, we just need to write some simple commands and Git will do it for you. Without Git we will save multiple copies of the same file and name them like "file-1.java, file-2.java, file-3.java, and so-on" (like we do while editing a photo) but with Git we only need to maintain one file, the versions will be maintained by Git. I hope now you can understand what is Git and why we use it.

    What is Github?

    Definition: "GitHub, Inc. is a United States-based global company that provides hosting for software development version control using Git. It offers the distributed version control and source code management (SCM) functionality of Git, plus its features. It provides access control and several collaboration features such as bug tracking, feature requests, task management, and wikis for every project."

    The very first thing that I will like to mention is that Git and Github are two different platforms which can be used separately and in combination too. Github is like a Google drive for your projects along with a ton of features. When we use Git we save our files/versions on our system. When we are working on big projects we can't take the chance to lose the data. What happens if the machine crashes or ransomware corrupts the whole data on your system? Not only this when we work on big projects we are not the only one who is working on it. Several programmers are assigned the same project but they work on different parts together. Now, what happens if they want to share the project, they will need to transfer it to every person in the project team.

    To prevent the above-mentioned hassle Github is used. We can upload our project files on it and share it with anyone or a specific number of people. It also allows Version Control. Github is the best place to work on open-source projects as any number of people can fork and work on the project simultaneously and pull requests to the owner to consider their changes. Users can create public or private repositories according to their needs. Github is very vast and much more than a drive to upload files but for this blog, I am keeping it short and simple. So that beginners can easily understand what is going on.

    In the next parts, I will talk about the most used Git commands. So Stay Tuned and Happy Learning!

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

    Interest in joining a Slack / Discord Group to study: CS50x, ALGS200x and ALGS201x?

    Posted: 12 Jul 2020 06:31 PM PDT

    Hi all!

    I've recently started ramping up my CS Skills and realised I want to dive deep into Algorithms and Data Structures. I found 3 EdX courses that I am pursuing, and I'm interested in building a community of sorts online to pursue these streams of study with.

    With CS50x, we have a Slack group that I have found to be very helpful. I have created a Slack channel cs50-scrum where a group of us (13 right now) post our "Scrum" updates every morning. Using this process has been instrumental to me in staying on track and really getting through the hard steps.

    I'm interested in joining / forming another Slack / Discord group for ALGS200x and ALGS201x. Is anyone on this sub currently pursuing these 2 programs on EdX?

    If not these 2, is there anything else you are currently studying and would like to be part of a "Scrum Team" to help your accountability with completing the course off?

    Look forward to a productive conversation. Cheers all, and stay safe.

    submitted by /u/brand-new-reddit
    [link] [comments]

    Web scraping using Assembly

    Posted: 12 Jul 2020 07:01 PM PDT

    How can I scrape a web page using Assembly?

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

    Which language do I learn next?

    Posted: 12 Jul 2020 09:44 PM PDT

    I've been programming for a while now, but I think we're all learning all the time. With that in mind, I'm seeking some feedback on which language to learn next.

    I know programming itself is a tool, and typically we pick the language for the task at hand. However, in my case, I am strongly considering becoming a computer science teacher for high school or college level. As such, I want to learn a language which can help students learn how to program.

    Here's what the languages I know so far, and my level of confidence with them. Maybe the answer is to dive deeper into one of these?

    Language Years Experience Significant project completed?
    Java 5 Yes
    C < 1 No
    Javascript 5 Yes
    Python 3 2 yes
    PHP 5 yes
    SQL 3 yes
    Powershell 2 yes

    I'm sure there's a few that I have left off.

    I'm leaning toward C#, C++ or something completely different like Rust/Go.

    Most of the languages I know I picked up due to professional requirements. I did biz dev work for a while, and then did software testing after that.

    Anyway, thanks for reviewing this.

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

    Created a simple python banking app. Now want to store the balance in a database. but how?

    Posted: 12 Jul 2020 11:44 PM PDT

    If anyone can guide me to a tutorial or walkthrough online, that would be great.

    The app is a simple Deposit, withdraw, and Check Balance.

    Thank you

    I would ultimately like to host this on AWS and dynamoDB.

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

    Update: Beginning C++ programming for videogames

    Posted: 12 Jul 2020 10:33 PM PDT

    Due to a kind Redditers for one of my first questions, he/she had suggested me by looking at some sources that include some books including C++ primer, I also looked at some coding courses for UE4. Thank you to the kind redditors that had suggested me some tips. They really help me alot. :D

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

    Beginner here trying to get into competitive programming. Need help with a particular problem..

    Posted: 12 Jul 2020 07:56 PM PDT

    So I was attempting the problems in google kickstart contests. I picked a relatively simple problem for me to solve. Here's the link

    https://codingcompetitions.withgoogle.com/kickstart/round/000000000019ffc7/00000000001d3f56

    I was getting the correct output when I tested the program myself. But when I submitted the code on the site it rejected my solution displaying "Wrong Answer". Please help me find what's wrong in my solution. Thanks in advance. Here's the code:-

    https://pastebin.com/dkbJvvae

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

    (Reference) Books which teach the OOP principles

    Posted: 12 Jul 2020 04:14 PM PDT

    To start off, I mentioned "reference", because this is rather a generic question regarding programming and learning to program. It's more of a reference for people, and hey, you might have a book I never heard of :). I see too often that people struggle with OOP concepts and that there are all sorts of wild practices out there which DO NOT cover OOP in the right way. That's why I am asking this question.

    So the question is: Which learning resources (such as books) can you recommend which teach the fundamentals and principles of OOP (and don't use out-dated or wild practices with bad examples)?

    This question is not bound to a specific language. If you do want to recommend a good book or learning resource to a specific language, please state what language it's for.

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

    Need Advice on Changing career to software engineering

    Posted: 12 Jul 2020 05:14 PM PDT

    I currently have a bachelor's degree in supply chain. My current career is operations management, been doing this for 4 years and I've been successful, however, I'm sick of it and I want to have a job where I can focus on projects and not rely on other people as much. Can anybody tell me how to switch careers without going back to school full time? Are coding boot camps legit? Also, I currently make over 70k a year, will graduating from a bootcamp at least get me near 70?

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

    A conception blur with pointers

    Posted: 12 Jul 2020 08:59 PM PDT

    Hello. And thank you for making out the time to see this. So, I have learnt C in my grad studies and that was just over the top, and now when I want to learn exploit writing or go low level, pointers seem to confuse me a bit.

    Basic concept wise, I am clear on that a pointer is a variable, that stores the address of another variable as reference. We can change the pointer value which will result in changing the original value and etc. But syntax wise, my problems are:

    1) When we take a char literal, we just simply do char \var = "Hello world";* to print the value, we do printf("%s", var); and directly assigning a value works fine. But we know that to get the value from a pointer variable we should use \var, but just doing *printf(var)** works fine. On the contrary, if I do printf("%s", \var);, I get the first character *"H".
    But in case of integers, **int \a = 10;
    * i see is illegal. When I try to print the same with printf("%d", var); I get 10, but with multiple warnings. And going printf("%d", \var);* gives me a segmentation fault. Question: Why?

    2) I studied stackoverflow and found out that, giving the pointer variable a direct integer kind of orders the compiler to read/Write the value as a direct memory address, making it a violation. Even if that is correct all the way, then why doing the same with character doesn't through seg fault? Then again, why printing the variable name without the pointer does give us a value?

    3) We know a variable name is just a name for a mem address. So if a pointer variable doesn't have another variable to address to, and then we give it a random value, why does printing the variable name without the * give us the same value?

    4) I studied stack to find out nothing is illegal. If a coder is sure about what he is doing, then giving a pointer a direct value to read/write data is legal, but in that case we have to typecast, something like, int *p = malloc(sizeof(int)), or something like int *p = (int *)10; kind of blurry, couldn't understand, so I wrote what came to mind.

    So anyways, Can you guys help me clear this out? Thanks a lot ...

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

    Trying to write data to csv, but duplicates are showing up in the output file

    Posted: 12 Jul 2020 05:13 PM PDT

    If I print the dict to console, it does it correctly, but the csv file will have extra rows before the final set of data:

     F,12/07/2020 17:11:50 F,12/07/2020 17:11:50 G,12/07/2020 17:11:50 F,12/07/2020 17:11:50 G,12/07/2020 17:11:50 H,12/07/2020 17:11:50 F,12/07/2020 17:11:50 G,12/07/2020 17:11:50 H,12/07/2020 17:11:50 J,12/07/2020 17:11:50 # Adding a save file from datetime import datetime import sched import time import csv #save variables letters = ["F", "G", "H", "J"] rows = 4 dict = {} w = csv.writer(open("output.csv", "w")) s = sched.scheduler(time.time, time.sleep) def run(sc): global rows global letter try: for i in range(rows): letter = letters[i] # Time stamp for the data # dd/mm/YY H:M:S now = datetime.now() dt_string = now.strftime("%d/%m/%Y %H:%M:%S") print("Getting Letter " + letter + " date and time =", dt_string) try: dict.update({letter : dt_string }) for key, val in dict.items(): if(i >= (rows -1)): # EDIT: This solves it w.writerow([key, val]) finally: print() finally: for key, val in dict.items(): print([key, val]) print("Cycle done") #call this method again every 5 seconds for changes s.enter(5, 1, run, (sc,)) s.enter(1, 1, run, (s,)) s.run() 
    submitted by /u/downrightmike
    [link] [comments]

    VST question

    Posted: 12 Jul 2020 06:29 PM PDT

    Hey everyone! I don't know if this is the right sub or not, if not please remove and or help me find the right sub! Thank you:)

    I'm a dreamer, like many of you. Unlike many of you, I'm not talented in code what so ever.

    So here is my dumb question;

    I seperated my touchscreen from my old laptop, and I want to make a oscilloscope like VST for me to run on a Mac.

    So heres the plan, a visualizer for whatever my DAW inputs, while also being able to control it as a EQ (most likely physical controls) and possibly other options for me to manipulate the sound.

    My question is, how hard would this be to make? And if I decide to have someone write this program for me, how much can I expect to pay?

    Thank you for your imput!

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

    What prevents people from just copying someone else's projects online and using it for their portfolio?

    Posted: 13 Jul 2020 12:01 AM PDT

    Serious question, not that i would do that myself, but it seems very easy for someone to just inspect element + copy their code + tweak it and pass it off as your own to put on your portfolio. Im just wondering if there's anyone who's done this because it seems like it would be a common and easy thing to get away with and do. Or am I underestimating the power of the internet?

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

    When is something a property or not of a message?

    Posted: 12 Jul 2020 11:39 PM PDT

    We are implementing some third party's protocol on top of UDP. Every message except Acks contain a packet id which is an incrementing number. So first message you send is 1, then 2. The other side also has its own auto incrementing ids.

    When you receive something, you read the packet id, then send a Ack message containing the packet id that you received.

    My peer suggested in a code review to change the 'Message' class that we have to omit the packet id, but add it as a param to the Serialize method as it is not a property of the message but only used for transmission.

    So something like, add packet id to the byte buffer, then add the rest of the message.

    I'm confused as to why this isn't a property. I suppose you can look at the class as

    • only containing the contents. The packet id is only relevant when sending and receiving something.

    • the class is a representation of the array of bytes that you receive so that you can easily read parts of it

    It's probably one of those things where there are no clear right or wrong. Say you were doing type-length-value, you may omit the length as you can calculate that from the value.

    Interested to hear if others expect the packet id to be present in the class or not.

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

    need a little help!!

    Posted: 12 Jul 2020 05:39 PM PDT

    i have been learning python for the last 1.5 months i know the basics. i started solving questions on hackerrank but i can't even solve some of the begineer questions while my friends who started learning with me get the logic straight away. i am bit frustrated and i dont know what to do.Need a bit of advice.

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

    Leetcode-esque problem practice site that actually teaches you data structures & algorithms through a structured path of problems?

    Posted: 12 Jul 2020 05:25 PM PDT

    As the title says - just wondering if anybody can recommend a site like this? Basically something that has DS&A type practice problems like Leetcode does, but that presents them in an order that teaches you about the relevant data structures/algorithms through increasingly difficult practice with them?

    I ask because I read a post last week that mentioned the name of such a site (someone said they sent you an email a day with a problem in a way that introduces you to the concepts rather than expecting you to know them) but I can't for the life of me remember what it was now.

    Thanks if anyone does!

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

    Having problems low self belief regarding coding skill or not feeling good due to peer pressure?

    Posted: 12 Jul 2020 05:23 PM PDT

    This is a problem I have been dealing with for quite sometime as a college student where we are required to be competent in multiple languages.

    These are the ways I have tried and felt somewhat better:-

    1) Solve 1 fairly simpler problem in the morning. A confidence boost just might make you feel positive enough to at least try whatever you wanted to do today. I usually do codewars questions that are around 6-8 kyu. In case you are not being able to do that just make a quick switch be it to a simpler problem or even a solved one. The important thing is to have done something right.

    2) Talk to someone else who has a similar problem. Talking makes the issue normalised and make you internally realise that you can get over this. ( if you want you can DM me anytime , I'll reply under 24 hours most likely)

    3) Regarding peer pressure, I feel understanding and digesting the fact that everyone learns at their own pace is a key factor. I know this is easier said than done so some ways that might help are - get rid of LinkedIn ( very toxic to see colleagues doing better and dwelling on that). Start working on small projects so that you are making progress too. Now you have something to fall back when under pressure that you have not done much.

    4) If you feel like you are Googling solutions way too often on things you have already seen, I'd suggest to just take a minute or two for break and then think again on the issue. A step back might help you leap forward better. Definitely 1 of the harder issues to solve for me personally and I still can't say I'm 100% free of this problem but I'm definitely doing

    5)Failed in a competition, be it by your own standards? This is personally the hardest to deal with at least for me. I recently performed poorly in the Google kickstart competition and still fairly upset regarding that. Something that seems to help is sleeping after the competition instead of discussing or dwelling in sad feelings. We get tired after such competitions and it's best to rest instead of reacting to the performance.

    6) Feeling depressed because you are not able not contribute much to your group project or failing deadlines or any reason only thing that has worked for me is talking to people. If you are still not feeling as good ,try therapy. I know that many people are not able to communicate their problem or don't get understood for them especially therapy might be good. Your mental health should be your top priority always ( I personally can't digest this at times but it is true nevertheless).

    I hope this helps. I am still struggling with most of these so take the advice with a pinch of salt. I hope you do not give up on your dreams because of lack of self confidence. You probably are way better than you think . Take care and have a great day. Apologies for the bad English.

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

    Why is there a concept of the lifecycle?

    Posted: 12 Jul 2020 11:18 PM PDT

    I've programmed at various platforms, such as Android, React, etc. I found that the concept of lifecycle was used across those platforms. Why is there a concept of life-cycle? What does the concept come from? What are the cons and pros when using this concept?

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

    Interview prep

    Posted: 12 Jul 2020 11:17 PM PDT

    Does anyone want to practice interview questions with me ? I just started doing Leetcode problems. I am preparing for internships.

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

    A great starting point for beginners of Algorithms & Data Structures

    Posted: 12 Jul 2020 11:16 PM PDT

    This video gives a good overview and helped me a lot to get started in DS & Algorithms

    https://youtu.be/9-ubSA9GA3o

    submitted by /u/Consistent-Treacle16
    [link] [comments]

    Question about Generics term to use

    Posted: 12 Jul 2020 10:53 PM PDT

    I understand with Generic classes in Java the class can have the parameter be almost of any data type. For example: ArrayList arrli = new ArrayList(n);

    ArrayList arrl2 = new ArrayList(n);

    Here I am making one ArrayList to be of String type and the other to be of Integer type. In this case when referring to the two or separately, should I just treat them both as ArrayList objects or should both be treated as separately like one is an ArrayList object and the other is a String type Array List object. Which way is recommended to do, I do know due to type erasure both in compile time are just ArrayList. My question is in reference to all Generics in Java.

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

    No comments:

    Post a Comment