Latest Posts

  1. So this finally happened…

    After months of trying to find the time after work, I’ve finally managed to get a rebuild, from scratch, of my personal website up.

    One of the biggest changes is that I’ve switched from a project slideshow for my portfolio to project videos. After consideration, I realized that due to the heavy amount of animation and interaction some of my more recent, and memorable, projects have had, still images would fail to convey their functionality properly. At the end of the day, I’m not a designer, I’m a programmer, and it’s that functionality which is the crux of my work.

    May add project stills sometime down the road, but for the moment, I think the videos convey the animation and the responsive nature at their best, and preserve that for future reference, regardless of changes made to the live project.

    I’m further planning tidying up, formalizing, and uploading some of my offline work to GitHub, and adding a Projects section to the site where this work can be browsed more easily.

    Past that, we’ll see.

  2. Lies, lies, and Android’s stock browser

    While working on a responsive site that featured some CSS 3D Transforms, I found that, for some reason, clicking into a text input to type on Android 2.3 and below caused the automatic scroll to the input to exhibit a strange yoyo behavior. It would jump down about 300px too far, jump up a bit, jump down again, up one more time, and park itself a couple of hundred pixels south of the actual input location.

    After a ton of messing around, I realized that it was related to another bug: the stock Android Browser’s incomplete support for CSS 3D Transforms and transitions.

    Despite Modernizr reporting that it’s supported, Android 2.3 and below will in fact fail to properly perform a rotateY transform, instead performing a regular rotate. Additionally, the very presence of an element with 3D transition properties seems to cause the jumpy behavior on input focus.

    Because feature detection yields a false positive, I had to actually detect the version of Android being run via the user agent string, and add a class to the body as needed, so I could target it separately and force the fallback animation I’d written to kick in on Gingerbread, FroYo, and below (to be safe, I also added Honeycomb, since I didn’t have an Android 3 tablet to see if it worked on it).

    var ua = navigator.userAgent.toLowerCase();
    var isOldAndroid = /android [1-3]/i.test( ua );
  3. Facebook, Twitter, and IP Addresses

    Some things I have learned:

    If your server doesn’t have a domain name yet (for example, while working on a production server and website to replace an existing website/server which is currently using the domain name), Twitter and Facebook act weird.

    Twitter’s share button fails outright saying you didn’t pass it a url (even though you did).

    And Facebook fails to load the image thumbnail from its share widget, even if you have all of your OpenGraph tags filled out correctly. Note that it will lint it correctly, and post it correctly, but when you hit share, you won’t see the thumbnail.

    Just felt I should share…

  4. A retrospective

    So I stumbled across a little retort I made a year ago online, and felt, given the proximity to the new year, it was appropriate to put it up (why I neglected to put this up last year is beyond me…):

    In reply to the following article: Microsoft’s Vision For the Future Gives Me Hope For Humanity

    rudez90 said:

    this video is depressing only because i dont think we will actually see this in fruition until a lot later than 2019

    My response:

    Cin said:
    You sir, lack perspective. This is 10 years from now. Do you remember 1999? 1999 was the year the very first BlackBerry debuted, it was a 2 way pager, here’s a picture.

    10 years later, it plays video, surfs the web, has a completely different interface, is in full color, plus much more, and weighs like 1.3 times the first BlackBerry’s weight (We found some old ones where I worked, they were pretty bulky).

    The first iPod wasn’t debuted until 2001, becoming one of the first mp3 players with mass appeal and adoption. Back in 1999, Apple was struggling to stay afloat with their brand new iMac line (the ones that still had all the fruity colors). Now, 10 years later, Apple has expanded in all directions, dominated the digital music distribution market, and has released a handheld which has far-reaching implications for mobile computing.

    1999 to 2009 is the difference between Windows 98 and Windows 7. It is the difference between Linux being primarily used by hobbyists and programmers, to being used in more and more consumer applications and even being sold at retail on desktops and notebooks.

    Wikipedia was not founded until 2001, and in 1999, Google had only existed for a year, and was finally moving out of a garage in Menlo Park, California to an office in Palo Alto. As recently as May of 2002, there were only 26 million internet subscribers with broadband in the US (there were far less in 1999). Today that number is approaching 70 million [Note: It is currently over 75 million, fyi].

    When you consider the fact that technology has an exponential growth pattern, and that the internet has increased the dissemination of ideas and information in ways that our forefathers never imagined possible, then yeah, 2019 is going to be very different from our world today, and I for one can’t wait.

  5. Wrapping clones

    Fun fact: Creating a virtual object in JQuery via the clone method makes some functions unable to interact with it.

    For example, the following will work as expected, adding the class to the clone and not the original:

    $('.myClass').clone().addClass('.myOtherClass');

    The following, however, will NOT work:

    $('.myClass').clone().wrap("<div class='container'></div>");

    As a result, the clone will remain unchanged. If you want to use wrap, and other functions with this limitations, you’ll need to place it somewhere in the DOM first, and then manipulate it.

  6. On Z-Index

    Common issue but one that I often forget and see people asking about:

    The z-index css property does not work on static positioned elements (the default positioning). Make it at least position: relative to make z-index do something.

  7. The Logical Fallacies of Modal Tasking

    So lots of tech blogs have people going through them saying that Windows Phone 7 and the iPhone don’t need multitasking, and pointing to an number of reasons why that may be the case. But let’s take a look at some of the common fallacies they tend to fall into…

    The I-don’t-need-it fallacy

    Need is a funny thing. You often don’t need something until you try it for an extended period of time. There was once a time when the average user didn’t “need” network speeds beyond dial-up. This changed as broadband penetration increased, and the concept of what was and wasn’t possible with the internet changed as a result. Now, suddenly, many can’t even imagine using dial-up speeds on their phone, let alone with their primary computer. Even people who are not all that tech savvy are finding more and more uses for their broadband connection. Utilizing more advanced functions and features of technology has a habit of trickling down into the masses as it gets refined. Where once video chat was difficult and esoteric, now it’s dead-simple with Skype and a webcam.

    The Windows-Mobile-has-multi-tasking-and-it-sucks fallacy

    A bad implementation does not mean a concept is inherently bad. As a former WinMo 6 user I always found their attempts at muli-tasking to be too clumsy and awkward to use, but this does not necessarily mean the concept of multitasking on a handheld is somehow inherently flawed. One might just as well argue (and many have fallaciously argued) that all nuclear power is bad because Chernobyl was bad. Implementation is not a reflection of the underlying concept. Even the best ideas can be half-assed, but this does not mean one should not strive to improve upon the idea in the future. WebOS is an ideal example of a well thought out multi-tasking paradigm which is not only intuitive, but it is simple enough to be grasped even by those who are not tech-savvy.

    The my-battery-life-is-short-as-it-is fallacy

    This is something which depends on use. A well implemented multitasking system makes it apparent to the user which apps are still running without the need of a seperate task manager program, thereby allowing simple control over how much power is consumed. Bear in mind that the majority of apps do not consume processor cycles when not actively performing a task, thereby having little if any noticeable impact on battery life. Indeed, you can even see this for yourself in that many Android handsets and sometimes even WebOS handsets have comparable battery life to the iPhone (sometimes even better). Additionally, jailbroken iPhones with multitasking do not appear to have any significant difference in battery life either. The myth of the dwindling battery is not something we need speculate on, it is something we can actively observe and measure, and it’s total bunk.

    The it-will-make-my-system-unstable fallacy

    System stability is an issue, but again, this is a matter of implementation. I’ve heard many people lambaste WebOS and the Pre for experiencing memory leaks often, but this is, contrary to popular belief, not a result of its multi-tasking implementation, but rather a result of poor garbage management by the OS, an issue which Palm has begun addressing with WebOS 1.4. Newer Android builds are also significantly more stable, and are now just as, if not more stable than iPhone OS. I believe this fallacy originates from Windows Mobile 6’s poor stability, and the fact that many assumed the instability of WebOS and Android were due to multitasking, as that is the common thread between the three, but correlation is not always causation, and the fact is that the latter two examples are far younger than iPhone OS, and therefore took a while to catch up stability-wise.

    The it’s-a-security-measure fallacy

    A security measure from what exactly? The iPhone App Store already has every app screened and reviewed at the code level. Nothing will get through that can spy on your activities without Apple’s say so. So what exactly is more secure about not having code-reviewed background capable apps on your phone?

    The I-only-use-one-app-at-a-time-anyway fallacy

    This is likely the most common one, and for good reason, so I will walk through it step-by-step:

    This is akin to saying you don’t need to learn how to drive because you don’t drive: it’s circular reasoning. You may currently use only one app at a time, but that is likely because you do not have the option otherwise to begin with. Additionally, this argument makes the mistake of assuming that using a multi-tasking OS is the same as a modal OS. Let me assure you, it is not.

    Let me start by explaining that app interoperability is a very useful thing. Being able to switch between multiple live apps with the swipe of a finger is a wonderfully useful thing, allowing things like crunching numbers on a scientific calculator and storing the results in a spreadsheet or a memo for later without having to open and close apps constantly.

    Additionally, whereas modal OSes such as the iPhone typically have modal notification systems, multitasking OSes tend to have less obtrusive notifications so as not to interrupt your current actions. This allows things such as receiving and replying to text messages while playing a game without having to exit the game, or seeing who called or texted you at a glance without stopping. This video is a great and humorous example of this.

    Finally, modal use of mobile applications makes your phone a tool. It is a Swiss army knife which you can whip out and take care of business with. Multitasking makes your phone an intelligent and aware entity. You see, the true fallacy behind this concept is not that you do not use more than one app at a time, for using multiple apps yourself is indeed rare. What many fail to realize, however, is that while you only use one app at a time, your phone has no such limitations. While you listen to Pandora on the bus with your eyes closed, your phone can notice that you’re entering within a preconfigured distance of your house after getting out of work, so it can alert you to get up and get off the bus before you miss your stop. Or it can notice that you’re driving by the grocery store, and you have items in your grocery list that you might as well pick up while you’re there, because your calendar’s clear for the rest of the evening.

    This particular example shows off some of the uses of the Android application Locale, which a location based app that can be configured to trigger nearly anything using extensible scripts, the most common of which are already written by other Android users and can simply be downloaded and implemented. This is something which is impossible on the iPhone without background services. You may think this is a minor detail, something you will not need or use, but the reality is that this goes a long way toward making computers and technology ubiquitous. It is the hallmark of the age in which we do not have to use computers, because they will react to us, and to our needs preemptively without the need for us to constantly interact with them. In short, it is the future.

  8. Fun with SQL: Part 1

    So about 2 years ago, the guy who built the CRM which I work on at work decided that storing dates in the format mm/dd/yyyy as a tinytext was appropriate for one of the tables. So today, after making a bunch of changes to the file that processes this data to format it correctly, I had to change the db data to match the new format. Thus, the magical str_to_date sql statement comes into play. Here it is for future reference:

    UPDATE table 
    SET timestamp=str_to_date( `timestamp` , '%m/%d/%Y %h:%i:%s' )
    

    This takes the current data (mm/dd/yyyy) and converts it to the proper data type for a DATETIME field (YYYY-MM-DD HH:MM:SS).