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