Image for post
Image for post
Photo by Ashkan Forouzani on Unsplash

Regular expressions are used in almost any programming language to match, search, or extract complex or intricate text patterns. A regular expression is a statement in a regular language, a language with a grammar specialized for matching patterns of characters in strings. They come into play in a wide variety of applications. One example is password and naming validation. It’s very likely whatever website you create a new user account on validated your password or username with a regular expression.

One other regular expression operation that’s not talked about as much is replacement. Similarly to matching and searching, replace looks for a pattern to match. However, it then creates a new string that has the matched pattern replaced with a replacement string. The replacement string can be a literal replacement, such as matching [0-9]+ and replacing it with "abc" . Such an operation would convert all digit sequences in a string with the character sequence "abc" . …


Better threading in your C++ program

Cables plugged into an interface
Cables plugged into an interface
Photo by John Barkiple on Unsplash.

C++ is a great programming language that’s generally associated with fast performance, custom memory management, and pointers. However, some of the most important and less-talked-about components of the language are threads and mutexes. Perhaps one of the most powerful features of C++ is possessing a wide range of control and precision over the execution of multiple concurrent threads and sharing resources safely between those threads. The web browser you are viewing this on right now uses multiple threads to facilitate multiple actions or displays simultaneously.

In this article, I will go over four tips for using threads and mutexes in C++. The interfaces discussed here are those defined in the C++11 standard of the language. Prior to C++11, threads were not formally defined in the language and only OS-specific thread interfaces such as posix threads could be used. …


Image for post
Image for post
Photo by Yancy Min on Unsplash

If you have ever worked or written a C or C++ project, you have probably heard of the build system called CMake. For programmers that are new to C or C++, the concept of a separate build system usage a separate language may seem odd. However, knowledge of how to properly to properly compile, build and package a project is absolutely essential knowledge for a C++ programmer. In this guide, the roles CMake plays as a build system will be explained, and the most essential aspects and features of CMake will be discussed. …


Image for post
Image for post
Photo by Andrew Neel on Unsplash

GitHub holds perhaps the largest collection of open source software on the planet. It’s an ecosystem of collaboration, learning, and integration for developers and organizations alike. You can write software, contribute to other software, or use free and open software in other projects and products. It’s an incredible tool that powers the world of programming, and promotes access and collaboration to produce open source software for everyone.

Using GitHub as a developer, to either further your career or increase your influence in a genre of open source is a bit different. Getting well known on GitHub isn’t straight forward, and requires a intricate understanding of what drives the use of open source packages, and what sets the most popular packages apart from the rest. I will discuss the best and worst ways to use GitHub as a developer, and how you might just create the next trending library or package on the site. …


Image for post
Image for post
Photo by Lee Aik Soon on Unsplash

We move and copy data all the time. From one object to the next, or when files are written, or when a client sends data to a server. Copying is everywhere, and there’s no avoiding it completely. Copying is also expensive, in terms of time, and eventually, money. What if we want to make this common operation an efficient? What can be done to make it faster?

With Advanced Vector Extensions (AVX), a specialized parallelized instruction set in the x86 architecture, copying gets a lot faster. I mean a LOT faster. 2000% faster. How is that even possible? Copying data at the level of the processor means copying one data value at a time. That might be a byte of data, an integer, or a floating point number. With AVX, you can copy multiple data values simultaneously. …


Image for post
Image for post
Photo by Marc-Olivier Jodoin on Unsplash

SIMD. Single instruction multi data. You may not have heard of these four words before, but they have the power to make software run at lightning speed. They can accelerate actions like copying or searching data 10x, 20x or more times faster than with traditionally written code. The CPUs that power our computers today possess a special set of instructions that can process data simultaneously, and in parallel. In fact, the sets of these instructions have been around for a number of years. …


Image for post
Image for post
Photo by Bekir Dönmez on Unsplash

Stack Overflow is an incredible collection of programming and software knowledge. Thousands of students and developers use it daily to lookup answers for questions they can’t solve easily themselves. Stack Overflow taught me so much over the years, I have used it since I began to learn to program. It’s built and grown by a community of developers, with new questions and answers being added all the time.

However, contributing to Stack Overflow, asking questions and answering them, is vastly different from just searching and reading information on the site. Stack Overflow has a very steep learning curve, for a long time, it wasn’t really welcoming toward beginners. If you are interested in using it to grow and further your skills or reputation as a developer, this article is for you. On a site like Stack Overflow, there is no right or wrong, all content will eventually be moderated by the community. …


Image for post
Image for post
Photo by Michael Dziedzic on Unsplash

Python is one of the most popular programming languages. It’s learned and used by students, teachers, and professionals around the world. Python provides a simple, straight forward, interpreted language that fosters creativity and freedom. Programmers have access to a community of hundreds of thousands of developers that provides an immense selection of open source packages for Python. The language manages garbage collection. memory allocation, pathnames, file descriptors, and much more that a programmer would normally need to worry about in a lower level language. Yet, that’s both an advantage and disadvantage.

Python sometimes takes care of too many things. It blurs the fine details of whats really happening under the hood. If you feel that way, this post is for you. We will go over the basics and fundamentals of making a C-extension to the Python interpreter. …


Image for post
Image for post
Photo by Alice Dietrich on Unsplash

When people thinking of coding, programming or engineering, they think of it has a “hard” science. One that values mathematical abilities over creativity and design. Programming certainly does involve math, but the idea it involves no visual or creative thinking couldn’t be further from the truth. In fact, a major component of software engineering is visualization, the process of constructing images from the data or output of a program. Such an ability is vital to administrators or data scientists that oversee large data systems. It’s also an extraordinary tool to help learn programming or debug software.

Visualization can be accomplished through a number of different means. Despite the widespread use of photography formats such as JPEG or PNG, creating such file formats though a language like Python is difficult. Creating a PNG, for example, requires pixel oriented arrays of RGB data, that are compressed using a compression library like zlib. Constructing an image through pixels is certainly possible, but tricky, since drawing something like a circle or a line requires calculating geometric equations for the respective shapes. …


Image for post
Image for post
Photo by Nick Morrison on Unsplash

React, Angular, Django, or Ruby on rails. Frameworks for application or web development are everywhere. You can find hundreds if not thousands of guides on how to make web apps or web pages with these frameworks or many other popular ones. An incredible abundance of frameworks also exist for mobile development or building an API. Frameworks provide reliable tools that can let you develop applications in a lot less time. They take out a lot of the complexity. In terms of education, they are not a replacement for learning how to code from scratch. Not in the least bit.

The role of a software engineer or developer, carries many responsibilities. Software itself cannot be manufactured, it must be created. A developer needs to understand application architecture, customer use cases, quality assurance, and performance. Learning a framework only gives you insight into the first one. This doesn’t mean people who study and learn just frameworks can’t or don’t understand the ladder three. This just means that frameworks abstract or hide critical business criteria for software development. …

About

JOSHUA WEINSTEIN

Programmer, Artist, Published Author. I’m an engineer on a mission to write the fastest software in the world.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store