General implementation checklist

A group that shall remain unnamed at my organization has really borked some recent implementations.  My thoughts on a general implementation checklist they could have considered to radically improve execution:

  1. Realize and prioritize with sponsor input.
  2. Educate stakeholders if they are not informed.
  3. Design with stakeholder input.
  4. Create the solution.
  5. Measure current state.
  6. Consult stakeholders and sponsor.
  7. Sponsor authorizes.
  8. Execute.
  9. Report results to stakeholders and sponsor.
  10. Close out- log, file docs with exceptions and allowances, etc.
Posted in Business | Leave a comment

Gartner magic quarter analyses for BI, Q1 2018

Exploring 2017 Gartner BI Magic Quadrant Results

 

https://www.gartner.com/doc/reprints?id=1-3TYE0CD&ct=170221&st=sb

https://www.logianalytics.com/gartner-critical-capabilities/

http://ir.microstrategy.com/releasedetail.cfm?releaseid=953331

https://www.google.com/search?q=microstrategy+logo+gartner+quarter&tbm=isch&source=iu&ictx=1&fir=M4XBdC92LXnx_M%253A%252CAPEOCTs8fj5K-M%252C_&usg=__E5FkJKViA2CKDYucpUjLur1EGas%3D&sa=X&ved=0ahUKEwig3bihv9rYAhVl_4MKHU8LAAYQ9QEITzAC#imgrc=M4XBdC92LXnx_M:

https://blogs.gartner.com/cindi-howson/2017/02/23/bia2017mq/

http://www.jenunderwood.com/tag/solution-review/

 

Posted in Business Intelligence, Linkdump | Leave a comment

Linkdump: Various learnings: SD, JS. SS/BI/BD

10 books every web developer should read to increase their software IQ

Backtracking algorithmic approach:

http://blog.dailycodingproblem.com/an-introduction-to-backtracking/?utm_campaign=News%20on%20Monday&utm_source=hs_email&utm_medium=email&utm_content=60133300&_hsenc=p2ANqtz-8wUu0X1MNw7Ka4qWf8k5TgFDmfpiT6ecVsss07oZuypsu4t3kozhxperXdqM_8hp9YYaZbrEcMBuo2C-2sH3Y7QNx1iGWGWHqcJCplbP3RRpSbZ5c&_hsmi=60133300

Javascript framework Comparison:

https://javascriptreport.com/js-frameworks-fastest/?utm_campaign=News%20on%20Monday&utm_source=hs_email&utm_medium=email&utm_content=60133300&_hsenc=p2ANqtz-8wUu0X1MNw7Ka4qWf8k5TgFDmfpiT6ecVsss07oZuypsu4t3kozhxperXdqM_8hp9YYaZbrEcMBuo2C-2sH3Y7QNx1iGWGWHqcJCplbP3RRpSbZ5c&_hsmi=60133300

Inferno Javascript framework:

https://infernojs.org

SQL Server / Business intelligence / Big Data /  Azure Elastic queries:

http://www.sqlservercentral.com/articles/Azure/166259/?utm_source=SSC&utm_medium=pubemail

SQL Server internals:

http://www.sqlservercentral.com/blogs/sql-undercover/2018/01/15/dissecting-sql-server-the-internal-structure-of-a-row/?utm_source=SSC&utm_medium=pubemail

App shipping / development / delivery:

Red Hat Open Shift Application Runtimes:  https://developers.redhat.com/products/rhoar/overview/

Microsoft Visual Studio App Center: https://blog.xamarin.com/c-developers-guide-shipping-better-apps-visual-studio-app-center/?utm_campaign=News%20on%20Monday&utm_source=hs_email&utm_medium=email&utm_content=60133300&_hsenc=p2ANqtz-8wUu0X1MNw7Ka4qWf8k5TgFDmfpiT6ecVsss07oZuypsu4t3kozhxperXdqM_8hp9YYaZbrEcMBuo2C-2sH3Y7QNx1iGWGWHqcJCplbP3RRpSbZ5c&_hsmi=60133300

Posted in Business Intelligence, Linkdump, Programming, SQL Server | Leave a comment

T-SQL: Trim after newline / carriage return

USE [db_mes_sandbox]
GO

EXEC [dbo].[usp_CompleteHierarchy3]
@pSerial_number = N’110160766′,
@pFlag_IncludeCcaComponents = 0,
@pFlag_IncludeReplacedParts = 0,
@pDebug = 1
GO

SELECT
product_id
,name
,revision
,description = /* This CASE statement returns the first line of description when it contains the word ‘alternate’. */
CASE
WHEN CHARINDEX(CHAR(10),REPLACE(description,CHAR(13),CHAR(10)),1) > 0 /*Find values with multiple lines,*/
AND PATINDEX(‘%Alternate%’,description) > 0 /*and, find values containing the word ‘alternate’.*/
THEN LEFT(REPLACE(description,CHAR(13),CHAR(10)), CHARINDEX(CHAR(10),REPLACE(description,CHAR(13),CHAR(10)),1)-1) /*Use only the first line.*/
ELSE description
END
,raw_description = description
FROM qs_products
WHERE flags&1=0
–AND name=’266698-1′

Posted in SQL Server | Leave a comment

save to DB & update DT+DGV, vs Total UI requery from DB

Here’s code for this… save to database + update local datatable + update local datagridview = faster than refreshing UI from database

if (lblSerialNumberId.Text != “”)
{
MesQueries.SRUSheetCreation sru = new MesQueries.SRUSheetCreation(_mq);
string serial_number_id = lblSerialNumberId.Text;
string change_orders = txtChangeOrders.Text;
sru.SaveInspectionInfo(serial_number_id, change_orders);
// Save in local DataTable.
int rowNumToUpdate = -1;
for (int i = 0; i < _dtCHData.Rows.Count; i++)
{
if (_dtCHData.Rows[i][“serial_number_id”].ToString().Equals(serial_number_id))
{
rowNumToUpdate = i;
break; // early exit of for loop.
}
}
_dtCHData.Rows[rowNumToUpdate][“drawing_revision”] = drawing_revision;
_dtCHData.Rows[rowNumToUpdate][“change_orders”] = change_orders;

// Save in local datagrid for display to UI.
dgvSruSheet.Rows[_selectedGridRow].Cells[“drawing_revision”].Value = drawing_revision;
dgvSruSheet.Rows[_selectedGridRow].Cells[“change_orders”].Value = change_orders;

_flagDirtyData = false;
}

Possibly also useful:

DataTable.AcceptChanges(); //to force update of DataTable.

DataGridView.Invalidate() or InvalidateColumn(), …Row(), …Cell(). Or DataGridView.RefreshEdit(). Or, .UpdateCellValue().  I have not yet found which if any of these are functional.

Posted in C#, Programming | Leave a comment

Meltdown and Spectre patches, via SQLServerCentral

http://www.sqlservercentral.com/articles/SQL+Server/166822/?utm_source=SSC&utm_medium=pubemail

 

Posted in Linkdump, SQL Server, System/DB Administration | Leave a comment

SQL Server diagnostics notes

This week’s amusement: performance of a recently-implemented Stored Procedure dropped and dropped to intolerable levels. This system cannot be easily upgraded. Significant fragmentation is involved. Memory pressure is involved. Inserts to table variables in multiple stored procs are involved. This post records some investigative googling.

Adjusting file autogrowth in SQL Server production systems:

https://serverfault.com/questions/31499/can-i-change-a-live-sql-database-from-autogrow-safely

Scope of Temporary Objects:

https://www.google.com/search?q=sql+server+scope+of+temp+tables&oq=sql+server+scope+of+&aqs=chrome.0.0j69i57j0l4.8990j0j4&sourceid=chrome&ie=UTF-8

Scope of table variable and temp table https://social.msdn.microsoft.com/Forums/sqlserver/en-US/02337dd5-5cfd-40d8-b529-12dc557d6a7e/scope-of-table-variable-and-temp-table?forum=sqltools

Temp tables and table variables scope and persistence

https://www.sqlservercentral.com/Forums/Topic1180410-392-1.aspx

http://www.toadworld.com/platforms/sql-server/w/wiki/10282.temporary-objects

http://www.toadworld.com/platforms/sql-server/b/weblog/archive/2013/02/19/check-if-a-temporary-table-exists

IF object_id(‘tempdb..#MyTempTable’) IS NOT NULL

BEGIN

<TSQL Batch>

END

http://www.toadworld.com/search#q=temporary%20objects&group=6

 

Investigating performance of stored procedures:

https://www.google.com/search?q=sql+server+which+stored+procedures+are+running&oq=sql+server+which+stored+procedures+are+running&aqs=chrome..69i57j0l5.7751j0j7&sourceid=chrome&ie=UTF-8

https://www.red-gate.com/simple-talk/sql/performance/which-of-your-stored-procedures-are-using-the-most-resources/

https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-exec-procedure-stats-transact-sql

https://stackoverflow.com/questions/25846306/check-if-stored-procedure-is-running

After a bit of research on MSDN (https://msdn.microsoft.com/en-us/library/ms189497.aspx) I was able to figure out the following query that will provide the list of running processes:

select
object_name(st.objectid) as ProcName
from
sys.sysprocesses as qs
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st
where
object_name(st.objectid) is not null

Currently running procedure name: https://www.sqlservercentral.com/Forums/Topic813548-146-1.aspx

Fragmented database files / VLF counts:

https://www.google.com/search?q=reduce+number+of+vlfs&oq=reduce+number+of+vlfs&aqs=chrome..69i57.5927j0j7&sourceid=chrome&ie=UTF-8

High Virtual Log File (VLF) Count

http://adventuresinsql.com/2009/12/a-busyaccidental-dbas-guide-to-managing-vlfs/ including :

How Do I Lower a Database’s VLF Count?

Once armed with a list of databases that have high VLF counts, the next step is to shrink the logs to as small as possible then grow them back to the original size, ideally in a single growth. This is best done during off-peak times

Transaction log performance:

https://www.sqlskills.com/blogs/kimberly/8-steps-to-better-transaction-log-throughput/

https://blog.sqlauthority.com/2011/01/02/sql-server-reduce-the-virtual-log-files-vlfs-from-ldf-file/

Average Disk Queue Length:

https://www.google.com/search?q=sql+server+disk+queue+length+high&oq=sql+server+disk+queue+&aqs=chrome.2.0j69i57j0l4.5140j0j7&sourceid=chrome&ie=UTF-8

https://www.mssqltips.com/sqlservertip/2329/how-to-identify-io-bottlenecks-in-ms-sql-server/

https://www.sqlservercentral.com/Forums/Topic1296901-146-1.aspx

SQL Server disk performance metrics – Part 2 – other important disk performance measures

How To: Troubleshooting SQL Server I/O bottlenecks

https://dba.stackexchange.com/questions/17629/cause-of-high-disk-queue-length-in-sql-server

Increase speed of inserts:

https://www.google.com/search?q=sql+server+do+indexes+speed+up+inserts&oq=sql+server+index+spedd+up+&aqs=chrome.2.69i57j0l5.9895j0j7&sourceid=chrome&ie=UTF-8

https://stackoverflow.com/questions/7090243/sql-insert-speed-up

Indexes on Table Variables: https://stackoverflow.com/questions/886050/creating-an-index-on-a-table-variable

Indexes on Temporary Tables: http://weblogs.sqlteam.com/mladenp/archive/2008/12/29/SQL-Server-Management-Studio-2008-suggests-missing-indexes-with-actual.aspx

 

Posted in Linkdump, Programming, SQL Server, System/DB Administration | Leave a comment

Enum tip: Initialized

When using a custom Enum to control features like application states, I always include an explicit Initialized state. This eliminates any uncertainty of which value to use for a necessarily-initialized variable that may not have a defined state- for example, an out parameter.

Posted in Uncategorized | Leave a comment

Tips for adjusting TableLayoutPanel

UI adjustments feel clumsy until you struggle through several, but there are some techniques that can help. It’s obviously better to see these in use, but a list is at least something to start with.

  • TableLayoutPanel displays a flyout menu that can be used to adjust dimensions by hand. This opens a dialog with a table of Columns, or Rows if you select that from the droplist. Each row/col has an Absolute or Percentage value. ALWAYS give one of the entries a percentage value- that’s the one that will expand when the user stretches the screen. The exception is when nothing should ever change size. You can make every row exactly the same size, match precise margin/border measurements, etc.
  • After you establish which rows/columns are absolute and which are percentage, you are able to manually adjust the absolute rows/cols by dragging on the UI. This is almost always faster than entering numbers, and usually alleviates the need to know those precise margin/border measurements…
  • Form fonts will auto-scale in the tables. This works well for normal values, but extreme values can look stupid. So be it. Users might deny it, but they know better than to use font size 48 on data entry forms. Users who try to break things get no pity from me.
  • Anchor and Dock properties are similar in practice. I normally use Dock (Fill), but I think Anchor (L R T B) would work equally well. Docked objects cannot be auto-moved; Anchored can. There are pros and cons to each.
  • In really complicated UIs that have several nested TableLayoutPanels or Splitters, always give those nested objects a name so you know what you have selected as you rearrange the UI. This can be far more important than it sounds, especially for redesign.
Posted in C#, Musings, Programming | Leave a comment

tip: passive error and warning messages

It’s best to put error/warning messages in very passive, non-blaming language, especially if users might see them. Avoid exclamation marks unless something is seriously wrong and they need to take immediate action, and in that case tell them which actions to take.

It can be difficult to give non-technical people meaningful info, with enough tech detail for the dev to actually find and fix a problem. Specifically, the example below is validating data prior to record creation. The message could be phrased like (“Sorry, there was a problem saving the programming step.\n\nError details: missing ID. Mes_product_id:” + mes_product_id +” Mes_route_step_id:” + mes_route_step_id)

//Check that all Guid strings are not empty
if (mes_product_id.Equals(“”) || mes_route_step_id.Equals(“”) || mes_station_id.Equals(“”))
throw new Exception(“At least one ID is empty!”);

And then to be super-nice, you might even help them out with some instructions like “try again by doing this thing instead”, or “contact your supervisor or MES Admin if this problem continues.”

Posted in Business, Musings, Programming, System/DB Administration | Leave a comment