Handjob porn freesex dildo video

Visual Studio Achievements, now a reality! January 18, 2012 1,458 Comments

A year ago we posted a humorous blog post What if Visual Studio had Achievements?. It received great response which spurred a lot of new discussion about various funny and informative gaming-like achievements.

Guys from Microsoft’s Channel 9 took this idea seriously and developed it into a quite real Visual Studio Extension. They’ve launched the beta today, be sure to check it out. Here’s also an introduction from Microsoft’s Karsten Januszewski and the project home page contains a list of all the current achievements.

Unlocked an achievement

Currently unlocked achievements

Download Visual Studio Achievements Beta, Project Home Page – check the list of achievements

Poyomi: Big Summer Update June 13, 2011 316 Comments

Poyomi, our book creation service, has received a lot of new exciting features! You can also read a bit more about its technical background.


You can now register and Sign In to Poyomi. By doing this you can keep track of your books in a single place. Expect more features that will require an account, so Sign Up today!

Advanced mode

We’re known for our simple approach to photo books, but sometimes you just need more control. With the new Advance mode, this is now possible. Assemble building blocks into your own book, add text pages with full page background photos and expanded photos that span to the very borders of pages. You can also simply drag and drop blocks around to reorder them to your liking. Its a god-send. Bless the researchers who developed flagyl online. Switch to the Advanced mode by clicking on its icon in the upper right corner.

Advanced Mode

Text editor

Text pages were one of the most often requested feature, and here they are! Select from color themes, typographies, alignments and add a cool full page photo and make a great introduction for your book. Adolescents under 18 years old and elderly men over 65 years have not been involved in the clinical trials of online propecia (Finasteride) buy. Or create a really big book with several chapters and photo collections – great for photo books from long holidays!

Text editor

Note: this is currently available only in the Advanced Mode. Simple Mode version coming soon!

Self publishing

Want to sell your photo books? Now you can! Create a book at Poyomi and publish it with MagCloud. They offer print and digital distribution and many options for self-promotion. Contact us for more information!

Published to MagCloud

Note: You need accounts both at Poyomi and MagCloud.

Publish to iPad

By Publishing to MagCloud (see above) and choosing free digital distribution, your book will also appear in MagCloud’s free iPad application! Contact us for more information!

MagCloud iPad application


With this update we have established a great basis for added features and we’ll have more updates in the coming weeks. First features to be added are the option to save books to your account while they are still in the editing phase and custom branding options. A Poyomi account will be required for both of these features. If you have an idea for some more, leave us a message!

What if Visual Studio had Achievements? January 25, 2011 1,723 Comments

What if Visual Studio supported achievements, just like games on Steam, Xbox or PS3? Bragging to your coworkers about which one you’ve just unlocked, imagine that! Here’s a little proposed list for some of them. .NET / C# flavored, of course.

  • Falling Down – Created a new SharePoint project
  • Job Security – Written a LINQ query with over 30 lines of code
  • The Sword Fighter – 5 Consecutive Solution Rebuilds with zero code changes
  • Shotgun Debugging – 5 Consecutive Solution Rebuilds with a single character change
  • The Mathematician – Defined 15 local variables with a single character name
  • The Academic – Written 1000 lines of F#
  • Spaghetti Monster – Written a single line with more than 300 characters
  • Wild One – Mixed tabs and spaces for indentation more than 5 times in a single line
  • The Organizer – Created a Solution with more than 50 projects
  • The Portal – Created a circular project dependency
  • The Multitasker – Have more than 50 source files open at the same time
  • The Code Keeper – Uninstalled Resharper because it made you redundant
  • Pasta Chef – Created a class with more than 100 fields, properties or methods
  • Procedural Programmer – Created a method with more than 10 out parameters
  • Steam Powered – Added Visual Studio as a Steam game
  • The Poet – Written a source file with more than 10,000 lines
  • The Enterprise – Build Solution took more than 10 minutes
  • Highway to Hell – Successfully created a WCF service
  • The Explainer – Written a comment with more than 100 words
  • TPS Reports – Created a Crystal Reports Project
  • Rage Quit – ALT+F4 after a failed bug fix
  • Ooooh Shiny – Written 100 extensions methods
  • Look Ma – Written an infinite Fibonacci generator using yield
  • The Engineer – Killed a zombie with The Wrench
  • The Architect – Created 25 Interfaces in a single project
  • The Right Way – Test method is longer than the tested method
  • The Defender – Checked every argument for null exceptions
  • Pokemon Programming – Caught all the exceptions
  • Black Magic – Implemented a RealProxy
  • Gimme back my ASM – Used ILGenerator
  • I’m Sorry – Created a new Visual Basic Project
  • The SEO Expert – ASP.NET MVC Routing table with more than 100 routes
  • The Matrix – Windows Forms with more than 100 controls
  • The Daredevil – UpdatePanels nested more than 3 layers deep
  • Just a Test – Nested multiline C-style comments that caused a compilation error
  • Warm Bath – Successfully consumed a non .NET SOAP web service
  • Old School – Defined more than 100 static objects
  • The Cloner – Copy-pasted more than 50 lines
  • The Dependency – Referenced more than 30 projects
  • Paying the bills – Imported a Visual Basic project
  • First Hit – Included a Codeproject.com library into your project and it actually compiled
  • Paula – Define a firstname field with value Brillant
  • Every Option Considered – Created an enum with more than 30 values

Inspired by Steam Holiday sales and Battlefield Bad Company 2. Odd web coding exposed on the most minimalistic company page possible. Enjoy.

Update: Jeff Sandquist from Microsoft’s Developer Relations told us that they are going to make this happen! Check out their Coding 4 Fun and Channel 9 projects. More details to follow.

Update 2: An extension is now available for Visual Studio!

ASP.NET MVC, session state and concurrent requests: not what you’d expect September 28, 2010 1,932 Comments

Using ASP.NET’s session storage and management providers for web applications is a no-brainer. User’s preferences, external API access tokens, uploaded documents, you name it, it usually makes sense. We’ll move it into the database when it gets too big, right?

Our new photo book creation and printing service, Poyomi (a little tech intro) uses the session state via MVC’s wrapper class HttpSessionStateBase which is provider as the SessionData property on a MVC controller. We store pretty much everything before the finished photo book is assembled: cover design, book’s designed pages, photo assembly preferences, perhaps an access token for flickr or SmugMug…

Poyomi has to render many preview images for a client, doing it so asynchronously by offloading the rendering work to backend servers. A single page’s design and contained photos come from a serialized object in the session itself, that is then transferred via AMQP to the queue processor. All the MVC web app has to do is to wait for the response and pass it over to the client.

Since each photo book contains many pages, browsers will try to load images using multiple concurrent requests at the same time. That shouldn’t be a problem for the massively threaded queue processor and a simple MVC app, right?

Unfortunately, no. All of the little thumbnails were being loaded sequentially and the backend was doing just a single rendering job at a time. What was going on? I took a look at IIS’ requests page (IIS manager > Home > IIS section > Worker Processes > Right click on the Pool > View Current Requests).

IIS requests trace

Huh? A single request at a time. Talk about abysmal performance.

More consequences on typical ASP.NET MVC websites

AJAX requests often get used to offload time intensive operations. In case all of your HTTP requests, AJAX or not, demand the usage of the session data, they will all block each other. In case the user decides to “cancel” the current background operation by clicking on a link to another page on your site, the execution of it will be delayed until all of the existing requests finish processing.

ASP.NET’s session state

Digging and debugging revealed that it all has to do with the way ASP.NET handles session access. You can read about it more at MSDN.

By default, no concurrent access to the session state is allowed. Even read-only requests (as far as the session is concerned) will be locked exclusively to prevent potential corruption of its state. There is a global or per-ASPX-page setting called EnableSessionState to alter this behavior: either by disabling the session state altogether… which isn’t really useful in our case… or by marking certain pages as being read-only and thus enabling parallel execution of read-only requests. Yay! But what about our cool and modern ASP.NET MVC 2 application?

Well, it can be done. But doing so requires a visit to the MvcFutures department. I’ve found a single lone blog post that describes the required changes to your MVC execution flow – presumably by a coworker of the one that programmed the solution. Essentially, it implements a new controller factory that is able to set the session state mode per the controller being executed.

Setting the session state mode in ASP.NET MVC 2

  1. Download the MvcFutures library. Add a local reference to the Microsoft.Web.Mvc.dll library.
  2. Add the module into your project’s Web.config to load the dynamic session controller factory. Add the highlighted lines:

      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
      <add name="MvcDynamicSessionModule" type="Microsoft.Web.Mvc.MvcDynamicSessionModule, Microsoft.Web.Mvc, Version="/>
    <modules runAllManagedModulesForAllRequests="true">
        <remove name="ScriptModule"/>
        <remove name="UrlRoutingModule"/>
        <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
        <add name="MvcDynamicSessionModule" type="Microsoft.Web.Mvc.MvcDynamicSessionModule, Microsoft.Web.Mvc, Version="/>

    Add this module after the routing module.

  3. Tell MVC to use the new dynamic session controller factory by instantiating and assigning it in your Global.asax.cs file:

    protected void Application_Start() {
        ControllerBuilder.Current.SetControllerFactory(new MvcDynamicSessionControllerFactory());
  4. Use the session state attribute on your controller:

      public class AjaxReadonlyController : Controller {

    Other state modes are: Required (equivalent to Default), ReadOnly and Disabled.

Enjoy your high-performance website!

Using Autofac with DynamicSessionControllerFactory

If you are using Autofac for dependency injection (and why aren’t you?) you’ll have to nest the two controller factories. Global.asax.csApplication_Start:

var factory = new AutofacControllerFactory(ContainerProvider);
var dyn = new MvcDynamicSessionControllerFactory(factory);

Also, be warned that you cannot inject the session data object into your classes anymore. For example, if you were using something akin to:

var builder = new ContainerBuilder();
builder.Register(s => HttpContext.Current.Session).As().HttpRequestScoped();

…then this won’t work anymore. The controller’s SessionData property is null until MVC gets around to executing your method. You’ll have to pass it to instances that were already instantiated by Autofac’s controller factory at execution time.

In conclusion

I’m sure that almost every MVC project uses the session for storage of little tokens, strings, counters… which by default blocks the execution of parallel requests. Surprisingly, almost no one blogged about this before. Hopefully this article will add some exposure to this problem.

All of this applies to ASP.NET MVC 2, the latest production ready version. Please let me know if this is going to be implemented in MVC 3 without the usage of MvcFutures!

Poyomi’s architecture: .NET meets NoSQL and AMQP September 21, 2010 264 Comments

Venice sample book
Some of our sample books

Welcome to our first behind the scenes post, an upcoming series of technical articles about Poyomi, our new photobook creation and printing service.

Handling lots of incoming photos, processing them and rendering live previews as fast as possible shouldn’t be a problem with todays powerful server configurations, but doing so with good scalability options certainly requires a special architecture. Here’s out approach.

Our company’s primary development platform is .NET 3.5 with C# 3, which might have had a reputation as being a bit of Microsoft-centric when it comes to interfacing with database engines, but lately this isn’t the case anymore. For Poyomi, we use two “next generation” backend products: CouchDB key/value database and RabbitMQ message queuing server.

Website’s backend is written in ASP.NET MVC and is meant to use as little CPU resources as possible – almost everything is offloaded to the Queue Processor (homegrown package) by sending a message to one of the message queues on the RabbitMQ server. The underlying AMQP protocol is bi-directional, so messages are sent and received with millisecond latency – no polling for messages every few seconds! Even serialized messages in the megabyte range are handled nicely – for instance, a newly uploaded photo from a user.

Consuming the real-time message queue is a job for our custom .NET / C# Queue Processor (the plan is to open source it some day, keep bugging us). It handles message serialization, resource limiting (each CPU gets a single job of this type), task status reports (via CouchDB), logging, task chaining and much more. Some of the tasks that we handle asynchronously by offloading them to the QP instead of doing them in MVC (gah!):

  • Resizing images to thumbnail sizes
  • Rotating images
  • Rendering a live preview of a spread
  • Validating uploaded photos
  • Downloading photos from external sites like flickr
  • Arranging photos on a single page with a special, CPU intensive algorithm
  • Calculating photo’s color clusters
  • Rendering the final PDF: One task per two pages in a PDF, so adding more QP consumers almost linearly decreases the time needed for the final assembly!
  • Little tasks like sending notification emails, contact emails, …

All of the previews are rendered in real time.

Photo storage duties are handled by CouchDB, a NoSQL Key-Value database with a HTTP REST interface. Everything is stored as a JSON document, with one very useful feature that we exploit fully: binary attachments. Each photo is stored as a single document with multiple image attachments – the original photo and various thumbnails. No more scattered files all across the filesystem, everything is kept together!

Querying for all of a particular user’s photos is done with CouchDB’s views – a map-reduce system for database queries. The mapping and reduction functions are written in JavaScript and kept in a special JSON document. But its main strength is querying for documents by its ID (the primary key, in SQL speak). Non-blocking, really fast and reliable, it works like a charm for things like task status updates and photo meta information.

Overall scalability is ensured by adding more message queue consumers – Queue Processors. Bringing one up is really easy, since the only two required connections are to RabbitMQ and CouchDB. A pair of configuration variables for each of those, host and port, that’s it. No more network shares or NFS mounts for storage, everything is handled via HTTP and AMQP. We love this.

Our MVC and QP servers are Windows machines, while RabbitMQ and CouchDB sit on a Linux server alongside nginx for web proxying and caching duties.

We’re proudly using many open source libraries, thanks guys! Here’s a little list: Divan, a CouchDB client, RabbitMQ’s AMQP client for sending and receiving queued messages, Json.NET for serialization duties, PDFSharp for PDF authoring, Autofac for Dependency Injection, FlickrNet for consuming flickr’s API and Yahoo’s YUI Compressor for .NET.

Please let us know what you’re most interested in for the next in the series of technical articles – take a look around, you’re sure to find something technically interesting! And the photobooks aren’t that shabby looking either.

New service: Poyomi September 14, 2010 276 Comments

We’ve launched a new online photobook creation service named Poyomi. Have fun, shipping is available worldwide!

There’s lots of fun .NET stuff going on behind the scenes with some newcomers in the backend: CouchDB and RabbitMQ. We’ll try to prepare a presentation / slideshow of our experiences as soon as we’re ready.

Job opening at While True: Frontend developer June 3, 2010 108 Comments

We’re looking for an experienced website frontend client-side developer – XHTML, CSS, Javascript and jQuery code should be almost second nature for you. Experience with C# or ASP.NET MVC is a big plus. You’ll have fun working on an innovative, international photobook project. Please send your resume with samples of your work to jobs@whiletrue.com.

Job opening at While True: Testing engineer/developer August 18, 2009 76 Comments

We need your help with automatic testing and development of MagCloud, a quickly rising cloud publishing service. Experience with latest happenings in .NET, C# and web development world are a big plus. You’ll be working in Stegne, Ljubljana, SI. Send examples of your work (code, links, references) and a CV to jobs at whiletrue dot com.

NT konferenca 2009: Continuous integration May 26, 2009 70 Comments

Demo source code (6.17MB) from the talk “Continuous integration: good, bad and the ugly” given at the NT konferenca 2009 in Portorož, Slovenia. Check the included Readme file for instructions.

ASP.NET MVC Performance April 17, 2009 388 Comments

A closer look at the recently released ASP.NET MVC 1.0 preffered web development stack and some of its performance implications. All of the displayed techniques are in use in production at MagCloud.

The talk was first given in Slovene on 15.4.2009 at a local Microsoft developers user group, SLODUG.

Additional notes:

We cannot assume that only implementing database caching will lead to a significant performance gain before optimizing any other aspects of page’s rendering. Here’s a few more metrics for the DUGG application:

  • First run, as in the slides, no optimizations whatsoever: 5.9 requests / second
  • Added: Compiled SQL-LINQ queries: 6.88 requests / second
  • Added: Fully cached SQL-LINQ queries: 7.43 requests / second/
  • Removed: expression links, replaced with route and actions links. Also fixed path to partials with the full path: 112 requests/second

That still leaves room for the treble performance improvement with URL caching and views that render enumerations.

It’s one of the general rules of optimizing software that speedups in one part of the application will have a lot of consequences elsewhere which you can’t really predict. Test, measure, profile, optimize a single hotspot, repeat!

Errata (23.4.2009)

Thanks to Simone Chiaretta’s analysis of my results, he’s nailed it that I forgot to disable the debug mode for benchmarks (oops!). This disables ASP.NET MVC’s internal cache for paths to views, rendering my part of optimization notes to replace paths to views with full paths irrelevant. I’ve re-run all of the benchmarks, removed two slides and added an errata to the end of the slides.

It would be nice if I can be proven wrong on other points as well. :)

Marking variables in VS.NET Debugger July 20, 2007 78 Comments

Technorati Tags: ,

Even after using Visual Studio for years (previous versions at least), you can always find hidden features.

If you are debugging and have watch window open, you can click on “Make Object ID”. This will create ID for specific object or its member. You will get id’s such as 1#, 2# etc.

Click on

From now on, you can use


even when this variable is not in scope. Quite useful for multithreaded debugging or for debugging code where you want to track specific objects through many layers.

object id's

Simple programming language performance benchmark(C# vs. Java vs. C++ vs. Ruby) May 8, 2006 250 Comments

After writting last entry on installation of .NET and Java runtimes I did a bit of searching. I noticed that one of very popular contest is .NET versus Java or C/C++ versus Java or C/C++ versus .NET (ok, I haven’t actually seen the last one in the wild, but I am sure it exists).

I have worked with all languages mentioned above. Assuming competent programmers, C/C++ with good compiler wins. Java and C# are usually about the same. I recently participated in one of the contest of topcoder.com. This confirms my statement. Also, keep in mind that coders in this contest are quite good and that Intel optimizing compiler is used, which supports SIMD (Single Instruction Multiple Data) instructions and is supposed to do vectorisation and other cool stuff.

Now, the funny part. For the many (most?) applications language (and platform) speed is not important. Even if one platform is 2x faster then the other, that is relatively unimportant. Of course, there are exceptions. You want games to be fast, image and video processing should be fast. But once application response time for any input is below, say, 0.1 s, there is rarely reason to optimize it.

I have been doing quite a lot of Ruby (on Rails and pure Ruby). Now, Ruby is slow. But writting code is fast (Rails is also awesome web framework). You might not want to base your Google killer search engine on Ruby but for many applications, Ruby is fast enough.

Now, I will stop talking and actually do some testing. Below is source code for very simple performance test.
The code itself has no significance. I only wanted two loops and some operations. Timing was done from batch files.
Timer started before the program was started and ended after program exited. So start-up times WERE included in the time.


using System;
class Perf
public static void Main()
long val = 0;
for (int x = 0; x < 10000; x++)
for (int y = 0; y < 100000; y++) val += y + x;
Console.WriteLine("Val = {0}", val);


class perf
public static void main(String[] args)
long val = 0;
for (int x = 0; x < 10000; x++)
for (int y = 0; y < 100000; y++) val += y + x;
System.out.println("Val = " + val);


using namespace std;
int main()
long long val = 0;
for (int x = 0; x < 10000; x++)
for (int y = 0; y < 100000; y++) val += (y + x);
cout << "Val =" << val << endl;
return 0;


val = 0
0.upto(10000) do |x|
0.upto(100000) do |y|
val += x + y
puts "Val = #{val}"

This was run on 1.7 Ghz IBM Thinkpad with 1.5Gb of RAM and Windows XP Professional SP2 (not that RAM is important here, maybe in some other test?). Each test was run a couple of times and best time was recorded.

Java 1.5 (command line: java perf -server)
6.84 seconds

C# 2.0, without ngen.exe (code with ngen.exe was .3 seconds slower, go figure ):
4.02 seconds

C++ (compiled with cl cpp_perf.cpp /Og /Ox)

2.97 seconds

Ruby (it was so slow, I ran it for 1% of cases and extrapolated)
3861 seconds (yes, there is no dot in there. It is more that 1 hour).

Now, what does that tell us? First, you should not use Ruby (or any other scripting language) for numberic processing. Really, they are not intended for that.
Now, if you are Java guy and feel that C# "won" this round, you are mistaken. If 50% speed increase in numberical processing is significant for you, neither C# nor Java are right for you. C++ is the way to go. I used MS Visual C++ (from MS.NET 2005). If I used intel compiler, things might be different.

The moral of the story is: C++ for performance critical things (e.g where number chrunching performance factor 2x is an issue. It happens less than you would think). C#/Java have "good enough" performance for most tasks. Pure numerical performance should not be a factor in deciding which language to take (for c# vs. java).
Ruby shows the weakest point of scripting languages - pure speed. But once you start being limited by other things (databases, web services, file system - pure speed becomes less and less of an issue).

And keep in mind, even handcrafted assembly code bubble-sort code written for exact hardware will lose agains quicksort algorithm (even if written in Ruby...). At least for large enough number of elements.