Google PlusFacebookTwitter

interface segregation but what about our objects?

By on Jul 17, 2017 in Deployment | 0 comments

The I in SOLID stands for ‘Interface Segregation’. This is a fancy way of saying ”splitting apart dependencies”. Basically, an object should not have to depend on more than it absolutely has too. If it does, it may have to be modified when the dependency changes, even if the given dependency has no relation to what the object is using from the dependency. The full extent of the principle can be found here and can easily be found through googling it so I won’t describe further what it is. What I wanted to dive into today is why we’re not better at applying the same thing to our models. I often see models growing out of control in our projects meaning that any time we need to use the object, map it or so, it takes a lot of energy and very easily breaks interfaces. Problem We have a model for a person, a person has a name and an age Next iteration we...

Tomato is a fruit!

By on Aug 26, 2016 in Deployment, Development | 0 comments

So what’s the most pointless thing you’ve done this week? I’ve made a game to settle the score once and for all. And maybe, in the end, it’s not so pointless after all, though, if you do feel I could’ve spent my time doing something more worthwhile I’ll admit to that 🙂 The game is available at http://fruitorvegetable.greycastle.se/. Try it out! It was a very good experience in trying out Ruby on Rails. And a few comments on this: I used Heroku for deploying this app and this was actually a breeze, a really, really good service, auto pushing code from github and all. Only thing, it’s running on Ruby 2.0 and Rails 4.1.0 which caused me a fair level of grief. Also, my page didn’t use a database, for which Rails is optimized to have which also forced me to do some additional fixes. But, if you start off in the right end, I’d really...

Hosting services easily on windows

By on Apr 15, 2016 in Deployment | 0 comments

Building applications, even servers, as console applications is great. Easy to run, easy to debug. Easy to host in a safe, error recoverable fashion.. wait what? Yes that’s right. Not out of the box of course, and not using any of the multitude of service installers out there. Use NSSM, Non-Sucking Service Manager. It’s been around for quite some time actually, I think I used it first time a few years ago but still going strong. Basically it provides an interface on top of the windows services runner and allows you to configure all the options you need, error and standard output logs, rolling, recovery and arguments for your executable. Simply...

Loggly gotchas

By on Feb 23, 2016 in Deployment | 0 comments

I’ve setup Loggly today, really nice service but I found a few gotchas you need to keep in mind to get it working. I’m doing this on a docker instance, I’m sure there are other and better ways of doing this (suggestions are very welcome), since I wanted it to be a scripted part of our current platform that’s the road I went down though. We are using the scaled down Debian Jessie AspNet vNext container as a base file when we’re deploying. Basically I’ve copied their dockerfile and built on it. This means there were quite a few packages missing that are required to get Loggly working. Required packages Here is a docker run statement to install the required packages. RUN apt-get -qq update && apt-get -fqqy install telnet sudo rsyslog wget We need these packages in order to be able to run the configuration command to setup rsyslog to push the...

Event store growing but no data added?

By on Jun 16, 2015 in Database, Deployment, Environment, Tooling | 2 comments

We had the opportunity of trying out some new tech a while back when building a licence system and going through the options for persisting data we ended up choosing Event Store (not just for the cute mascot). It’s not really intuitive to get up and running but works well once there. However, now about three months in production with only about a few thousand events stored the server went down. A quick look in told me space was out (we’re running on a free AWS instance) and I had my suspicouns. First, check the log files, no problem there but then looking at the chunk files for Event Store we found our offender, with only a few thousand events of our own the Event Store flat files was taking up 4.5gb, whaat? This shouldn’t frighten anyone really, it’s not  a lot of data and really not affecting the performance of the Event Store I think but for our tiny instance...

My path registered EXE where art thou?

By on Aug 10, 2014 in Deployment, Development, General, Tooling, Tools | 0 comments

There’s always that time when you set up a new environment and want to get to that file registered in %PATH%, like msbuild in the developers console or something. You Google or dir /s and eventually find that files but always wonder, is there not an easier way? ‘course there is: Shell C:where cmd C:WindowsSystem32cmd.exe 12 C:where cmdC:WindowsSystem32cmd.exe Splendid, isn’t it, no more hunting for those nicely registered...