Is that a guitar rig in your pocket?

Hello again, everyone!

I was recently introduced to Audiobus, a system for inter-app audio on iOS. You can configure various inputs, outputs, and filters in between, much like a musician has their guitar and amplifier with effects boxes. The app costs $5.

I wanted to see if I could use it to replace my guitar setup, which is a few cheap ($30-$40) effects pedals and a Marshall practice amp I bought for $10 and fixed.

Several years ago I bought a Behringer UCG102 Guitar-to-USB Interface, which I believe was released before the iPhone. The nice thing about this device is that it uses the “standard” interface for a USB sound card (if there is such a thing) so it works on iOS and OS X without drivers, being detected simply as “USB AUDIO CODEC”. It has a 1/4” plug for both input and output. I’m connecting it to my phone with the Lightning to USB Camera Adapter, which is possibly the most underwhelmingly named product of all time, given it’s non-camera use cases. I tried using the 30-pin to Lightning and 30-pin to USB adapters together but that didn’t work.

iOS gets a little bit funky when it has multiple inputs and outputs, and since the USB interface has an output also, sound wouldn’t play through the device speakers. Plugging in headphones would work, but I ran into another issue. Since my headphones have a built-in microphone, that took over and I no longer got input from the guitar. Running the headphones through a 1/8” extension cable with only two pins (the cable I usually curse for disabling the microphone) allowed the headphones to take over the output while leaving input over USB. I probably could have also used the output from the USB interface if I had a 1/4” to 1/8” adapter handy.

Since the Behringer interface has a long USB cable you can use a 3-6” instrument cable. With the instrument cable, USB interface, cheap headphones, and your iPhone, you can carry an entire guitar rig in your pocket (minus the guitar). Check out JamUp or GarageBand to begin exploring your effects options with AudioBus.

A class taught by students

If you’re reading this blog, you probably know that I’m a graduate of Madison Area Technical College’s iOS development program. I’ve completed the final course in the series as both a student and an auditor, and I am taking the class again, this time again as a student. This means that I will be completing the assignments and in-class activities, and will receive a grade that will go on my college transcript (though as a working professional, that’s probably not of much consequence anymore).

What intrigues me to take the course again is that the instructor, Eric Knapp, is taking a new approach. From the syllabus:

  • Students will create and deliver at least two presentations to the class on iOS or an iOS related technology. These can take many forms such as live classroom presentations, videos, screencasts, written articles, etc.
  • Students must document their learning progress during the semester. This can take many forms like a blog, or a journal.
  • Students will be expected to make additions and changes to the course wiki.

In other words, students are developing and presenting a decent portion of the curriculum.

Of course, students are also tasked with developing a production-quality app throughout the course of the semester. As a seasoned developer, I could develop a small, production-quality app with minimal effort, but that wouldn’t be a challenge. My app will be involving new frameworks introduced with iOS 7, in a category that I don’t think has been explored before. I’ll be talking more about this later.

Most importantly, I think that the nature of this course will be better preparing students for the real world. Requiring students to present material puts a pressure on them, but this pressure is indicative of the real world. As a programmer, my job is to deliver a solution to the business’s problem, and this regularly involves talking directly with product owners, as well as presenting new technologies to colleagues in brown bag sessions.

I’ve been doing iOS development since just after iOS 3 launched (we called it iPhone OS back then, so get off my lawn) but I can’t claim to know everything about every framework. As the semester gets underway, I’m interested to see the presentations made by my classmates.

Software pricing

A new version of Riposte was released recently which included “Riposte Pro”, a $5 in-app purchase to unlock a brand new set of features. Whining ensued.

I’m going to get straight to my point. The App Store has been poisonous to what users expect to pay for software. Let me tell you about a few pieces of software I’ve purchased.Around a decade ago, my iMac was running Mac OS X 10.0.3. I was probably 10 or 11 years old, but I learned that Apple had released a new version of their operating system, Mac OS 10.1. After a substantial amount of begging, my parents paid $30 or so and I received, in the mail, a bunch of disks with not only Mac OS 10.1, but a disk with Project Builder, and if I recall correctly, some variant of Mac OS 9. Much newer versions than that are now available for free on Apple Developer Connection.

In 2009, I gave Apple $30 for a copy of Snow Leopard. In 2011, I gave Apple another $30 for Mountain Lion. Last year I paid another $20 for Mountain Lion. I’ve purchased Mac OS X at least four times (not including tens of Macs that I’ve bought). Later this year, Mac OS 10.9 will probably come out, and I’ll probably pay whatever the asking price is. I’m not going to whine about it, but I’m sure someone on the internet will.

I’m no lawyer, but my understanding is that when you purchase an app on the App Store, you generally don’t purchase a service agreement with it. As long as the app does what the developer said it does, they’ve held up their side of the bargain. If that developer never ships a software update, that’s their decision. When a new version of Mac OS X comes out with a laundry list of enhancements and brand new features, it’s entirely fair to charge for them. They were never part of the original package I purchased, and I paid for Mac OS X with no promise, or even knowledge that they were going to be added.

I bought a motorcycle last year. Adding some luggage boxes would be really great, and Suzuki offers them, but they cost a lot of money. I decided that I didn’t want to spend the money, so I’m continuing to use my motorcycle’s core functionality as effectively as I did before I knew about the options or their pricing. I’d look like a fool if I complained that Suzuki is charging for their accessories. Take that to imply whatever you wish.

Making the iOS Simulator case sensitive

Hello from CocoaConf!

In Dave Koziol’s iOS Debugging session, he pointed out that the iOS Simulator does not have a case sensitive file system. As the actual device does have a case sensitive file system, this allows bugs to enter your application unnoticed.

Here’s a few scripts to create and mount a RAM disk in place of the iOS Simulator directory. Please close the simulator completely before running these scripts, and note that this will reset your simulator. You could persist the data if you wanted, but I notice that the simulator gets wonky after too long anyhow.

Mounting Simulator on RAM-disk:

    pushd ~/Library/Application\ Support
    diskutil erasevolume hfsx "Simulator" `hdiutil attach -nomount ram://2314836`
    rm -rf iPhone\ Simulator
    ln -s /Volumes/Simulator/ iPhone\ Simulator
    popd
  

Returning to normal:

    pushd ~/Library/Application\ Support
    rm -rf iPhone\ Simulator
    hdiutil detach /Volumes/Simulator
    popd
  

Don’t take my word for it:

    int main(int argc, char *argv[])
    {
        @autoreleasepool {
            NSFileManager *fileMan = [NSFileManager defaultManager];
            NSURL *docs = [fileMan URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask][0];
            
            NSURL *lowercaseDocUrl = [docs URLByAppendingPathComponent:@"lowercase.txt"];
            NSURL *uppercaseDocUrl = [docs URLByAppendingPathComponent:@"LOWERCASE.TXT"];
            
            assert(![fileMan fileExistsAtPath:lowercaseDocUrl.path]);
            assert(![fileMan fileExistsAtPath:uppercaseDocUrl.path]);
            assert([@"Hello" writeToURL:lowercaseDocUrl atomically:YES encoding:NSASCIIStringEncoding error:nil]);
            assert([fileMan fileExistsAtPath:lowercaseDocUrl.path]);
            assert(![fileMan fileExistsAtPath:uppercaseDocUrl.path]); // will crash on case-insensitive filesystem
            
            NSLog(@"All assertions passed. We're case sensitive.");
            
            return 0;
        }
    }
  

Saying Goodbye to Twitter

I’m leaving Twitter for App.net. I’ve posted a ton less on Twitter since App.net launched, but now I’m leaving entirely. There are two distinct reasons why I am leaving.

I’m a software developer, and Twitter is hostile against us. They do not allow our apps to display tweets in an integrated timeline with status messages from other services, and they enforce arbitrary limits such as 100,000 client tokens per application. This trickles down to users in the form of Twitter clients that are encumbered by their restrictions, and the prices are cranked up to provide the developers with top dollar, because once those 100,000 client tokens are gone, you’re finished. To the contrary, Netbot for App.net just became free because App.net actually has a revenue sharing program which can sustain it’s development entirely.

The straw that broke the camel’s back just happened these past few days. There was a security breach that allowed lots and lots of user passwords to be exposed. Twitter has yet to inform me first-hand. Many users use the same passwords on Twitter and other services, and it isn’t unreasonable to try mapping a Twitter username to a Gmail account. Security breaches happen, but it is imperative that all users be informed immediately, and Twitter has dropped the ball.

I’ll be turning my Twitter account private in the next few days.

Setting up Fusion Disk on an older Mac

Warning: This process is completely destructive of all volumes that are being “fused”. Back up all your data. It WILL be lost.

Warning: The first drive that fails in your Logical Volume Group may cause the entire group to be unusable. Regularly back up all your data. Obviously, Apple has calculated this to be an acceptable risk of the technology.

Warning: Removing your optical drive to install a second hard drive will likely void your MacBook’s warranty.

Warning: This is an advanced topic. If you hose your whole system, I’m not responsible. If you’re afraid of hosing your system, that’s very sensible.

Fusion Drive is the marketing name for a useful application of Core Storage. Core Storage is a Logical Volume Manager for OS X.

To begin, install your physical drives in your Mac. For me, I’m using the 250GB SSD that came with my Early 2011 MacBook Pro 17” along with a 1TB hard disk in the optical bay. In theory, you could use several drives in a Mac Pro. According to an AnandTech article, Apple’s solution only uses 128GB of flash, so this should be plenty sufficient, if not more performant.

Once you’re all built physically, reboot your machine, booting from your Time Machine hard drive. Open a terminal from the Utilities menu. Following jollyjinx’s examples, create your logical volume. Type ‘diskutil list' to find the identifiers for your disks. I'll repeat myself: This will destroy all data on the disks you specify.

After running the ‘diskutil cs create' and 'diskutil cs createVolume' commands, close the terminal. Your volume has been created. Now, lets get your data back.

For me, restoring from my backup didn’t work for one reason or another (related to nuking the recovery partition). No matter. Select to reinstall OS X. After setup is complete, use Migration Assistant to restore your backup. This isn’t quite like a Time Machine restore, but close enough for my liking.

There is no next step. Enjoy!

WWDC Preparation List

I wasn’t going to post one of these until I could say that I’m a WWDC 2012 attendee. Today, I won a WWDC Student Scholarship, so I am, so I will.

I’ve been to a grand total of one WWDC before, so I guess I have some kind of experience. At least, if you’re reading this, you seem to think so. Let’s go!

  • Before the conference even begins, there will be a trek to Cupertino on Sunday. Jeff LaMarche, our emeritus organizer, has the details.
  • Monday morning, there’s the keynote. Last year, the line started around 5PM Sunday. Unfortunately, the main reason for that is no longer with us, but it will still start early. 5AM is not a bad time to plan on getting out of bed.
  • If you’re going to be sitting in the very back of Presidio (the keynote room), and don’t care about seeing the speakers in meat-space, you might want to go to Marina (the overflow room) so you can actually see the presentation on the huge screens.
  • Go to the sessions you want to learn about right now. The biggest feature of WWDC is talking to the presenters after the presentation. The rest is on video.
  • Skip sessions. If you aren’t interested in any sessions for that block, go somewhere else. There are 6149 other developers around you who you should go talk to.
  • Use Twitter to your advantage. Occasionally a high profile developer will say “Nothing looks good right now. I’m sitting outside Presidio.” You probably should be too.
  • Jeff LaMarche has a lot of other good tips. Check them out.

That’s it. See you there!

Platform lock-in, piracy, legality, morality

I’m not a lawyer, so I’ll try not to discuss the legal standpoint too much. I will make a few comments about my interpretation of the law, but keep in mind, this is not legal advice.

There’s a piece of legislation called the first sale doctrine. Generally, this protects your right to sell something you’ve bought. For example, if I buy a motorcycle from Honda, and then I sell it to a third party 10 years later, I have not infringed any copyrights Honda may have, be they engine design, the manual, etc. The original copy I owned was legal, and I am transferring my legal ownership of that copy to the third party.

Where it becomes interesting, though, is with electronic goods. Say I buy a book from the Kindle Store. After I’ve finished reading it, I think it’s an excellent book and I want to give my copy to a friend to read. I break the DRM if necessary (Digital Millennium Copyright Act allows DRM circumvention in order to access legal content) and send the file to a friend, then destroy my copy. This is just the same as handing my friend the paperback copy, except one important distinction. When I go to a book store, I buy a copy of the book. When I “buy” a book from the Kindle Store, I’m actually buying a strict non-transferable license to the content of the book.

Moving on from legal speculation, I want to talk about my opinion. I think that if I’ve paid $7.99 for a Kindle book, as opposed to $7.99 for a paperback book, I should have every right to treat it as a paperback book. If this means that I want to pass the book on to a friend, I think that’s totally fine. I think that as long as I destroy all copies of my eBook after giving it away, then it should be viewed just the same. I started out possessing a copy where my friend did not, and now he possess a copy while I do not.

There’s also the issue of platform lock-in. For instance, before I bought my Kindle, I bought several books from Apple’s iBookstore. These books are in a proprietary ePub format with proprietary DRM that couldn’t be cracked until recently. Now that they can be cracked, I can legally transfer them to my Kindle, but before I would need to re-purchase the book or otherwise re-aquire it. This is akin to buying a paperback book, getting glasses, and being told you need to buy a new copy if you want to read it with glasses on.

This concept also applies to going between the worlds of electronic and tangible goods. If I buy a physical copy of “Programming Clojure”, an outdated programming book, for $10, then I think I should be entitled to also read this on my Kindle. The person I bought it from has already paid the publisher and author, and I now own their fully paid for copy. Although forcing multiple formats to transferred together as a single copy would be difficult, I don’t think I should need to repurchase or re-aquire so I can take my book to school without carrying all of the weight.

I said “re-aquire”, avoiding the word “piracy”. Calling it “piracy” tries to liken it to the piracy committed by actual pirates. Essentially, they come on to your ship and steal your goods, and if you’re lucky, they also shoot your crew. This re-aquiring is more like “bootlegging”, recording a concert with a tape recorder in your boot. Doing that does not detract from anyone else’s experiences, and certainly doesn’t kill anyone. It’s still illegal, of course, but not on the same scale.

So, in closing, I want to re-state my two points. First, electronic goods should be treated the same way as tangible goods. I should be able to give my books to a friend after reading them. Second, I should be able to take my content from one platform to another freely, including between electronic and tangible platforms.

Speak in sensible terms, please!

Miles per gallon is stupid. In superior countries (like Australia), they use a much more sensical term, liters per 100 kilometers. Of course, we would say gallons per 100 miles here.

I’ve got a tough case to make here. Everyone uses MPG so how can it be stupid? Maybe not so tough. Lots of people use Windows, too. But seriously: When I buy a car, I don’t want to envision myself on an EPA Estimated 27 mile commute. A 100 mile trip is easier to wrap my head around. As a case study, it was 258 miles round trip to CocoaConf. The mental math was 258 / MPG * (price per gallon). That worked out okay cause I safely assumed the toaster (we rode in a Scion xB) gets 25.8 miles per gallon.

Let’s say you’re riding a motorcycle that gets 59mpg. Maybe you’re smarter than me but the mental math for that is a head scratcher. So, how about knowing that it takes 1.6 gallons to go 100 miles. 1.6 times 2.6, round to 1.5 times 2.5, it’s going to be around 3.75 gallons. Multiply by 4 and you know it’ll cost somewhere in the ballpark of $15 round trip.

It goes for other things too. I have 12Mbit internet at home. If someone told me they have a 24Tbit hard drive, I’d giggle like a schoolgirl. So, I have 1.5MBit Internet at home. But that’s a useless number. How about saying I have Internet that can download 100MB in 66 seconds. That’s a bit wordy, but it’s a lot more explanatory. About 40 minutes to download the latest Xcode, just by figuring its 3700MB and I can do about 100MB per minute.

Finally, I write blog posts at a rate of about 1.65 sandwiches per post. Yummy!

EDIT: Sensical term, not sensual. Damn you autocorrect.

Self-driving cars

So it begins. Nevada has laws regulating self-driving cars, and California is about to become second. With work from Google, along with others, self-driving cars are about to become a reality. There are several clear benefits:

  • Cars drop you off and park themselves.
  • Your car can return home to drive your kids to school.
  • Cars can negotiate and communicate more directly than humans.
  • Protocols can be implemented that will extinguish car accidents.
  • Computers have near-instant reaction time, hundreds of times better than humans. Navigating city streets at 60+ miles per hour will be safe, provided pedestrians can figure out what “don’t walk” means.
  • There will be an increase in skilled work, for manufacturing and programming these cars.
  • Commuting will require minimal effort.

These all sound great, don’t they? Well, no.

  • Walking from a parking lot, sometimes half a mile or more, is great exercise.
  • If a family only needs one car, the automotive industry will lose a very large amount of money.
  • Building an apparatus to open mailboxes and deposit envelopes will be comparatively trivial, so postal workers are now unemployed, as are paperboys.
  • If car accidents are impossible, the automotive insurance industry will evaporate. Any error is the fault of the manufacturer.

Of course, industry changes. The people who work for insurance companies will find new jobs, and new industries will be spawned, but the short-term evaporation of an industry will pose a medium-term problem to an already troubled job market.

There’s one final point to make: I want a car that can drive itself because I hate traffic. I want a car that park itself, because every day I have to park near Capitol Square, I want to punch every city planner in a 100 mile radius. But if you even think once about taking away my motorcycle, you’ll never hear the end of it. Driving a motor vehicle is not a “waste of time” to some people. I use my motorcycle for both commuting and recreation. We’ve seen how well humans work with computers, and for the vast majority of the population, it’s probably a blessing that their computer doesn’t control a thousand-pound sledgehammer that moves at 100 miles per hour.

Don’t get me wrong: I want self-driving cars here ten years ago. But it’ll change things in ways that aren’t entirely positive, and I think lots of people aren’t going to like it.

The cost of an intern

I’m taking an Android development course at my college. Today, our teacher showed us an internship opportunity he’d been emailed about. The opportunity was to build an app for data collection in an ecological project. It sounded like the intern would be the sole developer on the project (it was indicated that scheduling was flexible), and commitment to the project and reliability were expected. They were offering $8 - $12 per hour.

According to a report from Bluewolf, Android developers start around $97,000 per year, or $1,940 per week. This breaks down to around $55 per hour. However, to be in the class, you’re probably already an experienced Java developer and learning Android is simply another framework, so you’re much closer to the advanced level.

The most seasoned developer can only produce a certain level of code per hour. I would hazard a guess that an Android intern will produce 1/4 the code of a professional. That intern will increase his/her value throughout the project, and at the end of the project, they’ll have visited every step of the process and be much closer to the professional’s value.

I was working as an iOS intern for $15 per hour as my first development job, and then moved to a salary job at $400 per week. I’ve been doing iOS development for about a year now, and I wouldn’t take a job for less than $30 an hour, and only if I were really interested in the project I were working on. To do so would be a disservice to my fellow coders, since if I’ll work for $20, they must also be willing to work for $20. I would discourage anyone for taking an internship for a penny less than $15, because a company will then expect others to do so.

To this, my teacher told me “Go get my job and then you can discourage students!”. My to-do list now has “teacher” on it.

Make good stuff, then make it easy for people to buy it. There’s your anti-piracy plan.
(Reblogged from wilwheaton)

Silly article about AT&T’s data prices

Slashdot ran an article today, titled “AT&T Caps Netflix Streaming Costs At $68K/Yr”. The title immediately reaches for net neutrality fiends, but really, they’re not capping anything.

The summary says that streaming Netflix for 24 hours straight will consume 2.81GB. I’m not about to dispute that. However, it also says that can result in charges as large as $68,376. In my last post, I figured that the cost per megabyte on the 300MB plan is $0.067, and 2810 megabytes times $0.067 per megabyte times 365 days is pretty close to their figure. But there’s a third variable they forgot.

How stupid does someone have to be to pay their cell phone bill 12 months in a row, each for over $5000, and never think to upgrade to the $30 plan for a rate of $0.01 per megabyte? Forgetting stupidity, if you’re anyone I know, your cell phone would be shut off long before then because you don’t even have enough money, so you’d end your experiment in big numbers. Assuming you started the year on the $30 plan, your end result would actually be 2810 megabytes times $0.01 per megabyte times 365 days, or $10,256.50.

To ice the cake, the summary proposes an analogy, that you walk into a gym and are told that your bill will be between $360 and $68,376. This analogy doesn’t hold true at all, because if I walk into an AT&T store and kick and scream all day, I’ll never be offered a $30/month unlimited plan. They haven’t offered those in almost two years. Please quit comparing to it. You don’t see anyone saying “Ivy Bridge processors are so much faster than an i386!”

Mobile data is expensive, but not nearly as expensive as some crazy with a calculator would have you believe. If you want to stream Netflix 24/7/365, do it on your home internet at fixed rates.

You guys will get mad at anything, won’t you?

AT&T announced new data plans for smartphones. You can read the story on MacRumors.

The new data plans are:

  • 250MB for $15 (iPad only, $0.06 / MB)
  • 300MB for $20 ($0.067 / MB)
  • 3GB for $30 ($0.01 / MB)
  • 5GB for $50, plus tethering ($0.01 / MB)

The old plans were:

  • 200MB for $15 ($0.075 / MB)
  • 250MB for $15 (iPad only, $0.06 / MB)
  • 2GB for $25 ($0.0125 / MB)

Reading the discussion threads on MacRumors, you would think that AT&T just announced they’re planning to double data prices, not institute price reductions across the board. The cheapest data previously was $12.50 per gigabyte ($22.50 if you wanted tethering), and it is now $10.00 per gigabyte with free tethering on the 5GB plan.

If you have AT&T right now and don’t want to switch from your current plan, then don’t, and while you’re at it, go outside and quit complaining. Don’t even try to compare this to the $30 unlimited plan they haven’t offered for nearly two years.

popchartlab:

Santa explained via Venn Diagram.
(via Stephen Wildish)

popchartlab:

Santa explained via Venn Diagram.

(via Stephen Wildish)

(Source: singingbanana)

(Reblogged from popchartlab)