Softwaretechnik

myndian.de

Sonntag, 18. Oktober 2009

Absolute and relative date and time

When I tell others about my life and things happening in it, most of the time I do not say: “In 1990 I have done this and in 2000 I have done that.” I mostly say “when I was 14” or “when I was 22”. I talk about “last year” or “when we married”. I talk about my son “when he was 9 month old” and so on ...

When I tell somebody about my job an the business it’s mostly the same. When discussing projects I know the exact date of the deadline and sometimes we communicate about it, but in our minds we calculate how much time we have till then.

But in most systems dates are entered, edited and shown as absolute dates. That’s mostly because this is the base for calculation and persistence. So mainly technical reasons.

There are exceptions: Have a look at the twitter messages passing by. It’s “less than a minute ago” or “about 1 hour ago”. I think, that’s really fine, because the exact time does not matter. I even think, instead of “about 22 hours ago” the term “yesterday” would be enough.

Do you know the software project management tool “Trac”? Looking at a roadmap with milestones you first see “Due in 12 days”, “Due in 6 weeks” or “2 days late” and after it there is the absolute date in brackets.

I thought about this, because we implemented a “rapid messaging tool” like twitter into our Portal-CRM.com. I think the presentation of date and time informations there should work like in twitter or probably better.

But I think managing activities, sales opportunities and so and may work with the same principle at some point. Maybe one should be able to enter dates like “in two weeks”, not concerning about the absolute one. Will this work? Showing my activities to me with “Due in 2 days”, “Due tomorrow” or “One day late” would be really nice and not bending my brain about the calender every time I read it. This is much faster!

In some cases it may be better to present the difference between to dates. So you set one fixed date and every other date information is displayed relative to it. For example the activities in a project may be shown relative to the project start and/or to the deadline. This activity starts two weeks after project start and should be finished a month before the deadline. Would this be helpful?

These are just some moving thoughts and no conclusions.
Geschrieben von Jörg in Softwaretechnik um 12:22 | Kommentare (0) | Trackbacks (0)
Tags für diesen Artikel: crm, datetime, gui, usability

Samstag, 7. Februar 2009

Toying around ... with Scala

After a long time here is a post about Scala again. I played around with composition of objects an classes from traits.


This post is also a reaction to Thomas Biskups post Toying around ..., where he played around with Qi4j to perhaps find a better architecture for his rogue like rpg “JADE”. We sometimes talking about this and I once mentioned Scalas traits.


So here is a little example of object and class composition with traits in Scala from the domain of role play games. I implemented some simple traits which I used to compose a class and a (singelton) object.


package de.myndian.scala.rpg

// Something that has a “name”
trait Named
{
  def name : String
}

// Something that has “power”
trait Powered
{
  def power : Int
}

// A namend thing that can be hitted 
trait Hitable
{
  this: Named =>
  
  var hitpoints : Int
  
  def hit(points : Int)
  {
    hitpoints -= points
    print(name + “ was hitted with ” + points + “ points. ”) 
    if(hitpoints <= 0)
      println(name + " is dead.")
    else
      println(name + " has " + hitpoints + " hitpoints remaining.")
  }
}

// A named thing that can use its power to hit a hittable
trait Fighter
{
  this : Named with Powered =>
  
  val rnd = new Random(System.currentTimeMillis)
  
  def hit(target : Named with Hitable)
  {
    println(name + “ hits ” + target.name)
    target.hit(rnd.nextInt(power))
  }
}

class Door(val name : String, var hitpoints : Int) 
    extends Named
    with Hitable


// In this fight the dwarf “kills” a door 
object DemoFight
    extends Application
{
  var aDoor = new Door(“a door”, 10)

  object TheDwarf
      extends Named
      with Hitable
      with Fighter
      with Powered
  {
    val name = “the dwarf”
    val power = 10
    var hitpoints = 20
  }

  while(aDoor.hitpoints > 0)
    TheDwarf.hit(aDoor)
}

Some sample output:

the dwarf hits a door
a door was hitted with 3 points. a door has 7 hitpoints remaining.
the dwarf hits a door
a door was hitted with 7 points. a door is dead.

So Thomas, what about “SADE”? ;-)

Geschrieben von Jörg in Softwaretechnik um 15:41 | Kommentare (0) | Trackbacks (0)
Tags für diesen Artikel: adom, composition, jade, mixins, object orientation, rpg, scala, traits

Samstag, 15. November 2008

Grails tutorials and a free e-book

I startet trying Grails by reading the Quick Start Tutorial. That’s nice to get a very trivial application running, but it was not enoough for me. So I read across the other tutorials, and tried some, but they did not really satisfy me.

So after some search I found one of those nice free e-books from InfoQ, one of my favorite sources for technical news, presentations, interviews, articles and tutorials about Java & Co. They published the book “Getting Started with Grails”, which can be downloaded as e-book for free or purchased as print version. There is also a presentation about the content of the book (one hour).

The book is written in tutorial style or “learning by example” as called by the author. For me it is just the tutorial I was looking for. Great!
Geschrieben von Jörg in Softwaretechnik um 17:14 | Kommentare (0) | Trackbacks (0)
Tags für diesen Artikel: book, grails, groovy, tutorial

Sonntag, 9. November 2008

Runnig Grails

Today I started my fourth attempt to build and run a simple Hello World Application in Groovy. I failed using Grails 0.4 and 0.5.something because it just did not work and I did not get any help. :-( Because these were premature version I tried using grails 1.0.rc4, but on my new machine. It failed too. But as I know now, because of configuration and windows permission issues.

Now I was successful! But it is very hard if you try to develop grails, while being no local admin. The problem is not Grails itself, but my lack of windows knowledge. I ended up, with nearly all windows runing as admin, except the browser. :-)

I also stumpled upon different problems. I could solve them together with our friend Google, but I think I needed two hours to get my very simple CRUD application working.

My conclusion up to now: Grails has to be easier to start with.
Geschrieben von Jörg in Softwaretechnik um 13:26 | Kommentare (0) | Trackbacks (0)
Tags für diesen Artikel: grails, groovy, windows

Sonntag, 16. März 2008

Simpler implementation of ApplicationContextAware

public class MyApplicationContextAwareClass
{

  @Autowired(required = true)
  private ApplicationContext applicationContext;

  // ...
}
Probably not very usable if you like to test your class (or you have to made the property package visible). But if your class is a test it is very nice and quite usefull.
Geschrieben von Jörg in Softwaretechnik um 13:59 | Kommentare (0) | Trackbacks (0)
Tags für diesen Artikel: configuration, spring framework
(Seite 1 von 7, insgesamt 31 Einträge) » nächste Seite

Suche

Statische Seiten

Startseite
Galerien
Impressum

Kategorien

  • XML Alltag
  • XML Internet
  • XML Musik
  • XML Politik
  • XML Reise
  • XML Softwaretechnik
  • XML Sonstiges
  • XML Visuelles

Alle Kategorien

Archive

Mai 2013
April 2013
März 2013
Das Neueste ...
Älteres ...

Blog abonnieren

XML RSS 2.0 feed
ATOM/XML ATOM 1.0 feed
XML RSS 2.0 Kommentare

Login

Verwaltung des Blogs

Login

Aktuelle Einträge

Netzwerkkultur verändert die Gesellschaft
Dienstag, 17. November

Absolute and relative date and time
Sonntag, 18. Oktober

Oren Lavie - Her Morning Elegance
Dienstag, 6. Oktober

Twitter & Blogroll
Samstag, 8. August

Read It Later: Round-Trip-Integration mit Firefox und Google-Reader
Montag, 3. August

Blogroll

* Jörg bei Twitter
* Jens bei Twitter
* Nils bei Twitter

* Beetlebum
* a life less ordinary?
* Martin Fowler's Bliki
* Springify
* BILDblog
* Plazeboalarm
* LawBlog
* ADOM Blog
* Being busy
* Dr. Gero Presser

Links

* Heise
* The Scala Programming Language
Nils' Fotos bei fotocommunity.de
Jogi auf Qype
Get Firefox!
Use OpenOffice.org

Heise News

* Wikileaks leakt Doku über Wikileaks

* Critical Communications World 2013: LTE und Android in der Blaulicht-Kommunikation

* Google Now vs. Apple Siri vs. Samsung S Voice

* HTC First: Vor Europastart wird Facebook Home überarbeitet

* SAP baut Vorstand gründlich um

kostenloser Counter