// ==UserScript==
// @name Twitter extensions script
// @description Short script that gives some features I really miss like Ctrl + Enter way to submit tweets.
// @version 0.1
// @include http://*twitter.com/*
// ==/UserScript==
console.log('Started Twitter script');
var txtStatus = document.getElementById('status');
if (txtStatus == null) {
return;
}
txtStatus.onkeypress = function (e) {
e = e || window.event;
var keyCode = e.keyCode || e.which;
var ctrlKeyPressed = e.ctrlKey;
var enterKeyPressed = keyCode == 13 || keyCode == 10;
if (ctrlKeyPressed && enterKeyPressed) {
console.log('trying to submit tweet...');
var submitTweetButton = document.getElementById('update-submit');
submitTweetButton.click();
return false;
}
}
Sunday, 10 January 2010
Fixing Twitter for Chrome with User JS
Friday, 18 December 2009
IronRuby LinkedIn Group
Saturday, 21 November 2009
Diving into RIA architectures with Flex as an example
Friday, 20 November 2009
Fixing IronRuby error when installing Rake
>igem install rake
ERROR: While executing gem ... (ArgumentError)
C:/Program Files/IronRuby 0.9.2/Obviously it's not longer than 255 characters, so the reason is possibly in spaces. I've reinstalled IronRuby to:
E:/bin/ironrubyPS C:\Users\Ivan Suhinin> igem install rake
Successfully installed rake-0.8.7
1 gem installed
Installing ri documentation for rake-0.8.7...
Installing RDoc documentation for rake-0.8.7...
Yahoo! :) Hope this post will help someone with same problem.
Thursday, 19 November 2009
Running IronRuby 0.9.2 with RubyMine 2.0
Here goes step-by-step manual:
1. Download IronRuby 0.9.2 from here and install it.







Wednesday, 18 November 2009
Use remote desktop connection faster with PowerShell
$prodServers =
@{
'prod-01' = '1.2.3.2';
'prod-02' = '1.2.3.3';
'prod-03' = '1.2.3.4';
'prod-db-01' = '1.2.3.6';
'prod-db-02' = '1.2.3.8';
}
Set-Alias rdcx 'c:/WINDOWS/system32/mstsc.exe'
function rdc([string]$serverName)
{
$param = ''
if ((![System.String]::IsNullOrEmpty($serverName)) -and ($prodServers.Contains($serverName)))
{
$param += '/v:' + $prodServers[$serverName]
}
rdcx $param
}
Monday, 16 November 2009
Use PowerShell to determine MS SQL table used data space
ls tables | sort -Property DataSpaceUsed -Descending | ? {$_.DataSpaceUsed -gt 1024} | % {$_.Name + " takes " + [math]::Round($_.DataSpaceUsed / 1024 ) + " Mb"}ls tablessort -Property DataSpaceUsed -Descending? {$_.DataSpaceUsed -gt 1024}% {$_.Name + " takes " + [math]::Round($_.DataSpaceUsed / 1024 ) + " Mb"}Friday, 13 November 2009
Enlarge your Build System!
That's only 9th message!
Delete all MSMQ queues at some PC with PowerShell
What to do? Powershell, of course! :) Here goes the script:
[Reflection.Assembly]::LoadWithPartialName("System.Messaging")
[System.Messaging.MessageQueue]::GetPrivateQueuesByMachine("someserver") | % {".\" + $_.QueueName} | % {[System.Messaging.MessageQueue]::Delete($_); }
You may also filter them by name if you do not need to remove them all as I need:
[System.Messaging.MessageQueue]::GetPrivateQueuesByMachine("someserver") | % {".\" + $_.QueueName} | ? {$_ -match "SOME_REGEX_FILTER"} | % {[System.Messaging.MessageQueue]::Delete($_); }Saturday, 26 September 2009
What do we need to use IronRuby?
jschementi: Time to start building real #ironruby and #ironpython websites: what content (other than the obvious get/learn/etc) would you like to see?I'm not going to speak about creating new applications, I'm going to describe a switch of existing ASP.NET application written in C# to IronRuby. Let's have a real-world example. I'm working on a rather huge ASP.NET application dealing with user photos. We use NAnt to build our application, NUnit to test it. Application is layered, we have separate layers for presentation, business logic, data access, etc. We're using ASP.NET 3.5 and have started switching new functionality to ASP.NET MVC 1.
Friday, 28 August 2009
Resharper doesn't see assemblies from GAC
Thursday, 28 May 2009
Twitquake!
Sad!
Sunday, 24 May 2009
Back online!
P.S. BTW, I'm now at Twitter and StackOverflow too :)
Monday, 19 January 2009
NAnt HowTo #4: How To Create And Use Custom NAnt Task
new class named OK, let's start. What is a NAnt task? Formally, it's a class that extends NAnt.Core.Task class from NAnt.Core.dll assembly located in your NAnt installation folder. As any class it will be placed in an assembly, and this assembly is the way you interact with NAnt. So, let's get it! The following steps describe how to create a simple HelloTask task.
1. Create new project
Create an empty class library project that will compile to .dll file.
2. Create new class derived from NAnt.Core.Task
Create new class named HelloTask and derive from NAnt.Core.Task:
public class HelloTask : Task
{
}
3. Override ExecuteTask method
As NAnt.Core.Task class is abstract VS will suggest you to override the ExecuteTask method - do it. Put the following implementation into it (assume that Person property is already defined ;)):protected override void ExecuteTask()Have a look at Project.Log() call - it will output some message with needed level.
{
Project.Log(Level.Info, String.Format("Hello, {0}!", Person));
}
4. Define task name
To define task name, you should apply NAnt.Core.Attributes.TaskNameAttribute attribute to your class:[TaskName("hello")]
public class HelloTask : Task
5. Define task attributes
To define task attributes, you should define property of appropriate type and mark it with the NAnt.Core.Attributes.TaskAttributeAttribute attribute:[TaskAttribute("person", Required = true)]Attribute constructor allows you to specify several options, like whether this attribute is required.
public String Person
{
get;
set;
}
6. Load assembly with you class in NAnt
To use your new task you should place your assembly somewhere NAnt has access to. Two most appropriate options are in NAnt installation folder and in build execution folder. Though I prefer the last one, the first one may be useful if you use your custom tasks regularly though not changing them often.As soon as assembly is properly placed, you should load tasks from it in your build file. Use loadtasks attribute to load it:
<loadtasks assembly="Leaves.NAnt.Custom.dll" />
7. Use your task
Just use it in the most obvious way:<hello person="world" />The output will be the following:
It works!all:
[loadtasks] Scanning assembly "Leaves.NAnt.Custom" for extensions.
Hello, world!
8. Summarize
This is what we've got in our task:using System;And build file:
using NAnt.Core;
using NAnt.Core.Attributes;
namespace Leaves.NAnt.Custom
{
[TaskName("hello")]
public class HelloTask : Task
{
protected override void ExecuteTask()
{
Project.Log(Level.Info, String.Format("Hello, {0}!", Person));
}
[TaskAttribute("person", Required = true)]
public String Person
{
get;
set;
}
}
}
<?xml version="1.0"?>
<project name="NAnt HowTo 4" default="all" xmlns="http://nant.sf.net/release/0.85-rc2/nant.xsd">
<target name="all">
<loadtasks assembly="Leaves.NAnt.Custom.dll" />
<hello person="world" />
</target>
</project>
Friday, 16 January 2009
ASP.NET MVC impressions
It's awesome! As a fan of Ruby on Rails I can tell you: ASP.NET MVC is f*cking awesome!
Monday, 5 January 2009
NAnt HowTo #3: How To Run NUnit Tests From Your Build File
This post continues my NAnt HowTo series. In previous posts I've covered topics of compiling your project and splitting your build file. Today I want to tell you how to run NAnt unit tests from your NAnt build script.
First of all you may notice that main NAnt distribution has TWO NUnit tasks: nunit and nunit2. First one is designed to work with NUnit 1.0 and second one with NUnit 2.2. This simple moment can warn you that something is not as good as it seems here. And you will be right :) Me personally had a problem running NUnit of some lately version using this nunit2 task. After some googling I've found a solution in Scott Hanselman's blog where he spoke with his friend on same topic. As a result of this conversation Scott recommended using nunit-console.exe instead. I've tried it - it works :) Now changing NUnit version will not break as nunit-console command-line specification is not something to change when switching from 2.x to 2.(x+1).
How can we do this? Simple enough:
<target name="tests.unit.run" description="Run unit tests">
<exec program="D:/bin/nunit/nunit-console.exe"
workingdir="D:/projects/MyProject/Integration"
commandline="MyProject.Tests.dll /xml:TestResults.xml /nologo"/>
</target>
So, step by step.
- We use <exec> task to run an executable. This also means that if our nunit-console.exe executable fails (read: some test fails) it will break our build. Of course, you may use failonerror="false" attribute on your <exec> task but I do not recommend doing so - why would anyone ever need tests if their failure will be ignored?!
- We specify path to our nunit-console.exe executable via the program attribute.
- We specify working directory (usually it's integration dir where you have all needed assemblies) via the workingdir attribute.
- We pass command line parameters via the commandline attribute.
- First non-keyed (with no preceding /im-a-key: keys) several arguments specify assemblies to run tests from.
- Argument after /xml: key is a bit more interesting. It indicates the XML file where test results will be stored. You may not need it at the moment but you'll definitely need this file when you'll be integrating your NAnt build script with CruiseControl.NET or any other integration software.
- /nologo key suppresses NUnit copyright information display on each run
That's the end :) Next time I will probably speak on writing NAnt custom tasks. Stay online.
Tuesday, 30 December 2008
NAnt HowTo #2: How To Split Your Build File
Let's assume you have a large build file with many-many targets, properties, etc. After some time it becomes pretty hard to support and extend it. What can we do? As for me, the best option here is to split your build file to several pieces. Below goes an example on how you can do this.
My default.build file:
<?xml version="1.0"?>build.include file:
<project name="NAnt HowTo 2" default="all" xmlns="http://nant.sf.net/release/0.85-rc2/nant.xsd">
<!-- Includes -->
<include buildfile="build.include" />
<include buildfile="test.include" />
<target name="all" description="Default target, calls all deployment tasks.">
<call target="rebuild" />
<call target="test" />
</target>
<target name="rebuild" descripton="Rebuilds all projects." >
<call target="clean" />
<call target="build" />
</target>
<target name="test" description="Runs all tests.">
<call target="tests.unit.run" />
<call target="tests.integration.run" />
</target>
</project>
<project xmlns="http://nant.sf.net/release/0.85-rc2/nant.xsd">test.include file:
<target name="clean">
<echo message="Rebuild: clean" />
</target>
<target name="build">
<echo message="Rebuild: build" />
</target>
</project>
<project xmlns="http://nant.sf.net/release/0.85-rc2/nant.xsd">
<target name="tests.unit.run">As you can see, actual inclusion takes place when you use <include> element and specify it's buildfile attribute to point to some .include file.
<echo message="Test: unit tests" />
</target>
<target name="tests.integration.run">
<echo message="Test: integration tests" />
</target>
</project>
.include files should contain root <project xmlns="http://nant.sf.net/release/0.85-rc2/nant.xsd"> element with necessary xmlns attribute. Without this attribute NAnt won't be able to parse this file and use it's targets.
Included files become a piece of main build file and share all properties with it. This means that properties from included file are visible in main file and vise-versa. I usually place commonly used properties to separate .include files, for example, I have projects.include file with all properties that point to project names and folders.
Monday, 29 December 2008
NAnt HowTo #1: How To Compile A Project?
NAnt provides a CSC task that will allow you to compile your C# project (sorry, VB guys, no info for you :)). It may be used this way:
<!-- 2. Building shared data project -->
<csc target="library" debug="false" warnaserror="true"
output="D:/projects/MyProject/Integration/MyProject.dll">
<sources basedir="D:/projects/MyProject/Source">
<include name="**/*.cs" />
</sources>
<references>
<include name="D:/projects/MyProject/External/NHibernate.dll" />
</references>
<resources>
<include name="D:/projects/MyProject/Source/NHib/*.hbm.xml"/>
</resources>
<nowarn>
<warning number="1702" />
</nowarn>
</csc>
So let's have a look in details at each part of this task.
AttributesOne by one:
- target="library" - indicates that we want to have a .dll as result of our compilation. Possible values are
exe,winexe,libraryormodule. - debug="false" - indicates that no debug symbols will be included into our assembly. Possible values are
Enable,Full,NoneandPdbOnly. Although you can use aliases (like I did):truestands forEnableandfalsestands forNone. - warnaserror="true" - has same effect like checking 'Treat warnings as errors - All' option in Visual Studio. All warnings will be treated as errors.
- output="D:/projects/MyProject/Integration/MyProject.dll" - output of compilation. Make sure your output target extension is adequate to your compilation target (although I haven't tried compiling target library to output .exe :-P)
This nested element allows you to select files that should be compiled. It's only attribute I use here is:
basedir="D:/projects/MyProject/Source" - base directory for source files. Usually this is root folder for some project.
The <include> element allows you to specify elements that should be compiled. It's attribute, name, deserves some attention. First, it uses wildcards to pick necessary items. Second, it uses double asterisk to recursively pick all files from all folders. Have a look:
- name="*.cs" will pick .cs files only in current folder
- name="**/*.cs" will pick .cs files from current folder and from all subfolders, their subfolders, etc.
References
This nested element allows you to specify assemblies that should be references. Syntax also supports wildcards so you can easily specify *.dll to reference all .dll files in some folder.
Resources
This element allows you to deal with resources embedded into your assembly. In this particular case I use this element to embed NHibernate .hbm mappings.
NowarnThis section allows you to ignore some specific warnings via nested <warning /> element. Use it's number="1702" attribute to specify some specific warning you want to ignore.
Conclusion
That's a short explanation on CSC target, more information can be found here. Hope this post will be helpful to anyone other than myself :D
NAnt HowTos
Lately I had to dive into NAnt and I'm going to post here several posts on some simple NAnt questions.
Wednesday, 24 December 2008
Things to complete
Here goes the list of things I want to complete in the nearest future:
- Master ASP.NET MVC
- Become senior software engineer at next internal attestation
- Dive deep into .NET attributes programming
- Master JQuery
How to become a better specialist?
Work with those who are smarter and more professional than you. This is a modified quote from some chess book and it applicable to literally any profession.
Applying this statement to my profession (I'm a .NET developer if anyone could have forgotten that ;)), you can become better much faster if you work with someone more qualified than you. I've been working with two nice developers for almost six months and now I can see my level is growing way too faster than if I would increase my skills myself. I'm actually approaching their level, day after day.
That's why in one of my dreams I imagine myself working together with such persons like Martin Fowler or Scott Guthrie. That could be a real experience boost!
Sharp Architecture
Do you want to become a better developer? Try this project. Yes, just download it and read the code. Comments are marvelous, design is outstanding. I love it. I've picked several tricks and two absolutely new libraries/approaches for myself.
Although it's designed to use with ASP.NET MVC beta you'll easily grab NHibernate code as it was designed not to depend on view framework.
Just try it
Tuesday, 23 December 2008
ASP.NET Form Autocompletion
Our customer was really interested in enabling autocompletion feature for registration page. I've searched a lot, I've found a huge number of pages describing how to turn it off and (at last!) only one page about how turning it on.
All magic is hidden in AutoCompleteType property of asp:TextBox. You can read about it in details here but in a nutshell this field allows you to specify what information should be autosuggested for this particular TextBox.
Enjoy!
Monday, 22 December 2008
Friday, 19 December 2008
Thursday, 18 December 2008
Internet Explorer 8 Release Candidate 1
According to a friend of my friend, IE8 RC1 has been accessible for Microsoft partners a month ago :( And seems like:
- No standards
- Slow JavaScript
- Security problems
- 17 in ACID3
I hope it was very old build. VERY old.
=(
Leaves Bugs System
Are you satisfied with Bugzilla? My answer is NO. I know it's has many nice features but I'm absolutely disappointed with it's UI. How could anyone create such a crap?! It's unusable and usually I spend up to 10 minutes to search for defects assigned to me for some specific iteration.
I saw nice solutions, but all of them had some drawbacks that made me drop using them off. One of these drawbacks was the price =). Anyway, me decision is to create something of my own. And as it is my graduation project, I have to complete it.
I'll develop it on top of the ASP.NET MVC Beta, NHibernate as my ORM (I'm disappointed with the EF at the moment) and JQuery as a great accelerator for UI. I'll try to follow best practices, including TDD and CI. Hope this will be a nice project ;)
Yesterday I've created some basic folder structure and started writing NAnt script for my new solution. I've also set up SVN server and added my projects to subversion. If everything goes fine I'll manage to set up CI at the earliest stage possible - and that's a good point. And later on - no step without TDD :) It's just too good to work without it.
New info coming soon!
Web Developer Wish List
Nice article on what you may ask for Christmas :) My choice is office chair - together with other 55 people who voted the same.
Wednesday, 17 December 2008
New Live Writer
Could you image what could be better for blogging than Microsoft Live Writer? Earlier I could not, but now I see how I was mistaken :) And the answer is...
Live Writer 2009!!!!
Actually, this is just a release candidate, but the list of improvements looks fine:
- Support for YouTube
- Support for Flickr
- Spellchecking for some more non-English languages
- Support for Digg
- Support for Twitter
Waiting for release =)
Tuesday, 16 December 2008
Chrome vs IE 8 Beta
This article shows that IE8 Beta loses the battle to Google Chrome. I think that it's mostly because of BETA in IE 8 name and Google Chrome has recently dropped same suffix.
Hope IE8 wins =)
Ruby-based barmen DSL
It's wonderful!
Just have a look at this sexy code:
drink 'Screwdriver' do
serve_in 'Highball Glass'
ingredients do
2.ounces :vodka
5.ounces :orange_juice
end
end
I like it! And you? ;)
Some interesting links
- It Oxite as good as it's claimed to be? According to this well-proved article, it's not and, moreover, it will hurt ASP.NET community.
- How your team goes agile? Our team tries to be agile but it's not a one-second process and it takes some time to adapt from previous techniques to agile methodology. That's why I really like articles about other agile teams as I can pick some interesting thoughts on agile from them. From this article I've actually taken four thoughts (2 absolutely new, 2 I knew earlier fundamentally explained)
- Some new Ruby book, available free in e-book format.
Monday, 15 December 2008
Best text editor for Windows I've ever seen
Yes, that may sound too promising but whatever. I tried it and it's sexy. Nothing wrong, everything is extremely cool. I love it.
So, what is it? What is this wonderful sexy text editor? Here it goes: Intype. Check it here.
Snippets are sexy, UI is sexy, logo is sexy. It's SEXY!
Wednesday, 10 December 2008
Ruby is FAST!
That's what I'm talking about. Ruby 1.9 is almost five times faster comparing to Ruby 1.8.6. Isn't it great? Perhaps this fact will make me turn back to Ruby from Python and will help me making my decision on platforms I use.
I'm aiming to have two platforms by my hand and for my purposes. The first one is definitely .NET - the one I'm going to use for large enterprise solutions. The second one is something I'm not sure about. I do know the main purpose of it though: this platform should be cross-platform, built on top of some script language and be easy to use for some lightweight solutions like a small e-shop or anything alike. Current variants are:
- Ruby with Ruby on Rails or Merb
- Python with Django or Pylons
- Objective-J with Cappuccino
I'm a devoted fan of Ruby and if Ruby's speed is not a problem anymore I'll definitely turn back to Ruby. That's why I meet all such kind of news with great inspiration and hope.
Monday, 8 December 2008
The power of shell
Finally I've found some time to download and have a look at PowerShell - Microsoft replacement for it's old-ugly-non-usable command line prompt. And all I can say is GREAT! It's absolutely wonderful in it's might! Predefined aliases make it look like *UN?X shell and make it more usable.
Also take a look at PSTOOLS tool from Mark Russinovich - another great set of tools. As for me, I really like writing this:
pskill firefox
And this will actually kill firefox process. Isn't it wonderful? :)
Friday, 5 December 2008
Calling .NET libraries from IronRuby
In my recent post on IronRake I've used the following task to demonstrate the power of IronRake:
task :default do
require 'mscorlib'require 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
print System::Guid.NewGuid().ToString()
end
And now I can tell you that everything is much simpler that that. Don't use "require" plus full assembly name. Use the following:
require 'mscorlib'
task :default do
include System
print Guid.NewGuid.ToString
end
"Include System" is much shorter, isn't it? :)
John Lam Talk on PDC
Yesterday I started viewing IronRuby video from PDC by John Lam. It's marvelous! I did know Ruby is a powerful language, I did know .NET is a powerful framework but I could not imagine how powerful IronRuby will be!
I recommend this video to anyone interested in IronRuby, you'll see many interesting things there.
Thursday, 4 December 2008
Python 3 released
You can download it here.
Recently I've been diving into Python 3 rc3 and I can say that I like it. It is not as verbose as Ruby is but it's much simpler and _faster_. You know, I mean, FASTER. So my choice is using Python for some lightweighted websites (e.g. for my freelance tasks) and IronRuby for some huge websites.
Running IRake
This post will show you how to setup and run irake and feel incredible power of great tool written in great language that runs in great framework.
NOTE: in this post I assume all paths are correct and you can write 'rake' instead of 'd:/ruby/bin/rake'.
First, download IronRuby alpha 2. Unpack and have a look what we have. In /bin folder we have some executables, including iirb and irake. We're actually interested in second one. Let's create a simple task to try it!
task :default do
print 'rake is up and running!'
end
Let's try how it works with simple rake:
>rake
rake is up and running!
Cool. Let's try irake:
>irake
unknown: Could not find RubyGem rake (>= 0)
(Gem::LoadError)
Ok. Let's install it. As we are using irake we should use igem.
>igem install --remote rake
ERROR: While executing gem ... (System::IO::DirectoryNotFoundException)
Could not find a part of the path 'D:\External\languages\ruby\ruby-1.8.6\lib\ironruby\gems\1.8\gems\rake-0.8.3\bin\rake'.
That's the trickiest part of all. This path is not configurable (at least I could not find it), so we'll have to place ruby just where program expects it to find. What is interesting, this folder is already created. We'll install ruby 1.8.6 and copy it to this tricky folder ("D:\External\languages\ruby\ruby-1.8.6").
After that, let's try to install rake once again.
>igem install --remote rake
ERROR: While executing gem ... (System::IO::DirectoryNotFoundException)
Could not find a part of the path 'D:\External\languages\ruby\ruby-1.8.6\lib\ironruby\gems\1.8\gems\rake-0.8.3\bin\rake'.
Argh! What's wrong now? Let's check the path once again. Oops, 'rake-0.8.3' folder contains no 'bin' folder but only the following files:
CHANGES
install.rb
MIT-LICENSE
Rakefile
README
TODO
So this means rake is actually not installed even in native ruby. Let's do it.
>gem install --remote rake
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed rake-0.8.3
Installing ri documentation for rake-0.8.3...
Installing RDoc documentation for rake-0.8.3...
Ok, fine. Copy installed rake folder to ':\External\languages\ruby\ruby-1.8.6\lib\ironruby\gems\1.8\gems\rake-0.8.3\'. Going back to igem...
>igem install --remote rake
Successfully installed rake-0.8.3
1 gem installed
Installing ri documentation for rake-0.8.3...
Installing RDoc documentation for rake-0.8.3...
Error in template: Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index
Original line: <td>%dtm_modified%</td>
Even some error can't upset us seeing line 'Successfully installed rake-0.8.3' =) So let's try irake in action:
>irake
(in D:/information/projects/ironruby)
rake is up and running!
Wonderful :) Irake is up and running. The last thing to do is to is to show that irake is not rake and can work with standard .NET library. Let's modify our rake task to use some .NET code:
task :default do
require 'mscorlib'require 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
print System::Guid.NewGuid().ToString()
end
Making sure this task doesn't work in standard rake:
>rake
rake aborted!
no such file to load -- mscorlib
And, finally:
>irake
df2869e8-6b24-49d4-8915-424028b9871e
Conclusion:
We've installed irake, configured it to work and wrote a small task that works in it but not in standard rake. Later on I'll try to port some compilation tasks to irake and switch to it from nant in my projects.
Note:
For now, irake call is MUCH slower, than rake call. Hope later on IronRuby guys will speed it up.
Wednesday, 3 December 2008
Upcoming Add-on-Con at Mountain View
According to this page IE 8 developers will possibly make crossbrowser extensions creation as simple as it could be. Nice move, actually. Hope this aspect of extension creation will be treated by extension creators just like web developers treat writing crossbrowser websites. This means most good Firefox extensions will be fortunately ported to IE 8 and users will be able to switch to the latter with minimal troubles.
Tuesday, 2 December 2008
Fowler on Rake
A quote from wonderful article:
So far I've found rake to be a powerful and easy to use build language. Of course it helps that I'm comfortable in ruby, but rake has convinced me that a build system makes sense as an internal DSL to full-blown language. Scripts are a natural for building stuff in many ways, and rake adds just enough features to provide a really good build system on top of a fine language. We also have the advantage that ruby is an open source language that runs on all the platforms that I need.
I was surprised by the consequences of flexible dependency specification. It allowed me to do a number of things that reduced duplication - which I think will allow me to make it easier to maintain my build scripts in the future. I found several common functions that I pulled out into a separate file and shared between the build scripts for martinfowler.com and refactoring.com.
If you're automating builds you should take a look at rake. Remember that you can use it for any environment, not just ruby.
Rake forever :)
Python 3.0 rc3
Yesterday I've installed release candidate #3 for Python 3.0. My expectations were high enough and as with all high expectations I did not find what I was intended to find. 'self' in method signatures is still there, for example :( I'll continue my investigations by all my enthusiasm has gone.
Another not very good news is that Python actually doesn't have anything like Rake. Yes, it has some continuous integration tools, but that are far from rake in verbosity. I've found a blog post announcing development of something called 'Pyke' - Rake for Python. The author of it is a real Python fan and the only reason to develop this 'Pyke' for him is to prove that Python is better than Ruby. The latest post about this tool is dated December 11, 2007 that means we're not going to see anything of Rake level in Python world. What a pity :(
Really I like Ruby more, but... But as was stated in my recent post I'm a bit disappointed with Ruby. That's why and only why I'm going to study Python 3.0 and see what it can offer for a Ruby fan.
Monday, 1 December 2008
Microsoft Natural Ergonomic Keyboard 4000
Yes! I've got it! Hurray!
So, now I'm thinking about my second step towards ergonomic workplace. Will it be new mouse, trackball or something else?
Domain Driven Design in the essence
Here goes a small article on the essence of DDD. Being short - dive into the domain, be a part of it. Do not mess with implementation details, think higher. Understand the domain as much as you can.
Sunday, 30 November 2008
Ruby is... Visual Basic?!
Did you know that Ruby was a codename for a prototype form generator? And did you know it was bought by Microsoft and later on evolved into Visual Basic language?
Friday, 28 November 2008
Thursday, 27 November 2008
IronRuby alpha 2!!!
YAHOO! Wonderful present from IronRuby creators :)
Looking forward to try irake...
Microsoft Live Calendar
Yesterday I played a bit with Microsoft Live Calendar. Looks like a brother of Google Calendar, a very close one. Really, they have very much in common, though Live Calendar is much younger.
I don't know of any API for it, but soon I'll have to investigate them - we've started a project of synchronizing studies schedules with GCalendar and LCalendar. Hope we'll move as far as our ambitions are :)
Joke :)
Is it true that server with Windows 7 can be easily restored by showering it with a bottle of 7Up? :-P
Wednesday, 26 November 2008
ASP.NET Chart Control
After so many years of third-party implementations we have it! Native asp:chart control that will be shipped with ASP.NET 4.0.
Tuesday, 25 November 2008
Entity Framework, how could you? :(
Yeah, that's it. Entity Framework has shocked me in the morning. I tried to wrap some legacy code with nice EF function and everything seemed to work fine - model browser showed me stored procedure and it's ObjectContext analogue. But the trick is that it existed only in EF XML mapping, not in C# code =(. After some googling I've found something very frustrating:
Function import code will not be generated if stored procedure it's mapping returns scalar value.
I'm upset :( All is left is to wrap result value with some fake entity. Perhaps, I could have written my own function but it's not the case for framework-that-does-everything-for-you.
Hope this feature (bug! bug!) will be fixed in EF v2.
Monday, 24 November 2008
Microsoft Live Reader
Why - I do ask you. WHY? Why Microsoft has such a beautiful tool like Live Writer and have no tool for RSS reading? Yes, Live Mail includes some tools for reading RSS but I'm really looking for online solution.
Once again - WHY?!
WebMail Notifier
Lately due to my interest in Microsoft new products I've been extensively using Hotmail. It's a pity they can't send incoming letters to GMail and each time I had to visit hotmail page and check for new messages manually. GMail had no such problem as I've been using GMail Notifier for a while. Today I thought of same Firefox add-on for Hotmail. Little googling - and see what I've got:
It's marvelous! It supports all of these: Hotmail, Gmail, Yahoo. I like it :)
I hate XSLT xsl:for-each!!!
I've spent almost an hour trying to find out what's wrong with this xslt file. All I needed was to display list of items each at new line. I've tried simple newlines, concatenated newline with "." in body of "value", added empty xsl:text elements with newline inside, tried , tried 
 - nothing worked!!! And these methods worked fine outside the xsl:for-each element, but inside it... Arghhhh! I tried to use xml:space="preserve" - It helped neither.
After all I started adding '\n' to each item I wanted to be at new line. Yes, it's not view-decoupled but it works and I know there will be no need to change xslt in way this change will break produced result.
P.S. I hate XSLT!!!!
Thoughts on Ruby
Not actually mine, but anyway, mine are similar.
Read not mine thoughts
As for me, Ruby minuses are:
- It's slow
- No native threads support
- It's slow
- Minor bugs that sometimes mess me up
- It's slow
So these are five minuses of Ruby (it's speed deserves three minuses, for sure) and I don't know if IronRuby will fix these but I really hope to see that.
P.S. Dear kirindave, your post is wonderful but please don't use italics - it's very hard to read. Thanks to my FireBug that allowed me to disable this italics style.
Fresh Books

This book covers different topics on continuous integration and gets user acquainted with the de-facto standard for continuous integration: Cruise Control. I'm really looking forward to reading it :)
Another book I bought is:

I've heard many good testimonials about this book so the choice was obvious :)
Friday, 21 November 2008
Haha, Google Analytics is down
It's first time I see this message but I'm really disappointed with it:
>>>>>
An Error Has Been Detected
Please try again. Thank you for your patience.
<<<<<
=(( Seems like Google is not that stable
This is my test post with Windows Live Writer
Wow! I like it :) Clean and easy install and wonderful textpane with your blog style.
Also it supports pasting code from Visual Studio - and that's one of reasons I've decided to switch to this software. Actually it's not built-in and accessible via this plugin but whatever :)
Thursday, 20 November 2008
IE8 features
1. JavaScript improvements:
a. Totally rewritten Garbage Collector - performance gain
b. String operations improved - performance gain
c. Collections operations improved - performance gain
2. Development improvements:
a. JavaScript debugging
b. On-fly changing of literally anything at the page
c. JavaScript profiler
d. XMLHTTPRequest now can be cancelled
e. added JavaScript event for connection interrupts
3. Standards and compatibility
a. fully supports W3C recommendations
b. compatibility modes for previous IEs: 7th engine and 5th & 6th emulation
c. HTML 5
d. CSS 2.1
4. User features
a. Web Slices - like RSS, only much better and with visualization :)
b. URL parts are clickable - useful for websites with sitemap
c. each tab is a single process - if it crashes nothing happens to other tabs
Bad news: no IE8 at the end of November :( More details here.
Visual Studio 2010 will have WPF UI!!!
According to information presented for developers at Microsoft Developer Days, user interface of Visual Studio 2010 will be completely rewritten in Windows Presentation Foundation!
Perhaps, it will even have a ribbon :)
P.S. In CTP text editor selection background is _sexy_ :-P
Wednesday, 19 November 2008
Tabs or Spaces?
Just try it! To show white spaces in Visual Studio use 'Edit > Advanced > View White Space' menu item. Use 'Edit > Advanced' menu to tabify or untabify selected lines - really cool feature when you are converting your old file to your new religion :)
Don't forget to go to 'Tools > Options > Text Editor > All languages' and check 'Keep tabs' radio. Otherwise next time you'll press the Tab key you'll see four dots instead of one sexy arrow :)
To modify color of visible white spaces use 'Tools > Options > Environment > Fonts and Colors > Display Items > Visible White Space'. Try setting color to make them visible enough though not distracting you with visual noice. As for me, I'm using rgb(34, 114, 134) for my modified Moria theme. Looks like this:

You can see them easily yet concentrating on your markup is easy.
Enjoy :)
One day left
P.S. I'll possibly post here some photos from this event.
Tuesday, 18 November 2008
Windows 7 most discussable topics
- modified UAC (yeap, much more customizable drive-me-crazy-popups)
- new taskbar (finally we can sort icons at taskbar. Perhaps, the larger step taken from Win 3.1 :))
- HomeGroup - now it will be much easier and secure to share your folders, view Mary's shares, etc.
- Libraries - looks like some case of taggable file system. You'll be able to group files by their content, not only drives and folders. As for me - I'd like to see fully functional taggable file system.
- Touchscreen - for now I'm not sure how this feature will be useful. Perhaps, in games with horizontally placed monitor it will be useful (Tetris, Spider, Fallout 3... oops, not the case :D). But in routine tasks... I'm not sure. Hope Microsoft knows what it's doing.
Monday, 17 November 2008
Microsoft Developer Days in Minsk
On thursday I'm going to visit this event and make a short photoreport about it. Really looking forward to Windows 7 presentation.
San Francisco Guest
Recently someone from San Francisco has visited my blog. Nice to meet you, American guest :)
P.S. I love Google Analytics :D
Friday, 14 November 2008
Microsoft free e-books
These are cool:
- Programming Microsoft LINQ
- Introducing Microsoft® Silverlight 2, Second Edition
- Programming Microsoft® ASP.NET 3.5
OSC Complains
BBC had recently shown a two minute advertisement for Windows 7, product that yet not exists. OH NO! This will for sure destroy Open Source.
OSC: Mommyyyyyy!... :'(
Thursday, 13 November 2008
Visual Studio 2010 - UML support
Though it was confusing how to make 'Implement from class diagram' context menu item work. Seems like it generates code from diagram but in reality it just shows you error with request to configure something I could not find.
Anyway - it's cool :)
P.S. Dynamic keyword is cool!
Using TODO lists in programming
Just try it :)
Wednesday, 12 November 2008
Happy birthday, my Google Analytics :)
Summary results for this month:
~ 93 unique visitors from 7 countries
~ 83 visitors view my blog under Windows, 8 under Linux and 2 under Mac
~ 55 visitors used Firefox, 14 used IE, 14 used Opera. The rest used Safari and Chrome.
I like statistics :)
Google Alerts to Google Reader
It's actually WOW! No google spam in your inbox. In GMail you read your letters and in Google Reader you read your news. Simple, baby
GTalk боты
Англ - Рус:
en2ru@bot.talk.google.com
Рус - Англ:
ru2en@bot.talk.google.com
Tuesday, 11 November 2008
Инкубатор бизнес-проектов
Если вы живете в Беларуси и у вас есть хорошая идея, но не знаете, где взять деньги на ее реализацию - вам сюда!
Я являюсь лидером группы скринкастов и консультантом групп Google и OpenCourseWare. Планы просто глобальнейшие :)
Мой жж опять активен
Соответственно, сюда будут лететь больше технические мысли, а туда - раздолбайские.
Раздолбайско-технические мысли будут дублироваться =)
Monday, 10 November 2008
Thursday, 6 November 2008
Новая мини-цель в карьере
2. MCTP
3. MCM
Пока буду готовиться к MCTS, но стремлюсь к мастеру :)
А что нас ждет в будущем?
Технологии:
JavaScript 2.0
CSS 3.0
HTML 5.0
Браузеры, полностью или частично поддерживающие эти технологии:
Internet Explorer 8 - до конца 2008 года, т.е. осталось меньше 2х месяцев
Google Chrome - по идее, начало 2009
Safari 4 - скоро
Firefox 4 - начало 2009
Новый js значительно облегчит разработку на клиентской стороне, CSS 3.0 обернет это все в красивейшие эффекты, а HTML 5 сделает Web 2.0 намного ближе.
Ждем-с.
З.Ы. Ближайшее - ИЕ8 - ЖДУ!
JavaScript 2.0 - скоро на ваших экранах
Чрезвычано позитивно :)
Чуда не получилось :)
Теперь из шансов разве что выход в кубок УЕФА - если Зенит в следующей игре сольет, а БАТЭ в домашнем поединке порвет Реал. Прямо говоря, шансы маленькие, увы.
Wednesday, 5 November 2008
БАТЭ-ЗЕНИТ - в процессе
Зенит фолит по-страшному, Аршавин охренел просто. Я понимаю, им плохо в группе, но это не повод фолить. Понаехало тут...
Fallout 3 по продажам обошел предыдущие части сериала?
3я часть сериала, имеющая за спиной мощный пиар и бренд - Bethesda, обошла предыдущие части, которые не рекламировали и которые провалились в продажах?
Ни разу не верю, это какой-то развод.
Источник
БАТЭ против Зенита
БАТЭ на подъеме после последней игры, сделавшей их чемпионами Беларуси. За плечами у них ничья с Зенитом на чужом поле. А на "Динамо" будут сотни своих болельщиков.
Должны победить!
З.Ы. С другой стороны, Зенит приперт к стенке - будет драться как раненый зверь.
Свершилось
Я не говорю, что они плохие просто из-за цвета кожи. Я говорю, что они другие. Не хуже и не лучше - просто другие. Равные, несомненно. Но разница есть. И субъективно граждане США будут отторгать чернокожих президентов, если Обама слажает.
Надеюсь, что нет.
Tuesday, 4 November 2008
Сертификация от Microsoft
Monday, 3 November 2008
Условное компилирование в C#
Т.е. если пометим как:
[Conditional("DEBUG")]
то этот метод скомпилируется (и, соответственно, выполнится), лишь если в коде будет объявлена переменная DEBUG.
Подробнее здесь.

