I absolutely LOVE my iPod. I find it invaluable to catch up on podcasts during commute time, keep me company when I ride or exercise, and keep me entertained when I travel. It is well-designed, looks good, sounds great, and just doesn't fail me. However, that doesn't mean that it couldn't use some work to make it better.
I'd like to add tracks to the "On-The-Go" playlist while a track is actually playing. Most of the time, I play my iPod by using Shuffle Songs. When I hear a song that I'd like to hear again, I'd like to press and hold the middle button to have it add to the On-The-Go playlist. We should not need to scroll through tons of songs, reading them one by one, to add them to On-The-Go.
If you have a way to get this into the next version, that would be great.
I hate when we lose functionality in applications. I'm writing a pretty classic ASP.NET application right now. One assembly is the Data Access Layer, and I try to write enough unit tests to actually show that things stand a chance of working (both now and in the future). Also, I occasionally like to work at home, disconnected from work's servers (database and other). That means that I have MSSQL installed on my laptop, which has local copies of the databases that I would need. I also have my web.config checked into source control so others on the team can do a simple checkout and have the web site working with a simple build of the MSBuild script. Given that setup, how would one go about being a responsible unit tester? It seems that what I want is a way to set a default connection string in the main config file, and allow a user.config to (optionally) exist. If it did exist, it could override the settings that were in the main config file to point to a new database.
There is a new attribute, configSource, that looks promising because it can be used to redirect .NET from looking at the app.config (or web.config) and instead make it look at an arbitrary generic user.config file for its content. The problem with this approach is that it requires every machine to have this user.config file in the same place. What I want is more like what the old file attribute of appSettings provided. Unfortunately, the new tools in ASP.NET 2.0 get the connection string information from the connectionStrings section, so using the appSettings approach is out-dated.
For now, I'll use configSource, but it is a pain to have to tell each memeber of the dev team that they need to create their very own user.config file and place it in a certain directory, since this usage means that you wouldn't want to check user.config into your source control system.
Take a look at J.D. Meier's paper, How To Reference Web Services and Databases During Development, for some concrete samples on how this looks.
I've been spending a lot of time on .NET 3.0 lately. One of the areas that is a lot of fun for me to dig into is WPF, since it's such a departure from my usual data/service/remoting pigeon-hole. I know a lot of people hate grids as a metaphor, but when I saw this free WPF grid demo, I knew grids would be with us for yet another generation of user interfaces. Long live the grid!!
I wanted to generate a script that would both create a copy of my database schema and also populate it with the data that is already in the tables. In the past, this meant you needed another application (e.g. Database Workbench; although it does much more than just that one thing, and is a very useful tool), or you could use a stored proc to generate a script.
Last month, Microsoft released the MSSQL Database Publishing Wizard. This tool can easily generate a script with the database schema and corresponding INSERT statements. It also has integration to VS.NET 2005, which is a very nice bonus.
On my new Vista system, I was trying to install some software from a vendor that I trust. The problem is, the vendor doesn't really write software for the general public, so it's very tightly packaged to try and make it idiot-proof. Unfortunately, I would receive a DEP exception every time I would try to run the installer. I went to the DEP protection configuration screen (Start + Pause | Advanced | Performance Settings | Data Execution Prevention), and that is either an "all programs are protected" or "don't check these applications" choice. To make matters worse, I tried to add msiexec.exe to the exception list, and it wouldn't let me do it. So I had to disable DEP altogether.
In order to totally disable DEP, I used this command from tech-recipes:
bcdedit.exe /set {current} nx AlwaysOff
My application installed perfectly. As a side-note, You can re-enable DEP with this command:
bcdedit.exe /set {current} nx AlwaysOn
I didn't think it was possible for Dell to stuff any more garbage on a computer (forced install of Acrobat, anti-virus, AOL, etc.), but I guess I was wrong. It turns out that Dell partnered up to install Lojack on every single laptop they sell. That is not an insignificant number of laptops. They also force the $49.99 purchase price of the Lojack system to have it installed and activated. Of course that's just for one year of service.
For the first time ever, I just cancelled a Dell laptop order (that was due to be shipped to me next week). I'm sure my measly order means nothing to them, but I am now fed up with being forced to pay for garbage like this when I don't want or need it, and didn't order it. Any recommendations for a real nice dual core, development-class laptop for around $1200?
The following application shows a subtle difference in dealing with enums using Enum class methods and when using reflection. In this sample, I am looking to find the number of elements in the enum. Enum.GetValues and Enum.GetNames are not implemented in the .NET Compact Framework, so I cannot use those methods.
By using reflection, I figured I would gain the upper hand and take control of my enum woes. Unfortunately, calling GetFields on an enum type adds an extra entry named "value__" to the returned list. After browsing through the decompilation of Enum, I found that value__ is just a special instance field used by the enum to hold the value of the selected member. I also noticed that the actual enum members are really marked as static. So, to get around this problem, all you need to do is call GetFields with the BindingFlags set to only retrieve the public, static fields (see the code example below).
using System; using System.Reflection; namespace EnumReflection { class Program { enum Test { One, Two, Three } static void Main(string[] args) { Type enumType = typeof(Test); //The following prints 3, but we can't use this method in .NET CF Console.WriteLine(Enum.GetValues(enumType).Length); FieldInfo[] infos; infos = enumType.GetFields(); //The following prints 4! There is an extra, unrelated Int32 entry named "value__" //at the zeroth element of the info array. Console.WriteLine(infos.Length); //The following prints the 3 enum elements. The value__ field is removed by //specifying we only want the public, static fields. infos = enumType.GetFields(BindingFlags.Public | BindingFlags.Static); foreach (FieldInfo fi in infos) { Console.WriteLine(fi.Name); } } } }
|