HTML5 not yet ready for prime time

Before working with HTML5, I had initially questioned HTML5’s support and adoption, considering IE6 and IE7 were still dominating browsers.  Recently, Microsoft has announced IE would automatically update, like their competing browsers Firefox and Chrome.  I’ve developed using HTML5 and CSS3 for the past few months, using all the latest browsers.  In short, most of my tests and development failed to be cross-browser compliant.  I’ve probably swore at my computer a few dozen times and rewrote the code to use standard JavaScript just as many times.

For those of you who know me, they will know that I am using Internet Explorer 9 64 bit as a primary browser.  My reasons are very simple, I want something fast, has robust developer tools, and good crash management.  If my options were limited to IE 32 bit, I could promise you that I would not use Internet Explorer as a primary browser, despite having arguably the best developer tools (which oddly enough come built into the browser, unlike Firefox which requires you to install Firebug).  After using it as a primary browser for a few months, I’ve noticed how much different the web looks from the perspective of an IE user.  Websites had bugs, some code had breaking errors (that other browsers tend to ignore) and some sites simply refused to let you in if you used IE (regardless of the version).  I’ve had a few sites tell me to switch browsers for no clear reason.  Oddly enough, as a user of IE9, I love it, but as a developer who wants to build using the latest tools, that is simply not possible… unless of course I used IE10.

When developing in HTML5, I did not build a game, as most people expect HTML5 to be used for.  Instead, I used it to build tools and manage data.  Based on my earlier posts, you will see that this has been no small test, with more than 200k lines of code from the start.  Today, it stands at 165k lines of code (yes, we are refactoring).  HTML5 is supposed to have more tools and capabilities with handling forms and have new events that would hopefully cut down on the need of observers in a page.  Beyond that, I was mainly looked forward to HTML5 for the ability to embed multimedia into pages; like music, videos, articles and figures.

Continue reading…

What is clean code?

I’ve always really wondered what people thought when they hear the term “clean code”.  I often hear people say it is commenting your code, while others say object-oriented programming, and some just say “no spaghetti code”.  While I agree with all those, I tend to lean towards object-oriented programming the most.  In fact, I don’t even believe commenting your code should necessarily be a function of clean and legible code.

Lately, my team and I have been tackling a goal I set to clean up our code, to make it faster and more reliable. Prior to starting this project, we had just over 200k lines of code.  Had a lot of duplication of functions, a lot of code that could be simplified by turning into more generic functions and a bunch of functions that existed but never used.  200k lines of code is a lot, but we are also building a very complex system and we do use some open source libraries like Mootools that add to the total.  However, given that JavaScript has never been particularly nice with OOP, it is difficult to make nice clean extensible code and save on lines of code.  We’ve built hacks into our JavaScript to mimic OOP to our best abilities, but it still isn’t as perfect as you’d find it in languages like Java.

As you can probably tell, my approach is to cut down on code by making functions and existing code more modular and used by more sources, as opposed to living in the cache as a one time use function.  Granted that the function is clearly written, declaring variables in plain text and using variable names that make sense for what they do, commenting becomes much less relevant, especially when the functions themselves are less than 30-50 lines of code (including line breaks). Commenting is something I felt was always added to help another developer understand one developers sloppy writing.  Yes, creating code is like writing.  If you cannot properly outline your introduction (declarations), your content (the main code) and the conclusion (clean up and return statements), then no one will understand what you are attempting to carry out.

Continue reading…

The Power of Social

Over the past years, we’ve all become more social.  Many will argue that this has lead to our lives being more public and having less privacy.  In theory it may be true, but like anything else, you must be conscious of what you share and who you share it with.  Social networks, the majority of them, provide you the tools you need to manage your privacy.  This post isn’t about privacy, it is about how the world has changed since the web has become more social.  Early in the social days, websites would mainly function with users hiding behind a pseudonym.  Later, we moved to sharing content with friends, to now implicating friends into our activities.

When I started on the web, I’ve basically used it as a tool, to do my homework and so on.  Not long after, I began using content sites for the games I played (and loved).  But I quickly began posting on fan sites and soon enough was helping manage some of those sites.  It eventually lead me to creating my own sites.  My sites were popular in the day, not the size of Facebook or Myspace today.  Just over hundred thousand users and over two million pieces of content (posts, comments, downloadable content, etc) created in a little over a year.  The sites however lacked on key aspect… the ability to drive new users (or at least our users’ friends) to the site.  Which is why sites then focused on retention and we did that extremely well, I retained the majority of my users quite well.  But we also didn’t have to fight for the user’s attention with many other games, apps, or sites.

Sites slowly moved to making users less anonymous and reveal their real identify.  I can’t quite say who started this movement, but Myspace was a big player in this field, as it started to become popular.  Myspace focused on users sharing posts together and gathering attention with fancy layouts.  Facebook was not far behind, but focused on sharing pictures between friends with the ability to tag pictures.  Soon college students all over North America were sharing pictures of their drunken adventures from the night before.  What many didn’t know was that around the corner was the revolution of the web, where one could monetize social activity.  These sites still focused heavily on retention and continue to focus on retention, though partly giving way to virality in order to grow the sites (or networks), apps or games out.

Applications and games began to use social networking sites to share content between users and their friends.  Some of the things shared were as silly as “How are you in bed”, but were extremely popular in their early days.  It was simple, users wanted to see the results of them completing the activity and comparing it with their friends.  That is why quiz apps ruled the Facebook platform when apps initially launched.  People wanted to see what Movie Star they resembled the most, or what Harry Potter they were like, or what year they would die.  Soon we had the games where users would share the activity on their levelling up, their completing of challenges, and harvesting of crops.  But those were mostly in the context of being virtual, rarely implicating the users in real situations, like lifestyle events.

Today, we are seeing the shift of social on lifestyle events and things users do outside of the virtual world, going back to getting users to get off their computers and enjoy their lives in different ways.  People are rewarded for sharing the places they’ve been, people share all the music they listen to, users share what they discover while shopping, or their experiences on vacation as they are enjoying it.  Those applications are heavily focused on virality, much less on retention.  Many products seem to focus on the product being stellar enough that users will come back to it or their friends will bug them to come back.  This is where I find social has done a complete 180 from users being anonymous to being pressured to come back.

What lead me to this post was not the history of how we got to where we’ve gotten today, but the power of social activity.  We’ve likely all heard the concept of “word of mouth”, I like to think the social experience is a derivative of that.  People see an activity that was shared, being curious as we all are, we will check it out to see what it is about.  Take me creating a radio station as an example.  I create a radio station in Spotify, people are either curious to see what I listen to or like what I listen to, which leads them to subscribing or at least trying it out.  I will also do the same with my friends and see what they listen to, often subscribing to their activity.  It helps me discover music and keep myself entertained.  The same can be said about any other variety of applications or products out there, pimping out your friends to help you discover new experiences, though really what they are trying to do is get more people using their product.

What continues to fascinate me is how these applications, games or products that now focus on the viral aspect of social activity do so at the expense of other core values, such as retention.  Retention was always a core to any product and continues to be in games or applications that have no up front costs but have a micro-transaction economy.  Using products like Spotify, Nike+, or Yahoo News, I was never really asked to come back or even given the a notice that coming back may result in me getting something out of it.  Instead, I am reminded through my shared activity that those were great products which benefitted me and I should go back to it.  In a way, I am shocked that they aren’t trying to get me back, but also happy they aren’t annoying me either.

Today, most of the products I use are social.  I like they are social.  Not for the fact that I am giving away all of my privacy, but because I can express myself, share my experiences with others, and review my friends’ social activity that allows me to discover new amazing things.  Social has brought me to real life events that appealed to me (like Camaro Fest), has allowed me to discover new amazing products that made my life easier and better, and also allowed me to have some more variety in how I go about to my daily activities.  Of course, there is a very large flow of content, the tools to curate this content is becoming more popular, but in the meantime I am watching what I share with others and what I subscribe to.

Algorithms vs the world

[EDIT: For some odd reason, WordPress decided it wanted to delete the rest of this post… so here’s to writing it again]

Haven’t you ever told yourself while in school : “I won’t ever use this again, why am I learning this?”.  Well I do all the time, being that I am fresh out of university, those are still thoughts that continue to come to me. However, recently I’ve discovered that I am beginning to use concepts learned in school in order to adapt them to real world scenarios.  More importantly, I am using algorithms.  There are two algorithms I am using primarily these days, that revolve around Tree Structures and Statistics (as in that really confusing class you need to take when enrolled in Computer Science).

Continue reading…

The Email Authority

It’s been a while since I’ve tinkered with sending authenticated emails.  Recently, I’ve been tasked with doing just that in order to decrease chances of emails landing into spam box.  Integrating DKIM has become surprisingly easy to what I have done some 5 years ago with cy-Mall.  What has surprised me even more are the tools available to validate the authentication of the emails sent.  I was able to validate my emails’ spf, domainkeys, and dkim with some detailed information to help me debug.

I am very happy to report that all my emails going out are DKIM and SPF validated, where I have found DomainKey to be reduntant.  DomainKeys do not seem to be supported by the majority of top email providers, their signature being nearly identical to DKIM (except that only headers are signed).  Email providers are now reporting my emails to be whitelisted and have followed up with those email providers to ensure everything was done to remain on their whitelists.

With all that said and done, one lingering question remains.  Why does ICANN not provide more options to cut down on spam and ensure the validaty of emails.  Its been said that the majority of emails going through the internet today are spam.  After going through setting up DNS entries for DomainKeys, DKIM and SPF, makes me wonder why they aren’t setup by default.  Beyond that, provide additional settings to force signed emails from that domain or have email providers reject non-signed emails.  This could very well help with cutting down phishing, who like to send emails (or make it seem like they do) from other domains.

Perhaps a crazy idea, but wonder what stops them from doing it.