Monday, December 28, 2015

Back to the future: messaging

It is back to the future time again. This time for messaging apps. It seems that tech giants are finally adopting the ideas from 90's. The "killer" features that include bots that react to the messages were a part of Jabber messaging system right from the beginning. This results, of course, when a system is built by the users, not by marketing department.

http://www.usatoday.com/story/tech/news/2015/12/28/future-messaging-app-spells-end-google-we-know/77847504/

Wednesday, December 23, 2015

Automatic deployment of SSRS reports

Here is a brief article on how to set up an automatic deployment of SSRS reports.
The automation tool of choice is OctopusDeploy. This will be used to fetch and deploy the reports to different environments.

Deployment Script

Instead of writing from scratch, there is an Open Source project with a set of scripts that can be used for this purpose. The original project is here, and it can be used for feedback and documentation, while I have a working clone available here.

While trying to run the scripts, I've run into numerous issues.
  • The scripts require credentials. An article describing how to supply credentials is available here.
  • The reports projects must have the DataSet directory set up as the property in the project file.
  • Error "Property 'IntegratedSecurity' cannot be found on this object." is a result of not having authentication set up in a data source (.rds) file.
Deploying multiple projects is possible by using ForEach construct in powershell and calling the script passing the project names. Even better, after finding this, I have created a script that reads a solution file and extracts the report project file paths from it and feeds it to the deployment script.

The deployment script expects the reports to be available in the same folder or subfolders. To get this, we need to pack the reports into a NuGet package first and then unpack just before the actual deployment.

Creating NuGet Package for Reports

The NuGet package can be created during the build process on the build server. This can happen during a build of another project, which then gets pushed to Octopus using OctoPack.
Additional resources:
The solution I'm in favour of is adding a Powershell script at the end of the build process in TFS. The script extracts the build number from the TFS Build name ($env:TF_BUILD_BUILDNUMBER) and packs all the report files into the appropriate NuGet package.
To pack the report files (*.rdl), use the src="..\Reports\**\*.rdl" specifier. More info available in Nuspec Reference. Another thing that has to be included are the *.ps1 scripts for deployment.
<file src="..\Reports\scripts\**\*.ps1" target="" />
Unfortunately, it is not possible to use OctoPack to package the Reports project for this purpose.

The Deploy.ps1 script must be located in the root of the NuGet package. For this reason, we need to link the scripts like this:
<file src="..\Reports\scripts\**\*.ps1" target="content" exclude="..\Reports\scripts\Deploy.ps1" />
<file src="..\Reports\scripts\Deploy.ps1" target="" />
 The scripts above are all the scripts from the SSRS Powershell Deploy project. In order for them to work, we have to pack the solution (*.sln) and project (*.rtpproj) files, which contain all the settings for the deployment of the .rdl files.

Once done, this package is pushed to the Octopus NuGet repository.

Deploying the Reports package

Once the package has been pushed to Octopus repository, it is time to set up the actual deployment process. According to Octopus documentation,  custom scripts can be executed during the deployment. It should be enough to create a Deploy.ps1 powershell script and it will be executed by Octopus. For this, you also need to enable Custom Scripts in the deployment process.

The Reports deployment requires credentials for authentication with a SSRS server. Therefore, the deployment script must have access to these somehow. Unfortunately, Powershell has no access to the credentials of the current user which means that these credentials have to be passed as parameters. 
More info : Get Credentials without promptAt least, the password can be encrypted so it is not stored in clear text. Be aware that there are only three ways to pass credentials in Powershell.

The simplest solution I found is to provide the variables through Octopus. It allows storage of Sensitive Variables in the deployment setup and these variables can be automatically substituted or used directly in the scripts.
 

Saturday, December 19, 2015

Enable Google Keyboard sync

If Google Keyboard sync is disabled and the options are grayed-out so that it can not be enabled, the fix is simple:
Go to Text Correction settings and enable reading Contact Names.
Source: XDA
 

Tuesday, December 15, 2015

Finally some good news about robotization

"Robots Can't Replace IT Workers, Doctors, Dentists, Haldane Says"

Source: Bloomberg (link)

Monday, December 14, 2015

Modify desktop context menu items

Having installed really early versions of Visual Studio, and then replacing them with newer ones have resulted in duplicate "Open with Code" context menu items on Windows 10 desktop. While not critical, this is a bit annoying. Especially when one of the context menus does not work anymore.
To resolve, it is enough to delete a key in the registry. The location for the context menu is
HKEY_CLASSES_ROOT\Directory\Background\shell

Saturday, December 12, 2015

Wi-Fi vs USB Tethering

Here's a simple comparison of the connection speeds between Wi-Fi AP vs USB tethering, using the same Android phone providing the Internet access and a Windows PC as the client.

USB Tethering:
Wi-Fi AP:


Honestly, I would assume the cable connection would have been faster but one never knows.

Monday, December 7, 2015

Visual Studio autosave

One thing that is missing in Visual Studio (one of those things you try elsewhere and then you miss them forever when you change editors) is the autosave when focus is moved away from the code editor. Most editors have implemented this behaviour as the default and it is becoming an annoyance to have to continually keep pressing Ctrl+Shift+S to save any touched files. Nowadays, we are all using source control to inspect and verify changes made and to commit the changes to a timeline in a code repository. Therefore, not applying autosave is rudimentary, especially when there are per-file undos.
In any case, below are a few autosave extensions for Visual Studio 2015:

Let's Encrypt is in public beta

Let's Encrypt intitiative has entered public beta. Let's Encrypt issues free SSL certificates for HTTP traffic (making it HTTPS) for web sites.
Let’s Encrypt is a free, automated, and open certificate authority brought to you by the Internet Security Research Group (ISRG).

https://letsencrypt.org/

Sunday, November 22, 2015

Official CM 13 for Samsung Galaxy S3 (i9300)

It seems that Samsung Galaxy S3 (I9300) may see an official CyanogenMod build, after all. Below is a repository with Android M (6, API 23) for the device.
https://github.com/CyanogenMod/android_device_samsung_i9300/commits/cm-13.0
 

Saturday, November 14, 2015

Thursday, November 5, 2015

Fix the rotation on Nexus 7 2013

Like so many other Nexus 7 owners, I experienced the disappearance of the ability to rotate the screen on the device automatically.
Fortunately, the solution is relatively simple and very effective. The opening of the back cover looks a bit scary at first but is fairly easy if you play a guitar and have a pick readily available.

http://forums.androidcentral.com/google-nexus-7-tablet-2013/487135-nexus-7-2013-stopped-rotating.html

To quit an app or not?

Excellent justification for not creating an explicit Exit app functionality in mobile applications:
http://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon

Tuesday, November 3, 2015

Push - coming to browsers near you

Firefox just implemented Push technology for web pages that are not (even) loaded in the browser.

Read more

Saturday, October 17, 2015

SQLite Tools

Assembling the list of tools for SQLite that I've posted in other, separate, posts:
 

Monday, October 5, 2015

Model Tree Structures

Here is a good overview of the structures that can be used to store a graph / tree model in a flat / relational database.
Model Tree Structures in Mongo DB(link)

Wednesday, September 30, 2015

Fresh Start

I'm opening a new blog only for IT issues and software development topics. So far I've used my main blog for these topics but it does not seem appropriate any more.
A small shift in topics will happen now to align the themes with the blog names.