jasper22

jasper22


Jasper journal

This is mirror site for main blog: http://jasper-net.blogspot.com/


Curiosity – What's Inside the Cube?
jasper22
jasper22
Inline image 2

Curiosity – What's Inside the Cube? is an experiment by Peter Molyneux's new studio 22Cans. Originally called "Curiosity", the game was later renamed to avoid confusion with the Mars rover.

Background

Curiosity is a multiplayer social experiment. The game setting is a featureless and minimalist white room in the middle of which floats a giant cube made of billions of smaller cubes ("cubelets") and white, floating text across each layer, usually topic related (hashtag, notifications etc.), with small messages. Players tap the cubelets to dig through the surface of each layer and reveal the next layer below. The goal is to reach the centre and to discover what is inside the cube. Each layer, which has a distinct look or design, contains a clue as to what is in the centre of the cube.[2] Each cubelet destroyed by a player awards them coins. Coins can be spent on tools that temporarily enhance the player's abilities, such as picks ranging from iron to steel to diamond that increase the number of cubelets destroyed with each tap, or firecrackers that can be laid on the cube in long strings to chain together explosions.[citation needed]

22Cans intends to add more gameplay mechanics as the players progress through the cube. Version 2 released on Dec. 7th has included 3 new features: Draw mode, Badgers and Golden Badgers as well as a page graphing various statistics about the cube against time. In addition, Peter Molyneux suggests there may be more to the game than it would seem: "There is something we haven't told everybody about when you play the cube. When you play the cube you're also doing something else. You don't realize you're doing it. [...] You're not just doing things in the cube. You don't realize it but you're doing something in something else as well at the same time." [2]

Peter Molyneux has said that "what is inside the cube is life-changingly amazing by any definition".[3] Critics have stated that the game designer might be over-promising. Wired wrote that "That its contents will have proven to be as world-altering as Molyneux promised." When it was suggested to him that he might want to temper his expectations, to tone down the enthusiasm, he responds that they’re looking at the wrong side of the equation. “I don’t want to believe less in something,” he says. “I want to make something that is worthy of the emotion behind it.”[3] Curiosity is actually one of the few games that can be successfully played by a simple robot.[4]

According to the new statistics pages available in game from version 2, as of 8th Dec the game currently has over 3 million users. 22Cans did not anticipate such widespread interest in the game, and were not prepared to handle the extreme load, causing connectivity issues to persist from launch day to nearly a week afterward.[5]

The floating text across the layers usually carry the hashtag for this 'game experiment', #Curiosity, or short, informal messages from the staff.

Read more: Wikipedia
Read more: Google Play
QR: Inline image 1

Posted via email from Jasper-net


What does the langversion switch do?
jasper22
jasper22
The C# compiler has a /langversion switch that is rarely used; most people do not know what it is for, and if asked to guess, most guess wrong. So let me disabuse you of your wrong guess right away: the purpose of the langversion flag is not to decide what C# language version to use. It is not a "go into compatibility mode" switch or a "use a previous version of the compiler" switch. The only effect of the langversion switch is to put the compiler in a mode in which use of features from a version of the language higher than the given version cause the compiler to emit an error.

Let me illustrate with a hilariously contrived example:

class C
{
    public static bool operator < (C c1, C c2) { return true; }
    public static bool operator > (C c1, C c2) { return true; }
    public static bool operator < (bool b1, C c2) { return true; }
    public static bool operator > (bool b1, C c2) { return true; }

    static C H = new C();
    static C I = new C();
    static C J = new C();
    static void G(bool b) { }
    static void Main()
    {
        G ( H < I > ( J ) );
    }
}

This ridiculous program compiles successfully in C# 1.0; it invokes the < operator on H and I, and then invokes the > operator on the resulting bool and J.

QR: Inline image 1

Posted via email from Jasper-net


Microsoft.Bcl.Async is Now Stable
jasper22
jasper22
Inline image 2

It’s done. About five months ago, we shipped our Microsoft.Bcl.Async NuGet package which provides support for the async/await keywords for pre-.NET 4.5 platforms, such as .NET 4, Silverlight 4, and Windows Phone 7.5. Of course, this includes support for portable class libraries as well.

We believe we’ve baked Microsoft.Bcl.Async enough to flip the switch and mark it as stable. This might not sound like a big deal but it is the NuGet equivalent of shipping an RTM.

QR: Inline image 1

Posted via email from Jasper-net


My relationship with SOLID - The big O
jasper22
jasper22
Open closed is dead, long live Open closed

I'm blogging about SOLID for some reason, and now we're onto the beast that set me off:

OCP

Yikes

 They are “Open For Extension”. This means that the behavior of the module can be extended. That we can make the module behave in new and different ways as the requirements of the application change, or to meet the needs of new applications.
and

 They are “Closed for Modification”. The source code of such a module is inviolate. No one is allowed to make source code changes to it.
Thanks Uncle Bob, you're right, this is over-stated, and because it's so over stated, I believe it to be the cause of so many of the over-designed pieces of crap I've had to deal with in my career :-)

This is the conversation I imagine developers having with themselves when writing this stuff, I don't have to imagine too hard because I've been there too:

 What if somebody at some point wants to change this so they can have another behaviour for this value, I'd better use the strategy pattern here instead of this switch statement, but oh my word now I've done that what if somebody wants to use this code from some other system than this one, I'd better stick a command system in front of this and use double dispatch for handling them - but wait, what if other code needs to react from this and do something else, I'd better raise a pile of events, but what if those aren't enough I'd better make sure I split all this behaviours out into their own interfaces so they can be overridden and...
And on it goes until suddenly what was a couple of classes behind a controller or presenter blow up into a mess of a hundred classes that all do the square root of diddly squat, but together manage to cause a lot of headaches for anybody coming across the code in the future.

Now, I'm sure this wasn't the intent behind these statements, and it sure isn't now - but you know what?

Read more: Rob Ashton
QR: Inline image 1

Posted via email from Jasper-net


How to Watch YouTube Videos in VLC Media Player
jasper22
jasper22
Inline image 2

How to Watch YouTube Videos in VLC Media Player
You will first need to open VLC, then click on the Media menu followed by Open Network Stream…

Read more: How-to geek
QR: Inline image 1

Posted via email from Jasper-net


If you don't know what you're going to do with the answer to a question, then there's not much point
jasper22
jasper22
A customer asked the following question:

We've found that on Windows XP, when we call the XYZ function with the Awesome flag, the function fails for no apparent reason. However, it works correctly on Windows 7. Do you have any ideas about this?

So far, the customer has described what they have observed, but they haven't actually asked a question. It's just nostalgia, and nostalgia is not a question. (I'm rejecting "Do you have an ideas about this?" as a question because it too vague to be a meaningful question.)

Please be more specific about your question. Do you want to obtain Windows 7-style behavior on Windows XP? Do you want to obtain Windows XP-style behavior on Windows 7? Do you merely want to understand why the two behave differently?

The customer replied,

Why do they behave differently? Was it a new design for Windows 7? If so, how do the two implementations differ?

I fired up a handy copy of Windows XP in a virtual machine and started stepping through the code, and then I stopped and realized I was about to do a few hours' worth of investigation for no clear benefit.

QR: Inline image 1

Posted via email from Jasper-net


How to Extend Your Office 2013/365 Trial to 180 Days
jasper22
jasper22
Inline image 2

In recent years it has become common for Microsoft to release trial or preview versions of its big-name products. This has been the case with Windows 8 as well as Office 2013 giving consumer the chance to try before they buy. If you downloaded the trial version of the suite, you can gain some extra try-out time with this handy hack.

The trial version of Office 365 is only meant to be used for 30 days. After this time you are expected to by a license or stop using the software. In practice, Office does not become unusable, but instead enters a ‘reduced functionality’ mode.

But if you are not sure about committing to the purchase, you can extend you trial period so you can test drive the office suite for a little longer.

It is possible to ‘rearm’ the trial version of the software five times – essentially giving you six 30-day trial periods, or 180 days in total.

While there are various tools that can be downloaded that can do this job for you, there’s no need – everything you require is already available to you. The only thing you need to remember is to run through the rearming process before you trial periods run out; make sure you do it on the thirtieth day of the trial.

...
...

You can also navigate direct to C:\Program Files\Common Files\Microsoft Shared\OfficeSoftwareProtectionPlatform or C:\Program Files (x86)\Common Files\Microsoft Shared\OfficeSoftwareProtectionPlatform and type OSPPREARM.EXE into Explorer’s address bar before hitting Enter.

That’s all there is to it. It’s not quite a free copy of Office, but you do get to use it for a little longer.

Read more: How-to geek
QR: Inline image 1

Posted via email from Jasper-net


Big list of LINQ interview questions and answers compiled
jasper22
jasper22
I have had a number of users ping me asking about writing interview questions on LINQ. I actually have a 8 detailed posts on LINQ interview questions. Here is a compilation of the posts:

(more....)

QR: Inline image 1

Posted via email from Jasper-net


Postgres 9.3 feature highlight: JSON data generation
jasper22
jasper22
Postgres 9.2 has introduced JSON as a server data type. At this point, the data was simply stored on server side with integrated wrappers checking that data had a correct JSON format. It was a good first step in order to store directly JSON data on server side but core features in 9.2 have its limitations in terms of JSON data manipulation and transformation.

Two new sets of JSON features have been added to PostgreSQL 9.3 planned to be released this year: functions related to data generation and a new set of APIs for data processing. The one this post deals with the ability to generate JSON data based on existing data types. The second set of features (operators and new processing functions) will be explained in a future post.

So… Functions for JSON data generation have been added by this commit.
commit 38fb4d978c5bfc377ef979e2595e3472744a3b05
Author: Andrew Dunstan 
Date: Sun Mar 10 17:35:36 2013 -0400
 
JSON generation improvements.
 
This adds the following:
 
 json_agg(anyrecord) -> json
 to_json(any) -> json
 hstore_to_json(hstore) -> json (also used as a cast)
 hstore_to_json_loose(hstore) -> json
 
The last provides heuristic treatment of numbers and booleans.
 
Also, in json generation, if any non-builtin type has a cast to json,
that function is used instead of the type's output function.
 
Andrew Dunstan, reviewed by Steve Singer.
Catalog version bumped.

The first function called to_json permits to return a given value as valid JSON.
postgres=# create table aa (a bool, b text);
CREATE TABLE
postgres=# INSERT INTO aa VALUES (true, 'Hello "Darling"');
INSERT 0 1
postgres=# INSERT INTO aa VALUES (false, NULL);
INSERT 0 1
postgres=# SELECT to_json(a) AS bool_json, to_json(b) AS txt_json FROM aa;
bool_json | txt_json
-----------+---------------------
true | "Hello \"Darling\""
false |
(2 rows)

Boolean values are returned as plain true/false, texts are quoted as valid JSON fields.

json_agg is a function that can transform a record into a JSON array.
postgres=# SELECT json_agg(aa) FROM aa;
json_agg
---------------------------------------
[{"a":true,"b":"Hello \"Darling\""}, +
{"a":false,"b":null}]
(1 row)

Read more: Michael Paquier
QR: Inline image 1

Posted via email from Jasper-net


“Hacking Secret Ciphers with Python” Released
jasper22
jasper22
Inline image 1

My third book, Hacking Secret Ciphers with Python, is finished. It is free to download under a Creative Commons license, and available for purchase as a physical book on Amazon for $25 (which qualifies it for free shipping). This book is aimed at people who have no experience programming or with cryptography. The book goes through writing Python programs that not only implement several ciphers but also can hack these ciphers.

QR: Inline image 2

Posted via email from Jasper-net