.Net blog of Sijin Joseph
My experiences with .Net
-
The x86 Prayer
Found this amazingly geek goody on Matt's site ( Shame on you if you don't know who he is) . I was literally ROTFL after reading this,
Our Caller, who art on the stack frame
Hallowed be thy Parameters
Thy Address Space come
Thy I/O be done
In Registers, as it is in Memory
Give us this day our periodic timeslices
And forgive us our page faults
As we forgive those who pass invalid parameters
Lead us not to unconditional JMPs
But deliver us from segment registers
For thine is the Address Space, the Registers, and the I/O ports
Jmp $
Ret
-
Quick Reference : Base64 and UUEncode
Base64 and uuencode allow us to send arbitrary binary data through systems that only allow plain ASCII (e.g. Email RFC 822).
-
OpenWave Mobile SDK
If you are into developing mobile applications, you might want to take a look at the OpenWave Mobile SDK . Deepak Gulati was using it in the TechEd 2004 session held in delhi. It seems to have some nice emulation features.
-
TechEd 2004 Delhi, India
TechEd 2004 was held in Delhi from Aug 25-27. We had planned to organize some community evangelizing for our user group (Delhi .Net SIG) at TechEd. To be honest things didn't work out as planned, most of the time was spent on the Passion Quotient contest, which was basically all about WindowsXP SP2. We gave away some cool SP2 watches but didn't get too many new members for our community.
The event itself was great, got to look at a lot of cool technology coming out of Redmond. Here is a day by day summary.Day 1We started out with a keynote address that was basically Microsoft's vision for the next 5 years. The slides that we saw in the keynote were to be standard in all sessions. Strangely there was not much talk about Longhorn, but more about Whidbey and SQL Server 2005.The first session was about Visual Studio Team System, the whitehorse designers totally blew me away, If it is implemented as well as it is visualized this could be a killer. The class designer with complete round trip engineering support was cool. Debug Visualizers are a great addition. Also the project properties can now be used to configure a lot more stuff like security and deployment via ClickOnce (more on that later).The next session was on the new features in the CLR by Tarun Anand. The SQL-CLR integration is a great new feature. I will be exploring that in the coming days and hopefully should be able to post some info on that. Other than that Tarun also talked about generics.Next up we had a session in which the new WSE 2.0 features were discussed, there is some really good stuff coming out of redmond in this field. I was especially impressed with WS-Transactions, if that gets implemented it's going to be absolutely great.For the next session, i switched from the developer track and attened the DBA track on SQL-CLR integration. Mahesh Prakriya was such a wonderful speaker and gave some very good insights into why some things are implemented in a paticular way inside SQL-CLR. One intresting thing to note is that currently to host the CLR in your app, you need to implement 4 COM interfaces, in CLR 2.0 there are about 50 interfaces available to runtime hosts to minutely control the behaviour of the CLR!Day 2 The day started out with a session on BizTalk server 2004. BizTalk is one helluva good product and i am looking forward to working on it.Next up was Tarun again with ClickOnce, which is basically an attempt to give smart clients the ability to automatically update themselves. Well there is nothing radically new in the implementation, i will be writing more about this technology in a different post. But one thing that struck me was the inability to do incremental updates, which IMHO is a very serious disadvantage. Also some initial inspections showed that the app was getting installed not in 'Program Files' but in 'Documents and Settings' Folder.Next Deepak Gulati (Developer Evangelist, Microsoft India) gave a nice talk on mobile app development with VS 2005. The unified control architecture for mobile controls is a good idea and will help in reducing development headaches across various mobile platforms. The demos for this session were among the best at TechEd 2004, illustrating the concept and ease of the technology very well. Hats off to Deepak.The last session fo the Day was ASP.Net data controls by Vinod Unny, the new controls that ship with ASP.Net 2.0 are so cool. Easy to use, easy to configure, consistent architecture. This is what makes it such a joy to develop with MS technologies. Unfortunately VS.Net simply refused to work and we were unable to see some of the demos, nonetheless a great session.Day 3Day 3 was the hands - on lab, i had registered for the VSTS lab and got to work for 3 hours on the new VS 2005 class designers and whitehorse. I must say the product was surprsingly stable for a Beta 1, although some bugs were encountered.In general my feeling about TechEd was that it was too much marketing. I mean this is supposed to be meant for developers, not for managers who have to sell this technology to their bosses. My eyes start to glaze over after going through 3-4 ppt slides, have more demos please, code speaks volumes more than a ppt can. If anyone from MS is reading this, please have more demos, don't show us abstract ppt's show us concrete code.Well we got SQL Server 2005 Beta 2, VS.Net 2005 Beta 1 and ISA 2004 Beta 2, RC1. I have already installed whidbey on my Virtual PC 2004, looking forward to exploring the new technologies. Also i was unable to install SQL Server on my VPC, the error message indicated that SQL Server and VPS were not compatible, so i installed SQL Server Express edition instead. -
Want to hack using google?
Check out how you can hack by using google. Really shows you how powerful google can be. Totally blew me away http://johnny.ihackstuff.com/
-
Good UI controls
Nice UI controls, free for personal use. http://www.dacris.com/netxp/
-
Rapid Data Forms Development
I discovered a quick and dirty way to manipulate DB tables using .Net Windows forms. "Drag and Drop"
1. Drag a table from "Server Explorer" and automatically get a connection and dataAdapter object
2. You can use the dataadapter object to generate a typed datasets
3. Drop a Datagrid on the form and and set it's datasource to the dataset
4. Couple of buttons 4 lines of code (bit more if you want lookups as well)and you got yourself a pretty neat data entry form for that table.Average time to develop per form 5 minutes.Also the "Data Form Wizard" is pretty neat too, the only limitation being that it can't seem to handle multiple tables.Another useful trick is the Connection and DataAdapter wizards (when you drag connection and adapter objects onto your form) which allow you to generate completely customized objects.Looking forward to seeing what improvements are in store in Whidbey. -
Identity Crisis
I had been trying to connect my laptop to my home pc using a cross cable for so many days. Finally yesterday i decided to get it done no matter what. The problem was that despite all proper TCP/IP settings the two computers were not able to ping each other. I cleared my ARP cache, reinstalled the cards, changed subnets and IP addresses but to no avail. The green light was flashing on both cards and yet somehow they could not ping each other.Well after going through all the settings again and again and again, it finally hit me, both comps were named 'Sijin' , that might be causing the problem. So i renamed my home pc and after a reboot i had two way pinging wooooooot!!! :D :DMoral of the day : Give your babies seperate names. -
ADO.Net powertoys
Shawn Wildermuth aka ADO guy has a great book on ADO.Net called Pragmatic ADO.Net. It's a definite must read for anyone involved in ADO.Net programming, i have been working with ADO.Net for over a year and yet the book taught me so much, a definite buy. Also i recently used the ADO.Net powertoys to generate my typed datasets. That works great too. Basically the problem is that the methods that the normal typed dataset generator generates are not virtual so if you override the typed dataset then it only hides the base class methods. The ADO power tools has a Typed Dataset generator that defines the methods as virtual and offers other customization abilities. Other than that it has a Utility library of DB functions and a stored procedure generator.
-
Binding problems
I recently came across a problem in a GUI i had designed. The UI was data bound to an object, now when the user entered some text in a textbox, the change only got propogated back to the object when the user moved the focus away from the textbox. Not acceptable!! plus if the user happened to press the toolbar save button or use keyboard shortcuts, the value in the textbox was not saved back to the object.The problem is that by default, data is written to the source only when the validating event of the control fires.
The solution i used was to derive a custom textboxpublic class FastValidatingTextBox : TextBox
{
protected override void OnTextChanged(EventArgs e)
{
base.OnTextChanged (e);
Binding binding = this.DataBindings["Text"];
if(binding == null)
return;binding.BindingManagerBase.EndCurrentEdit();
}
}Using this class as soon the text changes the value gets committed back to the object.