Today Midsummer is celebrated in Sweden, as well as in several other Nordic/Germanic countries. It is an old pagan holiday, and the only one (at least in Sweden) not hijacked by christianity, despite attempts. Midsummer celebrates the summer solstice, the shortest night of the year. It actually takes place on June 21, but Midsummer is celebrated on the Friday closes to it, in order to give people a three day weekend.
The traditions in Sweden are that you raise a midsummer pole (sometimes called May pole), usually covered in leaves and flowers. You dance around it, for example the popular "frog dance" (YouTube video here), then eat pickled herring (different varieties) with cooked potatoes and sour cream, bread, cheese, beer and akvavit.
Glad Midsommar!
|
Happy Midsummer!
|
Not sure how much I trust this survey, but it is interesting.  While computer nerds are obviously good at IT, what we didn't realise is that they're good at "it" too. An anonymous study of 2,000 British men and women from PS3PriceCompare.co.uk concluded that out of all jobs, computer geeks make the best lovers.
Source: http://www.thesun.co.uk/sol/homepage/features/article2439786.ece
|
Good news for IT professionals
|
Yesterday something happened that never happened to me before. I have always been laughing at people who drop their phones in the toilet. I been using cell phones since about 1993, and yesterday it happened to me for the first time. I had been at the pool, had some sunscreen left on my hands, walked into the bathroom to do something while I checked my mail, and the phone slipped, and plopped down in the toilet which conveniently had the lid up. Yes, I am a male, and living alone...
In about 3 seconds I had the phone up again (probably some of the longest 3 seconds in my life). I quickly dried off the excess water and pulled the battery, probably within 5-6 seconds. Took out the SIM card, MicroSD menory card and used some compressed air to clean it out as much as I could. I then put the open phone on top of my Antec Nine Hundred case (highly recommended, by the way!) with a big 200mm exhaust fan which is sending warm air out of the case. I left it there overnight to dry out.
This morning I put the battery in and the phone started up fine! The screen have some discoloration where water got in between the glass and the LCD display, but for now I can live with that. I have insurance thorugh AT&T, but the Blackberry Bold have a $125 dollar deductible.
I still have not tried everything, like taking pictures, but the phone is charging fine, phone calls and text messages work, etc. Honestly I am amazed that it survived at all.
|
Submersion test of Blackberry Bold
|
I just read Devin's posting about his scare last Thursday.
I also have a history of heart issues in my family, both my parents died from it, even if I suspect my mom got a blood clot after she had leg surgery... But the official papers say heart attack. I was always a big guy, and about 8-10 years ago it was pretty bad. I never checked my weight back then, except for at some rare visit at the doctor. I remember once the scale ringing up at 275 lbs and 6'0". I had just moved to the US at that time, and still had some problems grasping lbs vs kg. So I guess it did not really register with me how big I actually was.
In late 2002, around Christmas, I stopped drinking regular sodas and switched to diet sodas. Some time in February or March I had dropped to 260 lbs, and over the next few months I lost another 15-20 lbs. All without much exercise, just some small changes in my eating habits. Well, in addition I also was going through some marital problems and in the summer of the same year a divorce. Broken heart can be a good (if not fun!) way to lose weight...
I been steadily working on small changes in my life. Adding more exercise, tweaking what I eat, finding good but healthy as well as filling food both at the grocery store and fast food places and restaurants. I am right now at 215 lbs, for the last 8-9 months I been up and down between 212 and 225, but mostly in the lower range of that. I am not going to stress about it, the weight took years to pack on, and it will take a while to get off.
I just turned 40 in March, and I am right now at the same weight as when I left the Swedish Air Force at age 22. I am actually probably in slightly better shape now than back then (I was mainly driving trucks and heavy equipment in the Air Force). My goal is to get below 200 lbs, which is about what I was when I graduated High School. My dream is to hit 190, though.
It is hard to stay in shape when you have a job sitting on front of a computer all day, and sometimes night. On top of that, I am lazy. I now try to go to the gym several times each week, and working out with a trainer at least once a week.
But the biggest effect om my weight is how and what I eat. I foound so many good to eat that I can't really come up with any excuses not to eat healthy most of the time. I am not a picky eater, so that makes things easier, of course. The other day I had a sliced avocado, a can of drained tuna in water and two hard-boiled eggs for lunch. Excellent, very tasty. Sdding some black pepper on the tuna and avocado, and a dash of salt on the eggs made it even better. I boil half a dozen eggs every few days and put them in the fridge. A sliced egg or two on a piece of bread (especially Wasa crispbread) with some caviar on top) is a great and filling breakfast. Works for lunch too.
What I am trying to say is to make small changes you can live with. One step at a time.
|
My weight loss
|
|
It has been a while since I did some blogging, but I been recharging some this last weekend and I will try to get back into a somewhat regular schedule.
Before I start, I would like to point out a function I would love to see in Lotus Connections, where this blog runs. I don't think it is something only useful for Bleedyellow.com, but for all Connections users. The function? To allow anonymous (or at least non-validated/logged in) users to comment. Could be a setting on a per-blog basis. I don't think it is unthinkable that a company get Lotus Connections and use it both for internal/closed blogging, and for some external blogs as well, where they want to allow feedback form the public.
OK, now on to other stuff. I been reading for a while about all the benefits of the compression in Domino 8.0.1 and 8.5, as well as DAOS. So of course, having several huge databases, I got very excited. The claim system I wrote is split over a couple of databases. The main one is currently 6,930 MB (including view indexes) with 1,4 million documents, and the biggest supporting one is 7,363 MB with almost 1,8 million documents (about 1400 new ones created each business day). The view indexes are fairly large, over a GB on the first database for example.
Our Domino administrator did some testing on a Domino 8.5 server he setup, but he did not see any space savings at all on the claim system. I believe that the database size even increased a few MB. He then turned on the new attachment compression, and got a 1.5% savings, or something to that effect. He will soon try the same with his mailfile and see if he get a better result. When I get the final numbers, I will post them here.
So why are we not getting any 20-40% savings others report? Well, for one thing, the documents contain very little rich text data. Almost all fields are plain text fields, and the few rich text fields are used for comments and usually not populated with much data, if any. There are also not a large number of attachments. They are all stored outside Domino, using an FTP upload/download system I designed many years ago. In some of the main documents there is one attachment (usually a PDF of a loss report), but in many of them, the users also use the attachment functionality to put the attachment on the FTP server.
So if your database does not contain large rich text fields and attachments, it seems like the compression will not do much good. However, for mail files or other similar applications, the savings seems to be substantial.
|
Compression - not for me...
|
Recently my boss asked me to come up with a way to show certain information on a map of some kind, and after doing some research I decided to simply create a KML file and use Google Earth. In order to create the KML file, I needed latitude and longitude of each address I was going to display. I found a couple of different free services, and I decided to use the one from Google. The Google Geocode service is using a REST API, so it was easy to write some code to send address and retrieve XML with (among other things) latitude and longitude. An additional benefit is that the address get check and modified, so if the ZIP is off, or the name of the street is not "Street" but "Drive", the correct values get returned. You need to sign up to get your own key from Google, but it is free. Today I decided to write a small class to do this lookup, so now I can add this to any program I write. Below is the code for the script library, as well as a small code sample how to call it. Enjoy!
Dim geodata As GeoData
Set geodata = New GeoData("6363 North State Highway 161", "Irving", "tx", "")
If geodata.IsValid Then
Msgbox geodata.Street & Chr$(13) & geodata.City & ", " & geodata.State & " " & geodata.ZIP,, _ "Accuracy = " & geodata.Accuracy
Msgbox "Lat: " & geodata.Latitude & " Longitude: " & geodata.Longitude
End If
Class GeoData
Private GeoString As String
Public street As String
Public city As String
Public zip As String
Public state As String
Public latitude As String
Public longitude As String
Public Sub New(streetStr As String, cityStr As String, stateStr As String, zipStr As String)
Dim httpObject As Variant
Dim mapsKey As String
Dim mapsURL As String
Dim address As String
Dim retries As Integer
Dim httpURL As String
Dim returncode As String
Dim coordinates As String
Set httpObject = CreateObject("MSXML2.ServerXMLHTTP")
mapsKey = "your key goes here"
mapsUrl = "http://maps.google.com/maps/geo?q="
address = streetStr & ", " & cityStr & ", " & stateStr & " " & zipStr
httpURL = mapsURL & address & "&output=xml&key=" & mapsKey ' Use output=CSV for CSV file
Do
retries = retries + 1
Call httpObject.open("GET", httpURL, False)
Call httpObject.send()
GeoString = Left$(httpObject.responseText,16000)
returncode = GetGeoValue("code")
If retries >= 10 Then
returncode = "500" ' Fake other failure after 10 attempts
End If
Loop Until returncode <> "620"
If returncode = "200" Then
coordinates = GetGeoValue("coordinates")
latitude = Left$(coordinates, Instr(coordinates,",")-1)
longitude = Mid$(coordinates, Len(latitude)+2, Instr(Len(latitude)+2, _ coordinates,",")-Len(latitude)-2)
street =GetGeoValue("ThoroughfareName")
zip = GetGeoValue("PostalCodeNumber")
city = GetGeoValue("LocalityName")
state = GetGeoValue("AdministrativeAreaName")
Msgbox GeoString
Else
GeoString = ""
End If
End Sub
Public Function Accuracy() As Integer
Dim startpos As Long
Dim endpos As Long
If IsValid = False Then
Accuracy = 0
Exit Function
End If
startpos = Instr(Lcase(GeoString),|accuracy="|) + 10
endpos = Instr(startpos, Lcase(GeoString), |"|)
If endpos < startpos Then
Accuracy = 0
Else
Accuracy = Cint(Fulltrim(Mid$(GeoString,startpos, endpos - startpos)))
End If
End Function
Public Function IsValid() As Integer
If GeoString = "" Then
IsValid = False
Else
IsValid = True
End If
End Function
Public Function GetGeoValue(tag As String) As String
Dim startpos As Long
Dim endpos As Long
Dim tempstring As String
If GeoString = "" Then
GetGeoValue = ""
Exit Function
End If
startpos = Instr(Lcase(GeoString),"<" & Lcase(tag) & ">") + Len(tag)
endpos = Instr(startpos, Lcase(GeoString), "</"+Lcase(tag) & ">")
If endpos < startpos Then
GetGeoValue = ""
Else
tempstring = Fulltrim(Mid$(GeoString,startpos+2, endpos - startpos - 2))
GetGeoValue = Fulltrim(R5strReplace(tempstring,"&","&"))
End If
End Function
Private Function R5strReplace(mystring As String, search As String, replace As String) As String
Dim source As String
source = mystring
While Instr(source, search) >
|