Developping for the translation industry RSS 2.0



 Tuesday, 23 October 2007

There are so much “productivity hacks” out there.  The blog lifehacker is full of little productivity hacks to boost your effectiveness.  For developers we have more stuff to look at that every one else combined.  This is not an article about some yet-another-incredible-new-tool, because there will be a better one next week.  I’ll have plenty of time later to talk about my favorite tools that are great Time Savers. But IMHO, there is no tool yet that is as high a productivity booster as owning whole features in an application.

The current problem with any tool is that you can have a productivity increase of 1.5x – 2x.  Maybe you can make that number 3x - 4x if the tasks you have to accomplish are repetitive, you are a master of your particular tool and you take the time to enhance it, creating your own snippet or macros.  The thing about it is that, with most these kind of tools, you just become a faster typist.  Since the number of lines of code is a terrible productivity metric, we can assess that being a faster typist doesn’t necessary make you a more productive developer.

The real productivity gains lies elsewhere.  It has been given many names : Being “in the zone”, “in the moment”, “in trance”.  Everybody has experienced this state of mind where time seems to stop, you lose awareness of everything around you and you wake up, several hours later, having done a week’s worth of work.  This state of mind is one of the main points of the classic software project management book Peopleware.  Getting into that state of mind can take from 15 minutes up to a full hour or even more depending on the individuals and many others parameters (ambient noise, stress level).  And getting out of that state of mind is terribly easy. 

But what’s all this have to do with developers owning some features?  Simply that owning some code will make the “in-the-zone-boot-up-time” a lot shorter when working on that particular piece of software.  Basically, what’s happening when you are in the process of getting in the zone?  Your subconscious mind is loading (or, at least, tries to load) the entire problem space that you’re facing.  When there are unknown elements, as there are always in shared code situation, the problem space is filled with variables elements, making the process really harder than if you know everything about the problem.

When you own features, you have seen (and probably written) every single line of code and you know every bit of functionality, every hack that shouldn’t be there and every little design flaw.  So when you work on that feature, the feature problem space contain only known elements and is a lot easier to load in your subconscious mind.  Moreover, it helps a lot for debugging and refactoring situations to know the entire feature characteristics.  The developers that own their features will avoid a lot more pitfalls than those who share functionnalities, simply because they know the implications everywhere of the code they’re writing.

Owning features is not only beneficial on the developer’s performance side.  Developers in general are elitist people and they don’t like others developers messing with their code.  The fact that it is clearly stated that features X, Y and Z are properties of Joe Developer will surely make him not only happier on the job but he will be a lot more committed to those features than he could ever have been otherwise.

But that’s just me, what’s your opinion on this subject?

Tuesday, 23 October 2007 08:28:49 (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Monday, 22 October 2007

At the office, we use an Outlook addin (that I originally developed in Visual Studio 2002 targeting the 1.0 .NET Framework).  Finding that technology to be a little obsolete (all of our others internal applications are on the 2.0 Framework), we’ve decided to migrate it to 2.0 and add some news features while we’re at it.

The migration and installation went fine at first on my Vista development PC but I couldn’t get the addin to load on the users computers (that are on WinXP).  Every thing I tried, didn’t work and the addin couldn’t load at all.  What I ended up doing is a complete rebuild of the application using VSTO SE (Visual Studio Tools for Office Second Edition).  Since everything works well now, I’ll share with you every resource that I came across about creating an addin with VSTO.

1. Get the prerequisites:

In order to deploy a VSTO addin, you need the following prerequisites installed on every user’s computer:

 

2. Code the addin:

Pretty straightforward step, depending on your company’s requirements.  I’ll write another article about that part soon with some code examples.

 

3. Prepare for deployment:

In order to prepare for the deployment of your solution, you need to set the code access security policy for your assemblies.  To do so, you need to do the following tasks:

  • Get the “SetSecurity” project here and add it to your project.
  • Sign your assembly (or assemblies) in the Signing section of the project’s properties.  All you need to do is to check the Sign the assembly check box and create a new strong name file.  You need to make sure that every assembly that you deploy is signed (including the SetSecurity.dll assembly).

 Sshot-1

Sshot-02

 

  • Add the SetSecurity project output to your deployment project and add a custom action for Installation, Rollback and Uninstall.

Sshot-3

In the custom action data for the Install custom action, you need to enter the following data, replacing “OutlookAddin” with the name of your addin:

/assemblyName="OutlookAddin.dll" /targetDir="[TARGETDIR]\" /solutionCodeGroupName="MyCompany.OutlookAddin" /solutionCodeGroupDescription="Code group for OutlookAddin" /assemblyCodeGroupName="OutlookAddin" /assemblyCodeGroupDescription="Code group for OutlookAddin" /allUsers=[ALLUSERS]

For the Rollback and Uninstall, all you need to provide in the custom action data is:

/solutionCodeGroupName="MyCompany.OutlookAddin"

 

That’s a wrapper of about everything useful I found in my research.  I hope this helps you!  If there is something you think would be a good addition to this article, feel free to email me at: stan AT stanbiron DOT com.

Some more useful resources:

  • If you don’t have VSTO as part of your Visual Studio Installation, here is the link to download it separately.
  • If you code on a Vista PC and you use Visual Studio 2005 (with the Vista service pack), you won’t be able to debug into a VSTO addin for Office 2003.  Microsoft has issued an hotfix to resolve this problem.
  • If you can’t get the addin to work on the target computer, you can use this really great Outlook Addin Checker that looks for missing registry keys, prerequisites or Code Access Security policies.
  • There is a two-part article on MSDN for every step needed to deploy an VSTO addin or document customization: part 1 and part 2.  These article are somewhat long but every bit of information for the deployment part is there.  They also explain how to set custom deployment conditions to ensure that the prerequisites are installed.

 

Monday, 22 October 2007 16:14:29 (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General | Office Interop | Tools
 Wednesday, 10 October 2007

It’s a shame how many applications, even popular ones, have huge security gaps regarding passwords.  The most recent case to hit the news was Reddit but this is only the tip of the iceberg.  How many internals applications out there uses plain text password.  A whole lot!  You probably did it at some point, and so do I.  But the object of this post is not to rant and whine about that situation.  I just want to show those who don’t know about it how easy it is to integrate Windows Active Directory authentication to your application.  So now, if you read this my blog, no more excuses to have that “password” field in your database.

First you need to add a reference in your project to System.DirectoryServices

Here is the code, I will catch you up on the other side.

try

String Username = "username";

String domainAndUsername = "domain\\username";

String Password = "password";

 

DirectoryEntry entry = new DirectoryEntry("", domainAndUsername, Password);

DirectorySearcher search = new DirectorySearcher(entry);

 

search.Filter = "(SAMAccountName=" + Username + ")";

 

// search.FindOne() will throw an exception if there is a bad username/password combination provided

SearchResult result = search.FindOne();

 

// User is authenticated

catch 

    throw new System.Security.SecurityException("Access denied.");

End Try

Pretty straightforward isn’t it?  Obviously, you need to change the first lines with the user’s input but other than that, it’s all that’s needed for a basic username/password authentication using Active Directory.  You can copy this code and use it in your application and see for yourself.  If you want more information on what you can get from Active Directory, there is a good article on the different name attributes here.  You can also go to the homepage of System.DirectoryService on MSDN here.

I want to add that I’m not an Active Directory expert.  If a reader see something wrong with this code, please let me know and I’ll update it right away!

Other Posts:

How to create user accounts in active directory using C#

Wednesday, 10 October 2007 10:59:42 (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
C# | Code Snippet
 Wednesday, 03 October 2007

It’s simply amazing! Scott Guthrie announced today that the .NET framework source code is going to be released later this year.  He says it will be released at the same time that Visual Studio 2008 and the 3.5 Framework are going to be released.  This means that you will be able to drill down inside the framework when debugging your applications in Visual Studio 2008.

This is a bold move from Microsoft’s part by any standards.  I think the motivation behind this release is two-fold:

1. This seems to be part of a larger company-wide politic to show to developers that Microsoft genuinely care about them.

2. They also need to work with the flow.  More and more, tools like Lutz Roeder’s .NET Reflector (a utility and Visual Studio plugin to decompile and visualize .NET assemblies) are becoming popular and the Framework is, for all intent and purposes, already opened and ripped apart.  I look at classes of the framework myself using this tool from time to time.

All that being said, this is really great news and I can’t wait to play with this and see the internals of the framework “in action”.

Click here to view the full article from Scott.

If you don’t know who Scott Guthrie is..  Well he’s the team leader for :

  • IIS
  • ASP.NET
  • The AJAX Toolkit
  • The CLR
  • The Compact Framework
  • Windows Forms
  • Commerce Server
  • Visual Web Developer 2005
  • Visual Studio Tools for WPF

In others words, if you love your job as a programmer using Microsoft’s technologies, it’s because of this guy.

Tags: ,
Wednesday, 03 October 2007 14:37:44 (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General | .NET | News
 Tuesday, 02 October 2007

If you haven’t already heard about it, (very unlikely since it has been all over the news) there is a bug in Microsoft’s Excel 2007 that display the wrong result when doing a multiplication.  The bug first shown up with the multiplication of 77.1 * 850 but the Excel team blog tells us that there are 12 specific calculations that are subject to this flaw.

Basically, this is a problem with the internal representation of numbers in Excel that gets translated for displaying.  It’s a conversion bug in the UI part so it won’t affect any calculation, charting or other number analysis on those numbers.  VBA script and COM Interop are also immune to this bug because they use the internal representation and not the number actually rendered on the Excel interface.  Joel of joelonsoftware.com has a really good article that explains the specifics of this bug. 

Every forum and blog posts that I've seen out there, with the exception of Joel’s one, shouts that this is a major/critical bug and start bashing on Microsoft for their “gross incompetence”.  My humble opinion on this is that those guys are going totally overboard and see critical problems when there are, in fact, none.  Since the bug we’re talking about affect only the number displaying but not the internal representation it will affect people’s life only if they do those exact calculations and don’t use the calculation result to do anything else.  The chances of that happening out there exists, I agree.  However, they are so slim that this bug should not be considered critical at all.  Microsoft will probably release a hotfix in the next days/weeks and it will all be history soon.

UPDATE: The Excel team has released a hotfix to correct this issue.  The fix can be found here.

Tuesday, 02 October 2007 14:45:18 (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Monday, 01 October 2007

Today, I’ll introduce you to some tools that I like a lot and that have improved my productivity and efficiency in both my job and my day to day computer use.  I ordered them with the ones that I like the most first but I suggest you to try them all to see if some are of more use to you than me in your particular context.

Disclaimer : I have not been paid in any way to endorse these products.  Some of them are free and, for those that cost money, I personally think that their price is right for the functionalities they provides.  I have bought all these tools with my own personal money.  Also, all of these tools have a free evaluation version so you can try them out and see for yourself if they are worth the cost for your situation.

DevExpress Productivity Tools :

CodeRush and Refactor! are my best picks so far.  They are both really easy to use, have a fast learning curve and integrates seamlessly with Visual Studio (all versions except for the express editions).

CodeRush is a template based code generation tool that speeds up the development process by providing a lot of useful and easy templates.  There are templates for properties, methods, classes, NUnit in both VB.NET and C#.  There are also navigation tools, selection tools and a lot of others interesting utilities.

Both of these tools are totally extensible via the DXCore free plug-in. In fact, CodeRush and Refactor! are really just a load of DXCore templates (and by “a load”, I mean that there are over a thousand individual templates that you can use).  And if there is something in particular that you want to automate, the sky’s the limit with this tool.  I will post some of my favorites customizations in the near future.

You can see these tools in actions on the DevExpress Web site here.  If you never tried these tools, I suggest strongly that you give CodeRush and Refactor! a try.  Trust me, it will be worth it.

Here’s a convenient Download Link (Evaluation version)

Slickrun

Slickrun is a free utility that replaces the over used Windows+R key combination, the quick launch tool-bar and the start menu.  This little tool can hook-up and “override” the Win+R key to give you a simple command line that can be used to start any program.  With features like Magic Words and auto-completion this became rapidly (for me at least) the standard way to start any piece of software that I use more than once a week.  It even have the option to track your mouse position and appear right besides it so you don’t even have to move your eyes to the bottom left corner of the screen to see what you are typing.

This tool have the notion of “Magic Words”.  These words are just aliases to executables where you can specify startup command line parameters.  For example, C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE becomes “mail”.  Doubled with auto-completion, starting a program became almost instantaneous.

That’s it for today, I’ll write some follow-ups to this article with more tools and utilities that made my life and my work so much easier.

Monday, 01 October 2007 15:06:07 (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
CodeRush | Tools

MeMy name is Stanislas Biron. I'm currently working at Versacom in Montréal, Canada, as the Research and Development Director. Versacom is the biggest Canadian translation firm and, as R&D Director, I try to discover new ways to tackle translation's workflow (From customer's initial request to the final product) and process (Improving translation itself). Before that, I was the President of a very small consulting company based in Quebec, Canada.

You might say I'm a business savvy developer with a strong entrepreneur's spirit.

I'm writing this blog to share my thought on software project management, tools, programming, entrepreneurship, database administration and the occasional humor post. In fact, I blog about everything that I think would help other developers, DBAs, and software industry execs.

You can contact me at stan@stanbiron.com

Monday, 01 October 2007 11:00:00 (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General
 Thursday, 27 September 2007

Hmmm..  It seems that I have started myself a nifty little blog!  I might be a little late on the train, starting a technical blog in 2007, am I?  But more importantly, why am I doing this ?  Well, for starters I like to help others. I want to share my knowledge and ideas with the most people possible, and I want to connect with other people who like the same things as I do.

Who am I?  I’m Stanislas Biron, software consultant in Montreal, Canada.  I have a lot of interests in everything that is tech-related but I'm especially fond of the Microsoft’s .NET technologies (C#, VB.NET, ASP.NET) and I will probably blog a lot of content about those.  I also want this blog to become some kind of code repository for interesting snippets or whole projects.  So if you have some interesting code that you want to share with the others readers, feel free to email it to me at : stan@stanbiron.com.  I’ll make sure to include it into my posts and maybe that someday, I'll be able to do a “Stan’s daily piece of code” to showcase the numerous marvels that we can come across in our work as developers.  Sometimes, I'll also show some bad code (that I may or may not have written at some point) and show you how that kind of code can be refactored and transformed to become better.  Everyone of us makes mistakes but it’s by sharing those mistakes and by listening to others that we can really learn from them.

And by the way, I'm using the Dasblog blogging engine to run this blog and so far it’s a very smooth and nice experience.  It’s written in ASP.NET and is Open Source so if you’re interested in seeing some interesting blogging engine code or if you want to start a blog yourself and wonders what technology to use, Dasblog is a good choice in my opinion.

So let’s get started, shall we?


Tags:
Thursday, 27 September 2007 13:08:09 (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
General

Navigation
Advertisement
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2017
Stanislas Biron
Sign In
Statistics
Total Posts: 135
This Year: 0
This Month: 0
This Week: 0
Comments: 1
All Content © 2017, Stanislas Biron