Wednesday, June 2, 2010

What do I read?



I was searching in the market for some good .NET books. I mean books that target not only one programming language, but give you also knowledge about application frameworks available currently on the market that support .NET, or might be easily used by these technologies. So far I was able to find following positions.

For C#:
C# in a Nutshell
C# in Depth
CLR via C#

I hate when the author starts to explain how to do for loop on page 200. It’s such a waste of time. I mean I read a book and I see that probably I know everything that is on this page, so I skip it, and then I realize that I know everything that is in this chapter, so I skip it. And finally I am frustrated, because I don’t buy/read a book to skip something, but to understand something more deeply.
About mentioned positions. C# in a Nutshell is really on the topic;) Not many words but they move attention to specific problems, or features in a way that makes you want to investigate it. Sometimes it motivates you to search more deeply for the solution. CLR via C# is my favorite, on each page I am motivated to search for something; on each page I learn something new. I truly love this book. I believe that it is the best book for an intermediate person. C# in Depth is somewhere between. Good positions to find information that are not mentioned in previous positions.

For SQL:
Inside Microsoft SQL Server 2008: T-SQL Programming
Inside Microsoft SQL Server 2008: T-SQL Querying

Ben-Gan is the man. Haven’t seen a book that starts to explain SQL Server environment, from math, for a long time. I love math, and even if the math in this book is not really complex – you probably seen it all, If you like to study math on your on. But! It turned my attention to connection between some math problems and design of the SQL Server, or T-SQL itself. I enjoy those books so much that I want to get more books written by Ben-Gan, and there are a few to read.

So far I was unable to find anything interesting about ASP.NET, Silverlight, DDD, WF, WPF, and so on. There are so many books made by O’Railly, Manning, P2P, but none of those that I’ve seen is something that I am looking for. The best way for me, so far is to read training kits from Microsoft, like this one. I hope that I will find something sooner or later.

Also I would like to recommend a link to some interesting features of C#. And entire MSDN, I see that this web site changed so dramatically in a previous year, two or so. Now I can really easily find useful information.

Monday, May 24, 2010

.NET Reflector




I've been trying to figure out how some stuff work in .NET. And I found out that the tool I need is a reflector. Basically it allows you to disassembly a dll and see what's inside it. Don't expect too much, but it's great to know what is going on. Here is a tool that I decided to use Red gate reflector. Enjoy, it's free to use it!

Wednesday, May 5, 2010

How-to register an addin in VS2010




Somehow I was unable to find this information on the web. Here is how to do it for those of you who don't like to use wizards.

You need following files:

Foo.addin

Foo.dll

Foo.pdb

Foo.xml


Keep dll, pdb, and xml file in a one folder. Place Foo.addin file into "Visual Studio 2010\Addins" folder. Edit Foo.addin file to show a path to Foo.dll. Run Visual Studio. Plug-in should appear in an Add-in Manager. If you delete a Foo.dll file Visual Studio will rename a Foo.addin file to something different, so be prepared to rename is manually. And of course if a plug-in appears in an Add-in Manager, you can use it by selecting it.

Visual Studio 2010 second look




List of features that I do not enjoy.



I can not see a way to write a visual studio plugin in F#


Even if you set a binding for a key binding command it want reset all the bey bindings that are associated with the shorcut. For some shorcuts it seems to work, for others it does not. For example if I set a shorcut for a Edit.CharRight to Ctr+F it works, but if I set a shorcut for Edit.CharLeft it doesn't (after hitting Ctr+B visual studio waits for a second character, because there are some keybindings that use Ctr+B in a combination). Microsoft if I want to set Ctr+B to Edit.CharLeft it means that I know what I want, and I want to get rid of all the key bindings associated with Ctr+B + something.


I created some plugin for emacs key binding. Unfortunatelly The API for assigning multi key strokes, like Ctr+Shift+F is not working!


And, here is a good place to find a list of snippets for vs2010

http://www.developer.com/net/net/article.php/3557701/Introducing-Visual-Studio-2005-IntelliSense-Code-Snippets.htm


Why there isn't anything for methods? Anybody?

Visual Studio 2010 and things around.




Finally got some power to have a look at a new visual studio. First thing that shot me was a lack of a support for Emacs key bindings. Crap, I had to map all major things by myself, but w/o mapping this tool wouldn't be useful for me. It was pretty sad for me, cause I had a great hope that Microsoft is going to fix some issues with key bindings with a new release of VS. Namely all key bindings seem to work only in a code window. If you go to a Command Window or to a Solution Explorer or F# Interactive, nothing seems to work correctly. And what's even more annoying is a fact that there are key binding commands inside VS2010 (like Edit.EmacsLineUp, Edit.EmacsCharRight), but if you use them, they don't work. None of the Edit.Emacs... command seems to work. And yes I am aware that Microsoft said that they didn't have a time to implement key bindings for Emacs and Brief in VS2010, but they are working on it, but why show commands that do not work if you use them? Some of the Emacs commands seem to have an implementation in a non Emacs scheme like:

Edit.EmacsLineUp => Edit.LineUp

Edit.EmacsLineStart => Edit.LineStart

Edit.EmacsCharLeft => Edit.CharLeft


. I hope that I will have strength to write a plug-in for Emacs key bindings, so I won't have to change it manually each time I see VS2010.

I was also unable to change the look and feel of this tool to only show a code window. Yes I am aware of a full screen option, but it is not enough. I removed from the view 'Standard' and 'Text Editor' and all the views that hide on the left right and bottom sides of the screen. Still it is not enough. Am I missing something or there is no way to hide tabs (or better remove them), and hide a menu on a top. I really like a crude look and feel, less things, less things to distract, and also it force you to remember shortcuts, how-to go to a class w/o clicking, how-to manage a database view w/o clicking, and so on. So Microsoft, please make it useful, one day;)

Why there is no intellisense for an F# Interactive? Are you expecting me to know all the methods for all libraries? I can do it if I code only in a one programming language, but if you write on you daily bases in more than 20 you really don't remember if it was writeln() or WriteLine() or writeline() or wl() or println(). Anyway, I am glad to see an interactive shell, it helps me a lot to test some things, even if they are written in a different language then the project that I write.

Sunday, September 14, 2008

Subversion under XCode




Create repository


svnadmin create /Users/sagasu/Worek/Workspaces/svnRepository/magicNumbers


My project name is Magic Numbers so the name of the repository is magicNumbers. You can specify any path you wish.

Integrate subversion repository with XCode SCM system.




Create a new repository configuration.




Click + (plus) button at the left button, to add a new repository.



Specify a name, and SCM too that you want to use (Subversion).



Fill the URL field. After filling URL field path and scheme will be automatically filled.

In the Repositories window choose Import, and choose a project that you want to add to the repository. And you are done.



One of the ways to make current project aware that it is inside a subversion control system is to navigate to the place where the project is held and delete it (you can use Finder to do it). Then open XCode and check in the project to this same directory (or different if you wish) from which it was removed. Now XCode will allow you to manage your files from XCode.

Developing under OS X




I've been using Tiger (OS X) for a year now, but few days ago I installed Leopard. I decided to upgrade to Leopard because there is no iPhone sdk for Tiger. Leopard ships with a newer version of XCode. I tried XCode few time before, but somehow I did not enjoyed it. I decided to give it one more try, mainly because recently I've been playing with cocoa framework, and it is easy to create interfaces in Interface Builder, which integrates great with XCode. Before I used to develop applications under Emacs using Carbon framework, because I did not enjoyed Objective-C. I believe that the thing that turned my attention from Objective-C was XCode. XCode had, and still has a really poor word completion system, due to that It doesn't help a nub programmer to find methods/objects that nub is looking for. This forced me to spend tremendous amount of time searching thru documentation/language reference, sometimes just to find out that this feature is not implemented and I need to do it on my own. Now when I am more familiar with OS X development platform is time to give XCode one more chance. What I like in OS X development is Interface Designer - it is nice, good looking, easy to use, and so on. Unfortunately it lacks many features, like shortcuts - I don't want to drag and drop things (control drop things). Interface Designer opens many windows, there is no easy way to move between them easily, or just define new key shortcuts to do an operation. So as a conclusion Interface Designer is nice to learn, easy to use to create simple operations, but later when one is more familiar with it, it takes to much time to do something. Let's go back to XCode; it still lacks a support for redefining key bindings - to do that I need to modify map files for entire system (also for other applications). It lacks refactoring tools that Eclipse has. Thanks god it has a not bad integration with external editors - like Emacs. Thanks to that I don't need to use mouse to open other file, or open test class for a class that I am currently editing. The feature that it really lucks is something like ctr+r or ctr+t in Eclipse (open class/resource that is included in project, just by typing it's name). XCode has also a good sides - it shows errors, and warnings really nicely. Debugger works great.