Jason Vertucio

You know me! ™

Another reason why I hate Android

Screen Shot 2013-09-16 at 14.20.20

I’m sitting here at work wondering why this Mobile Framework that I’m developing works flawlessly on my iOS Simulator and on my iPhones and iPad, but literally doesn’t even have my stylesheets on Android.

Turns out—ready for this?

Turns out that I stash my framework in a folder called _framework. And you’ll never guess which folder of files wasn’t reading!

Seriously. Everyone goes on and on about how Android is better than the mobile Apple OS.

  1. I hate programming for every splintered version out there (over 30% are still running such an obsolete, two versions ago version of Android)
  2. I hate that I literally wasted three hours trying to figure out that when I renamed _framework to framework everything worked fine! IT DIDN’T WORK BECAUSE OF A STUPID UNDERSCORE. AND NOW IT WORKS.
  3. Actually, that’s a lie. Because now I’m getting errors with DOM elements not being found, even though there they are in my Chrome Desktop environment, and also on all the iOS devices!!!!!!!

/rant

iOS, I love you. I love you because you take the time to be as stable as possible. You run on, at most, six different devices.  And people don’t say of you, “Just don’t upgrade the OS.” And I love you because when I program something for you, I don’t have to worry about you not working.

For all interested, once I’ve had a successful deployment of this MOB Framework, I will release it. Maybe you’ll try it out. Maybe you’ll love it.

Mobile Web Apps, making the keyboard disappear

code
So, just for fun, I decided to make a little mobile web app to change from Fahrenheit to Celsius (of vice versa in case you needed that instead). But there were two problems with it.

(a) if I hit BACKSPACE, it wouldn’t update the converted temperature
(b) couldn’t get the keyboard to disappear
(c) oops, also had a problem with disappearing zeroes at the end of the number.

Well, (c) was easy. My RegEx was wrong. (a) was also pretty easy, once I found out about the new html5 input event (keypress was not reading BACKSPACES on my iPhone). But (b). Oh, that nasty (b)!

Stack Overflow had this same question, and a user linked to this blog and the long and short of it is

  1. var hideKeyboard = function(ev) {
  2.   // Don't actually hide the keyboard if we are on the INPUT
  3.   if ( ev.target.tagName === 'INPUT' ) return;
  4.  
  5.   document.activeElement.blur();
  6. }

Now this would be fine and dandy except where do you call the function?! I quickly determined that in my app, which is just a single-page thing, I could safely put the listener on the window itself.

  1. window.addEventListener('touchstart',hideKeyboard);

This code will only remove the keyboard when the active element is an INPUT. For some reason it doesn’t work on textareas. But the solution is to blur all inputs at the same time. I’m not doing it because my amp is simple enough to skip that step.

This bit of code was an immense help to me, and I hope it ends up being an immense help to you, as well!

I made a 3D bar graph using just HTML and CSS


(tap on the graph to reset the animation)

I’m all proud of myself for making this. It’s actually for work, where I build specialised digital presentations for iPads, so this really only works on browsers like Safari and Chrome. I also threw together some Firefox support, but this only works in the latest and coolest of browsers, so if you have, like, Firefox 4 or almost any version of Internet Explorer, this won’t work.

I had some help. This article at Codrops gave me the initial idea. But, like other “3D CSS Bar Graph” articles I found, all of them create the illusion of 3D by creating triangular borders around the bars.

That is not my desired goal as it’s not built in a 3D space, so I cannot rotate around the view. So, I made my own. Continue reading “I made a 3D bar graph using just HTML and CSS” »

What’s the best environment for developing websites?

I used to use Dreamweaver. Made it up to CS5.5 thanks to various jobs and stuff. At my current job they have Dreamweaver CS5.5, but lately I’ve been using my Mac for other projects, like at home and stuff.  I use Coda, because it has built-in FTP and it’s easy to use. I wish I could install it on my computer at work, but they seem to not allow installing software.

And, well, that’s for the best.

Anyway, inspired by this post on LinkedIn, I decided to ask you, the readers to this little blog, what your opinion is on the matter. I actually set up a poll on the right to answer. So, I’ll just sit back and await the responses.

If you answer OTHER, please add a comment below or write me on Twitter (@jayv and follow me coz I recently went private). I’ll add the option and let you know so you can change your vote. The plug-in I use (UPM)  doesn’t allow one to add poll answers.