T40T, 6th June 2008 to 9th June 2008

Csharp kitteh

(kitteh codez: ./;;;;;;;;;;;;;;;;;;;;)

Time to start C# familiarisation, this long weekend is the weekend to start. My guide is the book: “Pro C# 2008 and the .Net 3.5 Platform” written by Andrew Troelson

Having last been semi-professional in Java about 10 years ago, there are many similarities. But lots of new platform learnings. Unix shell, paths and commands are difficult things to dump.

Just ensuring I understand the fundamentals before I jump into the deep end of the BCL and other .Net goodness

So, some new things:

  • using the Visual Studio Command Prompt to pre-setup paths
  • @*.rsp files for input to csc.exe (to replace command lines)
  • Console.* and Environment.* for command-line/console style apps; along with return values
  • Escape characters vs. @”sss” verbatim strings
  • Narrowing/Widening datatypes at compile time (short/ints)
  • out, ref, params (leave params as last argument)
  • operator overloading (sans generics), arrays, simple objects, enums’
  • structs on the stack, vs referenced types on heap
  • Nullable types (using ? at the end of the type declaration, ?? as default override if value is null)
  • Objects, default constructors
  • constructor chaining using this. keyword
  • Encapsulation using properties (auto getters and setters, or Accessors and Mutators)
  • partials (one class across multiple *.cs files)
  • class diagrams; same 3 base things of OO programming (encapsulation, inheritance and polymorphism)
  • base class construction
  • nested classes
  • virtual, override in polymorphism; as keyword + null test in polymorphism
  • SEH. Structured exception handling
  • The heap, generations as a method of marking objects as “more likely to stick around” in System.GC
  • Finalize. Finalize when unmanaged (ie: Pinvoke) objects
  • Dispose. call Dispose on an object that implements IDisposable (if x is IDisposable…)

Inspecting ur classes

New feature of Visual Studio 2008, LOLCAT edition. CATROSPECSHUN OV UR CLASSEZ

Our Valuable Virtual Meta-verse Future

In 1988 Mitchell Waite sent me a small paperback to read: Vernor Vinge‘s True Names. I was a mere, lowly Hypertalk programmer from Adelaide, South Australia. He was an important person.

This book has stuck in the neurons, and now the virtual is becoming real. It really goes to show how hard science fiction depicts a future that current living humans will not see. Based on some work I was doing to Tricks of the Hypertalk Masters, creating what would be now known as a “skin” over CompuServe; the book was just science fiction.

True Names published in 1981, describes a world called “Other Plane” were people interact online. The premise of separating your online from your physical indentity; and the concept of a future Singularity pervade my personal world-view today.

Thanks Mitch.

Now, what does this have to do with today?

Second Life. It’s more than the technology; it is also about the platforms involved. It is also how it impacts real people: such as Dave Wallace. Second Life is what I visualised as “Other Plane”

Watch the first half of this video: Jim-Cory-SecondLife.wmv, Lang.NET Symposium.

The first half of the video is light on technology; but heavy on the economics, and wider-world impacts of the virtual world. The user creation rate (Writeness in the Read/Write equation) is over 60%; compared to the web which is less than 10%.

A key reason seems to be the economic value attached to virtual objects scripted in Second Life. As items in the SecondLife virtual world are intellectual property; an item can be created, sold and purchased.

Ensuring that intellectual property is valued is going to be one of the toughest challenges for upcoming generations.

Is the scripting in Second Life the new HyperCard?

Watching the Language Wars

Today, at least in the US, it is Programmer’s Day.

Maybe it should be called “International Programming Language Peace Day“. The level of advocacy for various programming languages reaches rhetorical heights last seen during the one of the not-so-successful 18th century revolutions.

When not speaking to humans, other programmers to reading the latest advocacy on their language of choice: programmers stitch together the wild thoughts of others to munge data into information.

Programmers are the people who use computer languages, in their various forms, to get computers to do cool things. From blikenlights to cool online maps: there are a pyramid of programmers responsible for your computer experience. A programmer is behind the “ding” in the lift you used this morning; and the software that validated your ticket on the bus ride to work.

The beauty of computer languages is that they never seem to stagnate: like modern, spoken languages: they evolve as the world changes. Except those that are abandonware.

Microsoft has recently released my current favourite programming language, Python, as a CLR/.net language: IronPython. This implements Python as a dynamic language on the CLR engine.

C# is the language of implementation for CLR, as is Sun’s Java is for the JVM. A# (Ada), B#, D# F# (OCaml), G# (Generative language), J# (Jsharp), P# (Prolog), L#. More sharps than Beethoven.

The language wars has returned to an old field: dynamic languages. The grand-daddy of dynamic languages, LISP, has received some recent positive PR. One person, Paul Graham, is the poster millionaire for LISP. Lazarus of LISP.

This week, Sun Microsystems parried Microsoft’s IronPython by hiring the team behind JRuby. The aim here is to implement the Ruby dynamic language on the Java Virtual Machine (JVM). Some months ago, this team was able to get a Ruby on Rails working on the JVM.

Whilst the big language guys battle it out, is Erlang the next Ruby, or is it just a viking proto-language with the best non-pun name? The Erlang community is starting to come out of their telephone exchanges.

No language has deemed to have arrived in the 21st Century until there is a web framework written around it. C# is ASP.NET, Python has Dyango, Ruby has Rails, Erlang has Jaws, Scheme has Magic… and so it goes on.

This broken thing called Javascript that has been reborn with AJAX, and is receiving daily blood transfusions of new features.

All of these languages just remind me of my personal alltime favourite language love of my life: Hypercard’s HyperTalk. As Hypercard is no longer sold, and “Classic MacOS” is a battle to get going on my MacBook Pro – sadly it is a language as useful as Cornish.

So, for a short period of time it is back to one of HyperTalk’s children: Applescript. Basketweaving for the mind.

SVG,C#

What a strange day. Spent the morning doing “sales management” stuff (part of my new job) and the afternoon looking at SVG, C# and debugging SOAP/Webservices style communication with the Adobe Graphics Server.

Cari pointed this out: Photoshop Camera Raw and JPEG2000 plugins for Photoshop 7.0. These are purchaseable downloads from adobe.com. Camera Raw gives you much greater control when loading images from Digital Cameras.

For a while there, the world began and ended on Monday December 2, 2002. Sorry about that. Coding error my end. Been a lot of that lately on my end. Thanks Mark.