Saturday, November 22, 2014

Brain What???

Many years ago as a hobby I collected computer languages.  I would be up all hours of the night downloading source code, reviewing documentation or trying to contact programmers involved with defunct languages.

Well, I saw the name of this language and had to laugh...  BrainFuck

Apparently this is an older language and, well, a very simple one.  The word terse simply does not do it justice.  Take a look at the above link to it's Wikipedia page.  Just WOW :-)

Thursday, November 20, 2014

Thoughts on the TP Link TL-WN725N 150Mbps Wireless N Nano USB Adapter

The time had come for me to relocate my working space.  My lovely wife suggested she make space in her art area of the front room for my desk.  Seemed perfect to me!

So, I move my work computer and settle into this new space.

"Hmmm, I could really use a desktop here.  Maybe get more into digital photography?  Maybe do more with my extracurricular programming projects?"  And, there it started.

The next day I disconnected our DVD/Hulu/Netflix computer that we have used once in the last ten months or so, and relocated it to my work area.  Only one thing...  Networking.  Only a few things are wired in our house, such as the Dish Satellite receivers and a Verbatim NAS server.  The family's computers all use 802.11 wireless.  With two wireless routers/APs a person could walk almost anywhere on our property and still be connected.

At any rate, that meant running a CAT5 cable from a router to my workspace so that this computer could talk to the internet, or purchasing a wireless card for the desktop.    While ordering holiday gifts for the family on Amazon, I happened onto the TP-Link TL-WN725N.

Wednesday, November 12, 2014

Z80 Blast From The Past

A few weeks ago while putting things away for winter; an 'autumn cleaning' if you will, I found my old project computer notebook from the late 1980's.  In it were notes and plans and photo-copies of more than enough information to build my own Z8000 computer.  Back then, my personal projects were based more on 'coolness' than having a purpose.  Ahhhh the good old days.

This morning I was poking around on the internet and what do I find???  A military paper on 256 Z80 autonomous computers clustered into a single highly parallel computer called ZMOB.

ZMOB had more of a conceptual point of origin rather than a purpose: "The ZMOB idea sprang originally from needs of the Computer Vision Lab at Maryland."  Ahhh...  To build something for the simple sake of building it.

Monday, November 10, 2014

C# Programming Tip - ViewState

A C# page's ViewState is a real cool place to put state information and variables you want to stick around for the lifetime of a web page.  Actually, most ASP page components save their state information in the ViewState.

Saving stuff in the ViewState is easy.  Here is an example:

ViewState["mode"] = "A"

Accessing it is easy as well:

if (ViewState["mode"].ToString() == "A") {...}

You can also do cool things like put more complex items in the ViewState like:

SomeComplexClass ComplexObject = new SomeComplexClass();
...
ViewState["ComplexObjectVS"] = ComplexObject;
...
SomeComplexClass ComplexObjectCopy = (SomeComplexClass)ViewState["ComplexObjectVS"];


So long as the object is seralizable (more on that later), you can save it in the ViewState.  There is a big drawback... space and bandwidth.  A page's ViewState is stored in the page!  So, each time the page loads, is posted or there is a postback, the entire ViewState is sent over the network.  If you want to maximize the efficiency of your page, minimize your ViewState usage.  The size of a ViewState can grow quickly if you have a large and/or complex page.

Also...  ViewStates are NOT secure.  With enough smarts a person can decode them, so don't put anything in the ViewState that you want to keep secure.

For those curious, here is what a simple ViewState looks like in a simple page:
<input id="__VIEWSTATE" name="__VIEWSTATE" type="hidden" value="/wEPDwUJNzkzMjk1ODg4D2QWAmYPZBYCAgEPZBYCAgsPDxYCHgRUZXh0BQgxLjAoZGV2KWRkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBSZjdGwwMCRNYWluQ29udGVudCRMb2dpblVzZXIkUmVtZW1iZXJNZbVBilGyAMpTuiSmFozdPPwfgNyhxhHXWwhU4O2NRdBd" />

Thursday, November 6, 2014