How long does it take your company to implement a new feature? Fix a bug? Ramp up a new developer? To re-write your code every five to ten years because it turns into spaghetti? At the end of the day, developers can do one of two things: maintain or innovate. In this session, Steve will dive in to code and show you tips, tricks, techniques, and real-world examples to help you better engineer highly maintainable code, keep your software relevant, reduce development costs, increase developer job satisfaction, and stay innovative.
2. Speaker Profile
Steve
ANDREWS
Founder/Executive Director
Platinum Bay Technologies
Software Architect with 16 Years Experience
Four-Time Microsoft MVP Award Recipient
Microsoft Alumni
Speaker at Over 120 Technology Events
Microsoft and IBM Certifications
Non-Profit Board Experience (x3)
Autism Advocate
Experience
Dedicated to applying his talents and experience in the technology sector along
with his personal knowledge of life on the Autism Spectrum and prior business
experience to create a program with an empowering environment where ASD
individuals can find their own personal success.
Short
Biography
11. Naming Things
Private m_nOrhID As Int32 = 0
Public Property objDataSet() As System.Data.DataSet
Private Function CreateCciName(ByVal nCctID As Int32, ByVal sCciCardNumber As String) As String
Dim nZlgLanguageID As Int32 = m_oData.nZlgLanguageID
Private Function FindUserOrgID(ByVal nUserID As Int32) As Int32
v_raw_array = Split(v_raw_data, Environment.NewLine)
12. Spelling Things
m_nTruckingRevenu = m_oData.objOrderData.nLineHaulRevenue
' Build stirng to return
' Invoice is beeing generated flag
Protected m_bInvoiceCration As Boolean = False
''' <summary>
''' Invoice under creation
''' </summary>
Public Property bInvoiceCration() As Boolean
Get
bInvoiceCration = m_bInvoiceCration
13. Code Formatting
With objFreightOrderHeaders
.nOrhID = objOH.nID
.LoadList(0)
Public Sub SetShippedReportDS(ByVal nPickUpID As Int32, ByVal nLineHaulID As Int32, ByVal nDeliveryID As Int32, _
ByVal nStatusID As Short, ByVal nZorCarrierID As Int32, ByVal dFromDate As Date, _
ByVal dToDate As Date, ByVal bPrinterFriendly As Boolean, ByVal bFormatHtml As Boolean, _
ByVal sOrgAddress As String, ByVal sOrgZip As String, ByVal sOrgCity As String, _
ByVal sOrgState As String, ByVal sDestAddress As String, ByVal sDestZip As String, _
ByVal sDestCity As String, ByVal sDestState As String, ByVal nShipType As Int32)
14. Linear Code
objOrderHeaders.nMaxRows = 90000
objOrderHeaders.sSpName = "dp_GetOrderRowsHistory”
objOrderHeaders.LoadList(0)
m_objDataSet = objOrderHeaders.objDataSet
objOrderHeaders.LoadList(9000, "dp_GetOrderRowsHistory", 0)
versus
15. Deleting Code
''#### Dev1
''Dim objCarrierSettings As New Global.Zippers.Data.clsCarrierSettings(m_sConnect)
''Dim objCarrierSetting As Global.Zippers.Data.clsCarrierSetting
''objCarrierSettings.sWhere = "nZorID IN (" + m_objOrderData.sZorCarrierIDs + ")“
''objCarrierSettings.LoadList(0)
''For i As Int32 = 1 To objCarrierSettings.Count
'' objCarrierSetting = CType(objCarrierSettings.Item(i), Global.Zippers.Data.clsCarrierSetting)
'' ' Email specified? '' If objCarrierSetting.sCasInternationalEmail.Length > 0 Then
'' ' Send the order confirmation by e-mail to the customer
'' Dim objMailSender As New Global.Zippers.Data.Misc.clsMisc(m_sConnect)
'' Dim nZusInvoiceSenderID As Int32 = m_oData.Email_nZusPasswordSenderID
'' objMailSender.PutMailInSendQueue(nZusInvoiceSenderID, "", 0, objCarrierSetting….
'' End If
''Next ' Completed OK
17. Separation of Concerns
Dim sWordCommodity As String = "Commodity“
If m_bTranslate Then
sWordCommodity = Web.Functions.TranslateText("Word_Commodity", sWordCommodity)
sbReturn.Append("<div class=""xqh_LabelFieldPair"">")
sbReturn.Append(" <div class=""xqh_FieldLabel"">" + sWordCommodity + ":</div>")
sbReturn.Append(" <div class=""xqh_Field"">" + sTruckloadCommodity + "</div>")
sbReturn.Append("</div>")
sbReturn.Append("")
18. TODOs and Comments
''' <summary> ''' Message ''' </summary>
Public Property sMessage() As String
' Replace tag [LIST_OF_ITEMS] and [#Step2_TotalWeight#]
sBody = sBody.Replace("[#Step2_TotalWeight#]", m_oData.objOrderData…
sBody = sBody.Replace("[LIST_OF_ITEMS]", m_oData.objOrderData.sTruckloadCommodity…
23. Languages, Tools, and Frameworks
' Return Error Message from OrderProcessTool
Protected m_sErrorMessage As String = "" ''‘
<summary> ''' Error Message string ''' </summary>
Public Property sErrorMessage() As String
Get
sErrorMessage = m_sErrorMessage
End Get
Set(ByVal Value As String)
m_sErrorMessage = Value
End Set
End Property
Dim sbReturn As StringBuilder = New StringBuilder()
24. Developer Knowledge and Responsibility
Dim sSupportEmailAddr As String = "dev.three@zippersolutions.com"
26. Thank You
Contact us for exceptional quality work, allowing you to significantly reduce
long-term development costs.
How can we help you? steve@
platinumbay.com
Platinum Bay Technologies
Expert People. Expert Solutions. Social Good.