Tuesday, February 03, 2015

iOS Screen Video Capture From Quicktime

1. Connect iPhone to mac computer
2. Open Quicktime
3. File > New Movie
4. Tap dropdown arrow next to the record button, select iPhone

Wednesday, January 21, 2015

iOS Debugging Skills

In the film Taken, Liam Neeson has a particular set of skills. Using said skills, Neeson deftly resolves his one major blocker (a kidnapped daughter). In like manner - minus the mayhem - a software developer's debugging skills pay off in the field - thus, the worthy developer will value what enhances his debugging powers.

Dancing in the Debugger covers potent debugging skills for the LLDB command line; the good stuff appears about 3/4 into the article.

To summarize: Have you ever wanted to pause your running iOS app in Xcode to manipulate and better understand all the visual elements on screen, or conveniently change variable values and see results without stopping, recompiling, and running the app again?

Chisel is the Bruce-Lee's-nun-chucks-compliment to your LLDB bug-fu. Some fine Facebook folk are sharing their commonly used LLDB debugging commands in the form of python scripts so that you can type (in the LLDB debugger command line)...


instead of 

"po [[[UIApplication sharedApplication] keyWindow] recursiveDescription]” 

...to see your app’s current UI hierarchical tree print to the console! 


Or, let’s say I have just run the above command and printed this big hierarchical list of UI elements. Instead of sorting through this big dump of objects for a UISegmentedControl I can just type...

(lldbfv segmented
0x7fd72ac3ba90 UISegmentedControl

Now just grab that address and go to town…

e id $mySegmentedControl = (id)0x7fd72ac3ba90

That just created the convenience variable $mySegmentedControl. Here is the current control:

Let's change a color...

(lldbe (void)[$mySegmentedControl setBackgroundColor:(UIColor *)[UIColor redColor]]

...the background color changed to red without even resuming in the debugger!

A single tear runs down your cheek. Try it out! Just read the article and install Chisel - you’ll be glad you did.

By the way, to grab those controller images just above, all I did was type:
(lldbvisualize $mySegmentedControl
The Preview app opens up showing your snapshot of the object. BOOM!

Thursday, June 05, 2014

Write The Code: Swift and the Xcode Playgrounds & WWDC


This week Apple surprised everyone by introducing Swift - a brand new programming language for Cocoa and Cocoa Touch - along with a tool called Playgrounds, which lets you to explore your code through realtime feedback, without having to build and run the app. These were the most unexpected WWDC reveals I've seen in 4 years of attendance and many more years of observation.

Months ago I was watching a video by Bret Victor, formerly of Apple, promoting paradigm changing ideas on programming with visual and realtime feedback.

When Apple introduced the Xcode Playgrounds feature, I thought I saw Brett Victor's signature all over it. Chris Lattner, who started working on the Swift language in 2010, put the puzzle pieces in place for me - his homepage states that the Xcode Playgrounds feature was heavily influenced by Brett Victor's ideas (among others). Lattner also explains that a personal passion of his is to make programming more interactive and approachable.

Swift is available right now in Xcode 6. It's an exciting time, for one, because Apple is totally invested in Swift, and in making things better for developers at a time when our developer community, in many ways, thought they already had it pretty good.

*As is often true with Apple, in hindsight things seem obvious. Before the WWDC Keynote, nobody expected a new language. The time leading up to WWDC always feeds speculation around what secret message lies hidden in the conference's branding imagery and tag line. With Swift's announcement, "Write the code" obviously becomes all the more clever.

Friday, May 23, 2014

The Science And Art Of Things That Move

I watched this fascinating talk on bionics given at TED by Hugh Herr who heads the Biomechatronics research group at MIT Media Lab.

Now I'm wanting some spring jumping stilts. Strap on a pair and you'll be running 20 mph and jumping over objects 6 feet high.

Robotics Unlimited's OutRunner remote controlled running robot gets 20 mph as well. Just remember, robots that run can chase.

Robots that can chase call to mind perhaps one of the coolest of all - Boston Dynamic's Cheetah will overtake you and your jumping stilts by at least 9 mph.

Syd Mead's illustration of huge robot dogs visualizes a future with very large running robots.
"Running of the Six Drgxx"
Swedish House Mafia's Greyhound video appears to have been inspired by Mead's well known illustration - these mechanical hounds appear much smaller than the 120 foot tall "drgxx."

Ray Bradbury's mechanical hounds were punishers programmed to enforce societal rules by violence, having been outfitted with poison-injecting four inch steel needles projecting from the snout.
glenn kim's depiction of Brandbury's mechanical hounds

Cross breeding various weapon systems with any one of today's real-world autonomous robots conjures up some mighty fearsome combinations:

Imagine the Boston Dynamics Cheetah saddled with an MK19 grenade machine gun

Something very similar (though fitted on a track-based robot) has been around since at least 2005 in the Talon robot with a Metal Storm grenade machine gun.

How about a Modular Advanced Armed Robotic System plopped on top of a Big Dog?

While we're at it, might as well integrate TrackingPoint style precision firepower technology into something like Atlas

For as much destructive potential as this stuff has, the productive potential of autonomous moving robots is at least as awesome!

Flight Assembled Architecture
Quadrotor drones are building a tower of bricks!
For a thought experiement, scale the size of these machines up or down to extremes and imagine what could happen! Apply the concept to space and underwater.

Speaking of extreme scale robots, the people that brought us Siri (and a ton more - SRI International) are working on Magnetically Actuated Micro-robots - watch them construct nano-tube structures:

Seeing these micro robots actuated by novel means of locomotion brings to mind another robot called Cubli, which achieves locomotion through a combination of jumping up, balancing, and controlled falling.

A conceptual cousin to Cubli is our favorite ball of commercially available robo-sweetness Sphero

To be continued...

Wednesday, July 24, 2013

Top Innovator of 2013

Who did Fast Company name Top Innovator of 2013?


“Apple is up there with Nike, Disney, Coke, and Sony. But even the best brands require care and investment if they are to retain its energy and vitality. To me, marketing is about values. The Apple brand has clearly suffered from neglect in this area in the past few years. We need to bring it back but not by speaking about speed and feeds, not about pros and cons or why we are better than windows. Nike never talks about the price they instead honor great athletes. That is who they are and what they are about." -- Steve Jobs

Tuesday, June 04, 2013

Good Todd's Notable Quoteables

Once upon a time I worked at a financial services company on a software team with another Todd. Before long we came to be known as Good Todd and Bad Todd. I had a collection of quotes I liked and posted for myself and team-members to keep in mind and glean insights from - I especially appreciated the quote-digs against over-abstraction, "lasagna-code", and Alan Kay dissing C++.

Here are a few from the current collection of Good Todd's Noteable Quoteables...
“The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.” - Brian Kernighan 
“Premature optimization is the root of all evil (or at least most of it) in programming” - Donald Knuth
“First make it run, then make it run fast.” - Brian Kernighan  

Tuesday, September 18, 2012

Create Or Die

Creation is in our DNA. Humans are makers. We explore. We play. We discover. We build. We create. We invent. Yet too often we lose it, we change:
“Every child is an artist. The problem is how to remain an artist once we grow up.” - Pablo Picasso
The fact is this creative spirit can be snuffed out almost as soon as it begins. It can be programmed or educated right out of us. The precious flame of curiosity and discovery sparking our creativity can be extinguished almost without a second thought.

What about you, Truman?
I want to be an explorer
...like Magellan.

(slightly condescending)
I'm afraid no one's going to pay you do that, Truman.  You might have to find something a little more practical.
(glancing to a pulldown wall map behind her head)
Besides, you're too late.  There's really nothing left to explore.

The class roars with laughter as the crestfallen Truman takes his seat. 

-- The Truman Show, Screenplay by Andrew M. Niccol

Despite the soul-crushing assault on the little Leonardos and Magellans in all of us, we live in a time of unparalleled personal creative capacity. The information, the opportunities for learning and doing, and the resources available to even the most common of us would astonish history's most eminent figures.

What an exciting time to be alive!

You can view world-class lectures and courseware from MIT, Stanford, Harvard, Berkley, Carnegie Mellon, and a hundred more institutions, all for free.

Explore the world, the solar system, and galaxies on your computer.

You can explore Math, Physics, Chemistry, now Computer Science, and much more at Khan Academy

You can use Khan Academy to review concepts & form the mathematical bridge you need while taking courses like 6.002: Circuits and Electronics from MITx at edX, again, all for free.

You can build an autonomous multi-rotor drone, a space balloon, or an automated sentry gun using low-cost components along with a simple Arduino "prototyping platform" and free software.

You can fabricate toys, objects, or almost anything you can imagine right on your desktop using 3D additive printing machines.

You can prototype your own circuits on a breadboard or with software, hone it, and then have it printed as a one-off or mass produced.

You can launch a startup business or project that previously would have required big money, connections, and resources, just by having a great idea, the ability to execute, and sharing it with others. If people like it, they fund it, and you might do something like this (raised $10 million).

You can build your own Rally Fighter in 6 days (of course you'll need $75,000).

You can build applications, program whatever you can imagine, and maybe even change the world

The surface has barely been scratched. Truman's teacher was wrong. There is much more left to explore.

Monday, September 17, 2012

Drone Days of Yore

What do you do when you break your drone? When mine bit it hard, the central cross cracked rendering it uncontrollable. Parrot offers a replacement central cross component for $25. So, like the cheapskate I am, I disassembled the drone, fired up the hot glue gun, and went to work.

She never did fly as true again. Now she lays around reliving her glory days under the hot sun. Soon after the hot glue repair I took her back up. The wind was gusty; The pilot was fearless (and poorer for it.) She took to the cement hard and would never fly again... or would she?

Sunday, September 16, 2012

Show User ~/Library in Mountain Lion

In the terminal window type:
chflags nohidden ~/Library

Friday, September 07, 2012


A summary mashup from the FAQ:
EdX is an enterprise of MIT and Harvard University. EdX is building an open-source online learning platform and web portal for online learning; HarvardX, MITx and BerkeleyX currently offer classes online for free.
learners who demonstrate mastery of subjects can earn a certificate of completion. Certificates will be issued by edX under the name of the underlying "X University" from where the course originated, i.e. HarvardX,MITx or BerkeleyX. For the courses in Fall 2012, those certificates will be free. There is a plan to charge a modest fee for certificates in the future.
I'm signed up for 6.002x, Circuits and Electronics from MITx and CS169.1x, Software as a Service from BerkeleyX.

169.1x starts Sept 24 and ends Oct 26th, with an estimated required effort of 12 hours a week. Course staff is Armando Fox and David Patterson. CS169.1x teaches the fundamentals for engineering long–lasting software using highly–productive Agile techniques to develop Software as a Service (SaaS) using Ruby on Rails.

Thursday, August 30, 2012

A Mac On Mars?

WALL-E was a Mac, but he never went to Mars. You know he was a Mac by the famous startup chime you hear when he is fully recharged. Unlike WALL-E, NASA's Curiosity rover did indeed make it to Mars, and it just so happens, uses a PowerPC processor based on the original iMac's processor. The PowerPC was developed by an alliance between Apple, IBM, and Motorola. Many Macs featured PowerPC processors until Apple switched to Intel processors in 2005.

For good reason, many automatically think "Mac" when the PowerPC is mentioned. The original iMac's processor was the PowerPC 750 [1]. Curiosity uses a radiation-hardened PowerPC based on that, called the RAD 750. Unlike the Mac, Curiosity does not run a Mac OS version of any kind. Technically, Curiosity is not really a Mac; So, that famous startup chime will not be heard echoing across the barren scape of the red planet... at least not yet.

Curiosity is still a fascinating machine. It's onboard Operating System is called VxWorks. This realtime OS is also used on other systems such as the Apache Longbow attack helicopter, BMW iDrive, several spacecraft, some printers and routers, and more.

Curiosity is powered by a "nuclear battery", otherwise known as an RTG (Radioisotope Thermoelectric Generator). Basically, it uses a nuclear material and some thermocouples to generate voltage from the temperature difference between the martian cold and the heat from the nuclear material (Plutonium-238). It will generate 110 Watts of continuous electrical power for years.

It communicates with the Mars Orbiters using its UHF Electra radio. But it can also communicate directly to Earth with an X band transmitter and receiver.

Curiosity recently received and returned the first "interplanetary voicemail" via the rover's broadcast capabilities. But what would really get the Martian population excited would be to include Siri on the next rover, and let them ask questions in very deliberate and pronounced English. Maybe that's how WALL-E got his start.

[1] The PowerPC family of processors was not exclusive to Macs. PowerPC architecture has been used by other hardware, such as video game consoles like the Wii, Xbox 360, and Playstation 3.

Tuesday, August 28, 2012

114 MPG Car Developed In 3 Months Using Agile

Joe Justice and his team built wikispeed, a car that gets 114 MPG, using agile software development methodologies, and they did it in 3 months. Notice the Scrum task board on the wall in the factory in the TED video below. Justice isn't shy about touting Scrum, or his team's ability to redesign any component of the car and have it implemented on the actual car in 7 days or less.

Monday, August 27, 2012

Rally Fighter

I took my boys over to Local Motors right here in Phoenix off of I-10 a few miles south of Chandler blvd to see the legendary (in my house) Rally Fighter.
Rally Fighter was designed by Sangho Kim, who entered his design for the car into a competition created by Local Motors. The Local Motors community voted, selecting Kim's design as the winner. Kim was awarded $20,000 and takes the title as the designer of the Rally Fighter. Kim attended the renowned Pasadena Art Center College of Design, and it shows in the incredibly cool car he helped create.

You can acquire your own Rally Fighter for $75,000, and you'll get to spend 6 days with a partner and an expert guide at the Local Motors facility building your vehicle.

This car, and the community builder concept that brought it about, are killer ideas. This is pure collaborative innovation. How great that it's happening right here in the Valley of the Sun.

more refs: here, here, and here 

Saturday, August 25, 2012

The Van Halen Software Development Test

Van Halen is responsible for the ingenious brown M&M's clause in their contract rider.
"the band developed the M&M's demand as a means of checking whether the venue was properly honoring the terms of the contract to their satisfaction. Subsequently, if the bowl was missing, or if there were brown M&M's present, the band members would have reason to suspect that the venue might have cut corners or not properly honored legitimate technical and safety concerns listed within the contract." wikipedia (David Lee Roth tells the story here)
Van Halen's brown M&M's test is applicable to software development groups, from programmers through to the rest of the Development Abstraction Layer. But instead of brown M&M's, the fitness of conference room presentations will be our barometer.

Take any random presentation, preferably a demo of a software product. Is the presentation fraught with technical problems and foreseeable distractions, such as projectors not working, sound not working, sound being too low, projection images being too dim or washed out, missing cables, incompatible technology, screens not working, and most glaringly of all, consistently failing or poor connectivity? If so, you've flunked the test. If you can't pull it together enough to deliver a basic demonstration how can you be trusted to make anything more sophisticated, such as software?

It's like a fitness trainer; You don't look to an overweight trainer to help get you into shape. Or a pilot; You don't want the guy who continually crashes during basic maneuvers on a flight simulator to fly you around in a real plane.

But, I think an even simpler M&M's test, before we even enter the conference room, is the fitness of your connectivity itself. Do you have stable and sufficient connectivity, or does your solution hinder you? If it hinders you in doing and presenting your work, then you have just failed your brown M&M's test. The bowl is full of brown M&M's and Van Halen is disappointed in you.

Why be a roady when you can be Van Halen? Now's the best time for your team to become rock stars, not wanna-be roadies who can't even weed out the brown M&M's.

Note: I don't need to state the obvious, but I will anyway - this M&M's test doesn't mean you fail for unforeseen glitches and problems - these are bound to happen no matter what - but I am saying that there are obvious, easily foreseen, fixable problems that are considered total failures unless they're dealt with. A mature team sees them and fixes them. Less mature or less capable teams will fail to see the problems, or just look past them and not care, like bad roadies setting up for a concert disaster.

Hopkinson's Law

Hopkinson's law is a counterpart to Ohm's law used in magnetic circuits. The law is named after the British electrical engineer, John Hopkinson. It states that[1][2]\mathcal{F}=\phi \mathcal{R}_m,where \scriptstyle \mathcal{F} is the magnetomotive force (MMF) across a magnetic element, \phi is the magnetic flux through the magnetic element, and \scriptstyle \mathcal{R}_m is the magnetic reluctance of that element.
Here's where I pretend I truly understand what this means. But I really posted this because I share a surname with the law's discoverer and I like the ring of it - Hopkinson's Law. Although, what if I too discover my own scientific law by some curious turn of events? What will mine be called?

Wednesday, August 22, 2012

Call Me Trimtab

"Something hit me very hard once, thinking about what one little man could do. Think of the Queen Mary—the whole ship goes by and then comes the rudder. And there's a tiny thing at the edge of the rudder called a trim tab.
It's a miniature rudder. Just moving the little trim tab builds a low pressure that pulls the rudder around. Takes almost no effort at all. So I said that the little individual can be a trim tab. Society thinks it's going right by you, that it's left you altogether. But if you're doing dynamic things mentally, the fact is that you can just put your foot out like that and the whole big ship of state is going to go.
So I said, call me Trim Tab."
—Buckminster Fuller


I recently visited Biosphere 2. Near the end of the guided tour, after exiting the giant atmospheric "lung" at the heart of the Biosphere system, we emerged back out into "Biosphere One" to an outdoor area set up with little 2 to 3 foot tall miniature box houses with flat roofs, capped with rooftop gardens. The guide said that this project, run by local U of A students, was showing results of cooling the spaces within these garden-topped box houses on average by 4-6 degrees.

The Eco-Roof project by Japanese firm Daiwa House Industry brought to mind that student project over at Biosphere 2.

The ACROS Fukuoka building in Japan is another application of the green roof concept
Watch this video on the Daiwa green roof project Eco-Roof.
"Eco Roof is roof-top greening system for corrugated steel roof, which is consisted of tray boards made of recycled plastic raw materials. With intention to have light-weight roof-top system, we adopted the plant sedum sarmentosum bunge, which grows with no frequent watering and maintenance. It not only lowers surface temperature of the roofs, but is an indispensable mechanism to prevent the Urban Heat Island (UHI) phenomenon in metropolitan area."