web

  1. 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…

  2. 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.

  3. 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.

  4. 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.

  5. 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).

  6. Welcome to the World of Tomorrow!

    From TDWTF Sidebar:

    El_Heffe:
    The usage of floppy disks has declined tremendously over the years and people who are new to computers may have little or no experience with them. i never gave this any thought until recently when I was helping a co-worker with Microsoft Word.

    I noticed that she always saved files by clicking on File –> Save. So I just casually mentioned “You know, there’s another way to save files that I think is easier. Just click on the disk icon”.

    She stared at me blankly. So I pointed to the floppy disk icon. This was followed by a long pause and then she said “Oh ….. I thought that was a TV.”

    cconroy:
    Fast-forward ten years or so: Co-worker, now senior level, is explaining to a new employee how to save more efficiently. New employee says, “What’s a TV?”

  7. Palm Pre: First Impressions

    So I’ve had my Palm Pre for about 4 days now, replacing the dinosaur of a Motorola which I used prior, who’s screen had cracked and which crashed and froze on an almost hourly basis.

    The main appeal of the Pre, for me, was WebOS. As a web programmer, dangling the carrot of coding embedded apps with my existing skill set is a tempting one (and the same reason that I kinda liked Konfabulator/Yahoo! Widgets). But I’ll get to my experience thus far developing for it in another post.

    The physical phone itself is very nice, especially when it’s closed. It’s just satisfying to hold, and doesn’t feel bulky at all, even in your pocket. The screen is only a tiny bit smaller than the iPhone, a difference which I can more than live with, and I like having a physical keyboard. I dislike the portrait keyboard though. Every time I use it I can’t help but feel a little cramped, and I have small hands to begin with. A Landscape slider would’ve been way more comfortable. The keys themselves feel a bit too soft too. I’d have preferred harder keys, as I fear these will wear down much faster, since the portrait slider configuration means they’re smaller, and I have to hit them with my fingertips. The Ringer Off switch is great though, especially for movies and for the bus (I don’t like waking sleeping people on the express bus with my phone, I think it’s rude).

    The multi-tasking is, by far, the best part about the phone in my opinion. The ability to smoothly move to, use, and control apps feels very satisfying and almost cathartic. Synergy, which was also heavily touted, falls flat in my opinion though. Don’t get me wrong, I loved just inputting my Google account info and being done, but as others have mentioned in reviews, it imports ALL of your Google and Facebook contacts, and only merges them on name, not on other reasonable data (like screenname). For me, the biggest annoyance was that it imported my AIM buddy list, which has 200 buddies, half of which are either inactive or I no longer speak to. There’s no option to disable this either. If you sign into AIM, your buddy list is just dumped into the phone. I’ve already organized my Google contacts, and culled my AIM buddy list as a result, and I’m just not going to add my facebook account, but I’ll get to that in a second.

    You see, my primary problem with the Contacts list is the inability to organize contacts by group. So while even 7 year old phone have friends, family, etc groupings, the Pre does not, even if they exist in your Google contact list. I can only group contacts by Company, and even then, I can’t collapse that group, so I have all my former coworkers taking up tons of space at the top of my contacts list, with no way to move them out of the way or close the group if I don’t use it often. Don’t get me wrong, I could just search for my contact, but I don’t always want to have to open the keyboard to do so, especially when the fix for saving much of the room would simply require replacing the “divider” widget, with the “collapsible divider” widget. It’s literally a 2 second god damned job.

    There’s more but that’s all I really wanted to talk about at the moment. I just finished working on version 0.1 of the app I’m writing today, so I’m kinda happy about it so far. I’ll describe it a bit later on when I have some more free time.

  8. On IE6 and Windows Update

    Once upon a time Internet Explorer’s ties to Windows and Microsoft were it’s biggest strength, but in retrospect, it may have been it’s biggest flaw. Numerous people now use FireFox, Opera, Chrome, and other browsers, but none of these have the single most glaring fault that Internet Explorer boasts about like a badge of honor… Windows Update. Firefox and others all update on their own, automatically, and independently (by default), and give the user little reason to disable this behavior. IE, by contrast, updates through Windows Update (I believe it’s actually been rebranded Microsoft Update now); a service which many people disable because of the risk of receiving updates which cripple their system (as the WGA check did to some people, even though their licenses were valid). This puts a large portion of IE users out of the reach of the update system, and further widens the chasm between each iteration of Internet Explorer.

    The cost to us? Being forced to write pages for a browser so old that when it was first released, George W Bush had just recently become our new President, and was on vacation in preparation for what he expected to be two easy and uneventful terms. Not to mention the thousands, if not millions, of users who view the web with poor css implementation, poor png rendering, broken javascript support, etc etc. So now, with IE8’s release, developers are forced to write code for 3 Microsoft browsers which render content in wholly different ways. Don’t get me wrong, I’m glad that IE8 has at least taken some steps toward standards compliance, but it’s a single step in a journey of miles. It seems to me that the problem isn’t moving IE7 users to something better, the problem is moving IE6 users at all.