Been busy…

 The last month or so, I have been pretty busy at work and in my personal life. My sister came over from Sweden for a 10-day visit, and at work I been working on wrapping up a project we been working on for a while. I have been having some time to do private things, but I have not put a priority on computers/blogging. This coming weekend I am going to Austin for a friends birthday, but then I should have time to do some blogging again. 

0 Comments

Silence in New Indiana Jones to track pirates

According to an article at boingboing.com, Paramount is dropping the sound in the new Indiana Jones movie, in order to trace where pirate copies are coming from.While at the cinema yesterday, I read a notice posted by the box office that Paramount has intentionally silenced bits of the soundtrack of _Indiana Jones and the Kingdom of the Crystal Skull_ in order to deter and track piracy. The notice acknowledged that the momentary silences were annoying but that it was out of their control. Basically it said, please don't bug the manager if the sound drops out, unless it lasts more than a minute. Repeat after vowe: DRM is bad for the customer 

0 Comments

Memorial Day – My Thoughts

As many of you may know, I am originally from Sweden. A small, neutral country in northern Europe, who have not been in war since 1814. Sweden have been having a fairly strong defence force, at least until about 10 years ago, when budget cuts been reducing it to basically non-existant... Sweden always had a conscript army, like most European countries. All males must serve for about a year around the time they turn 20, and I served 11 months in the Air Force. There are pros and cons to this system, of course. The pros are that you have a huge army trained, and can call it up in case of war. The cons are that you need to pull the men out of their regular jobs every few years for additional training/repeat training. Due to budget cuts, that has not been done on a larger scale for the last 20 years or so.Anyway, the mobilisation is supposed to take 72 hours. To protect the mobilisation, as well as important locations and object (bridge, air fields, TV towers/buildings and other infratructure sensitive to early attacks and/or sabotage), a volonteer unit called the Home Guard was established in 1940. I joined a youth company in the Home Guard when I was 15, and served there for 13 years, until I moved to the US. Yes, we could join at age 15. The first year we did basic stuff: marching, erecting tents, recon, operating radios, target practice with bolt action rifles, using map and compass, etc. At age 16 we started learing assault techniques, ambushes, and combat skills, still with bolt action rifles. At age 17 we got full automatic weapons (sub-machine guns and assualt rifles). I spent many weekends out in the field on manouvers, while other kids at school were out partying or having fun. I did not expect any thanks, I did it because I cared about my country and was willing to make sacrifices to protect it. People were actually sometimes making fun of us. Later, after my miltary service, I transferred to a regular unit of the Home Guard, and continued my training. We actually got paid, the same amount as a conscript soldier. That meant about 5 dollar a day back in 1991/92, for each 8 hours of service. A weekend manouver counted as 4 or 6 hours... So nobody did this for the money.Last spring, I went to a Nascar race here in Texas. I went to watch a movie about the US Air Force with my son, and a female soldier came in and wished us welcome. She asked "is anybody here in the service or a former service man/woman". A couple of people raised their hand, and I did too, even if I did not serve with the US military. I thought she was just going to see how many were military/ex-military. She then said "Thank you for your service" to each of us. That was amazing. In 13 years, nobody in Sweden…

0 Comments

Lotus Notes sucks – or does it?

The other day I saw a posting in comp.groupware.lotus-notes.programmer, where the poster said that he have been defending Lotus Notes from people that dislike it and want to get rid of it.  I asked what problems the users had, and this is the response:This is the only application we have in Notes - we do use notes mail - but it is the application that is giving Notes a bad name. It is the result of a extremely bad design and implementation of an application 12 years ago in Notes 4.5. The application - a customer order configurator - was created by someone else in a branch of the company which sold us off so the designer/programmer is no longer available to us.. This has been compounded by massive changes over the last 6 years. I have added 2 new databases  (6 databases now) and possibly 140,000 lines of code to the application over the last 6 years. However this has been hampered by the original bad design.  This results in users getting annoyed rather frequently. So basically, one badly written application, probably developed by someone that was not a programmer or did not understand Lotus Notes, then patched over 12 years is giving Notes a bad name... What can be done about things like this? There are some (old) best practices out there, but perhaps it would be a good idea to write some new ones.  

0 Comments

Simple but effective code

The other day I was writing some code where I had to check a value against a list of potential values. I was importing a file as XML, and checking a number of transactions, each in their own node. If the Trans-ID tag had one of several values, the whole node was supposed to be discarded and not used.I am sure many already use this method, but hopefully someone will learn something new. In my example below, I am reading a field in a Notes document instead of data from an XML file, but the principle is the same:tranType = Ucase(doc.GetItemValue("txn-type"))If Instr("PD;DR;RP;NSFNF;RD;CRT;RCT;VCK;TPD;RCK;", tranType & ";") ThenEnd IfWhat I do is to use Instr() to check a string (the first argument) for the presence of a particular string (the second argument). To make sure I don't get any false matches, I add a semicolon to the end of the tranType as well as use the same character to separate the values in the first argument.The Instr() function returns the position of the string found (1 or higher if found, 0 if not found). Since 0 is "False" and everything else is "True", if the tranType string is found, a value greater than 0 is returned, which is considered "True". This LotusScript was converted to HTML using the ls2html routine,provided by Julian Robichaux at nsftools.com. 

0 Comments

Advice – What car stereo to buy?

I am in the market for a car stereo (a.k.a head unit). I have been looking around, and I have a  alternatives. But I am always looking for the best choice, so I decided to ask for help.Here are my requirements/wish list:Play MP3 from CD (other formats a bonus), support for ID3AUX in to connect my (non iPod) MP3-player (Cowon A2)Bonus: USB input for Flash drive/portable harddiskBlueTooth so I can use it as speaker phoneBonus: BT syncronisation of address book, to facilitate caller ID and outgoing calls from stereoGood sound (just using stock speakers for now, may get better speakers later)Easy to use interface, nice/easy to read displayBonus: support for text (some radio stations display artist and title of song)Bonus: ready for HD radioI been looking at the following:Sony MEX-BT2600 ($138 at Amazon, $169 at Best Buy), no USB.Pioneer Car DEHP7000BT ($220 at Amazon, $289 at Best Buy, $325 at CarToys and Fry's), has USB. Listening to the two in the store, the Sony sounded like it had a little bit clearer/better sound, but it is hard to tell in a busy store, when you don't know how the signal is being received. Any other suggestions? They must be available on the US market... The vehicle I will put it in is a 2007 Ford Taurus SEL. The budget is somewhat limited, I been getting quoted between 60 and 120 dollar for the mounting kit, and 50-70 dollar for installation. So I am hoping to not go too far over 250 dollar for the head unit. UPDATE: Since only YellowBleeders can comment here, if you have any thoughts or suggestions, feel free to mail them to me at TexasSwede@gmail.com.  

0 Comments

Why Notes is cool

Lately I have been thinking back on my career. You may have read my two postings about how I started with Notes and how I started with computers in general. This made me start thinking: what is it with Lotus Notes that I find so fascinating?I remember how impressed I was with Visual Basic when the first version came out in 1991. I had previously been writing code using Turbo Pascal, QuickC and Turbo C, so a tool that let you draw the user interface and place controls in a graphic way was a big thing.I used Visual Basic for several years, I may have been among the few programmers going from C and Pascal to Basic... But in a business environment it makes sense to use a tool that let you build application fast and efficient, not spending days to code the user interface.While I worked as a journalist in the 1990's, I looked at many other tools as well, like PowerBuilder, Delphi, Visual Caf?a Java development tool from Symantec which later got bought by Borland and integrated into JBuilder). I realized that this kind of RAD tool is what I should learn.That I ended up working with Notes was more luck than skill, though, as you can read in my other blog entry.The great thing with Notes is that I get so much for free. The user interface is mostly there, I just have to design the forms and views, set some colors and then I can write the business logic. All the database functionality is there, etc. What is there not to like? Well, we all know there are a few things that can be improved, but overall, Notes is a very powerful development platform... 

0 Comments

How I started with computers

A little while ago I wrote about how I started with Lotus Notes. When I read some other people's descriptions, they told more of their background how they got into computers as well. This has prompted me to share (if anyone really care) how I started with computers.   Back in 1974 or 75 or so, when I was 5-6 years old, my then about 20-21 year old cousin from Blekinge (where my dad was born and grew up and where most of his family lives) moved up to Stockholm. After his military service in the Swedish navy (seems like most males on my dad's side did the service in the navy, for some reason) he got a job at Hewlett-Packard. I think he started as a service technician. For the first few months he was living with my family, and he brought home a couple of different computers. Most of all I remember him bringing home a plotter one evening. I believe he even hooked it up to the phone line and downloaded some images that were then printed on the plotter. Some were just geometric patterns, but for many years I had a Snoopy cartoon created that night on my wall in my room.   In 1981 one of my good friends in school got a VIC-20. The first day he had it, we sat for hours in his room and typed in a program listing for a game from the manual. Of course it did not work. :-) My friend started programming in his spare time, but my parents could not afford a computer. When I started 7th grade in 1982, the school had been choosen as one of the four schools in the country to participate in a new government sponsored program to increase the computer knowledge in schools and to develop a Swedish computer for school use. Some different products were evaluated, including (if I remember correctly) MicroBee, TRS-80 and a couple of other systems. In the end a brand new computer was developed, based on the 80186 processor and using CP/M-86 as operating system. My school recieved a number of older Swedish made computers, the Z80-based ABC 80 and ABC 800 while the new computer, called "Compis" (an abreviation of "Computer in School" and also meaning "friend" or "buddy" in Swedish) was developed. The school decided to start a computer club, and I was there for the first meeting in fall of 1982. The school provided a room for the computers and a card reader. To get a pass card, you had to take 3 evening classes, led by older students or teachers, in Basic programming. Then you got your card and could use the computers any time the school was open and the computers were not used by a class. I believe I went to the classes right after christmas 1982. My family spent the Christmas break in Blekinge, and I brougth some programming books, read them and wrote programs on paper since I did not have any computer.   Starting…

1 Comment

How I started with Notes

Theo Heselmans blogged about how he got into Notes back in 1993, so I thought it would be fun to share my story.In 1993 I worked for IDG in Sweden as a journalist. The company used Lotus cc:Mail, but made a company-wide descision to use Lotus Notes. I believe it was in late 1994 that Notes 3 was started to be used at the Swedish subsidary , and in 1995 it was widely used there, despite some complaints, mainly from one editor-in-cheif/business unit leader who tended to give his staff older, slower computers with too little memory... Everybody else liked it, especially since IDG centrally had several good databases that replicated from Boston to publications all over the world with the latest news. This service, IDG News Service, was extremely useful for us journalists.I was of course writing about Notes, as well as about Microsoft products. I went to the predecessor of Lotusphere Europe in 1996, which took place in Holland. I was still not a Notes developer. I had worked for Microsoft earlier, and were developing some internal applications in VB and MS Word for the other journalists. I also played around with HTML and developed the first homepage for Computer Sweden, the publication I worked at.We upgraded to Notes 4.0 and then 4.5. Some users started playing around, developing Notes applications. One of the guys in accounting developed a purchase order system for us in his spare time, for example.In early 1997, the owner of a small PR agency, who did PR for Lotus, Sun, Adobe, Epson and a number of other companies, asked me if I knew HTML. He needed some help with the HTML for some homepages he worked on. After getting approval from my employer, I spent some evenings at his office helping him putting HTML code into his Notes applications he was web-enabeling. During this time I started groking Notes development. We also upgraded to Notes 4.6, where I as a developer got a number of new features.It was during the summer of 1996 I started developing actual Notes applications myself. The first big one was an archive of all articles published by Computer Sweden in the last few years. They had the articles (in several different formats) on a file server. I built the archive, then parsed and imported about 20,000 documents with different control codes (some even plan text files lacking control codes so I had to write code to analyze what was what in the files).I continued playing around with Notes, and after I got married to an american girl in 1997, I got a job with IDG News Service in Boston as a Notes developer.When I told the editor-in-chief that I was moving, he ordered me to develop an editorial system in Lotus Notes before I left. In 3 weeks, while I was also trying to pack up my apartment (alone, my wife had already went ahead to the US to prepare things), I developed the editorial system. As of last summer, it was still in use after…

0 Comments

Car accident this morning…

This morning I was on the way to work. I had spent the night at my ex-wife's house, watching our son while she worked. Normally he comes over to me, but I have to work late this week so we did like we done in the past, she get him into bed and I go over there when she is about to leave for work. Anyway, this morning I woke him up, got him dressed, fixed breakfast and sent him to school. I then got into my car. About 2/3 of the way to work, I was stopped an the onramp to SH-360 in Arlington, behind a Sears service van. I had been stopped for about 10-12 seconds, when the car suddenly was thrown forward and smashed into the van in front of me. Of course I had the breaks applied, but that did not help. The front of my car was pretty damaged, headlights crushed/hanging, hood crumpled, radiator leaking...  My back is a bit sore as well, despite me (of course) wearing seat belt. The guy that hit me (he was in a nice big Cadillac) also got some serious damages to his front, while my rear was not too bad. Luckily the airbags did not deploy. The third car, the van, had no damages. Seems like the rear of cars are much more sturdy than the front.Both me and the guy that hit me have the same insurance company, they already have the claims setup, I have a rental car scheduled for lunch, and I hope this will be taken care of painlessly and fast. The only thing that worry me is my back...Below you can see the front of my car. I was able to drive it to my work. You see the radiator fluid leaking out on the ground. 

0 Comments

Parse URL in Domino agent

Not Forum Friday, but Usenet Tuesday. :-)  A user in comp.groupware.lotus-notes.programmer had a question about generating Notes document remotely/in an automated way from another web application, using Perl: > We have a Lotus Notes application and we would like to automate> creating a new document or record in that application from another web> based application.> > Here are the details:> User action on web application triggers a PERL script to create a new> record (document) in Lotus Notes (or Domino). Here is my suggestion: Create an agent that read the URL parameters you send to it.Let's call the agent CreateNewDocument, and have two fields we want to fill out when the document is created. The Perl script can then call the URL like this: http://www.example.com/notesdd.nsf/CreateNewDocument?OpenAgent&name=John%20Doe&city=Dallas The agent read the arguments and populate the corresponding fields, then save the document. I would highly recommend using a list to store the parameters, then you have a generic function you can re-use in any application.In my article in the November/December 2006 issue of The View (starting on page 25) you have code for this. Here is a class I just wrote to parse an incoming HTTP GET or POST. Put it in a script library called for example "URL.class": Class URLclassPublic url As StringPrivate params List As StringPublic Sub New()  Dim session As New NotesSession  Dim doc As NotesDocument  Set doc = session.DocumentContext ' Document with all CGI variables  ' Check if HTTP GET or POST was used...  If Instr(doc.Query_String(0),"&") > 0 Then  ' GET was used   url = doc.Query_String(0)    Elseif Instr(doc.Request_Content(0),"&") > 0 Then ' POST was used   url = "&" & doc.Request_Content(0)   Else          ' No parameters   Exit Sub  End If End SubPublic Function GetParams() As Variant  Dim offset As Integer  Dim startpos As Integer  Dim midpos As Integer   Dim endpos As Integer  Dim nextpos As Integer  Dim dataname As String  Dim datavalue As String  startpos = Instr(url,"&")    ' Start of first parameter  Do While Not startpos = 0   nextpos = Instr(startpos+1, url, "&") ' Start of next parameter   If nextpos = 0 Then     ' We reached the end    endpos = Len(url)+1    Else    endpos = nextpos   End If   midpos = Instr(startpos+1, url, "=")< /font> ' Position of = character   dataname = Mid$(url,startpos+1,midpos-startpos-1)  ' Get name   datavalue = Mid$(url,midpos+1,endpos-midpos-1)  ' Get value   params(dataname) = datavalue   ' Add value to list   startpos = nextpos     ' Set new start position  Loop  GetParams = paramsEnd FunctionEnd Class Here is a sample agent that uses the class and print the arguments to the browser. Just expand on that code to create the document in the database:  Option PublicOption DeclareUse "URL.class" Sub Initialize Dim url As New URLclass  Dim params As Variant params = url.GetParams() Forall x In params   Print Listtag(x) & " = " & params(Listtag(x)) & "<br>" End ForallEnd Sub The LotusScript was converted to HTML using the ls2html routine,provided by Julian Robichaux at nsftools.com. 

1 Comment

Out of Office Agent

Bill Buchan just posted a great SNTT entry about the Out of Office Agent on his blog. I did learn some new things there, like I usually do when reading his blog. He is also the one that got me to start doing object oriented Lotusscript programming. As anyone that seen him present at Lotusphere or some other conference know, he is a very entertaining speaker, but he is also very smart and know his stuff... 

0 Comments

VMware overload?

A couple of weeks ago I installed VMware Workstation on my computer at home, so i could have a clean XP install to clone and use for program testing and to run multiple environments at the same time. I also installed Ubuntu 7.10 the weekend before last. This weekend I had some spare time. So I installed Windows 98 Second Edition, Windows 2000 Professional, Kubuntu 7.10, OpenSUSE 10.3 and even Mac OS X 10.4.7(!). It is a strange feeling to run OS X on a PC...I also got a new computer at work, doing similar there, but just XP and Ubuntu/Kubuntu so I can show people the environment. Might install OS X just for fun (and to test webpages with)...A (non-geek) friend asked me this weekend: "Why are you doing that?", and my answer was "Because I can"... I guess it is the same reason I collect water bottles from Lotusphere: they are there and I can... :-) 

0 Comments

Arthur C. Clarke (1917-2008)

One of the great writers of the 20th century has left us. Arthur C Clarke, best known for his books 2001: A Space Odyssey Rendezvous with Rama, Earthlight and The Sands of Mars.But Arthur C. Clarke was not only a science fiction writer. He was an avid scuba diver (which is why he moved to Sri Lanka), and he came up with the concept of using geo-stationary satellites for communicatiions. The geostationary orbit is sometimes called the Clarke Orbit in his honor. He was even involved in some satellite programs, including Telstar.He will be missed. 

0 Comments

Lotusphere water bottle collection

Over the years I got a small collection of Lotusphere water bottles. It started in 2003 when I ended up with a couple of extra bottles in my backpack on the last day, and I brought them home with me. The next year I picked up a couple again to drink at the airport while waiting for my flight, and I got one leftover as well. Since then I made sure I bring home at least one bottle per year for my little collection.This year I noticed that the older bottles were squished, like there were vacum inside. The older they were the more squished. I let some air in and noticed that it seems like water is evaporating despite the bottles being closed. Quite interesting, since there was a vacum inside. It seems like the water evaporates and get out, while air is not able to get in. The bottles have been stored above the washer, with the dryer a few feet away. Might be the temperature that did it. 

0 Comments

Birthday Cake

A couple of days ago (well, March 3) it was my birthday, and I decided to bake a cake, as I usually do. I enjoy baking and cooking, and that way I also get to have a cake the way I am used to from Sweden. I will post the directions when I get home, but it is really easy.The main difference between the cakes made the traditionally way in the US and in Sweden/Europe are listed below, but there are of course exceptions:United StatesEurope/SwedenLayersSolid cake, or 2 layers3 or more layersFillingSugar/butter mix, sometimes chocolate flavoredWhipped cream, fruit/berries, jam, vanilla custard, or chocolateCake covering"Icing" (butter/sugar mix) Whipped creamDecorationColored icingFresh fruit 

0 Comments

End of content

No more pages to load