• My open source pull requests

    I thought of tracking down the pull requests I’ve written for open source projects and keep them listed here for reference. Here goes nothing.

  • Optional files in Maven archetypes

    This post shows how to create a Maven archetype that can conditionally include or exclude files while generating a project.

  • A CLI comparison of Java, JavaScript and Python

    The inspiration for this post is the Python, Ruby, and Golang: A Command-Line Application Comparison published on Real Python.

  • Kafka cheat sheet

    A cheat sheet for Apache Kafka.

  • Upgrading Dependencies

    This page shows how to upgrade dependencies in various programming languages and dependency management systems.

  • Troubleshooting SSL - missing /root/.postgresql/root.crt

    I run into a problem today trying to connect to an Azure PostgreSQL database. The database enforces SSL connections (“SSL enforce status” = “ENABLED”).

  • Using Spring Boot Actuators

    Implementing Spring Boot actuators is not very difficult. In this post I’ll show what you can get for free, without adding any code.

  • Swagger and MapStruct

    I’ve been working lately on a project with a few services (or microservices, if you like to play buzzword bingo). I wanted to share some thoughts on how using Swagger together with MapStruct can make things easier.

  • Using swagger code generator with maven

    Following up the previous post about swagger, in this post I’m using the maven plugin version of swagger code generator.

  • Generate PNG barcode

    How to generate PNG barcodes in Java using the zxing library:

  • Copy InputStream to OutputStream

    To copy from a stream into a file:

  • Swagger Formats

    Some handy format combinations with Swagger:

  • Building a REST API with Swagger and Spring Boot

    In this post, I’ll be using Swagger to build a REST API with Java and Spring Boot. Swagger is an API framework. It uses a YAML-based language to define an API and it has a code generator that supports multiple languages.

  • Using AWS ECR as a Docker registry

    In this post, I’ll modify the pipeline from the previous posts to use a Docker registry powered by AWS ECR (Amazon Elastic Container Registry).

  • Removing the image-tag.txt artifact

    Small update on replacing the image-tag.txt artifact with the implicit build.number parameter.
  • Host DNS in Docker Toolbox

    How to configure Docker Toolbox so that it uses your laptop's hosts file.
  • Removing git submodules

    Submodules is an advanced git feature. It allows you to have a folder inside your repository which serves as a link to a different repository. Working with submodules is more complicated and I haven’t had a real need for it so far. Last week I had to deal with a codebase which was doing heavy usage of submodules, but without a good reason, so I got rid of them.

  • Android SDK with Jenkins

    In this post I’m setting up a Jenkins server to be able to package and sign Android packages. This is done on a 64bit PC running Ubuntu 14.04 (trusty).

  • Building wxWidgets on Mac

    In this post, I’m building wxWidgets on a Mac from source. This is done on a very old MacBook running El Capitan.

  • How to deploy a smashing dashboard to AWS Elastic Beanstalk with Docker

    So, in the previous post we created a fancy dashboard using the smashing framework. Let’s see how we can deploy our dashboard to AWS Elastic Beanstalk using Docker.

  • How to build a smashing dashboard

    An information dashboard is a way to visualize and share information within a team about things that are important. You can setup a big monitor showing live updates about build statuses, open jira issues, a sprint burndown graph, the health of your applications on production, and so on. Having this information visible is a way to keep it on the back of your head (out of sight, out of mind). It also shows to people outside your team what matters to you.

  • Publishing my first Maven package with Travis

    A little bit more than a month ago, I created an improved Maven archetype project. Similar to the default quickstart archetype, but for Java 8 and with recent jUnit dependency. In order for someone to use it, they’d have to clone the repo, as I had not published it in Maven. After a bit of studying, I figured out what is needed to make the package public. More importantly, I implemented the process in Travis, so that a new version gets published automatically.

  • Debugging Docker with IntelliJ IDEA

    In this post we’ll create a small Java application, run it inside a Docker container, and use IntelliJ IDEA to debug. This is a rather large post, so take your time.

  • Kafka with Docker: A Docker introduction

    Using Kafka on your local development machine adds another level of complexity. You need to manage two extra services, Apache ZooKeeper and Apache Kafka. In a previous post, I mentioned the possibility of creating a Windows service wrapper for Kafka, so that managing is a bit easier. In this post, we’ll have a look at Docker and how we can use it to solve the same problem in a different way. I am new to Docker, so this is a very basic post, more like an introduction to Docker.

  • How to create a simple web app with maven

    This post shows how to create a simple web application with maven. I have the relevant commits as well in GitHub for reference, in case you want to see in more details.

  • Troubleshooting TypeLoadException in mono

    I don’t do a lot of .NET programming these days. At work we deal mostly with JavaScript. However, C# is still the language I’m more fluent in and, also important, a language that I really like. That’s why sometimes I like to code a bit in C# at home. That can be either on Windows or on a Mac with Mono. The problem with Mono is that things can always be a bit different and require some extra effort.

  • GitHub badges

    You may have noticed that a lot of GitHub projects have some badges in their homepage, showing for example the status of their latest build. For a node (JavaScript) project, you can use a few more badges to show the world that everything is in order.

  • git tip: Delete merged branches

    If you want to delete your local branches that have already been merged to master remotely, run this in a bash shell:

  • Syncing Sublime Text 3 with Git

    I use Sublime Text 3 at home and at work. I use it on many computers and platforms. In this kind of setup, maintaining a consistent configuration across multiple installations can be a challenge. It just doesn’t feel right, when you switch to work on a different laptop and suddenly some package is missing here or some setting is different there. You want to simply have the same settings everywhere, without spending too much time on configuration.

  • Maven Tips

    I started using Maven at work recently. Being a newbie, I find myself googling constantly (even though the answer is always on StackOverflow) about basic things. For reference, these are my most needed actions so far:

  • View .NET assembly version on Ubuntu

    When you want to view the assembly version of a .NET assembly in Windows, you just right click the DLL and view its properties. Or, you just hover the mouse over the file and the version number will be shown in the tooltip. In Linux, things aren’t as easy.

  • Compiling Mono and friends on Ubuntu, v2

    This is an updated guide on how to compile mono from source on Ubuntu. This time, it’s about Ubuntu 14.04 (trusty tahr). This post covers:

    • mono
    • xsp
    • libgdiplus
    • nuget
    • nant
    • mod_mono
    • gtksharp
  • log4net SmtpAppender on mono

    I have some problems with the SmtpAppender of log4net on mono. I couldn’t figure out what was going wrong, it just wasn’t sending any e-mails.

  • Using controllers with the same name in ASP.NET MVC

    How to use controllers that have the same class name but different namespaces in ASP.NET MVC.

  • Ubuntu Postfix DNS errors

    I’ve got Postfix setup on my local desktop computer and on my server. On my local desktop, every now and then Postfix stops sending e-mails. The /var/log/syslog gets filled up with DNS related errors:

  • MSBuild Community Tasks NUnit and Mono

    As an experiment, I modified an NUnit test project to automatically test itself after the build process. This way, the unit tests become an integral part of the build; just by building in Visual Studio you’ll know if you’ve broken a unit test.

  • Compiling Mono and XSP on Ubuntu

    For future reference, this is what you need to do in order to install Mono and XSP on Ubuntu Server 12.04.3 LTS x64. This is about a completely blank installation, where only the SSH server role was selected during the installation of the OS.

  • Nested classes: Java vs C#

    So I have started reading up on Java. Getting reacquainted with that old friend. Playing with swing components on the UI editor of NetBeans. Reliving the horror of having to declare every exception your method might throw. The ugliness of the XML DOM API. object.setNumber(object.getNumber() + 1) and so on and so on.

  • Installing Ruby on Rails, August 2013

    During my previous attempt to install Ruby on Rails on Windows 8 I ran into a couple of issues. I decided to try again with the latest and greatest and see what happens.

  • Installing Ruby on Rails on Windows 8

    I had some problems installing Ruby on Rails on Windows 8 so I’m writing this down as a summary.

  • Run dotCover from msbuild and ccnet

    TeamCity is a very nice tool that I use at home. Unfortunately the free license allows up to 20 configurations. That’s why I’m experimenting also with another free tool, CruiseControl. It’s definitely not as easy as TeamCity, you have to edit (which means learn) an XML file that the server picks up. In general, it probably supports what TeamCity supports, but you have to make everything yourself with a lot of work. Then again, it’s completely free.

  • Synchronizing App_Data with git

    When you have a web application that stores data in it’s App_Data folder, at some point you’ll want to synchronize the development environment(s) with the live environment. This way your development machine will have the latest live data. This is a task that can be achieved with git.

  • Mac and Mono

    Some random steps on getting my Mac up to speed with Mono development.

  • Continuous Deployment with a Windows Service project

    For a long time now I had a long running process here at home implemented as a Windows Console application. The application was quite stable, but from time to time I had to fix a bug or add a new feature. Before deploying a new version, I would have to login to the deployment machine where the application was running and terminate it, otherwise deployment would fail trying to copy over the new files. Quite tedious. And then I would have to start it again, as soon as the deployment server had finished its job. I like to automate this kind of things.

  • WCF and deferred execution - where is my Exception?

    A long time ago, I blogged about WCF and deferred LINQ queries and some surprises that combination may have. Back then, our WCF service would crash inexplicably when the returning type of an operation would contain an enumerable whose evaluation was deferred until after the WCF operation was out of scope.

  • Overriding EPiServer pages

    It is not very frequent or pretty but still sometimes it’s inevitable: we have to “steal” the code of EPiServer through Reflector/ILSpy/other and modify it to suit our needs. This way you can customize pages or user controls anyway you wish, beyond the way EPiServer allows through conventional channels.

  • WCF, JSON and the DateTime

    I’m playing with a WCF service that works with JSON. If you haven’t done this already, it’s fairly easy. In the web.config, make sure your service is using the webHttpBinding binding. Also you’ll need an endpoint behavior that looks like this:

  • MasterType directive and namespace conflicts

    Let me start by saying that I hope you won’t run into this one and that you probably won’t.

  • IIS 7 gives 404.17 error with svc WCF services

    If you try to access a svc service hosted in IIS and you get the following error:

  • Exceptions using type initializer based singletons

    A popular web page describing how to implement a singleton in C# is this one, where several ways to implement a singleton are discussed. I usually pick the last option, which, according to the author of that page, has the most benefits. The author goes on to mention some problems that can occur if an exception is thrown in the constructor, but I never paid attention to that until recently.

  • How to use SQLite with Mono and Fluent NHibernate

    So I have setup my project playing nice in Windows .NET 4.0 with SQLite and Fluent NHibernate. I opened it up from my Mac to see if it would still work and, big surprise, it didn’t. It complained about System.Data.SQLite.dll not found, even though the dll was there.

  • Thread-safe code

    Consider this code:

  • Custom progress indicator for UpdatePanel

    In ASP.NET the UpdatePanel can help you create an AJAX experience very fast and easy. It is typical to provide some visual element in the page that indicates that the AJAX request is been processed. This can be an animated image, a simple text message, a pretty modal box with a nice shadow effect - anything that does the trick and tells the user that the page is not broken but it’s busy.

  • Inline quote in HTML

    It’s amazing when you work for many many years with a technology and stumble upon something new. I stumbled upon an HTML tag that I had never used before, the Q tag.

  • SystemWebCompanion

    In many ASP.NET web applications, there are some small bits of code that you have to write over and over again. They’re too small so you never bother to refactor them out as a reusable dll. After all they are so small that it’s very fast to create from scratch again. They end up as a Utils.cs file somewhere in your project, probably repeated in all your projects in one form or another.

  • Valid HTML and Valid CSS

    This blog (and this site in general) has two nice image buttons at the end of the page, saying that the HTML and CSS are valid. Are they really?

  • ASP.NET IsMobileDevice and how it works

    In ASP.NET, you can use the IsMobileDevice property in the Request.Browser object of the current request to figure out if the user is calling your application using a mobile device.

  • WCF with IIS and multiple http bindings

    If you’re writing a WCF service using .NET 3.5 and the service is hosted in IIS, there is a situation where you will get this strange error message:

    This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection. Parameter name: item
  • Getting the client's timezone in ASP.NET

    The client (browser) doesn’t send any information to the server regarding the client’s timezone. It’s just not supported. One might try to guess the timezone from the culture or even try to guess it from this new geo-location feature. Maybe in the future there will be a new header like “X-Client-Timezone: UTC+1” but for the time being a good approach is the following.

  • Installing Ruby and Ruby on Rails on IIS - Doesn't work

    I tried to see if it’s possible to install the latest Ruby on Rails on IIS 7.0. I didn’t manage to do it and the reason is that there is something broken in the fast cgi ruby gem.

  • Installing Ruby and Ruby on Rails on Mac OS X Leopard 64 bits

    This post describes what I had to do in order to have the latest and greatest Ruby on Rails up and running on my machine. At this point, that is version 3.0.1.

  • Playing with MonoMac

    Yesterday I played a bit with MonoMac, a new framework for Mono that you can use in order to create .NET applications that have a native look and feel in Mac OS X. I have never done any Mac related development in the past so I had to read up on how Apple builts its UIs. My experiments made their way to ResxTranslator’s code base, so I intend that ResxTranslator will have three separate UIs: WinForms, GTK# and now Cocoa via MonoMac!

  • Monochrome Theme for BlogEngine.NET

    A couple of weeks I started porting the Monochrome theme by mono-lab to the BlogEngine.NET platform. It’s quite tricky to port it because of the limitations on the things you can control by a BlogEngine.NET theme. Today I spent some more time and I made some good progress. It’s not ready yet but you can have a look at it.

  • Deferred LINQ queries in WCF services

    Consider the following WCF service:

  • First Umbraco experience

    Today I played a bit with Umbraco for the first time. I mostly focused on its multilingual support, which is a feature I usually expect from a CMS.

  • Combine subversion post-commit hooks with NAnt

    Subversion offers a mechanism called post-commit hook that allows an executable file to be run on the subversion server after a successful commit has been made. Since I host my own home server, containing both this website and my own subersion server, I thought I could use this mechanism to automatically update some files on the website when a commit has been made. For example, if I commit some changes on a web page template, it would be nice if it would automatically be updated on the website and also be packaged as a zip file for visitors of the site to download.

  • Playing with Castle DynamicProxy

    If you’ve ever used an ORM tool, such as NHibernate or the Entity Framework, you’ll probably have noticed that their goal is to be as unobtrusive as possible. They say, and I agree, that you shouldn’t be forced to have your business objects inherit from strange classes like MarshalByRefObject, or to annotate your properties with all sorts of ORM specific attributes. In that aspect, I find NHibernate to be rather clean.

  • Dynamic PNG Image Generation with ASP.NET

    I had created a small web app in MonoDevelop that created a png image on the fly. Porting the app to Windows .NET 3.5 with Visual Studio 2008 was almost painless, but it did include two unexpected incident. The first one was… well the app didn’t run anymore, showing the dreadful “A generic error occured in GDI+”. A bit of a research lead to this article here. Apparently the problem occurs only with PNG images. The stream that you write the generated image to needs to be seekable and I guess in Mono the Response.OutputStream is seekable but in .NET it’s not. The solution is to use an intermediate MemoryStream to write the image to and then dump that stream on Response.OutputStream.

  • ScrumCard

    I made my first “hello world” Windows Mobile Phone application today. It’s called ScrumCard. ScrumCard is a simple mobile phone application that simulates poker planning for Scrum. So if you forgot your poker planning cards, you can use this app to show your team your estimate of the story points.

This site uses third party cookies from Google Analytics and Google AdSense Accept and close popup