• Breaking News

    Friday, August 30, 2019

    Project Ideas for people without a project learn programming

    Project Ideas for people without a project learn programming


    Project Ideas for people without a project

    Posted: 29 Aug 2019 12:41 PM PDT

    Hi Everyone. I noticed a lot of people that are learning programming but don't have any specific goal in mind. I find that having a project to work on can help block out some of the other distractions, like wondering whether or not you're using the right language.

    I happened to see this article that has a couple of neat ideas:

    https://medium.com/better-programming/the-secret-to-being-a-top-developer-is-building-things-heres-a-list-of-fun-apps-to-build-aac61ac0736c

    You might have to view in incognito, it's behind one of those medium paywalls.

    All those screenshots look really nice, but even a stripped-down html version of these projects could be a lot of fun to build and a great learning experience.

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

    Conflicted on if I'm starting in the right place (Python)

    Posted: 29 Aug 2019 08:29 AM PDT

    Recently started learning python due to its high accolades as a programming language. I don't have any super specific goals in mind right now with where I want to take programming however I've recently been seeing comparisons on the languages about

    While (like most people my age) understanding fairly simple html is no problem. I was wondering if learning the 3 web dev languages was arguably more productive.

    From there I wondered, "Hang on, why am I learning Python when everyone says that Java and C++ are just as, if not more effective languages" - I then kind of came to grips with the fact that really eventually, the more programming languages you're familiar with the better, and later on you can pick specialties depending on your goals and interests.

    For that reasons I was thinking. Is it not better to learn a C language/java first for the transferable skills instead of python? (While also dabbling in web dev)

    Any opinions are appreciated.

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

    Am I wasting my time learning Swift ?

    Posted: 29 Aug 2019 09:34 AM PDT

    Hey guys, I'm currently a Comp Sci student and we primarily use Java , I would say I'm ok at Java, quite confident but not quite what I would say is intermediate level just yet. I'm about to go into my second year.

    I really want to learn swift because of a fun app I'd like to make but I can't lose the feeling that I should just be focusing on 1 language for now. Seeing as we use Java and Python more in our course in the upcoming year should I just stick to furthering my knowledge in those instead ?

    Just looking for a bit of advice , am I trying to take on too much by learning another language ?

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

    Which functional programming language should I learn as of 2019?

    Posted: 30 Aug 2019 12:37 AM PDT

    I am a self taught programmer. I code primarily in Java. I want to learn a functional programming language. Which one should I learn? I surveyed the various syllabi of universities online and I found that most academic environments preferred to introduce students to functional programming via Haskell. But I had heard of lot of hype about F# a few years ago.

    Which one should I learn as of 2019: Haskell, F# or some other functional language? I would prefer the functional language which also

    - has a mature and stable GUI library.

    - is used in the industry.

    - preferably cross-platform - Linux and Windows.

    TIA!

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

    Can somebody ELI5 what dependency injection is and how it relates to unit testing/mocking?

    Posted: 29 Aug 2019 04:43 PM PDT

    I spent the past hour reading about DI on Stack Overflow and other sites, but I still don't understand the concept nor its uses and benefits. Most of the examples also use an object oriented language like Java or C#, so I don't know how it'd would translate to JS and Node. They also mention factories and other patterns that I don't really understand either, so I don't know where DI ends and the rest begins.

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

    How to create an RSS feed from specific search results?

    Posted: 29 Aug 2019 01:17 PM PDT

    First off, not sure if this is the right place to ask this question, so any pointers would be handy...

    I'm new to the RSS world. I like the idea of being about to combine multiple news/blogs/etc into one feed, however, I mainly wanted keep up-to-date on specific topics.

    For example, I want to follow this website, but only for articles that have this search term.

    They provide an RSS feed, but it's for their entire website. How do I specify specific items or search terms to appear in my RSS feed?

    Any help would be appreciated!

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

    Do you feel like you’ll never be good enough?

    Posted: 29 Aug 2019 07:45 PM PDT

    So I have been teaching myself to code for the past year and a half and feel like I've gotten far, farther than I ever thought I would. When I finally started interacting with other developers though, I started to feel really bad. It's probably because I had someone critique my work and I just felt stupid, like there's just so much I don't know, it's really overwhelming and daunting. I definitely don't want to give up, it can just get so discouraging to feel like you practiced and studied so hard (definitely the hardest I've ever studied for anything, ever) and just feel so far away from your goals. What picks you up and help get out of this funk?

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

    How to get better at logic?

    Posted: 29 Aug 2019 05:01 AM PDT

    I was hired as a Jr Dev 7 months ago and I've been working on a custom CMS built with Laravel. Now I'm getting deeper into a huger Laravel project. Now there are different user groups and roles and 1 eloquent query pulls data from different users based on logic, I've never had to write code like that ever before. What helps me is seeing the SQL that Eloquent is generating but it made me think maybe I should brush up on my SQL skills. I just know the basics and up to left joining tables based on foreign keys. Should I just train on Code Wars or are there any resources out there to help me get better at logic. I'm also self taught so I'm always trying to find thinking to work out outside of work to help me get better.

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

    Flask redirects not working. POST HTTP/1.1 302 ERROR (project)

    Posted: 29 Aug 2019 02:24 PM PDT

    i am developing my first flask web app that involves login, sessions and of course redirects. It is a webapp where schools can log in and view bullying reports from their students.

    On localhost everything seemed to work fine but in the heroku server it doesn't. In heroku when i login it doesnt remember the session and in the next redirect it just goes back to index.

    In localhost everything works but i have 1 error that might be causing this redirect bug:

    "POST /login HTTP/1.1" 302 - 

    I get the same bug in register:

    "POST /regescuela HTTP/1.1" 302 - 

    Here is the heroku link if you want to try it out: https://pure-harbor-99831.herokuapp.com/

    Code:

    app = Flask(__name__) pp.config["SESSION_FILE_DIR"] = mkdtemp() app.config["SESSION_PERMANENT"] = False app.config["SESSION_TYPE"] = "filesystem" Session(app) app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DATABASE_URL'] db = SQLAlchemy(app) app.config["TEMPLATES_AUTO_RELOAD"] = True def login_required(f): """ Decorate routes to require login. http://flask.pocoo.org/docs/1.0/patterns/viewdecorators/ """ @wraps(f) def decorated_function(*args, **kwargs): if session.get("user_id") is None: return redirect("/login") return f(*args, **kwargs) return decorated_function @app.route("/") def index(): return render_template("index.html") @app.route("/regescuela", methods=["GET", "POST"]) def register(): session.clear() if request.method == "POST": username = request.form.get("username").upper() dup_username = db.session.query(db.exists().where(Usuarios.username == username)).scalar() nombrescuela = request.form.get("nombrescuela").upper() dup_nombrescuela = db.session.query(db.exists().where(Usuarios.nombrescuela == nombrescuela)).scalar() if dup_username: return apology("Este usuario ya existe! Prueba con otro!") if dup_nombrescuela: return apology("Esta escuela ya ha sido registrada anteriormente!") if not request.form.get("mail"): return apology("No ha introducido el correo electrónico!") if not (request.form.get("provincia")): return apology("No ha introducido provincia.") if not request.form.get("nombrescuela"): return apology("No ha introducido el nombre de la escuela!") if "@" not in request.form.get("mail"): return apology("No ha introducido un correo electrónico valido!") if not request.form.get("username"): return apology("No ha introducido un nombre de usuario!") elif not request.form.get("password"): return apology("No ha introducido una contraseña!") elif request.form.get("password") != request.form.get("confirmation"): return apology("Las contraseñas no coinciden.") else: usumayu = request.form.get("username") return render_template("regescuela.html" nuevaentrada = Usuarios(nombrescuela = request.form.get("nombrescuela").upper(), username = request.form.get("username").upper(), hash = generate_password_hash(request.form.get("password")), provincia = request.form.get("provincia"), mail = request.form.get("mail")) db.session.add(nuevaentrada) db.session.commit() session["user_id"] = nuevaentrada flash("Registrado!") return redirect("/")@app.route("/check", methods=["GET"]) @app.route("/login", methods=["GET", "POST"]) def login(): """Log user in""" # Forget any user_id session.clear() # User reached route via POST (as by submitting a form via POST) if request.method == "POST": username=request.form.get("username").upper() # Ensure username was submitted if not request.form.get("username"): return apology("Debe ingresar un nombre de usuario.", 403) # Ensure password was submitted elif not request.form.get("password"): return apology("Debe ingresar una contraseña.", 403) # Ensure username exists and password is correct if rows is None or not check_password_hash(rows.hash, request.form.get("password")): return apology("Usuario o contraseña incorrectos", 403) # Remember which user has logged in session["user_id"] = rows.username #rows[0]["username"] session["nombrescuela"] = rows.nombrescuela # Redirect user to home page flash("Sesión Iniciada!") return redirect("/") # User reached route via GET (as by clicking a link or via redirect) else: return render_template("login.html") @app.route("/logout") def logout(): """Log user out""" # Forget any user_id session.clear() # Redirect user to login form return redirect("/") 

    I cant sole it. Any clues?

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

    Best way to learn python

    Posted: 29 Aug 2019 10:02 PM PDT

    I recently got a bunch of books on machine learning that I am interested in reading through. However they are all written for python. As someone who already knows Java, and the fundamentals of how a programming language works, what is the most effective way for me to learn python?

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

    Finished the 3 ECTS online course "Full Stack Open 2019" by Univ. of Helsinki.

    Posted: 29 Aug 2019 03:53 AM PDT

    Finally I have completed enough exercises to be awarded with the course certificate. So far I have earned 3 credits and can continue further to get more credits and an advanced certificate. It took me about 40 something hours to finish this course (I was slow in grasping new concepts). I feel that now I have a good foundation in react and linking a react app with backend (Node.js).

    You need to submit all the compulsory exercises from part 0-3 in the course to get the certificate.

    OVERVIEW

    Part0 encouraged me to think about the data being transferred between frontend and backend or between client and server using web sequence diagrams.

    Part1 required me to build some basic react apps employing hooks to manage state and refactoring modules.

    Part2 where I had to use local server using json-server package to save data and delete from it which was saved in a json file in the project directory.

    Part3 needed me to put all things together and combine react's frontend with node.js backend and use mongodb as database replacing json-server. I also got to know basics about ESLint.

    Link to the course: https://fullstackopen.com/en/

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

    Almost 30 - is my dream possibile?

    Posted: 30 Aug 2019 12:52 AM PDT

    Hi everyone,

    I've got a pretty ... well let's say exciting life and I would love to start learn programming.

    My problem is that I don't have a university degree - I've got a long and hard family story. My partents didn't want me to learn programming, so I didn't have my own pc... but don't lets talk bad about them because...they are dead.

    12 years ago there was a horribily family tragedy . Due to a car accident I lost nearly my whole family.

    I lost my parents, my grandparents but my siblings survived. What now? Well I had to end my dreams about university and needed to get a job. I could get a vocational training but didn't have enough time for a degree. Either that or I would have to force my siblings into an orphanage... and I couldn't do this. Last year the last of them reached 18 years and is responsible for his own life.

    I was able to get a decent job with decent amount of money and I am grateful for this oppurtunity to get a well paid job without many years of experience but the job is dull and boring asf. No joking -I would get a depression if I had to do this for a long time. We got a union and as long as the company isn't going out of business I can't lose my job. So I guess it would be good to keep that job and start learning privately.

    I work with databases - access and sql ... and I don't like this. It's, for me, pretty boring, the outcome of my work is boring - it's not really the fault of access and sql - more the things we are doing with it.

    I have two friends, each of them works for a big company in the gaming industry, which are programmers. Both of them encourage me ... but both of them have very different opinions.

    "Choose python as a beginner, it's easy and you will learn fast"

    "Well buddy, you want to work in the gaming industry, python is a good language but I would suggest you to learn c++ or c#. C++ isn't as easy as python but at the moment you understand c++ you will have no problems in learning another language...besides c++/c# are heavily used in this environment"

    I have to say that I live in a bubble - here in central europe there are lot's of big gaming companys. I wouldn't have a problem with moving abroad - even outside the EU (which would be pretty dificult) but there is so much competition - 20 old years people with years of programming experience...

    Is it important to let you know what type of games I like? I guess not but I like rts and story games. It don't have to be big aaa - a good story and I am happy.

    What do I want to achieve? Well money is important but it's not the most important thing. I want to do something I like or let's say what I am interested in.

    About me - I love learning human languages. Is this comparable with learning a programming language?

    Nowadays I can speak german (okay it's my native tongue) english (sorry for some grammar mistakes) and spanish pretty well and a bit french and even japanese.

    Currently I'm working myself through these great faqs.

    thanks a lot

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

    Leetcode always gives me a hard time in C

    Posted: 30 Aug 2019 12:51 AM PDT

    I've been doing leetcode problems on and off for a few months now. I've gotten to the point where I can solve nearly all medium problems. I started doing all of them in python (occasionally in java), however when I switch to C, because I'd like to get some practice with the language, I run into a huge amount of run time errors. Doing pretty much anything as all throws an "AddressSanitizer" error, or a buffer overflow. Running the same code on my machine works fine. I have no idea what's wrong.

    Even something as simple as trying to print the the *returnSize throws an error (and even if it prints, it never makes any sense. It looks like garbage). I don't know if I'm just making a ton of mistakes, or the leetcode C compiler is just extremely picky about what it runs.

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

    Is Java used for app development?

    Posted: 30 Aug 2019 12:02 AM PDT

    If yes, then which IDE support it?

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

    How does one get started with understanding programming proofs

    Posted: 30 Aug 2019 12:02 AM PDT

    I've heard the term proofs thrown around a few times in reference with programming. I am not at the math level that I understand how to do mathematical proofs.

    How does one get started with this topic? Where do we begin and what is absolutely essential to understand before we can begin?

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

    Express.js - Cross-Origin Request Blocked

    Posted: 29 Aug 2019 01:07 PM PDT

    I have a Node.js server running on localhost port 3000. I also have a Vue.js application running on port 8080. I've implemented passportjs (Google strategy) on my login form that is written in Vue.js.

    However, when I click on the Google+ button, I have a CORS blocked error which tells me that I have a missing CORS even though I have enabled cors in my server code.

    I've tried changing parameters to cors():

    app.use(cors({origin: 'http://localhost:3000', credentials: true}));

    I've also tried adding Header set Access-Control-Allow-Origin '*' to my apache2.conf file.

    I also get a HTTP 302 code every time I hit the button.

    Node.js file: ``` const express = require('express'); const bodyParser = require('body-parser'); const cors = require('cors'); const passport = require('passport');

    const app = express();

    app.use(cors());

    // Routes app.use('/user', users);

    // Passport strategy passport.use(new GoogleStrategy({ clientID: process.env.GOOGLE_CLIENT_ID, clientSecret: process.env.GOOGLE_CLIENT_SECRET, callbackURL: '/user/google/redirect' }, function(accessToken, refreshToken, profile, done) { User.findOrCreate({ googleId: profile.id }, function (err, user) { return done(err, user); }); }));

    // Server start app.listen(3000, (req, res) => { console.log(Listening to port 3000...\n); }); ```

    Router: ``` // auth with google+ router.get('/google', passport.authenticate('google', { scope: ['https://www.googleapis.com/auth/plus.login'] } ));

    // callback route for google to redirect to router.get('/google/redirect', passport.authenticate('google', { failureRedirect: '/login' }), function(req, res) { res.send('Done!'); }); ```

    Vue.js file:

    ``` <template> <v-card class="elevation-12" v-on:submit.prevent="login"> <mdb-btn align-center justify-center class="btn-gplus" icon="google-plus-g" fab v-on:click="authGoogle()">Google +</mdb-btn> </v-card> </template>

    <script> import axios from 'axios'; import router from '../router/router'; import { mdbBtn } from 'mdbvue';

    const { URL } = require('../config');

    export default { name: 'Login', methods: { authGoogle () { axios.get(${URL}/user/google, { }).then(res => { console.log(res); }).catch(err => { console.log(err); }) } }, components: { mdbBtn } }; </script> ```

    When I enter http://localhost:3000/user/google/ in my browser, the Google login page opens successfully but I cannot accomplish this in my code.

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

    Question On Git Branching

    Posted: 29 Aug 2019 07:49 PM PDT

    Hi all.

    I'm trying to wrap my head around Git, I've currently been using this resource:

    https://learngitbranching.js.org/

    However, I'm a little confused about the branching process. I'm trying to understand the need to branch and the difference between branches and commits.

    Am I right in thinking that:

    1) A commit is just the same as branching but that
    2) Branching just gives a name to a specific change/commit you've made such as 'Login Bug Fix'

    The above course is so confusing because I'm not sure what the difference between commits and branches are and why in exercise two using checkout wrong messed things up why would you you git branch as opposed to always just using git checkout -b.

    Like this:

    https://i.imgur.com/qiFmMVR.jpg

    Just confuses the hell out of me?

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

    Most efficient calculator

    Posted: 29 Aug 2019 11:28 PM PDT

    Hey guys, I was looking to make most efficient possible calculator from the things that i learned in programming. Currently im done with object oriented programming and I dont know whats the most efficient way to make a calculator. Should I make a class or use templates with simple functions or there is something else more efficient? The mandatory functions to implement are addition,subtraction, multiplication and division.
    Any help will be appreciated.

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

    Is there a way to create a multiple .txt files in a single line in CMD?

    Posted: 29 Aug 2019 10:58 PM PDT

    ex.

    copy con FILE1.txt & copy con file2.txt & copy con Copy con file3.txt

    Is there a way to make the command use once only?

    like this:

    copy con "FILE1.txt", "FILE2.txt", "FILE3.txt"

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

    Input filtering in c

    Posted: 29 Aug 2019 10:51 PM PDT

    I want to take integer input in a program using scanf in such a way that any character input is discarded but the program continues. Is there a way to do this..?

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

    Nood here has a noob question

    Posted: 29 Aug 2019 10:22 PM PDT

    Hi! so im a new Com sci student and the first language were learning is C++. Were using visual studio 2017 and im learning the hello world program like everyone does, however when i go to run it an error comes up saying "system cannot find the path specified" ive looked everywhere and this is my last hope so i figured id ask the experts! HELP

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

    How to plot data into an interactive map?

    Posted: 29 Aug 2019 06:36 PM PDT

    First, I'm not really sure if this question belongs in this subreddit. If not, please let me know where should I post it.

    So, I need to plot on a map (with pins) the addresses of the clients of my father's business, and have the functionality of hiding (or showing) them according to certain categories (location, size of sells, etc.). All the information's on an Excel sheet.

    I tried to use My Maps but it is not flexible enough to do what I want. Is there another free tool that I can use to do this? Or should I code it? And if that's the case, could you please share with me some resources/advise?

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

    use of return

    Posted: 29 Aug 2019 10:18 PM PDT

    Why we use return in c

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

    Am I being taught modern cpp?

    Posted: 29 Aug 2019 10:01 PM PDT

    I am a first year computer science student and we are learning object oriented programming(OOP) using CPP.

    We are learning using classes with move constructors, move assignment, copy constructors, copy assignments along with constructor, destructor, etc.

    But I was wondering if it's modern CPP way of using the class.. I probably shouldn't complain so much since I am just a beginner and have almost no idea how things works yet. But when I compile the code my professor wrote gives me a bunch of warnings saying -Wc++11-extensions . It seems like he writes something C++11? Is it a good practice?

    Excuse my lack of knowledge about CPP programming but just wanted to know if I'm being taught right.

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

    No comments:

    Post a Comment