Freitag, Februar 27, 2015

Paper auf arxiv

http://arxiv.org/abs/1502.05417

The Evolution of Popular Music: USA 1960-2010

Matthias Mauch, Robert M. MacCallum, Mark Levy, Armand M. Leroi

Montag, Februar 23, 2015

Mono Mac / Xamarin Mac Notizen

Erste Schritte zu einfacher App:

Wann kann man auf die gebundenen Outlets zugreifen?

  • Ab AwakeFromNib()

Wie beendet man das Programm beim Schließen des Fensters? Es gibt mindestens 3 Varianten:

  1. Im WindowController - per Event (in Initialize()):
    this.Window.WillClose += () => NSApplication.SharedApplication.Terminate(this);
  2. Im WindowController - per "Delegate" in Initialize:
    this.Window.Delegate = new MyWindowDelegate();

    dann MyWindowsDelegate:
    class MyWindowDelegate : NSWindowDelegate
    {
           public override void WillClose(NSNotification notification)
           {        // close app
                  NSApplication.SharedApplication.Terminate(notification);
           }
    }
  3. Im AppDelegate ApplicationShouldTerminateAfterLastWindowClosed überschreiben:
    public override bool ApplicationShouldTerminateAfterLastWindowClosed
        (NSApplication sender)
     {
                return true;
     }
Wie greift man auf Settings zu?
  1. Schreibend:
    NSUserDefaults.StandardUserDefaults.SetBool(true, "LastFileNameOK");
    NSUserDefaults.StandardUserDefaults.Synchronize ();
  2. Lesend:
    bool val = NSUserDefaults.StandardUserDefaults.BoolForKey("LastFileNameOK");
  3. Defaults setzen (ungetestet, sollte so gehen)
    var dict = new NSMutableDictionary ();
    dict ["UserName"] = (NSString)"User"; NSUserDefaults.StandardUserDefaults.RegisterDefaults (dict);
Wie reagiert man auf die Standard-Menü-Einträge?
  • z.B. im AppDelegate entsprechende Methoden positionieren, Action-Namen entsprechend dem, was in XCode bzw. der API-Doc steht, z.B. für Neu:
    [Action ("newDocument:")]
    public void NewDocument (MonoMac.Foundation.NSObject sender)
    {
                // call mainWindowController and tell him to do something new
    }
So geht's weiter:

Donnerstag, Februar 19, 2015

CAD revisited

http://www.thingiverse.com/thing:232578
Which 3D software should I learn for 3D printing?

https://www.youtube.com/watch?v=ltRL0qXgo2A
Solidworks - using variables and equations

http://www.rs-online.com/designspark/electronics/eng/page/mechanical
Designspark Mechanical (free CAD)

http://www.punchcad.com/c-12-consumer-cad.aspx
ViaCAD (cheap CAD)

http://www.openscad.org/
OpenSCAD (program watertight STL models)

Donnerstag, Februar 05, 2015

C# Hack: Tuple mit Namen durch anonymous Type

http://stackoverflow.com/questions/15749445/is-there-a-trick-in-creating-a-generic-list-of-anonymous-type

var list = Enumerable.Empty<object>()
.Select(r => new {A = 0, B = 0})
.ToList();
list.Add(new { A = 4, B = 5 }); // adding actual values

Dienstag, Januar 27, 2015

Brettspiele wie Carcassonne heißen “Eurogames”

in den USA, interessant.

Mit Bewertung: http://martinfowler.com/articles/eurogames

Cannot Measure Productivity

http://martinfowler.com/bliki/CannotMeasureProductivity.html

We see so much emotional discussion about software process, design practices and the like. Many of these arguments are impossible to resolve because the software industry lacks the ability to measure some of the basic elements of the effectiveness of software development. In particular we have no way of reasonably measuring productivity.