Devious Malcontent

 Blog Blog RSS

Reading The Mythical Man-Month

Tuesday 23rd July 2024

After having it on my list of 'must read' readings, since I started my career, I've finally sat down and read The Mythical Man-Month, that is to say, during one of my sessions of hyper focus, I toiled with the idea of finally getting around to reading it, only to look for an audio book version on Spotify, only for that to be a podcast discussing the book, only to find the same thing on audible, only to be very disappointed to find it on Amazon for $50 in paperback form, and weirdly, also $50 for it on kindle, (it's a digital file why is it that expensive?). - thankfully, I managed to find a copy on archive.org.

But getting back to the original problem, I'm not one to multitask, but I do like putting something on in the background while I work, as long as I perceive it to add value that is not too distracting like YouTube or tiktok bullshit, I'm generally all for it, but not having it available in audiobook form, I downloaded the raw text (.txt) file from archive.org, ran some commands in notepad++ to filter out some of the garbage input and hacked up a shitty script in PowerShell to have the computer read it to me in a Microsoft Sam voice. - (although newer versions of Windows do not have Microsoft Sam installed instead the voice profile is called Dave, on my home PC and my work PC uses Anna or Zira), either way I figured I'd quickly get annoyed with the robot voice, but I managed to make it through all of the chapters... 😂

It's good to have a little robot read to me while I type furiously at the keyboard and get mad at visual studios for its IntelliSense fuckery, it's like having a little robot read me a bedtime story. 😊

Format

For anyone playing at home, the commands were,

Download a copy of the book in txt format from: https://archive.org/download/MythicalManMonth

Or the direct link here.

After you have obtained the file called "Brooks 1974 The Mythical Man-Month- Essays on Software Engineering, Anniversary Edition (2nd Edition)_djvu.txt" I renamed it to "Brooks 1974 The Mythical Man-Monthu.txt"

Open notepad++ and run the following, with Control+H:

  • Replace \n\n with \n
  • Replace .{space}\n with .\n
  • Replace {space}\n with {space}
  • Replace {space}\n with {space}
  • Replace \n\n with \n
  • Replace \n\n http://archive.org/details/mythicalmanmonthOOfred with {null}
  • Replace ?? with {null}
  • Replace \n\n with \n
  • Replace .{space} with \n{space}
  • Replace .{space}\n with .\n
  • Replace {space}\n with \n
  • Replace i.e. with id{space}est
  • Replace Chapter with \n{space}Chapter
  • Replace © with {null}
  • Replace • with {null}
  • Replace • with {null}
  • Replace © with {null}
  • Replace — with {null}
  • Replace ’ with '
  • Replace « with {null}

Code

And the code I just stole form: https://www.pdq.com/blog/powershell-text-to-speech-examples/

#readbook.ps1

# Start from terminal in the same directory as the text file
# use control-C to pause, note it doesn't stop until the line that it is reading is finished
# use the line number variable to specify reading position

Add-Type -AssemblyName System.speech
$tts = New-Object System.Speech.Synthesis.SpeechSynthesizer

$EOF = (Get-Content "Brooks 1974 The Mythical Man-Monthu.txt"  | Measure-Object -Line).Lines 

$lineNumber = 29
$tts.Rate = 0 

Get-Content "Brooks 1974 The Mythical Man-Monthu.txt" | Select-Object -Index ($lineNumber .. $EOF) | ForEach-Object {
Write-Output "$lineNumber : $_"
$tts.Speak($_)
$lineNumber++

}

Other tidbits

I stopped reading the book when I got to "Notes and References", I had thought of just removing the section below this but didn't care that much.

I kept a copy of the original PDF document opened on my side monitor when I was making my way through it, you may find sections that refer to image figures and given that the book has been scanned by an OCR reader, you get these weird nonsensical sections that don't make any sense without the context of the figure in front of you, I did come up with a regex pattern to extract the sentences but couldn't be bothered putting in the code, it was something like this: [^.]*[^.]*\. Or [^.?!]*(?<=[.?\s!])(?=[\s.?!])[^.?!]*[.?!]

Hence why I got rid of i.e. - it was confusing the pattern.

If I had to take a phone call or speak to a colleague while I was reading the book I would hit control C, take note of the line number that it was up to, and then just go in and edit the script to start from there when I restarted the script again. - it's not a very elegant solution but it got the job done.

You could probably ask Chad gyp-o-tee to write the code for you if you like, it would be nicer if Chad gyp-o-tee could read it to you in a more human like voice rather than a robot, although I'd much prefer to just pay a voice actor to read the book to me.

Another more nicer interface would be to export the text to speech generated to an MP3 format, I'm not sure how to do this without a hacky audio cable from the speaker output into the microphone input, and waiting for the script to finish in real time. - perhaps there's a way to export the encoded audio stream directly, but I haven't looked into this.

When you think about game development and video production using a shitty script like this may help generate NPC dialogue or set the pace for a video editing timeline, for a voice actor to go over afterwards.

I am aware that Spotify is now offering free 15 hours of audiobooks to premium account holders, and I am a premium account holder under a family plan but not the arbitrator of the account, so I'm not entitled to this feature, and Spotify is run by a bunch of arseholes.

I'm currently reading Masters of Doom, even though I know what happens and I've gone through several abridged interview versions, it's still a great story overall, and I was disappointed to find out that a pilot was made for the television series, but it was never picked up.

Fortunately, I have an audiobook version of this one so no PowerShell fuckery.

Update: August 12, 2025

Todo: re-read TMMM as the version I read was a first anniversary edition, and this review is for the 20th anniversary edition, I only found this out while researching artefacts for Show Stopper! (specifically, this tweet from Gergely Orosz on twitter), - "hold on, I don't remember reading that section in this book!?" - perhaps it will change my perception that the text is a bit dated, lol...


Home | Blog Index | RSS