devin venable bits

FEED

Thought Stream Follows

Mon Apr 21 18:00:39 2014
A better way to zip archive a git project
Why have I been zipping up my git projects with the .git directory intact?  Here's the right way:

 git archive my_branch --format zip -o ../myproject.zip

Creates a zip file from branch my_branch and leaves out the .git files.  Useful for upload to build.phonegap.com.



Fri Apr 4 16:01:45 2014
Change bash comment color in Vim



Ever notice that it's almost impossible to read the dark blue comments on a black background in a Vim file?  What a bitch.

Change them to light blue:

Open ~/.vimrc

Add this line:
hi Comment term=bold ctermfg=lightblue guifg=lightblue


Thanks David C. Rankin!
http://lists.opensuse.org/opensuse/2008-11/msg01212.html





Tue Apr 1 08:35:53 2014
Musings on art


Many of us spend countless hours of our lives on art projects.  There are many reasons to make art.  For some it is about perfecting a craft or technique.  Others make art to communicate ideas or feelings.  Some are simply makers for whom art is a means for either making new stuff or reinventing old stuff in new ways.

We consume or enjoy art for different reasons.  Sometimes a piece simply strikes as a beautiful, unusual, or interesting.  But more often than not, we really appreciate art that successfully communicates with us, that reflects us, or that gives us insight into who or what we are.

Think of the song writer whose lyrics seem to describe you exactly, as if the writer understands you personally---completely.  Or think of the movie or book that moves you to tears.

This is the most successful art, as it satisfies both the maker and the observer.

Most of the art I make is musical, and though I also enjoy writing and drawing, I think my musical efforts are the most mature.  I can tell you that, for me, making art has always just been about play and experimentation.  I find satisfaction in being able to imagine sounds or music and turning those ideas into something audible for others to hear.

The artist who says they don't care if anyone else really appreciates or understands their work is probably not being honest with themselves.  Art is a conversation between the maker and the audience, and it takes two parties to have a conversation.

Art matters.  In it we see human potential.  It's so easy to become disgusted with the world, with the selfishness, the greed, the cruelty, the hatred.  But art reminds us of our better selves, or at least it has the potential to do so, because in it we see the spark that ignites, the seedling pushing up through the dirt, the breath of air that keeps us alive for another few moments.

We're alive, and yet, we for some reason we are frequently unable to marvel at it.  I'm thankful for the artists who spend their hours working to remind us, who serenade and shock us into seeing life for what it is or could be and for who and what we are.


Thu Mar 13 12:52:17 2014
PhoneGap and offshore development lessons


I've spent the last two months working on a PhoneGap app.  In an attempt to keep momentum going even when I'm sleeping, I hired several offshore developers to assist.  Lessons:

1.  Time is not on your side

It takes time to communicate design and implementation details to a third party.  It takes most developers some time to ramp up.  (Okay---all developers.)  I set the expectation that I would be able to build this app in a month because I thought I could build it if I worked on it 24/7, but none of the resources I hired had agreed to such a schedule.  In fact, in my experience, most if not all offshore developers are working multiple contracts and will give you at best a few hours of effort per day.

2.  Good help is hard to find

How do you really know if an offshore resource is quality?  The amount they charge per hour?  Their odesk rating?  No, none of this is a true measure.  The only way to really know what an offshore developer is made of is to give them access to source, assign them a task, and see how they perform.  You can generally tell within 48 hours if you have a keeper or not.  But Lesson 1 is the downside.  I found too many that were not keepers, so too much of my time was spent hiring and testing and then retiring developers that didn't work out.

3.  One offshore trip up can cost you big

Actually I had two offshore trip-ups.  The first, I found a competent PhoneGap developer.  He went to work but didn't check in soon enough.  When he finally did I discovered that he'd changed our whole approach to development, replacing our Twitter bootstrap multi-page based layouts with jquery-mobile and a single-dom layout for the sake of gaining the page transitions.  He'd implemented new functionality, but broke the existing.  Three weeks into the project I was left with two bad options: rewrite several ajax handlers to use the new dom structure and styles and stay with the jquery-mobile approach,  or rewrite his new functions, adapting him to the (three week old) style.

Did I mention that I had told this resource explicitly NOT to add any new libraries without first getting my approval?  After struggling with the decision, I decided to stay with the new approach and fire the developer.  After all, how could I work with a developer who wouldn't follow directions?

The other trip-up?  Giving an "Apple IOS expert" access to your developer account.  Without going into details, I will only say that I spent a week trying to figure out why push notifications were not working on our production system.

4.  Don't fire your only competent developer

After a week of churning through other resources, I couldn't find anyone who was qualified to do the work who was also available.  Oh sure, I found some that said they were qualified.  And I found some that said they were available.  But in the end, they wouldn't work, or couldn't do the work.

Remember the developer I fired?  I rehired him. What else could I do?

5.  Build it yourself

This advice won't help a non-technical manager, but in my case, I faced the reality that no one else could get this done but me.  The fact that I could no longer meet my deadline was crippling for me, as this is not typical for my projects.  Frankly, I shutdown under pressure, which is one of the reasons I ordinarily front-load my projects.  Without pressure, I think carefully, methodically, and with intention.  With time pressure, I have to make bad choices and that's really hard for me to do.  I'd rather not do the job at all than to do it wrong.  But of course, this is reality, and I don't always get to control everything.  So I struggled through.

6.  CSS selectors can be evil

Developers know that css rules are used to style web pages, controlling every detail of the look and layout.  Javascript is the language that does, and javascript code controls most dynamic behaviors, control flow, api communication with the server.

CSS selectors let you chose elements in the DOM (on the page) and manipulate them one way or another.  A CSS selector is like a query tool, allowing you to grab an element by its ID, class or even its ancestors or descendants' ID and classes.

So what happens if you let a resource who doesn't really know javascript, but who is good with CSS styling, update your stylesheets?  Unless careful attention is given to any selectors, the selectors get broken, meaning bugs are introduced.  Any time the DOM is modified post-initial-development, such as the introduction of a new element in the hierarchy, there is a risk (no a probability) that javascript selectors will no longer work.   And the stylesheet rules, which are often hierarchical, may also break, so styling will be destroyed.

This means that you can't really bring a CSS resource back to do more work in the middle of the project.  In fact, you had probably better lock them out once the initial styling is done.

A good best practice for the future:  Lock down the DOM.  Tell your resources it simply can't change without your approval.

7.  Too many cooks in the kitchen

Even when working with competent developers, it's really difficult to collaborate on a jquery-mobile project.  All pages are embedded in single DOM, leading to CSS rules that are more complex than would exist with smaller, dedicated pages.  It's too easy for developers to break each-other's CSS rules.  Some best practices for my future projects:

  • With CSS Selectors, prefer IDs to Classes, except in cases where a Class is the only solution (such as selecting every matching element). $(".wrapper .red .spanky .britches") is more likely to become invalid as development progresses than $("#the_britches_element").
  • Commit to the completion of HTML, CSS and layout before introducing the javascript and logic
  • Consider using a templating engine to reduce code duplication


8.  You can find a good offshore resource

I found a really great PSD-to-HTML resource last year and I really enjoy working with him.  He's responsive.  He does a good job.  He replies quickly.  He does what he says he's going to do.  Going it alone is not the best approach.  It should be possible to proceed as a team, and I'll continue in my efforts to build an effective one.  But throwing together a team to complete a project within one month?  Probably too ambitious.


Tue Jan 21 11:34:34 2014
When you're as old as a single on vinyl


I'm 45.  I've owned a few 45s.

Here's a short history of the music that made me me.

Though I grew up in the 70's, I didn't hear a lot of Carley Simon or Three Dog Night.  Other than the occasional pop hit overheard while shopping with mom at the ladies shoe store, my typical exposure to music was at church.

The piano and organ were the primary instruments played there.  I sang along to the hymns and played piano after church and sometimes during the week while my dad took care of church business.

In the fourth grade, my Elementary school teacher Mrs. Treat let us listen to her old 45s when we were good---The Beach Boys, The Crystals and Elvis.

My fifth grade music teacher introduced us to Beethoven by playing an disco-instrumental based on Beethoven's Fifth from the Saturday Night Fever soundtrack.  We begged and she let us listen to the whole album.  I loved it and the The Bee Gees.  It was the first "secular" 8-track tape my parents ever let me purchase.  I played it in the large, wooden furniture-case stereo in the living room.

About that time, contemporary Christian music was popular.  The songs were modern feel, but the lyrics were like the old gospel hymns.

My parents, who approved of this kind of music, started listening to radio station KXOJ.  I remember liking DeGarmo and Key and Kerry Livgren.

Livgren, also a member of the rock band Kansas, released Seeds Of Change as his first faith-based solo album.  His epic styling still sounds good today.  My mom let me buy the Kansas album Audiovisions from 1980, based on premise that Livgren, a good Christian, was in the band.  After listening to all the lyrics, I played it quietly, certain that my parents wouldn't approve of everything I was hearing.  It was my second vinyl purchase, my first a KTEL collection I ordered off TV.  Rapture by Blondie was on it.

7th grade was the first year of my serious flirtation with non-religious music.  I became a fan of Ted Nugent, AC/DC, Journey, Styx, Billy Squire, Van Halen, Queen and REO Speedwagon to name a few.

MTV came to my town in the 8th grade.  A new world opened up.  Devo, Gary Numan, Pat Benatar, Motley Crue, Michael Jackson, Joe Jackson, The Talking Heads performed for me in the privacy of my living room.

That year I listened to a Tulsa based A.M. radio station known as 14K.  New Wave hits were heard there for the first time, most memorably The Human League's Don't You Want Me, long before I saw the video.

By high school I found myself gravitating toward strange bands, in sound or appearance.  Anything with a strong bass line and a synthetic sounding snare drum struck my fancy, songs that made you want to dance.  From Men Without Hats to Ebn Ozn to Dead Or Alive, if it grooved, I moved.

The album with the biggest impact was Depeche Mode's Some Great Reward.  Dark and seriously electronic, it was the first time I couldn't visualize the instruments making the sounds.  It blew me away.

Soon after, I was introduced to Tulsa's punk scene, and with it, American Hardcore music.  The first "punk" record (actually it was a cassette tape) I heard was probably by The Circle Jerks.  I listened to it over at Chuck Upshaw's dad's trailer.

The music was loud, rude and full of energy.  I liked it.  To my surprise, only about a month later, The Circle Jerks came to Tulsa and played a little hole in the wall downtown called 424.  It was my first show of this type and, man, what and introduction.  Skinheads, freaky kids with spiked hair, drag queens, all in attendance.  I was 16.   The next day I started tearing and burning holes in my clothes, ready to join the disillusioned.

I met some other New Wave kids at a teen club called Images.   At teenie-bopper Images, we were considered the punks, the freaks.  But out at the real grungy venues, we were considered wanna-bes. In both worlds,  I was digging the music, from Tears For Fears to Kurtis Blow, from Public Image Limited to The Pet Shop Boys, from The Dead Kennedys to Jermaine Stewart.







Tue Dec 31 11:00:11 2013
7 tips on how NOT to be a Lonely Guy

I re-watched Steve Martin in The Lonely Guy not long ago.  It was disappointingly not as funny as I remembered, though still worth the watch.  But, WOW, does it remind me of all of the lonely guys I've known.  You know the type: the guy who never recovers from a bad relationship, or simply can't quite figure out how to have a relationship with a woman...even though he really wants one.

Why am I qualified to comment? Well, if nothing else, I know how to get into a relationship.  I'm on my fourth (and final if I can help it) marriage, and there weren't many gaps between marriages where I didn't have a girlfriend.  I may not know much about how to keep a woman...but I do know a bit about how to get things started.

1.  Let Her Go

Dude, she's gone.  I know you were so happy, so complete when you were with her.  But that was a long time ago (or maybe just last month).  She's not coming back.  Do you really need to stop bathing, grow a floor-length beard, or sell all of your furniture and move into a box?  Do you think your brooding, crying, self-loathing and woman-hating is making you more attractive to the opposite sex?

Hit the reset button.  She wasn't your soul mate like you thought.  She was just a woman and there are billions of others.  Take it from me, you can be happy again, but not until you Let Her Go.

2.  Don't let the world know you are jaded

Yeah, life sucks and then you die.  But it primarily sucks because you are latching on to the idea that it sucks.  You probably think your non-stop observations about life's obvious pains makes you witty and insightful.  Nope. It makes you come across as negative. How many women are looking for a man who can clearly articulate life's suckage?  

If you meet a woman who begs "Please tell me why life isn't worth living!  I was so hopeful before I met you.  Please do something---anything---to dash my dreams!" run the other way.

3.  Don't be pitiful out loud

This should be obvious.  If you are resorting to pity for attention, seek counseling.  I'm surprised at the number of guys who do this.  

4.  Don't pretend you're All That when you're not

If you are constantly telling everyone who will listen how awesome you are, you are not awesome.  You know it and so does everyone else.  Be confident, not stuck up.  Nobody likes a braggart. 

If you are truly awesome, you don't need this advice.  Women already flock to you.  Don't get down about the fact that you are not awesome---figure out how to become awesome.

5.  Quit feeling sorry for yourself

Even if you aren't telling everyone on facebook, it comes across when you are.  The only way to fix this is to really quit feeling sorry for yourself.  If you don't like the way your life is going, then change.

6.  Don't be hyper-focused on You

Are you your own favorite subject?  When you get around women, do you launch into conversation about your true love, yourself? No one is as interested in You as you are.  

People, including women, care about the people who take a genuine interest in them.  So you like a girl?  Then ask her questions about herself.  Be interested in her family, friends and hobbies.  Don't launch right into your life story.  Wait until she asks you about You.

7.  Be your own person and love who you are

It's really pretty simple.  You don't have to be rich or good looking to attract women.  You just have to embrace who you are, find a way to enjoy living, and love yourself.  Women are attracted to confidence.  Women are just people who want to be happy, and when you are happy, they want some of what you've got to offer.








Sun Dec 15 21:07:02 2013
Disco and Mint Green Suits
Want to listen to something funky?  Check out bibio:

http://open.spotify.com/track/7cXF6ZVxPFfIaTuHkfit7U

Ever since the 5th grade, I've been a sucker for Disco and funky dance music.  I can't remember the name of my music teacher, but she turned us on to the Saturday Night Fever album.  It was during our study of Beethoven, and she was wisely trying to bring pop culture into the conversation in order to make the subject relatable.  The soundtrack contained a lively disco instrumental of Beethoven's Fifth, and it was pretty good, but I was really interested when she played a little bit of the other tracks.

Speaking of funky, Tarynn and I saw the funkiest old man as we were walking into Duffy's this morning.  He was walking in ahead of us, decked out in in mint green from hat to foot, the whole package wrapped up in a full length, white fur coat.  If I had to guess, I would say it was rabbit fur.  "Now that's pimp," I said to her.

I didn't want to stare but I really wanted to study the details, down to his belt.  "Maybe you should ask to take a picture with him," Tarynn suggested.  I would have liked to, but he was a older black gentleman and I didn't know how he would interpret it.  While it's true that he did look like the stereotypical pimp from the 70's movie Superfly, I was actually in awe and impressed by his personal sense of style.  I wanted to strike up a conversation, but what if he thought I was making fun of him?

While waiting in line to pay for our breakfast I decided to say hello.  I moseyed up to him.  He was sitting alone at a table for two, a plate of eggs and toast in front of him, his fork halfway to his mouth when I said, "How you doing?"  His eyes looked up, a bit startled I think.  Up close I could tell he was older than I initially thought, maybe 70 or 80 years of age.  "Hey, I wanted to tell you that I really like your mint green suit.  That's really sharp," I said.  He nodded to acknowledge me and I retreated awkwardly back to the pay line.

And that was it.

Sun Nov 24 03:16:53 2013
Am I liberal or conservative?
I was first called a liberal when I called out a co-worker for using the N-word some 27 years ago.  Yet around that same time, I voted for Bush, a Republican, instead of voting for Michael Dukakas, the Democrat running against him.

While it's true that I've voted for the Democratic candidate in every election since, my views ebb and flow between the conservative, moderate and liberal.

So here are some of my current positions.  You tell me: Am I liberal or a conservative?

Gay Marriage

I previously supported civil unions and now support gay marriage for the same reason:  Marriage is a bundle of laws, and I believe that laws should be applied equally to every citizen.

Marriage may mean something to you based upon your religious views, but legally, church and state are separate.  The church ceremony has nothing at all to do with law, and churches should be free to marry---or not marry---anyone they choose.

Some believe that by legalizing "gay marriage," society will suddenly treat married gay couples exactly the same as straight marriages.  If that is the goal of gay marriage advocates, I think they are wrong.  You can't force someone to agree with your view via legislation.

Taxation

I'm not a fan of paying taxes.  Who is?  But I will typically vote for state tax increases if they improve my city.  I supported Vision 2025 and will likely always support capital improvements.  Look, the tax system is a system we're more or less stuck with if we want America to continue to be the country we were raised in.  I have no idea what an America without Government would look like, since my entire life I've lived in our current system.  And I don't hate it, so I don't support breaking it.

Equal protection under the law

I believe that all citizens of the United States should be treated equally, regardless of race, national origin, sexual orientation or any other category that we can dream up to separate us.  We're people, simple as that, and deserve to be treated equally and with respect.

Abortion

I'm not a fan.  I believe legal abortion should be available in the first trimester only, and that abortion inducing drugs should be readily available during that same time. Why are we still doing surgical abortions?  Don't we have morning after pills?  Why wouldn't you want someone who made a mistake last night to not deal with it tonight, when the fetus is not yet formed?

On the flip side, I think 3rd trimester abortions should be illegal. And that second trimester abortions should only be permitted in the case of medical risk to the mother.  Come on people, if you made it to month four of the pregnancy and haven't done anything about it...you should probably just have the baby.  In my humble opinion.

Gun Rights

American citizens should have the right to bear arms.  It's right there in the constitution.  And not for hunting either---such a day might come that we need to arm ourselves against a tyrannical government. Unlikely in the near future, but just in case, I support this constitutional amendment.

States Rights

The federal government is in a much better position to protect us, affect fiscal policy, and frankly do just about anything over the state government.  State government has been taking it easy for the last hundred years.  It's not a serious government. In other words, while I think it's good to retain some individual rights as a state, in reality the federal government is the king of this land.  If states had any real power, we'd still have Jim Crow laws in Alabama.

And I'm glad we don't.

Foreign Policy


I'm don't support the notion of the US being the policemen of the world.  We need to let other nations behave autonomously, and only get involved when threats are immanent.  I prefer diplomacy over war. 

---

Obviously my political views are limited, pedestrian, and I doubt I'll be taking telephone calls from heady think-tank wonks with questions about the economy anytime soon.  But I think what I think, maybe right, maybe wrong.

So to recap the question: after reading my views, would you categorize me as a liberal, a conservative, or a monkey from the planet mars?














Fri Nov 22 03:08:12 2013
The night of the Justin Timberlake concert
It's a cold night in Tulsa, Oklahoma---too cold.  I'd rather stay in than visit Arnie's.  I come into the house and let the excited dogs out of their crates, say "Outside," and watch them race toward the back door.  They won't be out long.  In five minutes or less Henry will be barking to get back in.  In fact, I hear them now, the thumps of dog paws on the staircase.

Why do we have two Christmas trees up?  And before Thanksgiving no less?

I sit and type.  So much of my life I sit and type.  The ding of an iPhone in the dining room prompts me to retrieve the infernal device.  Henry barks, as if on cue, once, then again with impatience as if to say, "Hey, you son of a bitch.  Let me in.  Didn't you hear me the first time?"

It's Steve on the phone, sending me a text about taking the girls to see JT.  I text him, "I just dropped them off.  I'm back home bringing sexy back to my living room."

I rub my eyes and adjust my glasses.  Bifocals.  Not so handy when your head is hanging at a tilt, one eye looking through the top of the lens, the other through the bottom straining to see the words.

The iPhone beeps again.  Crap.  It's so much easier to type on this actual keyboard than it is on the little virtual keyboard.  Why can't everyone just use email?

Hey, if you know me: send me an email.  I hate typing on the little phone. I hate its beeps.  I hate its patented curvy corners.  I'm not 26 years old---I don't really want to text for any reason.  If you want to text, send a message to my daughter.

I pause for a moment to read the other tabs on my browser.  They read:

"bad reaction to waxing - Goo..."
"Blogger: Devin Venable - Crea..."
"Are You Allergic to Waxing? - Y..."
"facial waxing and allergic reac..."
"bifocals - Google Search"

That was me Googling bifocals.  I wasn't sure if there was a hyphen between the Bi and the Focals.

"Shut up Beatrice." I say, hoping to silence her gruff barking.  She quiets down.

The sink is full of dishes and I don't feel inspired to clean them up.  A little voice inside says, "Go to bed," but I know that I'm on the hook to pick the ladies up from Justin Timberlake in a few hours.  Man oh man.  I could just go to bed now, if only I could.  I'd better make some coffee.







Mon Nov 18 23:43:11 2013
This is what it feels like to be a 45 year old man
I listen to Tupac, or at least I did today on the way home from work.  While listening, I had a daydream about writing my own rap song.  Then I remembered that I probably can't rap and that 45 year old white men probably shouldn't rap.  Then I reconsidered, thinking, why not?

I still don't listen to classical music or play golf, two things I've always associated with middle aged white men.

I still like sex, though I can go through longer periods of the day without thinking about it than when I was aged 13 through 44.  I'm pretty sure I'll always like sex, no matter how old I get.  Dirty old men get a bad rap...they're just regular men who got older.

I judge others less based on their religious views, political beliefs, quirks, conversational style and position in life.  This is a growth area for me.  In my 30's I got really worked up over political affiliation.  In my 40's I'm back to believing that people are people.

But I judge some more, particularly anyone who holds themselves up to be better than anyone else, is ridiculously shallow, or prides themselves on their ability to consume products and services.  Yes I'm talking about you stupid-guy-with-flashy-car-fancy-watch-and-overly-white-teeth.

I like to go to bed at a reasonable hour.  Why not?  I feel better the next day.

I don't know if God is real or not, but probably not.  I believe that there are things bigger than me that I don't understand, but I don't know that I'd label it as God.  Ironically, sometimes I still pray.

Only people matter.  Things are future garbage.

I know almost nothing. It would be great if I could say that after 45 years, I've got it all figured out.  But the truth is, I'm just a guy who knows a little, enough to live in our society, but not enough to be a guru, sage or preacher.  I'll tell you my opinion if you want, but I'll probably be wrong.  I'll tell the truth though---I'm not afraid to do that.  The older I get the more real I get.










Thu Oct 31 00:16:43 2013
Jackd and pulse audio
I need not to forget this again:

Best resource I found here:
https://wiki.archlinux.org/index.php/PulseAudio/Examples#Pulseaudio_through_JACK_the_old_way

For UbuntuStudio users:
https://help.ubuntu.com/community/UbuntuStudio/ProAudioIntro/1204#The_Pulse_Audio_to_Jack_Bridge_-_using_both_at_once

PulseAudio and Jack working together

Thanks to Jack and Pulse Audio packagers, there is now a very easy way to get PulseAudio and Jack working together. First of all, install the package pulseaudio-module-jack
sudo apt-get install pulseaudio-module-jack
If the dbus option is checked in Qjackctl (Jack Control) setup, it should work without any other tweak : as soon you start jackd, a new Jack virtual sound card is created in the Unity sound preferences, and Pulse Audio inputs and outputs are available for Jack.
It means you should see virtual "Jack Sink" outputs and inputs in Audio preferences, and "PulseAudio" Sink (outputs) and Source (inputs) in jack (use Qjackctl or Patchage).

To have sound with PulseAudio applications (Totem, Rhythmbox, Firefox, etc...) and your jackd sound card, just connect PulseAudio JACK Sink to the sound card outputs with Patchage. Then in PulseAudio preferences, choose "Jack Sink" as output. That's it.


---
And...

Pulseaudio through JACK the old way

The JACK-Audio-Connection-Kit is popular for audio work, and is widely supported by Linux audio applications. It fills a similar niche as Pulseaudio, but with more of an emphasis on professional audio work. In particular, audio applications such as Ardour and Audacity (recently) work well with Jack.
Pulseaudio provides module-jack-source and module-jack-sink which allow Pulseaudio to be run as a sound server above the JACK daemon. This allows the usage of per-volume adjustments and the like for the apps which need it, play-back apps for movies and audio, while allowing low-latency and inter-app connectivity for sound-processing apps which connect to JACK. However, this will prevent Pulseaudio from directly writing to the sound card buffers, which will increase overall CPU usage.
To just try PA on top of jack, have PA load the necessary modules on start:
pulseaudio -L module-jack-sink -L module-jack-source
To use pulseaudio with JACK, JACK must be started up before Pulseaudio, using whichever method one prefers. sPulseaudio then needs to be started loading the 2 relevant modules. Edit /etc/pulse/default.pa, and change the following region:
### Load audio drivers statically (it is probably better to not load
### these drivers manually, but instead use module-hal-detect --
### see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Alternatively use the static hardware detection module (for systems that
### lack udev support)
load-module module-detect
.endif
to the following:
### Load audio drivers statically (it is probably better to not load
### these drivers manually, but instead use module-hal-detect --
### see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink
load-module module-jack-source
load-module module-jack-sink

### Automatically load driver modules depending on the hardware available
#.ifexists module-udev-detect.so
#load-module module-udev-detect
#.else
### Alternatively use the static hardware detection module (for systems that
### lack udev support)
#load-module module-detect
#.endif
Basically, this prevents module-udev-detect from loading. module-udev-detect will always try to grab the sound-card (JACK has already done that, so this will cause an error). Also, the jack source and sink must be explicitly loaded.
Sun May 5 14:40:09 2013
I'm hundreds of millions of years old
I woke up last night thinking about how comfortable I felt wrapped up in my blankets with my wife.  I thought about what it must have been like for my grandfather when he woke up at night with my grandmother in their little home in Ada, Oklahoma.  I wondered about my great, great grandfather before him, and for the countless generations before him and before the invention of the modern mattress set.

They're all me, and maybe some of you.  They're not the personal me, the me of my conscious mind, but nonetheless my life is their life.  My life is a continuation of their being through sexual reproduction.  If at any point in my lineage had one of my forefathers' life been cut short prematurely, before his opportunity to reproduce, I would not exist.

We're all unique, it's true, as our generics are a combination of two different lines of humans---lines that likely crossed many generations ago, perhaps many times.  But the resulting human, me or you, we are literally them.  Our traits, our personalities, our physical makeup---all born of lines of DNA passed from organism to organism for millions of years.

Sometimes I wonder if we overemphasize the importance of the individual human, the person we know ourselves to be.  After all, our consciousness is transient.  We live in one body so briefly.  It seems we barely have enough time to grow up before it's over.  In 70 to 100 years, we go from knowing nothing of the world to knowing much that a human can know before consciousness shuts off.  But, if we reproduce, we pass on the core of who we are, the recipe, literally the life, on to the next generation.

Some might argue that you pass on the blueprint only, and that each new life is "born", but I'm not sure I would agree.  From the moment my little swimmers left my body, they were alive.  The fought their way into an egg and from there life morphed and continued.  I have three kids walking the earth today carrying on my life force.  If I were to die today, this life of mine would be considered a success from a biological perspective.

So who are we?  Macro individuals or members of a micro collective?  Are we but mere vessels, an ark for microorganisms to ride upon through time?

And from a conscious level, how am I connected to my ancestors?  Is my consciousness an echo of theirs?  Do I have the same struggles as a distant forefather 1000 years ago?  Did his back hurt like mine does?  Did he have high blood pressure?  Did he struggle with depression?  Did he like spicy foods?  Did he lay awake at night, satisfied to be near his wife, wondering about what it really means to be alive?



Fri Apr 26 00:35:44 2013
Low latency midi
This might be just about the only way to get decent latency performance out of midi (using external hardware):


devin@devin-OEM:~$ jackd --sync -Xalsarawmidi -dalsa -r48000 -p256

Or even more betta:

devin@devin-OEM:~$ jackd --sync -Xalsarawmidi -dfirewire -r48000 -p256

Starts up midi in raw midi and firewire for audio...still testing this out

Wed Apr 3 01:47:07 2013
Ardour 3.0 Notes
First off, I paid for the software.  Why?  Because I like it and I've been using it for years.  I thought now would be a good time to pay for a release.

I'm excited about using the midi features with my external keyboards. But the midi port setup has changed.

jack midi ports (virtual) can't talk to alsa midi ports (hardware cards) without a little help.  So after starting up qjackctrl, I must launch this daemon.


 a2jmidid -e

After running, hardware ports show up under an a2j node in the MIDI tab.

I want to connect my BCF2000 to Ardour and this process too has changed.

1. Map ardour MIDI control out to BCF2000 midi 1
2. Map a2j BCF2000 capture midi 1 to ardour MIDI control in

Using preset 2 on the BCF2000, I can then "Operate Controller Now" on a virtual fader and take control with a hardware slider.

But...PRESET 2, which with Ardour 2 was configured to control Ardour's transport controls, don't seem to have an affect.

After reading Paul's comment (https://community.ardour.org/node/4942), I'm about to try to map the MMC.

Yes!  That worked.  I simply had to map the MMC in and out ports to the same BCF2000 ports I used in steps 1 and 2 above.

Sun Dec 30 23:01:07 2012
Alesis Perforamnce Pad midi clock sync
Just a quick note...it's not easy to get the Alesis Performance Pad synced up with your Linux system.  Jack and Ardour supports MTC, not midi clock (at least not yet).

My need was to sync all of my virtual stuff (seq24, Ardour) with my drum machine, the Alesis.  Unfortunately, no midi in on the Alesis, only midi out.  The Alesis will emit old school midi clock messages, and that's about it.

My hackish solution: use Rosegarden.

Under settings/midi/midi sync you'll find a MIDI Clock and System Messages option.  From the drop down select "Accept start, stop and continue."

Assuming your external synth or drum machine is connected via midi in to jack, pressing play on the external device will now start Rosegarden.  If synced to other Jack applications, this will also kick off your entire virtual orchestra.
Sat Nov 3 14:15:24 2012
Multi-track export for LMMS
I wrote a new little feature for LMMS, the Linux Multi Media System (which also runs on Windows).  LMMS is an FLStudio-like product that I've been making music with for the last year or so.  One issue I have with it is that I can't do everything I need from within LMMS, like real-time recording or controlling an external midi device---the way that I would want to.  And in fact I'm not sure I would want to do everything in one program.

Instead I use LMMS as a tool.  For electronic beat-based music, it rules.  So I like to do the electronic tracks within LMMS.  But I also am into adding real vocals, or recording other non-sequenced sounds.

In the past I would do my sequence work in LMMS, then export the final mix as a wav file, and then pull it into Ardour as a stereo track.  (I'd like to just use jack to sync the two products, but this hasn't worked out---seems the support is not there.)  Then I add other tracks, and then do a final mix down.

But, this sucks as I sometimes decide I need to re-balance the LMMS submix, which meant going back into LMMS, mixing down there and then re-exporting.

So my solution was to add an "export tracks" feature to LMMS that exports each instrument or sample as it's own wav file.  Now I can import each sound as an individual track in Ardour.

I've submitted the patch to LMMS-dev but it has yet to be accepted, so I don't know if the feature will make it into the product or not.  But I hope it will!


Sun Aug 12 03:59:17 2012
Mounting software raid devices on Linux
Just bought a solid state drive to replace two aging drives.  My two drives have appeared, for the last four years, as a single striped (Raid 1) drive to my system, via software raid.

After a fresh installation of UbuntuStudio 12.04 on the solid state drive, it's time to migrate data.  But how to mount the two old drives?

Turns out it was ridiculously easy.  I simply installed mdadm, rebooted, and there was my Raid 1 drive.


When did it get so easy?  I remember the good (bad?) old days when I'd be posting three pages of technical details to resolve such a problem.

Thanks to all of the open source contributers past and present for making our world a better place!
Wed Jun 27 16:33:18 2012
tag:
Wed Jun 20 19:16:05 2012
tag:
Fri May 11 13:18:38 2012
Jquery Mobile and rubber band drag effect

brokentoe 03:40:11 PM
Best way to eliminate rubber banding of entire page on touch drag?  Want header and footer to stay fixed.

pizthewiz 03:49:56 PM
if you are using PhoneGap on iOS, it has a config option UIWebViewBounce in Cordova.plist, if not you are left to your own devices to sort out (0:


In short, if you are using JQuery mobile as a webapp only, there is not a sanctioned way to prevent fixed headers and footers from bouncing when user attempts to scroll content area past bottom or top of page.  I've tried several posted workarounds, from iscroll.js to custom css and javascript hacks.  Still looking for the perfect solution.
Tue May 1 15:47:03 2012
tag:
Thu Mar 22 20:51:32 2012
tag:
Thu Mar 15 01:40:15 2012
tag:
Mon Feb 20 02:47:11 2012
tag: graph
Sun Feb 19 20:16:46 2012
tag: xen
Wed Feb 15 17:41:01 2012
Badges
We've been experimenting with badges for the SayAh web site. For example, the following badge---which is just a hyperlink with an embedded image---directs visitors to the CSOS web site to Bryan Hawkin's SayAh Review Site.

SayAh Review Results

I'm not sure if the badge fragment will render properly within a blogger post, thus this post, which tests behavior.
Wed Feb 15 17:35:59 2012
tag:
Wed Feb 1 17:23:56 2012
tag:
Sat Jan 7 22:39:49 2012
tag:
Sat Jan 7 22:36:55 2012
tag:
Tue Jan 3 02:54:17 2012
tag:
Fri Dec 16 16:08:23 2011
tag: css3
Fri Sep 30 13:37:09 2011
tag:
Wed Sep 21 15:51:55 2011
git differences between working copy and stashed copy
Shows the differences between copy and third item in the stash stack...

git diff stash@{3}

Thu Sep 15 20:59:49 2011
tag: canvas
Wed Sep 14 19:10:49 2011
tag: canvas
Wed Sep 14 18:56:51 2011
tag: svg
Tue Sep 13 21:42:22 2011
tag: svg
Mon Sep 12 15:58:23 2011
Vim search and replace from current location to end of file
Instead of searching and replacing the entire file with...

:s/old/new/g

Try inserting ".," just after the colon. This means "from current position to end of file".


:.,s/old/new/g

The comma actually specifies a range to make the substitution, from left and right of comma. For example...

:5,10s/old/new/g

...makes the substitutions on lines 5 through 10.


Fri Sep 9 16:07:29 2011
Notice to .NET developers
Word is there are about 30 more JAVA positions that need to be filled in the Tulsa area than there are JAVA capable developers. This is driving up the rate that JAVA developers can demand.

Meanwhile, Tulsa is flooded with .NET developers, which drives the rate .NET developers demand, downward.

So a word to the wise: don't get married to one vendor's technology. Any software engineer worth his salt can switch from .NET to JAVA or visa-versa without much pain.
Wed Aug 31 19:40:38 2011
Vim tags
Continuing on with my exploration of Vim features I've yet to use, let's explore tags.

Tags are like bookmarks. They let you jump around to different places in your file that you might want to reference, like a class definition for example.

Create a tag like so: ":tag tagname". This tags the current line number with the name you provide. Alternatively, you can use the shortcut CTRL + ]. The tag name will be taken from either the character under your cursor, or if you've highlighted a word or phrase, it will be used.

":tags" shows you your list of tags.

:tags
# TO tag FROM line in file/text
> 1 1 LongTextAnswer 8 q = LongTextAnswer()

Each time I show my :tags I get this error:

E433: No tags file.

This may also explain why my tags queue only contains the most recent tag I create. Further reading reveals that the tags file is created by the program ctags. I'll try installing exuberant-ctags and see what affect that has on my operation.

sudo apt-get install exuberant-ctags

Restarting vim and trying the :tags command again showed that my tags file could still not be found. I found a nice little page that describes the rest of the process that one must go through to get your tags file set up. Follow the link to learn more.

http://amix.dk/blog/post/19329

On a related note, you can read ctags in python:

http://code.google.com/p/python-ctags/





Wed Aug 31 18:15:36 2011
tag: css
Wed Aug 31 14:09:38 2011
Vim Execute Mode
I use vim and gvim every day. I'm so productive using the small subset of available commands that I know that I tend not to explore the question, "what else can I do with Vim?"

Take Execute Mode for example. In 10 years of Vim use, I've never tried it. Let's fix that now.

You enter Execute Mode by pressing capital Q (shift + q) when in normal mode. You'll see this at the bottom of your window.

Entering Ex mode. Type "visual" to go to Normal mode.
:

This seems familiar enough, but this is different than when you simply type ":" to enter a command at the bottom of the screen in normal mode. In normal mode, typing ":10 " + enter takes you to the tenth line in the document. In Execute Mode, ":10" + enter displays the tenth line just below your cursor. Hitting return again shows the eleventh line, and so on. You are not editing the document in this mode, simply accessing it. Interesting, but not yet terribly useful. Let's see what else you can do.

:w filename

This writes the file, just as it would if you had typed :w filename in normal mode, except again, instead of returning you to editing the document, you remain in Execute mode, meaning that the ":" appears again, awaiting your next command.

I'm afraid I can't imagine too many good reasons to use Execute Mode. The best use-case I can find is that you could use the :n, where n is a line number, feature view a section of the document you are not working on without leaving the section you are working on. If you have any tips on how Execute Mode makes your life easier, please leave a comment.


Mon Aug 8 16:03:52 2011
Safari URL opens new window
Here's a strange quirk I encountered while working with Safari mobile: HTML anchors (<a href="http://www.blogger.com/something.html">click</a>) open a new Safari browser instance---every time.

Now that can't be right. As it turns out, this is indeed the standard behavior when the target attribute is not explicitly set in the anchor. Apple does provide a work around setting:

http://www.naquah.net/blog/dennis/2008/03/21/how-to-enable-single-window-mode-in-safari

There are many instances when web designers don't need targets, and they are omitted. For most browsers, when the target is not explicitly set, the browser default behavior is _self. See the table from w3cschool:

http://www.w3schools.com/tags/att_a_target.asp

Attribute Values
Value Description
_blank Open the linked document in a new window or tab
_self Open the linked document in the same frame as it was clicked (this is default)
_parent Open the linked document in the parent frameset
_top Open the linked document in the full body of the window
framename Open the linked document in a named frame


The kicker is that Safari uses _blank as the default instead of self. The solution for web designers? Explicitly set the target attribute to _self for every anchor. A bit of a hassle, but the best way to ensure that a new window does not open up with each hyperlink click.


Thu Jul 21 01:03:03 2011
tag: cfd
Wed Jul 20 22:35:40 2011
tag: jquery
Thu Jul 7 17:49:50 2011
tag: music
Sat Jun 11 16:58:59 2011
tag: uml
Mon Jun 6 18:42:34 2011
tag: django
Fri Mar 18 15:25:43 2011
198252_1615661556849_1395634786_31310498_7106841_n
Tue Mar 16 15:51:21 2010
JSON API
Tue Mar 16 15:51:20 2010
XML API
Tue Mar 16 15:51:20 2010
Mashup Editor
Tue Mar 16 15:51:19 2010
Object with links to Related Records
Tue Mar 16 15:51:19 2010
Search Result Page
Fri Mar 12 21:28:26 2010
Sitting Under Canvas (8-bit)
Thu Feb 11 19:24:07 2010
I love my retro layout.
Mon Dec 28 15:24:03 2009
ZynAddSubFX Packaged
Mon Dec 28 15:24:02 2009
ZynAddSubFX Compiled
Fri Nov 20 19:54:23 2009
lolas
Thu Nov 19 19:13:45 2009
Crypto Nerd's Imagination