The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for November, 2013

ITDevCon 2013: speaker; Last=Pluimers

Posted by jpluimers on 2013/11/19

This summer was rough with some intestine issues, so I was really happy the recovery worked out and I could make it to a couple of conferences this fall.

ITDevCon 201 3was one of them, and I had great fun!

The BitTime people organizing the conference took many nice pictures of which one of me when I was explaining MVVM.

Note that the conferences downloads are online at https://bitbucket.org/jeroenp/conferences/src/tip/2013, so even if you didn’t make it you can still watch he slides and play with the examples.

Thursday there is one more conference to go: Be Delphi, and I will upload the materials from there as well.

–jeroen

Posted in Delphi, Delphi XE5, Development, Software Development | Tagged: | Leave a Comment »

LinkedIn: connecting two people, sort of. (via: LinkedIn Answers)

Posted by jpluimers on 2013/11/18

One of the things I wish that LinkedIn implements is an easy way to connect two of your relations.

I understand that the underlying issues might be a tad more difficult than this simple request (what about spam connects, or other security concerns?), but right now the way to do this is cumbersome:

how do i connect two people ?
posted June 18, 2009 in Using LinkedIn

Daniel Jatovsky:

You cant connect two people, but you can introduce them to each other. Then its up to them to connect.

There are two methods in LinkedIn for doing this.

One is to go to each persons profile. At the top of the profile is a link to Forward this profile. Click on it, forward it to the other person with a note from yourself. Once they’ve responded positively you can forward contact information to each other.

The other is to send a message to both simultaneously. To do that, go to your Inbox and click on Compose a message and select Send a message to a connection. Write a message that you can send to both simultaneously and, if you like, check the box that allows them to see the other persons name and email address.

–jeroen

via: how do i connect two people ? | LinkedIn Answers | LinkedIn.

Posted in LinkedIn, LinkedIn, Missed Schedule, Power User, SocialMedia, WordPress | 2 Comments »

Android 4.2+: enable USB debug mode (Nexus 4, Nexus 7, etc)

Posted by jpluimers on 2013/11/15

Researched this a long while ago, but just presented this at my Delphi cross-platform session on ITDevCon 2013 (of which some sessions have been broadcasted on YouTube):

With Android 4.2 and up, they did hide the debug mode a bit.

Perform these steps one to enable debug mode:

  1. Go to “Settings”.
  2. Scroll down to “About phone” or “About tablet”.
  3. Tap on “About phone” or “About table” to go to the “About” screen.
  4. In the “About” screen, scroll down, to “Build number”
  5. Tap on “Build number” seven (7!) times. It will give you some messages until finally it shows “You are now a developer”.
  6. (On some devices): confirm with the PIN code for your phone.

The above steps unlocked the “USB debugging” mode.

To enable or disable “USB debugging” mode:

  1. Go to “Settings”
  2. Choose “Developer Options”
  3. Choose “Debugging”
  4. Choose “USB Debugging”

–jeroen

via:

Posted in Android, Android Devices, Delphi, Delphi XE5, Development, Missed Schedule, Mobile Development, Power User, SocialMedia, Software Development, WordPress | 1 Comment »

ESX(i) AutoStart virtual machines: how to change the VM startup/shutdown settings (via: VMware Communities)

Posted by jpluimers on 2013/11/15

Since it usually is a one-off setting, I find it hard to remember how to configure the startup/shutdown behaviour of VM guests in an ESX(i)/vSphere environment.

Adding to the confusion is that this is a setting on your host, not on guest VMs.

Luckiliy, Jase McCarty and others explained this on the VMware communities, which I sligly edited:

Look under the configuration tab, at “Virtual Machine Startup/Shutdown”.

Choose Properties.  You can configure the startup/shutdown here.

In the VMware Infrastructure Client (on newer installs this is called VMware vSphere Client) I client you’ll want to select the host.

Then click on the Configuration Tab and you should see Virtual Machine Startup/Shutdown.

Select that and then click on Properties (this is on the upper right corer, not intuitive).

Hi Im using ESXi 4.0 and vSphere client, but the “Edit” button is grayed out or not active in the VM Startup/Shutdown propertiessystem settings. Is this license issue, does ESXi 4.0 doesnt support autostart of virtual machine anymore?

Click on the Move Up button to move a virtual machine to Automatic Startup or Any Order.

The trick is twofold:

  • there are 3 sections (a bit hidden in the documentation: Automatic Startup, Any Order and Manual StartupManual Startup is default)
  • the Move Up and Move Down buttons move VM guests not only within a section, but also across sections.

Click on the screenshot below to see a larger version. Read the rest of this entry »

Posted in ESXi4, ESXi5, ESXi5.1, Power User, VMware, VMware ESXi | Leave a Comment »

.net/C#: you can pass anoymous types to a generic method, but not return them as a method result

Posted by jpluimers on 2013/11/12

You can pass anonymous types to a method, if that method has a generic parameter type. I regularly use this to Resolving a parameter name at runtime using the Generic Type Cache technique described by Rinat Abdullin.

The other way around however is impossible, as return types cannot, as Alexander M. Batishchev writes in his StackOverflow answer:

You can’t.

You can only return object, or container of objects, e.g. IEnumerable

Jared Par does a bit more elaboration:

You cannot type any method in C# to be the explicit type of an anonymous types. They cannot be “named” so to speak and hence cannot appear in metadata signatures.

If you really want to return a value which is an anonymous type there are 2 options

  • Have the return type of the method be System.Object. You can then do evil casting hacks to get a typed value in another method. This is very fragile and I don’t recommend it.
  • Use a generic method and a type inference trick to get the return type correct. This would require a very interesting signature definition for your approach.

Anonymous types were not really meant to be passed around in this fashion. At the point you need to pass them around between your functions in this manner, you’re better off explicitly defining a type.

Bummer (:

–jeroen

via:

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »

MacMost Now 256: Using the Text Editors Hidden in Terminal (Pico, Nano, VI, Emacs)

Posted by jpluimers on 2013/11/11

Great video that shows the console text editors Pico, Nano, Vi and Emacs on Mac OS X.

Many Mac users don’t know how powerful the console terminal can be, but since it is BSD based, it has a very broad set of commands available on the console.

If you need a text editor like Joe, then you can install it from the THE GNU MAC OS X Public Archive using this as a download page: PROJECT DETAIL for Joe’s Own Editor.

More info about joe:

–jeroen

via MacMost Now 256: Using the Text Editors Hidden in Terminal.

Posted in Apple, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, OS X 10.8 Mountain Lion, Power User | Leave a Comment »

Connecting to a Macintosh computer via USB – Android OS Help

Posted by jpluimers on 2013/11/08

While an Android device connects seamlesly to a Windows computer, you need to install Android File Transfer and run it each time you want to connect to it from a Mac running OS X.

See: Connecting to a Macintosh computer via USB – Android OS Help.

–jeroen

Posted in Apple, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook-Air, MacBook-Pro, OS X 10.8 Mountain Lion, Power User | Leave a Comment »

Cyber-Dojo: practice unit-tested programming in pairs/groups using Katas

Posted by jpluimers on 2013/11/07

Wow, I’ve been living under a stone (:

Just discovered the online Cyber-Dojo by Jon Jagger. It is an online manifestation of a Coding Dojo. Both have been there for years, and I think both are brilliant.

They take the concept of a Dojo as being a place to practice sports like martial arts in a pair or group setting with a series of Katas or practices.

Katas in a Dojo are a means for performing deliberate practice in order to learn new things. For instance, acquire new movement techniques, learn about your balance, gain strength, all in both a physical and mental way.

The aim of both is do more deliberate practice.

When performing Coding and Cyber Dojo, you should use Test Driven Development using pair programming and BabySteps. Those help you to slow down, as one of the Dojo Principles is for Katas to slow down. It reminds me of the “if you are in a hurry, sit down” mantra and is a key part of the Coding/Cyber Dojo Principles too.

The aim is to learn, and part of that is to first un-learn and open you to new thoughts. That’s why it is so cool that the Cyber-Dojo provides you with:

  • a bunch of pre configured programming languages*,
  • preformulated practices** (including a few cyber-dojo refactorings),
  • a small boilter plate to get started.

You’d think they speed you up, but that is not their aim. Like a regular Dojo it gives you an pre-set environment and gives you piece of mind to get started.

The Cyber Dojo does without a Sensei, whose purpose in a Coding Dojo is to ask questions in order to guide the participants.

That’s why it is good to use the Cyber Dojo as part of a Coding Dojo: basically the Cyber Dojo provides a standardizes set of tools to quickly setup a Coding Dojo.

Cyber Dojo languages

(a prime number, so the table is a bit distorted)

C Go PHP
C# Haskell Perl
C++ Java-Approval Python
Clojure Java-Cucumber Ruby
CoffeeScript Java-JUnit Ruby-Rspec
Erlang Javascript

Cyber Dojo practices

Many of the practices come from rosettacode.org.

100 doors Harry Potter Print Diamond
Anagrams LCD Digits Recently Used List
Bowling Game Leap Years Reversi
Calc Stats Mine Field Roman Numerals
Count Coins Monty Hall Tennis
Diversion Number Names Unsplice
Fizz Buzz Phone Numbers Verbal
Game of Life Poker Hands Yahtzee
Gray Code Prime Factors Zeckendorf Number

–jeroen

via:

Posted in .NET, Agile, C, C#, C++, Development, Java, JavaScript/ECMAScript, Perl, PHP, Scripting, Software Development, Unit Testing | 3 Comments »

fun to read: blog of a reverse engineering team member

Posted by jpluimers on 2013/11/06

A while ago, I came across this blog: Levis’s Little Blog about Reverse Code Engineering (RCE) | All about Reverse Code Engineering.

It is of a beginning reverse engineering guy, doing reverse engineering of parts of application code, and being part of a REPT scene publishing key generators and crackers of software.

I think the interesting part is not so much his skill level, but has these aspects:

  • his choice of tools and how he develops skills tells you much about the scene and how they work
  • examining the keygens, cracks, etc, tells you a lot about how well the software is that we write
  • the abundance of people like him and the available tools basically void every copy protection scheme you can imagine

Part of his toolset are come from a few video tutorials he posted about, where this is in the context menu of a .EXE file: Read the rest of this entry »

Posted in Development, Software Development | Leave a Comment »

.NET/C#: Fingerprinting a machine

Posted by jpluimers on 2013/11/05

For my link archive, thanks Alek Davis:

Just keep in mind that ID of the CPU is not always available.

By the way, what are you trying to accomplish? If you want to generate a unique key for a computer instance, check the Generating Unique Key (Finger Print) for a Computer for Licensing Purposes post by Sowkot Osman at Codeproject; it can give you some hints (also read comments).

–jeroen

via: .net – APIs in C# for grabbing CPU IDs and drive/volume serial – Stack Overflow.

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »