In functional programming, type safety ensures that values (often called “objects” in other programming paradigms) conform to the constraints defined by their type. This means that functions, data structures, and types can only hold and operate on values that are valid according to the rules of their type. By using constructs like algebraic data types, functional programming prevents the creation of invalid states. A number can only be a number, it can’t be a string for example. So, if I have a function that accepts the Number type, then I know that it will be a number.
This is an exerpt from my book, Beginning CI/CD. This is a pre-pre-pre manuscript, so it’s pretty messy.
Below is an ultra-rough draft from a sub-section of my upcoming book, Beginning CI/CD. I’ve only started the chapter, so it’s pretty messy–still, though, I would appreciate feedback!
There’s a few common -Ops terms, such as DevOps, GitOps, and ChatOps. Are there more?
Want to get notified when part two (extended version) releases? Sign up to the mailing list here: http://eepurl.com/idzoGv
Downloads all .crx
extensions to current directory, with the filename as the extension’s id. It takes about 15 minutes for the script to generate the URLs because it is very inefficient and creates ~200000 sed
processes (one for each line.) After the URL generation is finished it goes pretty fast though.
The GitHub cache action is an action that allows you to cache files in between CI runs. However, there isn't a publicly documented way to modify the compression settings (i.e. to increase or decrease the compression ratio.)
If you delete a file from a filesystem, it is removed from the index but usually stays on disk until a newer file overwrites it.
If you have a typo in your codebase, it might be tempting to reach for spell check. While spell check is useful, it doesn’t know how words should be spelled outside of its own internal dictionary. If this is US English, then the word “javascript” isn’t a word and so would be marked as invalid by spell check.
E2E (end-to-end) tests. Angular. Yes, they’re flaky. Yes, they’re slow. But they are very useful and potentially under used. They’re sometimes pushed off to run on end-developers devices because getting it to work on the CI is too finicky.
Code review is important because it reduces coding errors when introducing new code into the codebase. It can also increase code quality. However, conventional diffs suffer from a flaw if they are solely used as code review tools: they don’t show what should have been changed.
Shell scripts are the glue that holds many systems together. They're also great for system utilities among many other things. However, they have a few thorns that can cause hours of debugging, especially in remote teams with different environments and software. Fortunately, there are a few ways to prevent them.
This finds pesky invisible UTF-8 characters. They normally don't cause problems but they can cause strings to not equal even though they look exactly the same. They can prevent some files from being parsed, or weird errors when importing CSV files.
Pipelines can be scary. Why is that? Well, they are central to many CI/CD development workflows. They are the window to pushing code into production.
Pipeline failures, at a high level, are misaligned assumptions. The developer assumes that the code is ready to go but the CI tool disagrees.
Many organizations are adopting Agile and Agile-based processes. Agile’s motto is “move fast and break things.” While I agree that at some point you have to “Ship It”, chances are there will be issues in production that have to be fixed, well, immediately.
When pulling new commits, sometimes package.json and/or package-lock.json (depending on your development workflow) changes. It can be difficult to know when it changes if there are a lot of files changed (although git diff will easily show you), or you might forget.
This article is about tests that can’t be run asynchronously, don’t have callbacks or other ways to notify when it is safe to return from a result. These tests are “polling” or “waiting” tests.
We can use pipelines for multiple things in CI/CD, including acting as a buffer between developers and the master branch.
CI/CD pipelines are the core of many development workflows today. However, they require energy to run. Since energy may come from non-renewable resources, there might be concerns regarding the environment.
Pipelines are the core of many CI/CD workflows. Having pipelines optimized means that the core of the CI/CD workflow can be completed faster or use fewer resources, and this can also yield cost savings.
When developing applications, chances are you’ll have to deal with passwords, API keys, or other sensitive information. Or, it could be untrusted information like user input.
Sometimes when completing a sprint, the sprint may have exceeded its velocity and your team has got much more done. Other times, it may have failed short of its velocity, and sometimes it may have hit the goal right on.
Jq is a command-line JSON parser. It is very powerful and can even parse messy JSON. However, it has a few useful features to ensure output correctness and safety. As with all commands, it has some behaviors on failure which may or may not be desirable.
Curl is a useful command which downloads or uploads data to a remote resource. While it is very useful, it's important to consider the slight-but-very-important differences between very similar flags. Certain combinations of flags and redirects, when used together, can cause security issues or unintended consequences like tests that report as passing when in fact they failed.
One day I couldn’t log into my linux VPS. When I tried to log in I got an error message saying that the shell could not be created. Hmm, strange. I was able to log into Digital Ocean’s management page and didn’t see any issues; the CPU was at 1%, the memory at 70%, and the disk and network activity were about 2%. Disk space was pretty high with a few GBs available.
Normally, the sort
command will create temporary file(s) if the data to sort exceeds the amount it can fit into memory. However, this is an issue if your data is very large and two copies cannot exist simultaneously.
Something I just found out was that curl has a -usebasicparsing
flag which shows information about an HTTP request. For example,
Note: the script will have a lot of 404 errors initially because the first few months of 2011 have not been archived. Requires aria2
to be installed. As of 2020, the archive is about 1.1TB compressed.
This script is not finished because it will combine canocalized domains with non-canocalized ones (e.g. com.google and google.com.) It requires the awscli
to be installed, but you do not need to have an AWS account. Domains and IP addresses might contain ports (such as google.com:1234)
When developing certain applications, it can be helpful to have a set of example files to use. For example, when designing a compiler, there might be some edge cases that you might not be aware about and so having example files helps find these issues faster. Some uses for example files could be for fuzzers, compilers, parsers, and more. For example, there is the Excel spreadsheet dataset which contains a million or so Excel files used for testing programs that deal with Excel files.
Installing macOS on a VM in Windows is surprisingly complicated. Tutorials after tutorial after tutorial, guides that say that they’ve went through all of the tutorials and say that this one is a combination of all of them and it works, those that are outdated, those which were published last year, iBoot, Hackintosh, using a mac to download parts of the installer, none of which worked for me. Error after error after error, googling each error and then come up to more and more errors. I’ve finally found a solution.