DCSIMG
November 2007 - Posts - Just code - Tamir Khason

November 2007 - Posts

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/as-promised-i-reinstall-my-laptop-with-windows-vista-64bit/]


I decided to reinstall my D820 with 64 bit version of Windows Vista as involvement act with Gadi. 13 minutes of installation. All hardware was found and all drivers were installed (this why I love Dell). The same score as was with 32 bit version - 3.2. Fist run of Windows Update = 38 fixes (about 130MB, only required updates, downloaded and installed within 55 minutes including first restart). Another turn of Windows Update brings me additional 2 fixes (63.9MB of driver's updates and 10 minutes ). It downgrade my computer to 3.0. Now I have to add my computer to domain. It was done via VPN over WiFi and took about 10 minutes including security check, policy update and IPSec. After Vista was activated, come Office's and Live Suite turn to be installed. 

image

Office installation took about 2(!) hours. Well, I do not know why it happens, however, let's go on and install VSTS 2008. The first step of VSTS installation required me to restart my computer twice. It looks like there are issues with "Microsoft .NET Framework v3.5 (x64)". However, after I "run as Administrator" the Visual Studio installer, the problem disappears. It looks like there are some files become locked, when running the installer without elevated permissions (THIS IS BUG). After the first step passed, I wait for another 35 minutes for VSTS to be completely installed. To be honest, in x64 HxMerge works a bit faster, then on x32 platform. Additional 15 minutes of MSDN library.

Well, overall experience of installations was rather bad, but much worse is how x64 works. More then half of system processes (see the example of such service - Console IME at screenshot)  are working in simulation mode, so performance of the system is sucks.

image

What will be my next step? Probably, uninstall of x64 bit version of Windows Vista and installation of x32 bit system. I can not see real advantages of using x64 due to fact, that this software is not ready for public use and waste your system resources.

What do you think about this point?

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/silverlight-20-its-time-to-golive/]


Great news for web developers. Silverlight 2.0 beta will be released with Go-Live licence within a couple of months. Other words, in Q1 2008.

What is Go-Live?

This means, that you can begin to build your production Silverlight applications without being worry about feature capabilities and hard rewrites and integrations. Another news is, that in the same time (or even earlier) we'll get CTP of ASP.NET 3.5 extensions, which will be added to ASP.NET next year.

What is Silverlight 2.0?

It's, actually, Silverlight 1.1, that you know. But due to new "managed" concept the product was renamed to 2.0. Other words, too much changed for 0.1 mark :)

What is ASP.NET 3.5 extensions?

Actually, those are extensions for ASP.NET 3.5, released last month. It will include:

  • MVC (model-view-controller) for ASP.NET
  • Entity Framework - kind of Linq, data modeling framework
  • Data Services - access any data by URL
  • Dynamic Data - access dynamic and rapidly changing data without special code to write
  • AJAX - need to explain?
  • Silverlight Controls for ASP.NET - easy integration of Silverlight and ASP.NET server code.

What SL 2.0 will include?

Layout management (Stack and Grid panels), a lot of networking (mostly POX and REST) and controls: Button, CheckBox, DataGrid, Hyperlink, ListBox, Modal Window, Popup, ProgressBar, RadioButton, ScrollViewer, Slider, TabControl, Canvas, FileOpenDialog, Grid, Image, ItemsControl, StackPanel, TextBlock, TextBox, MediaElement and MultiScaleImageElement.

When the final release?

Soon, but we can not tell you yet.

And the last, but not least - Silverlight will be available for mobile devices as well. It, probably, will not happen in current version, but in really near future. Additionaly, Silverlight 1.0 applications will be fully supported by Silverlight 2.0 runtime.

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/silverlight-tools-for-visual-studio-2008-rtm/]


After upgrade to Visual Studio 2008 RTM from Beta 2, you, probably, will need Silverlight tools for VS2008. Download and install it from here. Please note, before installation, you should completely uninstall previouse version of Silverlight tools for Visual Studio 2008 beta 2.

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/hello-is-it-tech-support-please-help-me-my-computer-playes-classical-music-instead-of-rap/]


Do you think, I'm kidding? Not. This is real KB known issue of Windows 95 - 2000. See yourself. (via

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/free-official-copies-of-camtasia-studio-and-snagit/]


Want Camtasia Studio (the best software to make screencasts - remember about Justin's competition?) and SnagIt for free? No problem, just go and download it from official Techsmith website. What's the catch? No catch! This is old versions, provided for free by the company.

Download Camtasia 3 (current version 5) here and get free license key here.
Download SnagIt 7.2.5 (current version 8.2) here.

Have a nice weekend.

via Windows Connect

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/wpf-quiz-1-moving-rectangles/]


Referring last event, I want to start new section in my blog, named "WPF quiz".  In this section, I'd like to ask you WPF related question and a day later answer the question my self. So, let's start

Question:
I have to display large amount of rectangles, which moving randomly at the screen. What approach, should I use in order to gain best performance for my application?

Answers (creation):

  1. Create DependencyObject with relevant properties. Create ObservableCollection of those objects. Create DataTemplate to visualize the object into Rect. Bind ObservableCollection to Children property of Canvas.
  2. Create UIElement, that draws Rect. Create ObservableCollection of those UIElements. Bind ObservableCollection to Children property of Canvas.
  3. Create FrameworkElement hosts Rect. Create ObservableCollection of those FrameworkElements. Bind ObservableCollection to Children property of Canvas.
  4. Create CustomControl, that visualizes Rect. Create ObservableCollection of those FrameworkElements. Bind ObservableCollection to Children property of Canvas.

Answers (movement):

  1. Bind attached properties Canvas.Left, Canvas.Top to X and Y of the objects
  2. Bind RenderTransform -> TranslateTransform property of the objects to X and Y
  3. Create and remove appropriate objects with preset X and Y in ObservableCollection
  4. Create DispatcherTimer to change X and Y properties of the objects.

You should choose one from Answers(creation) section and one from Answers(movement) section to archive full answer to this question.

Please use comments for this post to answer.

My answer will come tomorrow. Good luck.

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/dev411-presentation-and-demos-download/]


I uploaded my presentation, done in DevAcademy2 to SkyDrive. Now you can download, use and review it.

PPT only presentation (7.2 MB)

PPT only presentation before final cleanup (7.6 MB)

Full presentation, including demos, code and PPTX file (26.1 MB)

Have a nice day.

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/thank-you-and-microsoft-expression-blend-sp1/]


First of all, I want to say thanks for all those, who took part in DevAcademy2 event yesterday. I believe, that such events can bring a lot to developer's community all over the world.

Next, I want to announce great work of Microsoft Expression team, that brings us SP1 for Microsoft Expression Blend product.

What fixed in SP1? Most of issues, you reported here.

Download Microsoft Expression Blend SP1 >>

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/dev-academy-ii-updated-matrix/]


Today, I got about 10 phone calls about what's happen with time matrix for Dev Academy II time slots matrix. Please note, that the matrix you got is not updated. Please, download and print updated one from here (my slot is at 9:30 AM).

Download Dev Academy II Matrix >>

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/dev411-wpf-for-developers-optimizing-your-wpf-application/]


Less, then 24 hours until Developer Academy 2 a lot of pressure and stress. Last fixes to my presentation - it's too long now. A lot of stuff, I want to speak about, a lot of demos (mostly very bad performing applications, I'm dealing with), three computers (one is really cool with 8.9 Vista score) and, of cause, a lot of code to write. But I have only 75 minutes to do it all. So, I have to think a lot about how to do it all together with such tight timeframe (do you remember? - 9:30)

What I'll speak about? I'll speak about cool luxury cars, really.

  • First of all, the most common problem, WPF developers faced with - performance. No, WPF scales it, but you should know how to do it smart way.
  • Next, practices. Yes, there are practices and it's worth to learn wisdom by the follies of others. So, I'll speak about those follies.
  • Why sometimes, pixel is matter, and sometimes it is not?
  • What two threads, you are working with? Are there really two? Where the application problems are lying?
  • What is tier? How to measure it? How to know when I'm working with GPU and when with CPU? How to influence it?
  • How much memory (either computer and graphic card) I need?
  • What's the greatest evil of your WPF application (that is not your customer)?
  • How to scale very large bitmaps or very large amount of controls?
  • How to easily make data virtualization by your own hands?
  • How to create your own UI threads? Yes - you can do it!
  • How to make your ListBox x70 times smaller and faster, your data x20 smaller and x700 faster
  • How manage layout and measurement engines
  • How to do things in background without paying application fees
  • How to manage dispatchers
  • How to use visual and data performance measurement tools and how to analyze and profile unmanaged resources
  • How to make your application starts x400 faster and load resources on demand
  • How to load XAML without loading System.Xml.dll and using DOM or SAX
  • How to run the same WPF application on P3 with 128MB RAM and internal graphic card and Core Duo 2 with 4GB RAM and GeForce 880 GTX and get the same behavior of fast running application
  • ...and much much more...

Waiting for you tomorrow at 9:30 AM (this is almost night, kind of morning) at Arbel hall of Avenue at Airport City near Ben Gurion airport. Come an hour before.

image

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/time-slot-of-my-session-in-developer-academy-2-has-been-changed/]


Due to external factors, the time slot of my session in Developer Academy 2 has been changed and now it from 9:30 to 10:45 in Arbel hall in floor 0 (entrance at left). I'm really apologies for this inconvenience and waiting for all of you to come. We're open at 8:30 and there is registration and might be sandwiches in the hall. Come first and park near entrance :)

Please notice: that there are morning traffic jams at the entrance to Airport City as well as registration hassle, thus all those, even come via road 6, take half an hour to 40 minutes spare to enter the parking lot and register.

I'm sorry, that you have to wake up so early, but remember: "Early to bad and early to rise makes a man healthy ,wealthy, wise and not late to DEV411 about WPF lessons learned from last year" :)

27-Nov @ 9:30 AM
set your clock to wake up at 6:30AM and I'll bring you a coffee¹

¹ Limited to first 250 visitors only

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/very-bad-startup-name/]


Today morning, I got call from someone, who ask me to assist new startup with WPF development. I asked a name of the startup. The name is "Proc To Light". Nothing special, they are doing very interesting application, that support analysis to make right decisions regarding different business process. I typed the name of the startup and phone number into my E61 without spaces. Once I got to office, I looked into the note made burst out laughing like crazy. The name of this startup is "PROCTO LIGHT". I called the guy and told him, that I advice them to change their company name in order not to spawn investor's relation.

Image:Anorectum.gif

What other fun startup names do you know?

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/why-good-programmer-never-write-good-programs/]


Here, one of visitors, begun a discussion about good and bad programmers. Here, I wrote about absolutely unnecessary and not relevant questions to good programmers. Someone things, that good programmers should write good programs. However, I want to interpose my objections to the statement. And this why.

image

Let's start with the term "good programmer". What is it?

  • He knows any, even small details of programming language
  • He knows to write very efficient algorithms
  • He always in new technologies and applies them in his everyday work
  • He is extremely innovative
  • He tries to make his every bit to be perfect
  • He glows with enthusiasm
  • He's very smart and inventive

Can such person write good program? Probably not. He can not write even average program, because of very small fact - the target of the programs we writing.

Whom we write for? For customers. The customers has no idea about what programming language we are using to write the program. He even do not know why we use this or other approach to solve his business problems. He do not care about algorithms, structures and abstract layers. He do not care about top and very efficient technologies, helps us to perform tasks better. He want to solve his problems and he want to do it quicker as possible with minimal effort from his side.

Now I want to ask you a question: "Do you (as programmers) interested with his (customer's) business processes and problems?" - the answer is NO! You're much more interested with how to make your work smaller and be able to expand it in the future upon customer's requests (not needs). To expand and enhance the program by yourselves - not by any other. You are the programmer!

Honestly, you are right, it is not your job to understand user - this is the job of business intelligence expert. However, how many companies hires this one? How many job boards advertises "BI experts"? - NONE (except those, how want him to sell their products). Everyone are looking for programmers, team leaders and architects. They want you to do it. They want you to understand customer's problem and you to solve it. Will you? Probably not, but you'll try to and this will take most of your work time. This why the programmers of today, probably good programmers, but, actually, they are not writing (and unable to write) good programs. It maybe very good from inside, but will be never good outside.

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/i-love-such-spam/]


That's exactly what I mean, when writing such articles.

image

Translation for English speakers: "Wake up!!! Job boards are overloaded... Very high wage in HighTech. .NET. Press here and you're financially secured.

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/visual-studio-2008-new-test-features/]


Referring my disappointment from the topics on 70-552, I start looking on new test features, provider by Visual Studio 2008. I worked with performance analyzer in VS2005 (which is looked much more like debug tools for .NET CLR developers in MS) and today, after public release of VS2008, I can show you my research.

From the first sight, it looks like nothing changed

 

image

But when we're digging deeper, we discover new interesting features.

image

Look in this. My application decodes jpegs most of the time. And this is very right.

image

Another great feature, that makes our live easier is Set Root method and Hot Path marking. Now, once, you found the root of your application, you're able to "hide" unnecessary nodes (in most cases, those are system calls) and then mark the critical path (from performance point of view) in your call tree. You also can find all modules and functions, called selected method.

image

Another feature of new performance analysis tool is ability to compare your test run samples.

image

Very very cool tool, however it still too complicated for average user to understand what all those numbers mean, even with handy new Noise Reduction filters :)

image

Now you, probably, know what the problem with CarKiosk.exe application. You do not know what is it? Come and see at Developer Academy II at DEV 411.

More Posts Next page »