What You Can Do with Web Apps in HTML5: A Response

Share this:  

Hello all, I felt the need to respond to a discussion that was had on Web Apps and HTML5 on the tech show “The Gillmor Gang”… the “Pinch and Spread” episode. What was said was interesting but it seemed to be that the gang was coming to conclusions based on too limited a view of what HTML  5 was capable of. The embedded video I hope explains it all more fully. Hopefully you can pardon my excessive use of vocal pauses (umm), and you will still get a good grounding of the potential that HTML 5 has and what it can to do for the mobile space.

Link to discussion on programmatically determining if the browser is running on a regular iPad or an iPad Mini:   Detecting iPad Mini in HTML5
How to Detect iPad Mini Using Javascript
Note regarding the two links above: After looking into this deeper it seems that the difference in the values for availableWidth and availableHeight are due to the different tab counts when testing this code. So this is probably not very useful after all. 🙁

Amazon link to book:   Building iPhone Apps with HTML, CSS, and JavaScript by Jonathan Stark. Note that I bought this also as an eBook on Apple’s iBooks and some of the page formatting in the reader there is really screwed up.

Related Chomer.com Posts:
Programmatically Determining if in Full Screen Mode in Mobile Safari

Initial Thoughts on My Makerbot Replicator 2x

Share this:  

Today I finally received my new Makerbot Replicator 2x 3D printer. I also received another box containing two spools of plastic filament (one ABS and one PLA) that I had ordered extra. I am supposed to receive another package that contains the acrylic top cover… I have not received that one yet. I carefully opened the box for the printer and setup it up. Here are a few points I want to make:

  • A sheet of paper packed at the top of the box did mention that I might get the plastic cover shipped to me at another time (depending on the shipper).
  • White plastic tie-downs where being used to hold the double extruder print head in place during shipping. What was cool was they were wrapped around red blocks of plastic that were obviously printed on a 3D printer!
  • There was supposed to be a plastic spacer between the two gantry bars to kind of hold things steady during shipping. My printer did not have this. In other words it was missing.
  • As expected, the printer came with an SD card which was already plugged into the printer’s SD card slot.
  • The printer came with 2 spools of ABS plastic filament. It was not clear when I bought the printer that it would be included (which is why I had bought 2 spools separately).
  • It took a bit of jiggering to get the print platform aligned.
  • I decided to print the comb model (one of the models that came on the SD card).
  • I had a bear of a time getting something to print… Turns out you really need to put this film on the printing platform called Kapton Tape. This stuff, at least the stuff that came with the printer looks more like overhead projector transparencies than tape! Interestingly enough the user manual mentions nothing about this in the setup section of the book. And this stuff did not come pre-installed in my printer! After I put this stuff in I started to get somewhere.
  • You want to make sure that before you print that you remove any plastic goop off of the extruders (even if it is the other extruder that you are not using)! That goop may knock over what you are printing as the print head moves around!
  • I finally was able to print a “comb.” It came out a bit warped so I don’t think it would do a good job of combing your hair! This warping problem may be due to platform not being heated warm enough. The acrylic cover has a lot to do with keeping the heat stable in the printing area so we’ll see how that helps the print quality once I get it.
  • I can adjust the temperature of the print platform (make it higher), and perhaps I should adjust the height of the platform so it is slightly closer to the print head’s extruders. We will see.
  • BTW, I printed the comb in PLA which should be less fussy. I am still working out the tweaks.

Some final notes: some parts of the user manual are very clear, some need some help (there are two sections one after the other on loading filament… it gets confusing what is happening here). This mainly is during just the printer setup section.

I am looking forward to becoming a Makerbot expert! Until later…

Programmatically Determining if in Full Screen Mode in Mobile Safari

Share this:  

Building a site that you want to be a web app on an iPhone, iPad, or iPod Touch?

Full Screen Detection:

Consider this meta tag:

<meta name="apple-mobile-web-app-capable" content="yes" />

If you add this to your Mobile Safari web page your page will open in full screen mode…  IF you added your page as a shortcut to your Home screen and IF you launched it from that shortcut! Otherwise if you open the page from the standard mobile Safari icon it will not be in full screen!

You might have seen how some sites have a popup balloon that points to the    button with a message on how to add to the Home screen. The popup only shows up when your not in full screen mode. How do they do this?

Mobile Safari has the following property:

window.navigator.standalone

If this property is true, we are in full screen. False, we are not in full screen!

Consider adding to your JavaScript function called by the page’s onload event something like the following:

if ("standalone" in window.navigator && !window.navigator.standalone) {   
   // code here to create a div displaying our help balloon and positioning it
   // properly on the screen.
} // end if 

Recommended Post:

Do you want to look into this subject in more detail? Ben Nadel has written an excellent post on his blog: Detecting iPhone’s App Mode (Full Screen Mode) For Web Applications.

A JavaScript Library:

Looking for  a JavaScript library that you can add to your project to do the work for you? Matteo Spinelli on his site cubiq.org has created one for you. Go to his Add to Home Screen page to find out all the details. He’s even got a QR barcode that you can use with your iPhone to test it out!

If you go to the test page on your iPhone in Mobile Safari it will do this little balloon animation on the screen where it slides from the top down so    that it ends up pointing at the  button (see screen shot below):

The JS Library is downloadable for free but Matteo will take donations via PayPal or Flattr.

Code. I have to say I downloaded the library and looked at the code. Matteo put a lot of effort into this thing. it supports multiple languages and does all sorts of fancy stuff! Enough said.

Is 2013 the Year of the 3D Printer?

Share this:  

Replicator 2 3D printer with plastic tractor printed on it

3D printers have been around for a little while. Instead of printing ink or toner on paper like a 2D printer, these devices print 3D objects by taking a computer file that describes a 3D object and print them by building them one thin layer at a time. Many printers print objects in plastic. But some even print in metals!

These printers used to be relegated to the use of R&D departments of companies who could afford $50,000 or more devices as large as a big refrigerator. Recently though, some small companies have been coming out with desktop 3D printers that are affordable to normal people. My first exposure to these kinds of printers (or any 3D printers at all) came from Make Magazine. They had an article about the Cupcake 3D printer kit from a company called MakerBot. Very cool stuff!

Me and a buddy of mine went to like the next MakerFaire in San Mateo and there were quite a few 3D printers around busily printing different objects. There were lots of people crowded around these things. I could see why! It was mesmerizing to see a device like this making an object from scratch.

Well my attention was brought back to 3D Printers with product announcements being made at CES this year. And folks, I broke down and bought a 3D printer! The Makerbot Replicator 2X! Let me say I ordered it. I do not have it yet. There is like an 8 week delay. I am looking forward to getting it though! I know, duh right? Oh, and this printer comes assembled. I don’t have to build a kit. Which for me is great! We’re planning on having a 3D printer party at my house a while after it arrives. We’ll see if that happens! 🙂

MakerBot is not the only one coming out with desktop 3D printers that people can afford. It should be very interesting what happens in this space!

And yes you can do more with this thing than just print out busts of Yoda and statues of owls! I’ve even seen such things as working shower heads! To get an idea of things one can print on a 3D printer check out Thingiverse!

Getting Back in Practice

Share this:  

It has been a very long time since I have posted anything to my blog. This is due to a number of reasons:

  • Work. There have been some grueling schedules to meet. And since this work involves web development even when I do have time for my blog there is a good chance I may be really sick of sitting in front of a computer typing stuff in!
  • Just changes what I am working on… some due to discouragement. I was doing a lot of work learning how to do iOS programming and I was writing posts on the subject. You should see how many unfinished draft posts I have on iOS programming!
  • Issues I have with WordPress. As much as WordPress is a powerful way to blog. Sometimes getting anything beyond a really simple post to display like I want it to is possible but is really a pain. And, again, I just don’t want to deal!

Somehow, I am not sure how, I’ve been beginning to think about my blog again. What should I do with it? At very least I should post to it to practice and improve my writing. Writing I have found can be a great catharsis. Somehow I forget these things! Writing a how-to is a bit different than just writing as an expression. It is harder. It takes more planning. But my mind is always going. There is always something to say.

Just getting started on this post was hard. Like, what’s the point? But once I had a few words typed in everything was ok. And here we are!

I just want to wish anyone reading this a Happy New Year!

Doing Math in Objective C

Share this:  


One thing you will find you need to do in any programming language is do math. Here are some useful math functions for the Objective C language. I give a little bit of a comparison to Visual Basic for those who know that language. They are provided in no special order:

  • fabs() – Gets the absolute value of the value in parentheses. Works like ABS() function in Visual Basic. fabs(-123) = 123, fabs(34) = 34.
  • ceil() – Find the ceiling integer. Kind of like rounding up. Same as INT(x+1) in Visual Basic.  ceil(3.1) = 4.
  • floor() – Find the floor integer. Kind of like rounding down. Same as INT(x) in Visual Basic. floor(3.6) = 3.
  • exp() – Find the exponential value.
  • pow() – Raise a number to the power. pow(3,6) = 3^6 in Visual Basic.
  • rand() – Generate a pseudo random number. Function is RND(x) in Visual Basic. A good discussion on random numbers in Objective C can be found here.
  • srandom() – Generate a seed for the random number generator. This is done with the Randomize statement in Visual Basic.
  • sqrt() – Find out the square root of a number. sqrt(x) = x^(1/2) in Visual Basic.

Book Review: RibbonX – Customizing the Office 2007 Ribbon

Share this:  

My Book Rating: 5 of 5 stars:

Power Users and Developers: Making customized Apps Using Microsoft Office
Those of us who have the responsibility of producing customized Excel workbooks, and Word documents that essentially have become small powerful applications in their own right are always looking for ways to make the tools we build in these Microsoft Office products more powerful, easy to use, and more like actual stand-alone apps. One of the ways I looked at enhancing the “tools” I created was by adding a tool bar to an Excel workbook for example. I first did this myself in Excel 2003. It was tedious but doable. One draw-back in the way tool bars were done back then is that the changes applied to the whole app (Excel or Word), and one screw-up on your part could truly clobber Excel or Word’s tool bars and menus system wide.

A New Way of Doing Tool Bars in Office 2007
In Office 2007, Microsoft changed how their user interface worked. And they changed the scope of the changes. If you were going to screw something up for your tool bars now it would only be with one document file, not the entire system. Customizing this tool bar was more flexible. You could do much more with the new tool bar than the old version (the new tool bar Microsoft calls a ribbon). The Technology behind the ribbon they call RibbonX. Read more

iOS Christmas Concert: Amazing iBand Musicians Play Three Songs

Share this:  

This video is great! A band of talented musicians whose instruments are only iPads and iPhones:

I am amazed at how creatively musicians from North Point Community Church use these devices… picking specific apps for different instruments, and the creativity of the app developers who dreamed them up. Just cool!

The musicians needed to practice a bit more on the middle song, but the first and the last songs were very polished and professional.

Anyways everybody, Merry Christmas!

1 2 3 4 5 11