Confuzzled…

So I was preparing materials for my “Random Coding 3” video episode and this time the subject was relating to Conflicademia in regards to the loading performance of Android and how to optimize your build in Unity so that the game has reasonable loading performance.

However, as I was prepping my material and generating theĀ relevant evidence to prove why this session improves the performance, I disabled all my “tweaks” and re-launched the game on my phone and to my surprise, the game was still loaded in a respectable time.

I still have no clue why it just works now, though it’s good for my game, it ruined my “Random Coding – Session #3″…

So I will spend time re-creating the performance issue to prevent getting caught by it again, but I don’t think it’ll be the next Random Coding series until performance becomes a problem again andĀ I have some hard evidence on it.

Until then, I did have some other Random Coding video ideas, so I’ll move forward with those soon. Also, I’ll get back to completing the tutorial level.

Random coding 2

So I finally got around to finish the second video in the random coding series. I decided to change up how I recorded it, breaking it into multiple chunks and blending them together with Sony Vegas. Apparently FFSplit, by default record to mp4 which vegas had a hard time working with. Fortunately, I Was playing with ffmpeg which converts from one format, to practically any other. It then converted into the .m2t format that Sony loves and real time editing became a breeze.

I’m really enjoying building these as it also really forces me to learn more about something to demo it. I’m also in contemplating of what video will be the third in my series.

WPF notify helper – C# 5.0

So after looking at the documentation on what’s new in C# 5.0, I read about the feature that you can get a function’s caller information that looks like the following.

public void DoProcessing()
{
    TraceMessage("Something happened.");
}
 
public void TraceMessage(string message,
        [CallerMemberName] string memberName = "",
        [CallerFilePath] string sourceFilePath = "",
        [CallerLineNumber] int sourceLineNumber = 0)
{
    Trace.WriteLine("message: " + message);
    Trace.WriteLine("member name: " + memberName);
    Trace.WriteLine("source file path: " + sourceFilePath);
    Trace.WriteLine("source line number: " + sourceLineNumber);
}

This snippet is stolen straight from msdn.
http://msdn.microsoft.com/en-us/library/hh534540(v=vs.110).aspx

I also saw another example of where this would be used for WPF classes that implement INotifyPropertyChanged. The example looked liked the following

protected void RaisePropertyChanged([CallerMemberName] string memberName = "")
{
    RaisePropertyChanged(memberName);
}

This actually reminded me of what I did in some of my WCF services to get the calling method name displayed when invoked, so that I could print out who called it(using WindowsIdentity) and what method they called. However, I accomplished it using the StackTrace class and StackFrame. So I quickly came with a way to get similar functionality until 5.0 is ready for my eager hands.

The result looks like the following

protected void RaisePropertyChanged()
{
    var frame = new StackTrace().GetFrame(1);
    string name = frame.GetMethod().Name.Substring(4);
    RaisePropertyChanged(name);
}

So when you create your Bindable properties you could simplify code that would look like

public const straing ProgressValuePropertyName = "ProgressValue";
private double _progressValue;
public double ProgressValue
{
    get { return _progressValue; }
    set { _progressValue = value; RaisePropertyChanged(ProgressValuePropertyName); }
}

into

private double _progressValue;
public double ProgressValue
{
    get { return _progressValue; }
    set { _progressValue = value; RaisePropertyChanged(); }
}

So while this is a small step forward, it’s still nowhere nearly as clean as using PostSharp and AOP to look like

[RaisePropertyChanged]
public double ProgressValue { get; set; }

Thinking about my brain dump right now, I’m going to play with the Roslyn services to see if that is going to generally offer the same capabilities as PostSharp.

Enterprise Library Logger

After a monumental hiatus, I will provide this nerdy snippet and an update on my life.

Sadly, after writing a bit of code for my logging toolkit, I’m going to modify it from using Enterprise Library to Log4Net. Apparently there was some change in Enterprise Library 4.0 that does not make it directly backwards compatible with 3.1 and I can’t find the documentation for what makes it different.

All of a sudden my formatters no longer work and neither does the mailer. As a good friend of mine said. “It’s a freaking logger!” Why is it not backwards compatible? What kind of crazy magically awesome changes could they have made to make me want to update a vital library used in all my applications?
Thus, if I have to make a change, I’m moving to Log4Net. For anyone curious, I’ll be happy to keep a copy of my current logger with the Enterprise library implementation so that they can see the tragedy that it is. Change a reference library from the 3.1 EntLib Dlls to the 4.0 and formatting goes down the pooper.
As for my life in general. I’m engaged!!! So, the engagement didn’t go exactly how I planned it. There were several chaotic factors to disrupt my master plan and the proposal being on a certain date and actually being a surprise were high on my priority list. Regardless, I’m a little sad that it wasn’t some super magically awesome proposal at a swanky restaurant and all the things that I had in my mind came to fruition… Luckily, however, she said yes and I have our entire lives together to do sneaky little special things for her.
I now leave you with this awesomeness!

Systems updating like whoa!

Well, Vista Service Pack 1 is finally available for machines that have installed the Korean language pack and Ubuntu has just informed me that it wanted to update a whopping 115 packages. So I’ll let those occur as I drift off to la-la land.

It’s 85 degrees right now in NY and it’s night time. My AC is kicking on and off like a fat ninja in a kicking marathon. I think I need a fan to circulate the air so that the AC can regulate the temp across the entire 375 sqft instead of the tiny section by the unit.

I just got back from Wheeling again where I met a Cardiovascular surgeon. We had an interesting conversation about his software needs and I’m interested in starting a project for that request. It doesn’t seem to be that intense or involved. I’m going to work on a few Proof of concepts do some research to really see if the competition just flat out sucks.

Regardless, all is well and I’m excited!

On final notes, I’m going to respec my priest to the following for Oscar and my crazy wicked PVP group.

http://www.wowhead.com/?talent=bxMGzhgtrcopfVth

Ok we suck, but we only play 1-2 hours a week if that.

Our Nation’s Capital

Well to begin with, I’m writing this on a Mac. I’ve switched my blogs over to blogger.com and I stepped outside of NYC this weekend to visit our nation’s capital, Washington DC.

I’ll go into some of the technical differences that I’ve experienced from working with the OS X, Windows, Unix and Linux environment.

However, I’ll digress over to my recent “vacation”.

So this weekend, my snuggle muffin and I decided to meet halfway in Washington DC. I took the Chinatown bus and she drove in to town. We found a great deal on a hotel and so we spontaneously ran off.

To sum up the trip, it was a trial of our patience and a continuous series of unfortunate circumstances. Regardless, my love stood by me, supported me and cheered me up. Then there were trying times for her as well so that I could do the same for her. I’m not entirely certain if the weekend was really meant to test the threshold of pain that couples must endure, or demonstrate the actions that both of us would perform to be there for each other.

To continue my discretion, I came home from my trip worrying about my sweet sugar pea the entire time but comforted when both of us got home safely and saw that everything back home was safe and sound. Our lives are extremely fortunate, because in the end we have everything that we could have ever needed. Plus a funny story to tell our grand children.

Onwards to blogger.com. MySpace’s blogger sucks for a few reasons. I can’t use their “Advanced” editor unless I’m on a windows platform machine. I can’t type my blogs on my Ubuntu box nor this Mac OS X laptop with a consistent look and feel. I also can’t access the blog in all locations due to MySpace being firewalled in so many locations.

I tried, sorry MySpace… I know it’s hard to write really good software but it is possible. Step up and I’ll come back and support your advertisement engine.

Finally, it’s UBER late and I’m still writing this entry. I just wanted to point out one quick different about Macs and Windows. Keep in mind I’m new to Mac, but I thought the whole point about Macs was being easy enough for someone with limited knowledge to operate.

Mac: Hi, I’m Mac
Windows: Hi, I’m Windows
Min: Hey windows, I want to install an app
Windows: Ok, double click the setup icon and click “next” until the “done” button.
Min: Wow! That’s intuitive… Mac, how about you?

Picture 1Me trying to figure out how to do a screen shot

OMG are you serious Mac?? Serious? How is this more intuitive than “Print Screen”, “Alt+Print Screen”…. I have to hit “Apple + shift + 4 + space”!!!!! You are NOT intuitive!!!

Ok that was side tracking from my original intent. To go back to installing software…

What the hell does this mean? So I want to install the latest version of Firefox… what do I do? Ohhhh I get it… get a double AA battery and stick it in the butt of a raging flaming fox. Then it will go into some folder with some artistic A on it.

Mac??? Ok, I thought people loved you for your super awesome interface?

So it turns out I have to go to my hard drive, then my applications folder. Copy the firefox icon to the application folder then copy it also to the docking bar.

Mac: PC guy is a fat unpublicized actor and his bottom smells like elderberry.

And with that, I’m off to la la land. Tomorrow I’ll continue my adventures of Mac Explorations and my rants of the Mac OS.