Error The “GenerateResource” task failed unexpectedly.

Problem I was enhancing an application that I have been working with for years, without any trouble. This application was developed with Visual Studio and the solution has multiple projects. While I was working on the enhancements I did some refactoring and renamed some of the classes and files on the application. All of the “sudden” … More Error The “GenerateResource” task failed unexpectedly.

Focus – Pocus

Last week, as the first North East blizzard of 2016 approached, my inner hermit rejoiced at the prospect of being stuck at home, and having the opportunity of tackling those chores that are frequently put on the back burner when outside shinny things are dangled in from of me. Jonas was the perfect opportunity to finish … More Focus – Pocus

Refactoring IV – Finally There

On the previous post, we moved validation functionality to the Scraping object. The resulting function was this: [code language=”csharp”] private void btnStockSales_Click(object sender, RoutedEventArgs e) { TickerDataCollection = new ObservableCollection<TickerData>(); var stockList = ReadStockData(); foreach (var item in stockList) { Scraper y = new Scraper(); TickerData x = y.Scraping(item); TickerDataCollection.Add(new TickerData(x.Ticker) { High = x.High, … More Refactoring IV – Finally There

Refactoring III -Why is this here?

On the previous post I moved URL parsing code by extending the StockData class and creating a property called Url, now we are left with this code, but if you look at the highlighted code, there are way too many things happening here!. [code language=”csharp” highlight=”14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29″] private void btnStockSales_Click(object sender, RoutedEventArgs e) { TickerDataCollection = new ObservableCollection(); // … More Refactoring III -Why is this here?

Refactoring II- Encapsulating

On my previous post, I started refactoring a function that reads stock and dates, checks the data against Yahoo Finance and returns some data. In this function, I take the Stock Ticker and the data and parse the URL to be evaluated by our web scrapper object. [code language=”csharp” highlight=”13,14,15,16,17,18,19,20,21,22,23″] private void btnStockSales_Click(object sender, RoutedEventArgs … More Refactoring II- Encapsulating

Refactoring I -Convert Linq Anonymous Types to List

Refactoring is an important process to crafting readable and maintainable code. Functions should follow  the single responsibility principle – a function should do one thing and one thing only and should have few lines of code. Like with everything, you should apply this with measure and wisdom. I was asked to write a function that … More Refactoring I -Convert Linq Anonymous Types to List

SQL-Transact Backup all Databases In a MS SQL Server

The Problem My client wants to backup all the databases in their MS SQL Server Server – 1,000 large databases – to a shared network drive. I want to run a script, get coffee and come back to check when the backup is completed. Solution Created a script to backup all the databases on the … More SQL-Transact Backup all Databases In a MS SQL Server

Three GPS systems – One destination

Last weekend we went with friends on a skiing trip to the Poconos, Pennsylvania. Our trip was a simple one and half hour drive from North New  Jersey to just over the Delaware Gap – the border between Pennsylvania and New Jersey. On our way down, our driver and co-pilot took out their respective iPhones and … More Three GPS systems – One destination

Transact-SQL Server – Transposing a table

The Problem A client sent me an excel sheet with financial information classified in columns where each column header was a date and the values associated with that date were listed below I needed to insert the information to a normalized table with the following columns: Client Account EntryDate Value The Solution Step 1 Loaded … More Transact-SQL Server – Transposing a table

Books every software developer should read in 2016 – if you have not done so

The obligatory reflection on what have we accomplished in 2015 … always a sticky question. But if keep it to my book, training and research, it does not look that bad, I managed to keep the momentum going. Software Development Cracking the coding Interview – Gayle Laakman This is a great book with brain teasers and … More Books every software developer should read in 2016 – if you have not done so

Sum and Group Data Table Records Using Linq

The Problem You have a data table and you need to group and sum records dynamically. Solution I needed to group information by a field and the sum the values on a different field; For example, I want to group employees by department and then sum their salary. Below is the linq code to this: … More Sum and Group Data Table Records Using Linq

Transfer database permissions on all objects from one SQL server to another – MS SQL Server 2008 – 2014

The Problem I needed to migrate all databases from a MS SQL server 2008 R2 to MS SQL Server 2014; while I can create and restore my databases, permission in objects live on the system databases, therefore I needed to transfer all my login and data objects from one server to another. This cannot be … More Transfer database permissions on all objects from one SQL server to another – MS SQL Server 2008 – 2014

Install SQL Server 2014 Step by Step

I was just recently assigned to a project where we need to migrate large database servers from SQL server 2008 R2 – 32 bit to SQL server 2014 – 64 bit First thing we need to do is install SQL server 2014 on the new servers. Here is a step by step installation guide. Open SQL … More Install SQL Server 2014 Step by Step

cPanel Mailing Lists Not Delivering Emails

I am a member of the board of directors for a non-profit. Since last year I have intermittently receiving emails, as the treasurer of the organization, it would like to see emails, specially those that require my attention. Long story short, the email administration fell on my lap and tired of people giving me funny … More cPanel Mailing Lists Not Delivering Emails

Registering .Net DLLS’ for use in VB6 32bit Applications

Registering .Net Dlls’ for use in VB6 32  or VBA applications You have that legacy application that is not willing to go away and you need to use functionality from code you created in .Net. or you need to build extra functionality on a .Net classYou need to register the dll for VB6/VBA  to be … More Registering .Net DLLS’ for use in VB6 32bit Applications

Database Normalization

Database Normalization This is a brief quick description of database normalization.Database normalization is the process of organizing information in a relational database into tables to minimize redundancy.Normalizing a database allows scalability and it is easier to maintain, query and work with. There are 5 steps to normalize a database, my personal experience is that unless … More Database Normalization

Basic Data Structures: AVL Trees

Basic Data Structures : AVL Trees Now to AVL trees, another neat data structure to store lists of information.. This my friends is a courtesy of communism (gasp!) yes, AVL trees were invented by these soviet guys: Georgy Adelson-Velsky and E. M. Landis; for the history lesson and more theory you can check WikipediA – … More Basic Data Structures: AVL Trees

Basic Data Structure: Linked Lists

Basic Data Structures: Linked Lists In a return to basics – and plenty of nothing to do – I implemented my own little linked list. Given the state of modern computing I have never really needed to implement a linked list, .Net framework has excellent libraries that manage lists and arrays, however, I guess it … More Basic Data Structure: Linked Lists

Serendipity

ser·en·dip·i·ty The occurrence and development of events by chance in a happy or beneficial way. “a fortunate stroke of serendipity” synonyms: (happy) chance, (happy) accident, fluke; More Merriam-Webster Definition