Jarred Capellman / Random Texels Manipulating 1s and 0s since 1995

27Jan/120

Rack’d up (well nearly)…

Posted by Jarred Capellman

Spent a few hours last night getting all of my rack equipment in, well nearly all. I'll be getting a rackmount shelf from Amazon tonight so I can mount my ClearOS 2U AMD machine. It's definitely a much better to have it all nicely packed away rather than sprawling over my office like so:

Original "Stack" in my office

Original "Stack" in my office from the side

Into this:

Nearly all "stacked" in the Rack

Tagged as: , , No Comments
25Jan/120

Rack at last

Posted by Jarred Capellman

After about 9 years of waiting I finally have a rack. Not sure about the model, but it's an IBM 36U made in 2002. I was able to get it ridiculously cheap thankfully, now I've just got to get some rails for it. Luckily though I had some extra MDF boards from my bookshelf to prop my Sun Blade 100 and Dell 15" LCD.

IBM 36U Rack closed

IBM 36U Rack open

With any luck I can get some cheap rails.

23Jan/120

Can do with Telerik’s Kendo

Posted by Jarred Capellman

After playing around with Google Charts and doing some extensive C#/SQL integration with it for a dashboard last summer, I figured I'd give Telerik's Kendo a shot. If you're not familiar with Telerik, they produce very useful controls for WinForm, WPF, WP7 and ASP.NET controls (in addition to many others). If you do .NET programming, their product will save you time and money guaranteed. That being said, I started work on the first module for jcDAL last night and wanted to add some cool bar graphs to the web interface for the analyzer. About 15 minutes of reading through one of their examples I had data coming over a WCF service into the Kendo API to display this:

jcDBAnalyzer Screengrab showcasing Kendo

So far so good, I'll report back with any issues, but so far I am very pleased. A lot of the headaches I had with Google Charts I haven't had yet (+1 for Telerik).

18Jan/120

AMP + C# = what I wanted to see for years

Posted by Jarred Capellman

I was reading about AMP the other night, basically a light weight C++ wrapper that is used to offload tasks to your GPU. I was going to brush off my C++ skills tonight, but luckily I don't have to after reading this article. WinRT makes using C++ libraries a breeze, finally you don't have to use p/invoke. I'll definitely be playing around with this as soon as my Visual Studio 11 installation issues get resolved.

A word to the wise, if you're installing Windows 8, install it with the Developer Tools. I made the mistake of installing the non-developer tools Windows 8 Developer Preview, which doesn't install the necessary SDK for C++ compiling. If you're only doing C#, I had no trouble programming/compiling WPF and WCF apps.

15Jan/120

jcBENCH Android Port Released

Posted by Jarred Capellman

After some additional work getting used to the XAML-ish layout I'm done with the initial jcBENCH Android port. You can download it from here. You will need Android 2.2 or higher for it to run.

jcBENCH Android

I've only tested this on a Dual 1.2ghz HTC Vivid. However, the results were interesting. Comparing single-threaded and multi-threaded operations was curious. Running it in multi-threaded mode was actually 3 times slower. I'm not sure if the way the Task Parallel Library was implemented on Monodroid was done poorly or if there is a bug in the detection for how many cores/cpus there are inside the Mono implementation or not, but something isn't right. Single threaded versus my HTC Titan 1.5ghz SnapDragon it lost out by ~23%. Which makes sense, 300mhz difference or 20% comparing single cores to each other.

All that being said I'm content with jcBENCH for the moment until I hear feedback or come up with more features to add.

15Jan/120

apk on IIS

Posted by Jarred Capellman

Those that have seen an IIS 404 error on a file that is known to exist will know right off the bat, a lack of mime type.

A quick trip to Google found it, but for posterity's sake:

application/vnd.android.package-archive

Tagged as: , , No Comments
14Jan/120

IronPython + PLINQ?

Posted by Jarred Capellman

Spent the afternoon reading IronPython documentation and finally got a chance to play with it a bit. I have to hand it to Microsoft for making it extremely easy:

var ipy = Python.CreateRuntime();
dynamic pyTest = ipy.UseFile("test.py");

Only 2 lines of code to have access to a python script. For me this opens new doors for scripting operations I still typically write in PHP because of the simplicity of opening notepad and pushing it out to an IIS server running PHP. Now I can write a few line C# app with an interface to run whichever script I wish to run.

Being curious about performance, I ported jcBENCH to use IronPython. To put it simply, the math operations pale in comparison to native C# math operations. The actual overhead in creating the Python Interpreter was negligible if anyone was curious even on an AMD C-50 (Dual 1ghz) Netbook with a OCZ Vertex 2 SSD.

Porting it did bring an interesting idea, this could work for a workflow process. The ability to process multiple workflows utilizing PLINQ, but with the flexibility to adjust the logic in script and not in the C# code.

11Jan/120

Other jcBENCH news and jcDAL

Posted by Jarred Capellman

After some more thought about jcBENCH and what its real purpose was I am going to drop the Solaris and IRIX ports. Solaris has a Mono port, but I only have Sun Blade 100 which has a single cpu. Not expecting a ton of performance from that. IRIX on the other hand, I have a Quad R14k 500 Origin 300, but no port of Mono exists. So I could port it to Java, but then you really couldn't compare benchmarks between the Mono/.NET versions. I am about 50% done with the Android port and am just waiting for the OpenSuse 12.1 compatible MonoDevelop release so I can get started on the Linux Port.

After those 2 ports are completed I am thinking of starting something entirely new that I have been thinking about the last couple years. Those that deal with a SQL database and write a data layer for his or her .NET project, know the shortcomings or doing either:

  1. Using an ADO.NET Entity Model, adding your Tables, Views and Stored Procedures and then use that as is or extend it with some business logic
  2. Use an all custom data layer using the base DataTable, DataRows etc, wrap your objects with partial classes and create a "factory"

Both approaches have their pros and cons, the first takes a lot of less time, but you also have a lot less control and could be costly with all of the overhead. Both however will eventually fall apart down the road. The reason, they were built for one audience and one production server or servers. How many times have you gone to your IT Manager and asked for a new Database server because it was quicker then really go back to the architecture of your data layer. As time goes on, this could happen over and over again. I have personally witnessed such an event. A system was designed and built for around 50 internal users, on a single cpu web server and a dual Xeon database server. Over 5 years later, the code has remained the same yet it's been moved to 6 different servers with ever increasing speed.

Times have changed and will continue to change, workloads vary from day to day, servers are swapped in and out, so my solution, an adaptive, dynamic data layer. One that profiles itself and uses that data to analyze the server to use either single threaded LINQ queries or PLINQ queries if the added overhead of using PLINQ would out way the time it would take only using one cpu. In addition using Microsoft's AppFabric to cache the commonly used intensive queries that maybe only get run once an hour and the data doesn't change for 24. This doesn't come without a price of course, having only architected this model in my head, I can't say for certain how much overhead the profiling will be. Over the next couple months, I'll be developing this so stay tuned. jcBENCH as you might have guessed was kind of a early test scenario of testing various platforms and how they handled multi-threaded tasks of varying intensity.

11Jan/120

jcBENCH WP7 Release

Posted by Jarred Capellman

After a few days wait, I've ported jcBENCH to Windows Phone 7 (aka WP7 or Windows Phone). I've only tested it on an HTC Titan thus far, but all of the WP7 devices released thus far are all about the same specs wise. Virtually all of them have a 1.4ghz or 1.5ghz SnapDragon CPU, 512mb of RAM and all support 480x800. I wish the Titan would have had one of the Dual Core Qualcomm CPUs, maybe in the Titan III :)

jcBENCH WP7 Screenshot

All you'll need to run it is a developer unlocked phone and then deploy the XAP file as you would normally.

8Jan/120

jcBENCH 0.1.63.0 Released

Posted by Jarred Capellman

With this new release I've fixed a bunch of things in Web Service and the main library that powers all of the clients. In addition I'm tracking a bit more information like the platform and benchmark version (thinking more down the road when specific versions are going to change in the logic in the actual algorithm).

Also this release marks the first release of the GUI Mac OS X 10.6 (and later) client.

jcBENCH on Mac OS X

You'll need GTK 2.12 or newer and Mono 2.10.8 or newer to run it. Being my first Mac OS X application ever outside of iOS development, I can without a doubt say I cannot stand development on anything Apple. KVC has got to be the most bloated way of doing things I have ever seen. I am so glad I do not have to do native Mac OS X applications for a living. That being said though, I think it turned out pretty well in matching the WPF version.

8Jan/120

Mono + WCF Service (added as a 2.0 service) + Entity Model Object = Fail

Posted by Jarred Capellman

Found a bug in either mono or WCF, not sure which one. But if you go to add a Web Reference in Mono Develop (2.8.5) and have an Entity Model Object as a parameter for an object some of the properties will be null. Debugging had me scratching my head as the object was populated prior to sending to the WCF Service. I hadn't tried it as a Native WCF Service in Mono Develop because I've had prior problems with that route.

The solution I came up with was create a serializable object in your WCF Service that wraps the object like so:


[Serializable]
public class BenchResult {
public string CPUName;
....
}

Then in your application your reference will contain (in my case a BenchResult object) the object you defined and upon populating and passing it to your WCF Service all of the data will be populated. Nearly 2 hours gone down the drain on that issue, hopefully it helps someone else.

7Jan/120

New version of jcBENCH tonight

Posted by Jarred Capellman

New version of jcBENCH will be coming out tonight, in the mean time I have taken down the web service so you won't be able to submit results. More details to follow...

7Jan/120

After Effects Lightsaber Tutorial

Posted by Jarred Capellman

Found this just now going through some really old stuff. I originally posted this on July 7th, 2002, I'd probably do it quite a bit differently now in CS5, but someone might find it interesting, especially if they are on version 4.x or 5.x.

Without further adeu:

About a week ago (5/25/02), I started work on a Star Wars movie, I knew I'd have to do lightsabers and force power effects, but doing it properly and making it look good took a long time doing it the way I was doing it before I learned how to use masks. So you get the easy and better looking version. Have fun, if you have any more questions just post them in the forum.

How it should look when we are done

  • 1st step: Start After Effects (duh)
  • 2nd step: Make a new composition (control+n), select the resolution that your footage/image is
  • 3rd step: Add your image/footage (control+i)

Now your screen should look like this:

Starting point for the Lightsaber Composition

  • 4th step: Add a solid (control+y), make it white and your composition size
  • 5th step: Now in the timeline with the solid 1 highlighted hit the little icon that looks like an eye (like in the screen cap)

Lightsaber Tutorial - Timeline after the 5th Step

  • 6th step: Hit G to bring up the pen mouse pointer, now put a point in each of the four vertices of your lightsaber
  • 7th step: Now if you have your solid shown by hitting the little place where the eye was, your to be lightsaber should be solid white

Now your screen should look like this:

Lightsaber Composition #2

  • 8th step: Now make another solid (control+y), this time black, then in the timeline drag it so it's under the first solid with our lightsaber mask (like in the screen cap)
  • 9th step: then highlight your first solid (the lightsaber one), and hit control+d three times, your duplicating it
  • 10th step: Now click the little arrow in the timeline right next to "Solid 1" and bring out the effects (like in the screen cap on the lower right)
  • 11th step: Then make the feathering value equal to 10
  • 12th step: Repeat this step for each of the solids, by increasing each feathering value by 10, except Solid 2

Now your screen should look like this:

Lightsaber Composition #3

And your timeline should look like this:

Lightsaber Composition Timeline #3

  • 13th step: Now make another composition (control+n) and then copy your first composition and then your footage from the bin to the timeline
  • You probably have a black screen with your white glowing saber huh? that's good
  • 14th step: Now with your solid selected in the timeline goto the menu, select layer->transfer mode->screen, now you should see your footage as well
  • 15th step: You probably have a black screen with your white glowing saber huh?

Now your screen should look like this:

Lightsaber Composition #4

Nobody has a white lightsaber right?

  • 16th step: To add color, highlight your solid and then on the menu goto effect->adjust->color balance
  • 17th step: Now mess with the settings to get the color you want
  • (Possibly) 18th Step: If you have more then 1 lightsaber, just repeat the steps

Now your screen should look like this:

Lightsaber Composition #5

7Jan/120

Firefox it was nice knowing you…

Posted by Jarred Capellman

I don't remember the exact day I switched from Internet Explorer 6 to Phoenix (Firefox's codename back in 2004/2005), but today I'm switching to Chrome. Since working at home nearly everyday and using my desktop virtually 24/7 I've been leaving my Firefox 9 browser opened with 2 or 3 tabs. After an hour or so of use my Firefox browser uses over 1.2gb of ram. Not sure if it's a memory leak or it is caching page content? I know Firefox 6 or 7 had a terrible memory leak that forced me to have to upgrade my wife's ram to 16gb since she leaves 20+ tabs open.

Also noticed in the last month or two, searching on google images with lots of results brings Firefox to a hault (doesn't happen in IE 9 or Chrome).

Much better:

Chrome with Amazon Cloud Player and 2 other tabs

7Jan/120

SQL Server 2008 R2 not freeing cached resources?

Posted by Jarred Capellman

Ran into interesting scenario this afternoon when I was doing some house cleaning of my SQL Server 2008 R2 install. I had been bad last year, had 7 databases that were no longer in use, but hadn't detached them. Today I went through and detached them one by one, namely because I was running out of memory on my web server. I assumed as the databases were detached (one of them was actively being used all the way up to this morning) that it would gradually free cached queries that were no longer needed. To my surprise it didn't. Even after leaving only 2 databases, both only a few hundred rows it still hovered at the exact same memory usage. It took restarting the SQL Server service to bring it back down to 74mb.

Is there a reason for this design? If this had been a critical production environment I wouldn't have liked to have had to restart the entire service. Maybe Denali will "correct" this.