Category Archives: Technology

Making Podcasts Sanely Seekable for Car Audio MP3 Devices

When it comes down to my car’s MP3 player, seeking is the most painful capability—it’s limited to 2x-speed, which is disasterous for seeking to the 45m point of a podcast that’s 90m long. Yes, it’s terrible.

mp3splt to the rescue

If you could roughly split an MP3 into ten-tracks wherever there’s enough silence, you could divide each podcast into ten “rough” chapters. It turns out that there’s a nice CLI utility for doing this, called mp3splt. Here is how I invoke it with a shell function:

function podsplt() 
{               
   mp3splt -s -p nt=10,th=-50 "$1" \
   -d `basename "$1" .mp3`
}

This explodes the MP3 into ten tracks in its own directory, ready to go on any USB or disc media your MP3 player accepts. If you need to change the number of “chapters”, adjust the nt=10 parameter, e.g. nt=15 if you want 15-tracks. If the audio is noisy, raise the silence “floor” with the th=-50 paramter, e.g. th=-40.

Get mp3splt from http://mp3splt.sourceforge.net

Opus

Opus: A New Standard Codec for Audio

This is right out of left-field and looks to re-invigorate streaming audio applications.  What would you do with a 255 channel stream? To me that sounds like a potentially awesome future application of a remote mixing board or a live-broadcasting bonaza of choice for the harried producer or social streaming audio media. You could have an entire network blasted down to a consumer’s tuner and they could change channels without suffering audio drop-outs due to buffering.

Opus Interactive Audio Codec

Overview

Opus is a totally open, royalty-free, highly versatile audio codec. Opus is unmatched for interactive speech and music transmission over the Internet, but also intended for storage and streaming applications. It is standardized by the Internet Engineering Task Force (IETF) as RFC 6716 which incorporated technology from Skype’s SILK codec and Xiph.Org’s CELT codec.

Technology

Opus can handle a wide range of audio applications, including Voice over IP, videoconferencing, in-game chat, and even remote live music performances. It can scale from low bit-rate narrowband speech to very high quality stereo music. Supported features are:

  • Bit-rates from 6 kb/s to 510 kb/s
  • Sampling rates from 8 kHz (narrowband) to 48 kHz (fullband)
  • Frame sizes from 2.5 ms to 60 ms
  • Support for both constant bit-rate (CBR) and variable bit-rate (VBR)
  • Audio bandwidth from narrowband to full-band
  • Support for speech and music
  • Support for mono and stereo
  • Support for up to 255 channels (multistream frames)
  • Dynamically adjustable bitrate, audio bandwidth, and frame size
  • Good loss robustness and packet loss concealment (PLC)
  • Floating point and fixed-point implementation

You can read the full specification, including the reference implementation, in RFC 6716. An up-to-date implementation of the Opus standard is also available from the downloads page.

Don’t Be Under the Cloud (Part Ⅰ)

Using TaskWarrior for Project Management

I know they’re sexy. They’re beautiful. They’re everywhere: To-do list and project managers like Asana, Behance’s ActionMethod and Nirvana. [You can go on forever listing these, they're easy to make, easy to market and extremely competitive.]  If they’re free, eventually you’ll run into their limitations. I especially enjoyed PivotalTracker, but they since changed their business model and it was no longer useful to me (on my budget).  Lessons learned: Free + Online always means you’re going to be vulnerable to Internet, weather, or market conditions. Get off the cloud whenever it makes sense.

Enter TaskWarrior.

Taskwarrior

Taskwarrior (Photo credit: Wikipedia)

I’ve always been a CLI-person, since learning UNIX back in the good ole’ days in the late ’80s.  There are just some things that are more reliable when you’re not fighting the latest GUI fashion of the day, whether it be in your web browser or your operating system.  I needed a CLI-task/project management system, something that wouldn’t require a web server to install or web browser to display. TaskWarrior (which I’ll abbreviate TW) fills that bill and I don’t have to be nagged to “upgrade” when I exceed a number of tasks or projects. I won’t regurgitate how you can use it here when there’s a very short 30-Second Tutorial and a Longer Tutorial already there to use. What I do want you to know about are the reporting features.

Shaving Milliseconds

Add:

alias tw=task

to your shell configuration and you’ll save a couple of keystrokes invoking TW.  You could use TW’s built-in “shell” command but since TW may-or-may-not have GNU Readline support built-in, it’s easer to edit and run from the shell. If you don’t make this alias, mentally replace tw with task in all of my following examples.

The Default Report and Other Reports

The default report is what is shown when you simply run tw– you’ll get a list of tasks ID, Project, Priority, Due-Date, Age, Active-Tasks, Urgency (a unique TW feature) and Description. This report is good enough to clue you into what you should be working on next and will highlight what you’re actively working on if you have started it. 

Urgency

Urgency is TW’s way of weighting tasks so they bubble up to the top of your heap. Tasks not assigned to projects aren’t as urgent as tasks that are and tasks with closer due-dates are more urgent than tasks without due-dates, and so on.  If you really want to nuance (or waste your time) urgency, you can also set priorities on your tasks.  I prefer to use wait:<duration> task-modifications to take the tasks out of my immediate horizon, giving myself permission to ignore a task, knowing that when the time comes, it will come back.

The first command you should know about is of course the report command. This tells you all the possibilities you have with TW:

  • active shows you the tasks you have started.
  • all shows you all the pending and completed tasks.
  • blocked becomes useful when you start relating tasks to each other as being dependencies of other tasks—blocked tasks can’t be started until other tasks have been completed.
  • burndown if you’re familiar with SCRUM project processes, is a view of how much left there is to a project, which can be useful for estimating completion dates.
  • completed of course shows you what has been done.
  • ghistory gives you a graphical bar-graph of Added, Computed and Deleted tasks. You can view it by month (the default) or annually by adding .annual to the end of the command. If you don’t want the bar graphs, use history instead.
  • information is the complete laundry list of details about each task.
  • list is just barely more verbose than next, but without showing Urgency.
  • long will fill your terminal with task information including: ID, Project,  Priority, Added, Started, Due,      Recurring, Countdown to ready, Age, Dependencies, Tags and of course, its Description.
  • ls shows the tasks by ID, Pri, Project and Description.
  • minimal shows the tasks by ID, Project and Description and nothing else, it’s the same as ls without Priority.
  • newest shows you the tasks you’ve added by their age.
  • next is the default action when you run tw without any arguments, showing you the next actions.
  • oldest is the opposite of newest and will instantly show you your greatest goals along with your worst procrastinations.
  • overdue is exactly what you think it means.
  • projects gives you the bird’s eye view of collections of tasks you have. It doesn’t show you the tasks, but it shows how many tasks of each priority there are in each project.
  • ready appears to be the same as next.
  • recurring is your life-hack to reminders of things that you have to do periodically. I use it to remind myself and track my Omega-3 supplements.
  • summary gives you a feel-good progress bar view of your active projects.
  • tags shows you your other task classifications other than project. You can use tags for GTD contexts or other project management concepts like tracking assignments to other people.
  • unblocked shows you what’s ready to be worked on.
  • waiting shows you the tasks that you have pushed into the future.

This just gives you some idea of what you can do with the reports—of course, read the tutorials so you can see how to use TW for adding, changing or removing tasks. If you have any CLI chops, I think you’ll enjoy having TaskWarrior available as a tool without having to resort to vim with a simple text file as your TODO list. Not that there is anything wrong with that…

Restarting Cinnamon in Linux Mint

Talk about a need-to-know feature. Sometimes, Cinnamon gets confused. Logging in and logging out is super disruptive to productivity, so being able to restart Cinnamon without blowing away everything you have open is a nice option to have—if you’re aware of it. It’s buried in the “Troubleshoot” menu, which I never thought to look into before. Silly me.  If you really want to get geeky, the “Looking Glass” console lets you inspect all kinds of X11 weirdness.

An idiom for nesting anonymous functions in CoffeeScript

I have some code that is very brief, but called with a timeout. It’s tiresome to name two functions just so you can call them indirectly. Anonymous functions are quite brief in CoffeeScript:

setTimeout(
    () ->
        somethingThatCalls( () -> some other work here )
    , 1000)

You probably don’t want to go too many levels here, but its convenient for short bits of code.

CoffeeLint Configuration for Tab-Indentation CoffeeScript Authors

I’m falling into “use a tab” camp for source-formatting and counting tabs as indentation. If you want to configure your source editor to make those tabs appear as 2, 3, 4 or even 8 spaces wide, go ahead. For me, I think of them as logical mark-up for your “intent” of “identation.”  Any tab to me means one level of indentation.

Here’s a CoffeeLint.json configuration for that kind of work with CoffeeScript:

{
 "no_tabs" : {
 "level" : "ignore"
 },
"no_trailing_whitespace" : {
 "level" : "error"
 },
"max_line_length" : {
 "value": 80,
 "level" : "error"
 },
"camel_case_classes" : {
 "level" : "error"
 },
"indentation" : {
 "value" : 1,
 "level" : "error"
 },
"no_implicit_braces" : {
 "level" : "ignore"
 },
"no_trailing_semicolons" : {
 "level" : "error"
 },
"no_plusplus" : {
 "level" : "ignore"
 },
"no_throwing_strings" : {
 "level" : "error"
 },
"cyclomatic_complexity" : {
 "value" : 11,
 "level" : "ignore"
 },
"line_endings" : {
 "value" : "unix",
 "level" : "ignore"
 },
"no_implicit_parens" : {
 "level" : "ignore"
 }
}

Yes, I realize that this JSON file itself is not tab-indented.

markdown_mark_large

A Signet for Markdown

Nice work for fans of Markdown technology which never had a super nice graphic symbolizing it:

Designed by Dustin Curtis.

In many ways, I wish Markdown was the standard in WordPress. WYSIWYG gets a little tiresome sometimes.

Why can’t you buy a heterodyne/parametric array desktop audio system?

This isn’t for your music—this is just for daily communication. Just think of how awesome it will be for video bloggers to be able NOT wear headphones and look like doofuses on Skype. This seems like a massive, untapped market for http://www.holosonics.com.

Bring back payphones with this technology and you’ll never have to touch an unsanitized handset ever again or worry about a missing handset.

I mean, really, kiosk “areas” for advertising your bananas in supermarkets is a really, asinine application of this technology. The only place I’ve ever seen this in the appropriate wild was a public library in Ogden, UT at a public-information station. But add a microphone to the mix and you’ve gotten away from mere pico-broadcasting and made something better.

Haskell is starting to click.

For me, it was a matter of deciding to learn the why of Haskell’s design before jumping into the how and what of playing with GHCi and trying to make simple programs. The syntax is poetic and minimal and will be alien to anyone who’s programmed in imperative languages all their life.  If you try to jump into Haskell without the theory you’ll rapidly become distressed that “nothing is accepted” by the compiler.

“Hello world” is singularly disappointing, like the first line of a Zen koan:

main = print "Hello world."

But that’s not what Haskell is about. Haskell is about separation of pure code (that doesn’t interact with the world) with impure code (code that changes state with the machine and/or world). The struggle is learning how to identify what causes change and what defines an algorithm. When you have to worry about side-effects caused by code (either desired or not), testing gets harder and you’ll need more and more boilerplate and mocks simulate the universe being tested.

When the code is pure, tests are easy as as I found out later, tests can write themselves with facilities like QuickCheck [more on it here], which is among one of the many amazing bits of software implemented with Haskell. Except for DARCS though, I just can’t give up my GIT. As I got older, I got past the idea of everything must be implemented in the same language.

Sometimes, you just gotta let the best tool shine and you don’t use the wrong tool because the right tool is the the “wrong” brand. Sometimes, you still have to code in PHP. :)