Take a look at the following piece of code
namespace Egozi { class Baby { public static void Main() { var noam = new Baby(DateTime.Parse("2009/08/21 20:00 +3"), 2.750, "Noam"); while (true) noam.RelaxOnDaddy(); } public Baby(DateTime birthdate, double initialWeight, string name) { Birthdate = birthdate; InitialWeight = initialWeight; Name = name; } public ulong GetComputedCutenessLevel() { return Name == "Noam" ? ulong.MaxValue : GetRandomNumber(1, ulong.MaxValue); } public DateTime Birthdate { get; private set; } public double InitialWeight { get; private set; } public string Name { get; private set; } public void RelaxOnDaddy() { } public void Poo() { } public void Pee() { } public void Burp() { } public void Accept(IVisitorWithPresents visitorWithPresents) { visitorWithPresents.Apply(this); } } }
Not too exciting on it’s own, right?
Now take a look at on the binary format:
and here after call to RelaxOnDaddy():
super sweet :)
The little dude even acted as the resident super model during the “how to bathe your baby” session at the nursery, acting as if he was a Michael Phelps grade in Water Handling.
So if you were wondering why my general availability was not at it’s best lately, this tiny little miracle who crashed into our life just short of three days ago, is the reason.
Lots of experiences to have, lots of things to learn and explore. All very complicated. The amount of baby related *stuff* and *things* out there is mind blowing. And everything should be used just a wee bit differently then the next thing, and every nurse gives you a different advice with a 100% certainty. It is kind of like your regular OSS usergroup of choice actually.
So without any proper location to RTFM from, I guess it would come down to a mix of instincts, best judgement, and a good portion of trials and errors.
I’m popping back offline now to attend my amazing wife who took care of the whole thing, and our cute little wonder.
UPDATE (25/08): fixed a copy&paste type, added Main, added name
from the announcement:
Voting is now open!
Make sure your voice is heard; tell us which sessions you would like to see in the conference and make your vote count.
It is up to you to make this an awesome conference, so why wait?
Go now to www.idcc.co.il/sessions and vote for your favourite sessions.
Another gem from Daniel Hölbling.
In short – it will allow you to write code like:
public void Browse([DefaultValue("beer")] string category, [DefaultValue(1)] int page) {
... }
grab it here
The cool thing is that because MonoRail is so extremely flexible, one can really easily add this type of functionality without touching the code-base, but rather implementing a straightforward interface. That’s what I call extensibility.
One more super kudos to Hammett for the overall architecture of MonoRail.
I got a docx document by email, with an image embedded inside. I needed to take it to Paint.NET for some cropping and resizing. Usually I’d copy the image, then “Paste as New Image” on Paint.NET (using Ctrl+Alt+V, or the Edit menu).
Paint.NET did not recognize the clipboard content as a valid image.
I pasted the image into the good ol’ Paint.exe, then copied from there, and “Pasted as New” in Paint.NET
voila.