Sunday, July 16, 2017

CI for C# projects: AppVeyor

I tried Travis CI for continuous integration of a C# WPF project and it failed because Travis CI uses Mono and that is not sufficent for WPF apps. So I tried AppVeyor and was successful. My minimalist appveyor.yml file is as follows:
image: Visual Studio 2017
configuration: Debug
before_build:
  - nuget restore

Friday, July 07, 2017

Difference between novice and experienced engineers

It has been said that good/experienced software engineers can be several orders of magnitude (i.e. 10x-100x) more productive than novice engineers. I think the main productivity improvement is the fact that experienced engineers are much better at detecting/avoiding bullshit:
It’s far more dangerous to assume people know what they’re talking about, than it is to assume they don’t and let them prove you wrong.
When I was a fresh engineer, I naturally did the work given to me by other people, without questioning if it was worth doing. As I got more experienced, I realized that most of the time people don't have thought through the job they are assigning to others. This results in getting stuck in dead ends, doing things that have no importance which result in lost time and motivation.

Nowadays, I am in my 20th year as an engineer. I pride myself in my analysis skills, ability to see signal through the noise and avoiding waste of resources. A lot of times I finish a job by demonstrating that the job in question is worthless/wrong. If you compare my lines of code per unit time, a novice might produce more. But that usually means producing garbage at a faster pace, creating more problems than solutions. That is why experienced people are worth their weight in gold.

Saturday, July 01, 2017

Using Travis CI for Java Projects

When using Travis CI for automated testing / continuous integration of Java projects created with the NetBeans IDE you have to do the following:
  • On NetBeans, Project/Properties/Sources make Source/Binary Format equal to JDK7. If you use JDK8, Travis CI ant will fail.
  • You must have at least one JUnit test.
  • You have to copy Junit and Hamcrest jars to project directory and add them under Libraries in NetBeans. If you leave them under Test Libraries, Travis CI won't be able to find them.
  • Commit changes to GitHub.
  • Add .travis.yml file to your github project root with the line language: java
  • Go to Travis CI and sign in with your GitHub account. 
  • Click on your Travis CI profile picture / Accounts. Your open source GitHub projects will be listed.
  • Enable your project for CI by clicking the button to its left.
  • Click on the project to go to build page which kicks off build.
  • If you have done everything correctly, you should see a success message at the end of the build page.
  • To add the build banner on top of build page, click on the banner, select Markdown and copy the link. 
  • On your GitHub page, edit README.md, paste the link and commit. 
You can see the build results for my snake project here.