Nov 22
What's the best music for concentration?
Like many of you, I love listening to music. So it's always been a quest for me to find the best and most productive music to listen to. Is it Classical? Pop? Rock?...DubStep!?
listening-to-music.png
My quest led me to multiple answers. I tried white noise, pink noise, coffee shop noise and they all helped to some degree but began to get boring. I tried nature sounds, sounds of the forest, the desert, the sea... (I think my lazy ass must have heard every place on earth!) The best I found was the amazing and wonderful size focus@will. If you are on that quest to find music that you can work with - try it out. It's great!
But in the end, they didn't stick and I figured what the problem was - the music just wasn't as much fun as "real" music. I longed for Rock!, Pop!, even Dubstep! and so I would relapse to listening to them in the end. Oh woe! Would I ever find the holy grail of musical productivity?
holy-grail.png
Yes! I truly did find that holy grail of musical melody and I'm sharing it with you.... The holy grail of music productivity is....
Silence
Think of it this way - whenever we listen any sounds - our brain expends some effort in processing it. For the "real", enjoyable, music our brains are hugely distracted and trying to "hum along" with the song in our heads. And while it is distracted by having to process these sounds, it is not giving it's all to the task at hand.
For many programming tasks - this is bad! Therefore, whenever we need to focus and get things done we need a quite, undisturbed, silence.
But that's not the whole story...
Everyone who has programmed for a while knows that programming is not just thinking and being creative - there is a lot of tedious work to be done as well. There are times we need to work like this - on programming tasks that do not need our full attention Boring, repetitive, tasks that we need to get done but which would go by much easier if our brains were half switched off. For these tasks, we can use the normal, enjoyable music we know and love! Isn't it great?!
In summary: (a) When you need to concentrate, use no music and work in silence. Let your brain only focus on the task at hand. (b) When doing tedious, boring work, that's the time to lift your spirit by listening to great music that you enjoy!
Try it and see if it works for you. It's a simple and powerful way to use music. Personally, I have found this method of using music to be both the most fun and the most productive.
The last problem that I've discovered is sometimes I enjoy music so much that there are days I just get into the habit listening and not bothering to turn it off when I need to concentrate!
For example, this post should have been written yesterday. I've been lazy and it's all Maroon 5's fault!
So what I figured was I'd write a small application that mutes the computer volume whenever I need to concentrate...
Shh.png
And when I say I no longer need my full brain - goes back to normal.
Shh-close.png
It's a simple, quick, and easy way to let myself enjoy music and instantly switch over to a "concentration" mode when I need it.
And that's what the rest of this program is - a Swift Application that stays in the MenuBar and mutes the computer volume on your Mac.
Shh-icon.png
[:imports:]
import Cocoa import AudioToolbox
[!] Mute the volume on startup and restore on shutdown. [+] This class is a delegate for the lifecycle events of the application. [ ] Mute the computer on startup. [ ] Unmute on shutdown
@NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { var shh: Shh = Shh() func applicationDidFinishLaunching(_ aNotification: Notification) { shh.mute() } func applicationWillTerminate(_ aNotification: Notification) { shh.unmute() } }
[=] Show the icon on the menu bar along with an exit menu item. [ ] Show a menu icon [ ] On clicking the "Finished using entire brain" item, ask the application to terminate. The AppDelegate will handle acutally muting and unmuting so all this has to do is show and terminate the app.
class MenuBarController : NSObject { @IBOutlet weak var menuBarMenu: NSMenu! let menuBarItem = NSStatusBar.system().statusItem(withLength: NSVariableStatusItemLength) override func awakeFromNib() { menuBarItem.image = NSImage(named: "menuBarIcon") menuBarItem.title = "Shh..." menuBarItem.menu = menuBarMenu } @IBAction func quitClicked(_ sender: Any) { NSApplication.shared().terminate(self) } }
[=] Mute and unmute the computer [+] Use AppleScript to mute/ unmute the volume. [ -] The user can, obviously re-set the volume while the application is running. I could prevent this but it is pointless. To turn off the application is very simple and all it does is remind you that you are now "not using your entire brain". [ -] TODO: Does not handle plugging/unplugging of headphone between mute/unmute.
class Shh { func mute() { call_applescript(script: "set volume with output muted") } func unmute() { call_applescript(script: "set volume without output muted") } func call_applescript(script: String) { var error: NSDictionary? if let scriptObj = NSAppleScript(source: script) { scriptObj.executeAndReturnError(&error) } } }
. . . . . . . . . .
Notify me on new blog posts
. . . . . . . . . .
James says:
Interesting strategy... I've been trying focus@will and that works for me. I'll try this idea and see how it goes.
vikram says:
Silence is difficult to come by in an open-office setting. Personally focus@will works great for me! brain.fm is also interesting - I toggle between the two.
theproductiveprogrammer says:
Yes you are right. It is hard to do in a noisy office. Brain.fm is also a good choice. A friend of mine got some noise-cancelling headphones. These work well for silence as well as for listening to good music so that's another option.
. . . . . . . . . .