admin

Mike Martin

Administrator | Last logged in at

Technologist

Certified Scrum Master.

Other skills: Linux sysadmin, Object Orientated PHP programming (Symfony, Doctrine, Gearman, vSphere).

Less Excuses

Never design a data model to fit the output. Classic case:

1-to-many contacts: don't design as:

AccountKey, FirstName1, LastName1, Email1, FirstName2, LastName2, Email2, FirstName3, LastName3, Email3 etc.

Just because the input of the system you're outputting to may requires contacts 1-8 in 2 dimensional form doesn't mean your own internal datamodel needs to have it this way.

Ideal conditions for codebases

Looking at companies around. Folks do have a lot of repos with different codebases. Having come from doing that myself, stuff gets quite difficult when you have to deal with SVN externals and different models required from different codebases and versioning.

For example, let's say you have a model called 'Person'. It's in a minor codebase called 'adminarea'. Let's say you're given a task to update that model but you're using a different codebase called 'monitor'.

Now that creates a dependency. Monitor must now be kept up-to-date when 'adminarea' changes, otherwise you get compatibility issues.

At some places where I've worked, they've got around this by creating a shared codebase and each application or other codebase runs tests to make sure compatibility doesn't break the respective applications.

If you don't have these tests, then the only way of working is duplication, not SVN externals.

Tbh, the best way to do this is one codebase fits all. Basically, create a codebase all projects in that language. Inside there, create a shared library folder and shove your models in there.

Then foreach application wants to reference those libraries, developers are all aware of it and the compatibility problems become much better to manage.

Some MHEG+ code

Here's some MHEG+ code that will blow your mind.



{:Scene "/article.mhg"
:Items (
{:Link 1
:EventSource 0
:EventType IsRunning
:LinkEffect
(
//	 app#txtRed.run()
//	 app#txtYellow.run()
app#txtGreen.run()
app#txtGreen.SetData('Inbox')
app#txtBlue.run()
app#txtBlue.SetData('Notify Me')
// load a text file into a text object...
waitOnContent.activate()
app#castToContent.call ( app#rpBool
:IndirectRef app#articleURL
:IndirectRef app#webRef
)
app#rc_txtLoaderObject.SetData( :NewRefContent
(
:IndirectRef app#webRef
)
)
)
}
{:Link waitOnContent
:InitiallyActive false
:EventSource app#rc_txtLoaderObject
:EventType ContentAvailable
:LinkEffect (
:Deactivate (waitOnContent)
app#rc_lnkInitSearch.activate()
readData.activate()
)
}
{:Link readData
:InitiallyActive false
:EventSource readData
:EventType isRunning
:LinkEffect (
readData.deactivate()
app#rc_strTag.setVariable('h')
app#rc_lnkLookUpTag.activate()
txtHeader.setData(:IndirectRef app#rc_strValue)
app#rc_strTag.setVariable('content')
app#rc_lnkLookUpTag.activate()
txtContent.setData(:IndirectRef app#rc_strValue)
app#rc_strTag.setVariable('graphic')
app#rc_lnkLookUpTag.activate()
app#castToContent.call ( app#rpBool
:IndirectRef app#rc_strValue
:indirectRef articleGraphic
)
imgGraphic.setData(:NewRefContent (:IndirectRef articleGraphic))
//imgGraphic.scaleBitmap( 200 200 )
)
}
{:Text txtHeader
:CHook 10
:OrigContent "Header"
:OrigBoxSize	 500 50
:OrigPosition	58 68
}
{:Text txtContent
:CHook 10
:OrigContent "Lots and lots of content."
:OrigBoxSize	 500 390
:OrigPosition	58 130
:TextWrapping	true
}
{:ContentRefVar articleGraphic
:OrigValue	:ContentRef ''
}
{:Link lnkKeyBlue
:EventSource 0
:EventType UserInput
:EventData KeyBlue
:LinkEffect
(
:TransitionTo ("/b.mhg")
)
}
{:Link lnkKeyText
:EventSource 0
:EventType UserInput
:EventData KeyText
:LinkEffect
(
:Quit ()
)
}
{:Bitmap imgGraphic //must be PNG
:CHook pngCHook
:OrigContent :ContentRef ('')
:OrigBoxSize 200 200
:OrigPosition 50 260
}

)
:InputEventReg 4
:SceneCS 720 576
}