I’m quite new to the backend world so what I’m about to describe to you might be total blasphemy or quite trivial. Either way, I came up with this simple setup after a series of “Because that’s just how you do it” answers that didn’t please me as I’ve got quite a curious nature and nobody managed to satisfy my curiosity.

At work, in order to plunge me into the world of backend developers, I’ve been assigned a simple app. Got my tables, need to setup CRUD apis and so on. At a certain point I release my work for the frontend and mobile devs to test. They came back to me saying: “We need you to add versioning to your apis”. No problem for me, it sounds quite logical after all being able to support an older version whilst releasing a new set of APIs.

So, not being accustomed to the backend developer world and uses, I ask: “How do you guys do that?”. What I got as a response triggered me and made my skin crawl: “Just copy/paste the old code and make new routes for the new version”

I’ll let you guys read that last answer one more time…

Ok?

Nice. So here I am, a C++ dev trying to get the hang of things in the backend world and these guys are telling me that duplicating code is actually a procedure that’s accepted.. At first I thought they were pulling my leg, but as I kept asking how they intended to deploy this I realized that they weren’t joking at all.

So basically, this is what backend developers do in order to support old apis:

api/
|
|- v1/
|- myapi.js
|
|- v2/
|- myapi.js

…
…
…

I don’t know you guys, but that’s ugly as hell to me. I kept on asking “WHY” this procedure and duplication of code was the “common” procedure and I kept on getting a “Because it’s like that” answer.

Well, as a fan of docker that I am, it took me 10 minutes to demonstrate that their method was caveman-like and that I could obtain the same effect without code duplication.

How I did it

Basically what I did was, of course, dockerize my application (that’s basically the first thing I did when I setup the project). So now, I can have different working versions of my code in ready-to-use containers.

Let’s say I have myapp:v1 container and myapp:v2 container. This is already the first step into having tow different API versions. As the names states, v1 has /v1/:apis and v2 has /v2/:apis. Now both the containers in order to run together, need different ports to comunicate on and this is a problem for clients as they don’t want to go chaning their ports when calling my apis. In order to come over this problem I use nginx and the pretty cool feature proxy_pass. You should already know where I’m going here.

With a simple nginx setup I now have my two versions of the API running on the same server in different containers and both talking through port 80 (or whatever port you decide to setup for nginx).

NOTE: of course you’ll need to launch your containers and set them up to use different ports and be available on the system

This one’s a simple post to remind all of you out there to alwayscheck yourconfig/settings files and be sure you don’t add junk to them.

So, to my (solved) problem.

I started noticing one day, after a few kernel updates, that my laptop wasn’t
detecting acpi events anymore (battery, leds on keyboard, screen luminosity). I
immediatly blamed it on the kernel as I’ve already had similar problems like this in the past with my old Acer 5930g.

So I said to myself: “ok, let’s just wait for an update”.
Many updates passed and still I was having the same issues until tonight.
Bored, I decided to investigate the problem and get down to the bottom of it.

I started off with checking out all errors in the logs when I came across

Hmm, strange. I didn’t remember adding those there. A check on the file “/etc/modules-load.d/virtualbox.conf” showed that they were actually there, so I just simply removed them from the file leaving only the “vboxdrv” module to be loaded.

This summer I bought a new laptop, a Dell Vostro 3460. First thing I did was install arch linux.
Nothing wrong with it except one little annoying thing: multitouch was not correctly detected and the synaptics driver was not correctly loaded.
Luckily via the Arch linux forums a solution was found.

I’ll quote the procedure:

download latest alps source code from here (in case the page goes in 404 i have a stashed copy here)

Lately my pc was slowing down when using KDevelop and Chromium together and completely froze when I launched amarok as well.
Something was up but I couldn’t quite figure what it was. I kept on thinking that it was my laptop (an acer 5930g – yes, the one that still suffers from the acpi bug from kernel 2.3 2.6.3 ) until I noticed in my htop that my swap was 0/0MB.
Quite odd indeed..
I don’t know what caused it to be like that but in the end I solved the problem with
a few lines from my konsole.
Here’s the solution:

swapoff -a
mkswap /dev/your-swap-partition
swapon -a

et voilà! your swap partition will be restored! Plus, no more slow downs on my pc when developing! \o/

Hi folks!
Just wanted to give you lot a quick update on how things are going with KDE-Telepathy.
One word: GREAT!
Today I finished implementing the global presence setting for the presence applet and a patch is in review for the contactlist.
We’ve also decided to switch to haze msn instead of butterfly. The main reason for this change is that butterfly does not support the SASLChannel, which means it cannot use kwallet (plus it was a bit buggy).
As David said in his previous blog post we’ve also got a cool drag ‘n’ drop feature from the contact list to the kde-plasma desktop! \o/
We’ve entered the hard feature freeze and now we’ll be polishing things up.
So help us do a good job by testing our software and reporting bugs so that we can assure you a good user experience!

Hi all!
A quick post to let you guys have a bit of fun. Let’s play spot the difference!
Can you find the differences between these two photo’s shown below? They differ by a year.
The subjects to look for are: grundelborg, d_ed, drdanz, drf_ and andrunko. You should be able to spot them quite easily 😉

My aim for the woshibo sprint (kde-telepathy sprint) is to get something going for audio/video calls in kde-telepathy.
The sprint started off well. We discussed a lot about how the project is to evolve and sorted out the problems we currently have

This afternoon I was depressed because I was having problems on my pc that NOBODY else was but in the end I managed to sort things out after bugging a Collabora guy and George K. (which I thank for not having killed
me for asking him 1.000.000 questions).
So in the end I managed to call George K on his n900 with my pc and listen to him speak 🙂
So that’s a +1 for kde-tp!

Just to let you guys know what’s currently going on:

mck182 – currently working on the “now playing” pluginshocklaterboy92 – currently working on a new plugin system for kde-tp-chatdomme – telepathy kde loggingd_ed – furious bug fixing and kwallet integrationdrdanz – auth handler + file transfer awesomenessgkiaga – mental farsight fixinggrundelborg & drf – talking about stuff out of my league that I can’t comprehend. So it’s gonna be awesome 😉me – telepathy-kde-call-ui

So as you see, we’re all quite busy here.
Stay tuned for more news on the Woshibo sprint!

Hello all!
Cool thing happened today, I finished the Contact plasmoid for KDE-Telepathy! Yaaaaay!
This plasmoid is a simple 128×128 plasmoid that sits on your desktop and let’s you keep your favorite contact (or contacts if you have many friends) always at hand.
The contact presence status is displayed by a coloured frame on the outside. If you click on the plasmoid you’ll get a drop down menu with the possible/available actions you can use with that contact according
to your kde-telepathy capabilities and the ones of the selected contact.
I started off using the ktelepathy library nepomuk model for this plasmoid but ran into some problems halfway through so I had to fallback to the telepathy model (model we use in our contactlist component).
But no worries, we kde-telepathy devs have a sprint coming soon (September) where we will discuss problems and the future of the project and solve annoying issues.
I really believe in the integration of KDE apps data into nepomuk so don’t worry, we’ll get there.
Until my plasmoid goes public you can take a look at this nice video I hope you all will appreciate.