I love my Macbook Pro I really do! I do Microsoft .NET software development and for this it’s great. Of course I couldn’t do the work without VMWare because .NET is still mostly / only working on Windows machines but that’s another story.
After using the Macbook Pro for some months I found out that OSX has a problem; every now and then the Hard disk gets corrupted. I think this might have to do with the fact that OSX originally used to be Unix; a server OS. Unix Servers are made to run continuously,no administrator turns of his servers at the end of the day, but I do turn of my Macbook!
Especially when you hibernate your Mac, now and then you will get the dreaded message saying The volume Macintosh HD was found corrupt and needs to be repaired. Now in most situations repairing will go ok and after that it’s business as usual. But once in a while this will not work and you need to restore the time machine backup you of course made, didn’t you? Because my notebook harddisk is 1TB this can take hours and hours! Did I tell you I hate waiting?!
After already resigning to the fact that every now and then it would be necessary to do a restore of my backup I stumbled upon a great little tool. The look and feel took me back a bit to the old MSDOS days (no graphics, everything character based) but who cares if it works. The tool is called AppleJack ( http://applejack.sourceforge.net ) and is OpenSource (which means free!).
After installing it you need to start up the Macbook holding the CMD-S keys. The Mac will start in single user, character based mode. Type ‘applejack’ at the prompt and a small and simple menu will show. Chose option ‘a’ for ‘autopilot’ and the whole repair cycle will start. I found that 99 out of 100 this will repair everything and withing 10 minutes it’s back to business as usual; I just love this tool!
Friday, May 20, 2011
Saturday, April 30, 2011
Stored procedures or Embedded SQL???
One of the clients I worked for didn’t allow it’s developers to use embedded SQL in their sourcecode. Only the usage of stored procedures was allowed. Applications only got the database authorization to call stored procedures, nothing else. To me this is the most optimal use of database security!
The DBA department made one stored procedure per table to select everything and one to select records on bases of their primary key. All other stored procedures that were necessary for an application were made by developers, but before they could be used in a production environment the DBA’s reviewed them. This way the DBA’s could keep an eye on how different tables were used and how this was affecting the database / DBMS. If necessary they optimized the stored procedures or just sent it back to the developers to have them optimize it themselves. In general this made for optimized stored procedures with a uniform way of coding in them. I liked this way of working and try to do this also with other clients, if they allow me to do this of course.
In general for me the advantages of stored procedures are:
….
So according to me we should use stored procedures more often!
The DBA department made one stored procedure per table to select everything and one to select records on bases of their primary key. All other stored procedures that were necessary for an application were made by developers, but before they could be used in a production environment the DBA’s reviewed them. This way the DBA’s could keep an eye on how different tables were used and how this was affecting the database / DBMS. If necessary they optimized the stored procedures or just sent it back to the developers to have them optimize it themselves. In general this made for optimized stored procedures with a uniform way of coding in them. I liked this way of working and try to do this also with other clients, if they allow me to do this of course.
In general for me the advantages of stored procedures are:
- Security (only expose stored procedures to the big bad world outside, nothing else)
- Speed; because the DBMS optimizer makes a one time plan for execution (this has advantages and disadvantages but that’s another discussion altogther)
- Reusable code / procedures.
- Reviewable code. Reviewable by DBA’s that have the right knowledge for optimizing stored procedures. No .NET or other knowledge is necessary for these reviews!
….
So according to me we should use stored procedures more often!
Wednesday, April 13, 2011
"Search Workitems" Plugin for Visual studio and Team Explorer
Today I needed to find a workitem in TFS (Team Foundation Server) but didn't know in which Team Project it was. I also didn't know the workitem ID so I was getting ready for a big search through all the projects. Then I decided that there must be a better way to do this, and that it couldn't be that I was the only one with this problem.
After searching a bit on google I found this plugin for Visual studio and Team Explorer and it works great! It adds a toolbar to Visual Studio with a small search field in it where you can put any search word. It then will search through all the workitems in all the projects and gives you a list with items it finds. Exactly what I needed so I added it to my great tools for .NET development toolbox!
You can find this plugin on codeplex:
http://searchworkitems.codeplex.com/releases/view/16269
The description on codeplex for this plugin is:
This plugin for Team System puts a little search box right into Visual Studio to make it easy to find work items. It is an addin for Team Foundation Client (Team Explorer) and is accessible from the Team menu when you're connected to a Team Foundation Server and is also available from a VS Toolbar. You just type in some search text and it runs a work item query for you showing you results across the work item store, or enter a work item ID to immediately open a specific work item.
After searching a bit on google I found this plugin for Visual studio and Team Explorer and it works great! It adds a toolbar to Visual Studio with a small search field in it where you can put any search word. It then will search through all the workitems in all the projects and gives you a list with items it finds. Exactly what I needed so I added it to my great tools for .NET development toolbox!
You can find this plugin on codeplex:
http://searchworkitems.codeplex.com/releases/view/16269
The description on codeplex for this plugin is:
This plugin for Team System puts a little search box right into Visual Studio to make it easy to find work items. It is an addin for Team Foundation Client (Team Explorer) and is accessible from the Team menu when you're connected to a Team Foundation Server and is also available from a VS Toolbar. You just type in some search text and it runs a work item query for you showing you results across the work item store, or enter a work item ID to immediately open a specific work item.
Sunday, April 3, 2011
A string manipulater method
To stay in the spirit of code sharing I decided to add another code snippet!
This little snippet of C# shows a method that will make all the first letters of the words in a string uppercase.
Okay, okay not exactly brain surgery but a nice snippet anyway! ;-)
I also put this blog on my site; www.developerblog.nl
This little snippet of C# shows a method that will make all the first letters of the words in a string uppercase.
Okay, okay not exactly brain surgery but a nice snippet anyway! ;-)
public static string InitCapSmall(string tekst)
{
if (string.IsNullOrEmpty(tekst) || tekst.Trim() == "") return tekst;
string returnValue="";
foreach (char c in tekst)
{
returnValue += returnValue.Length == 0 || returnValue[returnValue.Length - 1] == ' ' ? c.ToString().ToUpper() : c.ToString().ToLower();
}
return returnValue;
}That's it!I also put this blog on my site; www.developerblog.nl
Saturday, April 2, 2011
Using syntax highlighting
So after registering my URL developerblog.nl and installing wordpress on my site I started thinking about what I would write about. I decided that I will write general ramblings about being a freelance .NET developer having a strange infatuation with the Macbook pro, the iPad and the iPhone.
Next to that I also will write more technical blogs about .NET development, where I will insert C# source code. To keep the source code readable and to make use of a (sort of) color coding I decided to search for a plugin that would help me with that.
Luckily I found the Wordpress plugin SyntaxHighlighter which did the trick for me! It isn't 100% what I want but it comes close to this. You just have to put two tags around your source code, letting Wordpress know what is code and what is not and that's it! You can even let Wordpress know which language it is so the right words will be hightlighted.
I put a small C# code snippet on my website ( www.developerblog.nl ) to show what I mean.
Nicely done right?!
Next to that I also will write more technical blogs about .NET development, where I will insert C# source code. To keep the source code readable and to make use of a (sort of) color coding I decided to search for a plugin that would help me with that.
Luckily I found the Wordpress plugin SyntaxHighlighter which did the trick for me! It isn't 100% what I want but it comes close to this. You just have to put two tags around your source code, letting Wordpress know what is code and what is not and that's it! You can even let Wordpress know which language it is so the right words will be hightlighted.
I put a small C# code snippet on my website ( www.developerblog.nl ) to show what I mean.
Nicely done right?!
Thursday, March 10, 2011
I blog therefore I exist!
Finally I started blogging! After wanting to do this for months, even registering my URL ( www.developerblog.nl ) I finally found the time to install WordPress on my own website.
By the way, WordPress really rocks! It took my all of 5 minutes to install it. Ok, after that it took me 3 hours to configure it but truth must be told, my newborn daughter was distracting me !
I will post my blogs on these pages but also on my own website.
Let's see how this will go in the next few months!
By the way, WordPress really rocks! It took my all of 5 minutes to install it. Ok, after that it took me 3 hours to configure it but truth must be told, my newborn daughter was distracting me !
I will post my blogs on these pages but also on my own website.
Let's see how this will go in the next few months!
Subscribe to:
Posts (Atom)