|
|

|
|
A Text File Splitter user had a problem with the file encodings. This is a known issue, that I'm happy to report is almost resolved. He gave me a file for testing, and that has helped enormously. Thanks Zhou! Work on Text File Splitter 3.0 has crawled, but I had already converted the code from 2.2.1 over to .NET 4.0. I decided to just finish this work, and release it as 2.5.0. Here's a screenshot of Text File Splitter detecting a UTF-8 file without the Byte Order Mark (BOM): 
Here's a screenshot of a file with a BOM: 
I'm using a library called "ude", which is a C# port of the Mozilla Universal Charset Detector. I had to put a bug fix to deal with very large files. At least the file encoding detection, first half of this feature, is now done. Now I need to deal with the encoding on the file chunks. This has taken a lot more time and code than I expected. Hopefully, this will solve this nagging issue once and for all. I don't have a date for when this version will be released. I still need to update pages in the new wiki (http://docs.systemwidgets.com). You guys will be able to start creating your own splitting strategies, once I get all of this work done. The wiki talks about version 3.0, but you will be able to do this with version 2.5.
I was cleaning unneeded files in one of my servers, when I noticed that PHP had a massive error log file. 
As you can see, I was able to break it into 10 Gig files. Here's a screenshot of the UI, right before I clicked the "Split!" button. 
I'm getting out software development as a career. I still wanted to stay in Information Services. Fortunately, I found my new home in Business Intelligence. Specifically, I'm working with SQL Server Integration Services (SSIS). Staying competitive in software development has become harder and harder each passing year. By competitive, I mean being able to have a job to practice the craft. My commute (45 minutes each way) and my energy levels have caught up with me, so I can't stay competitive (in the context of this post). The churn is crazy high, and requires even more increasing time outside of work to stay relevant. It used to be that you could concentrate on specific technologies, but that's no longer the case. I've found that Business Intelligence is a lot more sedate when it comes to technologies, and it's much easier to stay competitive. This means that my focus will be in data warehousing, and Microsoft technologies related to this. So far the main technologies are SSIS, SSRS, and SSAS. I can still use my development experience to deal with custom and edge cases. I'm much happier with this transition. I can truly feel that my work-life balance is back to where it needs to be. So effective immediately, I'm cutting back on my development pet projects. I'll update a few tools here as time permits. My main efforts will be directed at getting WheelMUD to version 1.0. Then, I will retire from development in the public eye.
So my designer gave me another mockup. This one has a bit of styling. 
Here's an early mockup of TextFileSplitter's new GUI. It will be about 500x800, so this should fit on all netbooks out there. This is just an early design. Still working on it with my designer. 
This is a WPF UI. I will need to redo the splitting strategies to use a WPF user control (for configuration) instead of the Winform ones. This is what is holding up the release of TextFileSplitter 3.0
I have spent about a month doing whack-a-mole with bugs associated with snapins in MMC 3.0. On top of this, Microsoft has basically abandoned it. I haven't been able to get MMC 3.0 working with .NET 4.0 (developers have reported some workarounds, but none have worked for me). That's it, I had it! Been working really hard on PainlessSVN, as I still use it to manage all my repositories. I've been trying to add a bunch of features that I want, as I despise managing Subversion with the command-line. MMC just keeps getting in my way. I'm investigating moving PainlessSVN over to WPF, MVVM, and CSLA. CSLA is a business framework, and it has remote access baked in. It does a good job of hiding the complexities of WCF from the programmer. This means that PainlessSVN 2.0 will not be released this year, and it will not be a MMC 3.0 snapin.
I finally got the first working version of DeleteDevCrumbs. I decided to release this without a GUI, because I've found it so useful. The current release contains two (2) files; DeleteDevCrumbsConsole.exe and DeleteDevCrumbs.dll. Here is the commandline to handle "crumbs" from a typical Visual Studio setup: deletedevcrumbsconsole root=C:\Projects crumbfolderlist=bin,obj crumbextensionlist=suo,user You can just double-click on DeleteCrumbsConsole.exe to see its usage: 
I created this to solve the vexing issue of removing extra crap that IDEs create with the source code. I use this for code releases, and continuous integration. The two main programs that I use this with are FinalBuilder and CCNet. Please let me know if you use it for other things, and other programs. I'm very curious to see how this gets used. Leave a comment here or email me at hector AT systemwidgets DOT com.
Downloads:
I upgraded Text File Splitter to use .NET 4.0 and Visual Studio 2010. I have been testing different development setups to find the easiest one to get aspiring addins developers up and running quickly. The advantage with .NET 4.0 is that Management Extensability Framework (MEF) comes baked in, and I don't need external assemblies anymore. MEF is what makes it easy to load custom parts into Text File Splitter. I've copied the code for the SplitByLine splitting strategy and modified a bit, so that I can treat it as a custom splitting strategy. I named it SplitByLineCustom. Here is how I setup this project: 
I unzipped Text File Splitter 3.0 (not out yet) into the Binaries folder. Then I put the custom project and code in SplitByLineCustom. Here's what the solution looks like: 
Notice that I added a reference to the FileSplitStrategyEngine assembly. There's a couple things that need to be setup in the project's properties. 
Set the start action to call the TextFileSplitterUI.exe program. This should be in the binaries forlder that we created in the beginning of this post. 
Point the outpout of your project to the Binaries folder where you unzipped Text File Splitter. Once this is setup, the UI will be able to automatically pick up your custom splitting strategy. 
Here you can see that the custom splitting strategy loaded into this drop down. Here is what it looks when selected: 
I'm fleshing out the SDK. I will be including this solution as part of the SDK. I'm working on getting SandCastle to spit out MSDN like documentation. I'm hoping to have this done in the next couple weeks.
I've been working a lot more with LINQ2SQL and LINQ2Entities lately, and I ran into my first issue at the end of last week. I couldn't figure out why null parameters were causing the query to return strange results. The original query looked like this:
List<MenuLayoutDataEntity> ret = (from c in _Context.tblMenuLayouts
where c.ConceptID == entity.ConceptID
&& c.ItemID == entity.ItemID
&& c.MarketID == entity.MarketID
&& c.DepartmentID == entity.DepartmentID
orderby c.SortOrder
select new MenuLayoutDataEntity()
{
MenuID = c.MenuID,
ItemNamePOS = c.ItemNamePOS,
ItemID = c.ItemID.HasValue ? c.ItemID.Value : -1
}).ToList();Sometimes, the MarketID and DepartmentID would be null, and that's what was causing the problem. After some Googling, I found that I need to enclose the equality using the Equals method in the object class. Here's the query using Equals:
List<MenuLayoutDataEntity> ret = (from c in _Context.tblMenuLayouts
where c.ConceptID == entity.ConceptID
&& c.ItemID == entity.ItemID
&& Equals(c.MarketID, entity.MarketID)
&& Equals(c.DepartmentID, entity.DepartmentID)
orderby c.SortOrder
select new MenuLayoutDataEntity()
{
MenuID = c.MenuID,
ItemNamePOS = c.ItemNamePOS,
ItemID = c.ItemID.HasValue ? c.ItemID.Value : -1
}).ToList();Unfortunately, this only works for LINQ2SQL, and this query is actually a LINQ2Entities query. So back to Googling. I finally found a hint in a post over at StackOverflow. Apparently, there's is a bug in the LINQ2Entities parser when trying to use IS NULL functionality in the where clause. The solution was to check the value on the entity class, and then select a specific query. Here's the results that actually gave me the results that I wanted:
List<MenuLayoutDataEntity> ret = null;
// Check if this is a store item, i.e. Departmental
if (entity.MarketID.HasValue && entity.DepartmentID.HasValue)
{
ret = (from c in _Context.tblMenuLayouts
where c.ConceptID == entity.ConceptID
&& c.ItemID == entity.ItemID
&& c.MarketID == entity.MarketID
&& c.DepartmentID == entity.DepartmentID
orderby c.SortOrder
select new MenuLayoutDataEntity()
{
MenuID = c.MenuID,
ItemNamePOS = c.ItemNamePOS,
ItemID = c.ItemID.HasValue ? c.ItemID.Value : -1
}).Distinct().ToList();
}
// Check if this is a market item, i.e. MarketID is not null
if (entity.MarketID.HasValue && !entity.DepartmentID.HasValue)
{
ret = (from c in _Context.tblMenuLayouts
where c.ConceptID == entity.ConceptID
&& c.ItemID == entity.ItemID
&& c.MarketID == entity.MarketID
&& c.DepartmentID == null
orderby c.SortOrder
select new MenuLayoutDataEntity()
{
MenuID = c.MenuID,
ItemNamePOS = c.ItemNamePOS,
ItemID = c.ItemID.HasValue ? c.ItemID.Value : -1
}).Distinct().ToList();
}
// Check if this is a global item, i.e. both MarketID and DepartmentID are null
if (!entity.MarketID.HasValue && !entity.DepartmentID.HasValue)
{
ret = (from c in _Context.tblMenuLayouts
where c.ConceptID == entity.ConceptID
&& c.ItemID == entity.ItemID
&& c.MarketID == null
&& c.DepartmentID == null
orderby c.SortOrder
select new MenuLayoutDataEntity()
{
MenuID = c.MenuID,
ItemNamePOS = c.ItemNamePOS,
ItemID = c.ItemID.HasValue ? c.ItemID.Value : -1
}).Distinct().ToList();
}Very annoying, but at least I know how to handle this. Hopefully this will help another soul out there.
Posted in: Code, Databases
I was in the process of updating both PainlessSVN Professional and Console to version 1.2.1, when I found a bug in Visual Studio 2010 debugger. The solutions for both projects were in VS2008. My OS recently died, so I had to re-install it from scratch. I only installed VS2010, because I wanted to move away from VS2008. My first hint that something was wrong was when I needed to modify the About dll to include the new version numbers and years in the copyright. This project is a C++ resource dll. This simple project would not compile on the VS2010 compiler when I converted it. I ended up firing one of my VMWare images that has VS2008 to get this done. The next thing that happened was that none of the breakpoints I set worked, while trying to track down an unhandled exception. I went to Google and found that this is a known bug. The report is over here: Debugging an MMC snapin does not attach correctly to mmc.exe The suggested work around is here: Can’t hit breakpoints in a plug-in or can’t debug .NET 2.0/3.0/3.5 from a mixed mode .exe project with Visual Studio 2010? Unfortunately, that didn't work for me. What did work was to change the mmc.exe instance from the C:\Windows\SysWow64 to the one in C:\Windows\System32, then attach the debugger manually. The debugger will not attach to instances of the mmc.exe program in the SysWow64 directory. I am running VS2010 on Windows 7 Ultimate x64, and that's why I was using the 64 bit version of mmc.exe. Anyways, hope this helps somebody else.
| |
|
|