• Breaking News

    Friday, July 17, 2020

    Most Basic Git Commands for Absolute Beginners learn programming

    Most Basic Git Commands for Absolute Beginners learn programming


    Most Basic Git Commands for Absolute Beginners

    Posted: 16 Jul 2020 06:33 AM PDT

    LONG POST - Part2

    GIT COMMANDS FOR BEGINNERS-

    Prerequisite: Read Part1.

    Before you start this tutorial make sure Git is installed on your system. If you have not installed it yet, today is a good time to do so. Go on GIT OFFICIAL and select the one for you OS, download and install it. Hello fellow programmers, I hope you are doing well. Today we are going to cover most basic Git Commands. I am going to cover it from the very beginning for absolute beginners, but if you find any part or command that you know, you can skip it, or read it to brush up your knowledge. Anyhow, let's get started.

    First Step:

    Open Bash/Terminal to follow up the procedure along with me. The very first thing that we need to do when we install Git is to set our Identity so that in future if we work with multiple people, we can know who made the commit to the files etc. To set your identity type git config --global user.name "Your_Name" and press Enter. After that, we need to set our Email Address, so type git config --global user.email abc.mail and hit enter again. These two commands will set your name and email globally on your system. So whatever commit we do, it will use these credentials.

    Commands:

    1. git init: Choose a folder in which you want to enable Version Controlling. Use cd YourFolderPath/. Now use the command git init and it will initialise Git in that repository/folder.
    2. git add filename.extension: This command is used to add files to the staging state. When we use this command, it adds the specified file for staging the changes or in simple terms, storing the changes. Example: git add index.html. You can use * in place of the file name to add all the files present in the current repository.
    3. git status: This command is used to check which files are staged and which files are modified and unstaged.
    4. git commit -m "Message": After the changes are made and the files are added for staging, we need to commit in order to record the changes. The Message is like a comment that we add so that in future we can tell only by looking at the message, what changes we made. Example: git commit -m "Update the modules".
    5. git log: This command is used to see all the commits that are made. It lists them all so that we can use when we need to revert back to a specific version. But more about that in a later post as this post covers the most basic commands.

    These five commands are the most important and the first commands that you will want need to learn in order to master Git. There are many other commands like push, pull, fetch or merge etc. that I will cover in the next post as they require Github and I don' want to make this tutorial messy.

    I hope you learned something from this post. See you soon in Part 3. Until then, Happy Learning.

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

    Learning a solution is only valuable if you are also learning the problems that it solves.

    Posted: 16 Jul 2020 05:04 PM PDT

    A very large trend in online courses and teaching material is to simply show you the solution and call it a day. This will leave you feeling like you've learned something, but the second you try to use that knowledge, you don't even know how. You say

    "I'm not ready. I must not have watched enough tutorials"; tutorial hell.

    You hear that you should know MVC. You try to learn. They'll explain the dictionary term for each of the letters, then a trivial example showing 1 instance of each.

    You hear that you should know git. You try to learn. They'll show you all the most common commands in a trivial folder they've just setup.

    You hear that you should know interfaces. You try to learn. They'll show you the words to type to make an interface class (that never needed to be one). Show you what words to write to make some other class implement that interface (which has no logical need to).

    Why do we use these things? Why do we need that package? Why should we have interfaces? Why does this solution exist?

    It's extremely rare that the problems that these solutions solve are explained.

    It's a lot easier to read some documentation (which was written with experienced devs in mind), convert that to video format and sell it as being "for beginners" than it is to come up with real-world instances of these problems - after which the solution will speak for itself.

    So often the issue is that these solutions are for problems that a beginner simply isn't running into. By far the biggest problem that many of these things solve is: pain points that stem from working in a team. As a beginner you seldom find yourself in a team. You spend your time by yourself writing brand new code. No one has to read your code, or interact with it, and the same is true in the other direction. Now when you hear of these solutions - solving problems you have no idea exist - what are you to think?

    The teaching of programming is a well-paid full-time endeavour for many. I believe there is a duty to step up this aspect of teaching.

    Students, be cognisant of whether the problems & pains are being presented. Reflect that in your reviews & recommendations.

    Teachers, simply showing what pops up in the terminal when typing "git status" is not sufficiently teaching newbies about the wonderful benefits of git. A world needs to be built in their minds, an image of them working in a large team on the same codebase. Paint first the world in which this solution does not exist. Explain vividly the problems that are occurring - make the students feel the pain themselves.

    Now introduce the saviour. The solution.

    Humans are very good at remembering that which makes the pain go away.

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

    Colt Steele's Modern Javascript Bootcamp vs. Brad Schiff's Git a Web Developer Job: Mastering the Modern Workflow

    Posted: 16 Jul 2020 04:25 PM PDT

    Hello all!

    Self taught here. Currently learning Javascript through Colt Steele's Modern Javascript Bootcamp on Udemy. Also came across Brad Schiff's Git a Web Developer Job: Mastering the Modern Workflow and bought it from Udemy. Is it better to finish Colt Steele's course first? Or does it matter which one I could finish first?

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

    Roadmap for a self taught programmer.

    Posted: 16 Jul 2020 04:07 PM PDT

    As everyone knows self teaching is a pretty daunting task. I'm relatively fluent in c++ python and JavaScript. After the tutorials everything becomes a lot less clear. After the whole this is an IF/else statement, this is a loop, and this is a function stage and a few examples on how to use them it goes to cool now make a video game or make an app. There's a whole gap from tutorials to making actual programs. Most people know this as tutorial hell. Of course you can make a snake game or helicopter game or something simple and then gradually implement your own ideas into them but I'm still distraught on where to go after that. I feel like it's just a cave of information with way out at the end of the cave. Can anyone be so kind to give a roadmap to out of this cave of despair? Thank you so much beforehand!

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

    Learn To Code By Building, What am I doing wrong?

    Posted: 16 Jul 2020 11:29 PM PDT

    My biggest problem is that when I read on reddit or around the interwebs a lot of people recommend to build something to get out of the tutorial hell. I am not sure if I am doing something wrong but when I say okay and sit down to try and build something I break down I can get depressed to a level that I am ashamed of it destroys me fundamentally and I get close to doing things I would forever regret.

    But this practice of just building things seems to work for so many others, but I feel like someone sits me down and says here's all the parts to build a table so build me one, and I can format that table in my head from all the theory and courses I've done (at this point i've spent probably thousands trying to learn.) but when it comes to translating from my head into code I go blank.

    I think the big problem can be that a task seems humungous say for example I want to build a personal website but I dont know how I want it to look, I dont know how to get what i want it to look like from what i've drawn into css/code and I get this pain in my stomich that I must just be stupid.

    I suffer from raging ADHD and Depression/Anxiety and a whole lot of other issues and it feels like an uphil battle to constantly buy new courses to grind through them at a boring, excruciating rate I've tried things like 1.5x speed, I feel like I understand the concepts but when it comes to doing I have no idea how to break something down into smaller tasks and then into action.

    Because dont get me wrong the rare times where I can go and fix something or see something working I feel this enourmous rush of happyness but most of the time I am just crying and feeling devastated that I cant seem to do anything no matter how much I invest.

    I failed at networking through college (that is IT networking) because of undiagnosed medical problems and the experiece of studying without success for atleast 4 years has rocked me I am unsure of my value anymore.

    How do others build things? How do you know how to break things down? I wish i had the privledge of other tech people in my family but im the only one in an area where things like basic literacy and numeracy are rare. Its just.. demoralising every day.

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

    28 year old engr grad want to transition into programming, should I do boot camp, certification or self-teach?

    Posted: 16 Jul 2020 08:07 PM PDT

    Bachelors in civil engr, only basic knowledge of programming. I've tried the self-taught approach before but I always lose motivation once I don't learn a topic or make any progress. I feel I need structure to learn something as rigorous and dense as programming. Thinking about doing a boot camp or maybe an online certification. I want to slowly start building a portfolio until I can possibly try and land a job somewhere. I'm really open to anything, if there are ways to self-learn that are more structured than just going thru free code camp by yourself, I'd love to hear about it. I heard some good things about Harvard's intro to cs50 course online for free. There's just so many options and paths, don't know what to pick. Any advice is appreciated. Thank you.

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

    Automating web scraping

    Posted: 16 Jul 2020 05:36 PM PDT

    I want to create a website that aggregates industry commentary and press releases. I've scraped a few websites but don't understand how to automate a daily process for recognizing new posts and extracting them. After automating extraction, I'd like to automate publishing to the site hosted on GitHub.

    Thoughts/resources for this project?

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

    Python N00B stumped on some supposedly "easy" questions right now, could use some help :)

    Posted: 16 Jul 2020 11:26 PM PDT

    I'm taking an intro to python course in school right now.

    They didn't teach us any content that covers how to do these questions, so I'm really just stumped right now and could really use some help from any coding gods here in this subreddit.

    I don't even know where to start, and any help would be greatly appreciated

    1. Write a function called sum_digit that takes a string that has single-digit numbers as a parameter and returns a number that represents the sum of all the single digit numbers in that string as in the provided docstring below.

    def sum_digit(my_str): """------------------------------------------------------- sums all the single digit numbers in my_struse: total = sum_digit(my_str) ------------------------------------------------------- parameters:my_str: string that has single-digit numbers (str) returns:total: sum of all the single digit number (integer >= 0) ------------------------------------------------------- Sample run>>> total = sum_digit('2501') >>>print("{}".format(total)) 8 """ 

    Write a function called string_capitalizer that takes a string and returns a new string that has a copy of the string where the first letter of each sentence capitalized. For Example, if the string is "hello. my name is Joe. what is your name?" the output should be "Hello. My name is Joe. What is your name?"

    A word chain is a list of words such that for each consecutive pair of words, the last letter in the first word is the same as the first letter in the second word.

    For example, the following list of animals forms a word chain: ['camel', 'leopard', 'dog','giraffe', 'elephant']. Write a function is_word_chain that takes a list of words (list of strings) called my_list as parameter and returns True if the list contains a word chain and False otherwise. Your list should have at least 2 words.

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

    Simple JS Loops and Arrays -- Can someone explain this to me, please? Thank you!!

    Posted: 16 Jul 2020 11:20 PM PDT

    Hi all,

    I'm brand new to this but I've got my heart set on becoming a Software Engineer. I'm going thru the Front End Web Developer career path on Scrimba (it's great!). Just working through this JS problem now.

    I understand the first For loop using i as a variable -- it's just simply walking through each element in the array sequentially.

    I keep watching the instruction, but I'm having a hard to conceptualizing the second For loop -- how is j doing that?

    Thanks so much for any help! This seems like a welcoming community and really positive. I appreciate any help!

    /Assignment - Loops and Arrays Part 3
    // Optional Bonus challenge
    // Imagine you have a button that toggles a light on and off. Loop through the following array of numbers and toggle the button the numbers of times for each number. The array [2, 3, 2] would toggle the button 7 times.
    // The light is off to start with. Log to the console whether or not the light is on at the end.
    // Sample Arrays:
    // [2, 5, 435, 4, 3] // "The light is on"
    // [1, 1, 1, 1, 3] // "The light is on"
    // [9, 3, 4, 2] // "The light is off"
    var lights = false;
    var switches = [ 2, 1 ];
    for( var i = 0; i < switches.length; i++ ) {
    for( var j = 0; j < switches[i]; j++ ) {
    lights = !lights;
    }
    }
    console.log( lights )

    // end of code

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

    Tools recommendation from a senior dev to junior one

    Posted: 16 Jul 2020 11:14 PM PDT

    If you have an average machine,

    1. Git Client - lazygit - This is a command-line tool, you don't need to remember git commands
    2. Editor - Sublime Text with LSP with plugins
    3. Terminal Editor - Micro Editor
    4. Elementary OS as a distro
    5. This is specific to PHP devs, don't install PHP with Apache, install PHP-fpm, Laravel Valet customized for Linux. Use PHPIntelephense.
    6. Fish Shell

    VS Code is a great editor but it's heavy. I use vim out of habit but, I don't recommend it for junior devs.

    Thanks.

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

    How do you influence a maze generation algorithm?

    Posted: 16 Jul 2020 07:24 PM PDT

    I understand there are different algorithms for maze generation, but how would one modify them in order to include biases, or structure them in some way different from the normal "perfect maze" default?

    Can anyone provide examples, even if they do not apply to all algorithms? I assume usually it depends on said algorithm.

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

    How is it possible to have iterator names for each for loop if they are in same scope in this case (Java)?

    Posted: 16 Jul 2020 11:09 PM PDT

    I have two for loops that use the same iterator name, but are not both inside the same scope of a method called main. In this case should not the second for loop be invalid because I already have an iterator by the name of i declared? I am a bit unsure of why it compiles fine in this case. public class public class Main

    { public static void main(String[] args) { for(int i = 0; i < 5; i++) { } for(int i = 0; i < 6; i++) { } } } 
    submitted by /u/zteman
    [link] [comments]

    error: package sockets.conexion does not exist

    Posted: 16 Jul 2020 11:09 PM PDT

    Im using java and Im in the folder "sockets" there I have two folders "conexion" with a file conexion.java and "servidor" with a file servidor.java
    in conexion.java I defined a package like this "package sockets.conexion;" in servidor I defined a package like this "package sockets.servidor;" and I'm importing that conexion package like this "import sockets.conexion.Conexion;"

    when I execute servidor.java like this

    javac Servidor.java

    I get an error: error: package sockets.conexion does not exist

    I also tried executing it like this:

    javac -cp "C:\Users\emili\Desktop\U\11VO SEMESTRE\Sistemas Distribuidos\sockets\conexion" Servidor.java

    but I get the same error

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

    Is a "good implementation" a matter of process or mindset?

    Posted: 16 Jul 2020 03:47 AM PDT

    I keep hearing about the "good developer mindset", but most companies have a lot of processes in place for controlling the quality of their products ( code review, QA, functional review, etc. ). So my question is: are good implementations born out their developers' sense of responsibility, or do they just have better processes? I've been a developer in a lot of start-ups, and the differences in the processes I see are way bigger than the differences in mindset.

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

    How are the operators in Java able to work with different data types?

    Posted: 16 Jul 2020 11:03 PM PDT

    How are operators in Java able to work with different data types? I thought operators in Java are not overloaded, so how is it possible to work with different data types then.

    For example,

    Integer ex; ex != null; 

    How am I able to just use != operator with a null reference value, which can be of any type, with a variable of ex Integer type, are not both of the types different in this case? The same question can be asked about = operator.

    Just like that then:

    How is it possible to use the + operator with two different data types of int and double like this:

    int x = 9; double z = 11.5; z = x + z; 

    Is it just defined in the Java language for the operators to work with any data types like this, or is there a concept I am missing because I thought we could not overload operators to use them for any data type and manipulate their purpose. Also, would operators count as methods if we overload methods and we are talking about overloading operators?

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

    Assembly: error: odd operand: -3

    Posted: 16 Jul 2020 10:56 PM PDT

    Hello

    Learning assembly and reading about the BIT instruction on msp430. When trying to compile this code:

    int main (void) { while(1){ __asm__("BIT R2, 3"); } return 0; } 

    It says: error: odd operand: -3

    Yet when writing asm("BIT.B R2, 3"); instead, it works.

    Could somebody explain this please?

    Thanks

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

    Deck of cards api trouble

    Posted: 16 Jul 2020 10:55 PM PDT

    I am working on a Cisco module. It requires opening a terminal and producing the resources from https://deckofcardsapi.com/api/deck/new/ I am using Git Bash to try and implement this. When I try, it says there is no such file or directory. Please help....

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

    Graduated college a couple of years ago, should I go back for computer science or do the self-taught route?

    Posted: 16 Jul 2020 04:48 PM PDT

    I graduated college 2 years ago with a degree in chemical engineering and have been working a job I don't enjoy very much since. I've always loved tech and over the last few months picked up web development and iOS development and want to get a job in one of those fields. I have a website I built for a friend and an iOS app that I was working on at my job before the company decided to scrap it (but still have code up on Github and leave it in my portfolio of what I contributed).

    My question is is this enough to start applying for jobs? I've been having discussions back and forth with my parents (dad works in IT) and they insist on me going back to school for computer science to get a job. I hear about all these people getting jobs without a degree though and I don't want to take on more debt if I can do it on my own and feel like I was able to learn a lot on my own.

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

    Please help me write a program to print all combinations of 12345678 which can include digits and words

    Posted: 16 Jul 2020 10:34 PM PDT

    Interviewer - So what's your email ID?

    Candidate - Sir, abc@xyz.com

    Interviewer - And password?

    Candidate - 12345678

    Interviewer - You are so dumb. You shared such a confidential information so easily for the job. How can we trust that you will not share any confidential information of the company for some better offers?

    Candidate - Sir, I might have shared my password with you but I don't think you can still login to my email account. Let's look for the possibilities. My password can be

    12345678

    Or

    Onetwothreefourfivesixseveneight

    Or

    1twothreefourfivesixseveneight

    1twothreefourfivesixseven8….. so on

    Or

    2444666668888888 (one 2, three 4….)

    13355557777778 (1, two 3, four 5……, 8)….. so on

    Or

    Combination of all of these…

    Interviewer 🙏🏻🙏🏻🙏🏻 - How much will u take boss?

    Candidate: I refuse to accept your offer Sir! coz I don't want to work under dumb people. Boom!

    Question: Write a program in Golang or python or c++ to print all combinations mentioned above for 12345678. Return the count as well. Assume all letters are lower case.

    3D DP might be needed as I thought first. But couldn't proceed. If anyone can solve then please do.

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

    25 no degree but what to start self teaching

    Posted: 16 Jul 2020 10:28 PM PDT

    I am hoping to become a self taught programmer. Wondering on any tips or hints to start. Even to just be pointed in the right direction to hopefully end up employed. One day work in cyber security. Or am I just dreaming and can't accomplish this with out college ?):

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

    *Master* C or C++ first?

    Posted: 16 Jul 2020 04:09 PM PDT

    By "master", I simply mean "good enough to write complicated programs".

    I know it's a bit of a contentious question, but I'm curious what other people think.

    I've dabbled with C (and some assembly) in the past, so it's not exclusively for learning, but I'm hoping to bring one on as a main language for personal projects.

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

    How is anyone supposed to completely learn a language if all the information is either a "beginners guide" OR a "crash course"?

    Posted: 16 Jul 2020 12:23 PM PDT

    I'm stuck in this part right now where I can't find any information for an "expert" guide on languages like C++, Python or really anything else.

    Does anyone know of any guides?

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

    Is there an algorithm to know if two pictures are similar?

    Posted: 16 Jul 2020 06:13 PM PDT

    There is an alarm clock on the app store that makes you take a picture and then re take the picture in the morning to turn off the alarm. The app lets you choose how accurate the second picture needs to be, and it works on different angles.

    Any idea of what algorithm they might be using? Thanks in advance!

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

    How is Stanford's CS 193P course for learning iOS dev?

    Posted: 16 Jul 2020 04:00 PM PDT

    I started Stanford's CS 193P course a few days ago, and it's been super helpful for getting started with iOS development. However, it primarily teaches SwiftUI, which I've recently learned is new and doesn't have all of the capabilities of UIKit just yet.

    Is it recommended I switch to a different tutorial to learn UIKit? Or will this course cover enough for me to quickly learn UIKit afterwards?

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

    No comments:

    Post a Comment