Skip to main content


Tue Dec 18, 2012 at 08:45 AM PST

Building an iPad app on the iPad

by Mark Sumner

ChipBots Intro Page
And now, for something completely trivial.

Earlier this year, while my wife was navigating some tough days, I found myself with a lot of waiting time in doctor's offices, labs, etc.  To occupy myself in these situations that uniquely combined hours of boredom mixed with stark terror, I started tinkering with an iPad product called Codea.

Codea is an app that allows you to develop directly on the iPad. The programming language, Lua, wasn't familiar to me, but it turned out to be easy to pick up and the Codea environment helped translate my first steps into visible results on the iPad.

Eventually, I turned to trying to reproduce a game I had worked on two decades ago, a mixture of simulation and gaming that became ChipBots. And just this week ChipBots finally made an appearance in the iOS App Store.

If you'd like to see a bit about the project, join me after the break.

Continue Reading


Orb-Bits Game

For years, I've hated programming.

Oh, don't get me wrong. I like writing programs. Putting together something that does its task neatly and well, whether it's a popular game or an obscure utility, is as satisfying as knocking off a good short story. Only for years now I haven't been writing programs. I've been adding lines of code to modify the behavior of purchase orders in SAP, or digging through javascript libraries behind an HR web page, or teasing PLCs into spitting out the right data to feed the historian—all worthwhile things, but not a heck of a lot of fun.

However, in the last couple of weeks I have had more fun coding than at any time since I opened the box on my TI 99/4 and started learning Extended BASIC. And the reason is Codea.

Until now, if you wanted to write a program that ran on the iPad, you were restricted to Apple's toolset. That meant you were actually doing the programming on a Macintosh and transfering the app to an iPad, and while Apple's tools are robust, they are also confusing and difficult for a casual user. Codea changes that. Now you can code directly on the iPad, in an environment that's easy to pick up and provides quick gratification, and you can get started without swallowing a manual or sitting through a course.

Codea is the product of a couple of guys in Australia, and it brings the Lua programming language to the iPad. I had zero experience with Lua, but thanks to plenty of examples and built in documentation, the system took me by the hand and made it simple to get started. Within minutes of starting up, I had something of my own cooking. Better still, Codea is focused on graphics. Where some environments can make drawing a simple line a challege that involves creating a drawing canvas and marshallng a good deal of resources, a program to draw a line in Codea requires just that — the single line of code that draws the line. It lets you jump past the tediuim and just start making things happen.

The editor in Codea helps out by taking some of the most commonly needed keys that are usually buried behind shift/numeric keyboard/alt symbol choices and putting them front and center. It also provides completion on keywords in the language. The combination allows you to race along. The editor also includes tools that make it easy to bounce between lines and words. Frankly, I wish my word processing programs had keyboard controls this toughtful.


Codea editor

Codea is currently limited in that it's lacking many of the elements you'd want to create a business application, and there's no way (currently) to turn your Codea work into a "real app" you can sell at the App Store. But for education, simulations, games, and general farting around, it can't be beat.

I reproduced enough of the general user interface elements to draw myself a tool for creating icons and small images, and then popped it up for others to use. Code sharing has become a central feature of the lively Codea community with ideas and code flying back and forth between newbies and pros alike.


Spritely Icon Editor


It took me four hours to generate a note-perfect copy of Space Invaders. Only slightly longer to generate the Orb-bits game pictured at the top. Others in the community have generated apps that model 3-D topology, or visualize math problems, or created utilities that expand the "ecosystem" of Codea.

For anyone who ever coded, or thought about coding. Heck, for people who like logic puzzles but have never tied that to the idea of writing code, this is simply a blast to play with. Absolutely the best $8 I've spent on the iPad, and the most fun I've had with a computer in a long, long time.

Discuss

Wed Oct 19, 2011 at 07:55 AM PDT

Chevy Volt: day 1

by Mark Sumner


One of several displays the Volt provides

Last night, I slogged through chill rain and traded my Toyota Prius for a new Chevy Volt.

The Prius has been utterly reliable, with no major breakdowns in 119k miles and after 7 years all of the batteries are still working within specs. It's returned just under 50mpg (and I mean just under -- 49.88) over the life of the vehicle.  I'll definitely be sad to see it go. Now we'll see if the Volt can do better.

Having come from the Prius, you'd think I'd know what an electric vehicle feels like. After all, the Prius can move on electric motors only, gliding around parking lots and startling pedestrians who don't hear it creeping up behind them. But if you give the Prius any encouragement with the accelerator pedal, or drift above 30mph, the regular gas motor kicks in with a gentle thump and soft growl.

The Volt is not like that. You press the "gas" pedal and… it goes faster; smoothly and in eerie silence.  The Prius had a CVT, so there was no clank and jerk of gear shifts (other than the slight thump of the gas engine kicking in or out), but even on the Prius you could feel the ratios changing as the CVT played the belts in and out. In fact, with a little foot action, you could get the Prius to give you more or less oomph when trying to maximize mileage.  There's none of that with the Volt. For all the world it feels as if there is no transmission. The connection between pedal and speed is absolutely direct. Digital. Not the least feel of something between my foot and propulsion. Combined with the silence of the operation, it feels something more akin to being pulled by a rope than driven by a motor.

When I picked up the vehicle, it had only about half a change on it, and I piddled that away trying it out. So last night I also got a sample of what the Volt is like when it's gas engine is running.  Odd.  That's what it's like.  Chevy ads may emphasize that you can treat the Volt like any car, and I suppose that's true, but it definitely feels different.  When the gas engine is running, the behavior of the car is absolutely the same as it is when running off the batteries.  However, you can hear the sound of the engine whirring, and that sound is absolutely disconnected from your foot.  You press down, the engine sound doesn't change.  You let up, the engine sound doesn't change. The engine is just trying to juice up the batteries, and seems to be uninterested in what you're about at the moment.  The performance of the car is unaffected, but getting use to that disconnect between sound and action will take a bit.

The Volt comes with a charging cable for 110v outlets.  I plugged my vehicle in last night when I got home, and the display informed me it would be fully charged by 3AM.  So when I headed out this morning around 6, I pulled out the plug and drove off with a full battery.  The display indicated I could expect 38 miles of electric range (I don't know if that took into account that it was 44 degrees and drizzly).  The first hundred yards was up a very steep grade, and the display immediately dropped to 37, which worried me, but as it turned out I made the first 5.1 miles to the Interstate having ticked only 2 miles off the range. Driving at 70+ mph definitely drew down the battery more quickly and the next dozen miles on I-55 took 16 off the range. However, once I slowed to around 60mph, the range and depletion rate seemed to be aligned, and when the Interstate emptied me back onto city streets I was once again able to travel more than indicated.  By the time I reached the parking lot, I'd travelled 33.8 miles (about 2 more than normal, since some roads were blocked to accommodate World Series events). The display showed 3 miles remaining. So overall the car did a pretty darn good job of guessing how I would spend those electrons.

Now if I could only find somewhere to plug it in at this end!

Discuss

Mon Mar 14, 2011 at 07:58 AM PDT

Thinking about a 3D TV?

by Mark Sumner

Over the holidays, I set out to replace my existing TV with one that... worked. I was looking at Vizio's latest LED backlit model, the XVT443SV which had collected numerous awards. Then at the last minute I got a chance to bump up to the new 3D model XVT3D554SV for roughly the same price. Picking up a 3D set hadn't been on my radar, but the new set looked good, so I wrote the check and took it home. It wasn't until the end of January that I parted with $150 for two pairs of the glasses that allow the 3D part of the TV to do it's trick. Since then I've watched a variety of material, and had a chance to try out some other sets as well.

There's plenty of technical information out there about 3D TVs, but I've found that the numbers don't always explain what it's like to actually live with a 3D set. Here are a few observations that might help you as you consider your own options.

The available material really is quite scarce. Yes, an increasing number of films over recent years have been shot in 3D, but the total number available is still pretty puny. Not only do 3D releases often lag the "flat screen" version, in several high profile cases the 3D versions have been locked up by manufacturers of specific sets. For example, you can't get the 3D version of Avatar -- probably the movie most associated with modern 3D -- unless you buy a Panasonic TV, and that isn't likely to change for a year or more. You'll also find that just because a 3D version is available doesn't mean your local stores are going to carry it. Even stores like CostCo or Best Buy that push 3D sets very rarely order the 3D version of new movies. Expect to do a lot of ordering over the Internet.

Much of the material available is either documentaries or animated films. If you don't want to see undersea creatures and you have no interest in animated meatballs, mad scientists or superheroes, your choices right now are really slim. Fortunately, I like all these things.

DirectTV has three channels of 24 hr 3D, but...That doesn't mean a whole lot. One of those channels is ESPN 3D, which at the moment either spends a lot of time showing its 3D logo or replaying a very small set of sporting events. The other two channels -- one a product of DirecTV and Panasonic (103) and the other a mixup of Discover and IMAX (107) have shows on all the time, but the replay level is ludicrous. Each has about half a dozen shows a day that get repeated endlessly, then a different mix tomorrow, then by the third day you'll be back to most of the shows on day one. Neither appears to have more than 20-30 hours of content in total. 107 features mostly IMAX documentaries, which are sharp and well done. The 3D effect on these is often spectacular, the narration top rate, and the production values very high, but you usually get no more than 2-3 such shows a day. Even the 3D commercials are repeated at every break. 103 has a bit more variety, but that's not necessarily good. Some of the 103 documentaries have very iffy production values, and someone at DirecTV apparently thought it would be a good idea to spend hours each day on a 3D cooking show and 3D visits with musicians in their studios. It's not that I want 3D wasted on silly "throw the dart at the audience" effects, but 3D cooking shows may be the only thing worse than 2D cooking shows. Also, if you're not using a Panasonic set, 103 is frequently problematic. DirectTV appears to be using some kind of DRM that queries your set for information about its capabilities. I frequently get blank screens on this channel with warnings that my set doesn't support 3D at this resolution. Sometimes it will even happen in the middle of a show, with DirecTV warning me that my set doesn't support the program that I was just watching. Calls to DirecTV have made it clear that they will not support other brands of 3D, so beware. Oh, and 3D on 103 shows far more ghosting than on 107. More on that later.

Boo! There is ghosting on 3D sets. It's later. If you're old enough to remember getting your TV off rabbit ears, you may recall how sometimes you got a secondary image kind of shadowing everything on screen. Well, welcome back to that world. Active 3D sets use glasses with LCD shutters that open and close in synch with changes in the on screen image. However, failure of the LCDs to become completely opaque and slight synching differences with the et mean that there's almost always some spill over, with the right eye able to see a faint copy of the image meant for the left and vice versa. The visibility of this effect varies widely. Some whole movies seem to have no issue at all. Others have problems with particular scenes. The effect seems worst with dark images on a white background. It also seems to affect different sets in slightly different ways, enough that some scenes are notorious for causing the issue with different brands. On DirecTV, 103 frequently has absolutely horrid ghosting, enough that you might as well take the glasses off. This is true for both my Vizio and a friend's Samsung. From what I've watched, 107 is leagues better.

Not all Blu-ray players support 3D. In general, watching 3D on your set means watching the 3D Blu-ray, so if you're in the market for a player, make sure that it supports 3D. If you own a PS3, you're in luck. 3D plays just dandy from the PS3.

In general, I like the 3D effect. When it works well (on say, Despicable Me or the IMAX tour of Yellowstone) it really can add (ahem) another dimension to what you're watching. I would definitely not get rid of a new 2D set just to add this option, especially with the level of material currently available. You're better off waiting a year or two to see if new new passive 3D sets with their cheaper glasses win the battle, or whether 3D survives at all. However, if you are shopping for a new set right now, consider looking at a 3D model. Just consider it an option on your 2D set, one that you may not use much, but which can be fun.

Discuss

Tue Feb 22, 2011 at 09:19 AM PST

Writ Small

by Mark Sumner

As someone who writes incessantly, and who has sometimes been dependent on that writing to put bread on the table (in thin, cheap slices) I've always been interested in writing tools that didn't leave me chained to the desk.

I wrote a whole book on a Palm Pilot 1000, graffiti-ing out the chapters one character at a time with my gray plastic stylus.  That may sound like torture to those who are used to whipping through text at high speed, but while I’m a rapid if unconventional typist (in these post-secretary days, my 80+ WPM always gets me selected to transcribe meeting notes), I'm not an 80 WPM thinker. Scribbling text through a Pilot might be tedious, but it wasn’t really slowing me down when it came to creating fresh text.  

Slightly more practical was the series of 8 books I wrote on an Sharp Tripad (also known as a Vadem Clio) a little Windows-CE based device that was a netbook before netbooks were  cool. In fact, it was a netbook before there was really a net. I never hooked its built-in dial-up modem to anything, but I did connect it with a serial cable and dump chapters back to my PC every time the tiny working memory filled up.  

All this may sound like a lot of effort to use something less than optimum, but it did allow me to hike into a state park, walk up into the hills, and dash off a chapter or two while dangling my feet over a waterfall. That was pretty cool.

Not every experiment in portable composition went well. I never managed to get a decent paragraph written on an Atari Portfolio, and when I came across the first Blackberry I was excited, then doggedly determined, then defeated as I surrendered the idea of doing lengthy texts.  (If the thought of doing more text on a 128K Palm Pilot’s scribbly screen seems much harder than typing to the equivalent length on a Blackberry’s admittedly well-designed keyboard, all I can suggest is that you try it.)

With all this background, I suppose it’s no wonder that these days I have an iPad.  And I love the damn thing.

However, the Notepad application that comes on the iPad is worthless for anything beyond a grocery list (and not too good for that), so you’ll be wanting to replace that sad little yellow pad with something more serious.  After running through literally dozens of free and no-so-free apps on Apple’s app store, I’ve come down to a pair that handle nearly all of my writing needs.

iA Writer – Information Architects --  $0.99
This is a prime example of an application that’s not cheap, it’s inexpensive. Offering a stripped down environment, but with a beefed-up keyboard that eliminates some of the standard iPad’s irritations (quote marks, parens, and word by word navigation at a tap!)  this app is the best “stay the heck out my way, I’m making WORDS” app on the iPad.  It’s clean, the options that it offers are simple but useful, and you can genuinely crank when seated in the backseat of a car or on a bench at the mall.  Some of the options available move the program from simple & clean to masochistic carving of words on slate with dull knife. Fortunately, you can turn these off.  

Notebooks -- Alfons Schmid -- $8.99
How weird is it that we now think of nine bucks as a lot to spend on a piece of software? In any case, this is nine well-spent bucks if you write text at length and need to organize what you write. Notebooks has a folder-like ability to slip notes into volumes. It also has a simplified project management interface and a way to incorporate images.  While I may use iA Writer to pound out an essay, Notebooks is king when it comes to putting together chapters, notes, updates, interviews, and all the pieces that it takes to make a book. The first draft of my last book all came to ‘life’ in Notebooks before it slipped off to PC-land.  Oh, and the author has been so open to suggestions for updates and changes, that I think of him as my buddy Alfons.

I’ve tested dozens of other note-taking / writing apps. Some of them are extremely interesting and visually striking (like BRID’s Awesome Note) though they don't lend themselves to making lengthy texts, others are… eh, so so.  And of course there’s Apple’s IPad version of Pages, which I suppose is great if you needed to lay out a newsletter, but isn’t quite the tool I need for the word-making business.

I’m sure my heart will eventually be won by others apps and other gadgets, but for now this is the combo that allows me to do my job without needing to be at my desk.

Discuss
You can add a private note to this diary when hotlisting it:
Are you sure you want to remove this diary from your hotlist?
Are you sure you want to remove your recommendation? You can only recommend a diary once, so you will not be able to re-recommend it afterwards.

RSS

Subscribe or Donate to support Daily Kos.

Click here for the mobile view of the site