When you first encounter f strings in Python, they can seem like a dark art. And you can use them without understanding them. I’ve used f strings to get myself out of a bind, based on a code snippet I found on Stack Overflow or some other discussion board, with a comment saying not to ask me why it works. But here’s what they do and how they can help your code.
Home » Software
Recursion in computer science is a subroutine that calls itself. So what is recursion in Python? The same thing. A function that calls itself.
Recursion is a concept that first or second semester computer science classes frequently cover, but it can be confusing. I will admit that I generally tried to avoid using it, but it can be useful. I especially find recursion in Python useful when working with APIs, which is a common Python use case.
ZIP and RAR are two popular file formats in the Windows world. They have similarities, since both of them provide lossless file compression. But they have some fairly significant technical and philosophical differences too. Here’s a look at ZIP vs RAR and why the two file formats have coexisted side by side for decades.
Dealing with JSON is a common task when you’re coding in Python. Two functions you may use a lot without fully understanding them are json.loads and json.dumps. Let’s take a look at json.loads vs json.dumps, what they do, and how they can help you, especially when wrangling complex JSON data from APIs.
json.loads and json.dumps are two functions for converting JSON to and from simple strings. Sometimes one is better than the other, and being able to convert between them reduces the trade-offs you have to make.
I had an issue in a document with a hyperlink to an existing file. The file existed on a network drive, so the link worked fine… until someone with different drive mappings than me had to look at the document. Then the link didn’t resolve and the person got an error message. A confusing error message. It turns out it’s tricky to make a Word hyperlink UNC path.
Fixing it wasn’t as easy as it should have been.Read More »Make a Word hyperlink UNC path
Zip and gzip are two similarly named utilities, and they perform similar functions, but they are unrelated. They also have slightly different use cases. Let’s take a look at gzip vs Zip.
Simply speaking, Zip and gzip are implementations of the same compression algorithm for different operating systems, so they are similar but not exactly compatible. Zip originated with MS-DOS, while gzip originated with Unix-like operating systems, notably Linux.
PyCharm is a lifesaver for developing in Python, but it has a glitch. Sometimes, after you run a script, you lose the ability to type in the editor and make changes. Loads of web sites offer elaborate suggestions to fix the problem, but frequently, these complex solutions don’t work. Frequently they cause other problems. Try the easy solutions first.
The two easy solutions are to double-click on another file in your project, then double click on your script again. And if that doesn’t work, just exit PyCharm entirely and relaunch it.
At least two of the most popular operating systems of today are based on Unix. But what about Windows? Is Windows Unix based?
While Windows has some Unix influences, it is not derived or based on Unix. At some points is has contained a small amount of BSD code but the majority of its design came from other operating systems.
RAM Doubler was a fairly popular product for Macintosh computers in the 1990s. But you can’t buy it today, and if it seems like it’s been a while since you’ve seen or heard of it, there’s a reason for it. Ironically, it was a competing product that didn’t work that brought it down. Here’s what happened to RAM Doubler.
RAM Doubling products worked by setting aside an area of memory and compressing it, then decompressing it when you needed it. It was a form of virtual memory, theoretically faster than traditional virtual memory that used disk space, but less stable.
If you need a free, open source office suite, the leading choices are Openoffice and Libreoffice. And if you’re comparing, the two may seem more alike than different. The apps all have the same names, the user interfaces are really similar, and so are the feature sets. It’s not a coincidence, but there are some differences. Let’s take a look at Openoffice vs Libreoffice.
Libreoffice is derived from Openoffice, so that’s why the tools are so similar. However, there are some minor differences between the two that may be important to you.