Wednesday, March 27, 2013

My TV Shows list

I've updated the list of all the TV Shows I've watched since February 2008. So far it's 48 shows, 3295 episodes in total, what gives 1854 hours and 12 minutes (around 77 full days and nights). If you know anything I should watch, and it's not on a list (or 'Shows to consider' list), please fork my repo and update my proposals. You can also vote for other series in the 'proposals' part.

Github repo: michalbe/tv-series
Rendered list: gh-pages/tv-series

Sunday, March 24, 2013

JavaScript: The less known parts. Bitwise Operators.

'JavaScript: The less known parts' chapters:
1. Bitwise Operators
2. Storage
3. Dom Mutations

Most of us probably use JavaScript every day - in my case it's building a mobile operating system in my daily job, preparing crazy and ridiculous demos for various conferences or run personal projects in my free time (mostly games). But even with years of experience (probably because the language itself is full of weird quirks and unintuitive patterns), from time to time I'm still getting surprised with new crazy hacks, techniques or workarounds. I want to put most of those things in one place and publish one every Monday - for last couple of years I wasn't really active on the blog, it's time to change this. First - bitwise hacking.


Bitwise operators

Most of us know know that there are some bitwise operators in JS. Every number has it's own binary representation, used by those operators. To check dec number's binary value, we use .toString() method with base argument - '2' for binary:


There are seven different bitwise operators. Assuming that variable a is equal to 5, and b is 13, those are actions and results of their operations:


Sometime we even use Bitwise OR as equivalent of Math.floor():


It has the same effect as double NOT operator (my favorite rounding solution since I first heard about it on Damian Wielgosik's workshop couple of years ago).


What about other real life examples of bit chaking? For instance, we can convert colors from RGA to Hex format:


We can also simply check which number in a pair is smaller (like Math.min) or bigger (Math.max):


Of course since Math library is really well optimized nowadays, using those hacks doesn't make any sense. But what about variables swap? Most common solution is to create a temporary variable to achieve that, what is not really efficient. It's simpler to use bit operations here:


Even with 'Pythonish' variable swap introduced in JavaScript 1.7, bitwise solution is the fastest way to achieve that.
JSPerf test [here]:


Great place to learn more bit-tricks to make your JS app: Sean Eron Anderson's site [Stanford PhD].
Do you know and use any more binary tricks in your JavaScript projects?

Wednesday, December 5, 2012

onGameStart US, March 2013

Since world is just too big for only one HTML5 gaming conference, onGameStart comes to North America on March 15 next year. Together with Collin Hover, WebGL Wizard and creator of kaiopua game engine and outstanding BlackMoonDesign, (yes, they are doing also 3D stuff, not only pixelart!) we launched the site last week. Control the astronaut, meet the speakers and explore onGameStart planet & stars. Don't forget about our Call for Paper - show us your games, engines, tools or game related services and present them on oGS in New York!

Monday, September 24, 2012

Report from the battlefield - onGameStart 2012

onGameStart 2012, the second version of the first HTML5 gaming conference ever, is over now. Since last year I completely changed its formula, and even if I was frightened as hell just before the event, it turned out to be wonderful (or most of the attendees were perfect liars who didn't want to hurt my feelings, but I'm quite OK with this:) ).
First of all - I limited number of the attendees to 250 (instead of almost 350 last year). Why? HTML5 Gaming is quite a new movement. Even if it's growing fast, it's still not as popular as, for example, jQuery or Node.js communities. And inviting less attendees definitely helps in meeting interesting people - onGameStart is not a mass event - it's more like a meeting of our elite HTMl5 Gaming caste. Connecting them together (also with sponsors & publishers, not only other developers & designers) is one of the main onGameStart's tasks. Also - according to Malte Ubl, organizer of JSConfEU:
more people requires executing everything with great precision which is super unlikely for amateurs like us (Professionals can’t do this either, but they don’t care because lots of attendees means lots of money).


Also - onGameStart this year has additional, third, day at the beginning, just for the workshops. During the three tracks, groups up to 15 people learned how to make 2d platformer game, 3D game using your jQuery skills, or multiplayer pong game in SVG with your Flash resources. I had fantastic feedback from both, attendees and trainers, so I'll probably organize workshops again during next editions.
During this year's Front Trends Paweł Czerski, one of the organizers, adviced me to shorten speech slot from 45 to 30 minutes. It's enough to inspire the audience with something new. And if the speaker is not good enough to do it, additional 15 minutes won't probably change it. For sure, I will use the same pattern again.
The main keynote this year was prepared by Jordan Mechner, creator of 'Karateka', 'Prince of Persia' or 'The Last Express'. He is not HTML5 game developer. Actually, he has nothing in common with browser games or development at all - his last game was published more than 15 years ago. But he is an icon in the gamedev world, and has indisputable influence on video games. The story Jordan presented was great summary of a journey of a game developer (as he called it - 'From Bedroom to Attic'), and definitely it was best closing talk of a gaming conference I could imagine. I'll do my best to invite other gamedev stars for next editions.

During my opening talk I appealed to the HTML5 gaming community to stop doing tech demos and try to prove that it's mature enough to create real games. We need games, not demos, so stop doing it and focus on real games. The second big thing I announced was American edition of onGameStart - onGameStartUS. It will take place in New York early next year (probably 22nd of March). PreRegister here for the news. And track the event on Lanyrd. After the announcement I read a lot of tweets or personal questions about European onGameStart. So to dispel all the doubts - there will be more than one onGameStart next year - one in NY, main edition in Warsaw, and probably one more, but I will announce it later. As I said during my talk - world is too big for just one HTML5 gaming conf (actually I wrote and said that it's 'too small', but It's mostly because I didn't really sleep for about a week). So see you next year in NY, WAW, or any other place I'll bring onGameStart to. Thanks!