Search my blog:

Browse the full archives:

How to Build a LinkedIn Bot with Python and Selenium

LinkedIn is a well-known professional social networking platform that hosts more than 600 million professional profiles.

It supplies an unlimited number of network connections among professionals all around the globe.

This social platform has become an important part of being a full-fledged professional in any industry these days.

However, sending connection requests and accepting pending invitations manually one by one can be hectic and a little annoying sometimes. It would be great to have a bot to do these processes instead of doing it manually.

In this article, we are going to learn how to build a basic bot that can accept our LinkedIn connections, request new connections, and take useful screenshots and save for future usage.

We can easily improve this LinkedIn bot to accept invitations sent by professionals who satisfy specific conditions. As an example, we can use this improved Bot to accept only “Software Developers” among the pending invitations.

We can schedule to run this Bot every day at a specific time, using the Windows task scheduler. If you need to run this in the background, you can simply use the headless chrome browser without any graphical user interface. But since we need to visualize the steps, we will use the normal chrome browser with a graphical user interface.

Read More

How to Write a Merge Sort Algorithm in Java

Java is an object-oriented programming language that allows cross-platform integration. Java is highly versatile and known for its fast performance, security, and high reliability.

It is always rewarding to know how to implement sorting algorithms, and Java is no exception. Java is an object-oriented programming language, so it allows you to write sorting algorithms as classes and implement them easily using sorter objects.

In this tutorial, you will learn how to apply a specific sorting algorithm in Java. Specifically, this article will show you how to write a merge sort algorithm in Java.

Read More

How to Write an Insertion Sort Algorithm in Java

Computer programmers should be familiar with a number of different sorting algorithms.

In this article I’ll explain how you can write an insertion sort algorithm in Java. I’ll spend the first half of the article explaining how the insertion sort algorithm works. You’ll learn how to code an insertion sort algorithm near the end of this tutorial.

Read More

How to Build a Facebook Bot in Python with Flask

Ever noticed automated assistants in Facebook pages of different organizations and companies responding really fast to customer inquiries?

See how exciting it is to get responses from a robot speaker?

In today’s tutorial, we will be doing just that. Once this tutorial ends, you will know how to deploy your own bot to Facebook so that it can automatically respond to all the messages your Facebook page gets.

Let’s be more specific. In this tutorial, we will be developing a basic Facebook bot that can send messages and images to users. However, instead of building everything from scratch, we will be using the Python framework Flask to make many of the network related tasks (like the creation of endpoints) easier.

Read More

How to Write a Bubble Sort Algorithm in Python

Python is a versatile and robust programming language. While it is better known for its prowess in AI and Machine Learning applications, Python can be used for many other programming tasks.

Sorting functions are an important aspect of all programming languages. Python provides its own sorting function based on the Timsort, which is a hybrid stable algorithm derived from Merge Sort and Insertion Sort. However, this may not be sufficient for all programming needs, and it is always an advantage to be knowledgeable about implementing other sorting algorithms.

Despite an abundance of sorting algorithms, there is no one algorithm that suits all sorting needs. Especially with the exponential growth of data science, being knowledgeable about many algorithms helps greatly.

Bubble sort is one of the most straightforward sorting algorithms. The basic idea is that a given list or sequence of data is verified for the order of neighboring elements by comparing them with each other. Elements are swapped if the order does not match the expected result. For example, if the expected result is a sorted list in the ascending order, once the comparison is performed, if the first element is greater than the second, they are swapped.

Read More

How to Build a RESTful API in Python with Flask

When software and applications are being developed, it is sometimes important that the teams are able to share their work and publicize it as a service.

Sometimes, even within the same software, there could be components that require integration with another internal module.

For instance, if our software is a ticketing system, there could be a calculation module that might calculate the final cost including the taxes and vats. This can be easily made possible with the APIs.

The ability to build and maintain an API is important. This article will teach you how to build a RESTful API in Python using the Flask framework.

Read More

A Guide to Python Correlation Statistics with NumPy, SciPy, & Pandas

When dealing with data, it’s important to establish the unknown relationships between various variables.

Other than discovering the relationships between the variables, it is important to quantify the degree to which they depend on each other.

Such statistics can be used in science and technology.

Python provides its users with tools that they can use to calculate these statistics.

In this article, I will help you know how to use SciPy, Numpy, and Pandas libraries in Python to calculate correlation coefficients between variables.

Read More

The Ultimate Guide to Using APIs in Python

Python is one of the most versatile languages that can be used to write programs across many disciplines.

Most of the time, these projects involve acquiring data and information from other websites.

For instance, when websites like Expedia find the best hotel and flight deals for you across hundreds of websites and other platforms, they are relying on application programming interfaces, which are also known as APIs.

APIs are important, and every software developer should know how to work with them. This tutorial will teach you everything you need to know about working with APIs in Python.

Read More

A Complete Guide to Writing Comments in Java

Commenting is an integral part of any programming language for it is a guide that helps in better understanding and functionality of a program. Good programmers tend to comment as they go while writing the code. Many times, when you write the code, you will need to go back and make the changes. Without Java comments, one can be lost. I specifically make sure that comments are made as I moved forward with the code. Not only does it help me keep track of the code as it gets complicated, it also makes the code more understandable for those who have no experience with coding.

Comments in Java are the statements in the Java code that are not executed when the program is run. Think of them as markers that guide the reader. They provide information about the code. Some programmers can also use it to hide certain portion of code for some time. In this article, I will discuss the types of Java comments and what are some best ways to use them.

Read More

Java vs. JavaScript: 10 Major Differences

Java and JavaScript sound similar, and if you are new to the programming world, you might wonder if there is some sort of link between the two. Before I dive deep into the details, let me tell you what web developer Jeremy Keith says about the two – “Java is to JavaScript as ham is to a hamster”.

Originally known as Mocha, JavaScript came into existence in 1995. It was known as LiveScript for a while, but later, upon receiving the license from Sun Microsystems, it came to be known as JavaScript.

The two languages are entirely different otherwise and have evolved quite differently. Both are very well known in the world of web development and programming.

In this article, I will discuss Java vs. JavaScript, their similarities, and differences.

Read More

How To Write C++ Variables

Variables are an important part of any software application.

However, every programming language has different variable characteristics. Some languages have special syntax. There is also the question of typing - some languages are statically typed (which means you must specify a variable’s data type before value assignment) while others are dynamically typed (which means a variable can assume any value, with no specification required).

There is much to understand about a language’s variables before starting to write code. With that in mind, this article will teach you how to write C++ variables properly, which will save you time and grief later on in your programming journey.

Read More

How to Use the Ternary Operator in JavaScript

The if statement is one of the most used conditional statements in all programming languages.

In JavaScript, there is an operator known as a conditional ternary operator that can replace the if statement. It’s shorter and more readable.

Like a traditional if statement, the ternary operator in JavaScript assigns a certain value to a variable depending on a condition. It is the only operator in JavaScript that takes three operands.

This tutorial will teach you everything you need to know about the ternary operator in JavaScript. We’ll cover it’s syntax, implementation, and advanced functionality like nested ternary operators and multiple operations.

Read More

Understanding the Python Global Interpreter Lock (GIL)

Python is an interpreted language.

This means that it is in Python’s nature for the interpreter to compile the code to bytecode. After that, the code is executed via the Python virtual machine.

This is the standard process with the reference implementation of Python, CPython.

With that said, the process is very different if there are multiple threads being executed by the interpreter simultaneously. By default, Python has not made this possible by using a mechanism called Global Interpreter Lock.

This Global Interpreter Lock is a mechanism that exerts constraints on Python code by limiting the number of threads in the state of execution to one. In layman’s terms, this means only one thread can be executed at any given time in Python using the standard interpreter.

If this sounds confusing, don’t worry. This tutorial will teach you everything you need to know about the Python global interpreter lock, including a full definition and a few workarounds.

Read More

The Ultimate Guide to Reading and Writing Files in Python

Python is one of the best languages for many of the elements of computer science including data science, server-side developments, and database handling.

Almost all the time, all these tasks require reading and writing information from and to external files.

Therefore, it should be in every Python developer’s repertoire to properly handle and deal with files.

In this tutorial, we will learn about how to perform various kinds of file handling tasks that might be required for tasks such as, but not limited to, writing a text file, logging data to a server log, and reading big data files.

Read More

How to Write Python Lambda Functions

Python is one of the most versatile languages available.

Many programming languages today are becoming more and more Pythonic due to this flexibility and versatility.

Lambda functions are one of the features that are being cherished by other languages which make programming smarter and much more efficient. Lambda functions are also called anonymous functions or function literals.

They also may or may not be explicitly pointed by a variable or be named.

Before we dive into more details, let’s take a look at what Lambda functions are and how they compare with regular functions in structure.

Read More

How to Build a Discord Bot in Python

Having a bot in a social media site is no different than having a personal assistant to welcome people, check out different topics, make comments or reviews, and perform various other tasks related to maintaining your personal or professional online presence.

In today’s tutorial, we will be covering how to build a bot using Python for the popular social media site, Discord.

Read More

How to Use Python Sleep

Sleep is one of the most useful functions in programming languages - including Python.

As the name suggests, sleep function is used to pause the thread being executed and wait for a predefined amount of time.

There are numerous use cases for the sleep function, such as simulating a delay in the program, specifying waiting times for request related tasks, maintaining intervals between API calls, and even when accessing a common resource by multiple threads in a program.

This tutorial will teach you how to use sleep functions in Python.

Read More

Python Recommendation Engines with Collaborative Filtering

Recommendation systems are one of the most powerful types of machine learning models.

Within recommendation systems, collaborative filtering is used to give better recommendations as more and more user information is collected. Collaborative filtering is used by large companies like Netflix to improve the performance of their recommendation systems.

This shows that recommendation systems that use collaborative filtering are powerful. This tutorial will teach you how to build Python recommendation engines with collaborative filtering.

Read More

The Complete Guide to Linked Lists in Python

Linked lists are one of the more esoteric data structures included in the Python programming language.

However, they are very useful. By storying values and pointers next to each other in nodes, linked lists have characteristics similar to Python dictionaries.

This tutorial will teach you everything you need to know about linked lists in Python. We’ll cover the fundamentals of linked lists, how to visualize this unique data structure, and several examples of how to create linked lists using Python code.

Read More

How to Generate Random Numbers in Python

Random numbers have been an integral part of humans’ lives for ages. Letting a die or a coin decide the fate of a person or a game has been a way of bringing impartiality to the table. It is also the same reason why randomness plays a huge role in computer science. Random numbers are used in computer science for many applications such as games, cryptography, and even computational neural networks that imitate the biological counterpart of humans.

Random numbers can be separated into two categories called true and pseudorandom numbers. While true random numbers generally require a hardware generator to be utilized, pseudorandom numbers are generated in a deterministic way by software and the results can also be reproduced given certain parameters.

In this tutorial, we will be looking at how to generate pseudorandom numbers in Python using both standard libraries and external modules.

Read More

How to Save a NumPy Array to File

The beauty of Python is in its ability to work with a diverse range of datasets in a very optimized manner. If you’re even a beginner in Python, then you must have used the four non-primitive data structure of Python, which are:

  1. Lists
  2. Tuples
  3. Dictionary
  4. Sets

These data structures are very useful when dealing with common problems and can handle all sorts of data types.

However, if you’re working in the domain of Machine Learning (ML) and building ML models then you regularly require the use of a highly optimized data structure like NumPy arrays. ML models present in libraries like scikit and Keras usually expect input and produce output like predictions, in the form of NumPy arrays.

Keeping these things in mind, knowing how to save NumPy arrays to a file is a common requirement for all data scientists.

You can use the NumPy arrays to store predictions outputted from a ML model or create an array to store any other important information that you need to access quickly and efficiently.

When dealing with especially numeric data, using NumPy arrays over other data structures makes sense as NumPy provides a number of inbuilt methods that can help you work on your data.

In this tutorial, you will be learning about how to save the data stored in a NumPy array onto different kinds of files. The tutorial will cover three use cases:

  • Saving NumPy array to a CSV file
  • Saving NumPy array to a NPY file
  • Saving NumPy array to a compressed NPZ file

Let’s start and take a look at how you can save data stored in a NumPy array onto a CSV file.

Read More

Building a Twitter Bot in Python with Tweepy

Twitter is one of the world’s largest social media companies. It’s an excellent way to drive engagement for both organizations and individuals.

Twitter is somewhat unique in that it relies on periodically posting short snippets of text. Twitter accounts tend to post more frequently, with each post being shorter in nature.

Because of this, Twitter posting is a process that is easily automated. This tutorial will teach you how to biuld a Twitter bot in Python with Tweepy, a Python package that makes it easy to interact with the Twitter API.

Read More

Pandas loc vs. iloc for Accessing Data in Python

Python is widely considered the best programming language for data science.

This is largely because of its rich ecosystem. Python has countless open-source libraries that make it quick and easy to integrate common functionality into your applications.

Pandas is one of these libaries. Known for its tabular data structure the Pandas DataFrame - which is similar to a spreadsheet that you can manipulate in Python - Pandas is the de-facto tool for working tabular data.

In this tutorial, we will get ourselves familiar with two of the widely used functions to select and filter data from Pandas dataframes: loc and iloc.

Read More

How to Compare Objects in Python

In Python, the identity operators ( is and is not) and the equality operators ( == and != ) have a small difference between them. You would have experienced unexpected behavior while using the is or is not operators to compare values. In Python, the is and is not operators are used to check if two objects share the same memory location and the == and != operators are used to compare their values. .

In this tutorial, we will discuss the differences between equality operators and identity operators and when to use them. We will also see what leads to an unexpected behavior when we use the is or is not objects.

Read More

The History of Python Package Managers

Package managers are an integral part of the Python ecosystem.

Without package managers, it would be much harder for developers to use open-source libraries like NumPy or Pandas.

It’s useful to have some context of the orgiin and history of Python package managers. This article will provide a broad summary of the history of Python package managers and the landscape today.

Read More

SyntaxError in Python: How to Handle Invalid Syntax in Python

Syntax errors are the single most common error encountered in programming.

Regardless of the language used, programming experience, or the amount of coffee consumed, all programmers have encountered syntax errors many times.

Syntax problems manifest themselves in Python through the SyntaxError exception. In this tutorial, I will teach you how to handle SyntaxError in Python, including numerous strategies for handling invalid syntax in Python.

Read More

The Ultimate Guide to Polynomial Regression in Python

The Hello World of machine learning and computational neural networks usually start with a technique called regression that comes in statistics. Whether you are a seasoned developer or even a mathematician, having been reminded of the overall concept of regression before we move on to polynomial regression would be the ideal approach to take.

Read More

How to Use Python Command Line Arguments

Python command line arguments allow you to change the behavior of a Python script when running it from a command line.

There are many different types of Python command line arguments. Fortunately, they all follow similar syntax.

This tutorial will teach you how to use command line arguments in Python. We’ll cover flags, arguments, subarguments, and argparse - a common parser used with command line arguments.

Read More

How to Run Monte Carlo Simulations in Python

Monte Carlo method is a technique that is widely used to find numerical solutions to problems using the repetition of random sampling. Its applications can be found in a broad range of fields including quantum mechanics, financial analysis, and trend prediction. How Monte Carlo works is that it produces many possible outcomes with respective probabilities for each outcome, including extreme possibilities.

In this tutorial, we will get familiar with the Monte Carlo technique through a simple numerical application; finding the value of Pi (π).

Read More

How to Calculate Vector Norm in Python

In linear algebra, vector norms are a common metric used to describe a vector’s length.

Vector norm calculations are stragithforward for low-dimensional vectors. However, for very large vectors, more computational power is required.

Python makes it easy to calculate vector norms to solve linear algebra problems. In this tutorial, you will learn how to calculate a vector norm in Python.

Read More

Python Data Type Conversion Tutorial

In this tutorial, you will be learning about the various different data types in Python and how you can perform implicit and explicit type conversion. Each concept will be explained with the help of relevant code examples.

Every variable you create in Python or any other programming language has a data type, which depends on the kind of data you are storing in that variable.

Read More

How to Define Main Functions in Python

Python is a very interesting programming language to learn. In programming languages, when an operating system runs a program, a special function called main() is executed automatically. Python also has a main(). In Python, the focal point of the execution of any program is the main(), and it acts as the entry point of the code. It is important to define the main function in Python to start the execution of the program. The program does not get executed as a module; it has to be run directly.

In this tutorial, we will understand what a main function in Python is and how it works. We will also see how the variable __name__ works in Python.

Read More

How to Use the Walrus Operator in Python

In this article, I will talk about the walrus operator in Python.

The biggest change in Python is the introduction of assignment expressions, also known as walrus operator.

Assignment expression can be defined as a Python expression that allows you to assign and return a value in the same expression.

Read More

Statistical Power Analysis in Python

While performing an experiment, you would like to ensure that the power of your experiment is at least 80%. To achieve this, you need to determine the sample size for your experiment that will yield 80% of power.

Before proceeding to discuss the benefits of power, let’s talk about what power means here and what power analysis is. In terms of statistics, power is the ability to detect the presence of true effect in any experiment.

Power allows you to comment on the confidence that one might have in the conclusions drawn from the results of an experiment or a study. Power can also be used as a tool to determine the sample size that will be required to detect a true effect in an experiment.

In companies like Netflix and Amazon, tools and techniques like power analysis are used on a regular basis to test out new features, and implement those that bode well with the largest proportions of the userbase. The role of the data scientists in these companies is to use tools like power analysis to study the features and experiments, to ensure that the results are reliable and can be used in the decision making process.

In this tutorial, you’ll learn about the significance of statistical power and its usage in daily life. By the end of it, you’ll be able to carry out power analysis to determine the sample size of any experiment to determine true effect.

Read More

How to Install Anaconda on Windows

It is advisable to use virtual environments while working with Python. A virtual environment is a way to isolate projects into different environments to reduce clashes between dependencies, improve project structure and remove extra packages.

This not only reduces the size of your Python projects but also improves the readability, maintainability and overall durability by ensuring that only the required packages are maintained.

You can manage your packages and create new environments programmatically after installing Python on your system. With that said, many people prefer to simply install Anaconda for Python.

Read More

A Guide to Python Threading

In Python, threading allows you to run different parts of your program concurrently.

Threading can help you simplify the design of your program.

The greatest advantage of threading is that it helps programmers execute their programs faster.

So, if you are an experienced Python programmer and you’re looking for a faster way to execute your programs, you’ve come to the right place.

That is what I will be showing you in this article.

Read More

What is Exploratory Data Analysis?

Exploratory data analysis (EDA) is a critical component of any data scientist’s tool box. EDA involves learning about a data set to make sure you’re using the right predictive tools to analyze it.

Despite their importance, exploratory data analysis principles are seldom taught. They are learned through the course of building many real data science projects.

This tutorial will teach you the basics of exploratory data analysis in Python.

Read More

How to Send Emails With Python

Python is a highly versatile programming language.

It has a diverse ecosystem of open-source libraries that make it easy to build common functionality in a project. Sending emails with Python is one example of such functionality.

Sending emails is extremely useful - it allows you to send bulk emails, send confirmation or verification codes to users, or even automate regular emailing tasks.

This tutorial will teach you how to send emails with Python using SMTP (Simple Mail Transfer Protocol).

Read More

How to Clean Text in Python for Machine Learning Models

Textual data plays a huge role in machine learning. They are also one of the key types of data in addition to numerical data values.

Text is used for various applications in machine learning such as language translation, sentiment analysis, content detection, and even developing chatbots. All these require massive amounts of textual data in order to produce successful results.

As much as textual data is rich in useful content, most of them are highly disorganized, unstructured, and often contain noise. This is why we are required to clean texts before utilizing them to train our machine learning models.

This tutorial will teach you how to clean texth in Python for use in machine learning models.

Read More

How to Write C++ Comments

Writing good comments is one of the most important skill for software developers.

Great commenting requires you to strike a delicate balance. On the one hand, your comments should allow your code to be interpretable by outside users. On the other hand, too many comments can add bloat to your code and ultimately make it harder to understand.

In this tutorial, you’ll learn how you write comments in C++. You’ll learn both the technical aspects of including comments in your code as well as professional guidelines on what types of comments you should include (and avoid).

Read More

A Complete Guide to Python Exceptions

A Python program will terminate as soon as it encounters an error.

These errors can be syntax errors or they can be exceptions. An exception is an event that interrupts the normal flow of your Python program.

This article will teach you how to handle Python exceptions using try and except statements.

Read More

Python vs. JavaScript: The 11 Major Differences

Stack Overflow (a question-answering platform for software professionals and developers) surveys more than 100,000 software developers annually to identify programming trends, job opportunities, and challenges.

In a survey in 2018, they found out that Python was the most popular programming language among the developer community. 25.1% developers wanted to learn it and increase their programming skills. JavaScript ranked second after Python with a 19% popularity rate.

In this article, I explore 11 major differences between the Python and JavaScript programming languages.

Read More

How to Run Python Scripts

Python is one of the most popular programming languages in the world. It is extremely powerful, has easy syntax and plenty of useful libraries that you can use to build projects.

If you’re starting to learn Python, then knowing how to run your Python scripts is an important skill to learn. If you don’t know how to run your scripts, you can’t verify whether they actually work. It is the only way to really test your programs.

In this step-by-step guide, you’ll learn everything you need to know about the basics of running Python scripts. We’ll cover how the techniques used for running scripts differs based on your environment, your operating system, and even your skills as a developer.

Read More

Python 3 Installation & Setup Tutorial

Python is one of the easiest to learn and the most versatile programming languages available.

It is highly popular among data science enthusiasts and researchers.

This tutorial will teach you how to install Python 3 on your computer, including guidance for several different operating systems.

Read More

How to Write Anonymous Functions in JavaScript

There are a number of different ways to write functions in JavaScript.

One of the types of JavaScript functions is called anonymous functions.

As its name suggests, an anonymous function is a function that is declared without a name. Said differently, an anonymous function does not have an identifier. Anonymous functions are usually arguments passed to higher-order functions.

In this tutorial, I will teach you how to write an anonymous function in JavaScript. You will also learn the many uses of anonymous functions and the advantages and disadvantages of using this function type in JavaScript.

Read More

How to Use Python Pointers

Have you ever worked in programming languages like C++ or C?

If yes, you would have definitely come across the term pointers.

Every variable has a corresponding memory location and every memory location has a corresponding address defined for it. Pointers store the address of other variables.

Surprisingly, pointers don't really exist in Python. If that is the case, what am I writing about here?

Everything is an object in Python. In this article, we will look at the object model of Python and see how we can fake pointers in Python.

Read More

Python Pass - Doing Nothing, and Why That's Useful

The Python pass keyword allows you to skip over a block of Python code.

Said differently, it allows you to create a block (whether in a function, loop, or something else) and have that block run with no functionality.

This tutorial will teach you how to use the Python pass statement. Specifically, we will discuss how the Python pass statement is useful during the development stage and how it differs from different flow control keywords in Python.

Read More

Python Speech Recognition - a Step-by-Step Guide

Have you used Shazam, the app that identifies music that is playing around you?

If yes, how often have you wondered about the technology that shapes this application?

How about products like Google Home or Amazon Alexa or your digital assistant Siri?

Many modern IoT products use speech recognition. This both adds creative functionality to the product and improves its accessibility features.

Python supports speech recognition and is compatible with many open-source speech recognition packages.

In this tutorial, I will teach you how to write Python speech recognition applications use an existing speech recognition package available on PyPI. We will also build a simple Guess the Word game using Python speech recognition.

Read More

How to Use JavaScript onclick Events

When writing code in JavaScript, you will often want to execute code when the user interacts with the webpage.

For example, you want to do something when a user clicks a button. You might also want something to happen when a user clicks an image.

How can such functionality be implemented in JavaScript?

You can use the onclick() event, which is a very popular event in JavaScript. It allows you to execute code when a user clicks an element on a webpage (such as a button).

In this article, I will teach you how to use JavaScript onclick events to make your webpages more interactive.

Read More

How to Write a Bubble Sort Algorithm in JavaScript

The bubble sort algorithm is a simple comparison-based sorting algorithm.

In this algorithm, each element in an array is compared to the adjacent element in the array and then swapped, if required, until all the elements of the array are properly sorted.

In this article, you will learn the basics of bubble sort algorithm and how to write a bubble sort algorithm in JavaScript. I will also discuss the time complexity of the bubble sort algorithm.

Read More

How to Create a Beautiful Soup Web Scraper in Python

The internet is brimming with data about any topic you can imagine.

Much of this data exists on websites on public domains that you can access through a web browser. To harness this data, you’ll need to learn the valuable skill of Python web scraping.

This tutorial will teach you about the basics of web scraping by using a practical example. More specifically, we’ll scrape job postings from the PythonJobs website using Python’s BeautifulSoup library.

Read More

Creating a Python GUI using Tkinter

Tkinter is the native Python GUI framework that comes bundled with the standard Python distribution.

There are numerous other Python GUI frameworks. However, Tkinter is the only one that comes bundled by default.

Tkinter has some advantages over other Python GUI frameworks. It is stable and offers cross-platform support. This enables developers to quickly develop python applications using Tkinter that will work on Windows, macOS, and Linux.

Another benefit is that the visual elements created by Tkinter are rendered using the operating system’s native elements. This ensures that the application is rendered as though it belongs to the platform where it is running.

Tkinter is not without its flaws. Python GUIs built using Tkinter appear outdated in comparison to other more modern GUIs. If you’re looking to build attractive applications with a modern look, then Tkinter may not be the best option for you.

On the other hand, Tkinter is lightweight and simple to use. It requires no installation and is less of a headache to run as compared to other GUI frameworks. These properties make Tkinter a solid option for when a robust, cross-platform supporting application is required without worrying about modern aesthetics.

Because of its low aesthetic appeal and easy of use, Tkinter is often used as a learning tool. In this tutorial, you will learn how to build a Python GUI using the Tkinter library.

Read More

Object-Oriented Programming (OOP) in Python

Python inherently an object-oriented programming language, which makes it easy to work with classes and objects in Python.

Object-oriented programming is an example of a programming paradigms, which are a way to distinguish between different programming languages. Languages can belong to multiple paradigms.

In this tutorial, you will learn about object-oriented programming (OOP) in Python. We’ll discuss the broad characteristics of object-oriented programming as well as several examples of how you can implement this paradigm in practice.

Read More

The Python `turtle` Library - A Step-by-Step Tutorial

The Python programming language, like most languages, is purely text-based. This can make it quite boring for young learners.

Visual tools can be important educational resources. More specifically, the turtle library is a great tool to help elementary and middle school students to master the language.

The turtle library comes with a collection of commands that you can use to create artwork and games.

If you’re an elementary or a middle school student with the desire to learn Python (or an educator who is serving that audience), you’ve come to the right place.

This tutorial will help you start your Python programming journey by creating shapes and images using the Python turtle library.

Read More

The 10 Best JavaScript Libraries and Frameworks for 2020 (and Beyond!)

There has never been a better time to be a JavaScript developer.

Not only is there a multitude of frameworks, libraries, and tools available to developers, it's evident that the popularity of web applications is going to grow for a long time.

Add to this the fact that many JavaScript frameworks allow you to build native apps, and it is easy to see why it has become the go-to language for so many developers.

We truly are spoiled for choice with the number of sophisticated frameworks out there, which can make it somewhat difficult to choose one for your project.

In this article, I'll cover the 10 most important JavaScript libraries (with the best listed at the end) to help you make a more informed decision.

Read More

How to Write Java Variables

Java is a robust language and is used to build many programs.

Variables are the building blocks of any language. Variables in Java have a huge role to play in making it a widely accepted language.

What is a variable? A variable can be defined as a name given to a certain memory location, which is a basic unit in a program. All languages use variables to store data and the value of a variable can be changed during the execution of a program. Any operation done on the variable will affect the memory location.

It’s critical that you understand how variables work if you’re learning to become a Java programmer. In this tutorial, you will learn how to write Java variables.

Read More

The 10 Best Java Frameworks for 2020 (and Beyond)

Java is one of the most robust programming languages that has ever existed.

Combined with frameworks, Java can provide excellent solutions for domains like IT, cloud computing, banking, or even e-commerce.

In this article, I will discuss Java frameworks and why it is beneficial to use them. Also, I will briefly discuss the 10 best Java frameworks for building applications in 2020 (and beyond).

Read More

How To Write Java Comments The Right Way

Commenting is an integral part of any programming language. Tt is a guide that helps in better understanding the functionality of a program. Good programmers tend to comment as they go while writing the code.

Most of the time, when you write code, you will need to go back and make changes later. Without Java comments, it’s easy to get lost.

This is why I specifically make sure to make comments as I write code. Not only does it help me keep track of the code as it grows more complicated, but it also makes the code more understandable for anyone that needs to reference the code at a later date.

Comments in Java are the statements in the Java code that are not executed when the program is run. Think of them as markers that guide the reader.

Said differently, comments provide information about the code without changing the code’s functionality. Some programmers can also use it to disable certain portions of code during development.

In this tutorial, I will how to write Java comments and what are some of the best ways to use them.

Read More

Python vs. C++: A Comprehensive Comparison

The debate between Python and C++ has been hot in the programming world for as long as anyone can remember.

Both languages have valuable use cases. When it comes to choosing between them, one must be aware of the syntax, usage and overall programming approach of each language.

There are many factors that will weigh on the Python vs. C++ debate. In this article, I will discuss both languages and highlight the key differences between Python and C++ that should make it easy for you to pick the right language for your project.

Read More

How To Write Java Loops

Loops are an important part of any computer application.

Similarly, learning the syntax for writing loops is a crucial step in learning a new programming language. Java is no exception.

In this tutorial, you’ll learn about the different types of loops in Java and how to write loops in the Java programming language.

Read More

How To Handle KeyError Exceptions in Python

KeyError exceptions are a common error encountered by junior Python developers.

Unfortunately, it’s not always clear how to handle these exceptions.

You’ll be glad to hear that handling KeyError messages is likely easier than you think. In this article, I will teach you how to handle KeyError exceptions in Python.

Read More

np.append() - How To Use NumPy Append in Python

The NumPy programming library is considered to be a best-of-breed solution for numerical computing in Python.

NumPy stands out for its array data structure. NumPy arrays are excellent for handling ordered data. Moreover, they allow you to easily perform operations on every element of th array - which would require a loop if you were using a normal Python list.

One of the core capabilities available to NumPy arrays is the append method. In this tutorial, I will explain how to use the NumPy append method to add data to a NumPy array.

Read More

np.reshape - How to Manipulate Arrays Using NumPy's Reshape Function

NumPy is the most popular Python library for numerical and scientific computing.

NumPy’s most important capability is the ability to use NumPy arrays, which is its built-in data structure for dealing with ordered data sets.

The np.reshape function is an import function that allows you to give a NumPy array a new shape without changing the data it contains. In this tutorial, I will teach you how to use the NumPy reshape function to manipulate arrays in NumPy.

Read More

How To Use the Python Square Root Function

There are many situations in which you will want to find the square root of a function in a Python application.

Fortunately, Python includes some very powerful functionality for calculating square roots.

In this article, I will teach you how to use the Python square root function. I will also show you how to calculate square roots without this function, and how to calculate the square root of every element in an outside data structure.

Read More

np.arange() - How To Use the NumPy arange() Method

NumPy is a Python library widely considered to be the most important library for numerical computing.

Within NumPy, the most important data structure is an array type called np.array().

NumPy contains a number of methods that are useful for creating boilerplate arrays that are useful in particular circumstances. One of these methods is np.arange().

In this article, I will teach you everything you need to know about the np.arange() method. By the end of this article, you will know np.arange()’s characteristics, uses, and properties, and will feel comfortable integrating this method into your Python applications.

Read More

How To Write C++ Variables

Variables are an important part of any software application.

However, every programming language has different variable characteristics. Some languages have special syntax.

There is also the question of typing - some languages are statically typed (which means you must specify a variable’s data type before value assignment) while others are dynamically typed (which means a variable can assume any value, with no specification required).

There is much to understand about a language’s variables before starting to write code. With that in mind, this article will teach you how to write C++ variables properly, which will save you time and grief later on in your programming journey.

Read More

The Best PHP Frameworks For 2020 (and Beyond)

PHP has come a long way in the last 25 years. What used to be a relatively under-powered scripting language has now become a powerful tool to build complex applications.

It’s no wonder, then, that PHP is one of the most popular choices for web applications around the world and that a whole slew of PHP frameworks have emerged over the past decade and a half.

In this article, I’ll go over the 10 best PHP frameworks for 2020 and some of their defining features. Use this as a guide to selecting the right framework for your project.

Read More

How To Write Python Classes: Code, Examples, & More

Python is an object-oriented programming (OOP) language.

OOP is methodology used by programmers that enables a system or program to be defined as a set of objects, which can be manipulated and controlled in a piece-by-piece manner.

It is important for you to understand why object oriented languages are necessary in programming. When creating complex code, object-oriented programming allows you to re-use code, making it easy to maintain and scale. It also puts emphasis on objects, unlike procedure oriented programming languages that stress the importance of functions.

In this article, I am going to teach you how to write Python classes - which are special constructs that programmers use to organize related items in an application.

Read More

How To Write Python Comments: The 2020 Guide

For programmers, it is important that your code is easily understood by outside users.

While professionals might not find it difficult to understand, for someone who is trying to learn Python, including comments in the code can be very helpful.

I have seen many bad practices within Python comments over the years.

In this article, I will explain the best way to write Python comments for developers in 2020 (and beyond!).

Read More

How To Write React JSX Comments

Writing detailed comments is an important component of writing software.

However, every language and framework has its own syntax for writing comments. This can make it difficult for developers to know how to write comments when they’re learning a new language or library.

The JavaScript library React has some notoriously bizarre syntax for writing comments. In this article, I’m going to explain how to write comments in React JSX.

This article starts by explaining what React and JSX are; if you’re already familiar with React ecosystem and only want to learn about how to write React JSX comments, click here to skip to the relevant section of this article.

Read More

The Essays of Warren Buffett: Quotes From the Best Investor of All Time

Warren Buffett is unquestionably one of the best investors to have ever lived.

Moreover, he has been very willing to share his writing with the world through his annual shareholder letters.

I have personally learned a great deal from reading Buffett’s writing over time. In this article, I will share a collection of Warren Buffett’s most insightful writings about the art and science of business and investing.

Read More

How to Profile Python Code: Accurately Measure the Performance of your Software

As software engineers, we are paid to create high-quality code that performs.

Performance can be measured in a number of ways: the problems it solves, its uptime, or a slew of quantitative metrics.

Speed is unquestionably an important component of software performance. In this article, I’ll show you how to measure the speed of Python code using a process called “profiling”, step-by-step.

Read More

Coronavirus Tests, Cases, and Deaths by US State

The coronavirus pandemic continues to worsen, both in terms of the actual health impact of patients and the broader effect it has had on our economy and psychology. The purpose of this post is to list some real statistics on the coronavirus - withoutthe sensationalism that we have seen from some major news outlets.

Read More