Archive for the ‘School’ Category
Configure Grails AcegiSecurity Plugin with GMail
I have just got the mail plugin working with Grails and GMail. The plugin can be configured to send an e-mail when for example a user registers. To get this to work with gmail use the following settings:
useMail = true
mailHost = ”smtp.gmail.com”
mailFrom = ”admin@yourdomain.com”
mailPort = ”465″
mailUsername = ”username@gmail.com”
mailPassword = ”password”
javaMailProperties = ["mail.smtp.auth": "true",
"mail.smtp.socketFactory.port": "465",
"mail.smtp.socketFactory.class": "javax.net.ssl.SSLSocketFactory",
"mail.smtp.socketFactory.fallback": "false",
"mail.smtp.starttls.enable": "true",
"mail.debug": "true"]
A few forums discuss this topic but I could not find a solution in either of them. The standard settings the plugin authors give does not work. This Wordpress post discusses how to add asynchronous mail to the mail-plugin and brings up the setting that have to be made to the underlying mail plugin. He uses almost the settings I use for his purpose in the asynchronous plugin, however I adapted these to the mail plugin. Give it a try!
AcegiSecurity Plugin
Update
Today I had two lectures; Negotiation Skills and Management of Risk. I presented the last weeks negotiations outcome and we got a final take home exam. The last negotiation was very hard. We negotiated a union contract between an American school and its teachers. It is amazing how different values we have in Sweden compared to America. Americans prefer lay-offs the bottom percent to get salary increases. One semester week per year is perfectly normal. To negotiate as an American is, for natural reasons, therefore not very easy.
Tomorrow will be my last lecture of Strategy and Entrepreneurship. We will be presenting our business idea (briskis.se) in front of a jury. Time goes by fast… It is going to be good to get back home, but when I think about it, I have really had a great year down under. Going to study in Australia is one of the decisions I won’t regret when I review my life in the end.
Snapped this photo on my way back from school:
A thought I got on my 30 minute walk back home: Why don’t more stores use time based prising? Today’s technology creates the possibility for supply to exactly match demand. Shouldn’t it be more rational if 7eleven charged 2 dollar 100 gram chocolate 12.00 and 4 dollar at 24.00?
Assessment of Semester 2 at UNSW after midterm
The first semester at UNSW went over my wildest expectations. I got 7/7 in all four courses and a best project award. This semester my expectations have therefore been higher. So far I am a bit disappointed with my results in some topics (Negotiation Skills); in others I think I have exceeded expectations (Computer Networks and Management of Risk). I believe that a subjective course where the outcome is judged on reports/written assignments are harder to control (someone might not like the conclusions) than courses that involve more calculations and measurable outcome. Negotiation Skills might be the course where I put down most effort and enjoy the most, however my performance is worst.
| Item | My score | Average |
| Midterm Computer networking | 100% | 56% |
| Midterm Negotiation skills | 76% | 75% |
| Management of Risk assignments | (14+14+20)/(20+14+20) = 89% | ? |
| Strategy and Entrepreneurship | 87,5% | ? |
Why do an assessment? I can, without being wrong, say that almost all students don’t assess their results. Studying is my profession. I am a student. With this in mind a rational student should have to take studies seriously and look for options to continuously improve.
Blue Mountains is on fire
Today the sky in Sydney has been red, or at least the sun. This happened for about 4 months ago when there was a sandstorm in the outback. This time the rumour says that there has been a fire in Blue Mountains. Whenever you go out you can feel the smell of fire. I went for a run but aborted half way through due to the smell and a sticky feeling in my sensitive throat.
The following can be read from NSW Rural Fire Service web page:
Smoke in the Blue Mountains
Posted: 11/05/2010
National Parks and Wildlife Service are conducting a hazard reduction in the Massif Ridge (Blue Labyrinth) area of the Blue Mountains. NSW Rural Fire Service is providing assistance.
It seams like the fire/smoke is only due to a controlled exercise for reducing the fire risk. There is therefore nothing to worry about and hopefully the sun will be visible in Sydney tomorrow again! Currently the fire danger in the area is between very high and severe which has started the hazard reduction.
Recently I made an assignment in the course Management of Risk on the topic ”hazard reduction for fire”. The task involved looking at the best measure to decrease the probability of the whole forest burning down. A utility curve as constructed for different percentages of forest burning down. In the end it actually turned out that burning 5% of the forest to decrease the probability of the rest of the forest burning down was the best option. This is exactly what I think is done at the moment so the numbers where actually somewhat related to reality.
Another example that management of risk professors love to discuss is related to redundancy. A reason for having more than one engine on an air-plane is that if one fails there is still enough power in the other engines to land the plane. In some cases this way of thinking is OK if the assumption is made that the engines fail independent of each other. However this is not always the case.
In 1982, all four engines on a British Airways Plc Boeing Co. 747 flying to Perth, Australia, shut down as the aircraft encountered ash spewed from Mt. Galunggung in Indonesia. The plane fell for almost four miles before the pilot was able to restart three engines and make an emergency landing in Jakarta. (Business week, 2010-04-15).
The ash was a common failure mode causing all the engines to die. You should always be aware of common failure modes when you try to use redundancy to increase the reliability of your system…
On volcanic ash:
Brisk Marketing Research
The Condorcet Paradox
I came across an interesting concept in the previous weeks readings called the Condorcet Paradox. This states that:
If options are voted in a sequence, the options that get voted later in the sequence tends to win.
This implies that if you are in a meeting to decide something, make sure that your best option is presented as late as possible.
Let’s take an example. Table 1 presents the preferences for player 1, 2 and 3 between option A, B and C. 1 the strongest preference and 3 the weakest.
| Option A | Option B | Option C | |
| Player 1 | 1 | 2 | 3 |
| Player 2 | 2 | 3 | 1 |
| Player 3 | 3 | 1 | 2 |
Table 1. Different preferences in outcome.
Assume two sequences;
a) Option A vs. Option B = 2-1; Winner (A) vs. Option C = 1-2. Winner is C
b) Option A vs. Option C = 1-2; Winner (C) vs. Option B = 1-2. Winner is B
Further on the impossibility theorem states that it is impossible to guarantee maximisation of group preference when putting together preferences from three or more individuals on three or more options.
The order the issues are raised in a meeting/negotiation/decision situation determines the outcome. One other reason for this could be that humans often make the assumption that if A gives B and B gives C, then A must also give C. This is however not always the case outside mathematics.
It is easy to find cases when the sequence does not affect the outcome. Say that C is better than both A and B. However there is never a case where it is beneficial to start voting on an option early. The more comparisons that are made the bigger is the likelihood that an early option looses a comparison and is out of the game.
Reference
Thompson, L. L. (2005) Chapter 9. Multiple parties, coalitions and teams. IN Thompson, L. L. (Ed.) The mind and heard of the negotiator. 3rd ed.
The last week
The last week I have been busy with assignments, the gym, tennis, few parties and replies for summer job offers. Since I get back to Sweden late in the summer it has been hard to find jobs. However I have had two good offers with substantial interesting projects. I turned down an offer working with SAP and the management decision system program QLinkView. Or QLinkView is not really a MDS but a program for building management decision systems using different data sources.
I ended up very close to where I have been the previous two summers at ABB working with development of calculation/simulation tools. Working with MatLab is always a challenge.
From a topic to another. In school I have been working on my last programming assignment in computer networking. The task is to implement a reliable transport protocol similar to TCP. This is not a trivial task. Internet is a best effort network which implies that packets can be lost, delayed or reordered between a sending host and a receiver. To guarantee a reliable transfer between the two hosts can’t be made possible by the network and hence it must be implemented in the end systems. Timers, sequence numbers, acknowledgements and buffering are a few mechanisms that is used. Today I have mostly done testing and validation. One issue is how to determine the time out interval for a packet. When can the sender be sure to a certain probability that a packet has been lost? One way is to constantly measure how long it takes for a packet to be transmitted to the receiver and for the acknowledgement to get back. This estimate will fluctuate over time. A moving average is therefore used that exponentially discounts early data measures in favour for new ones. The time out interval is finally decided by taking the deviation into account. This is actually how TCP does it in the internet as well:
estimatedRTT = a*sampleRTT + (1-a)*estimatedRTT;
devRTT = Math.abs(estimatedRTT-sampleRTT)*b + devRTT*(1-b);
timeoutInterval = (estimatedRTT + devRTT*4);
Finally I want to share my new hobby with you; tennis! I have been competing successfully against Norway a few times. Two matches have resulted in two tie-break victories.
Time to go to bed.
On the toilet wall at the Faculty of Mathematics and Statistics
Assume that this holds true:
Study = no fail (1)
No study = fail (2)
This implies:
(1) + (2) –> Study + no study = Fail + no fail
<=> Study (1 + no) = Fail (1 + no)
<=> Study = Fail

Public transport information system survey
I have just put together a survey that really needs some sincere answers:
Give me your input! The survey will popup in a window!


















