• Breaking News

    Saturday, March 20, 2021

    What have you been working on recently? [March 20, 2021] learn programming

    What have you been working on recently? [March 20, 2021] learn programming


    What have you been working on recently? [March 20, 2021]

    Posted: 19 Mar 2021 10: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]

    All the MOOC of Helsinki University...

    Posted: 19 Mar 2021 11:25 AM PDT

    So, after a little research, I found out that Helsinki's university offers a lot of MOOC (Massive Open Online Course), they're all open, free of charge and fully available online.They are all available at this link : https://www.mooc.fi/

    There's a lot of courses, here is a little list of them with the links:

    • Elements of AI : for everyone interested in learning what AI is. No need for knowledge about AI to take this course.
    • Building AI : for anyone who wants to improve their AI-related vocabulary and skills, including non-programmers and people who can program in Python.
    • Hands on computing science : a "map" of diverse skills that you need for scientific computing, which are often not directly taught in classes these days.
    • Java programming : you will learn the basics of computer programming, along with algorithms and object-oriented programming through the Java programming language.
    • Ethics of AI : for anyone who is interested in the ethical aspects of AI, to learn what AI ethics means, what can and can't be done to develop AI in an ethically sustainable way.
    • Data wrangling in Python and R : A mini-course for deep and lasting intuitions about transforming data in Python or R.
    • Introduction to Cyber Security : in collaboration with F-Secure that focuses on building core knowledge and abilities related to the work of a cyber security professional.
    • Full Stack Web development : will introduce you to modern JavaScript-based web development. Learn React, Redux, Node.js, MongoDB, GraphQL and TypeScript in one go!
    • DevOps with Docker : an introductory course to the world of DevOps with Docker and docker-compose. ( in partnership with Eficode the leading DevOps company in Europe).
    • DevOps with Kubernetes : an introductory course to Kubernetes with K3s and GKE, you will develop software with a microservice architecture that utilizes Kubernetes to serve software that scales and deploys automatically. And learn how to manage it all.

    All the courses are FREE !

    So don't hesitate to begin whatever you want, and enjoy, also don't forget to thank Helsinki's University .. <3

    Enjoy. :D

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

    Is it worth it to go to a coding bootcamp in 2021?

    Posted: 19 Mar 2021 08:35 AM PDT

    Hello I'm new and I want to start coding. I completed the java fortune teller exercise without much trouble by myself, at this point I just want to know if its necessary to go to a coding bootcamp. Can't I learn all of this info on my own or does it give you a leg up in the industry to have that bootcamp certificate.

    Also is there a full curriculum online I can use as a studying guide on what I should learn?

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

    Needing help with creating a triangle in C

    Posted: 19 Mar 2021 10:03 PM PDT

    I mean a left sided triangle, for example, row 1 would have #. Row 2 would have ##.

    I'm trying to use two for loops but they keep coming out as squares or rectangles.

    I get the gist of what I want but coding wise it's not turning out well. Don't want the answer but a lead.

    submitted by /u/Mind-Objective
    [link] [comments]

    How important is pseudocode?

    Posted: 19 Mar 2021 08:27 PM PDT

    I'm starting my first formal class on programming, and beginning with Java. I've done self study for awhile previous in C# and Unity.

    Many of the modules point to pseudocode and explain a code in that form, ask the student to write in that form, etc.

    My question is, how applicable is pseudocode in a career? Is it just a tool to teach students by varying styles, or is it an applicable skill I should focus on to become a better programmer for an employer?

    Thanks in advance!

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

    C++ Overwhelmed and Discouraged - Advice Needed!

    Posted: 19 Mar 2021 06:01 PM PDT

    I'm about 4 days into learning C++ with no prior programming/computer knowledge.

    I started with codecademy and things were going good for a while. But then it got into while loops and started to lose me. But I pushed on, leaning on hints and trying to make sense of it. When I couldn't, I went to learncpp.com where I blazed through the early material due to the concise instruction and examples.

    Then it got into parameters and arguments in functions and I just wasn't retaining it. So I went back to codecademy and quickly reached the point where it goes into parameters and arguments again. Now, I'm not confident I could create even a simple program from scratch without referencing pretty much every line.

    On top of that, both resources are utilizing items that haven't even been kind of explained. Bool, std::string, double, float etc. They've been introduced but I'm left googling for hours trying to figure out what they do and how they apply. And I'm hung up on figuring them out because the way I was able to retain the earlier lessons was by reading through the example code and deciphering it before completing the objective.

    Vectors are another issue, as the lessons were straightforward and I remember the info, but not the code. Now, I'm being tested on functions and vectors and parameters and arguments with no references and it has me feeling like a dolt.

    I'm not going to quit, I'll hammer at it until it makes sense but I'm just wondering if this is generally a place new learners reach this early and what I should do about it.

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

    How much base knowledge to have for entry level jobs?

    Posted: 19 Mar 2021 07:34 PM PDT

    I'm got a real good grasp on classes and structures and other aspects of OOP in c++. Is this enough to start applying for entry level jobs? I know there's a wealth more of knowledge to learn I was just wondering what is the base for entry level developers?

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

    Using python with react

    Posted: 19 Mar 2021 08:52 PM PDT

    Hi, I am building a simple react app where I have an array of image source URLs. I want to pass it to a function in a python script that I have. I believe that I should be using flask but I have no idea how to incorporate the two. For the sake of this question, let's say that my code is as follows:

    import React from 'react' export default class Images extends React.Component{ componentDidUpdate(){ //Here is where i want to call the python function } render(){ return( <div> <p> Some text and stuff </p> </div> ) } } 

    from flask import Blueprint, request, jsonify Blueprint_name = Blueprint('someName', __name__) @Blueprint_name.route("/", methods=['POST', GET]) def some_function(images): for img in images: print(img) return jsonify(some data) 

    Can anyone point me in the right direction?

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

    [c programming] easy bash script and c- program

    Posted: 19 Mar 2021 10:39 AM PDT

    Hi! I'm wondering if someone knows the best way to import a string from a script into a c program in linux bash.

    ---------------------------------------------------------------

    So what I'm trying to do is this:

    I have a script that collects usernames and more info from /passwd and prints them out.

    I then want my c program to call on the script and collect all information it prints out and use it in my c program.

    How do I best do this?

    -------------------------------------------------------------------------

    Thanks for all help! : )

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

    Is this bad SQL practice?

    Posted: 19 Mar 2021 10:28 AM PDT

    I am writing a web app API and have some code that looks like this in a request:

    user = repo.FindUser() // SELECT * FROM user

    user.task--;

    repo.UpdateUser(user) // Update SQL here

    This is not wrapped in a transaction. Will there be concurrency issues with this code? For example, if the same user makes the same request in 2 separate sessions at the same time?

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

    pyautogui help

    Posted: 19 Mar 2021 08:10 PM PDT

    in pyautogui can i use locateonscreen() then when it finds it screenshot and expand the area so it it captures the space around what i want it to locate

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

    My usual self teaching MO is reverse engineering + trial and error. However this method is taking impossibly long with CSS.

    Posted: 19 Mar 2021 11:47 PM PDT

    How do you not spend endless hours trying to maneuver a single image to where you want it?? Only to have to change it later because you switched a property. Lol.

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

    Open App Academy compared to The Odin Project and why start with Ruby before Javascript

    Posted: 19 Mar 2021 07:15 AM PDT

    So yesterday I decided to try out the Open App Academy course and wow, I am blown away by the quality of it. I had previously competed The Odin Project foundation course and have completed 1/3 of Jonas Schmedtmann´s The Complete JavaScript Course 2021: From Zero to Expert! (it's extremely long and a great course). I really enjoyed it, but in my opinion the Open App Academy is on another level (at least for beginners). Why? Within a day I've already seen many of the basic concepts well explained that took me a lot longer to grasp going through TOP and Jonas's course.

    Obviously I can go through it a lot faster as I already know the core concepts but I just love how the videos explain each concept, and then give you the exercises. I don't do very well with having to read long documentation before I'm introduced to a concept so the videos are great for me! (Once I have been introduced to a concept I like reading the docs for more in depth information, but I like having a simple video explanation to introduce me to the concept).

    So far, on day 2, I'm still on part 2 "Intro to Programming", I think by day 4 I will have finished it. I had already learned the basics of Javascript so seeing how the same things are implemented in Ruby is really interesting for me. Speaking of, wow the basics of Ruby are so much simpler due to lack of syntax, one of the most difficult things about starting with Javascript was having to understand a concept and at the same time try to remember the syntax. Most of the time when I had a difficult to solve bug, I was missing a bracket somewhere in the code, but Ruby makes it much easier by omitting brackets and just using "end" to signal the end of a loop or a method.

    I'm sure it will get tougher but I just wanted to encourage other newbies to try out the Open App Academies course and learn the basics of Ruby before going on the Javascript, I think it's a much gentler learning curve and I think it will make Javascript easier to learn after as you will understand most of the core concepts.

    I'm sure many people will disagree with me but this is just my opinion :)

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

    C a function definition with \ instead of { after params

    Posted: 19 Mar 2021 11:46 PM PDT

    Hi,

    I got this assignment and I'm pretty much done with all parts except 1.

    there is a \ in a way I've never encountered in C before and not sure how to find info on this particular usage online and i only get it as an escape character for strings in c.

    can someone point me in the right direction to figure what it is?

    what is it's usage for when placed on the lines as follows

    #define func(argc, argv, x, y, z) \ x = 0; \ y = 0; \ z = 0; \ int i; \ } 
    submitted by /u/MezaNezam
    [link] [comments]

    I need help - how to play a windows game online

    Posted: 19 Mar 2021 07:39 PM PDT

    Hi im really new to python and im currently making a simple windows game using arcade - the kind that you just enter the file name on powershell and you get the game set up What i am curious about is how can i embed it to an online site so that others can play online - without the game file needed in the players' computer?? Plz help

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

    How many self taught developers fail?

    Posted: 19 Mar 2021 11:16 PM PDT

    I only ever see posts of self taught developers being successful, that's understandable people want to share what they are proud of, not their failures but it doesn't help to understand if I have a good chance at getting a career in programming (specifically ML) if I teach myself. I'd prefer not go to college as I'm not that financially stable and I value my mental health. I have 0 job experience and don't even understand the industry and since I'm from a third world country I also fear being scammed as I plan to rely on people outsourcing work.

    Have you failed at getting a career in programming or do you know someone who did? If you are an employer or can ask one for info, how successful are self taught developers? Simply, what are the chances I fail?

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

    Learning programming for a specific purpose; machine learning

    Posted: 19 Mar 2021 11:14 PM PDT

    Hi guys, for some background, most of my experience in programming comes from dabbling in C++ in middle school and, more recently, dabbling in Python (though I never got too far and haven't practiced that in a while). I also use SAS (which I guess is similar to MATLAB, if you're familiar) for research, as I do research revolving around clinical psych.

    Over the Summer, I'll finally have some time to pursue personal projects, and I want to try to pursue machine learning...I know that's probably a very high bar and probably requires a lot of background knowledge, but I want to try it anyways. Even learning to make something that can identify text would knock my socks off. I'm fairly good at picking things up, and I find that when you're learning something with a specific purpose in mind, there's a lot of concepts that can be de-prioritized...for example, if I want to replace the spark plugs in my car, I don't need a degree in mechanical engineering, I just need to know how to work with my specific Mazda. In the same way, I'm not looking to be a programming guru, I'm looking to work towards a specific goal and learn from the various mistakes I'll make along the way. Again, I'm sure there's a lot of foreknowledge required for pursuing machine learning, but I'll manage; I'm fairly quantitative and am more tech-savvy than the average bear, and I think this will be a nice challenge to push the boundaries of what I can currently do.

    That being said...what resources might you recommend for someone in my position? From Humble Bundle, I've got plenty of ebooks on Python, C, C++, Tensor, and machine learning in general...but I'm not sure where to start. I've got a fairly decent grasp on how programming languages are structured (though I'll admit that languages like Python confuse me more than languages like C++ since, from what I've observed, so much more is going on behind the scenes with the former). Any help would be appreciated. I realize this is probably an unreasonable goal...but humor me.

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

    Looking for criticism, guidance, and any help.

    Posted: 19 Mar 2021 11:10 PM PDT

    Hello, I am working on a project for school. I have completed the assignment and the code outputs how it should and meets the requirements.

    I am just looking for any criticism, or any help the could make the code better. Better for readability and just all around good code. (better/more comments, organization, anything really)

    Please note, that the instructor said we are not allowed to use loops, or arrays and other collections yet.

    I have the link posted to github. ParkingFinder

    Any help/criticism is appreciated. Thank you!

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

    [C++] Is there a fast way to calculate wether the shortest path between two angles is clockwise or counter clockwise

    Posted: 19 Mar 2021 11:10 PM PDT

    I have a program that contains two components of a vector that has a fixed magnitude (floats) and an angle which we'll call theta (double), both are variable in time, but the vector can never exceed a certain magnitude.

    Whever the vector reaches its maximum magnitude, I want the program to calculate the vector's angle (another double named phi), relate it to theta, see what's the shortest path to make them equal and then slowly transform the two components one step at a time until the two angles match while conserving the magnitude.

    Both angles should be a value in radians normalized between 0 and 2 pi, but I can change that if it would allow to calculate this more easily.

    Up to now the only thing I could fathom is this:

    if(hypot(SpeedX, SpeedY) > 20) {

    phi = atan2(SpeedY / SpeedX);

    ... ?

    }

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

    Quadratic Probing Hash Tables in Python

    Posted: 19 Mar 2021 11:08 PM PDT

    Hi,

    I've got this problem where I'm not passing any of the tests I'm running on my code but I can't quite tell what I'm doing wrong. I've just been introduced to quadratic probing so while it's took a while to get my head around I don't think thats where I'm going wrong here.

    Basically I have to create the rest of this function, def addItem(aString, aHashTable):

    The prompt I'm given says I need to:

    1. Get the hash code, h, using a function I've already created, stringHash
    2. If the slot in aHashtable at index h holds None then add aString to aHashtable at index h.
    3. If the slot in aHashtable at index h does not hold None then employ quadratic probing to resolve the collision. The loop terminates when an empty slot is found and aString is added or when k unsuccessful attempts have been made to resolve the collision.
    4. Finally, your function should return True or False, depending on whether a slot is found or not.

    Here's my code: i is supposed to be the number of collisions and k is 1 less than the size of the hashtable.

    def addItem(aString, aHashTable): """ Attempt to add aString to aHashTable using quadratic probing. Return True if the string was added, otherwise return False. """ h = stringHash(aString, len(aHashTable)) i = 0 k = len(aHashTable) - 1 if aHashTable[h] != None: h = (h + (i**2))%len(aHashTable) i = i+1 if i == k: return False else: return True 

    It's currently failing 10/10 tests so even though I thought I had quadratic probing figured out I've wasted a full night (I thought it was right until I ran the tests I was given) :)

    Could anyone with a bit of knowledge on data structures and quadratic probing please explain how to fix this and why this isn't returning True or false for me? Am I completely missing something here? I think I could use a loop to get it to stop once the number of collisions(i) hits k, but I don't get how I could implement it to return False after that if that makes sense.

    Thanks in advance - I'm running on fumes so if I've left anything out that will help just let me know

    submitted by /u/deadkittens-
    [link] [comments]

    What is the excel ActiveWorkbook.RefreshAll equivalent in google sheets?

    Posted: 19 Mar 2021 10:59 PM PDT

    Thanks in advance :)

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

    I hit a weird stumbling block, in the spirit of the Zen of python's adage "Now is better than never". I went on a project based approach to learning python. I finished what I had considered a capstone project. (it's rough) and i have lots of doubts.

    Posted: 19 Mar 2021 10:54 PM PDT

    So a year ago I took my first legitimate foray into programming. After trying to pick up a html and getting "bored". Codecademy gave a free premium membership. So I went and signed up. Best damn decision of my life. It jolted me into python which was amazing. And I loved it. I charted out a small idea of what I wanted to learn, syntax and projects. I bought colt steele's python course on udemy after reading some ppl praise his teaching style. Anyway I won't bore you with the whole mess of self teaching. suffice it to say that over the last year I got proficient in OOP, Tkinter, and sqlite3. I feel like I still have a lot to learn. And I've decided that after my project based learning phase to go back to the basic theory. And finish Steele's course. Mostly because there is so much I still don't know. But, working on the capstone project made me realize something huge. How on the world do I deploy my projects? (I must admit that I still don't know, or im good enough to have a fully deployable and safe app) but basically it comes down to this my capstone project at least the way I have it written requires to stay open to perform certain functions. Which means a desktop deployment won't quite cut it since when they power down or sleep processes are halted or paused. So I need to mess around either with a raspberry pi set up or the option I was considering run a linux emulator on an android tablet. And even then I don't think that would work

    I think I ought to probably mention what was my so called charted course. I wanted to become proficient in python and for that I had thought about making an app that would track down certain data inputs and store them in a database. Once I had something I liked I would then deploy it. I actually originally thought of the raspberry pi approach but that requires me to mess with electronic hardware. After that I wanted to create a pokemon style game in pygame to learn the basics of game design. Once I thought of myself as having mastered enough of python and the programming concepts. I wanted to move on to C# and improve on the idea behind the pygame. Now here is the thing. While it could definitely be partly an issue with my hardware (or lack there of) but when I designed the sprite art for my proof of concept project it was... shitty. Not good at all, definitely hand drawn. While the coding was definitely a challenge what with it being new framework I had not used before I was not really satisfied with the final product.

    Anyway that kinda put me off game design, so having made the capstone project. And being hesitant to work any further on my original idea of learning to design video games. And the difficulties which I am reading that come into deploying python software. I kinda hit a brick wall. I want to keep learning python. There is still so much I want to learn. From the theory to projects. One of my personal goals if I continue with python is write a program or part of one that incorporates database browsing in app. But with deployment as an issue, and my well ...unfortunate lack of hand eye coordination to wire together a raspberry pi into a tablet. I don't really think it's worth while. Sorry, I'm bordering TL:dR.

    I really don't know what to do, I have a C++ Text book and a Java text book. I have a ton of gaming development C# courses on udemy as well as my python courses. And Steele's web dev course. I one sense, I have an overwhelming amount of learning assets. The path I am considering is to finish steele's python course. And start the web development course and incorporate both of them. A python back end to a HTML/CSS/JS front end. Idk. That seems like the best path for someone on a limited income that wants to continue learning but works on an chromebook plus v1 and a macbook air 2017. And doesn't feel confident in messing around with linux/pi hardware as a deployment mechanism for his projects. Sorry for my rambling.

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

    Once again cant find waldo.. do i need to import a lib for this?

    Posted: 19 Mar 2021 10:49 PM PDT

    Why do i get the number 2? and not the maximum number??

    arr = [1,2,3,300,345,564,234,35464,423,543,65,65] n = len(arr) def find_max(arr, n): res = arr[0] for i in range(1,n): res = max(res, arr[i]) return res print('The max', find_max(arr,n)) 
    submitted by /u/sirreginaldpoopypot
    [link] [comments]

    Simple Explanation for Beginners: Library vs. API vs Framework

    Posted: 19 Mar 2021 10:37 PM PDT

    I am fairly new to the field of software development. I hear these terms thrown around all the time, yet cannot find a clear, simple definition of them online. In fact, I find they can be used interchangeably sometimes. This makes it very hard to distinguish between these terms.

    Is there any clear, simple explanation for beginners as to what these are respectively? If one could provide examples as well, that would be very much appreciated.

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

    Testing concurrency

    Posted: 19 Mar 2021 10:14 PM PDT

    I have a web API that I want to manually and automatically test for race conditions. An example function that i want to test would be:

    func IncrementUserTask(id int) {

    user = repo.FindUser(id) // SELECT * FROM user WHERE id=id;

    user.task++

    repo.UpdateUser(user) // Update SQL statement

    }

    How would I test this manually, such that it creates a race condition each time? For example, opening 2 browser windows or Postman clients and making a requests at the same time? And how would I handle this in an automated way? I assume via integration testing?

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

    No comments:

    Post a Comment