...All those moments will be lost in time, like tears in rain....

- soliloquy from Blade Runner

Bits and bytes do get lost, awash in the rain of data flow that is Internet. They slip away from us, never to found again... some of them will be captured here, many more will not... like tears in rain...

Monday, December 3, 2012

70-480 - DONE!

 70-480  is Microsoft exam for HTML5 - Programming in HTML5 using Jaascript and CSS3. I took it last week and while I can't divulge the details, here are some important points:
- I've learned a lot about supoort for HTML5 and turned out that lots of things are already supported (like Geolocation, User Storage etc) and things that are not supported in older browser directly, can still be implemented thanks to Modernizr. That was very pleasant surprise.
- There is a lot of useful stuff in new spec, and while some things are really specific like Video/Audio, some things are universally useful - web workers, web sockets, offline access, local/Session Storage.
 In short, HTML5 is way more useful than I thought what is good, and browsers are implementing more and more of it with every version.

- Exam was both harder and easier than I expected.

 Harder because I did have to learn lots of CSS that I really didn't bother to before, on top of the new stuff  - google is my friend when it comes to figuring out is underline text decoration or text transformation property!
 Also, I was surprised by some  IE 10 specific stuff. I really didn't expect to see -ms- tag specific CSS questions or IE10 specific questions, and I got 3 of those.

 Easier than I expected in JavaScript area - I did lots of study on callbacks, closures and prototypes, and while I've got question on all those, I got several jQuery and plain JavaScript questions that I didn't have to sweat at all. Having 12 years of experience there helped a lot ;)
Also, I've got way more question than I expected I on accessing and validating DOM Elements - at least 25% was all about DOM, Regex, JS validation, HTML5 validation...
 That's the area I've scored worst too, so I am sure that I've missread some of the questions rather than answer them incorrectly.

 Here are the links I've used to study, since those 2 blogs very detailed and useful.


Only thing that I didn't like was links to w3school site - that site is ok for a quick reference, but it's very sparse and if you are looking for any kind of explanation, there is nothing. It's ok to see that function takes 3 parameters, but please add couple of examples so that people can understand the purpose of that function! I still remember, fondly, Turbo Pascal documentation, one of the best ever. Every function had all parameters spelled out, regarding their types and purpose, return value has always defined type, and each function has several examples to better explain the nuances in calling. Seriously good great documentation.

 All in all, good exam to have under your belt if you want to use new standard in web development or to start with developing Win8 applications.

Thursday, November 8, 2012

HTML5 video tag

 I was looking at  HTML5 VIDEO tag and it turned out it's a mess.
  Patents and conflicting interests made this into a situation that you have to encode your video into 3 formats to be sure that will play at least in modern browsers; older browsers are even bigger mess.
  •  MP4 will work in IE, and that's pretty much only one that will work there. 
  •  Ogg/Theora is neccessary for Firefox and will work in Opera too.
  • Webm is supported by Chrome but Google can drop that format any time since they bought the company that created the format.
After you encode your movie, you have to set up IIS to recognize all 3 of those formats or you will get nice red X instead of the movie.

 Under Mime types in IIS Feature View, you need to add:
  1. extension .mp4
    type: video/mp4
  2.  extension .ogv
     type: video/ogg
  3.  extension .webm
     type: video/webm

Android needs extra help, as per http://www.broken-links.com/2010/07/08/making-html5-video-work-on-android-phones/

<script type="text/javascript">
  var video = document.getElementById('video');

Tuesday, November 6, 2012

Ajax.ActionLink opens a new page

 This was very puzzling - all I had was a partial view - a div really with some content, and Ajax.ActionLink (in MVC3) kept opening it in new window.

 Turned out that library:


is necessary to include on the page for Ajax.ActionLink to work properly and render
partial view on the same page.

Wednesday, October 24, 2012

IE Enchaned Security Configuration - bye bye

 It's under Server Manager / Features in Windows Server 2008. Can you spell "good riddance", boys and girls?

Tuesday, October 23, 2012

HTML 5 and browsers

 To check how's your browser support HTML5, go to:


My Firefox 16 on Windows 7 scored 372 and 10 bonus points of 500... now I am curious what's that... let's look... here it is:

>The test also awards bonus points for supporting audio and video codecs and supporting SVG or MathML embedding in a plain HTML document. These test do not count towards the total score because HTML5 does not specify any required audio or video codec. Also SVG and MathML are not required by HTML5, the specification only specifies rules for how such content should be embedded inside a plain HTML file.

IE 9 on Windows 7 scored 138 and 5 bonus points, OUCH!

Chrome 22 on Windows 7 - 434 and 13 bonus points.

Safari 5 - 273 and 2 bonus points.

Opera 12 - 374 and 9 bonus points...

Security features are missing in Firefox completely ...:(

Monday, October 22, 2012

Image sprites

 One of the ways to improve performance of the page is to use image sprites. Instead of having browser connect 10 times to get each individual image, you combine them all into one image and then use css to access individual images by getting their positions:

 Something like this:
  width: 22px;
  height: 25px;
 background-image: url(someimage.png);
 background-position: 6px 13 px;
bakcgrund-repeat: no-repeat;

Good site that allows you to do this visually and uses Html5/JQuery/CSS3 to boot to achieve this is:


You can play with sample pictures or with your own.

Friday, October 19, 2012


 This is very nice page to demonstrate Progressive Enhancements concept in CSS3 effects in a visual way:


Bookmark quality, right there!

Monday, October 8, 2012


 I usually do not put much attention at what is being advertised on the sitem but from time to time, something will catch my attention by either being funny or inaccurate or both :)

 So, here's Youtube pairing my music taste with ads:

1) When I listened to Blackmore Nights, I've got ad for Bible study:

2) When I listened to Metallica, I've got an ad for Geek2Geek dating site. Twice!

Wednesday, August 22, 2012

The science of estiamates

 That dreadful question - how long something will take...

  First solution I've heard was from my professor at University - it boiled down to "take your best estimate then multiply by 3". Needless to say, I thought that as overly cynical view of life until I started working :)

 What happened next was that I either worked in companies that didn't really asked for estimates, just for job done in order of priority, with appreciation on faster the better, or I had to give estimate to project manager, in which case neither of us really knew what's the problem is. Me, because at that point I didn't have enough information to understand the whole problem, project manager because it was not their job to understand technical problem, just to manage resources and timelines. And in those cases I rarely had a chance to revise my estimates based on improved understanding, so above mentioned maxim was very useful when I finally started to see the wisdom in it.

  Second time I really had to think about way I estimate thing was on the interview. Question was about guessing how many golf balls will fit into school bus. It was not fun, since I had no idea how big actual school bus is! I did look it up, and BTW, maximum length is 12.5 meters = 40ft.

After some discussion, it turned out that interviewer wasn't really interested in the anything but the estimation process. He explained that basically, you start with arbitrary number that you know is wrong - i.e. bus is less than 1 yard (or meter) long. Since you know it's wrong, you go to the other end - bus is longer than 15 yards (meters). Well, wrong again. So your length of the bus is average of those 2 - that's the answer. Even if this is more than actual bus length (or less), whatever, that's your starting point of estimate.

  It will take less than a day? Wrong. It will take more than a week? Wrong. Ok it will take 2-3 days then.

 That interview didn't work out in the end, unfortunately,  since what they really needed was Web Forms person, not MVC specialist like me, but it was fun and challenging interview.

  Today I've found this table at http://coding.abel.nu/2012/06/programmer-time-translation-table/

Estimate The Programmer Thinks What the Programmer Forgot Actual Time
30 seconds There’s just a small change to the code to be done. I know exactly what to type and where. It takes 30 seconds to type. Time for starting the computer, the development environment and getting the right source. The time to build, test, check in and document the fix 1 hour
5 minutes It’s a minor thing, I just have to look up the exact syntax on google and fix it. It’s quite rare to find exactly the right information on the first try. Even if it is found, it probably needs some adjustments before it works. Add time for building, testing etc. 2 hours
1 hour I know how to do it, but it’s some code to write so it will take some time. 1 hour is too tight to have any margin for unforeseen problems. Something always fails. 2 hours
4 hours It’s some code to write, but I roughly know the step. I know the Wizzabanga module of our standard framework can do it, but I have to check the documentation on exactly how to call it. This is probably the only realistic estimation. It is large enough to have some margin for unexpected problems, while the task is still small enough to grasp. 4 hours
8 hours I first have to refactor the Balunga class into two, then I’ll add a call to the Wizzabanga code and finally add the new fields to the GUI There’s a lot of dependencies on the Balunga class from different parts of the system. About 40 different files have to be adjusted. The newly added field in the GUI has to be added in the database as well. 8 hours is too large to grasp completely. There will be more steps than the programmer thought of when estimating. 12-16 hours
2 days It’s really quite a lot to code. I have to add some new tables to the database, a GUI for those and then the logic to read and write data to the tables. 2 days of work is too large to overview for most developers. There will surely be things that are missed. Not just small things, but entire major pieces of functionality required will be forgotten during the estimation. 5 days
1 week Ouch… that’s a HUGE task. I don’t have a clue on how to do it, but I can’t say I don’t know. One week should be enough, I hope, I really hope, but I can’t ask for more or they’ll think I’m not competent enough. The task is way too large to get an understanding of for most programmers. It has to be sent back to an architect that can help splitting it in smaller parts and provide some direction how it should be solved. The architect might find a simple way to do it – or find that there’s a lot more work than expected. 2-20 day


  One of the best TV shows I have seen in the long time is "Sherlock", BBC production. It's brilliant, witty and gripping - modern Sherlock Holmes/John Watson in 21st century London. Sherlock texting and Watson having a blog :) Life can't get better than that ;)

  Seriously, great series, and I can't wait to get next season - both actors took a break to film Hobbit in 2012, so I have to wait for at least another year :( Netflix has first season (3 episodes) and other 3 (second season) were aired on TV.

 I've stumbled upon this article this morning:


 and it was good to read that, since Sherlock does not deserve being called sociopath even by himself :)

 I do remember when reading "IT", Stephen King's masterpiece, he was portraying Patrick Hockstatter, and it was scary and terrible portrait. This boy fits in all those 4 categories easily and that chapter scared daylight out of me at the time. It just goes to say how very good Stephen King is at painting his characters - no cardboard characters for him, even for a fairly insignificant boy who shows up only in one or two places. I think "IT" is King's best book, those seven kids felt like an old friends to me after reading the book.

 It also reminded me a bit of Ray Bradbury when protagonists were flashbacking to their childhood and getting nostalgic for a different time; it felt so real, and at the same time so weird to hear things like how much you could buy for a dollar ;( or how rock and roll was forbidden...

Monday, July 30, 2012

Rebuttal of WSJ article about who created interent

 Wall Street Journal had an article stating that internet was invented at Xerox, and that government didn't do anything. Luckily, people involved are still alive and very outspoken - Michael Hiltzik cut his theoryin to shreds:


Especially after that NBC anchor introducing Tim Berners-Lee and admitting to not knowing who he is!

Thursday, July 26, 2012


 I've heard about knockout.js when I was reading one of MVC posts from Steven Sanderson. His books are great, so I took note of that library, but didn't have time to try.

 So I did went to a meetup yesterday, and it was very useful. MVVM pattern is not something I've encountered before - in the nutshell, it's basically separation of UI logic from business logic. It allows for data binding between model and views - in "viewmodel" part.

 To do that, knockout uses data attribute from HTML5 - data-bind construct allows objects to be bound to html elements.

Simple example:


<p>First name: <strong data-bind="text: firstName"></strong></p>

<p>First name: <input data-bind="value: firstName" /></p>

<button data-bind="click: capitalizeLastName">Go caps</button>


function AppViewModel() {
    this.firstName = ko.observable("A");

    this.capitalizeFirstName = function() {
        var currentVal = this.firstName();        // Read the current value
        this.firstName(currentVal.toUpperCase()); // Write back a modified value

// Activates knockout.js
ko.applyBindings(new AppViewModel());

 Interactive tutorial is available on their site:

Knockout.js tutorial

It's very object oriented javascript (who said Javascript is not object oriented language ? :)) and it makes sense when you read the code - it's very good library. I know how to do those things manually in javascript because I have been working with javascript for 10+ years, but this little library makes development easier and end code more readable. 

 Best part is that knockout will be included with Visual Studio 2012, since it works very nicely with MVC 4.0 and jQuery.

Can do attitude

 People in US will never cease to amaze me. When I initially moved to Bay Area, 12 years ago, I went through a cultural shock; it wasn't a big one, but it was unsettling. From realization that I am missing words for everyday things to homeless people in San Francisco, to living in suburb first time in my life (we moved to City since then!) ... on the positive note, smiley everywhere, sunny attitude and really, we've met a lot of friendly people, that helped me to not to feel like a stranger, full of advices and ready to help when we needed help (thanks Ceco!).
 Yesterday, I went to meetup for knockout.js - javascript library I've heard much about but didn't have time to play with to see what's so good about it. Speaker started the presentation flatly stating that he has speech impediment - he stutters! He wasn't bad, actually and whole presentation was very good, but what baffled me was how matter of fact he was - yes, I have the problem, and yet, I do refuse to let that stop me from presenting.

It's hard to explain how strange this sounds to somebody outside of US - you stutter and you want to do public presentation? Really? I am impressed and I think that attitude of "I can do it" is what I really like here - people _do_ believe they can do things, and they do work very hard to make them possible.

It reminds me of that wonderful Mark Twain's book - "Connecticut Yankee in King Arthur's Court" - main character is just sure he can turn things around, or build anything he needs to build - he doesn't doubt that for a second. "I can do it' is such a part of character that it convinces reader too and you are not surprised by changes he made in just couple of short years that he is in 6th century.

It did make me think about the way I am approaching problems, that's for sure. 

Monday, July 23, 2012

Visual Studio 2010 and "Can not create the window" error

 This very cryptic error showed up while Visual Studio was loading. After some digging, turned out that my changes to machine.config caused Visual Studio to complain. I've recreated my entries in machine.config (on both Framework and Framework64 folders) making sure that all tags are properly formatted and error's gone.


Wednesday, July 18, 2012

XKCD.com - Awesome or what?

 I don't know is this because of all that statistics and probablilty classes I had to take, but I have a soft spot for a genetic algorithm and this joke is awesome:


Tuesday, July 10, 2012

Oatmeal versus incompetent lawyer

Confronted with lawyer bent on extortion, he raised 200K for charity, instead of paying ransom of 20K.

Twisted part - they stole his content and they threaten to sue him!

Here's the pile of money before donation:

Thursday, June 28, 2012

Wednesday, June 27, 2012

What the font?


Send and image of the text to figure out what's the font used.

The server was unable to process the request due to an internal error

 The server was unable to process the request due to an internal error

To turn on includeExceptionDetailInFaults, add the following tag in the web.config:
                <behavior name="">
                    <serviceMetadata httpGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="true" />


Tuesday, June 26, 2012

Voyager I is near the edge of Solar system

Voyager I is going to tell us where exactly that border is.

That little capsule is traveling since 1977, and it is still going :) Hats off to Voyager!


I used to watch Carl Sagan Cosmos documentaries when I was little. One of them was dedicated to Voyager journey. There was so much excitement and positive energy then. Carl Sagan was great science teacher, he was one of those rare people with a gift to convey his knowledge and his love for the science.

In the meantime, I think many people stopped believing that Voyager will make it out of solar system. Hearing that both capsules are still going and faithfully sending data back is bringing back some of the enthusiasm of that time.

Monday, June 18, 2012

Streissand effect

So, there is a name for that.
Somebody tries to squash information on Internet, and as a consequence, it explodes, far surpassing original significance:


You would think people will learn by now, but I see it happening again and again and again...

Thursday, June 14, 2012

Rock, paper, scissors, lizard, Spock

 Where lizards come from? For the people watching "The Big Bang Theory", Spock is no brainer - Sheldon's definition of perfect is Spock, but lizard???

 Here's the story behind it:


IE 7 tax

Somebody heard my plea to find a way to stop people from using IE - they are charging IE7 tax to their customers :)


Ok, just for version 7 but still!

Wednesday, June 13, 2012

Javascript MVC library

Sounds promising:


Legend says that crowd is still singing ...

 This was one of the comments on youtube for this song, and I loved it - it showed how awesome Blind Guardian is live:


This is studio version of that same song - Hansi struggling to contain the power of his voice so it will not overshadow the guitars:


Patch Wednesday or why IE is still such a bad idea


Please use any other browser, please!

Why incompetent think they are awesome

 This was very interesting article on Ars Techica about how people who are incompetent are not able to judge how competent they are, because that would require those same skills they are actually lacking.

 End result is that you are flabbergasted how people who are clearly incompetent are so sure they are sharpest knives around.


Tuesday, June 12, 2012

Bits in rain

Gingerbread update and My Touch 4g

I've recenlty updated my TMobile My Touch 4g to Gingerbread and my Swipe become unusable. It couldn't recognize almost any word- it will replace you with Roy. How annoying is that it couldn't recognize even such simple everyday words!

I couldn't figure out what was going on.
 Finally, I've stumbled upon this page:

By default, language is changed to ES (Spanish,) instead of EN (English). No wonder nothing worked! I've changed it and now Swype works perfect again.