Jumping on the train

October 4th, 2011

Since my last update here I received an awesome offer for a job at Sigma IT and Management as a consultant and couldn’t help but to jump on that train. Right now it feels pretty sweet to get a crash course into the industry after all those years in the academia! Highlights with this whole consultant thing include that you’re encouraged to get certified in relevant technologies and can request courses you would like to take. For example, as my current aim is to get certified in Java and related technologies, me and some fellow consultants at Sigma will attend a three day course on Spring technologies in Gothemburg. :)

Apart from the boring book I’m reading to prepare for the Java certification exam – which contains the really ugly and obscure parts of the language that you most probably won’t come across but need to know for the test – I’ve read quite a lot of books on system development and programming. The one that probably inspired me the most was Domain-Driven Design: Tackling Complexity in the Heart of Software by Eric Evans. Many chapters maintain a fairly high conceptual level compared to many other books for developers; when you see code samples they commonly aim to exemplify a concept or idea, e.g. the supplied patterns (or building blocks) to facilitate DDD. I buy the entire argument of keeping analysis and design very close together – potentially seeing them as one – in order to not lose or misinterpret domain knowledge gained during analysis in the design and implementation efforts. Related to this argument is the concept of the ubiquitous language, a shared language based on the domain model that is used to communicate domain knowledge consistently between members of a team (or company). Through exploiting the object oriented modeling paradigm (or any other that might fit) the domain model can be implemented using concepts from the ubiquitous language. In my opinion it makes perfect sense to make use the OO paradigm to design and implement the domain model as closely as possible, i.e. avoid to make domain objects mere data containers without behavior.

Other books I enjoyed during late summer was Patterns of Enterprise Application Architecture by the infamous Martin Fowler and The Pragmatic Programmer: From Journeyman to Master by Andrew Hunt and David Thomas. The former contains plenty of useful patterns that I most certainly will look up when needed while the latter suggests and instructs how to keep a pragmatic approach to programming. I can warmly recommend them both!

At the moment I am digging throguh Effective Java (2nd Edition) by Joshua Bloch as I have been told that it is a gold mine for Java developers, and judging by the first 100 pages I have a lot of neat stuff to look forward to. Hrm this was a long post, better stop now before I make it even longer.

Over and out!

Enhanced by Zemanta

A new spark

June 21st, 2011

Some months of half-time work at Fortnox has now passed which means that I have had some time to reflect on my professional life style change. The awesomeness of being free after working hours is hard to explain; I now have the option to tend to family matters, play World of Warcraft, improve my cooking skills etcetera. When thinking about it I have been studying at the university in one form or another since 2003. Phew. No wonder I needed a change for a while.

During my doctoral studies I often found myself working evenings and weekends. There were conference papers that had to be authored, boring student assignments that had to be corrected, tedious project work – rarely connected to my doctoral studies – had to be completed in time. The pace in which all these various balls were tossed around made the whole research environment stressful and not very fun. And learning new stuff should be fun. Towards the end of my studies, right after I had finished my licentiate degree, I often found myself checking out things to deepen my skills in areas that I had been interested in for a long time. It did not have much to do with my research, but what the heck. It was fun and I had found the spark again to learn.

I am a bit surprised that, while I nowadays have the option to slack through evenings, I actively spend free time to deepen and renew my skills in software development. For example, can you name the principles object oriented design? I must say that was a valuable resource for me. In some ways I guess the thirst for understanding is a sickness (or skill if you will) that comes from having spent a lot of time in research. You need to learn new stuff and try out the stuff you learnt. The main difference from before is that now I can learn the stuff that I want to learn for the moment, in my own pace. My focus right now is on software architectures, making efforts to properly understand patterns on different architectural levels. After reading through an introduction to domain driven design I actually ordered Evans’ book. Looking forward to dig into it when it arrives later this week!

A new direction in life

March 22nd, 2011

I figured it was time for another update as it has been quite a while. Since the last update I have decided to settle with my Swedish licentiate degree for now. The main reason behind this decision is that I have not been able to figure out how to combine my parenthood with my doctoral studies. Doing research properly either a) requires you to work pretty much all the time, i.e. it’s a way of life, or b) demands that you are a very structured person that can be creative during regular working hours. Some people are able to make it, but I just cannot seem to reach b) with the freedom you have as a PhD student. Further on the road I might pick up on research again, as I am formally registered as a PhD student at LNU, but right now I am very excited in doing some work in the industry.

After poking around here and there I was offered a job at Fortnox as a system developer. I see a lot of potential in the products they offer and I look forward to contribute to these. My future office is located only a few hundred meters from my current one, so the move will not be very drastic location wise. And I already know some of the people I will work with (they’re awesome). My first day of work at Fortnox is scheduled to be the 13th of April. Before that I will have some well deserved vacation with my family and my PS3.

I will definitely miss my colleagues here at CeLeKT, especially my room mates and the coin flip to determine who will brew coffee at random.org. But there will be loads of chances to go for joint lunches or have an ice cream or two in the sun.

By the way, Still I Wither will perform live this Saturday at Musikhuset in Växjö. I strongly suggest that you drop by and get your daily dose of live music. More details are available on the Still I Wither Facebook page.

Enhanced by Zemanta

On the other side of the hill

October 10th, 2010

Since last time I wrote here a lot of things have happened. For one, my licentiate thesis was successfully defended, and I must say that it feels good to have that enormous mountain of labour behind me. The seminar went fine and my opponent gave a constructive opposition – thanks!

So now when I have moved beyond the licentiate it is time to get my act together and collect some empirical data, which certainly is needed as my licentiate thesis lacked that vital part. During the last couple of weeks I have put much of my efforts in shaping up the tool I will be using during my coming efforts – Pinetree. The system was presented already at the ICALT2009 conference, but I have not had the time to incorporate the improvements to the system since then. Mostly thanks to the time consuming process of thesis writing. :S Anyhow, the system has reached a somewhat mature status, and with some bug fixes along the road I hope it will contribute to promote Linked Data.

The plan is to realise the ideas I have presented in my licentiate thesis, where digital content generated by learners can be enriched with RDF and interconnected via distributed Linked Data applications. For the interested reader I have added some documentation about the Pinetree system over here. My aim is to release the system as open source whenever I have enough time and energy to read up on how licenses works..I am a programmer, not a lawyer, so it might take some time. ^^ Alright, that’s it for today. Until next time.

Enhanced by Zemanta

Portable Modest Weather Station

June 3rd, 2010

Within the PhD level course Sensing, Semantics and Learning at LNU we have been working with the Arduino platform to explore the ability to formalise aspects of the real world context gathered from sensors. The main part of the course involved the sensing aspect of the title; semantics was explored to some extent through looking closer at Semantic Web technologies, while learning defined the application area in which the sensor kits have been developed. The progression from the initial workshop sessions to the final ones have resulted in two “productifications”, or sensor kits, and the idea behind this blog post is to introduce one of these along with photographs of the construction work.

This particular productification has been named Portable Modest Weather Station (PMWS). It is modest in the sense that it does not claim to be a full-fledged weather station as such; the purpose of it is to measure the relative humidity (in percentage) and temperature (in Celcius) and display the results on a small LCD screen. While the program running on the Arduino has been tailored for a particular purpose, the sensor kit has been designed with modularity in mind; sensors can easily be switched via an RJ11 socked attached on the sensor kit without opening the case. The PMWS sensor kit has been built on an Arduino Duemilanove along with the following sensors:

  • SHT15 ; Relative humidity and temperature sensor.
  • A potentiometer.

The SHT15 is used to collect readings from the physical environment while the potentiometer controls the contrast of the LCD display. Readings are updated once every second and presented on the LCD display. The LCD used in the PMWS is Hitachi HD44780 driver compatible, which was a requirement for the LiquidCrystal library to work. The LiquidCrystal library made the data output an easy task to realise through simple function calls, which can be seen in the PMWS code dump at the bottom of this blog post. The programming part of the SHT15 proved to be a bit more complex, but fortunately we located in this excellent blog post with a code snippet and a circuit diagram for this particular sensor. The entire kit runs on a regular 9V battery.

The first working version of the PMWS system can be seen in the figure below. In the photograph the potentiometer is located in the upper right section, while the SHT15 is located to the left of the Arduino board. As we can see, the display shows the temperature and humidity collected in real time from the SHT15.

The wiring in the above photograph had clear potential to be simplified, which is why the following step was to group and solder connections. This step was followed by discussions regarding the design of the sensor kit casing. A rectangular hole fitting the LCD display was made to the case along with holes for the potentiometer and RJ11 socket. The end result can be seen in the two photographs below. The leftmost photograph the knob for the potentiometer residing on the top of the case and the power switch on the right side of the case, while the rightmost photograph show the RJ11 socket connected to the SHT15 sensor located on the bottom of the case. In both of the photograph you can tell what the relative humidity and temperature was in the lab at the time of photography.

The construction of the PMWS show that anyone with at least some skills in programming and electronics can create their own sensor kits for a quite reasonable amount of money. The code presented in the appendix is mostly based on code snippets and examples available on the web, and wiring schemas and examples for various sensors are common on the Web. While we were several people involved in the making of the PMWS, I am confident that albeit my novice skills in electronics I eventually would have been able to construct this and similar setups on my own.

And here comes the code as promised:


// include the LiquidCrystal library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// SHT15 variables
int gTempCmd  = 0b00000011;
int gHumidCmd = 0b00000101;
int theDataPin  = 8;
int theClockPin = 9;

void setup() {
  // set up the LCD's number of rows and columns:
  lcd.begin(16, 2);
}

void loop() {
  int val;   // Temporary storage of readings
  int temp;  // Temperature value
  int humid; // Humidity value

  /***
  *  Temperature measurement
  */
  sendCommandSHT(gTempCmd, theDataPin, theClockPin);
  waitForResultSHT(theDataPin);
  val = getData16SHT(theDataPin, theClockPin);
  skipCrcSHT(theDataPin, theClockPin);
  lcd.setCursor(0, 0);
  // Farenheit
  temp = -40.0 + 0.018 * (float)val;
  // Conversion to celcius
  temp = (temp - 32) * 5/9;

  /***
  *  Humidity measurement
  */
  sendCommandSHT(gHumidCmd, theDataPin, theClockPin);
  waitForResultSHT(theDataPin);
  val = getData16SHT(theDataPin, theClockPin);
  skipCrcSHT(theDataPin, theClockPin);
  humid = -4.0 + 0.0405 * val + -0.0000028 * val * val;

  /***
  *  Output
  */
  if (humid > 0) {
    lcd.print("Temperature: ");
    lcd.print(temp);
    lcd.print("C");
    lcd.setCursor(0, 1);
    lcd.print("Humidity:    ");
    lcd.print(humid);
    lcd.print("%");
  } else {
    lcd.clear();
    lcd.print("Please connect");
    lcd.setCursor(0,1);
    lcd.print("sensor!");

  }
  delay(1000);
}

/***
* Code beyond this point is borrowed from
* http://www.glacialwanderer.com/hobbyrobotics/?p=5
*/
int shiftIn(int dataPin, int clockPin, int numBits)
{
   int ret = 0;
   int i;

   for (i=0; i

Enhanced by Zemanta
  • Martin

  • Tweets

  • Categories

  • Archives