• Breaking News

    Thursday, October 18, 2018

    Creating a Python Website from the Bottom Up - Beginner Flask Tutorial learn programming

    Creating a Python Website from the Bottom Up - Beginner Flask Tutorial learn programming


    Creating a Python Website from the Bottom Up - Beginner Flask Tutorial

    Posted: 17 Oct 2018 10:08 AM PDT

    tl;dr Flask tutorial here

    Hey everyone!

    There's tons of Flask tutorials out there, but I noticed that most of them were mostly focused on doing things the "correct" way for people with lots of programming experience already. I wanted to create a tutorial from the bottom up for beginners in mind, so that they can create quick websites with minimal Python experience. This type of tutorial is kind of an experiment, so please take a look and let me know what you think! https://aryaboudaie.com/python/technical/educational/web/flask/2018/10/17/flask.html

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

    How I've learned how to shortcut learning an additional programming language

    Posted: 17 Oct 2018 08:31 PM PDT

    Hi guys. Over the past 12 years of programming professional I've distilled a lot of my experience into logical steps to learn a new language quickly and thoroughly. I hope you get something useful out of this. If you have any questions let me know below.

    Here are 5 ways you get shortcut your learning process.

    • Use knowledge that you know from other languages
    • Nail down the fundamental knowledge
    • Resources that will help you learn fast
    • Find what you don't understand and work backwards
    • Try first, then ask

    Use knowledge that you know from other languages

    The fastest way to learn a new language is to already know at least one. Use what you know from a previous language to learn a new one. For that I use, http://hyperpolyglot.org/.

    What I love about hyperpolyglot is the table format comparing multiple languages. It's easy to see relationships between what you already know and how you'd implement them in the new language. Want to see how you'd do variable interpolation in Node.js, but you only know Python? No problem. Have a look at the reference sheet under "variable interpolation".

    Sometimes what you know in one language doesn't translate 1 to 1 to the new language. That's okay. Just learn the differences. For instance, in PHP you have class property visibility, such as "private", but in Python there isn't an exact translation. Private class properties in Python are denoted by an underscore or double underscore (which mangles the instance variables name). The manipulation of them are more left to convention. If a Python developer sees an underscore, they know that by convention they should avoid manipulating it directly, but nothing really stops them from doing so.

    We could go one step further and learn the differences between the languages. For instance, learning channels in Go for concurrency is pretty unique to the actual language, but the general concept of concurrency and shared nothing is pretty universal.

    Nail down the fundamental knowledge

    I think a lot of learning problems come from jumping into the deep end too early. They rush into coding, say for instance, from a tutorial without truly understanding the fundamentals.

    Do not skimp on the fundamentals. Yes, it can be a bit difficult to understand. Yes, it's not as fun as going straight into coding, but it will shortcut and accelerate your learning. It will, reduce your frustrations. When something doesn't work, you'll start to realize and understand why. Now please don't take it as me saying don't learn by coding. That's not what I'm saying. I'm saying don't jump into coding while winging the fundamentals. Don't jump into learning Rails while ignoring learning Ruby. Don't jump into Vue.js without learning Javascript. Don't jump into Postgres without learning data modeling and indexes. Don't jump into writing an HTTP API without learning HTTP, TCP/IP, Caching, RPC, and REST.

    Understand variable scope before you use them, understand closures and its relationship to variable scope before you use them, understand generators before you write your own, understand promises and its association to asynchronous programming. If you skip these fundamentals in a language that has them, you'll see yourself often confused.

    Resources that will help you learn fast

    These resources will help you learn the basics of a language quickly:

    Awesome Everything

    A few years ago someone started curated links around certain languages and frameworks and posting them as repos on Github. I'm not sure who it was, but I am grateful to that person. If you've ever seen the icon on the left, you've undoubtedly experienced an Awesome List. There's pretty much a curated list for everything: CSS, React, Go, design patterns, scaling, big data, machine learning, and the list goes on. If you want to learn say Python, just go to Google and type in "awesome python". Try it now with whatever you're trying to learn: "awesome [PROGRAMMING LANGUAGE]". Sometimes there will be multi repos with awesome lists on the same topic, but perhaps with separate links. Pick and choose resources from those lists that help you learn fundamentals about that language.

    Find what you don't understand and work backwards

    Having a particular difficulty? First, realize what you don't understand and that scope of it. Work backwards by diving deep into the fundamental concepts around the problem that you're having. For instance, if you are writing an anonymous function in a loop, you're trying to use a variable that's in the same scope in the anonymous function, but you see that it only ever uses the last value, learn what closures are and how they work. You'll learn that the anonymous function is actually a closure (not in all languages) and apart from having access to variables inside of the closure it also captures a reference to the variables outside of the closure. Learn more about closures in Javascript. Read as much as you need to to fully understand the problem you're going through.

    I find that reading as much code that I can, mostly open source repos on Github in the target language I want to learn, uncovers pretty much most things you need to know about the language. Find what you don't understand and work backwards as described above.

    Try first, then ask

    When trying to learn a programming language and anything else such as a framework or a paradigm, it is my opinion that you should try to make an effort to learn on your own first. There are plenty of resources available that you could search on Google that there's no excuse in this age of information, to not at least be able to find information first, read it, and try yourself.

    Now after trying on your own to learn you get stuck and not able to find information online that helps you get unstuck or you need fundamental knowledge that isn't anywhere, then go ahead and ask experienced people questions. This shows that you've done your homework and that you value their time. There are many places to find these experts: Slack communities in your particular region or ones around a particular topic, the trusty IRC channels, Reddit, forums, Gitter, and sometimes even Twitter.

    Keeping all of the above points will help supercharge your learning, not only in your beginning stages of learning an additional language, but throughout your career.

    If you liked this article, please share it with those that you think would benefit from it.

    As I've mentioned, if you have any questions around the learning process of learning a new language please let me know below.

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

    Upcase is now free! - loads of high quality tutorials on Ruby, JS, TDD, Git, Vim etc.

    Posted: 18 Oct 2018 12:35 AM PDT

    A guide to getting started with Git

    Posted: 17 Oct 2018 03:14 PM PDT

    Link here

    I wrote a basic guide to Git which some people in my year found helpful so i thought some of you may find it useful too! I study Business Information Systems so my skillset is all over the place. I'd appreciate any feedback!

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

    How does scoping work in assembly level languages?

    Posted: 17 Oct 2018 08:58 PM PDT

    First time posting here, I've been trying to figure out how scoping works in languages like MIPS and x86, but I'm a bit stumped. From my limited experience with mips, I'd assume scoping in assembly languages is dynamic, but I'm just not sure. Any help/clarification would be appreciated, thanks in advance.

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

    Stress

    Posted: 17 Oct 2018 07:19 PM PDT

    Hello friends. I currently take a course that is teaching C++. I was going through a depressed time during the beginning of my course and i failed to attend many of my classes. I recently emailed my professor notifying him that i will be coming back to class tomorrow. He told me that there is no quick way to learn c++ and that i should just drop the course. I have a midterm next week as well. I don't want to drop the course without at least attempting to learn. Do you guys think i would be capable enough to learn the course materials within the next few days?

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

    What should i learn to become a better engineer?

    Posted: 17 Oct 2018 11:51 AM PDT

    Hi guys,

    So I've been a junior software developer for the last 9 months (first ever job), Ive felt I'm made some decent progress and my understanding of code is a hell of a lot better than it was before I started!

    I like my job a the people are great too, however my major gripe at the moment is a lack of guidance and mentorship. This is not the fault of the tech leader or any of my superiors at all, they are all fantastic, it's a really busy agency and it's all go go go and no one has time for much else other than tickets and meetings to discuss more tickets.

    So as a result I haven't really been given any guidance into how to improve or what even to improve upon, I practice c# And .net mvc in my spare time as well as using SQL databases etc, I just don't know what to do to become a more complete programmer. I'm still a noob in a lot of ways and I am desperate to learn more and more, I just don't know what or how.

    Can anyone offer some guidance into what I should be looking into learning?

    Cheers,

    Andy

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

    Algorithms tutorial series for beginners

    Posted: 17 Oct 2018 01:03 PM PDT

    [IntelliJ/Java] How to hide the "package com.company" at the top of each file?

    Posted: 18 Oct 2018 12:14 AM PDT

    I understand the need for a package; is there a way to hide the line or use a default package of some sort that doesn't need to be declared?

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

    Problem with a rendering engine I'm creating.

    Posted: 18 Oct 2018 12:13 AM PDT

    I' working on a rendering engine for a game using LWJGL and I've encountered a problem:

    I can add entities to the screen fine and I can make them move by setting a dx, dy and dz value other than 0. This value is then added to the original value to chage the position of that entity.

    Whenever I change the dZ value to other than 0 of my entity there is no zoom effect as in this video tutorial I'm using.

    I've asked about it on StackOverflow but they were not able to help me. What am I doing wrong?

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

    When is it (un)acceptable to scrape a website?

    Posted: 17 Oct 2018 04:27 PM PDT

    I've looked online and can't find an answer that strongly addresses my situation.

    I have a small opportunity to build my first web scraper for somebody that will actually use my build. (All my previous projects have been for the sole sake of learning.) In particular, I want to scrape the USDA Farmer's Market website for individual market information that's not offered through their API (mainly, contact information).

    I want to crawl ams.usda.gov/local-food-directories/farmersmarkets to access links starting with the URL pattern: search.ams.usda.gov/. I only just now learned about robots.txt (theirs can be found here). The only URL pattern that resembles what I'm seeking is found under "Paths (clean URLs)" where is says, Disallow: /search/.

    Does the subdomain ("search") fall within the disallow category or, per my interpretation of the "Paths" category, am I in the clear? Also, feel free to offer any heads-up or warnings about scraping more broadly. I don't want to run afoul of anything (especially a government website) but I'm excited to code something that will offer a real purpose.

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

    How to learn Java network programming?

    Posted: 17 Oct 2018 11:58 PM PDT

    I already know a lot of Java and can write Swing programs that use noSQL databases. How can I extend my knowledge to learn network programming? I can use the Javadocs for research but I would like something more friendly and preferably free.

    submitted by /u/0amethyst
    [link] [comments]

    Login in with scrapy

    Posted: 17 Oct 2018 11:24 PM PDT

    Does any of you know why i cannot successfully log in? im not getting the special price for some reason....im just getting the regular price, im doing wrong with the login thing?

    Thank you guys....and i apologies ...much appreciated!

    # -*- coding: utf-8 -*- import scrapy class TabotSpider(scrapy.Spider): name = 'TaBot' login_url = 'https://www.tatechnix.de/tatechnix/gx/?language=en' start_urls = [ 'https://www.tatechnix.de/tatechnix/gx/product_info.php?info=p44235_ta-technix-sport-suspension-kit-opel-astra-h-caravan-2-0t-1-7-1-9cdti--without-level-control-type-a-h-30-30mm.html',] def init_request(self): return scrapy.Request( url=self.login_url, callback=self.login, ) def login(self, response): yield scrapy.FormRequest.from_response( response=response, formid='loginbox', formdata={ 'text': 'example', 'password': 'example', }, callback=self.initialized, ) def parse(self, response): for content in response.css('#gm_attr_calc_price'): yield { 'Price' : content.css('span[itemprop="price"]::Text').extract() } 

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

    Help deciding whether or not to get Master's degree!

    Posted: 17 Oct 2018 11:20 PM PDT

    Hello all,

    I've never posted on this subreddit before, but I am a long time stalker. I'm a Senior Economics major at a top 100 private university in the U.S. and questioning the path of the major I've chosen. I've taken 2 total programming classes so far (Intro Java & Intermediate Java) and am taking Python right now. I find these classes fulfilling and want to sign up for more in the spring for free electives (Databases, Info Systems, and learning Intro C++), but I want to know whether or not I'm going to need to learn much more than I will know upon graduating college. I understand that programming takes a lot of work but I am taking 3 elective classes unrelated to my major that have provided more fulfilling and satisfying work for me than my schoolwork has.

    TLDR: I am an Economic's major who regrets his decision and wants to go back for a Master's in Computer Science. I am in my third computer science class and find the work fulfilling. What do I need to prepare for other than the General GRE?

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

    Please help a newbie out with understanding how loops work

    Posted: 17 Oct 2018 11:12 PM PDT

    First, let me apologize for my ignorance. I have only been coding for a couple of weeks, and I am having a hard time understanding how to make this work. I have tried Googling the problem, however it is clear that the people asking similar questions to me have far more knowledge than I do, and both the questions and answers they recieve are beyond my ability to parse out a good answer.

    I am trying to program the game "Rock, Paper, Scissors" and I have, for the most part made it work. However I cannot figure out how to tell the program to restart at the user input if the user and the computer both tie (i.e. both select rock).

    If anyone could give me a basic overview of what I'm missing that would be awesome.

    Thanks

    Here's what I have so far, the language is Python:

    print('\n \n \nWelcome to Rock, Paper, Scissors. If you win, I will let you live. If you lose I will take your life. Good luck. \n \n') x = input("Choose now: \n \n Rock \n Paper \n Scissors \n \n") print ("You choose " + x) import random a = ["Rock", "Paper", "Scissors"] y = (random.choice(a)) print ("The computer chose " + y) while x == y: input("Tie, Choose again \n") break else: if x == "Rock" and y == "Scissors": print ("you win") if x == "Rock" and y == "Paper": print('You die') if x == "Paper" and y =="Rock": print('You win') if x == "Paper" and y == "Scissors": print("You die") if x == "Scissors" and y == "Rock": print ("You die") if x == "Scissors" and y == "Paper": print("You win") 
    submitted by /u/jaypeejay
    [link] [comments]

    a route for an autonomous flying robot- in python

    Posted: 17 Oct 2018 11:10 PM PDT

    How to program a route define by a given equation, say a helix, for an autonomous flying robot? What is the algorithm written in Python for example?

    or the general protocol/procedure for any code of that kind?

    any resources that may help will be so much appreciated. thank you!

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

    Seek Out Development Meetups

    Posted: 17 Oct 2018 11:10 PM PDT

    If there's one thing I've learned over the years of being a Developer, it's the dividends you gain from attending development focused meetups. After a passionate discussion last night at our local Javascript meetup, I felt I wanted to craft a quick video about some of the benefits of attending such events. I would love to hear about your perspective on these technical focused meetups.

    https://youtu.be/OCcgW1YQPX0

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

    [C++] Question about single and double underscores in identifiers.

    Posted: 17 Oct 2018 10:07 PM PDT

    The C++ standard states:

    17.4.3.1.2 Global names [lib.global.names] Certain sets of names and function signatures are always reserved to the implementation: Each name that contains a double underscore (__) or begins with an underscore followed by an uppercase letter (2.11) is reserved to the implementation for any use. Each name that begins with an underscore is reserved to the implementation for use as a name in the global namespace.165 165) Such names are also reserved in namespace ::std (17.4.3.1). 

    What is meant by "reserved to the implementation"? The implementation of what? Could somebody give a practical example of why underscores would be used in an identifier? Cheers!

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

    Whats the best language to create PNG files (or any image format)? Or what are the best tools for c++, c, java? (homework)

    Posted: 17 Oct 2018 09:53 PM PDT

    So I need to read a text file, read some coordinates, apply the bresenham algorythm and then draw the lines in a PNG file (or any format that could work). Im working with devc on Windows. Im having a lot of trouble adding the necessary libraries to make it all work, from what I have googled. But maybe there is an easier way.

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

    Beginner trying to learn how to make neural networks

    Posted: 17 Oct 2018 03:48 PM PDT

    I'm a high school student with high school level math ability and I really want to get started with learning neural networks for a major project I'm going to make for my software class.

    I'm planning on making a neural networks that learns how to play tetris optimally. It should be able to know how to place a certain peice in the most optimal position with consideration for the current peice held as well as the next peice in line.

    I want to know about any resources out there that teach about neural networks from scratch. Maybe even math that i might need to know, as well as language libraries that I might need (I plan to work in Python).

    TL;DR I want to learn about neural networks but I know nothing so gimme resources.

    Thx so much!

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

    Programming Language for Electrical Engineering Student

    Posted: 17 Oct 2018 09:40 PM PDT

    Idk if this is the right sub for this, but I'm a 2nd year ee student and I'm wondering if there are any specific languages I should start learning. I've been playing around with Python for a couple years, so I'm pretty comfortable with that, but this doesn't seem like it would be useful in electrical engineering. I got an arduino to mess with last summer but I didn't bring it with to school.

    Are there any specific languages that I could start learning that would help me later in my career? I'm going to continue using Python for fun, but I'm curious to know if there's another language that would be more useful for my major.

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

    Abstract Data Types I: The Stack

    Posted: 17 Oct 2018 03:33 PM PDT

    This is a new series I'm starting, gonna cover Stacks, Bags and Queues using linked lists and arrays then cover sorting algorithms before deciding what to do after that. I'm looking for feedback I know I probably need to flesh out a bit more but I'm not that great of a writer just yet still trying to get that part down (without doing the college style "lets bloat this paper just to reach the word count" and actually have substance.)

    I hope I can be of help to someone!

    https://discustd.com/Blog/01-Introduction-To-Stacks-In-Java.html

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

    Just completed CS50:Intro. Is CS50:Web Programming a good continuation?

    Posted: 17 Oct 2018 09:20 PM PDT

    I am a beginner to CompSci. Currently, I am more in the beginner-intermediate level.

    I just completed the CS50 Intro course.

    I am interested in Web Development. What should be my next step?

    Should I go and start a project and Google my way through help files? or should I take another course?

    How is the CS50 Web Programming with Python and JS course? Or can anyone recommend something better at my current stage?

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

    I know what I want to build, but where should I start?

    Posted: 17 Oct 2018 08:37 PM PDT

    I'm looking to build a tool for our Magento website. I want the customer to be able to put in their shipping code and have this tool show them the 3 closest trucking depots in which they can pick their order up at. You can see this in action by going to drpower.com and going through the checkout process, or looking at these screen shots here: https://imgur.com/a/BBa4lQ3

    What am I looking at here and where can I begin? This is a project that I can throw some time at and I something I would LOVE to be able to do.

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

    No comments:

    Post a Comment