W3C Finally Finalises HTML5 Standard

Well, it is official: the HTML5 standard has been announced as finalised and is now officially recommended by the World Wide Web Consortium (W3C).

While many of us have been using HTML5 for years now, todays news means that there is no reason to use anything else. Mostly supported by the browsers that matter and polyfills for browsers that lack support for some features.

The W3C mentions that it worked with more than 60 companies getting the standard finalised and that over 4,000 bugs were resolved in the process.

So, what does this mean? Well not a whole lot. It means that any changes and additions going forward will be put into HTML 5.1 as the HTML 5 spec will not change and to be honest, has not changed in a while.

Lets hope that this means the W3C adopt a faster ratification process going forward instead of taking 10 years to agree and finalise a standard. The HTML5 standard took far too long to finalise.

When To Use AngularJS And When You Should Use ReactJS

In the front-end framework race there are many contenders, but the one that stands out from most is AngularJS which is supported by Google. It simplifies the process of complicated and simple application flow, but when it comes to rendering many items (especially using ng-repeat) you soon notice AngularJS struggles.

I will not bother posting my own benchmarks, as there is pretty conclusive proof out there you can find via a Google search. I love Angular, do not get me wrong, but it sucks for rendering lots of UI items, like for example a large catalogue of products comprised of; titles, descriptions, star ratings and a thumbnail image.

All preexisting solutions out there to combat the issue of many items and bad performance in an AngularJS application are merely hacks to get around what is a shortcoming of the framework itself. You could argue one-way binding, but you lose the ability to have dynamic items, pagination and more, but each solution has its tradeoffs which for some, might be too much of a tradeoff to implement.

This is where ReactJS comes into the fray. While AngularJS aims to be MVC (Module View Controller) ReactJS likes to call itself the “V” in MVC. This means you can use ReactJS in the form of an AngularJS directive to render items and keep track of their state.

The issue with AngularJS is that it works on the premise of directly watching and modifying the DOM. In the instance of a large amount of “ng-repeat” items, if you have watchers on potentially hundreds of elements in the page, it does not take a computer scientist to work out what will happen: performance will suffer.

The premise of ReactJS is something it calls a virtual DOM. This is an in-memory representation of your DOM, when a change is made, it is made in memory and the DOM is subsequently updated when needed. This is similar to that of a DOM documentFragment which allows an off-canvas element to be modified and bulk inserted into the page, only on steroids.

Rather than checking the DOM for what has changed and what needs to be updated, all of this is handled in memory which results in blazingly fast mass updates and changes to the DOM because the heavy work is being off-lifted outside of the page itself.

I like to think of ReactJS as a NoSQL database for the DOM. While the codebase for ReactJS is anything but simple, the premise of ReactJS is simple enough to know it is effectively a key/value store for the DOM. It is incredibly easy to learn and pick up, the learning curve is a whole lot more simpler than AngularJS is to learn.


Now some people would argue that you should not mix the two and in an ideal world, that is probably a good recommendation. However, recently whilst working on a large-scale project in AngularJS, the use of ReactJS was warranted because it was better than the alternative of poor browser performance and a bad user experience.

The beautiful thing about ReactJS is that it does not care what front-end framework you are using. All it cares about is rendering HTML markup that has been Reactified and created within the React component itself. This allows you to use the features in AngularJS like services and factories and effectively replace “ng-repeat” with ReactJS instead.

If I were to start a new project tomorrow, I would definitely just use ReactJS in combination with Flux to build my application without AngularJS (as far as I could feasibly do so). You could effectively build a Facebook like web application using Node.js as the server and ReactJS as the front-end.

However, the reality is, not all of us developers have the luxury of being able to throw existing code away and start again from scratch, especially in a large organisation, it just does not make any sense. But if you are stuck trying to optimise a preexisting application in AngularJS this is a good solution that gives you the view rendering power of ReactJS and the versatility of AngularJS.

How do I use the two together?

You can roll your own custom directive functionality or you can use a robust existing solution like ngReact to implement the power of ReactJS into AngularJS.

While I have experience using both approaches, to save time, I would use ngReact and not worry about rolling your own solution unless you need additional power this library addon cannot already provide you.

An important note

Please also note that while AngularJS and ReactJS can be used together, the recommended approach is to use one or another, in an ideal world. ReactJS is not as opinionated as AngularJS and I would argue is not really a front-end framework at all. So the two cannot be compared, but one or the other or both can be used.

Inform your yourself and form your own opinions. As always, not all tools can or should be used for everything. Use what works for you and forget the rest.


No We Will Not See A “Windowless Plane In 10 Years”

Recently a British company called Centre for Process Innovation released a report proclaiming that we will see windowless planes within 10 years. With the windows being replaced by OLED screens which amongst other settings, could mirror the outside of the plane to make it look see-through.

While the rendering images and subsequently released video look kind of cool, the cost to implement OLED screens into existing planes would be astronomical. Not to mention requirements around power would need to be considered as well as lifespan of an OLED panel which currently is estimated to only be a few short years (based on current OLED high-end televisions).

Would OLED panels look cool? Yes. Would they freak out already nervous flyers if they’re giving the appearance of a see-through plane? Yes. Would they reduce weight? Yes.

We can all dream, but how many times have you flown on a plane to see old remnants of yesteryear with ashtray fittings from a time where you were allowed to smoke on a plane? I have a few times. This is proof enough that the airline industry are not quick to jump on new tech, look at how long it has taken to get in-flight wifi? And even still, it is not greatly supported.

It is also worth pointing out that a windowless plane is not a new idea. Cargo planes do not have windows to save on weight and Airbus have a patent on windowless cockpits. Pilots of the expensive F–35 fighter jet have Oculus Rift style headsets that allow them to see beneath and around the jet as they fly.

So do not expect any major airline to entertain the idea of a windowless plane for potentially 20 to 30 years, not 10. The airline industry does not move as fast as CPI seems to think it does.

Lets hope when they say windowless, they mean the panels are powered by Linux, not Windows…

Will Apple Pay Go The Way Of iTunes Ping?

When Tim Cook proudly announced Apple Pay recently and the impressive number of stores it had got onboard, I was shocked. Had Apple finally pulled off a feat many others have struggled to implement on such a large scale? Early reports indicated a resounding yes.

Now, it seems some other major retailers are planning on launching their own offering to rival Apple Pay and shuttering support for it. The retailers include; Walmart, Kmart, 7-Eleven and Best Buy. Expected to launch next year, a payment service and accompanying app called CurrentC which sounds like a bottled juice drink than it does a payment service.

Does this single the end of Apple Pay? Most likely not. We have yet to see if the FTC steps in here, as this is essentially a deliberate move to block out competition in the payments space. But as the FTC have proven, they are pretty useless.

So while Apple pay still has a future, it seems CurrentC has started some kind of payments revolution that is starting to pick up some traction. The benefits of CurrentC include cutting out the middle-man whereas Apple have partnered with banks (which could work to their advantage for lobbying for support).

There is definitely no shortage of competition. With Square, Paypal, Amazon, Google, and other companies vying to be the mobile payment platform of choice, even Facebook are planning on getting into the action as well. But no doubt Apple have the power to form powerful partnerships, they do have a lot of cash in the bank to do some damage to competitors.

Time will tell. But it is good to finally see some competition in the NFC payments space which has been slow and dormant for some time now, at least until Apple came in and finally supported NFC.

A Handy Free Flexbox Cheatsheet

Occasionally the Internet delivers and gives us something decent other than videos of cats playing keyboards.

Flexbox is one of the newest and potentially most useful parts of CSS3 in a very long time. Support amongst browsers is fairly decent and while it is not really that new, being able to use it is.

This cheatsheet shows some nice easy to understand and follow, examples of how to use Flexbox. While the cheatsheet does not explain all of the great uses of Flexbox, it will help you understand how to use it.

When Will AngularJS Version 2.0 Be Released?

Recently the AngularJS team released a slideshow showcasing what we should expect when AngularJS 2.0 is released. It detailed that controllers, directives and AngularJS as we all currently know it will be changing, with the aforementioned features being removed.

Some people are excited and others are naturally freaking out. The steep learning curve of AngularJS means that some have had to struggle and learn harder than others to get to the point they are at now and when 2.0 is released, it will be an entirely new framework.

But, wait. Do not freak out just yet. While plans and details around version 2.0 are being released already, it is far from complete or ready for primetime.

Current estimates put AngularJS 2.0 at least one year away from release, with many speculating it is about two years away from release. Considering the backbone of AngularJS 2.0’s syntax is ES6 which will not be supported in any current browser until the end of the year, it is safe to say you should not freak out.

All the proof you need is the fact version 1.3 of AngularJS was only released on October 13th, 2014 which was 12 days ago at the time of writing this post. Currently the architecture for 2.0 I believe has not even been finalised, the design could change between now and its final release.

One thing that is for certain, is you will write directives and any additional functionality for AngularJS using Google’s AtScript which is based on ES6, with some additional tweaks that make it look similar to TypeScript.

Will AngularJS survive a major version change and major rewrite? Time will tell, but the love people have for AngularJS is quite high, so things might not turn out as bad as they did for the Python 2 to Python 3 major version change.

So relax, keep on writing applications using AngularJS 1.3 and cross the bridge of 2.0 when it comes to it.

Overtime Is Killing You… Slowly

If you work in the tech industry, more specifically as a developer (software or web) you are slowly dying from a disease commonly known as: overtime.

There is no cure for overtime other than something called common sense. It comes in many different forms, but for many including myself, it can be a hard pill to swallow when a deadline is looming or a culture of overtime is prevalent. When the company comes to expect overtime, in this economy you have two choices: deal with it and hope you do not burn out or find a new job.

Finding a new job for some can be difficult, a lot of the individual economies that make up the world economy are falling apart. Spain has an unemployment rate of around 25%, the UK around 6.5%. This leaves you with the choice of working incredibly long hours for a fixed salary with no extra benefits, which for some with families to provide for can make it even harder to deal with.

Does any of this sound familiar?

  • But I have to stay back to finish this deadline or I will lose my job.
  • I want to deliver great code, so I can warrant the extra time investment.
  • I am new here and I want to make a good impression, be a team player and I know if the company needs to downsize because I am new, they will look to cull me first.
  • Work said that this will not happen very often. I am only staying back for the greater good of my team and my company, it will not happen very often.
  • We want to get this project completed earlier, so we have time at the end for testing and refinements before handing it over to the client or shipping,

In the end you have to ask yourself: who does overtime truly benefit?

It does not benefit you or your team because it has been proven that after a certain amount of hours staring at a computer screen, you begin to lose focus and once you lose focus, your concentration levels go right down the toilet.

You are definitely not doing your employer any favours either. Dropped concentration levels mean you miss things, you make simple mistakes and could end up setting you and your teams progress back as you scramble to undo mistakes you made whilst fatigued. Resentment begins to grow in environments where work life balance becomes 90/10.

So the answer to the question is: it benefits nobody. It is an outdated way of thinking that the more man hours you throw at a problem, the quicker it gets solved. This is akin to slavery, and like many overworked slaves in history, it takes a toll on you and you either die or become mentally ill.

Many managers seem to operate on the principle of the more hours someone puts in, the more work you get out. This is true until a certain point. It is a little bit like dipping a tea bag in a cup of hot water, after 3 to 5 minutes of steeping in the water, it will not absorb any more tea. You could leave the tea bag in for 2 hours and it would still be no stronger than someone who left theirs in for 5 minutes.

Overtime is not just limited to sitting at your work provided desk on your work provided computer, it also extends to home-life. Working from home after hours, checking emails and losing valuable time you can spend with your family is a form of overtime we all fail to realise is just as detrimental to your health and work/life balance.

Go home, huge your wife/husband, play with your kids, see a movie, call your parents or reach out to that high-school friend you used to be great friends with and stop letting overtime kill you. You are sick, but there is hope for you yet.

Apple OS X Yosemite Wifi Issues

Thanks a lot Apple, you incompetent pieces of shit. Gone are the Steve Jobs days of quality and consistency, these days it seems not only have Apple stopped innovating, they can not even seem to release a software update without breaking things.

First the messed up launch of iOS 8 and the number of issues people experienced there, now the latest and supposedly greatest version of OS X comically named Yosemite is experiencing more issues than an actress in a rehab clinic.

The issue for me appears to be Wifi (Googling seems to yield a lot of results). At first I thought it was my crappy home network, then I thought it was my crappy work network. It turns out I was blaming the wrong culprit, the issue is I updated to Yosemite and it seems to have some kind of bug with wireless connections.

My wireless connection ranges from dropping out completely to slowing down to a crawl and randomly dropping TCP/UDP packets whenever it pleases like a friend who has been sleeping on your couch for 2 months and has made your seat cushions smell like Cheetos and seafood. Sometimes it works for a good while, other times it seems to forget wireless networks that other people around me not on Mavericks seem to have no trouble staying connected to.

Some of the fixes range from forgetting all of your discovered wireless networks, disabling bluetooth, setting IP6 to “link local only” and reinstalling Yosemite. None of the above aforementioned fixes worked for me, which leads me to believe Apple are so arrogant that they do not test anything they put out any more.

I am using a late 2014 model MacBook Pro and I expected better than this… Not that age should matter, I think it definitely highlights Apple have released not even beta quality software.

How To Fix Issue With DOTA 2 Not Going Fullscreen On Mac

Recently on my MacBook Pro when I launched DOTA 2, the dock was showing and the menu bar, buttons were being cut-off and the game was hard to use. The issue seems to stem from how Steam sometimes launches the game client.

The fix is rather simple and worked for me.

  1. Open up the Steam client
  2. Click the Library tab
  3. Right click on Dota 2
  4. Select Properties
  5. Click on the General tab (it should be selected by default)
  6. Click on the “Set Launch Options” button
  7. In the box that pops up enter -fullscreen

1Password 4 Mac: “Failed To Extract Application Archive” When Upgrading From 4.4.2

I am a huge fan of 1Password and the update process has always gone very smoothly, however recently while attempting to upgrade from 4.4.2 to version 4.4.3 I kept getting an error message about how the application archive failed to extract.

I tried absolutely everything and came to the conclusion that this is an issue with the update package or the update software itself.

The fix is to manually download the update from the 1Password site here and manually install it (which works). Annoying, but not world ending.