Daily Regex: Google Analytics Tracking IDs

This won’t be a daily thing. But I just put together a quick Google Analytics Tracking ID for one of the apps I’m putting together. You know, to make sure you enter the correct one. It’s super easy.


function isGoogleAnalyticsTrackingId(id) {
var pattern = /^UA-\d{2,}-\d{1,2}$/;
return pattern.test(id);
};

Now, I’m sure you, astute readers, will be able to pick apart any errors in this. So, have at it!

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.

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.

So guess what I did this week!

It’s part of an iPad app for people in the pharmaceutical industry. You see, when you drag the little slider thing from Partial to Full, the image, which starts off at slightly healthy skin, gradually fades into horrible bloody flesh wound. It’s pretty rad stuff. Until I forget that the real life images are still on the computer screen when I come back to eat my lunch.

Me and bgStretcher.js

Hey. Today I figured out a problem I was having with one site. Just had to hack a JavaScript file to allow more parameters. Once that was done I was golden.

Funny how the easiest thing to do was the last option I explored.

I should go into more detail. But I think I will in the morning. It’s midnight.

Sometimes I wonder how good of a web developer I really am

Here’s the thing: I get things done. You say you need this or that, and nine times out of ten it’s done. Four times out of five it’s in a timely manner.  But when I go back and look at the code that I wrote, I can’t help but scratch my head and wonder what possessed me to write everything so haphazardly. I’m finally getting deeply into Linux, so far as I can set up a website without the use of a control panel like cPanel or Plesk. But I’m sure once more advanced things happen, the scripts and config files will end up looking just as jumbled as everything else I write.

So, at the place where I sit in an office and work, I’m trying to handle mass email things. You wouldn’t believe the amount of people who don’t like being emailed without their explicit consent, right? So I’d been doing this thing, manually supporting a team in this regard.  But there’s just so many people I have to give the boot!

So I finally got the bright idea, instead of staring at all these emails and going through them, to just separate the good from the bad, and then run the bad through a PHP script that gives me their unsubscribe link. And if cannot find one, I am given the entire email so I can use other means to take care of the removal.

I’m more of a jQuery guy than a Javascript guy. Go figure. I find that it’s easier to use as a front-end developer, like a Javascript Lite (tastes great, less filling). I love when I can type less, and jQuery lets me type less. When I need real Javascript I can pull it out, but I’m not as versed in that area.

I actually get excited when I do things I haven’t done before. Like, I have mouse gestures set up to help me scroll to the top or bottom of a page. When I set it to check a box because I click on a link, the convenience I just created astounds me.  And then when it turns out I have to click the box around the checkbox instead of the checkbox itself, I get frustrated to no end.

Ah, the glorious life of a guy who makes websites when they have an unrelated job.