Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Similar Blogs

photo

PayDirt

11 Entries |  Brett Patterson
Updated 
No Ratings 0     Comments 6
photo

TexasSwede

66 Entries |  Karl-Henry Martinsso...
Updated 
No Ratings 0     Comments 59
photo

Yellow is the...

55 Entries |  Tim Tripcony
Updated 
No Ratings 0     Comments 22
photo

Portaldomosph...

21 Entries |  David DeWell
Updated 
No Ratings 0     Comments 10
photo

J. Keil Wilso...

9 Entries |  Keil Wilson
Updated 
Ratings 4     Comments 7

Archive

yellowCAT

Blog Authors:  Marcus Foerster  

Analogies in the car world vs. software world

Marcus Foerster  |     |  Tags:  architecture software  |  Comments (0)
 
Tonight I’m going to give back my leasing car. Last week, I had the car detailed, to make sure that everything is going to be fine at the handing over.

Result: an absolutely spotless car - therefore all in a sudden the sensor for the passenger seat belt had a defect (what led to a continuous "Pling", unless I buckled up the passenger, even though no one was sitting there...)

So: discussions with the car detailing company, error analysis at the car dealer etc.. Few days after this, the sensor worked again. Obviously using the passenger seat in between had re-adjusted the sensor.

The end result: hassle, wasting time, looking for errors for a function, that is definitely super modern, technically genius, intelligent, fantastic, but which I actually do not need at all.

In the software field, sometimes things go the same way:

A system is planned, that covers exactly the core needs, it is stable, clearly laid out, fulfills all economically necessary features - but still there is the one feature, that absolutely has to be added... as it is super-modern, technically genius, intelligent, fantastic.... And, "of course", it brings an additional value... and therewith a component that brings a risk for instability. Why is that? a) Every additional code just increases the possibility of errors. b) it is especially these "additional features", that usually are the cause for a lower maintainability.

The "moral": when planning software, it should not only be considered, what is done how and what can still be done within the budget. But also, what (-> "nice to have" ) possibly can be omitted. To make sure, that the business relevant components are reliable after testing, that they are robust and architectonically of high quality - and to take into account, that maintenance is always part of the software cycle as well.


Collaboration And Teamwork... do it yellow

File Lotusphere 2008 MP3 podcasts with session met...

Marcus Foerster  |     |  Comments (0)
The Lotusphere MP3 podcasts are now available on http://www.ls08.net/. With the script below, you can add meta information about the Lotusphere sessions to your mp3 podcasts (through an HTML page) and categorize your mp3s by date, id, location or speaker, as the mp3s file names themselves hold only session IDs.


    

Before, I already blogged a script to import the Lotusphere presentations into the Lotus session database. As the size of all Lotusphere podcasts are several GBs, it is probably not a good idea to import them into the database as well ;-)

This is, why the script below generates a JavaScript file, which can be stored e.g. on a shared drive together with the HTML file below and all MP3s. In the HTML file you can then sort by session ID, date, location, speaker etc., view all session information and click a link opening the corresponding podcasts on the disk (without Notes). Tested with Firefox 2 and IE7.

(due to possible IBM copyright I do not provide the JavaScript file itself for downloading, but offer the LotusScript below)


Step by step:

  • Download the zipped HTML file here, unzip it and save the file mp3index.html in the directory, that holds the MP3 files
  • Copy the LotusScript code below into an agent in any Notes database (Target: none)
  • Adjust the parameters: (a) Server that holds your LS08 Journal database, b) File path and name of the LS08 Journal database, c) Path of the directory that holds the MP3 files
  • Run the agent -> the agent browses all sub directories of the MP3 path specified in the parameters (e.g. AD, BOF etc.) and reads all session meta information from the LS08 Journal database (for all existing MP3 files). This information will then be stored in a JavaScript file (mp3.js, created in the MP3 directory).
  • Open mp3index.html in your browser. Now you can sort by session date, session ID etc., read the abstract etc. and run the corresponding podcasts.
(For example: your MP3 files are stored in the directories C:\mp3s, C:\mp3s\AD, C:\mp3s\BOF etc. -> in this case you have to specify "C:\mp3s" as your MP3 file path. The file mp3.js will be created in this directory; also, the file mp3index.html has to be stored in this directory)

Again, have fun!


------------------------------- Code ----------------------------------------------------------

Sub Initialize
   
%REM
Used to export additional session information for all lotusphere MP3 podcasts from the lotusphere journal.
Generates a mp3.js with this session information in path specified in parameters below.
Needs mp3index.html to interprete the mp3.js
Specify journal server and filepath as well as path to MP3 files in parameters below
(main path, in which sub directories like "AD" are stored).
http://marcus.foerster.com/yellowcat
%END REM
   
    On Error Goto errorhandler
   
    ' ###### Parameters ##########
   
    Const lotusphere08Journal_Server = "YOURSERVER" ' server where lotusphere journal is located
    Const lotusphere08Journal_Filepath = "YOURFILEPATH\YOURFILENAME.nsf" ' filepath (path and filename) of lotusphere journal
    Const lotusphere08MP3s_Filepath = "C:\YOURPATHCONTAININGMP3S\" ' filepath (path only) where pdf files are located
      
    ' ##########################
   
    ' open lotusphere08 journal
   
    Dim db As New NotesDatabase(lotusphere08Journal_Server, lotusphere08Journal_Filepath 
    If Not db.IsOpen Then
        Msgbox "Unable to open journal database: " & lotusphere08Journal_Server & "!" & lotusphere08Journal_Filepath
        Exit Sub
    End If
   
    ' get view categorized by session id
   
    Dim v As NotesView
    Set v = db.GetView( "eBySession" )
   
    ' init statistics (success control)
   
    Dim listStat List As Integer
    listStat( "mp3 files to be read" ) = 0
    listStat( "successfully added" ) = 0
    listStat( "corresponding journal entry not found" ) = 0
   
    Dim listNotFound List As String
   
    ' open mp3.js for writting
   
    Dim pathName As String, fileName As String
    pathName$ =lotusphere08MP3s_Filepath
    If Right$(pathName$, 1) <> "\" Then pathName$ = pathName$ + "\"
   
    Open pathName$ + "mp3.js" For Output As #1
    Print #1, "var arrObjSession = new Array();"
   
    ' for each mp3 file: create JS output
   
    Dim leftfn As String, rightfn As String, vdoc As NotesDocument
   
    Dim listField List As String
    listField( "SessionAbstract" ) = "string"
    listField( "BeginTime" ) = "date"
    listField( "SESSIONID" ) = "string"
    listField( "SESSIONLOCATION" ) = "string"
    listField( "SESSIONTITLE" ) = "string"
    listField( "SESSIONURL" ) = "string"
    listField( "Speaker" ) = "array"
   
    Dim listFormula List As String
    listFormula( "string" ) = {"~field~: \"" + @ReplaceSubstring( ~field~; "\""; "\\\"" ) + "\", "}
    listFormula( "date" ) = {"~field~: new Date(" +
        @Text(@Year(~field~))+ ", " +
        @Text(@Month(~field~)) + ", " +
        @Text(@Day(~field~)) + ", 0, 0, 0), "}
    listFormula( "array" ) = {"~field~: [\"" + @Implode( @ReplaceSubstring( ~field~; "\""; "\\\"" ); "\", \"" ) + "\"], "}
   
    Dim jsStart As String
    jsStart = "arrObjSession[arrObjSession.length] = {"
   
    Dim jsEnd As String
    jsEnd = "};"
   
    Dim res As Variant
    Dim txt As String
   
    ' get directory list
    Dim dirName As String
    dirName$ = Dir$(pathName$ + "*.", 16)
   
    Dim listDir List As String
    Do While dirName$ <> ""
        Select Case dirName$
        Case "."
            listDir( "." ) = ""
        Case ".."
            ' do not add
        Case Else
            listDir(dirName$) = dirName$ + "\"
        End Select
        dirName$ = Dir$()
    Loop
   
    Forall dirx In listDir
       
            ' get first mp3 file
        fileName$ = Dir$(pathName$ + dirx + "*.*", 0)
        Do While fileName$ <> ""
           
            leftfn$ = Strtoken(fileName$, ".", 1)
            rightfn$ = Strtoken(fileName$, ".", 2)
            If Lcase(rightfn$) = "mp3" Then ' only treat mp3
               
                listStat( "mp3 files to be read" ) = listStat( "mp3 files to be read" ) + 1
               
                Print "Reading " + leftfn$
                Set vdoc = v.GetDocumentByKey(leftfn$, True)
               
                If Not vdoc Is Nothing Then
                   
                    ' add mp3 file to JS array
                    txt = jsStart
                    Forall myField In listField
                        res = Evaluate(Replace(listFormula(myField), "~field~", Listtag(myField)), vDoc)
                        txt = txt + res(0)
                    End Forall
                   
                    txt = txt + "SESSIONMP3: """ + dirx + "\" + fileName$ + """"
                    txt = txt + jsEnd
                    Print #1, txt
                    listStat( "successfully added" ) = listStat( "successfully added" ) + 1
                   
                Else
                    listStat( "corresponding journal entry not found" ) = listStat( "corresponding journal entry not found" ) + 1
                    listNotFound(leftfn$) = leftfn$              
                End If
               
            End If
           
            fileName$ = Dir$()
        Loop
       
    End Forall
   
    ' close mp3.js
   
    Close
   
    ' show success statistics
   
    Dim msg As String
    msg$ = ""
    Forall stat In listStat
        msg$ = msg$ & Listtag(stat) & ": " & stat & Chr$(13)
    End Forall
    Msgbox msg$
   
    msg$ = ""
    Forall notFound In listNotFound
        msg$ = msg$ & Chr$(13) & "- " & notFound
    End Forall      
    If msg$ <> "" Then
        msg$ = "The following session IDs were not found:" & msg$
        Msgbox msg$
    End If
   
e:
    Exit Sub
errorhandler:
    Msgbox "Error " & Error & " in line " & Erl
    Close
    Resume e
   
End Sub
 

Import Lotusphere Presentations into Lotusphere Se...

Marcus Foerster  |     |  Tags:  lotusphere lotusphere2008 presentations lotusscript pdf  |  Comments (1)
Categorize all presentations of Lotusphere 2008 in Lotusphere Session Database / Lotusphere Journal via LotusScript import.

As the file names of the Lotusphere presentations contain only the session ids, you might want to import the PDF files into the Lotusphere Session Database ( "Lotusphere Journal 2008" ). This can be done with the LotusScript code below.

This is what you do:

  • Create a LotusScript agent with the code below ( in any Notes database, agent properties / target: "None" )
  • Change the parameters in the code according to your environment: a) the server where your Lotusphere Journal is located, b) path and filename of the Lotusphere Journal, c) path, where the Lotusphere presentations are located on your local machine
  • Run the agent -> each file will be imported into the document with the corresponding session id

Next steps:

  • Edit the form "Journal Entry | JournalEntry" in the Lotusphere Journal and add a richtext field with the name "Presentations" whereever you want the attachment to be displayed in the document (I don't use the existing field "Resources", as there might be hide-when-formulas within the richtext content).
  • Add a column to the view "BySessionID", choose "Display as icon" in the column properties and enter "@If(@Attachments;5;0)" as column formula; this will show a symbol in the view "by session id", when a document contains an attachment.

Have fun!

------------------------------- Import-Code ----------------------------------------------------------

Sub Initialize
   
%REM
Used to import lotusphere PDF presentations into lotusphere journal.
Specify journal server and filepath as well as path to PDF files in parameters below.
In the design of your journal database you might want to do the following:
- open form "Journal Entry | JournalEntry" -> add a richtext item named "Presentations";
  this will contain and display the PDF attachment when opening a session document.
  This agent does not use the existing field "Resources", as there might be hide when formulas
  within the richtext.
- open view "BySessionID" -> add column, choose "display as icon" in column properties and
  enter the following formula code: @If(@Attachments; 5; 0)
  this will display a symbol in the view "by session", when a document contains an attachment
http://marcus.foerster.com/yellowcat
%END REM
   
    On Error Goto errorhandler
   
    ' ###### Parameters ##########
   
    Const lotusphere08Journal_Server = "YOURSERVER" ' server where lotusphere journal is located
    Const lotusphere08Journal_Filepath = "YOURFILEPATH\YOURFILENAME.nsf" ' filepath (path and filename) of lotusphere journal
    Const lotusphere08PDFs_Filepath = "C:\YOURPATHCONTAININGPDFS\" ' filepath (path only) where pdf files are located
   
    ' ##########################
   
    ' open lotusphere08 journal
   
    Dim db As New NotesDatabase(lotusphere08Journal_Server, lotusphere08Journal_Filepath  
    If Not db.IsOpen Then
        Msgbox "Unable to open journal database: " & lotusphere08Journal_Server & "!" & lotusphere08Journal_Filepath
        Exit Sub
    End If
   
    ' get view categorized by session id
   
    Dim v As NotesView
    Set v = db.GetView( "eBySession" )
   
    ' init statistics (success control)
   
    Dim listStat List As Integer
    listStat( "pdf files to be imported" ) = 0
    listStat( "successfully attached" ) = 0
    listStat( "files already attached" ) = 0
    listStat( "corresponding journal entry not found" ) = 0
   
    Dim listNotFound List As String
   
    ' get first pdf file
   
    Dim pathName As String, fileName As String
    pathName$ =lotusphere08PDFs_Filepath
    If Right$(pathName$, 1) <> "\" Then pathName$ = pathName$ + "\"
    fileName$ = Dir$(pathName$ + "*.*", 0)
   
    ' for each pdf file: attach to journal entry
   
    Dim leftfn As String, rightfn As String, vdoc As NotesDocument, rt As NotesRichTextItem, embObj As NotesEmbeddedObject
    Do While fileName$ <> ""
       
        leftfn$ = Strtoken(fileName$, ".", 1)
        rightfn$ = Strtoken(fileName$, ".", 2)
        If Lcase(rightfn$) = "pdf" Or Lcase(rightfn$) = "zip" Then ' only treat pdf and zip
           
            listStat( "pdf files to be imported" ) = listStat( "pdf files to be imported" ) + 1
           
            Print "Importing " + leftfn$
            Set vdoc = v.GetDocumentByKey(leftfn$, True)
           
            If Not vdoc Is Nothing Then
            ' check if PDF has already been attached before
                Set embObj = vdoc.GetAttachment(fileName$)
                If Not embObj Is Nothing Then
                    listStat( "files already attached" ) = listStat( "files already attached" ) + 1               
                Else
                   
            ' get richtext item "Resources"
                    Set rt = vdoc.GetFirstItem( "Presentations" )
                    If rt Is Nothing Then
                        Set rt = New NotesRichTextItem( vdoc, "Presentations" )
                    End If
                   
            ' attach pdf file
                    Call rt.EmbedObject(EMBED_ATTACHMENT, "", pathName$ + fileName$)
                    If vdoc.Save(True, False, False) Then
                        listStat( "successfully attached" ) = listStat( "successfully attached" ) + 1
                    End If
                End If
               
            Else
                listStat( "corresponding journal entry not found" ) = listStat( "corresponding journal entry not found" ) + 1
                listNotFound(leftfn$) = leftfn$               
            End If
           
        End If
       
        fileName$ = Dir$()
    Loop
   
    ' show success statistics
    Dim msg As String
    msg$ = ""
    Forall stat In listStat
        msg$ = msg$ & Listtag(stat) & ": " & stat & Chr$(13)
    End Forall
    Msgbox msg$
   
    msg$ = ""
    Forall notFound In listNotFound
        msg$ = msg$ & Chr$(13) & "- " & notFound
    End Forall       
    If msg$ <> "" Then
        msg$ = "The following session IDs were not found:" & msg$
        Msgbox msg$
    End If
   
e:
    Exit Sub
errorhandler:
    Msgbox "Error " & Error & " in line " & Erl
    Resume e
End Sub


Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About

Tags

A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.