24 min read

    Coding Exercise: Build Tetris in Python using Pygame

    By Sanoj Mathew on Aug 17, 2020 5:12:00 AM

    Apply for Byte Academy's Coding Bootcamp with ISA options

    pygame is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL (Simple DirectMedia Layer) library. Simple DirectMedia Layer is a cross-platform development library designed to provide low-level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. Like SDL, pygame is highly portable and runs on nearly every platform and operating system. Millions of people have downloaded pygame itself, which is a whole lot of bits flying across the interwebs.

    Topics: coding exercises Python Programming Tips
    4 min read

    A Beginner's Guide to Python Web Frameworks

    By lakshmi b on Aug 17, 2020 4:53:31 AM

    A web framework is a collection of packages or modules which allow developers to write web applications or services quickly, without getting into the details of network protocols or network socket programming. Web frameworks encapsulate what developers have learned over the past 20 years while programming sites and applications for the web. Frameworks make it easier to reuse code for common HTTP operations and structure the projects so that other developers can quickly build the projects with the knowledge of the same framework.

    Topics: Python frameworks Programming Tips
    4 min read

    Python vs R. Which language should you choose?

    By Byte on Aug 17, 2020 4:15:22 AM

    Data science is an interdisciplinary field where scientific techniques from statistics, mathematics, and computer science are used to analyze data and solve problems more accurately and effectively. It is no wonder, then, that languages such as R and Python, with their extensive packages and libraries that support statistical methods and machine learning algorithms are cornerstones of the data science revolution. Often times, beginners find it hard to decide which language to learn first. This guide will help you make that decision.

    Topics: R Python Data Science Programming Tips
    3 min read

    Validating Form Input With Django

    By Jeff Maxim on Aug 12, 2020 9:26:56 AM

    Let’s say I’m making a blogging web application using Python and the web framework, Django. I want users to be able to publish “Posts” on my blogging website.

    When they enter that “Post” into some sort of input form that I have on my website, I want to check the “Post” before I save it to my database.

    This is a common scenario for many Django developers. How do we validate form data before we save it to a database?

    There’s two common ways to do it: Either validate the Model or validate the Form.

    Django has Forms and Models. Very basically, Forms are where users input data on a web application, and Models and where I actually save my information in my program.

    Let’s look first at how to validate the Model:

    Topics: jeff maxim Python Programming Tips django
    7 min read

    Primer: Python First Class Functions and Decorators

    By lakshmi b on Aug 12, 2020 9:26:02 AM

    Python functions are a lot more flexible than you would think. They are much more than just code generation specifications for a compiler. They are full-blown objects stored in pieces of memory as such that they can be freely passed around a program and called indirectly. They also support operations that have little to do with calls at all like Attribute storage and Annotation.

    Topics: Python software development functions Programming Tips
    1 min read

    No Computer Science Degree But Want To Enter the Tech Industry?

    By Byte on Aug 12, 2020 9:12:30 AM

    A common question people have with regards to breaking into the tech sphere is if a Computer Science degree is necessary to do so. Data Scientist, Lesley Cordero, delves into this question while simultaneously making an important distinction between the desire to manage a tech company and the desire to program for such a company.

    Topics: Careers computer science Python tech industry
    1 min read

    Top Five Reasons To Learn Python

    By Emily on Aug 12, 2020 9:11:04 AM

    We chose Python as the core language of our curriculum (and hope that you choose to learn it).  In addition to it being the highest paid coding language for recent coding bootcamp grads according to Course Report,  Python has many other unique, strong qualities.  Oh, and did we mention that the language is actually named after the movie Monty Python, a favorite of the Dutch founder? For more check out our Python program

    Topics: Python Programming Tips
    5 min read

    How To Choose The Right Tech Stack For You

    By Emily on Aug 12, 2020 8:58:33 AM

    Written by Byte Academy student, Jason Pruski

    Topics: Student Stories fullstack students Python programming Programming Tips tech stack
    1 min read

    Top Five Reasons To Fall In Love With Programming

    By Emily on Aug 6, 2020 6:59:25 AM

    This Valentine's Day we want to express our love for programming - we've narrowed it to our top five.  We are particularly passionate for Python, the coding language which our full-stack curriculum emphasizes.  It's also used heavily in the data sciences, one of our courses we feel tingly about.  Maybe once you learn some more about programming, you'll fall in love too.

    Topics: love Python valentines day Light Reads Data Science
    6 min read

    Intro to SQLite3 With Python's Flask

    By Jeff Maxim on Aug 6, 2020 6:55:42 AM

    Our new instructor Jeff is also an author, here are some tips from his blog, a great coding resource:

    I’ve got a URL shortening website like Bitly that allows you to submit a link, then gives you a new, hopefully shorter url to use for that link. I built it with Python and the Flask microframework.

    Right now, a user enters a URL at my flask app, such as “www.jeffreymaxim.com”. My python code will generate a random key for that site, such as “98rDv64O”. It will store both the original URL and the key in a python dictionary like so:

    <span class="s1">my_links["www.jeffreymaxim.com"] = "98rDv64O"</span>

    So that I’ve got an entry in the my_links dictionary that looks like this:

    <span class="s1">{'www.jeffreymaxim.com': '98rDv64O'}</span>

    This code allows me to redirect a user from herokuapp to jeffmaxim.com .

    The problem here is that this dictionary only lives in the local memory of my machine while my app is running. As soon as I restart my server, that whole dictionary and all my links and keys gets deleted.

    The solution is to implement a database.

    Topics: SQL jeff maxim Python Programming Tips

    Featured