Wednesday, 19 May 2010

jPageFlipper 0.9 released!

cars flipper Yesterday in the late evening I made my new project available as an open-source jQuery plugin. jPageFlipper is a page flipper implemented in JavaScript using HTML 5 <canvas> API. It requires no Flash or Silverlight – just a modern browser.

It is based on a page flipping technique described in a wonderful article by Rick Barraza so you can be sure pages move just as they move in real life :)

jPageFlipper is available under the MIT license at Codeplex website: http://jpageflipper.codeplex.com

It’s not ready for production as it needs some polishing and unification though it’s nice enough to say “Wow! It’s in JavaScript”!

P.S. What’s the most interesting, it works on iPad – though veeeeeery slow ;)

Friday, 14 May 2010

Book Review: Adrenaline Junkies and Template Zombies

51JlFQRdMkL._SL500_AA300_

I like books about patterns. Really. They’re not about some silver bullets that can save people, they’re the essence of experience of people who are smarter than I am – and I like it.

I like books about management. Not just project management, but bringing order into chaos – that sort of things.

So what about book about management patterns? I just love it! Really, it’s wonderful. I could buy this book for only its authors but after reading it – I should have bought it even If I didn’t know any of the authors.

This book is a compilation of patterns of project behavior that authors have observed throughout their careers in projects of different sizes and methodologies. There is no complete story – it’s just a set of patterns that can be read from the beginning or from the end – but they should be read. Some things are rather obvious like Dead Fish and some are not like Telling The Truth Slowly. Some are with humor, some are rather sad. Some gave me ideas on how to organize things in my own company (if I ever run one) like Food++. Some are just useful.

Like any other pattern books – it should not be read once and put away. No, it should be read from time to time – at least once a year – just to remember what’s written there. I know I have not much management experience so surely I’ll look at some patterns differently when reading them next time.

As any other pattern it can not be directly applied to any project case. It should be adopted, changed and tuned for each particular case. What’s the use of it then? You have the starting point – you know the idea of what should be done and implementation will follow.

So now, stop reading this and go get one.

Wednesday, 5 May 2010

A small test of HTML 5 canvas

I just want to try whether I can post HTML 5 canvas tricks to my blog :)


UPD: Nope, I can't :(

Monday, 26 April 2010

Expression Blend 4 RC Installation – “File is corrupt”

I’ve downloaded Expression Blend 4 RC two times: from Google Chrome and from Download Master. Each downloaded executable behaves the same: it breaks on unpacking with an error “File is corrupt”.

Capture

I’ve googled about it but the only case I’ve found was exactly the same case with Expression Blend 3 installation. The only possible reason for that error was low system memory. I’ve closed all apps and even restarted my laptop but it didn’t help.

What’s the problem, guys?

Thursday, 15 April 2010

Opera in AppStore – What’s Next?

firefox_iphone_fakeSo Apple has finally allowed some other browser to enter AppStore. What can be a result of this? When there was only one browser – it seemed fine. But when there are two of them – the third and fourth places are logical to come.

The most probable candidate for next iPhone browser is Mozilla with their Firefox/Fennec. It is now available for Nokia’s Maemo platform only but Mozilla mobile department have nice plans for other platforms too. So why not consider iPhone? Yes, it will be risky, but it will be worth it – iPhone/iPad as a platform is a really nice piece of cake.

Wednesday, 14 April 2010

Opera Mini Hits App Store

mzl.dstazqfp.175x175-75

Yes, Apple has allowed Opera to push their new mobile browser to AppStore. To be short: it’s AWESOME. Safari loses on every point I’ve checked for about half of an hour. Opera Mini is FAST, has a plenty of options, it can save pages locally and access them without Internet access.

Go get it in AppStore for FREE!

Tuesday, 13 April 2010

Apple vs Adobe: Success Story

These days only lazy keeps silent on the hottest ‘companies war’ topic: Apple has completely kicked Adobe out of iPhone/iPad devices. I won’t dive deep into this sole fact as you may read about it here and there:

  1. mashable.com/2010/04/10/steve-jobs-adobe/
  2. billmackin.com/2010/03/can-apple-kill-flash/

The question is: how can this end? Let’s have a look at the best possible (but though realistic) variant. At the end we need two happy companies: Apple and Adobe. What will make Adobe happy:

  1. Adobe Flash on iPhone/iPad – directly or via indirection layer
  2. Access to Mac OS X hardware acceleration API – for Flash Player

What will make Apple happy (keeping in mind same points for Adobe):

  1. Jobs gets his revenge
  2. Mac OS X gets fast and stable Flash Player

This maybe only a shallow view but it covers main points that bother us, users. How can both companies become happy in this conflict? If Apple gives Adobe their p.2, Adobe will provide p.2 that Apple needs. If Apple has nice and fast Flash Player on Mac OS X, why not put it to iPhone/iPad?

The only uncovered point is Jobs’ revenge and it’s the hardest point to answer. Maybe he’ll get satisfied if Adobe products will release for Macs a month before Windows release or some other candy from Adobe that fits his specific taste.

Are these points too hard to match for two mature companies? I think not. So why the hell users suffer the most?

Tuesday, 16 March 2010

Windows Phone Development Follow-Up

Yesterday at MIX 10 Microsoft has finally announced development details for their new Windows Phone 7 mobile OS. So what do we know now?

1. We may use Silvelight OR XNA to build applications for WP7!  Silverlight will be used mostly for business applications and simple games and XNA will be used for building heavy 3d games.

2. Development tools for Windows Phone 7 are absolutely and totally FREE! Following this link you may download Windows Phone Developer Tools CTP that includes the following tools:

  • Visual Studio 2010 Express for Windows Phone CTP
  • Windows Phone Emulator CTP
  • Silverlight for Windows Phone CTP
  • XNA 4.0 Game Studio CTP

Yet another (but not required) tool that can be used for WP7 development is Expression Blend 4. It’s not free but users of version 3 may freely upgrade their installations.

3. You may develop your applications in emulator or at your real phone as many times as you wish. If you want to place your application to Windows Marketplace – you’ll have to pay $100 for a developer license. It’s not really a huge sum keeping in mind that people who post applications to Marketplace will get a 70%-off from price of any application there.

4. Microsoft has also provided a free e-book on WP7 development written by Charles Petzold. It’s not finished yet but has first six chapters that are quite enough to dive into the topic.

5. First phones from Windows Phone 7 Series will appear on market in August. It gives us enough time to learn Silverlight WP7 development and publish our shiny new applications to Marketplace.

It’s really juicy and provides great opportunities for .NET developers. Let’s ride that wave!

Friday, 12 March 2010

MIX sessions I want to have a look at

I’ve browsed all upcoming MIX sessions and chose several worth watching:

Open Standards
HTML5 Now: The Future of Web Markup Today
The Mono Project
SVG: The Past, Present and Future of Vector Graphics for the Web

UX
Design Fundamentals for Developers (and Other Non-Designers)
Great User Experiences: Seamlessly Blending Technology and Design
Designing Rich Experiences for Data-Centric Applications
Total Experience Design
The Elephant in the Room
An Hour With Bill Buxton
The Laws of User Experience

Ruby, Python, PHP
IronRuby for the .NET Developer
Pumping «Iron» on the Web: IronRuby and IronPython

jQuery

Six Things Every jQuery Developer Must Know
How jQuery Makes Hard Things Simple
Building a Next-Generation Web Application with Microsoft ASP.NET MVC 2 and jQuery

Cloud Computing

Designing and Delivering Scalable and Resilient Web Services
Opening Up Opportunity with Twitter
Lap around the Windows Azure Platform
Building Platforms and Applications for the Real-Time Web
Microsoft Silverlight and Windows Azure: A Match Made for the Web

Windows Phone 7

Overview of the Windows Phone 7 Series Application Platform
Windows Phone UI and Design Language
Building Windows Phone Applications with Silverlight
Windows Phone Application Platform Architecture
Silverlight Performance on Windows Phone
Development and Debugging Tools for Building XNA Games for Windows Phone
Distributing and Monetizing Windows Phone Applications and Games
Building Windows Phone Games
Building a High Performance 3D Game for Windows Phone
Designing and Developing for the Rich Mobile Web

Silverlight

Microsoft Silverlight 4 Boot Camp
Microsoft Silverlight 4 Overview: What's in Store for Silverlight 4?
Authoring for Microsoft Silverlight 4 with Microsoft Expression Blend
The Microsoft Silverlight Analytics Framework
Stepping Outside the Browser with Microsoft Silverlight 4
Building the eBay 2 Minute Lister with Silverlight
Microsost Silverlight 4 Business Applications
An Introduction to Developing Applications for Microsoft Silverlight
Debugging Microsoft Silverlight Applications
Introducing the Silverlight Rough Cut Editor
Developing with WCF RIA Services Quickly and Effectively
Unit Testing Silverlight and Windows Phone Applications
Building an Accessible Microsoft Silverlight Experience
Securing Microsoft Silverlight Applications
Microsoft Silverlight Optimization and Extensibility with MEF
Principles of Microsoft Silverlight Graphics and Animation
Developing Multiplayer Games with Microsoft Silverlight 4
Flash Skills Applied to Microsoft Silverlight Design and Development
Developing Natural User Interfaces with Microsoft Silverlight and WPF 4 Touch
Building Large-Scale, Data-Centric Applications with Silverlight
Search Engine Optimization for Microsoft Silverlight
Accessing Web Services in Microsoft Silverlight
Building Finance Applications with Microsoft Silverlight 4
Creating Effective Info Viz in Microsoft Silverlight
An Enterprise Perspective on Silverlight 4

Internet Explorer 9

In-Depth Look at Internet Explorer 9
High-Performance Best Practices for Web Sites
Internet Explorer Developer Tools

.NET, ASP.NET, MVC

Microsoft ASP.NET MVC Boot Camp
Beyond File | New Company: From Cheesy Sample to Social Platform
What's New in Microsoft ASP.NET MVC 2
The HaaHa Show: Microsoft ASP.NET MVC Security with Haack and Hanselman
Driving Experiences via Services Using the Microsoft .NET Framework
Building Great Standards-Based Websites for the Big Wide World with Microsoft ASP.NET 4
Web Deployment Made Awesome: If You're Using XCopy, You're Doing It Wrong
Improving Software Quality for the Modern Web

Labs, New tech, Tools

Designing Bing: Heart and Science
Advanced Web Debugging with Fiddler
Reactive Extensions for Javascript

Media

Media Processing Workflow
Microsoft Silverlight «Media»: Moving at 60fps

Patterns

Understanding the Model-View-ViewModel Pattern
Build Your Own MVVM Framework

Design

A Case Study: Rapid WordPress Design and Prototyping with Expression Web 3
Dynamic Layout and Transitions for Microsoft Silverlight 4 with Microsoft Expression Blend
Prototyping Rich Microsoft Silverlight 4 Applications with Microsoft Expression SketchFlow

SharePoint

Designing Corporate Web Sites using SharePoint 2010
Building Rich and Interactive User Experiences in SharePoint
Designing an Internet-Facing Web Site Using SharePoint 2010

Thursday, 11 March 2010

Wonderful Microsoft Gears

Picture provided by Victor Lazarevich:

Gears

Guess, will this system work? :)

Tuesday, 9 March 2010

My small PowerShell presentation

This is my presentation from Intetics internal workshop:

Saturday, 6 March 2010

Using Push-Location and Pop-Location in PowerShell

All popular shell environments have a wonderful tool named directory stack. It allows you to jump there and here in different directions and be able to return to some saved points. This feature really rules when you have to intensively work with command line. It’s really nice that PowerShell designers have implemented it with Push-Location and Pop-Location cmdlets. These cmdlets have standard pushd and popd aliases that are familiar to all *n?x and CMD gurus.

pushd is similar to cd with the only difference that it saves your previous location before moving to a new one. popd is a pair for pushd because it pops the last saved directory and changes your current directory to it. This concept is really simple, isn’t it? :)

So how to ease learning these commands? As for me I’ve:

1. Added my custom aliases to these commands

Set-Alias pd pushd
Set-Alias ppd popd

This allows me to use pushd as easy as cd. popd is a bit more complicated (1.5 times!) but it’s a good point for not losing your context accidentally.

2. Modified my prompt to display current directory stack depth

  $_locationStackDepthString = New-Object string ([char] '+'), (Get-Location -Stack).Count

Now each time when I dive deeper into directory stack I get a ‘+’ sign in front of my prompt and when I pop out I return to previous prompt state:

PowerShell pushd popd

Enjoy!

Friday, 5 March 2010

My PowerShell prompt

Just wanted to share it :)

function prompt
{
  $_locationStackDepthString = New-Object string ([char] '+'), (Get-Location -Stack).Count


  $color = 'Yellow'

  Write-Host '>> ' -nonewline -ForegroundColor $color
  Write-Host $(Get-Date -Format T) -ForegroundColor 'Green' -NoNewLine
  Write-Host " " $PWD.Path -ForegroundColor 'Cyan'
  Write-Host ($_locationStackDepthString + '>') -nonewline -ForegroundColor $color


  return " "
}




It shows current time, folder, uses a separate line for commands and displays current depth of pushd/popd commands (I use them rather intensively).

Thursday, 18 February 2010

Using XmlPeek and XmlPoke in PowerShell

<xmlpeek /> and <xmlpoke /> commands in NAnt are really useful when it comes to changing configuration files during your automated build process. But do we do when we need that functionality in PowerShell? I did not find any native implementation but it's really easy to implement your own. Here it goes:

function xmlPeek($filePath, $xpath) {
    [xml] $fileXml = Get-Content $filePath
    return $fileXml.SelectSingleNode($xpath).Value
}

function xmlPoke($file, $xpath, $value) {
    $filePath = $file.FullName

    [xml] $fileXml = Get-Content $filePath
    $node = $fileXml.SelectSingleNode($xpath)
    if ($node) {
        $node.Value = $value

        $fileXml.Save($filePath) 
    }
}

It accepts FileInfos so it can be easily used together with Get-ChildItem:

Get-ChildItem P:\MyProject -Include *.config -Recurse | %{ xmlPoke($_, "/configuration/connectionStrings/add[@name='MainConnectionString']/@connectionString", "DataSource=MyDB") }

Enjoy! :)

Tuesday, 16 February 2010

What is Windows Phone 7 Series for developers?

Internet is buzzing all around about new Windows Mobile OS - Windows Phone 7 Series. Presentations are awesome, UI is nice and usable. At last Windows fans have something mobile to be proud of :)

But what is this event for us, developers? As an iPhone user and .NET developer I was rather anxious to people who could write programs for their phones and sell them at market. But looks like things have changed. We'll have a nice .NET environment at new phones - that's a fact. However, base technology still remains uncovered. According to Scott Guthrie:

re: Windows Phone 7 development: I can't say more right now other than we'll discuss it at MIX - and that it is very, very cool.

I'm not sure but I think Silverlight will be this technology. As I can judge from presentations it is already supported at WP7S devices. All needed is to allow Silverlight applications to run out of mobile browser and become an application that user can run just like Mail or Calendar. And that feature is already present in Silverlight 3 so guys have to work just a little bit more to make us very happy.

What will be next? I think I'm not the only one who wants to write mobile .NET applications so perhaps we'll see a mobile development boom in .NET community. More Silverlight developers, greater Windows Phone adoption, huge popularity raise for Expression Blend and Visual Studio - wonderful situation for Microsoft.

All these are just suggestions and we'll have official details only at MIX that will take place in March 15-17 in Las Vegas. Keeping in mind that we'll see Internet Explorer 9 there - it will be an Event.

Friday, 12 February 2010

What do I need from Internet Explorer 9?

That's a really interesting question. I did not use any Internet Explorer as my main browser before Internet Explorer 8. IE8 changed my mind a bit and I've been using it for about a month and a half. Why did I jump off:

  1. Tabs opened slowly
  2. Pages loaded slowly
  3. No nice CSS features like border-radius
  4. Misses some FireBug features (although see next p.1)
  5. Too large header bars (comparing to Chrome)

What I liked:

  1. Wonderful tool for developers, it's my favorite at the moment (better than FireBug!)
  2. Tab grouping
  3. Extensibility

After IE8 I've tried to return back to Firefox but I could not stand it's strange behaviors anymore so I've switched to Chrome. What do I like in Chrome:

  1. Damn it's fast
  2. It's fast
  3. Did I mention it's fast?
  4. It has neat interface

So, what do I want from IE9? That's what:

  1. Please fix what I disliked in IE8
  2. Please add what I like in Chrome

This is a simple recipe, isn't it? :)

Saturday, 6 February 2010

Mock or stub?

When I was just getting into unit testing the subject question was rather hard to me: it’s not actually obvious for a novice. The answer to it came from a unit testing book I think is very nice and useful - “The Art of Unit Testing” by Roy Osherove.
Mock or stub?

So what’s the core difference between mock and stub? The answer is: mocks can fail tests and stubs can not. You may think this minor point is not important but it is. Basically when you test something you have the following two components: code under test (CUT) and test itself. There are two different cases for testing:

1. You may run CUT and validate it results – it’s actually testing CUT internals

2. You may run CUT and validate how it communicated with some external service – it’s actually testing CUT externals

The first case usually accompanied by stubs – some stub objects that you use to pass initialization information to CUT. They just provide data and do nothing more.

The second case is usually accompanied by stubs and a mock. Let’s say you have some IExternalService your CUT communicates with. After running CUT you want to be sure that two IExternalService methods were called with some valid parameters. You can write some custom class that implements this interface but the simplest option is to use a mock. Mock allows you to specify what methods in what order with what parameters should be called. After CUT run you can validate mock and see whether it fits your expectations.

The rule of thumb here is to have one mock in your test at max. Why is that? The answer is simple: when you use two mocks and validate both of them in a single test it means that you test two different pieces of logic in one test. That may be a result of scattered logic (violation of Single Responsibility Principle) or just a bad test design – anyway it’s a bad practice. What though should be remembered is that you can use as many stubs in your test as you wish – they just provide initialization data and can’t fail your test.

Wednesday, 3 February 2010

The Law of Leaky Abstractions

The concept of leaky abstractions was introduced by Joel Spolsky in his blog 7 years ago, but it's not as widely known as it deserves. So here is the basic definition:

All non-trivial abstractions, to some degree, are leaky

This simply means that if you're trying to hide something beneath your abstraction layer - it will almost always show itself up. These errors are hard to detect and have severe consequences. There are many examples of leaky abstractions:

  1. Some SQL queries are thousand times slower than their logical equivalents - DB implementation leaks into SQL
  2. SQL, in its turn, has abstractions over itself like NHibernate or Linq to Sql - and rather often you have to deal with SQL directly losing many abstraction benefits
  3. When you program GWT and write your code in Java it is later on translated to JavaScript. And what can be more confusing than having a JS error from running your Java code? :)
  4. .NET is an abstraction over Win32 and it has leaks sometimes - rarely, but these rare cases make people mad
  5. Any component framework like ASP.NET or JSF hides HTML/CSS and JS beneath them - guess what problems you may have?

What can be a conclusion of all above? It's all in Joel's original post!

Never hire a developer for working with some abstraction if he doesn't know direct underneath layer of it

It may sound strange or may be offensive for some of us but it's rather obvious: you should not hire an ASP.NET developer if he is scared of JavaScript or hire a so-claimed NHibernate guru if he doesn't know what 'DISTINCT' is?

Sunday, 31 January 2010

Book Review: “The Passionate Programmer” by Chad Fowler

I’m a huge fan of books and from now on I’ll write a review on each technical (or may be not) book I read. The first book reviewed will be a wonderful book by Chad Fowler: "The Passionate Programmer”. Actually, it’s full name is “The Passionate Programmer: Creating a Remarkable Career in Software Development”. This is what this book is about – your career.

Chad Fowler is a great programmer, Ruby practitioner, musician and conference organizer. He recently lived and worked in India, setting up and leading an offshore software development center. He is co-founder of Ruby Central, Inc., a non-profit corporation responsible for the annual International Ruby Conference and The International Rails Conference, and is a leading contributor in the Ruby community.

As the author highlights, your career is the most important project in your life and you, as it’s result, is the most valuable product of it. That really makes sense if remember that your time is the most valuable resource: you can’t replenish it.

As Chad assumes you are a product, he splits his book into parts on how to promote this product:

  1. Choosing Your Market
    Here Chad describes what you should be and what niche you should take, what skills to develop and what technologies to specialize in.
  2. Investing in Your Product
    This part is about how to develop yourself, not what but how. How you should sharpen your skills, how you should choose a mentor.
  3. Executing
    Where to apply yourself, how much you are worth, how to behave in stress situations – you are a product and this part is about how to execute you and produce value.
  4. Marketing… Not Just for Suits
    Advertise yourself, make people believe you’re the one they need, be public – the marketing of product from all practical aspects.
  5. Maintaining Your Edge
    You’re at the top, you’re the king – but what next? Chad devotes this part to you-product maintenance: looking for future employments, planning your next career steps.

This book is good. Very good. My favorite statement from it is “Be the worse” – be the worse in your team meaning that all around are better than you. In this case you’ll grow up much faster than in any other case.

Thursday, 28 January 2010

Joining your social bits in one service

I'm using Twitter as my main way to express myself to other people. It's ultimately nice for sharing links and thoughts. However, I had also two other services that I could not synchronize with Twitter... since now.

Welcome, here come the TwitterFeed! Wonderful tool for joining all your services into one:
1. Google Reader - I share items time to time and now they are automatically reposted to Twitter. Step-by-step tutorial on how to configure TwitterFeed to get your Google Reader items - http://goo.gl/s0NK
2. Blog - my monthly posts rate is extremely low these days but I promise I'll speed up :) This post will be the first one automatically reposted to Twitter.

Also TwitterFeed plays nicely with OpenID so feel free to expose your Google or MSN account to it.