DCSIMG
September 2007 - Posts - Dotmad (on .Net)

Dotmad (on .Net)

Just Another Web 5.0 Blog

Podcasts

Blogroll

September 2007 - Posts

Microsoft making me jump through hoops to watch a webcast

This is what you need to watch a recording of a webcast in MSDN:

1) Webcast page - press the "Register Online" button
2) Login to MS passport
3) Event registration - enter attendee name
4) "Thank You For Registering" page - press the download button
5) View recording page - enter email & company name
6) View recording info page - save recording - the default filename is always the same, so you also need to remember the name of the webcast (it's not shown at this point)

Too many steps to watch a simple webcast.

Check your InitializeComponent method

I previously wrote about a problem with a custom form's property.
Since then I found problems with additional properties, including the form's default location.
As it turns out the cause was a missing call to the InitializeComponent method in the initializer of a parent class.
Posted: Sep 29 2007, 11:18 PM by Dotmad | with no comments
תגים:

Team System integration in a software organization - personal case study

I have been asked several times for my experience regarding installation of Team System inside an organization using (up to this point) an older version control system, so here are few tips:

  1. Team system is a complex software to install, maintain and upgrade. Study the various pitfalls you may encounter and plan your installation strategy very carefully.
    You can find an updated installation guide and administator's guide in Microsoft's web site, and it's probably newer than the guides on your installation discs.
    Team system is mainly composed of the server's installation (I recommend a dedicated server), and an installation of the Team explorer on each developer machine. It uses SQL server as it's database server.
  2. Decide and implement domain permissions for users (developers) and automated services.
  3. If you also need to install SP1, be aware there are known issues with the upgrade.
  4. Be aware to the fact there are several databases, so be sure to include all of them in your backup scheme. If you don't have a backup scheme - make one!
  5. You also need to select a branching strategy that suits you for your source control.
  6. You can also use VS2005 only for source control, and develop your application using VS2003 or Delphi (for example).
  7. Choose how to use your infrastructure's assemblies repository. You can get them from the source control or store them locally on each computer, but then you don't guarantee all developers will use the latest version.
    Another option is using a shared folder to store them, but you make yourself more susceptible to network problems.
    One trick is using the window's subst command, mapping the shared folder to a drive, leaving you the ability to backup the repository locally and mapping it to the same drive if the network is down.
  8. Create an automated build server. This takes some work, but will help you detect invalid code changes by developers. Choose the frequency to run the build at, from once a day to after every check in.
  9. Don't fall for the NIH syndrome - there are many tools out there to make your life easier - use them.
    If you want to build non-native .Net code, consider getting a commercial tool (such as FinalBuilder for Delphi) and running it from your build code - it will be cheap compared to the developer-days you'll be saving.
    If you are using the bug tracking capabilities of Team System, be sure to remove the default event registration of the build service, otherwise your "fixed in ver" combo will contain hundreds of values. If you forgot, here is how you remove values from it.
Posted: Sep 18 2007, 12:37 AM by Dotmad | with 2 comment(s)
תגים:

Supporting "foreach" without implementing IEnumerable

Krzysztof Cwalina wrote a post detailing how have your class support the "foreach" loop without implementing the IEnumerable interface:

  1. Public GetEnumerator() method that returns a type with 2 members:
  2. The type will have a bool MoveMext() method.
  3. The type will have an Current property of type object.
Example:
class Foo {
public Bar GetEnumerator() { return new Bar(); }

public struct Bar {
public bool MoveNext() {
return false;
}
public object Current {
get { return null; }
}
}
}

I would like some salt with that password, please

Jeff Atwood wrote an interesting post on using "Rainbow tables", which are pre-calculated hashes of a range of possible string to brute-force crack a password database.

One of the better methods for stopping someone who has your encrypted password from deducing the unencrypted version is "salting" your passwords before storing them, meaning you concatenate your password string with a long constant string before encoding it, thus making a brute force attack impossible. (unless someone manages to get your server's code)

For example, you can add the string "FarBetterEncryptedPasswordWithThisAttachedToIt" to every 6-characters password before encrypting, forcing the hacker to compute all possible combinations for 52 characters string instead of possible combination for a 6 characters string.
While using rainbow tables would allow cracking of a 6 characters password in minutes, cracking a 52 characters long password would take years, and would require huge amounts of ram.

Posted: Sep 14 2007, 12:50 AM by Dotmad | with no comments
תגים:

Beware of the AutoScaleBaseSize property

I have had a problem recently with some of the form in my application, which were descendants of a custom form class (not the classic Windows.Forms.Form class).
The form would look fine in design mode, but during run time it appeared to have shrunk, with all the controls in it being affected similarly.

It took a lot of digging to find out what was wrong, but after noticing that setting the AutoScale property to "false" seemed to solve the problem the culprit was found - While in a "normal" form the "initializecomponents" method contained this line:
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
In the new forms it has somehow changed to:
this.AutoScaleBaseSize = new System.Drawing.Size(7, 17);
Thus affecting all such forms.

Now I need to fix this line, but I'm still troubled by not knowing what caused it to change in the first place....
Posted: Sep 13 2007, 09:12 PM by Dotmad | with 1 comment(s)
תגים:

Working with a remote development team

Some times you have a remove developer/team working on the application, as well as in-house team, and they can't use a remote connection to your source-control solution.
I found out these methods help:

  1. Check out files for them to work on in advance, keep the files checked-out until they give you the updates.
  2. Have the remote developer save the original file for comparison (if merge is needed).
  3. Have the remote developer keep a list of changes.

What else do you recommend for this situation?

האם אתה מפתח 5:01?

סקוט הנזלמן כתב על "מפתח 5:01".
במקור דובר על עובדים שבשעה חמש הם מחוץ לדלת, והוא הרחיב את המושג כדי לתאר עובד ששוכח לגמרי מהעבודה ברגע שהגיעה השעה ללכת.
עבדתי בעבר עם ראש צוות מהסוג הזה, וזה היה אסון, ועבדתי עם עמיתים אחרים, והצלחתי להסתדר איתם.
אישית אני מנסה להימנע מלהישאר בעבודה שעות מאוחרות שלא לצורך (כי תמיד תהיה עבודה גם למחרת) אבל לפעמים יש בעייה מעניינת ולא שמים לב לזמן...

לאיזה סוג אתם שייכים?

XP and Scrum

In one of the companies I worked at I introduced TDD into the development cycle.
This was not done as a part of adopting it as a part of a complete methodology, but as a singular concept.
Later, when the company switched to Scrum, we also incorporate ideas like daily build (you don't have to go all the way to continuous integration) and simple designs, but never as partial concepts from the XP methodology.

I read Jeremy Miller's post about the combination of Scrum and Extreme programming, and I think the reason Scrum as a complete methodology is more accepted is that there are some concepts in XP that tend to scare people (like pair programming), while Scrum a more of a natural evolution of the work process.
As Jeremy wrote, both methodologies cover different aspects of the development cycle, but I think that while people will keep adopting specific ideas from XP, Scrum as a complete system will be more successful.

Podcasts review #2

.Net Rocks show 251 on Enterprise architecture - Roger Sessions talks about enterprise architecture, focusing on reducing the complexity of enterprise applications by breaking them into smaller parts (sounds a lot like SOA). He also talks about a mathematical model for deciding on how to break the application to it's components. Could be useful for SOA architects. 3/5

SE Radio episode 65 on Embedded systems - The show was composed of 3 segments. The first listed the differences between "normal" development and developing an embedded system, including various pitfalls for an enterprise developer. The second segment listed common architectures and design patterns in the embedded world, and the third listed existing operating systems and development languages in the embedded world. 4/5
 
.Net Rocks show 261 on open source with Phil Haack - Phil talks about his experience in developing the OSS blog engine Subtext. 2/5
 
SE Radio episode 59 on static code analysis - Detailed description of static code analysis, explaining the concept, methods and available solutions (not many of which deal with .Net, and focusing mainly on security and memory leaks). 3/5

Motorola cell phone stereophonic adaptor

I'm using my cell phone to hear podcasts, and I'm hearing it in my car using FM transmitter.

Unfortonately, the transmitter's jack is a standard 3.5mm, while cell phones (at least mine) use a 2.5mm jack.
There are cheap adaptors available for mobile mp3 players (also with 2.5mm), but the phone's socket is a bit different.

So I searched a little, and found out the SKN6183 adaptor. Since I couldn't find one in Israel I had to order it from EBay (cost me 1$ with 8$ shipment), but it was worth it.

מכירה פומבית "מכורה"?

לפני שנה בערך רכשתי טלוויזית LCD של סוני באתר מכירות פומביות.

לפני הזכייה ניסיתי לרכוש את הטלוויזיה במשך כשבועיים-שלושה, במהלכם שמתי לב לתופעה מעניינת: היה משתמש קבוע שהתחרה וגם זכה במספר מכירות.

לאור העובדה שהסבירות שאדם פרטי החליט לרכוש לעצמו מספר טלוויזיות יקרות בזו אחר זו אינה גבוהה מאוד, הסקתי שהמשתמש הנ"ל יכול להיות "שליח מטעם" של מספר גורמים:

  1. האתר עצמו, האוכף מחיר מינימום כלשהו
  2. הספק/יבואן, האוכף הוא את מחיר המינימום
  3. בעל חנות אלקטרוניקה המעוניין להשיג סחורה במחירים זולים מאלה שהיבואן מציע לו

הכתבה שפורסמה אתמול על הנושא הזכירה לי את הנסיון שלי. חבל שהתביעה הנ"ל (לפי הפרסומים) מתייחסת רק לאפשרות הראשונה ולא לאחרות.

וכן, גם אם הגורם הבעייתי אינו האתר עצמו, אני מצפה ממנו לשיטור שימנע "תרגילים" מהסוג הזה (במקרה השלישי גם ליבואן עצמו יש אינטרס נגד השיטה).

BlogDay 2007

As 31/8 is BlogDay, I decided to find some blogs to recommend.
I have tried recommending relatively new/unknown blogs (at least as far as I can tell), and also focus on people publishing new posts at least once a week.

  1. Blonde 2.0 - Recently opened, and already quite a success, focuses mainly on web 2.0 items.
  2. Latest gadgets and the technology used - As the name says, the focus here is on electronics and gadgets.
  3. Israely VCs blogs - An aggregation of the blogs behind the major VCs in Israel.
  4. Gray's Matter - I started reading this blog after Justice posted his plan to take over the world (and becoming a better developer) by reading a new professional book each week.
  5. Information Technology Dark Side - David Christiansen's blog about the IT profession.
Technorati tag: http://technorati.com/tag/BlogDay2007
Posted: Sep 01 2007, 02:28 AM by Dotmad | with 3 comment(s)
תגים: