The Times They Are a-Changin’

Drivel No Comments »

I have been with my current employer, http://www.clickgroupinc.com, for three and a half years now. I have enjoyed working with them through the good times (when we had the ability to fly our clients out to Maui for a traffic summit) and the bad (when Yahoo! shut down the Search Submit Pro product). I have had a great experience there and have grown both personally and professionally while in their employ. They have a great team and they know how to get it done when it comes to SEO and SEM.

However, I have decided to open a new chapter in my career book by joining the talented team at http://gdgt.com. I begin working there on September 1st as a core engineer. I have already had the chance to peek at some of their grand plans, and I’m really excited for what the future holds. The core technologies are similar to Click Group, but as complex and fun as it was to build the myriad internal tools for account management, I’m glad to be able to move back to a customer facing website. It allows me to flex some programming muscles that have gone underused over the past few years. gdgt’s team is passionate and driven, and I can’t wait to join them in their efforts.

Oh, and gdgt is still hiring engineers and more! Check out the current job postings at: http://gdgt.com/jobs.

Third Party Headsets and iPhone 4 (UPDATED)

Drivel 1 Comment »

When I had a long commute from Livermore to San Francisco, I purchased a pair of Bose QC3 headphones to help block the screeching sound of the BART train and make the ride more enjoyable. Turns out, the QC3, if expensive, are extremely comfortable headphones to wear over a long period of time. I have made these headphones my primary headphones any time I’m using my iPhone. This leads to a problem — it doesn’t have a microphone built in for the phone. I therefore have purchased the headset adapter for them, which, ala the Apple earbuds, adds a microphone on to the cord leading to the headset. This worked fine with my iPhone 3G. I have now purchased an iPhone 4, but the microphone doesn’t work with it. <sadface />

What follows is an email I wrote to Bose for some advice/response:

I have the headset adapter for the Bose QC3 headphones. It worked fine on the iPhone 3G that I had, but now that I have upgraded to the iPhone 4, the microphone does not work. It has a static clicking sound every second which makes it unusable. However, the Apple supplied earbuds work fine. I suspect that the interference on the microphone line is due to the user controls provided on the ear buds for volume up/down and play/pause, which the Bose headset does not support.

It seems that this problem is not limited to the Bose headsets — it seems that many non-Apple brand three lead headsets have the same issue. See the thread on the Apple discussion boards here: http://discussions.apple.com/thread.jspa?threadID=2480660&tstart=0

I’m emailing for a couple of things:

- I wanted to make sure that Bose was aware of the issue. Some acknowledgment of this problem on your website would be nice. A word that you are aware of the problem and working for a solution.

- It would be nice for Bose to investigate this issue and possibly provide a free adapter that filters these pulses and enables the same functionality that we had before.

- Even better, and my preferred option, would be to upgrade the headset adapter to support the volume up/down and play/pause button so the headset can take full advantage of the features provided by the iPhone.

Thanks for your time.

UPDATE: I received a response from Bose today. Their response follows:

Thank you for your inquiry.

We are very sorry to hear about the issue you are experiencing with your Bose® QuietComfort® 3 mobile communication kit and the Apple iPhone 4. We have not heard from customers who are experiencing compatibility issues with these two products, so we asked our Engineering department to test this. While we were not able to duplicate your symptoms exactly, we discovered a variation of the symptom. At this time, it is unknown what causes these symptoms to occur, but our Engineering department will need evaluate this further. As you have noted, there is some discussion regarding this with other model headsets –and the common factor here is the iPhone 4. Apple may also be aware of the issue if other headsets have this issue. You may want to contact them to see if they have any solutions being worked on.

It is unlikely that we will be unable to work around this symptom. If it is determined that the mobile communications kit is not compatible with the iPhone 4, then we will update our website accordingly. If or when there is any update in the future that will prevent these symptoms, we will keep your e-mail on file and contact you if there is a resolution. We are sorry we could not provide a solution at this time.

While not exactly what I was hoping for, they appear to be continuing to look in to it, which is a good sign. I’m sure either Apple or Bose will be able to figure out the problem.

It’s Not Magic (Anymore)

Drivel No Comments »

I wholeheartedly agree with John Biggs’ blog post regarding Apple’s use of “magical” as a way of describing their products. The iPad isn’t magic. It’s a big iPhone. There is no brand new technology in the iPad that we haven’t seen before. Of course, according to Clarke’s three laws of prediction:

Any sufficiently advanced technology is indistinguishable from magic.

Just because an advanced technology is indistinguishable from magic doesn’t make it equal to magic. You may not be able to tell the difference, but underneath the facade is an explainable, repeatable process. We’ve all seen card tricks and slight-of-hand tricks performed by magicians. There is a reason that magicians don’t show how their tricks are performed; they lose their magic. In fact once a magician’s secrets have been revealed, the end result usually turns out to be mechanical in nature. This planet has had the benefit of the iPhone for almost 3 years now; all of the media coverage, both in the technical and mainstream environments, have stripped the iPhone of any semblance of its magical qualities.

The iPad is no different; this is the same “sufficiently advanced technology” that powers the iPhone. Yes, it is a form factor that may change the landscape of personal computing. As the software matures and utilizes the iPad to its fullest extent, we (hopefully) gain the benefit of increased productivity. However, it’s still the same hardware in the same form factor. We know how it works; the illusion is broken. It’s not magic anymore.

Now, if you can turn the iPad into a flying carpet, that would be magical (at least until those secrets were revealed.)

iPhone and Diabetes

Diabetes, Geek 7 Comments »

The iPhone is an amazing phone. Love it or hate it, you need to acknowledge that it was the first phone that was a game changer in the field of smart phones. Windows Mobile phones, while extremely functional and capable, didn’t have the ease of use to make it a viable choice over a simple feature phone to non tech-savvy people. The iPhone increased the speed of smartphone adoption and revitalized the mobile platform as a whole.

In spite of that, I was a late adopter of the iPhone, waiting until after the iPhone 3G but before the 3.0 OS was out for my purchase. With the promise of copy and paste as well as push notifications being thrown around with the upcoming update, I made the plunge in February of 2009, slightly before the iPhone 3.0 OS was announced.  On March 17th, 2009, the official announcement was made. This did include the aforementioned copy and paste and push notifications as well as landscape mode and MMS as well as some rich new APIs for developers to use.

At that announcement, Apple invited Lifescan to demonstrate an application that integrated the iPhone with a glucometer. A glucometer (glucose meter) is a device that, with a small sample of blood, can determine the amount of glucose in your blood stream. These meters are the speedometer of the diabetic, allowing the user to make informed decisions about their dietary intake, insulin usage as well as keep track of overall sugar control. There is no cure for diabetes; diabetics must manage their blood sugar levels on their own, and the only reliable way to gauge glucose levels is to measure them with a glucometer.

As a diabetic and a technology fan, I was overjoyed. Managing diabetes is a time consuming task. I welcome and encourage any tool that can be utilized to ease keeping track of glucose levels. Yet, here we are, over a year later, and the entire system promised in the 3.0 OS announcement is vaporware. Sure. there is other software that I’ve tried, both for the iPhone (such as Glucose Buddy and bant), and even some meters, with serial cables, can connect to proprietary software and transfer your data to your computer for further analysis. These work, but they are all designed to work best within their own framework. Though Glucose Buddy is able to export your data in a CSV format to you via email, it’s certainly not ideal for running an automated system.

What I’m looking for is a simple way to log my blood sugars into a database where I can then process the data however I want.  Perhaps I am an edge case, since, as a web developer, I know how to harness and process data. However, I am astonished that none of the diabetes applications have taken that step to allow full data usage. It’s my health data! I want to use it in a way that’s meaningful to me, not in the way that your application prescribes. Most of the applications that I’ve seen are bloated; they include carb counting, interfacing with twitter, a forum, or some other social network. I don’t want that. I need a place to enter a glucose reading, the time, a time slot (such as breakfast, lunch, dinner) and a free text area for notes. That’s it! The application should take minimal time to load and allow me to enter the data fast and move on with my life. When I’m ready, I should be able to upload the data to a server where I can then organize, graph, annotate and review my data further.

I have thought of writing my own application to do all of this processing. However, I have concerns about storing personally identifiable medical information in accordance with HIPAA regulations. I would like to research how these regulations would apply to an application for simple blood glucose management. In this litigious society, I’d rather not take a chance to be sued. If anybody has some good links that covers these issues, it would be appreciated if you could leave them in the comments.

Apple and Lifescan have demonstrated the future of blood glucose management. The technology exists to make this all happen. They have dangled it in front of me, showing how easy they could make diabetes management. Others have tried to fill the gap, but fall short with bloated applications that do little to enable data portability. I want simple. I want easy. I want to control my diabetes, rather than having my diabetes (and the technology that I use to monitor it) control me.

Creating a self-signed (wildcard) SSL certificate

Geek 5 Comments »

I’ve done my own self signed certificates before, but since I do this so infrequently, it is not something that I tend to keep in my brain long. (That’s what Google is for, right?!?)  So when I went to find out how to do this again, I found the most concise information on how to create a self-signed wildcard SSL certificate than any of my previous endeavors to cobble this information together.

Creating the self-signed wildcard SSL certificate

Courtesy of Justin Samuel, here it is:
mkdir /usr/share/ssl/certs/hostname.domain.com
cd /usr/share/ssl/certs/hostname.domain.com
(umask 077 && touch host.key host.cert host.info host.pem)
openssl genrsa 2048 > host.key
openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert
...[enter *.domain.com for the Common Name]...
openssl x509 -noout -fingerprint -text < host.cert > host.info
cat host.cert host.key > host.pem
chmod 400 host.key host.pem

Obviously, you can 1) create this directory wherever you want and 2) should probably substitute the word “host” for whatever your hostname is to decrease confusion.

What now?

All that remains is to tell apache (or whatever needs to use the certificate) about it.  Here’s my code to get it installed on apache:
SSLEngine on
SSLCertificateFile /path/to/host.cert
SSLCertificateKeyFile /path/to/host.key
SSLProtocol all
SSLCipherSuite HIGH:MEDIUM

What about my NameVirtualHost?

Aye, there’s the rub.  Due to the nature of the SSL layer in HTTPS, negotiating a secure connection happens before the HTTP protocol is initiated. That means that at the time the SSL layer is in play, the “Host” header has not been sent and, therefore, apache cannot determine which NameVirtualHost to use.

But, frankly, if you’re self-signing your certificates, the browser is going to throw a warning anyway. Might as well just make it as generic as possible and then all traffic running on through the HTTPS port will share the same certificate.

Wolfram|Humor

Drivel No Comments »

So, if you haven’t heard of Wolfram|Alpha, I urge you to check it out. It’s certainly something new in the internet world that deserves attention.

Wolfram Research built the Wolfram|Alpha search engine. Yes, these are the same people that brought you Mathematica. Therefore, it doesn’t come as a surprise that when I ask Wolfram|Alpha about the airspeed velocity of an unladen swallow, I received the following result:

Frankly, I can’t tell if I like the answer, or if the Wolfram Research people need to get a better sense of humor.

Then again, I suppose they’re mathematicians, so they were born without humor.  I guess this is the best they can do.

Either way, check out Wolfram|Alpha.  Let me know if you find anything interesting!

Why I use Smarty: PHP is an ugly templating language

Geek, PHP Development 14 Comments »

There’s a debate going on here regarding Smarty‘s usefulness as a developer tool. It was sparked (again) by the launch (or at least newly noticed) nosmarty.net. I commented:

I don’t understand how ZF or Symfony or any framework can be an “alternative” for Smarty. Smarty is not a framework — it is simply a templating engine. It should not be used as anything other than a component of the view layer of your MVC application. Just like any other software, it has a learning curve and a certain amount of quirks. Using Smarty does not guarantee good design — that still needs to be handled by programmers who have more experience than writing a “Hello, World!” program and reading a tutorial.

I think the fact that it’s been around since 2001 and is still in use is a testament to it’s usefulness within the community. If Smarty is used in the right manner, I don’t see why it can’t have it’s place within the arsenal of tools for developers to use.

It was countered by Paul M. Jones with:

In my opinion (note the small “o”) there *is* no right manner in which to use Smarty. It is the solution to a mis-stated problem. I suppose I shall have to expound on that at greater length in another blog post. Oh, I already have! http://paul-m-jones.com/?p=273

I understand this point, however I still have one reason to use Smarty: PHP is an ugly templating language. I’ve used Smarty and Symfony (which relies on PHP’s alternative syntax for templating) and I still prefer Smarty.

The examples on nosmarty.net generally site one instance of echoing a variable. In this small case, sure, I can see — why use a heavier templating system that takes longer to parse and can be a bitch to configure and deal with. However, if you’re looking at a portion of a html page that has to output multiple variables, Smarty is much easier on the eyes.

SMARTY:
<td>Name</td><td>{$name}</td>
<td>Email</td><td>{$email}</td>
<td>Phone</td><td>{$phone}</td>

PHP:
<td>Name</td><td><?php echo $name; ?></td>
<td>Email</td><td><?php echo $email; ?></td>
<td>Phone</td><td><?php echo $phone; ?></td>

When you start repeating <?php … ?> everywhere it gets fairly redundant, and, frankly, ugly.

Perhaps my use case for Smarty is a bit selfish, but, ultimately, programming style and comfort boils down to personal preference. Most, if not all, programming tools have the ability to be misused. I still consider Smarty to be a useful tool in my development arsenal. Though I have not used smarty in over 2 years now, using strictly PHP templating (mainly due to Symfony’s templating conventions), I would happily start using it again to regain readable templates.

De-annoyifying Subversion Externals

Geek, PHP Development 2 Comments »

Subversion externals are a way to include other packages in your code that are maintained somewhere else.  For example, if I was developing an application that needed to send out mail, I could use SwiftMailer and define that as an external for my project. When I run ”svn up” it will grab files from the SwiftMailer project and copy them locally. (How to define externals is beyond the scope of this post. RTFM!)

One annoying part of externals is that even if there are no changes to your code, your Subversion status output will be filled with externals information. For example, I have included symfony as an external in my project and now the default status output is:

X      lib/symfony

Performing status on external item at 'lib/symfony'
X      lib/symfony/doc
X      lib/symfony/lib/plugins/sfDoctrinePlugin
X      lib/symfony/lib/plugins/sfPropelPlugin
X      lib/symfony/lib/vendor/lime

Performing status on external item at 'lib/symfony/lib/plugins/sfPropelPlugin'
X      lib/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel
X      lib/symfony/lib/plugins/sfPropelPlugin/lib/vendor/phing
X      lib/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator

Performing status on external item at 'lib/symfony/lib/plugins/sfPropelPlugin/lib/vendor/phing'

Performing status on external item at 'lib/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel'

Performing status on external item at 'lib/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator'

Performing status on external item at 'lib/symfony/lib/plugins/sfDoctrinePlugin'
X      lib/symfony/lib/plugins/sfDoctrinePlugin/i18n
X      lib/symfony/lib/plugins/sfDoctrinePlugin/web
X      lib/symfony/lib/plugins/sfDoctrinePlugin/lib/doctrine

Performing status on external item at 'lib/symfony/lib/plugins/sfDoctrinePlugin/i18n'

Performing status on external item at 'lib/symfony/lib/plugins/sfDoctrinePlugin/web'

Performing status on external item at 'lib/symfony/lib/plugins/sfDoctrinePlugin/lib/doctrine'

Performing status on external item at 'lib/symfony/doc'

Performing status on external item at 'lib/symfony/lib/vendor/lime'

This is obviously annoying as it obfuscates the part of the project that I’m working on. The switch command does have an option to ignore externals, aptly called –ignore-externals but I don’t want to have to type that in every time I run a svn st command.

After browsing around the net for a bit, I found this piece of bash script that will swap the defaults for me:

svn() {
        case "$1" in
                st|stat|status)
                        svnargs1=""
                        svnargs2="--ignore-externals"
                        for i in $@; do
                                if [ "--examine-externals" == "$i" ]; then
                                        svnargs2=""
                                else
                                        svnargs1="$svnargs1 $i"
                                fi
                        done
                        command svn $svnargs1 $svnargs2
                        ;;
                *)
                        command svn "$@"
                        ;;
        esac
}

What’s nice about this script is that I can run status on the externals as well by specifying –examine-externals — and they’ll be back, in all their annoying (yet sometimes needed) glory.

On my Mac, I just placed the code in /etc/bashrc and now it’s available as a layer over the svn binary. (You may need to restart your terminal session for it to take effect.)

Birthday… salami?

Drivel 1 Comment »

So Igor brought me a “birthday salami.”  Uhh.. right

huh?

Show your Intolerance

Politics No Comments »

While driving home the other day, I saw a few homes in my neighborhood that proudly advertise “Yes on 8″.  If you don’t know, Proposition 8 is a California initiative to remove the state supreme court upheld right for same sex marriage.

I am not gay, nor do I actively promote the gay and lesbian cause. They can do whatever they want behind closed doors, just the same as I can do whatever I want behind closed doors. Yes, marriage is a sacred union of two people. Why does anyone care whether it’s between a hetero or homosexual couple? What place do I have, personally, or the state as a whole, to deny people that right? To deny the right of two people getting married based on their sexual orientation due to your personal beliefs is quite a departure from the cry of tolerance that this country is striving to achieve.

Proponents of Prop 8 may say that they don’t want homosexual marriages because a marriage is between a man and a woman. Ok, fine. Now, how do we extend the same rights and legal status to a gay or lesbian couple if they can’t get married. Proponents once again chime in: let’s give them separate, but equal civil unions. Right. “Separate, but equal.” …because that worked so well for our country with segregation.

It’s time to cut the crap. Who cares what other people do behind closed doors; it’s not your problem. The United States strives to be a country of equality, of opportunity, and of tolerance. When you advertise your support of Prop 8, you demean this country’s values and spread the support of intolerance.

Join me, and many others, in defeating Prop 8. It would be un-American to do otherwise.


Copyright © 2007-2014 dotEvan. All rights reserved.