Friday, February 19, 2010

creative coding or generative design

tree

In the past few years, with all the cgi trends it turns out that computer graphics are just becoming started. ICE Age, Madagascar and Avatar shows what super computers can render if you have enough processors and time. But there is another trend. It’s called creative coding or generative design. There are just a few implementations yet. But the results are pretty cool. My tree is just a few lines of code and represents a binary tree. And yes it’s not that amazing graphic work. The IDE called Processing, and the Language is Java. The application by the MIT is a simple to use IDE and rendering engine. I couldn’t find any C# implementation yet. But maybe in the future there will also be a C# app rendering in WPF available. You may ask, why is this so cool. So i just wanted to show you a few graphics done with that software.

3291287830_287591aace_b

This is a image rendering the most famous organizations and people from the year 1985 – 2009. The code is done by Jer Thorp via the New York Times API and JSON. So i guess you get an good idea of what is possible with that software. I found another two projects you should have a closer look at.

img_6   telekom_4b

Isn’t that great stuff? If only i have more time, and somebody would pay me for that. That would be cool. :-)
Guess what i think there will be more posts on this topic here.

Wednesday, February 10, 2010

Language Integrated Query (Linq) Session @ HM

Ok, seems like i always get the talks nobody else want to have. Mh, what can i say about Linq? Well i tend to tell the people how things work. But explaining how they build Linq is a hell of hack. Yes i can tell them about “computable functions” or let’s define better “higher-order functions”. WTF? So where to start? Functional Programming? Or maybe the Lambda calculus? Well i don’t think so. And reading the the Paper? “Can Programming Be Liberated from the von Neumann Style? A Functional Style and Its Algebra of Programs” written by John Backus at the IBM Research Laboratory, San Jose. Is this the start for my Session?

I often come to the conclusion people don’t want to know anything. Like in the movie “The Island” where McCord says: “Just cause people wanna eat the burger doesn't mean they wanna meet the cow.” And talking to students @ University of Applied Sciences Munich is always a pleasure. Give them a ball, and let them run with it. You’ll be amazed by the things they will come back with.

So, decided - i show the Technology and explain it step by step. Perhaps they will surprise me again.

So showing how to work with Linq, you can find so many solutions …

  • Perhaps you start with reading?

Linq start Webpage @ Microsoft
Thank you Charlie, again!

  • Or maybe you want to check out some Webcasts?

MSDN Webcast: Introduction to Microsoft .NET Language Integrated Query
and even more Linq Webcasts …

  • i for myself prefer the code:

So one step could be Open Visual Studio –> Help –> Samples –> local Sample folder –> CSahrpSamples.zip –> Linq Samples
or direct via C:\Program Files\Microsoft Visual Studio 10.0\Samples\1033

another way of learning by code start here … CodeProject … or look closer to Charlie’s Blog.

And yes, there are Books to:

Introducing Microsoft LINQ
byPaolo Pialorsi and Marco Russo
Microsoft Press 2007 (240 pages)
ISBN:9780735623910

Save the money, give it to me. :-) The book is not as good as his title promises. Since it’s the only one i read about this topic, i can’t tell much about others.

So i finally mixed up this things with an early preview of Anders Hejlsberg and came to this solution.

The Presentation stuff:

Luca Bolognese introduces Linq always by saying developers != plumper's. What that means is, like any other O/R Mapper Linq to SQL is doing the Mapping of SQL data - Types to you’re development data – Types. Well i prefer to introduce Linq by first of all telling the folks about Duck typing.

duck     

What you can do with Duck typing is you can use a shorter way to define your variables. Instead of using something like

   1:  int i = 10;

you can do the same thing by typing

   1:  var i = 10;

Ok, that however doesn’t means that it is a non strictly typed variable. Since the compiler understands that 10 is a integer value. Where is the duck? Well the duck means – it smells like a duck, it looks like a duck, it even acts like a duck ==> so it must be a duck.

Sine 10 is obviously a integer value C# knows that and using the best fitting data type which is int. Well you may argue: “Where is the benefit?”. There are 2 profits of Duck typing. The first one is easy to explain. Think of declaring a variable of a class or .net Type like 

System.Security.Cryptography.ManifestSignatureInformationCollection collection = new ManifestSignatureInformationCollection();

ok, don’t you think that this is a very long way telling the compiler what you mean. A shorter way would be:

var collection = new ManifestSignatureInformationCollection();

I personally like that profit. Using the var when you declare a string, int, … i personally don’t like that way. It makes the code a little bit harder to understand. Because i don’t see it on the first look, what the code is trying to tell me. I have to think a second about it. Ok it’s just a second but it’s still a second.

The other benefit is by using Linq. You really don’t have to think about the result you get back from your query. Telling about queries it’s time to talk about Linq in general.

With Linq you be able to query against anything which implements IEnumerable. Since any Object and data type in dotnet is using this Interface you be able to query against it.

Another aspect on Linq is that you can query against wrappers for databases, XML files and a lot of other implantations.

Now comes the part to explain Lambda expressions and the query style. 1st against Objects, 2nd against the O/R Mapper and 3rd against XML.

Since this blog post already a bit long and i don’t want to bore you any further here are coming the links. Tada…

So here you can find the empty Demo Project.

And here you can find the solved Demo Project.

Last but at always not least, the presentation.

So one good suggestion i can give you, think twice before you use “Linq to SQL”. Don’t think twice if you use Datasets. I have the hunch that Datasets are the hypocrite of death (memory). RAM Footprints, Race conditions, bad performance … are just a view results of using Datasets. “Linq to SQL” instead is a O/R Mapper. It helps a lot and brings performance to your design time. But performance and persistence problems at runtime could occur. If you have a performance critic solution, don’t touch “Linq to SQL”. And using the Entity Framework which means ADO.net makes it worse. Do it by hand - is the only way. Use stored procedures and let the databases do the things they are made for. Yes you can use stored procedures and that stuff in Linq too. But how do you get rid of the caching, the overcharged objects and the heavy memory usage of “Linq to SQL”?         

Visual Studio – Tips & Tricks 2010 @ HM

Ok, i had this Session on 11th February 2010 @ University of Applied Sciences Munich. Since i do that session for many years now, it’s a bit freaky that every time i tell new things. But Visual Studio offers a bunch of tools and features you can use to improve and customize you’re environment the way you like.

Here are some links to other tracks and and a few other tips & tricks i didn’t show at all.

Karen Liu, Lead Program Manager Visual Studio IDE

Dirk Primps, Developer Evangelist

You can download my Presentation right here.

And also the full Demo’s i showed could be found here.

Last but not least the Poster.

Thanks to the speakers above.

Saturday, February 6, 2010

Windows 7 – God mode

A few days ago i get an email containing the following text:

  • Create a new folder anywhere
  • Name it: GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
  • Open it

Ok, i did it. And wow! That’s a very useful tip. Try it out!

Godmode

Joshua W.O.P.R. rules!

Ok, since i’m a really big Fan of the good old day’s where you need nothing but a telephone and a computer, to shock the world. Here comes how you can modify your Windows x.x even Vista and 7 to be more Joshua like.

Question? How to make the cmd look like joshua in wargames the movie? – Greetings Prof. Falken …

So first of all Type [WIN] + R and goto the C:\Windows\System32 folder. Yes you can do that via the Windows Explorer too. If you don’t like the fast way. 

Congratulations the hardest thing is done.

Now search for cmd.exe. If you found it just simple start it. No, you can not do that via bubble cmd start.

So now that we come so far open the context menu by clicking on the top window border and go to Properties –> Colors.

It should like this:

joshua

Notice that you set the color background color to black and the screen text to R: 148 G: 170 B: 214. Close and try you’re new color from Windows bubble –> type: cmd –> hit enter

Ok we are almost done. Again [WIN]+R or now you can use the Windows bubble and type: “regedit” hit Enter.

Yes we are in the Windows Registry, no fear there is nothing you can harm if you follow the next Steps. Or you create a Backup!

Creating a Backup:

  1. Locate and then click the root subkey that contains all the child subkeys and values that you want to back up.
  2. On the File menu, click Export.
  3. In the Save in box, select a location where you want to save the Registration Entries (.reg) file, type a file name in the File name box, and then click Save.

We continue by browsing to:

HKEY_LOCAL_MACHINE –> SYSTEM –> Current_Control_Set –> Control –> Session Manager –> Environment

Ok, guys hope you’re all still with me. Now that we are in the Environment Settings right click to open the contect Menu and say New –> String Value –> rename that new instance to Prompt.

Now you doubleclick the new created String Value Prompt and set it to:

textjosuha  $_Greetings Prof. Falken$_

say ok to save that value. After the next restart of your computer it should look like this:

image

Ok, i know it would be perfect if we could get commodore64 font, but since ttf is not supported by the windows shell, i’m sorry i found no way to that. But hey, doesn’t it looks really back then?

Here is a link about a post i found for customizing the command shell.

Have fun :-)

Monday, June 22, 2009

Visual Studio 2010 Missing Features

Ok, it’s been a while since my last Post. But working with Visual Studio 2010 since a month there are many things i like about the new IDE. But there still some Features Missing. Maybe they are implemented till Release, Maybe not. Hopefully someone in Karen’s Team is reading this. Well i like the Refactoring STRG+., but thanks good Jetbrains announced a Beta in June for Resharper and Visual Studio 2010.  So we don’t have to hesitate. Sorry IDE Team but there are really many Things Missing. So let me start with the Features implemented in Visual Studio 2008 and got lost Things in Visual Studio 2010, i really Miss.

Number 1
The Selection with ALT + Mouse, so that you can Select for example all public declarations.

Why is this Tool so helpfull. Well when you use the CodeSnippets like prop in a Interface, the CodeSnippet doesn’t recognizes that it has to be public. So you have to delete that for your own.

Number 2
The Splitscreen. Where is this small Bar gone? I mean the Word Feature. I want to be at 2 Parts in my Document. I like the new Window Grouping, but i want that Feature back.

Ok this is it, for the first wave. Perhaps i find some other Things i don’t like or miss. And will post it in this Thread.

A lot of new Design Features which i really like, but please don’t forget about the Code Editors. Sometimes Developing is more than just drawing some classes.

Tuesday, April 28, 2009

My days at CeBit 2009

Wow it’s been a while since i wrote my last blog entry. But it’s time to write some new amazing things.

Well first of all, yes i attended the CeBit 2009 Fair on the Microsoft stand at hall 4. Well the project is AntMe! and we worked very hard so that people get information about the AntMe! Ltd. and the AntMe! Version 1.6. Due to the good graphic accelerators in the computers we could also show the new XNA PlugIn.

sshot-5

Now our main character looks like a stoned cute ant instead of a dot with six arms. But also our Bugs changed.

sshot-4

Yes it looks like a big stupid Monster. I like them. And also the sugar Mountains and the apples changed.

I had a lot of interesting meetings and meet a lot of cool guys. So i really had to mention our new friends from xaitment which developed a state Machine for Bots and AI. So visit there homepage www.xaitment.com to get more Information on how you can give your brainless zombie like bots some brain.

And the german TV also recognized us. Welt der Wunder.

CanControls, hubermedia and Visio had a interactive wall. And Manuel from Visio and we had a lot of fun at the Microsoft Party.

Uwe Baumann and i held the daily Patric & Uwe Show. A short 1 hour Presentation on Visual Studio Express, Coding4Fun and AntMe! You can download the PDF Version of the Presentation here. 

A lot of people asked me for the desktop background and where to download so here you go, just click on the image.

While we were travelling with the train i added a touchless to the new XNA Plugin. It worked not very well at that time. But now i finally did it. So perhaps we release this Plugin with version 1.6.1

cheers Patric