DirectorySoftwareBlog Details for "Dotmad.net"

Dotmad.net

Dotmad.net
My thoughts on software developement using .Net.
Articles: 1, 2, 3

Articles

Live Blogging from TechEd Eilat (Israel)
2008-04-07 13:52:00
Due to lack of time I'm currently focusing my posting on my other blog (will port post here later), so you can find my posts here:http://blogs.microsoft.co.il/blogs/d otmad/archive/tags/TechEd/default.aspx
More About: Israel , Blogging , Live , Eilat
Live Blogging from Israel Startup Weekend, Day 3
2008-04-05 13:44:00
Current status:Technologies used are ASP.NET, NHibernate, and MS Sql Server as a database. GoDaddy had been selected as hoster. (We also purchased a domain)The user experience design is mostly done, the marketing are working on creating several (very entertaining) videos for viral propagation.Architecture is set, but the development is still under work, with expectations for integration between the 3 layers later today, including running some tests of the site. We had some problems implementing NHibernate, but we solved them.We are using Youtube and Picasa to host videos and photos externally.After today we'll continue working on the application in parallel to our day job, with some focus on social marketing.
More About: Israel , Blogging , Weekend , Live , Startup
Nhibernate: Use virtual properties
2008-04-05 11:23:00
Another thing from the Nhibernate quick start which led to confusion: we only got the thing to work after changing all properties for the .Net class to Virtual .
More About: Properties
NHibernate: Could not find schema information
2008-04-05 11:14:00
If you receive this error:"Could not find schema information for the element 'urn:nhibernate-mapping-2.0:hibernate-map ping'", And you used the quick start guide:Change the mapping from "2.0" to "2.2".
More About: Information , Find
Live Blogging from Startup Weekend, day two
2008-04-04 11:32:00
The morning began with an Israeli breakfast (bread, cheese, vegetables), and than to a discussion about how/what to implement.The chosen idea from yesterday (suggested by Maya Klug) is a time bank application (something like Timebank.org.uk), maybe combined with videos (each member creating a short video detailing what he/she is willing to contribute).There are about 50 people here, and the group is about equally divided between technical people (developer and similiar) and bussiness people (bizdev, etc). Many people here are entrepreneurs themselves.The main discussion so far was about creating a web site vs. a Facebook application, and the decision was to create a web site combined with a Facebook application.From the developers perspective, we chose using ASP.NET (majority of the coders know it), SQL server (express) as a database, and creating a 3-layered (DAL, BL, pages renderer) application (web server). We'll try implementing the DAL using NHibernate, connecting to Facebook ...
More About: Blogging , Weekend , Live , Startup
Live Blogging from Startup Weekend (3)
2008-04-03 21:19:00
The story so far: 15 ideas had been selected5 most popular ideas had been selected (by vote)Possible problems had been raised for each contestant2 ideas had been selected (by vote)Each contestant answered questionsThe finalist had been selected (again, by vote)
More About: Blogging , Weekend , Live , Startup
Live Blogging from Startup Weekend (2)
2008-04-03 19:51:00
First a clarification: Netwise is donating the office space, but is not the company organizing the evnet. The event is being organized by several private people who encountered the idea (no, it was not invented in Israel) and decided to organize it.After some delays the event finally began. The founders started with an introduction, basically explaining "what" and "how" of the event, and than they introduced firms that helped with the creation of the event, among them Netwise, IBM (GTU group) and a small startup called "Sharp mind solutions" (developing games aimed to boost personal attributes).And than people started giving short presentation of their ideas.So far most of the ideas come from the area of web 2.0 and revolving around the word "share", but I haven't heard many unique idea so far, but there are few gems in the suggestions. The audience (the rest of the group) is participating with the idea owner with questions and suggestions.
More About: Blogging , Weekend , Live , Startup
Live Blogging from Startup Weekend
2008-04-03 18:37:00
I registered myself to this event few weeks ago, and today is the first day.The idea: a group of IT professionals getting together for a weekend (2.5 days) to create a new startup company, based on a web product. This group is divided to sub-groups (backend, client, architects, business development, etc), each sub-group in charge of a specific section of the product. Each participant receives a certain number of "shares" based on his/her contribution (based on the number of days in attendance).The event is hosted by Netwise, a company specializing in building web portals and selling products to build such products.So far the event is still being organized, each participant receives upon registration few complimentary items (notebook, shirt, food), and now we are sitting around chatting among ourselves.The first item on the agenda: Have a brainstorming and choose a product to develop.Being a long time developer, I'm already guessing the second item: Selecting technology to use for c...
More About: Blogging , Weekend , Live , Startup
Generic Singleton Risks
2008-03-31 18:35:00
The Singleton pattern is very well known to .Net developers, especially the static implementation.Lately I have encountered several versions of the generic Singleton, among them the one described in Arnon's post.However, there is one possible pitfall to this approach, as it makes this code possible:Singleton<myclass> obj = Singleton<myclass>.Instance;MyClass obj2 = new MyClass();While I personally like the idea of having the freedom to use the same class in two different ways throughout the application, I know some people like their Singletons - well, single.On the other hand, if you write a class from the start as a Singleton this is not an issue.There is an inherit risk in decoupling a class from it's expected behavior, so take this into consideration before using this pattern.
More About: Generic
Webbrowser.Documentcompleted and the ReadyState property
2008-03-29 21:04:00
I had previously tried using the WebBrowser class to retrieve a web page for analysis (using the DocumentText property).The problem was determining the state of the page load (since a page requires several hits before completion on average).Turns out I need to check on track backs to my post, as Anthony Stevens (you should read his "about" page) found a solution to my problem:Once the page load is complete WebBrowser.ReadyState property will be set to Complete, and then you can take the loaded page and wreak havoc on it.
More About: Property
Windows, Unix and Hebrew, Oh my!
2008-03-22 16:24:00
As a .Net developer you are not bothered by trivialities such as character encoding, since the framework uses Unicode by default.But what happens when you need to encode your text so someone else (non .Net) will decrypt it, and that someone uses a single byte per character?Let's start with few definitions:ASCII - a standard that uses a single byte for each character, but only defines 128 possible symbols. There is no such thing as "Hebrew ASCII".ANSI - Same idea, but here you can use the remaining bits (out of a byte) to encode non-English specific characters. The problem is every language uses a specific version. The ANSI character table may look different on different computers, depending on the configuration.Unicode, UTF-8, etc - Using 2 or more bytes for each character, allowing room for all languages (as long as both sides agree to use the same encoding)(If you wish to learn more, you should read Joel Spolsky's "The Absolute Minimum Every Software Developer Absolutely, Positi...
More About: Windows , Unix
How to Get a Job at Google
2008-03-18 19:22:00
Steve Yegge wrote a loooong post with tips for finding a job at Google .He gave all sort of tips, most of them self-explainatory (you should know about Hashtables, Algorithms etc).But there was one golden advice:Don't let the Interview Anti-Loop get you down.But what is the Interview Anti-Loop?Every single employee E at any company has at least one "Interview Anti-Loop": a set of other employees S who would not hire E.The solution is simple: "The bottom line is, if you go to an interview at any software company, you should plan for the contingency that you might get genuinely unlucky, and wind up with one or more people from your Interview Anti-Loop on your interview loop. If this happens, you will struggle, then be told that you were not a fit at this time, and then you will feel bad. Just as long as you don't feel meta-bad, everything is OK. You should feel good that you feel bad after this happens, because hey, it means you're human.And then you should wait 6-12 months and re-a...
What are YOU going to do for the planet this week?
2008-03-18 18:31:00
When you leave work this weekend, turn off your computer, light and air conditioner - and try to keep doing this every day.And there are other ways to help the environment.More info - on the Earth Hour 2008 web site.
More About: Planet , Week , The Planet
.Net Performance Pointers
2008-03-14 13:11:00
After going this week to the Microsoft performance open house, here are few things to consider:Create performance counters of your own to measure various statistics.Try to avoid using interfaces and virtual methods to supports inlining.If you use a "Contains" method of a collection on structs, be sure to override the "Equals" method, since the default Object.Eqauls method used boxing twice - once for the parameter and the once for "this".Similarly, you should override the GetHashCode methods for structs, since the default implementation for a struct is very inefficient.Use Perfmon.exe to monitor the "% time in GC" - a high value may indicate mid-life crisis.
More About: Performance , Pointers
Generic Singleton Factory
2008-03-09 23:03:00
This is a great way to create a Singleton instance of an exiting class without needing to specifically design it as a singleton:// Singleton factory implementation public static class Singleton where T : class { static Singleton() { // create the single instance of the type T using reflection Instance = (T)Activator.CreateInstance(typeof(T), true); } public static T Instance { private set; get; } }class Program{ public static void Main() { // test Console.WriteLine(Object.ReferenceEquals( Singleton.Instance, Singleton.Instance)); }}
More About: Factory , Generic
Random.NextBytes Performance Issues
2008-03-04 13:07:00
I have became aware recently to a performance problem with the Random class, specifically the Random.NextBytes method.As it turns out this is an expansive operation:The graph displays the number of milliseconds used to perform 10,000,000 operations.The NextBytes method handle a byte array containing only 4 bytes.This is linear - using an array of 4000 bytes will take 1000 times longer to complete the operation!However, there may be a work-around using the BitConverter class.Use BitConverter.GetBytes(Random.NextDouble() ) to get a randomized array of 8 bytes.Here are the results:As you can see, generating an array of 8 bytes this way takes half the time of generating it using the NextBytes method.
More About: Performance , Issues
Using XmlSerializer for Serialization/Deserialization
2008-03-03 22:16:00
This is something I wrote a while ago to allow easy way to serialize/deserialize various objects to and from XML by creating an adapter around the XmlSerializer class.Since I don't know how this XML is going to be used this class stores it inside a string.Serialize usage:string s = SimpleSerializer.Instance.ToString(myObje ct);XmlDocument xDoc = new XmlDocument();xDoc.LoadXml(s);Deserialize :MyClass obj = SimpleSerializer.Instance.FromString(xDoc .OuterXML); /// <summary> /// Objects serializer/deserializer /// </summary> public class SimpleSerializer { private static readonly SimpleSerializer instance = new SimpleSerializer(); //Singleton /// <summary> /// Gets the class's instance. /// </summary> /// <value>The instance.</value> public static SimpleSerializer Instance { get { return instance; } } /// <summary> /// Private constructor - prevents t...
The Problem With Crutches
2008-03-01 22:20:00
Coffee is good for you, as long as you don't drink too much.But how many of you can't pass the day without drinking too many cups?How many of you are addicted to coffee? In the recent bloggers meeting in Microsoft Israel I complained about the pain it is to add a picture to a blog post using the Community server.The reply?"Why don't you use Live Writer to publish posts instead of the online control panel?"In a recent post Doron wrote about his love for ReSharper:"I honestly can't work without it anymore. It has changed the way I code, and I will never attempt a serious refactoring without it"There are many great tools out there that can make you more productive. No argument about that. The problem starts when you become dependant of those tools.That's the problem with crutches - if you ever lose them, you become handicapped.
More About: Problem
If Search Engines Where Girls
2008-02-28 04:26:00
From the SEO article "On-page SEO for small Companies": Google is the bombshell who everyone drools over. She knows this and lords it over everyone. You’ve really got to work to get Google’s trust. She also has a weird fascination with blogging. Yahoo is wild and erratic. MSN is the world’s cheapest date, who will practically faint if you show any interest in her at all.
More About: Girls , Search Engines , Search , Engines
New Technologies Trends
2008-02-25 20:49:00
I have written before a short comparison between "old" and newer technologies, but at the beginning of that post I state that part of the choice of a new technology is the market trend towards that technology.After reading Justin's post showing that moving to ASP.NET is beneficiary because it's becoming a prominent technology I decided to implement his research methods (using Google) on different technologies.I began by searching for file typesHowever, this reflects only on files shared on the web, and since JAVA is a web technology (unlike Delphi) the results don't say much.But Google trends provides a clearer picture - while C# remains stable, other programming languages are on the decline:Focusing on the .Net world, you can clearly see new technologies are dominant in Google searches:WPF vs. WinformsWCF vs. RemotingThe rise of .Net Framework 3.0 technologiesWith Silverlight being the "Hot New Thing" (maybe because it's a web-based technology)So maybe choosing a new technology...
More About: Trends , Technologies
Microsoft Goes Open Source?
2008-02-23 13:09:00
In a recent announcement Microsoft declared a "Strategic Change" in their relationship with the open source community:Publishing on MSDN over 30,000 pages of documentation for Windows client and server protocols and API. Protocol documentation for additional products, such as Office 2007, will be published in the upcoming months.Microsoft is providing a covenant not to sue open source developers for development or non-commercial distribution of implementations of these protocols. These developers will be able to use the documentation for free to develop products. Microsoft will design new APIs for the Word, Excel and PowerPoint applications in Office 2007 to enable developers to plug in additional (OS?) document formatsHowever, although the company said developers will not need to take a licence or pay a royalty or other fees to access this information, those covered by patents will still be subject to a royalty from developers who want to use them for commercial applications (Micro...
More About: Open Source , Open , Source , Open-Source
Is Hebrew blogging the new Zionism?
2008-02-17 07:20:00
Guy started the debate by calling Israely bloggers (and the blogs.microsoft.co.il platform) to write in Hebrew to encourage the creation of professional resources addressing the Hebrew reading crowd.I disagreed by stating the fact I like to share my knowledge with the entire world rather than just sharing it with Hebrew readers and Omer agrees with me.Tamir contributed to the discussion in his own unique way, demonstrating the frustration a non-English post can cause to English readers (and assuming I understood the translation he is basically saying "write in whatever language you feel comfortable with")I would like to address Guy's second claim, saying the blogs.microsoft.co.il site should be used to encourage Hebrew blogging (and that English bloggers have alternatives such as Blogger and Wordpress).Blogger and Wordpress are excellent platforms, but if I want a blogging site focused on IT blogs, they are wrong for me.The unique thing about the blogs.microsoft.co.il site is that ...
More About: Blogging , Zionism
Design patterns: I wouldn't bother reading the GOF book
2008-02-16 11:17:00
I have to disagree with Gil's (welcome to the blogosphere) recommendation regarding the classic DP book:I found it very hard to read, focusing on theory (as opposed to practice), and laking use of .Net framework features (since it was not written for .Net users).If you are a .Net programmer and want to learn and use design patterns, I recommend going to dofactory.com - clear, real-world examples meant for C# developers.
More About: Design , Reading , Book , Patterns , Design Patterns
Don't try this at work
2008-02-15 09:53:00
A friend sent me the following code, meant to do simple string comparison for a standard password changing dialog: char buf[256] test_pass = 0; for (i = 0; i < strlen(buf); ++i) { test_pass ^= (unsigned long)buf[i] << (i%4)*8; test_pass = test_pass << (i%4)*8 test_pass >> (32 - (i%4)*8); } sscanf(g_config.m_pPassword, "%08X", &old_pass); if (test_pass == old_pass) { // Get new password GetDlgItemText(IDC_EDIT_NEW_PASS, buf, 255); test_pass = 0; for (i = 0; i < strlen(buf); ++i) { test_pass ^= (unsigned long)buf[i] << (i%4)*8; test_pass = test_pass << (i%4)*8 test_pass >> (32 - (i%4)*8); } // Check configmation GetDlgItemText(IDC_EDIT_NEW_PASS2, buf, 255); ...
More About: Work
Upgrading technologies in an existing project
2008-02-14 06:43:00
We all know about the "cool new kids in town", meaning new technologies all developers want to use. Offer a developer two positions:Programming with C# 1.1Programming with WPF and C# 3.5What do you think most developers will choose?However, there is the question of an existing project, written in an "uncool" technology.In my experience developers tend to push towards using newer technologies, but how do you convince the people in charge?Here are my thoughts on the subject:Framework 2.0 vs. 1.1Advantages: Performance boost if you are using ArrayLists with value types in them (when you switch to generic Lists)Disadvantages: Incompatibility issues requiring code changes (should be very minor)Framework 3.5 vs. 2.0Advantages: Using Linq for new complex data access and query modules, otherwise I'm unsureDisadvantages: Same as switching between 1.1 and 2.0WCF vs. Various communication technologiesAdvantages: Much easier to configure and deploy, can drastically change the communication met...
More About: Project , Technologies
WCF Everywhere? Worth some consideration
2007-12-30 19:31:00
Sadly I missed Juval Lowy's WCF lecture last Thursday, but I read Udi Dahan's blog post regarding the lecture.It seems Juval is preaching the use of WCF for every inter-class operation, even on the same computer, as WCF is better designed than plain code, and Udi objects to the idea due to possible performance consequences.One of the main reasons for Udi's objection was a demo Juval ran in which the communication output was 200 calls per second - not very high.But as someone else already commented, this was done using security, encryption, exception handling and other "services" which are not necessarily present in day-to-day inner-process method calls.This also lead me to search for again benchmarks for WCF, and it turns out you can reach more than 5000 calls per second with it.So use WCF for every inter-class operation? I think not, since it basically break your entire code to services, and SOA requires careful planning.On the other hand, I would use WCF for every cross-process...
More About: Worth
Facebook usage
2007-12-05 07:03:00
I took a look at the Facebook countries stats, and it got me curious about possible correlation between Internet users and Facebook users, so I collected Internet users stats and came up with this (absolute numbers are in Thousands):
More About: Usage
Light reading at the traffic light
2007-11-30 06:59:00
In case you were wondering, the book in the picture is the bible.
More About: Reading , Traffic , Light
Five steps for creating a transparent user control
2007-11-29 12:30:00
Guest post from Eyal Ron: After much testing this is the correct formula for a truly transparent user control: Derive from Panel rather then User Control . Override the OnPaintBackground function: protected override void OnPaintBackground(PaintEventArgs pevent) { //do nothing } Override the OnMove function: protected override void OnMove(EventArgs e) {
More About: Creating , Transparent , Steps
Special consideration for the ThreadAbort exception
2007-11-22 07:07:00
As a rule, I never want to see an unhandled exception crashing my application with the .Net error dialog and without logging the error. Therefor I always hook both the AppDomain.UnhandledException and the Application.ThreadException events to catch those exceptions, log them, and close the application gracefully.Turns out I overlooked one small detail - the ThreadAbort exception, raised by a call
More About: Special , Consider
More articles from this author:
1, 2, 3
44534 blogs in the directory.
Statistics resets every week.


Contact | About
© Blog Toplist 2008 - Supported by Web Catalog - SEO by FeWorks
eXTReMe Tracker