• Breaking News

    Saturday, June 5, 2021

    What have you been working on recently? [June 05, 2021] learn programming

    What have you been working on recently? [June 05, 2021] learn programming


    What have you been working on recently? [June 05, 2021]

    Posted: 04 Jun 2021 09:00 PM PDT

    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]

    Aspiring Programmers: 3 steps to crafting a stand out GitHub Profile (to help get you noticed)

    Posted: 04 Jun 2021 05:54 AM PDT

    Hey aspiring programmers of /learnprogramming!

    As community leader for The Fast Tracked Programmer discord, I've learnt a lot about GitHub Profiles recently and I'd like to pass some of that knowledge on to those who are really struggling to land their first tech job right now.

    Here's a couple of pointers to help maximise your chances of getting noticed:

    1. Include a profile readme that clearly states what your programming related interests and skills are, along with what you're looking for
    2. Ensure that all your projects have a readme which clearly states what it does (and why it exists)
    3. Push small, incremental changes often to show that you're practising on a consistent basis [updated based on feedback]

    If you're feeling a bit unsure about how to improve your GitHub Profile, feel free to DM me I'd be more than happy to provide feedback!

    submitted by /u/bedrock-adam
    [link] [comments]

    I just wrote 320 lines of code in 3 hours, it felt incredible

    Posted: 04 Jun 2021 03:44 PM PDT

    I've never like wrote this much in a sitting so, and quite proud of myself for that 🙂

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

    Created my first website with no external inspiration or step-by-step tutorials!

    Posted: 04 Jun 2021 11:09 PM PDT

    I understand it's very basic and only contains HTML and CSS but this is still an accomplishment for me, with the features (especially media queries) that I've learned.

    https://cowboycodr.github.io/index.html

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

    Appreciation post about this sub.

    Posted: 04 Jun 2021 05:53 AM PDT

    I'm 19 and after the first year CS i got in an internship program. Normally, the company gets interns from last years of uni but thanks to everyone here I had an amazing portfolio of hobby projects and managed to beat the other applicants. It's a little scary to see the project I will be working on(>3gb just code) but I think i will manage.

    This couldn't be possible without your help. I am really thankful for everyone here

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

    Should I learn Go for backend development?

    Posted: 04 Jun 2021 07:28 PM PDT

    I have been learning Express for a while now, and have just been messing around with different languages and frameworks like Flask, ASP.NET Core, etc. Anyway I've been looking at job listings to see what seems to be used a lot. I've seen Go on them numerous times, bringing up the question: Is it worth learning Go for backend in 2021?

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

    Bootcamp grad who just accepted an offer 6 weeks after graduating. Happy to answer questions for anyone looking for honest info about the experience.

    Posted: 04 Jun 2021 10:18 AM PDT

    I wanted to post this because when I was deciding whether to go to a bootcamp or not I felt like there either weren't a lot of posts from people who actually attended and graduated (lots from folks deciding or just getting accepted) and that generally people were against bootcamp in favor of self learning. I was in that same boat and decided to go for it and wanted to share my experience. Feel free to ask any questions!

    Below is just some context about my journey - definitely not required reading.

    My background My background prior to enrolling in the bootcamp was an undergrad degree in poli-sci and a single intro to CS class in python. Post college I spent a couple years doing code academy classes in python, html, css, and sql (MySQL I think) but honestly I didn't know what to do with anything I was learning and there were huge gaps in between where I would forget everything I'd learned and have to start over.

    I'd considered bootcamp in the past but the price tag ~20k price tag was scary since I had a lot of student debt already and no financial safety net. COVID is what ultimately pushed me into committing though since I was working as a Digital Marketer for a brewery and the lack of job security became too much.

    Deciding on a program I did so much research but still found it very difficult to decide on a program since prior to being a SWE or full stack developer it's hard to understand what each program is trying to do. Obviously this is different for everyone but for me the most important factors were a JavaScript stack, scholarship options or tuition deferment until after graduation and reputation/competitiveness.

    Also don't let the reviews fool you - like many places bootcamps are great at flooding their reviews with 5 star ratings and hiding the negative ones. In fact after I started my program I went back to the reviews and really started digging. That's when I found that all of the negative reviews were about 20 pages deep, much further than I would have ever ventured. I would honestly trust alumni for honest answers far more than reviews.

    The program Don't be fooled. The programs will claim to get you from 0 to SWE in 3 months. Expect a 6 - 12 months minimum. The program I attended had. 4-6 week prep followed by a month long precourse program after you are accepted followed by the 13 week program duration where they flat out state that job search is typically a 3 - 6 month process. I only had about 5 months of savings when I started so I barely made it work.

    As far as difficulty and stress it's honestly what you'd expect. 60 hour work weeks, 6 days per week and the amount of time you can put in outside of class time is very dependent. For me the hardest part wasn't the material itself but the isolation from friends and family since you have very little free time, are usually exhausted at the end of the day and are going through something that they probably won't understand. Be sure you set the right expectations with people since the program will truly demand almost 100% of you.

    Job Search A good program will have a solid job search department. I found the resources they provided very helpful and I structured my search by splitting my efforts into outreach (with people in my network and just random alum on LinkedIn) and cold applications. This might be a cardinal sin to say here but I honestly gave up doing leetcode and algorithms about 3 weeks into job searching. Despite all my practice none of the information ever sank in and I always did poorly on algo coding challenges. It felt like so much work for the off chance that I would get a problem I'd already done and since other places were offering me application based challenges I decided I'd rather just work for a place that didn't judge the quality of their developers solely on algorithm knowledge.

    The most effective tool to getting interviews for me was random recruiters on LinkedIn. Some were obvious scams or under the line of legitimacy, but a solid 60% were legit and led to interviews (and eventually 2 offers). I noticed a lot of recruiters who were contacting me for senior level positions and I don't know how common that is but I always responded that given my current experience I thought I'd be a better fit for junior - mid level roles and that usually still got me in the door for more appropriate positions.

    Offers I ultimately ended up with 3 offers on the same day. These were for Boston based companies with base salary ranging from 80-85k with comp ranging from 15-25k. I had to do some real soul searching about which company to choose but decided that my ultimate goal was to have a good work/life balance and chose the place I felt would best give me that.

    Started: Dec 2020 Finished: June 2021

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

    Should I drop Python and go straight to learning Javascript, if my goal is to become a web developer?

    Posted: 04 Jun 2021 04:32 AM PDT

    Hello there, total newbie here! I decided to learn the basics of coding about a month ago. The language that I choose to start with was Python, because I saw many people claimining that it was the easiest language for people who had never coded before to pick up. So I enrolled myself into an Udemy course "Python for beginners".

    Back when I did that, I had no idea about the differences between front-end and back-end development. Now that I'm clear about, I've decided that I want to become a web developer, so I ran into "The Odin Project", and discovered that they teach Javascript, alogside Nodejs in their curriculum, and I heard that js is essential if you want to become a web developer. Should I drop the Python course and follow The Odin Project's curriculum, instead?

    submitted by /u/30shorrorfan
    [link] [comments]

    MIPS assembly: print the result to text file

    Posted: 04 Jun 2021 08:20 PM PDT

    Can someone help me print the result to text file.

    Program used: MARS 4.5.jar

    Language: mips assembly

    Program: Generate 1 randoms number from 1 to 65535 and print it is in Binary, Hexcimal, Decimal

     .data binaryInput: .asciiz "Binary: " nl: .asciiz "\n" hexInput: .asciiz "Hexciaml: " decInput: .asciiz "Decimal: " hexDigit: .asciiz "0123456789ABCDEF" obuf: .space 100 fout: .asciiz "D:/fileout.txt" buffer: .space 1024 obufe: .text .globl main main: la $a0, fout li $a1, 1 li $v0, 13 syscall move $t0, $v0 #Generate 1 random number addi $v0, $zero, 30 syscall add $t0, $zero, $a0 addi $v0, $zero, 40 add $a0, $zero, $zero add $a1, $zero, $t0 syscall addi $v0, $zero, 42 add $a0, $zero, $zero addi $a1, $zero, 65536 syscall move $s0, $a0 move $s1, $a0 #Print in Binary li $v0, 15 la $a0, binaryInput li $a1, 16 jal prtbin move $a0, $t0 syscall #Print in Decimal li $v0, 15 la $a0, decInput move $a1,$s1 jal prtdec move $a0, $t0 syscall #Print in Hexcimal li $v0, 15 la $a0, hexInput li $a1, 16 jal prthex move $a0, $t0 syscall ################# srl $s0,$s0, 12 andi $s0,$s0, 0x0F li $v0, 16 move $a0, $t0 syscall li $v0, 10 syscall prtdec: la $v0, 4 syscall li $v0, 1 move $a0,$a1 syscall la $a0, nl li $v0, 4 syscall jr $ra prtbin: li $a2, 1 j prtany prthex: li $a2, 4 j prtany prtany: li $t7, 1 sllv $t7, $t7, $a2 subu $t7, $t7, 1 la $t6, obufe subu $t6, $t6, 1 sb $zero, 0($t6) move $t5,$s0 prtany_loop: and $t0, $t5 ,$t7 lb $t0, hexDigit($t0) subu $t6, $t6, 1 sb $t0, 0($t6) srlv $t5, $t5, $a2 sub $a1, $a1, $a2 bgtz $a1, prtany_loop li $v0, 4 syscall move $a0, $t6 syscall la $a0, nl syscall jr $ra 
    submitted by /u/hieudinh1011
    [link] [comments]

    Doubt about programming

    Posted: 04 Jun 2021 02:51 PM PDT

    Hi guys, I started to learn to program and wanted to clear some doubts. I saw in some places that to program you need an IDE, I wanted to know if it is really necessary and if there is a way to program without an IDE. If you can give me some tips on programming I would really appreciate it.

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

    I can't figure out why C++ program to remove negative numbers from data won't compile

    Posted: 04 Jun 2021 08:09 PM PDT

    I've got a bunch of data that I need to plot for an assignment in my circuits class, but I only want the positive numbers. It's a HUGE list, so rather than manually removing the negatives, I figured I'd try to write a program to remove them for me.

    I had an intro to programming with C++ course last semester, but we didn't cover how to read or write to files, so I did a bunch of Googling on how to read from a file in C++ and I wrote code to put the data from the file into a vector, check if each value is positive, put only those values into a new vector and then read out the values in the new vector. Visual studio 2019 found no errors as I wrote the code, but when I try to compile it, it just tells me there are build errors without specifying what they are, so I don't know what I did wrong. I'm guessing I misunderstood something about how to read from a file — I couldn't find a single good explanation, so I did my best to synthesize the information from multiple examples I found online. Here's my code:

    '''

    //This programs reads a list of numbers from a data file, removes all non-positive numbers and outputs the list with only the positive numbers #include<iostream> #include<fstream> #include<vector> int main() { std::vector<double> list1;//initial list of numbers std::vector<double> list2;//numbers without negatives or zero fstream list1file; list1file.open("C:\Users\mbles\Desktop\3.1 b data file.txt", ios::out); int n = 0; while (n < 7924)//There are 7925 numbers in the list{ list1file >> list1[i];//read data from file into list1 vector n++; } for (int i = 0; i < 7924; i++){ if (list1[i] > 0){ list2[i] = list1[i];//write positive numbers into list2 vector } } //fstream list2file; //list2file.open("positive number list", ios::out); int m = 0; while (m < list2.size()){ std::cout >> list2[m];//output list of only positive numbers } } 

    In case the formatting gets messed up, I also copied it into GDB here: https://onlinegdb.com/kjdmLqIcj

    I don't see any obvious mistakes and I'm pretty solid on all the concepts I used except reading from a file, so I have to assume my mistake is there, but I'm I compared what I did to the examples I looked at and I don't see anything wrong, so I'm not sure what else to do with regards to debugging. I'm really stuck.

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

    [Automata] What does prefix of a string mean?

    Posted: 04 Jun 2021 07:35 PM PDT

    So I'm doing a problem where I have to design a DFA for "The set of all strings of 0's and 1's such that no prefix has more 1's than 0's." But what does that even mean? Is it referring to the first half of a string? If so what's the prefix of an odd length string?

    submitted by /u/2kfan
    [link] [comments]

    Should I give up? Honest feedback

    Posted: 04 Jun 2021 06:59 PM PDT

    I've been off an on learning since 2018, I started a bootcamp but was comfortable at my job at the time and didn't have the honest want to do it. In 2020 I moved and quit my job. With the pandemic I started back on coding and have been going the self taught route. I feel comfortable coding with most things front end related. Rails, JS, CSS, HTML, some react, and API's but its been impossible for me to get my foot in the door. I really do like programming too.

    I have some friends that have some connections in tech and have offered me referrals but I seem to get overlooked instantly. I know there is so much more to learn but even offering to work free for experience I've had no takers. I wouldn't say I'm amazing at anything but I just got a rejection from a company that had a referral direct to the hiring manager. among literally 100's and 100's of applications

    I feel like I should maybe stop and that with the saturation of self taught an bootcamps out there that I won't get my foot in the door.

    Would anyone be willing to look at my portfolio and resume and give me honest and critical feedback?

    I need to get a real look at where I am and see if its a lost cause.

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

    C# Documentation on Microsoft's website sometimes looks strange and unreadable

    Posted: 05 Jun 2021 12:10 AM PDT

    Sometimes, code blocks written in "ANTLR" show up and I barely ever understand what's going on in them. Example here. Can someone tell me what to do? I just wanted to understand (LINQ) queries (never understood them well). I already tried disabling all my ad blocking software and nothing changed. I only wanted to understand queries better!

    Help/advice is welcome

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

    What are "message semantics" in the context of HTTP?

    Posted: 05 Jun 2021 12:08 AM PDT

    From the Spring docs:

    WebSocket is also a low-level transport protocol, which, unlike HTTP, does not prescribe any semantics to the content of messages. That means that there is no way to route or process a message unless the client and the server agree on message semantics.

    What do they mean?

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

    If I have learned the concepts of C, and now I'm moving to C++ for my next semester. What book would you recommend for learning C++?

    Posted: 04 Jun 2021 11:53 PM PDT

    If I were to describe my situation, I learned C at my 1st and 2nd semester of College. I didn't make my own projects to learn more about the langauage outside of school. Now that I'm moving to another language which is C++ for next semester to prepare, what book would you recommend? Thanks.

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

    HTML <div>

    Posted: 04 Jun 2021 11:51 PM PDT

    Helo guys please help me I am just a beginner in programming. I create a webpage with 2 div . Divided the main page into to divisions one is 20%(names A) and the other is 80%(named B). I have added some links in the A and while clicking on the links in A the related page should load in B. Please help me with this.

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

    In-Memory DB updating before SaveChanges() is called (EF Core)?

    Posted: 04 Jun 2021 11:42 PM PDT

    Hi, for unit testing I am using an in-memory database which has been working fine so far. The current functionality I am implementing is updating of multiple entities in one go, however, as soon as I retrieve an entity and make a change the change is applied before SaveChanges() is ever called and is making the unit test fail. Actual manual execution works as expected.

    List<someObject> someObjects = new List<someObject>(); listOfUpdateObjects.ForEach(x => { var someObject = _db.SomeObjects.SingleOrDefault(y => y.Id == x.Id); if (someObject != null) { someObject.Name = x.Name; // This change effects the entity even without reaching SaveChanges() someObjects.Add(someObject); } }); return false; _db.SomeObjects.UpdateRange(someObjects); _db.SaveChanges() // Never reached but entity change still remains in the unit test 

    If anyone could shed some light on why this is happening or how to fix is that would be greatly appreciated, thanks!

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

    Looking For a Starting Point

    Posted: 04 Jun 2021 07:55 PM PDT

    I'm considering taking up programming as a hobby, and I would like some suggestions as to where to start.

    I learned a little bit of programming in high school (C++, I think), and I didn't hate it, but I didn't think much of it as there was no practical application for the knowledge in my life at that time. Also, that was in the late 90's, so I realize that experience doesn't count for much anymore.

    I also learned a little with Scratch because my son thought he was interested in programming for a little while. But he's only 10, so that didn't last long.

    I know there are now many languages out there and they are each excellent for different applications. My current thought is it would be nice to combine learning to code and program with my other hobby: tabletop games.

    For kicks and giggles, I would like to write programs that can output Role Play Game (not just the big name ones like D&D) character sheet information. It would be nice if it could work 2 ways: by inputting the core stats of a character and have the program calculate the other stats derived from those and; if the program could randomly generate a complete character for me incase I don't know what I want to play.

    So, what are some of the languages that could help me achieve this considering the tiny amount of experience I have?

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

    Going through this journey on my own, and need some support to pull me out of a self-doubt spiral.

    Posted: 04 Jun 2021 03:21 PM PDT

    I'm self taught, and I spend basically all day every day learning and trying to get as good as I can be before I start applying for jobs. I'm still pretty new to everything (about 5 months in) but I keep freaking myself out because the idea that I need some sort of degree or certification is so deeply ingrained in me. I get scared that I am investing all this time and energy but at the end of it I'll not end up in a good situation because of my lack of qualifications.

    Then, I think, well I'll take the best situation I can get and keep improving, and move up by changing jobs after getting experience. But will I ever really get considered for good, interesting positions if the other candidates that I'm up against have similar skill-sets plus the degree?

    Am I shooting myself in the foot by trying to learn all this stuff on my own and not trying to get some kind of qualification?

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

    GitHub says there's only 8 commits in a program I have more than 20?

    Posted: 04 Jun 2021 10:51 PM PDT

    I've been working on a program I hadn't decided was worth pushing to GitHub, and sometimes I just use git locally for awhile. So I push the app up to GitHub and it says I only have 8 commits. I've been working on this app every couple of days for the last couple of weeks. So I was wondering what gives? How did I lose all those commits from just pushing the program? I created the GitHub repo long after I had been committing locally. This makes me wonder what else GitHub has wrong about my commit history. Is there a way to fix this?

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

    New to Big O. Why is this problem's time complexity O(m + n)?

    Posted: 04 Jun 2021 06:50 PM PDT

    I'm pretty new to Big O and have been trying to process this leetcode solution: https://leetcode.com/problems/jewels-and-stones/discuss/113553/C%2B%2BJavaPython-Set-Solution-O(J-%2B-S)

    def numJewelsInStones(self, J, S): setJ = set(J) return sum(s in setJ for s in S) 

    The code makes sense, but I need help determining the time complexity and why it's O(J + S). J and S are both strings

    So a loop like for s in S is O(S) since that's a loop, and according to this, the time complexity of s in setJ would be O(1). However, I'm not too sure why this would make the time complexity O(J + S) and not O(S)

    Something like the code below would also be O(J + S), and that makes sense to me. I'm just having trouble understanding this problem in particular

    for s in S: # do something O(1) for j in J: # do something O(1) 

    Also, where does sum() fit in with this? I think it's O(n), so would I also have to take into account that? Thanks in advance!

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

    [BEGINNER AT PYTHON] need help in fixing the error

    Posted: 04 Jun 2021 09:55 PM PDT

    # import all the required libraries first import sys from tkinter import * # import time library to obtain current time import time # create a function timing and variable current_time def timing(): # display current hour,minute,seconds current_time = time.strftime("%H : %M : %S") # configure the clock clock.config(text=current_time) # clock will change after every 200 microseconds clock.after(200, timing) # Create a variable that will store our tkinter window root = Tk() # define size of the window root.geometry("600x300") # create a variable clock and store label # First label will show time, second label will show hour:minute:second, third label will show the top digital clock clock = Label(root, font=("times", 60, "bold"), bg="blue") clock.grid(row=2, column=2, pady=25, padx=100) timing() # create a variable for digital clock digital = Label(root, text="AskPython's Digital Clock", font="times 24 bold") digital.grid(row=0, column=2) nota = Label(root, text="hours minutes seconds", font="times 15 bold") nota.grid(row=3, column=2) # send signals if the clock hits a specific time if current_time == time.strftime("%H : 59: 45") or current_time == time.strftime("%H : 44: 45") or current_time == time.strftime("%H : 29: 45") or current_time == time.strftime("%H : 14: 45"): sig_tra = True and print("Sending...") else: sig_tra = False root.mainloop() 

    this is the errpr:

    Traceback (most recent call last):

    File "C:\Users\jd\Downloads\proj\digital_clock.py", line 36, in <module>

    if current_time == time.strftime("%H : 59: 45") or current_time == time.strftime("%H : 44: 45") or current_time == time.strftime("%H : 29: 45") or current_time == time.strftime("%H : 14: 45"):

    NameError: name 'current_time' is not defined

    objective:

    send a Boolean signal and a message if the clock hits a specific time in the clock in every hour

    any help,,, is very much appreciated

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

    [c# .net core] Cancel a task/thread.

    Posted: 04 Jun 2021 06:06 PM PDT

    Hi. Im using MoonSharp to execute lua code from C#. Its working perfectly fine, but i dont know how to stop, for example, this:

    while true do end 

    That will hang forever, and i dont know how to stop that. Moonsharp doesnt say how to prevent that, so im asking here if i can cancel a thread somehow.

    In moonsharp you run lua like this

    string script = @" while true do end "; Script script = new Script(); script.RunString(script); <- code stops until while is completed 

    So if there is a while true loop it will hang in the last line.

    Is there any way to prevent that?

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

    [help] beginner at python,,,help, I have rewritten it multiple times

    Posted: 04 Jun 2021 09:50 PM PDT

    # import all the required libraries first import sys from tkinter import * # import time library to obtain current time import time # create a function timing and variable current_time def timing(): # display current hour,minute,seconds current_time = time.strftime("%H : %M : %S") # configure the clock clock.config(text=current_time) # clock will change after every 200 microseconds clock.after(200, timing) # Create a variable that will store our tkinter window root = Tk() # define size of the window root.geometry("600x300") # create a variable clock and store label # First label will show time, second label will show hour:minute:second, third label will show the top digital clock clock = Label(root, font=("times", 60, "bold"), bg="blue") clock.grid(row=2, column=2, pady=25, padx=100) timing() # create a variable for digital clock digital = Label(root, text="AskPython's Digital Clock", font="times 24 bold") digital.grid(row=0, column=2) nota = Label(root, text="hours minutes seconds", font="times 15 bold") nota.grid(row=3, column=2) # send signals if the clock hits a specific time if current_time == time.strftime("%H : 59: 45") or current_time == time.strftime("%H : 44: 45") or current_time == time.strftime("%H : 29: 45") or current_time == time.strftime("%H : 14: 45"): sig_tra = True and print("Sending...") else: sig_tra = False root.mainloop() 

    as from the title ,,,any help is appreciated , I just need it to send Boolean signals and print a message if it hits %H: 59:45 and among other times in the clock

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

    No comments:

    Post a Comment