• Breaking News

    Friday, January 8, 2021

    What have you been working on recently? [January 09, 2021] learn programming

    What have you been working on recently? [January 09, 2021] learn programming


    What have you been working on recently? [January 09, 2021]

    Posted: 08 Jan 2021 09:00 PM PST

    What have you been working on recently? Feel free to share updates on projects you're working on, brag about any major milestones you've hit, grouse about a challenge you've ran into recently... Any sort of "progress report" is fair game!

    A few requests:

    1. If possible, include a link to your source code when sharing a project update. That way, others can learn from your work!

    2. If you've shared something, try commenting on at least one other update -- ask a question, give feedback, compliment something cool... We encourage discussion!

    3. If you don't consider yourself to be a beginner, include about how many years of experience you have.

    This thread will remained stickied over the weekend. Link to past threads here.

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

    Use books instead of brief tutorials to learn programming

    Posted: 08 Jan 2021 04:22 PM PST

    Fundamental and broad knowledge (which is important in programming) can only be gained from books. Tutorials (text/video) are more like cookbooks that will taught something particular and are good if used as a supplementation to a books. Also book can be used later as a reference were you can quickly look for a topic that you are interested in. If you have never program before be sure to pick a book that is intended for people that never have programed before.

    Also its is important to write your code in parallel with book. Just anything, practice is very important.

    Good luck :)

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

    Why are most of the "serious" software written in C/C++?

    Posted: 08 Jan 2021 09:30 AM PST

    Like operating systems, MS Office, Adobe CC, CAD software like SolidWorks, most AAA games, web browsers, anti-virus software, flight management computer of a plane, engine control unit of a car... You get me. Is it because these two are the only languages(besides low level ones like assembly) that turn directly into machine code? What kind of freedom and precision they offer that other languages cannot?

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

    Where do you write in html?

    Posted: 08 Jan 2021 04:44 AM PST

    So i cant get a straight answer, i need the space in which i can write everything in order to make a website. Im sorry if this is a dumb question, im brand new to this (started codecademy yesterday)

    Okay, so, thank you all so much for the help, there is so much to learn ive got VSCode downloaded but am kinda scared to open it, it looks daunting as anything.

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

    Just A Thank You

    Posted: 08 Jan 2021 08:36 PM PST

    I don't contribute to Reddit much at all but I come often to this and other communities when I'm searching for answers. I always find them but I never contribute. So in light of that, I just want to say thank you to all of you who do contribute. Thank you to the people who ask the questions that I find myself asking and a huge thanks to the many knowledgeable among you who answer and help people like me.

    So yeah this is kinda cheesy but whatever lol

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

    Freecodecamp or/and Odin proyect?

    Posted: 08 Jan 2021 05:35 PM PST

    The question is simple (perhaps a little dumb), to learn Web Development I need to pick one of the both, or I have to do both of them as a better option? I'm doing freecodecamp right now. Thank awesome community! 😉

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

    Where can i find good example projects to analyze

    Posted: 08 Jan 2021 07:09 PM PST

    Does anyone know where I can find django projects that are fully built and I can just open in vs code and take a look at it so I can see how things work in programming

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

    about a beginner project

    Posted: 08 Jan 2021 05:34 PM PST

    i was just wondering if my idea is possible. i want to make something that notify my phone everytime my teacher has published an assignment on the school's website. the problem is i'm relative new when it comes to programming ( only finished a couple pages of automate the boring stuff). is this idea too hard for a beginner?

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

    I created my first "real" project, and it feels amazing!

    Posted: 08 Jan 2021 11:15 PM PST

    Hello there, /r/learnprogramming! Long-time lurker here.

    It seems like I've been forever in the state of "I know how to code, but don't know how to make a real app". It's something I struggled very much with, as I kept learning more and more about programming, data structures and algorithms, new and shiny technologies [insert javascript joke here], flipping through many C++ books, and so on...

    Well, not anymore! I built my first website which uses a handful of technologies and solves a problem that I have as an undergrad engineering student: doing calculations with uncertainties. If you want to take a look into the website, here's the link. I can't overstate how much this subreddit(and many other subs, such as /r/rust and /r/programminglanguages) helped me. Now, read on for more goodies on how I did it and maybe you'll be motivated to build a real app too1!

    I just wanted to share my excitement and some pieces of knowledge about the app that I made.

    First, the problem: in engineering undergrad, we have to make lab reports, which involve making all sorts of measurements. In chemistry, you have to measure volume, mass, pressure, temperature and so on... In physics, you may also measure lengths, time, etc. Depending on your instrument's precision, the error involved in making such measurements will vary. The usual notation for those measurements is (x ± y) u.m.. So, for example, when measuring a person's height with measuring tape, you might get (1.75 ± 0.01) m . Then you have to do operations with these quantities. There's a whole theory regarding these measurements, which involve a lot of statistics and calculus. But I won't bore you with the details. Here's a good starting point, if you're curious. Anyways, knowing how to do operations with these measurements, we're good right? Just pick a good ol' calculator and...

    Oh wow! Really?2&space;+&space;\left(\frac{\sigma_y}{y}&space;\right)2&space;}) Do all of that just for multiplicating two numbers? Hell naw... I need to automate this!

    So yeah, that problem really was asking for a programming solution. Again, I'll spare the details, but making this online calculator involved roughly three main parts:

    • The front-end, which is the part that the user sees. The part that we care about is making a form which the user has to fill up and send to a web server(yes, the calculator is server-side, not client-side). This part involves knowledge of HTML, CSS, and javascript.
    • The web server, which handles the request from the user and passes it to a binary program. This is something that I may change in the future, but currently, the server uses Node.js with the express framework to do all of the heavy-lifting regarding HTTP requests, parsing form data, and so on. Once a request comes in, it's immediately used in a child process, which executes a pre-compiled rust binary, based on the correspondingly-named crate scicalc-rs. The binary then prints it's text output(simple stdout output), which get's sent back to the user. This part involves knowledge of Node.js, express, HTTP requests, javascript(again), and much more...
    • The actual calculator program, which by far was the hardest part. I mean, at the start of this project, I had no idea how hard it was to parse a simple expression like (1.00 ± 0.01). Even now I still think that parsing is black magic that programmers use to make computers understand human language. Anyways, the program is actually quite elaborate, but it's functionality can be described by this sequence: read text -> transform it into a meaningful expression -> evaluate the expression -> print the value(or a message in case of error). You can read more about it on the project's repository(I fully encourage you to take a look at the README, I even included a handful of resources I shamefully copied from that were REALLY helpful). This part involves knowledge of rust, some programming language theory, data structures and algorithms(honestly this is everywhere, but most prominent here), and practical know-how of making parsers

    And honestly, that's not even the full picture. How did I actually manage to make the code run in a web server? Is the server hosted on my machine? Definitely no. I had to use an online service called heroku to serve the app(to be clear, I could have used many other alternatives, such as kubernetes, AWS and so on...). But I also had to containerize my app, which pretty much means what you'd expect: run it in an isolated container(kind of a virtual machine), with its own environment variables and build set up(with the app containerized, it was really easy to get my scicalc-rs crate and install it on the container, then run the installed binary from Node). For this I had to learn how to use docker, which wasn't really fun, but opened up a whole new world of possibilities for me: namely, the field of DevOps, which concerns quality assurance, CI/CD, security, etc. Also, for completeness' sake, I had to use a version control system(in my case, git), to keep my project manageable, track versions (and maybe, in the future, collaborate with other users, by revisioning pull requests, for example).

    Whew, that was quite a journey! And definitely a fun one. I could not have done this without the human element: people on reddit, stackoverflow, mozilla developer network, many many discord channels and forums that kept patiently answering questions, with detailed and thorough answers. THANK YOU to everyone that lends their time to share knowledge on the web, you all are the real MVPs.

    And finally, on a more introspective note, I could not have done this without me, my fully working brain. This is something that is often overlooked, especially in programming communities, but burnout, anxiety, shortness of attention span and many other problems plagued me during my "learn programming" journey, and may very well be affecting yours too. I can't count how many times I picked up a project just to bore myself out of it two weeks later. To be commited involves not only motivation, but also discipline and energy. Be careful: learning programming is a daunting task, and you must devote many hours every day to get minimally good at it. Nonetheless, practice IS NOT ENOUGH. You also have to relax, do other things that aren't mentally straining(watch your favourite show, draw, go for a jog, call your friends, etc). The Covid pandemic definitely makes this harder, but you can manage to do it(hell, I - a random stranger on the internet - did it, so why can't you?).

    1Note: I assume you already read this subreddit's FAQ, which is a godsend for all sorts of questions, particularly regarding the sort of problem I've described. I'm by no means a "pioneer" in facing and proposing solutions this problem. My intent is to share my particular journey, thus giving back to this community.

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

    Stupid Question

    Posted: 08 Jan 2021 05:54 PM PST

    So I understand that HTML/ CSS and Javascript are big languages used for front end web development. Can these same languages be used for front end application development? If not what languages are used for that?

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

    Mechanic to CS

    Posted: 08 Jan 2021 01:47 PM PST

    Hey everyone so I'm currently a mechanic/working construction but at 29 I know my body can't do it forever. But I have a GI bill from the military along with a secret security clearance and my local community college has a cyber security program and a software program that sounds interesting. Catch is, I know very little about computers😅 I heard the money is good and on the plus side it's physically easier on my body. Honestly seeing if anyone in the field has the sane background as me and if it's worth taking the shot of pursuing it? And any tips or advice for when I do start would be greatly appreciated

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

    code repeating same question line when answer is entered - python

    Posted: 08 Jan 2021 08:06 PM PST

    im completely new to python and coding in general, so i decided to try to make a calculator follow exact same steps a tutorial online has:

    https://www.programiz.com/python-programming/examples/calculator

    i entered every character as told but when i run it

    "Enter choice(1/2/3/4):" keeps repeating no matter what number i put in, im supposed to answer 1,2,3 or 4 but everytime i enter a number

    "Enter choice(1/2/3/4)" repeats

    here is what i typed:

    def add(x , y):
    return x + y

    def subtract(x , y):
    return x - y

    def multiply(x , y):
    return x * y

    def divide(x , y):
    return x / y

    print("Select operation.")
    print("1. Add")
    print("2. Subtract")
    print("3. Multiply")
    print("4. Divide")

    while True:
    choice = input("Enter choice(1/2/3/4): ")

    if choice in('1', '2', '3', '4'):
    num1 = float(input("Enter first number: "))
    num2 = float(input("Enter second number: "))

    if choice == '1':
    print(num1, "+", num2, "=", add(num1, num2))

    elif choice == '2':
    print(num1, "-", num2, "=", subtract(num1, num2))

    elif choice == '3':
    print(num1, "*", num2, "=", multiply(num1, num2))

    elif choice == '4':
    print(num1, "/", num2, "=", divide(num1, num2))

    else:
    print("Invalid Input")

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

    About to take a data structures and algorithms class this semester.

    Posted: 08 Jan 2021 07:59 PM PST

    About to take a data structures and algorithms class this semester and I feel lost. I feel lost on where I actually am with programming, how to improve outside of my classes, and what to do. I want to become better at programming and work on my own projects and ideas, but I feel like I'm moving in the same place.

    I may not be making sense here, but I hope I find some advice/guidance. I don't exactly know where I am or what I should be doing outside of my classes.

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

    Tips for a beginner

    Posted: 08 Jan 2021 05:12 PM PST

    I dont have any prior knowledge about programming. But I want to learn it. Do you have some tips for me how I can inform me and how I can learn it?

    If its immportant I have a pc with 8 core cpu, 16gb ram, rx 5700 8gb and enough memory

    Btw i come from germany so my english isnt that good

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

    Where do I start learning c++

    Posted: 08 Jan 2021 08:57 PM PST

    I want to start learning c++ I have no past experience with programming. Should I use books or should I learn from online sources like youtube? And if books what are some good recommendations.

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

    Do I really need to follow everything on the site like MEAN, Ruby on Rails, or etc?

    Posted: 08 Jan 2021 08:32 PM PST

    So I am studying web development right now all by myself and come across this term-full stack. on some sites, there are many types of stack such as LAMP, MEAN, Ruby on Rails, and so much more.

    So my question is, do I really need to follow the stack?

    Languages I learned from school and by myself are:
    - HTML & CSS
    - JavaScript
    - React (currently studying)
    - MySQL
    - NodeJS
    - Express

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

    Just found an awesome practice coding site!!

    Posted: 08 Jan 2021 09:04 AM PST

    Just found this website and wanted to share! It's called CodingBat and is awesome for beginners like myself. It gives you a problem statement and what parameters to use and you have to solve it. When you hit "go" it will check a bunch of values and let you know which ones worked and which didn't so you're able to analyze which inputs didn't work and figure out why. It covers strings, lists, with and without loops and logic problems. It's actually pretty challenging!

    helpful coding practice!!

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

    How do I delete a git page deployment?

    Posted: 08 Jan 2021 08:13 PM PST

    So I'm practicing making web sites by making a rough draft of my portfolio page. Im using react and am deploying it using gitpages. However I messed up my json file for a bit and was sturggling to deploy correctly. I eventually fixed my issues and correctly deploy now. However, when I go to my deployments page(https://github.com/Yummy275/my-portfolio-webpage/deployments/activity_log?environment=github-pages) I see 4 differnet deployments. How do I go about deleting 3 of them so that thers only 1 deployment? Thanks for looking

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

    [Java] Help understanding solution to Pascal Triangle problem (more of math problem)

    Posted: 08 Jan 2021 08:04 PM PST

    Here's the prompt on CodeWars

    The prompt basically says given a certain row n and a certain position k in that row on a Pascal Triangle, count the sum of values going ↗. The trick is that sum of that diagonal will be equal to the spot on the Pascal Triangle n+1, k+1 (see this picture). I calculated the value of that spot on the triangle using this formula and get the correct answer, but my solution is too slow to past the test.

    This is someone else's solution I found:

    public static BigInteger diagonal(int c, int p) { BigInteger result = binomial(c+1,p+1); return result; } private static BigInteger binomial(final int n, final int k) { BigInteger f = BigInteger.ONE; for (int j = 0; j < k; j++) { f = f.multiply(BigInteger.valueOf(n-j)).divide(BigInteger.valueOf(j+1)); } return f; } 

    I don't understand how the equation in the binomial() method works, mathematically. I looked at the equations on Wikipedia and none of them match this, so I'm confused as to how they got it. Can someone break it down for me?

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

    Accessing list elements in constant time

    Posted: 08 Jan 2021 11:47 PM PST

    Hi lads, the book which I have been reading says accessing a list that all elements are integer simply takes 'start' (the address of the start of the list) + 4i time so it's constant. On the other hand if a list have elements other than integers takes 'start' + 4 (this is a pointer which points length of the list) + 4i time to access. What I want to learn is why integer list and other lists are different ? Does 'start' use the same size of memory with list elements ?

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

    Tips for applying as a Intro to Java Tutor

    Posted: 08 Jan 2021 11:46 PM PST

    Hello all,

    I am applying for an Intro to Java tutor position at a community college and would like some tips when it comes to basic interview questions and some topics you guys have struggled with when beginning Java.

    I had trouble with Inheritance/Polymorphism, understanding classes and objects, etc but I want to know what else people have trouble with so I can focus on those topics as well.

    This course covers the very basics and ends with OOP so no Array Lists, Linked Lists, Stacks, Queues, etc.

    I have never had a job outside fast food so any advice on doing well on the interview and tips on teaching in general would be appreciated!

    Thank you everyone!

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

    Learning by making project - medium.com clone

    Posted: 08 Jan 2021 07:51 PM PST

    Hi guys, I am in my early learning stages in web development. I have been learning frontend so far with some git and node.js. For now, all I can build are static webpages. I am either going to further my frontend courses or start beginners backend. That said, me and my friend (who is also learning) wants to start on a project like Medium.com. Where people can create accounts, and create posts, upload images, etc. I am lost in terms of what to search on google. I tried searching along the lines of "creating a blog maker site" and most that come up are results that I do not want.

    I am aware that I am still new to it, and this will be a long-going project, I want to learn along the way by creating this website, instead of what most udemy courses taught which are e-commerce which I am not so interested in. So my question is, what are the keywords or steps needed to be learned to create a blog-maker like Medium? thank you for your help :)

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

    How to write a script for photoshop to type a shortcut then quick export to png also open the exported folder instantly?

    Posted: 08 Jan 2021 11:23 PM PST

    photoshop script

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

    Help with Understanding Docker Images

    Posted: 08 Jan 2021 07:34 PM PST

    I'm helping my professor set up an autograder for one of the courses he teaches, and he asked me to update a Docker image for the running test cases on the students' submissions.

    It's my first time using Docker, so I did a bit of research to understand it better, primarily from this Youtube video. I think I mostly understand it now, but have a few questions. Here's my current understanding just in case there's something wrong with it:

     

    My Understanding

    When you create an application on your own machine, there is a lot that goes under the hood that allows your application to work. Even a simple Python script depends on Python being installed on your machine, and in some cases, the right version. If you try deploying your application to some other machine, which may be running a completely different OS, then it can break completely due to not having the correct dependencies.

     

    There's a few ways to go around this. One, you can go through the slow process of downloading all the dependencies and making sure they match up with the dependencies on the original machine. This is a terrible idea since that means it only works on this second machine, so you have to redo the process to any other machines you deploy to. Furthermore, if you're on a different OS, then you might not even be able to do this.

     

    You could download a virtual machine snapshot from the original machine, and then boot from that in some VM software, which contains everything you possibly need. However, the problem with this is portability. You're downloading an entire operating system just to run one application.

     

    Docker circumvents the above problems by using images/containers. You create your environment that contains everything that you need inside of it (Sort of like Python virtual environments, where all your pip libraries are installed within the working directory and you don't need anything outside of it). So now you have a Docker image that details exactly what is needed to run the application. If you load up the image (not sure if that's the correct terminology), which creates a container. A container is just the running application that was created from the image. These images can be shared as well through the Docker registry.

     

    My Questions

    So here are some of my questions:

    • I was looking at the old Dockerfile my professor created, and the commands inside indicated it was on Ubuntu (apt-get). I'm on Arch Linux, so for it to have been able to run the Ubuntu commands, does that mean that all the images have a minimal form of Ubuntu as an OS?

    • If so, it seems like images would be similar to virtual machine images then. So the benefit isn't not having a guest OS, but just having a more barebones version of the OS?

    • Is using a Dockerfile the only way to create an image? (A child image, not a base image, which I know has different steps for creation).

    • The Dockerfile basically just looks like a series of Unix commands that would fully set up the needed environment. It's almost like a bash script to set up an environment, except it can be run on any OS. So if I were to share some application I made on Github along with its corresponding Dockerfile, would the correct workflow for an interested user be:

      $ git clone REPO_LINK $ cd REPO_DIR $ docker build . # This would use the Dockerfile in the repo 

      And inside the Dockerfile, it would set up the desired environment, and then at the end, run the command to start the application? Could I technically also just share a single Dockerfile that has git clone REPO_LINK && cd REPO_DIR inside of it?

     

    Thank you for your time!

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

    Need some Help with a Macro!!!

    Posted: 08 Jan 2021 11:11 PM PST

    Hello, I use a Gamepad to play on pc, the problem I have is that I need an extra button for the game I'm playing, I realize that I can use whatever key on the keyboard and the gamepad at the same time, so I was looking for some macro that can bind a button for my gamepad and a key for my keyboard to use a key from the keyboard and a button from the gamepad, and I found "HIDMacros" this program can do what I want with this script:

    HIDMacros.SendKey "k"

    But the problem is that it only send a single key, What I need is the key to be activated when I'm holding the button and deactivated when I'm not holding it.
    Can somebody help me with this and write me some script to do that in HIDMacros or show me how to do it whit other program?

    Thanks ^-^

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

    No comments:

    Post a Comment