The easiest way to get acces to your RPI Zero is via the USB OTG port. The mini USB adapter on the Zero can function as a network adapter. By connecting the RPI Zero to a Linux, Mac or Windows computer you can ssh to it via the raspberrypi.local hostname. But this is not enabled by default. You need to follow the next steps to be able to:

Put a lite or full version of Raspbian on a SD card. You can use Etcher for that. You need to edit config.txt and cmdline.txt which can be found on the boot partition.

Edit config.txt and add the following line:

dtoverlay=dwc2

It should look like this:

config.txt

Save the changes.

Next editcmdline.txt. Add the following line directly after rootwait:

modules-load=dwc2,g_ether

It should look like this:

cmdline.txt

Save the changes.

To be able to ssh into the RPI Zero add an empty ssh file in the root of the boot partition.

This should be it. Put the SD card in the Raspberry Pi Zero, connect it to the USB connector on the RPI Zero and reboot. Type the following on the command line to connect to the RPI Zero:

ssh pi@raspberrypi.local

Windows should now install a new network driver called “RNDIS/Ethernet Gadget”. On Windows you need to do a bit more configuration. To find raspberrypi.local you need to install the Bonjour 2.2 drivers, which are not the latest drivers. The latest drivers are automatically install if you install ITunes. If you do not want to install ITunes you can extract the contents of the installer and find the Bonjour drivers in the extracted content.

It is important to have coding standards for the software you write because it makes it easier for other programmers and yourself to read the code. I write most of my code with C#. The coding standards for C# can be found here.

The following script can be used for installing a Node version on a Raspberry Pi and other Linux distros also if you want to (Open-mouthed smile). The script makes one assumption: the NodeJs installation file ends with .tar.gz. It does not support files ending .tar.xz.

You use it as follows:

  • Goto https://nodejs.org/dist
  • Choose the version you want to install, i.e. v5.2.0
  • Choose the node installation file you want to install on your Raspberry, i.e. node-v5.2.0-linux-armv6l.tar.gz
  • Run the script like this: install-latest-node.sh v5.2.0 node-v5.2.0-linux-armv6l.tar.gz

This is the script:

I hope you find this script usefull.

I just solved a problem with Windows 10 network access. I keep getting that I could not access the network (error 0x80004005). How did I solve it? By chance I stumbled on this article. It suggest installing ‘SMB 1.0/CIFS File Sharing Support’ which cannot be found here: Control Panel -> Programs -> Programs an Features -> Turn Windows Features on or off. In the screen that appears you can install it. Also see the screenshot below for details.

SMB 1.0/CIFS File Sharing Support

SMB 1.0/CIFS File Sharing Support

Luckily this solved the problem. I wanted to share this with you and I hope this helps.

For the last few weeks I am thinking writing some blog posts about anti-patterns in software engineering but I did not get around to it. Then last Tuesday our software architect mentioned an anti-pattern called Lava flow. He said that lava flow means the constant search and implementation of developers for new solutions to a problem and not using and/or improving existing solutions. This is of course not Lava flow but Not-Invented-Here-syndrome. Maybe he meant Not-Invented-Here-syndrome. I do not know.

What is Lava flow? Lava flow is lava pouring out of a volcano. It runs down a hill and when it stops it becomes ugly and very hard. It cannot be removed any more. In software engineering it means that the code is a relic of earlier stage of a software design. Ancient code, usually dead code and forgotten design information, which nobody dares to touch. It has been solidified into the architecture. Almost immovable. New solutions are built upon it. Making it hard to remove.

Possible problems with Lava flows are:

  • They are hard to analyze,
  • They are hard to test,
  • They are hard to maintain,
  • They can have a negative influence on performance and resource usage.

What are a few the symptoms?

  • There are a lot of TODO’s in the code,
  • No documentation of the code,
  • Lots of code that has been commented out without explanation,
  • Important looking methods or classes,
  • Complex methods or classes,
  • Long methods or classes.

The benefit of Read Uncommitted is that it offers maximum concurrency; transactions don’t have to wait or be blocked because no shared locks or exclusive locks are given. Under the Read Uncommitted isolation level, a second process can see data before the transaction that changes the data is complete. This is called a dirty read. Another possible con is the lost update: a change made by a first process is changed by a second one.

Yesterday I put Actucal on Codeplex. Actucal is an calculation model tool and engine. It allows you to define a insurance model and have that model calculate the parameters of the insurance, such as the premium.

Web projects in Visual Studio 2010 have the ability to define web.config transformations. That way a developer can create web.config files for each solution configuration based on a base web.config. Sadly this functionality is only available for web.config files. Other configuration files, like the aap.config, are not supported. So it seems anyway. The following links show how to make it work for every config file.

I hope this information will help you with your projects. Happy programming.