Category Archives: Information Science

Automate The Boring Stuff with Python Coding

Spread the love

If everyone in the world understood and had a working command of regular expressions, everything would run smoothly. Especially if all of our interfaces to text allowed for their use. This has been pointed out. And, Automate the Boring Stuff with Python, 2nd Edition: Practical Programming for Total Beginners has a whole chapter on this.

What is a regular expression? We can talk about that in detail some other time. Briefly, it is a string of symbols that is designed to match a specified set of symbols, or a range of a set of symbols, in a larger body or stream of text. For example, if you pass a stream of information (say, all your emails) through a filter with the regular expression:

‘\d\d\d-\d\d\d-\d\d\d\d’

then any part of that stream of information that looks like a phone number (not using parens), such as 636-555-3226, will be isolated.

Automate the Boring Stuff with Python is a book that teaches beginning Python computer Augean programming focusing on examples from day to day life, including but well beyond REs.

The new edition includes pattern matching with regular expressions, input validation, reading and writing files, organizing files, web scraping, manipulating Excel spreadsheets and Google Sheets, PDF and Word documents, CSV and JSON files, email, images, and automating your keyboard and mouse.

The great benefit of a book like this is that you learn Python (the first part of the book gives you all you need to know to program in Python) in the context of things you actually want to do with Python. If you are interested in learning Python, or coding in general, this can be your first book.

The book is well done, as all in this series are, and fun. There are strong on line resources including all the code, and that information is regularly updated. Generally, “No Starch” press books are great, and this is one of those!

I would like to have seen at least sidebars on manipulating things using Libreoffice software, but note that the book focuses on documents, and OpenSource software does work with normal Excel and Word documents, so it is there.

The second edition adds a new chapter on input validation. The Gmail and Google Sheets sections, and the information on CSV files is also new. I plan on using the software tips and tricks to develop my own highly specialized and targeted search software. I’m often looking for files that have specific extensions, and certain kinds of content, in certain locations. Just the ability to hard-wire where to search for files will save me a lot of time and trouble.

Author Al Sweigart is a professional software developer who teaches programming to kids and adults, and who is author of Invent Your Own Computer Games with Python, Cracking Codes with Python, and Coding with Minecraft, all of which are quite nice. We need a new edition of Coding with Minecraft, by the way, that looks at a wider range of coding options and keeps up with the major advances in that software environment! So, get to work, Al!


Spread the love
Facebook Chief Mark Zuckerberg

Latest Fake News: Facebook battling fake news

Spread the love

Facebook leader Mark Zuckerberg has made moves to look like he battling fake news, but his project is doomed to fail. First, Facebook is explicitly not banning fake news, nor is it banning individuals known to be 100% fake news purveyors. Second, Facebook has brought in “experts” to examine news to see if it is fake that are, in turn, Koch funded right wing/libertarian tools. Continue reading Latest Fake News: Facebook battling fake news


Spread the love

Lost in Space

Spread the love

Lost in space is a brilliant idea that has been done twice, both times deeply flawed, but it still remains a great idea.

The reason this is a great idea is because it places a group of people with sufficient internal conflict to be in a story, in a context where the writers can do pretty much anything they want. Star Trek, of course, did the same thing, with their voyage to wherever the writers imagine scenario. Continue reading Lost in Space


Spread the love

Measurements of the human male kakadodo organ, does it matter and why?

Spread the love

This is a repost of an item I put up in 2013 based on some interesting scientific research. Today, I was told by Google that if I do not take the article down, I will lose my ad sense qualification. Google and companies like Google are giant behemoths that do not have humans to whom one can talk when they do something boneheaded like this. So, I’ll unpublish the original item and post it here with a change in title. Also, words that might be interpreted by an unintelligent robot at Google as violating policy have been changed. Continue reading Measurements of the human male kakadodo organ, does it matter and why?


Spread the love

How to fix the fake-news problem.

Spread the love

Did you know that truck drivers in Puerto Rico did NOT actually go on strike during Hurricane Maria relief efforts? Or that a former Obama White House official did NOT actually confirm that they wiretapped Trump Tower? Or that the sexual misdeed accusations against former Senate candidate Roy Moore were NOT actually a setup? Or that the Nazi’s marching (and killing) in Chancellorsville was NOT actually a liberal false flag operation? Or, sadly, that it is NOT true that President Obama is running a “shadow government” in some hidden corner of Washington DC? NOT NOT NOT NOT NOT NOT Continue reading How to fix the fake-news problem.


Spread the love

ResearchGate Under Law Suit Threat

Spread the love

I remember the moment it happened. It was a long moment, maybe ten years long. At one point I was sitting as an acting Senator in a major university’s legislature when a presentation was given by the head of the library, asking, begging, people to start publishing in peer reviewed journals that were Open Access. I had spent the morning sorting a list of journals in my field into the categories, 1) keep or I quit; 2) keep if possible and 3) I won’t notice if you don’t keep, but keep anyway.

That was near the end of the moment. Near the beginning of the moment, a decade earlier, I was at a meeting of a small but important learned society, and we were being given a presentation by a representative of one of the dozen or so well established academic publishers that normally published books, but now was starting to publish journals.

“Let us publish your journal,” they said. “It will be cheaper and easier than what you have now,” they told us. “If we publish your journal, for the next five years, your members will have subscriptions that will be discounted way below what they pay now,” we were led to believe. Continue reading ResearchGate Under Law Suit Threat


Spread the love