• Breaking News

    Saturday, January 29, 2022

    What have you been working on recently? [January 29, 2022] learn programming

    What have you been working on recently? [January 29, 2022] learn programming


    What have you been working on recently? [January 29, 2022]

    Posted: 28 Jan 2022 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]

    What is a good "lower level" language to learn after learning python to gain a deeper understanding of computers?

    Posted: 28 Jan 2022 09:36 PM PST

    I learnt some python and can write many programs in it.
    I used many modules for GUIS, images etc and am pretty comfortable with python. But I want to learn a lower level language now to gain a deeper understanding of computers.
    Is C a good option? Or is there a better alternative when my aim is just to learn and not to write useful programs in C?
    Is it better to directly learn how assembly langauge works and write few programs in it for better understanding of computers?

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

    Failing classes, feeling defeated

    Posted: 28 Jan 2022 04:30 PM PST

    Hey everyone. First post on here, thought I'd make it somewhat interesting. I am a first year CS student from Italy. Everything has been extremely difficult for me; not only programming wise, but every subject is very math-oriented(which I expected, but I thought I had a very solid base). I just feel totally worthless compared to others. I took my first programming exam today (python), and got an amazing score of 0/30. Couldn't even get one single program to compile. I already knew it was going to happen, but it still hit me very hard. I am not motivated at all, and will probably fail all of my classes. I want to pick myself up, but there's just a lot of frustration in my soul right now. Damn, I'm actually getting some tears in my eyes as I write this :'). Any advice is appreciated.

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

    Tips/resources for learning "the other stuff": Git, commenting, documentation, unit testing

    Posted: 28 Jan 2022 02:36 PM PST

    I'm a self-taught programmer specializing in a niche language (Extendscript, based on JS Ecma 3). I keep fairly busy with it as a side hustle. However, I feel like I can be working even smarter, but I just can't wrap my head some of the other stuff that I know would speed up my work considerably. Things like Git and how to comment my code effectively so that I can generate documentation based on it. Or even best practices for debugging and testing. Does anyone have resources for learning about these best practices when it comes to these kinds of workflow concerns? Thanks.

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

    What can I put on my resume, when applying for internships/apprenticeships that require little to no experience, that demonstrates my interest in programming?

    Posted: 28 Jan 2022 11:46 PM PST

    I don't have a great deal of experience with programming although I am very interested in it and am beginning to make some good progress. Some of the internships I see being posted say they don't require you to have much experience. How can I show that I'm eager to learn and have an interest in the subject when I have no accolades to put on my resume?

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

    Boot Camps

    Posted: 28 Jan 2022 09:09 PM PST

    If anyone on here has attended one of these boot camps, what are your thoughts post completion?

    Also if you're self taught how do you personally feel about the sudden influx of programming boot camps?

    Thanks for attending my TEDx.

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

    Is implementing data structures a good way to practice coding?

    Posted: 28 Jan 2022 03:58 PM PST

    Hi,

    I am a novice programmer. I really like data structures and algorithms (like to do leetcode,hackerrank,codewars etc on my free time) in addition I like to implement data structures. It feels fun for some reason. I can implement linked list, doubly linked list, queue(array and ll version), stack(array and ll version), hash map(open addressing, external chaining version), graphs(adj matrix), and binary search tree pretty comfortably at this point. I also program in C because it feels very simplistic and minimal.

    -I want to start implementing more complex data structures like rb trees and avl trees and such.

    -I know that these programs are often 1 file (probably no more than 200~300 lines of code even for rb tree in C)

    Is this a bad idea or is it a good way to keep upgrading my programming skills?

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

    building a file to run a project (swing)

    Posted: 29 Jan 2022 03:14 AM PST

    hey everyone!

    so i decided to learn a bit of swing and did my first tutorial of a simple program:

    https://www.youtube.com/watch?v=ohEFX1OngxE

    usingn netbeans and swing. everything working and i can run it within the ide.

    my question is, how can i make a file (i guess it will be some type of java file?) that will *be* the program? ike if i will send it to a friend he will be able to just run the software. well baiscly just like softwares we have on our laptops.

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

    If I'm building apps to show competency in languages and frameworks, how far should I go with the presentation (CSS)?

    Posted: 28 Jan 2022 09:50 PM PST

    I'm struggling to determine how much time I need to spend on the presentation once I've completed the user stories and implemented the functionality. Once the MVP is done, how long do I spend using CSS to make it more presentable or visually appealing? I find myself getting excited and enjoying the JS/TS and to a certain extent the HTML, but I absolutely dread working with the CSS and I end up hitting a wall of effort.

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

    I'm interested in both Web development and Data analytics. New to both options.

    Posted: 28 Jan 2022 11:48 PM PST

    I'm interested in both Web development and Data analytics. I'm planning on picking one to pursue for a career. Which one if not both are capable of being self taught (Coursera,Udemy, YouTube) and which career path is more likely to gain a entry level job from being self taught?

    (ALL TESTIMONIES WELCOME!!! Lol I Would love some extra motivation!)

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

    So, you finally got a job...

    Posted: 29 Jan 2022 01:40 AM PST

    I have been thinking. When yall first got a job as junior developer, how much time did you study after work? Or did you at all, thinking that what you did/learn trough out the day is sufficient ? How much are you doing it now?

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

    Real-world example for Post-decrement Operator

    Posted: 29 Jan 2022 01:36 AM PST

    I am taking a C++ course on Udemy and they are talking about pre and post decrement and said there are reasons for using the latter. I am finding it hard to actually think of an example. Could it be something do due with OOP that I will be learning later or is there just that few reasons to use the post decrement operator?

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

    Feeling conflicted about learning frontend web development as a beginner

    Posted: 29 Jan 2022 01:31 AM PST

    In many posts/comments/articles and videos I've seen people recommending languages like python or c++ for complete beginners. The common theme that I'm understanding from both of these languages is they can give you a great start and introduction into programming and learning computer science. However, they seem very challenging, especially for someone with zero experience with reading or writing code. With that said, wouldn't it be beneficial to begin somewhere novice such as html, css, and JS and learn the basics of structure and front end then move to back end? I don't want to waste my time with web development like I've seen people say, but if it's so easy shouldn't everyone who codes or programs know it?

    Side note.. I personally enjoy web development.

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

    HTML &- How do I inlude another js file

    Posted: 28 Jan 2022 10:39 PM PST

    Hello,

    I have a folder structure of

    src index.css index.js data.js index.html 

    index.html:

    <!DOCTYPE html> <html> <head> <title>Parcel Sandbox</title> <meta charset="UTF-8" /> <script src="https://d3js.org/d3.v7.min.js" charset="utf-8"></script> </head> <body> <div id="app"></div> <h1>Hello World</h1> <script src="./src/index.js"> </script> </body> </html> 

    index.js:

    import "./styles.css"; import * as d3 from "d3"; import data from "./data"; // set the dimensions and margins of the graph var margin = { top: 20, right: 20, bottom: 30, left: 40 }, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; .... 

    However I am receiving this in my console. I am launching index.html manually (file explorer - click index,HTML):

    Uncaught SyntaxError: Cannot use import statement outside a module

    If I do:

     <script src="./src/index.js" type="module"> 

    it gives me a CORS error.

    Why is this happening? What steps can be done to fix this>

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

    Learning programming

    Posted: 28 Jan 2022 06:41 PM PST

    I've been learning programming for about 1 year now. I have completed courses on Codecademy among other websites, but I'm running into a big issue.

    My problem is that while I have completed courses and understand how Python works, I am not able to actually use my skills for anything. I have also done a couple of side projects, but I did those by following a tutorial on YouTube.

    Does anyone have any advice on how I can learn to actually program side projects myself? I want to have the knowledge to come up with an idea, and over time code it up and be able to show it off on Github.

    Any advice would be appreciated.

    Thanks

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

    Best way to program a GUI for my application

    Posted: 28 Jan 2022 06:35 PM PST

    OK so I have extremely limited programming experience mostly python. Last year I ventured into Android app development and I really liked how the ui was designed using xml while the behavior was designed with the core programming language (I used Kotlin). I have no idea if this is the norm for ui development but I found it to be a better experience than my python ui attempts (kivy / pygam / tkinter) Currently I have taken an adventure in learning rust just for fun but I'm at a loss when it comes to adding a gui. I would like something tht is similar to how it is done on android where there is a separate language specifically for ui elements but the behavior is entirely definable in rust (as an additional pipe dream it'd also be cool if you could sperate out a third language for the look of the ui elements, like css) Now before it's suggested ik web view is a thing I just don't want to use Javascript. I wanna keep the logic in rust.

    Edit: I forgot to say that if there is some reason why this style of ui development is a bad idea I'd also like to hear about tht and any reasons why

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

    Remove all characters before specific string

    Posted: 29 Jan 2022 03:09 AM PST

    Hello,

    I'm MB. A very nice and polite guy.

    How can I remove all characters before a specific string?

    Example:

    blah43njknkutu5ntu n3kj4n k3j4n5kj4n hello I am fine 

    I would like the output to be only "hello I am fine". I. e. everything before the string hello should be removed.

    Preferred tool: grep.

    I'm on Linux.

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

    Why does my simple executable have so long assembly code compared to online tutorial?

    Posted: 29 Jan 2022 03:00 AM PST

    Hi, I'm currently learning c, and specifically learning about buffer overflows.

    For this purpose, I was following this video, that contains a very minimal example.

    It has the following simple c code:

    #include <stdio.h> include <string.h> int main(int argc, char *argv[]){ char buf[256]; strcpy(buf, argv[1]); printf("%s,", buf); return 0; } 

    In the video, gdb is called on the file, and then disas is used to look at the assembly of the compiled file. In the tutorial, the assembly looks like pretty simpl, about 17 lines.

    But if I then compile the same code myself, and use disas on it, it's a lot longer, and looke like this:

    Dump of assembler code for function main: 0x0000000000001189 <+0>: endbr64 0x000000000000118d <+4>: push %rbp 0x000000000000118e <+5>: mov %rsp,%rbp 0x0000000000001191 <+8>: sub $0x120,%rsp 0x0000000000001198 <+15>: mov %edi,-0x114(%rbp) 0x000000000000119e <+21>: mov %rsi,-0x120(%rbp) 0x00000000000011a5 <+28>: mov %fs:0x28,%rax 0x00000000000011ae <+37>: mov %rax,-0x8(%rbp) 0x00000000000011b2 <+41>: xor %eax,%eax 0x00000000000011b4 <+43>: mov -0x120(%rbp),%rax 0x00000000000011bb <+50>: add $0x8,%rax 0x00000000000011bf <+54>: mov (%rax),%rdx 0x00000000000011c2 <+57>: lea -0x110(%rbp),%rax 0x00000000000011c9 <+64>: mov %rdx,%rsi 0x00000000000011cc <+67>: mov %rax,%rdi 0x00000000000011cf <+70>: callq 0x1070 <strcpy@plt> --Type <RET> for more, q to quit, c to continue without paging-- 0x00000000000011d4 <+75>: lea -0x110(%rbp),%rax 0x00000000000011db <+82>: mov %rax,%rsi 0x00000000000011de <+85>: lea 0xe1f(%rip),%rdi # 0x2004 0x00000000000011e5 <+92>: mov $0x0,%eax 0x00000000000011ea <+97>: callq 0x1090 <printf@plt> 0x00000000000011ef <+102>: mov $0x0,%eax 0x00000000000011f4 <+107>: mov -0x8(%rbp),%rcx 0x00000000000011f8 <+111>: xor %fs:0x28,%rcx 0x0000000000001201 <+120>: je 0x1208 <main+127> 0x0000000000001203 <+122>: callq 0x1080 <__stack_chk_fail@plt> 0x0000000000001208 <+127>: leaveq 0x0000000000001209 <+128>: retq 

    my gcc version is:

    $ gcc --version gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

    I can't find out which version is used in the tutorial.

    But I am wondering why these two pieces of assembly are so different, when they are made from the same source code.

    Some of the instructions are also different, in the video, function call are labelled "call" and in my assembly it is "callq", the same goes for leave and ret.

    The video is from 2015, is the difference just due to and old c compiler? or does it have something to do with your version of ubuntu?

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

    How hard is it to code a bot that will screenshot every deleted tweet

    Posted: 29 Jan 2022 02:50 AM PST

    And post them as soon as they're deleted, from people I follow. ?

    submitted by /u/9for9onbillboard
    [link] [comments]

    lowering compilation times in c++

    Posted: 29 Jan 2022 02:44 AM PST

    Hey guys, im participating in my first competition tomorrow and I'm having some trouble with staying within the max runtime of the competition website. So I need the runtime to stay under 1 second for each test case. For example this is a program that tracks the maximum consecutive appearances of any number until the number 0 is entered. I know for a fact my code is correct because 9/10 test cases come back right, but the 10th test case says " Execution timed out" because it takes 1.076 seconds to run it. Do y'all have any suggestions for cutting my runtime by making my code more efficient? I literally need to shave off 0.076 seconds. Any advice would be greatly appreciated!

    #include <iostream>

    using namespace std;

    int main(){

    int cntr=1,num,tempcntr=1,prevnum;

    cin>>prevnum;

    cin>>num;

    while(num!=0){

    if(num==prevnum){

    tempcntr++;

    if(tempcntr>cntr){

    cntr=tempcntr;

    }

    }else{

    tempcntr=1;

    }

    prevnum=num;

    cin>>num;

    }

    cout<<cntr;

    }

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

    Is Python Actually A Good First Language To Learn as a Beginner ?

    Posted: 28 Jan 2022 10:53 AM PST

    So Python has
    1.Easy syntax
    2.Very popular and cool
    3. Can be used to do almost anything and can be used to explore the various fields of software engineering ( which is one of the main reasons I want to learn )
    4. Good Job Scope

    but wait

    1. Learning Python syntax can make it harder to learn syntax for other languages ( my friend's experience ) ( I do know basic C though)
    2. Some companies don't accept python in their interviews
    3. Maybe it's a 'Jack of all trades, but master of none' ( it can do a lot of things but other languages can do it better) of programming languages ( I do know python is best for AI,ML, automation and data analysis )

    I stated my thoughts on the topic here and I might be wrong ngl, this question has been bothering me for while so I thought I would seek some insight into it.

    I would love to hear your thoughts on the question

    PS
    If you have some resources you want to recommend to learn python or some tips in general that would be really great
    Thanks :)

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

    Pleas I need help, can't figure out how finish this program. Beginner first week cs50!

    Posted: 28 Jan 2022 10:48 PM PST

    +//----------------------------------------------------------------------------- // agree0.c // // Better design than agree.c // Prompt user to agree or disagree // Loop, so input has to be valide (Y,y,N,n) // Using bool, do while loop, break and better syntax overall // Including libary stdio.h and ctype.h // Execluding libary cs50.h // Print answer on screen // //----------------------------------------------------------------------------- // #include <stdio.h> #include <ctype.h> #include <stdbool.h> char agree_function(char agree); int main(void) { do { printf("%c", agree_function); } while (agree_function != 'n' || agree_function != 'N' || agree_function != 'y' || agree_function != 'y') { break } } char agree_function(char agree) { printf("Do you agree? "); scanf("%c", &agree); return 0; } 
    submitted by /u/M01V
    [link] [comments]

    Architecture student want to learn about Programming/Web Development

    Posted: 29 Jan 2022 02:23 AM PST

    Hi r/learnprogramming community, I am a beginner and I have 0 knowledge about programming and web development. There are so many languages about this field and I don't know where to start. I would like to learn this field and if it works, I would want to continue it.

    Could anyone suggest or I need help on which is the best starter to learn programming and web development stuffs that is aligned with the field I have which is Architecture and related to design. I am from the Philippines. Thank you!

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

    No comments:

    Post a Comment