Categories
Geeky/Programming

What is an Operating System?

This is a core question. Might sound stupid or you might even ask yourself why I would blog this. But seriously, we need to take a look at the Operating System our code is running on. Windows? Mac OS? iOS? Linux, etc. But beyond that, what is core and what is “cruft” in the OS?

I think Microsoft got a hard lesson some years ago from the DoJ on what can or can’t be included in the OS from a monopolistic perspective. But even then, Apple adds things to their OS and bundles them, etc. So what am I getting at?

If you develop native apps (more so for OS X or Windows, not the Mobile OS’s) then you are going to run into compatibility problems. Hardware, software, OS level stuff. DLL Hell, the whole bit.

As a developer or even “product” you can only do so much, you have to mostly code for the “happy path” – and give some documentation and direction to your users. ex:

– This software only works with .NET 4.0
– This software only works on Windows XP SP3 and Windows 7
– You must have a sound card to make use of the features of this software
– You must have an internet connection to make use of this software
– This software only runs on versions SQL Server 2008 R2
– Running an anti-virus package or malware detector on the files the program reads and writes to constantly is going to slow performance.
– Port xxxxx must be open for external devices to connect

You get the idea. You can code some checks into your setup/installer or program on start up of the exe, but beyond that, you have to leave some things to the user. You can’t ever think of every scenario.

If some other program (albeit even an add on you can download after installing your OS from the vendor of the OS) is going to conflict with your program, then the user has to decide which program they want to use or come up with some compromise.

From a Microsoft Windows point of view, the OS is what you get from Microsoft. Not what you get from Dell or HP or whatever. No, Adobe Flash isn’t part of the OS. Either is Windows Live Messenger or Windows Live Photo Gallery or any add on you download later. Hell even .NET wasn’t part of the OS until Vista/7.

When developing your applications, focus on what is going to give your users more functional and business value rather than coding for things you have no control over. Leave it to support and documentation to handle the infinite unknown scenarios.

Code for a fresh Operating System, and supported patches as they come out. You might have a few RARE scenarios you code around but I would suggest against it. The user’s and other programs that might screw up your users OS’s, you can’t do anything about either.

After all that, it is more clear why Apple’s iOS is appealing, sandboxed applications make more sense. You worry about your stuff and I worry about mine type of deal. Less room for support nightmares because of misconfigured operating systems. I wonder if Microsoft will ever “get there”, but I don’t see it anytime soon.


Categories
Geeky/Programming Product Reviews

Thoughts on Windows 8 Details

Yesterday at All Things D, Microsoft announced Windows 8 (codename of course) details, and a first glimpse on video
 

Windows 8 Video #1

My initial reactions to this, as a consumer and as a development manager of an app that at this time is completely windows desktop .NET based:

HTML5/JS Apps

First reaction? Why not just use a browser? and How are they going to interact with the OS? What level’s of rights will they have to read/write file system, etc, etc. Also, what happens to Silverlight? C++/Winforms apps? Yeah they show old apps running “behind” the new UI, but what is MIcrosoft’s stance on development of these other technologies? WPF? They have told devs to build using these tech’s for desktop for years, now, lets go HTML5/JS? WTF? Will apps run in browser too? On a mac? iOS?

Tiles

First reaction? Looks like an exploded Windows Phone UI, WP7. Which at first blush looks cool but I have found usability to be painful. Seems to be more of a shell UI on top of Windows 7 (or whatever). They should call it Windows Blinds Smile

In General

I think that this will be a good refresh for the OS, but it might take a few iterations for this new UI to be used heavily. My take? Users will get the OS installed and (hopefully there will be an option to) turn off the new UI and go back to what they have used for years. Slowly but surely the new UI will take hold with some cool apps and more and more people will use that and get used to it, abstracted away from the core OS explorer, etc.

Looking forward to trying it out in beta, and when it goes live. I will give MSFT this, they keep things changing so devs have to keep learning! Oh yeah, and PDC is no longer, it is now BUILD – http://www.buildwindows.com/

Categories
Geeky/Programming Product Reviews

Winforms DevExpress Grid

In the current agile sprint for the dev team I manage, we decided to start replacing ListViews (custom ones at that) and grids with the XtraGrid from DevExpress.

Now, normally I shy away from 3rd party controls, or want to vet them, but I knew there was no way we could do the same functionality in the default grid in .NET. One of the guys on the team did a story the sprint before to do a proof of concept comparing various grids and showing the pros and cons. DevExpress came out ahead, functionality and performance.

What we are seeing now is huge gains. We can use the new grid and functionality we couldn’t even begin to think of, is there by default. Grouping, searching, filtering, FAST performance, print preview and formatting, etc, etc, etc. Tons of options.

In fact, there are TOO many options. It makes it hard for us to digest all the possibilities in what we want to turn off, or how to integrate with existing forms, etc. A good problem to have.

All I know, is if you are doing any serious .NET work (Winforms, WPF, even Web/Silverlight) – it might make some sense to take a look at DevExpress. Focus on your business rules and integrating other parts of your systems, not reinventing the wheel with a crazy custom grid.

In the coming months I will try to talk about other areas that you can “outsource” to 3rd parties, where it makes sense. (And no, I don’t get anything from DevExpress for this post. Just calling it how I see it).

Categories
Geeky/Programming Work

VB6 to .NET Migration: Preparation and Migration

In my previous post on this topic, VB6 to .NET Migration: Decision and Analysis, I talked about the decision to migrate instead of rewrite, and also the analysis portion of the project.

Once you are ready to go, what happens? You need to prepare for the migration process. What ArtInSoft needs in Test Cases and Test Scripts so they can run through your application on their end in QA (the VB6 version) and then once they migrate it, run through the same scripts again (once migrated to .NET).

My guess is shops have some kind of test scripts, but nothing too extensive. This is where we were scrambling, we had things all over the place and not very complete test scripts/cases. This ended up biting us in the end as a lot of the app wasn’t covered by test cases so it was hard for ArtInSoft to test and migrate it without tons of exploratory testing.

Since the migration, we have shored up our test scripts and test cases by using a QA firm, Beta Breakers, but that is for another post.

After ArtInSoft gets your test scripts, they run through them and ask any questions, and in the mean time, their dev team is migrating your code and looking for areas they can automated in the migration, that aren’t in the main migration scope of the their migration tool.

ArtInSoft sets up a SharePoint portal for your project so you can share documents and other things, as well as a discussion forum for “technical queries” – or things they want to know on a technical level what they should do during the migration.

As you can guess, many things in .NET aren’t the same as VB6, the way some controls react, etc. They want to know what to do in those cases. Also, you might have some crazy things going on in VB6 that have no direct translation to .NET, so they need to know what to do there, overall though it shouldn’t’ be too bad

Along the migration, you can get the migrated code as they are doing it every once in a while and look at it and get into source control on your end if you’d like. Also, up to to a certain point you can send minor changes to ArtInSoft, so you don’t have a to have a code freeze for the entire migration. Obviously at a given point, you can’t be sending changes, if you have them, you can do a “change control” request, but it is going to cost you, which is expected.

As they work on the migration, you can work on other things on your end, whatever you’d like. Towards the end of the migration (development), you will send 1-2 people down to Costa Rica to help finish the migration and deep dive into testing and development.

The final phase of the of the migration comes when your team becomes the “testing team” and you do User Acceptance Testing (UAT). You have a specified amount of time to test on your end and send bugs back to ArtInSoft. This is a good back and forth for 1-2 months possibly depending on the size of your application. Once you are OK with the code and app, you sign off and the code in your hands. Next up.. your own “fixing” period.

Categories
Geeky/Programming

Japanese Character Sets – Input, Identification and Comparison

As a byproduct of some work our team is doing, we needed to test and handle different character sets for Asian languages (Katakana, Hiragana, etc). A guy on the team came up with a pretty sweet proof of concept test application so we can trial combinations and see how things work based on ignoring widths, etc. even some database interaction. We figured this would be useful to others in the .NET community so we are giving back

Check out http://jpcharsets.codeplex.com/ for more info, but basically you can play around with the different character sets to your hearts content and look at the source code behind the comparisons of different sets. Enjoy!

Categories
Geeky/Programming

VB6 to .NET Migration: Decision and Analysis

Recently completed a huge project migrated a fairly decent size code base from Visual Basic 6 (VB6) to C# .NET. Yes, I said “migrated”, not rewrite – let’s get that out of the way up front. The code was migrated.

How did we go about doing this? Well, I’d like to detail it out over a few posts here and in the near future.

First, you need to make the decision to migrate instead of rewrite. Not very often do dev shops get the chance to do a rewrite, and even when they do, most rewrites go over time and budget and end up losing business logic and functionality, that is why the decision to migrate instead of rewrite is a such a good one.

So, after making that decision, which hopefully you do early, or before you are in the middle of a rewrite (as we did), you can get started. There are a few options, and I won’t go into complete detail on them, but just go over them high level..

1. Use the Visual Studio Migration tool and convert the code yourself and go at it alone

2. Look at the various companies out there that do migrations and pick one, and create a project that way.

We went with #2. After some research it was pretty obvious who the main player was out there, ArtInSoft. After researching them and watching their webcasts and reading and doing as much looking into as we could, we contacted them.

Their model is pretty simple, they send someone out to you for a week (on your dime) and they analyze the VB6 project to see how much it would take to migrate.

What I learned shortly after talking with ArtInSoft and bringing one of their analysts here is that ArtInSoft actually created the VB6->.NET conversion wizard in Visual Studio. What it is, is a lightweight version of the VBUC (Visual Basic Upgrade Companion) that they licensed to Microsoft. The VBUC in Visual Studio is very limited though. It will only migrate to VB.NET and has many other limitations, but it does still work. If you had a very small project (lines of code, complexity) – you could easily use the VBUC in Visual Studio, but most projects aren’t simple and have many lines of code, that is where you would want to use ArtInSoft and their “enterprise” version of the VBUC, as well as assistance from ArtInSoft.

Back to analysis. What they do is actually migrate your project, find any ancillary projects you might have and make sure everything gets converted. Their VBUC puts in EWI’s, Errors, Warnings and Issues, within comments in the newly converted code.

They then go throw the code and do find’s on all the EWI’s, dump them and parse them out, put into excel and pivot them to analyze how many of each EWI you might have. That way they can estimate how much effort/time/money it might be to do your project. They have done this many times, so they have it pretty much down to a science.

An example would be, you have 2500 warnings for warning XYZ – we know it takes 2 minutes to fix one of those, and they are usually all unique, so then we know the total time it would take to resolve them all.

After doing their analysis, they give you a project estimation, and then it is up to you to decide if you want to move forward, and when you would want to move forward..

 

To Be Continued…

Categories
Geeky/Programming

Thoughts on the Future of Microsoft Development #pdc2010

The PDC was last week. I have never been (was scheduled once but didn’t end up going), but I try to keep up with everything that they have online, and now even more the blogs and tweets. Here are my thoughts after digesting everything I could.

Strategy

I’m not sure this much of one.. but Microsoft is still trying to figure out and find their development strategy. From back in the 90’s when it was Win32 then MFC and ASP Classic with VBScript + Office/VBA, to then Managed code (.NET C#/VB.NET, and ASP.NET Stacks).. and then WPF/Silverlight, they still and always will keep changing so that developers have to keep learning new things and looking at the next shiny object. There hasn’t been much of a convergence or steady path though. It seems once a developer or team picks up a technology it is already outdated, and I am guessing this will never change.

Anyways, after watching the videos and seeing discussion, this is what I think..

1. HTML5

The web! Ahh, the web. The one place there are no restrictions. Apple is saying, develop under our restrictions, or go out to the web with HTML5, and Microsoft is going to follow suit. If it was ASP Classic, or ASP.NET WebForms, and then MVC, and now HTML5, the web will be around for a while and Microsoft doesn’t want to get left behind. For a while they were touting Silverlight as the “new web” or whatever, but that seems to have changed.

Web applications are good for some things – well, a ton, but not everything. You can’t do some of the richer things you can do on a client on the web, deeper integrations. You can’t really run a web app offline either, no matter what people say, it just won’t be the same as a fat client. Anything I hear from MSFT that says, it does “X” if you use IE9 and I just cringe. Forget IE, let’s make it work for all browsers.

2. Silverlight

If you are developing for the WP7 Phone (who has one? yeah – I thought so), you use Silverlight, other than that, not 100% sure where they are going with this. Use it for video streaming? Games? Flash killer? Basic RIA application that needs a little more integration with the desktop than a standard web app, but less than a fat client. The problem is, what you can and cannot do in Silverlight changes every release – In my opinion they should open it up more, let you do more things with the desktop. Let devs focus on just one set of rules. I have a feeling that Silverlight might just be used as a “glue” technology instead of a “main” technology. The glue between Web and Windows?

3. WPF

Unknown here. Not much at PDC, but some talks. Winforms (like Webforms) is a forgotten technology at MSFT, so to all the people who jumped on those trains, sorry, you need to hurry up and get on the new trains. I have read some places that WPF is the future for desktop/fat client apps at MSFT, and other places where there is no Product Manager, there is barely a team, no support, they are letting it die (ala Winforms), but who knows for sure. What should a developer do? Enterprise and Line of Business applications that need desktop integrations can’t be created in Web or Silverlight, and .NET developers really don’t want to fall back to C++ (although Evernote did – and saw a huge performance gain). Microsoft needs to instill some confidence in developers that a technology they would choose isn’t neglected – to me that is just piss poor business practices. On one hand let’s market the hell out of it (which with WPF really hasn’t been the case, but marketed way more than Win32 or Winforms) and get everyone on the bandwagon, and then let it die, and 2 years later say “X” is the brand new toy you need to focus on. They finally are doing some things at MSFT in WPF, but to what extent? Black magic embedding WPF controls in Winforms or Win32 apps? To me, seeing the pretty awesome data binding stuff with WPF makes it a no brainer. Why not extend the enhanced data binding to Winforms? Why make devs switch?

 

Like I said, more convergence of tools. Use expression blend for front ends? Yes! – but it should be for everything, Windows/Web/RIA, not just Windows/RIA. Language constructs getting to the same level no matter where you code? Yes – sounds like a good thing to me, so why is it so tough?

The new Async framework looks sweet, what else for Windows devs on the .NET side? Can we get some more detailed strategy from Microsoft on where things are going? What to focus on? Companies and developers are stuck making a leap of faith when choosing which technology to use – to make sure they aren’t left in the dust. On the Apple side, it is pretty clear – use Objective C and you can code for Mac, iPhone, iPad, etc. use HTML5 for the web. Should we all be using Java? or C++? Why have .NET devs struggle to figure out what technology to use? So bottom line..

 

1. Web – HTML5/ASP.NET MVC, WCF services, etc

2. Mobile – Silverlight (aside: what ever happened to the .NET CF?)

3. Windows – WPF, WPF, WPF (but don’t forget about console apps and windows services!)

It would be interesting to go to Microsoft dev shops around the globe and do surveys..

“Hey there – what are most of your websites and web services written in?”

    Answer: “Webforms and ASMX services -  we are looking at MVC”

“Hello, what are you doing for mobile development?”

    Answer: “Well, since WP7 phone just came out and who knows if it will take off, we do everything in Objective C for iOS devices or just have a mobile website in ASP.NET webforms, or we have some Java based Android app, and some crappy Blackberry apps or something..”

“Hola, what are you doing for your LOB desktop apps, etc?”

    Answer: “Well we have a few legacy VB6 apps, some Win32 apps, and we have poured tons of time into Winforms over the last 7-8 years, but we want to start looking at WPF”

I bet a majority of the answers would be similar to the ones above. Who the hell is doing anything in Silverlight? Niche apps/markets? What about WPF? A few, and some proof of concepts, but yeah, even the MVC stuff is probably on a slower adoption rate then MSFT would like. Not sure how they solve this problem. One way would be to STOP CHANGING THINGS EVERY TWO YEARS so that dev shops can focus and incrementally move to the new technologies, but I don’t see that happening.

Where do we go from here? Well, I am pretty excited to see what .NET 5 brings. 🙂

Categories
Geeky/Programming

Visual Studio 2010: Console App, Where is my System.Web?

If you create a new Console App in Visual Studio 2010, and you want to reference System.Web, you might start scratching you head. Why?

Looks like Visual Studio 2010 creates new Console Apps targeting the .NET Framework 4 Client Profile instead of the .NET Framework 4. Why? No idea, but you can change it and then reference System.Web

You can change the setting by going to Properties on your project, then the Application tab, and changing the drop down of the Target Framework to .NET Framework 4

image

Categories
Work

Looking to Hire…

I have been managing two different groups @ Trek -  (Business Intelligence and .NET Software Development) for a while now, and we have some openings we are trying to file, so that is why I am putting this out here.

First role, looking to hire a Microsoft .NET Windows Forms developer, or someone with web experience looking to get into Windows Forms and eventually WPF/Silverlight, and also Windows Services. C# is the language.

Second role, looking for a Microsoft Business Intelligence Developer/DBA – SSAS/SSIS/SSRS, DBA experience preferred. Working on cubes, and ETL’s and reports and DBA stuff.

Shoot me an email at steve_novoselac@trekbikes.com with your resume and info.

Categories
Business Intelligence Geeky/Programming SQLServerPedia Syndication

SQL Schema Source Control (CodePlex)

Source Control. In my eyes, one of the best inventions of development.

Software Developers have used it for years, and it allows them to easily develop in a team environment, and be less scared they will lose a change or not be able to see things they did historically.

I have blogged a few times about source control before..

SQL Server Schema Automatic Revision History using DDL Triggers and SVN
MSFT BI In a Team Environment
Visual Source Safe Sucks/
Source Control at Home with Subversion

But this was mostly for code. Developers. The SQL Community has kind of been shafted with source control. Yea you can tie in VSS to Management studio, and others. I have never found one that works, and just wanted something to work in the background.

I originally started doing this with DDL triggers as my <a href="“>post in November kind of outlined. It worked, but wasn’t reliable enough for what I wanted and was too much setup.

So I did what developers usually do, I wrote an app. SQL Schema Source Control http://sqlschemasourcectrl.codeplex.com/

At first it worked with one database, one server, everything was hardcoded. And then it progressed, and now it is all configurable for multi server/multi database, etc. I decided to put it up on CodePlex because I think it can be improved and made to work with other source control providers, like TFS.

The code itself isn’t anything crazy, some file operations and SMO operations to get the DDL and then some functions to add/update/delete and commit to source control.

For info on how to get it working, check out the documentation page on CodePlex, I can also answer any questions here, or on CodePlex.

I have been using the app for a few months now and it has saved headaches, accidental deletes, wanting to see changes over time by developers, etc.

The feature I like the most is that it logs the SQL Agent job changes, so if someone changes a job, you can see the history…

Now, there are competitiros out there. Redgate (http://www.red-gate.com/products/solutions_for_sql/database_version_control.htm) and others. But I wanted something free and open, so that is why I am putting this out there. I would be perfectly fine not putting anything out and just using it, but I think (and hope) others could benefit from using this app

So if you are looking for semi-easy way to get revision control on your SQL Schemas and SQL Agent jobs, check out the app. There is minimal setup, but once you have it working, it just runs.

Note at this time it works with SVN and SQL 2008. Also the solutions is VS2010. I originally had it working with 2005, but no need on my end anymore for that, someone could easily make a version for SQL 2005. VS2008 solution could be created pretty easily as well. Have fun!